diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/fw_config.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/fw_config.c b/src/lib/fw_config.c index 2f7186cc86..2c4c6b290c 100644 --- a/src/lib/fw_config.c +++ b/src/lib/fw_config.c @@ -28,7 +28,7 @@ uint64_t fw_config_get(void) sizeof(fw_config_value)) != sizeof(fw_config_value)) { printk(BIOS_WARNING, "%s: Could not get fw_config from CBFS\n", __func__); - fw_config_value = 0; + fw_config_value = UNDEFINED_FW_CONFIG; } else { printk(BIOS_INFO, "FW_CONFIG value from CBFS is 0x%" PRIx64 "\n", fw_config_value); @@ -38,8 +38,10 @@ uint64_t fw_config_get(void) /* Read the value from EC CBI. */ if (CONFIG(FW_CONFIG_SOURCE_CHROMEEC_CBI)) { - if (google_chromeec_cbi_get_fw_config(&fw_config_value)) + if (google_chromeec_cbi_get_fw_config(&fw_config_value)) { printk(BIOS_WARNING, "%s: Could not get fw_config from EC\n", __func__); + fw_config_value = UNDEFINED_FW_CONFIG; + } } printk(BIOS_INFO, "FW_CONFIG value is 0x%" PRIx64 "\n", fw_config_value); @@ -63,6 +65,11 @@ bool fw_config_probe(const struct fw_config *match) return false; } +bool fw_config_is_provisioned(void) +{ + return fw_config_get() != UNDEFINED_FW_CONFIG; +} + #if ENV_RAMSTAGE /* |