Cliff Huang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83153?usp=email )
Change subject: src/lib: Add Kconfig variable for fw_config default value ......................................................................
src/lib: Add Kconfig variable for fw_config default value
Set CONFIG_FW_CONFIG_DEFAULT_VALUE in config.<board> file. This default value will be used when it is not able to read via Chrome EC, CBFS or VPD.
TEST=boot and check fw_config value from coreboot log
Signed-off-by: Cliff Huang cliff.huang@intel.com Change-Id: I9694433e01bdcd9ff1e550585c14ea7ccee020a3 --- M src/Kconfig M src/lib/fw_config.c 2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/83153/1
diff --git a/src/Kconfig b/src/Kconfig index 1ec7552..5241cee 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -543,6 +543,12 @@ override other sources and allow the local image to preempt the mainboard selected source and can be used for other FW_CONFIG_SOURCEs fallback option.
+config FW_CONFIG_DEFAULT_VALUE + hex "Default fw_config value" + default 0x01000 + help + This value will be used when not able to retrieve from all other sources. + config HAVE_RAMPAYLOAD bool
diff --git a/src/lib/fw_config.c b/src/lib/fw_config.c index 02e2a7d..804ede4 100644 --- a/src/lib/fw_config.c +++ b/src/lib/fw_config.c @@ -54,6 +54,12 @@ __func__); }
+ if (fw_config_value == UNDEFINED_FW_CONFIG) { + fw_config_value = CONFIG_FW_CONFIG_DEFAULT_VALUE; + printk(BIOS_INFO, "FW_CONFIG value from Kconfig is 0x%" PRIx64 "\n", + fw_config_value); + } + return fw_config_value; }