diff --git a/include/igsc_lib.h b/include/igsc_lib.h index c4e7317..593f46a 100644 --- a/include/igsc_lib.h +++ b/include/igsc_lib.h @@ -114,7 +114,7 @@ enum igsc_fwdata_version_compare_result { }; /** - * Structure to store OEM manufacturing data version and data major VCN + * Structure to store OEM manufacturing data version and data major VCN * for GSC in-field data firmware update image */ struct igsc_fwdata_version { @@ -971,6 +971,18 @@ IGSC_EXPORT int igsc_image_oprom_has_2ids_extension(IN struct igsc_oprom_image *img, OUT bool *has_2ids_extension); +/** + * @brief returns whether the oprom code config has devId enforcement bit set + * + * @param igsc_hw_config device hardware configuration. + * @param devid_enforced true when devId is enforced, false otherwise + * + * @return IGSC_SUCCESS if successful, otherwise error code. + */ +IGSC_EXPORT +int igsc_image_oprom_code_devid_enforced(IN struct igsc_hw_config *hw_config, + OUT bool *devid_enforced); + /** * @brief release the OPROM image handle * diff --git a/lib/igsc_lib.c b/lib/igsc_lib.c index 8ae421e..a5958e1 100644 --- a/lib/igsc_lib.c +++ b/lib/igsc_lib.c @@ -1702,6 +1702,22 @@ static int gsc_image_hw_config(const struct gsc_fwu_img_layout *layout, return IGSC_SUCCESS; } +int igsc_image_oprom_code_devid_enforced(IN struct igsc_hw_config *hw_config, OUT bool *devid_enforced) +{ + struct gsc_hw_config_1 *hw_config_1; + + if (!hw_config || !devid_enforced) + { + return IGSC_ERROR_INVALID_PARAMETER; + } + + hw_config_1 = (struct gsc_hw_config_1 *)hw_config->blob; + + *devid_enforced = (hw_config_1->oprom_code_devid_enforcement == 1); + + return IGSC_SUCCESS; +} + int igsc_image_hw_config(IN const uint8_t *buffer, IN uint32_t buffer_len, OUT struct igsc_hw_config *hw_config)