diff options
Diffstat (limited to 'src/lib/fw_config.c')
-rw-r--r-- | src/lib/fw_config.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/fw_config.c b/src/lib/fw_config.c index 3546736b7b..72cf225cae 100644 --- a/src/lib/fw_config.c +++ b/src/lib/fw_config.c @@ -11,6 +11,7 @@ #include <lib.h> #include <stdbool.h> #include <stdint.h> +#include <drivers/vpd/vpd.h> uint64_t fw_config_get(void) { @@ -44,6 +45,17 @@ uint64_t fw_config_get(void) fw_config_value); } + if (CONFIG(FW_CONFIG_SOURCE_VPD) && fw_config_value == UNDEFINED_FW_CONFIG) { + int vpd_value; + if (vpd_get_int("fw_config", VPD_RW_THEN_RO, &vpd_value)) { + fw_config_value = vpd_value; + printk(BIOS_INFO, "FW_CONFIG value from VPD is 0x%" PRIx64 "\n", + fw_config_value); + } else + printk(BIOS_WARNING, "%s: Could not get fw_config from vpd\n", + __func__); + } + return fw_config_value; } |