From 3864973a0960c942ad96664676f59dae9f3eff2d Mon Sep 17 00:00:00 2001 From: Wonkyu Kim Date: Mon, 1 Nov 2021 20:15:30 -0700 Subject: src/lib/fw_config: Change fw_config sources priority Request fw_config values from various sources (as enabled via Kconfig) until a valid value has been read. With this change, Chrome EC CBI takes precedence over CBFS fw_config. TEST=select both configs and check fallback behavior. 1. select both FW_CONFIG_SOURCE_CHROMEEC_CBI and FW_CONFIG_SOURCE_CBFS 2. check log for reading fw_config from CBI and CBFS Signed-off-by: Wonkyu Kim Change-Id: I215c13a4fcb9dc3b94f73c770e704d4e353e9cff Reviewed-on: https://review.coreboot.org/c/coreboot/+/58833 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/Kconfig | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/Kconfig') diff --git a/src/Kconfig b/src/Kconfig index 89849eca02fe..e30152d2e5df 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -395,16 +395,6 @@ config FW_CONFIG Enable support for probing devices with fw_config. This is a simple bitmask broken into fields and options for probing. -config FW_CONFIG_SOURCE_CBFS - bool "Obtain Firmware Configuration value from CBFS" - depends on FW_CONFIG - default n - help - With this option enabled coreboot will look for the 32bit firmware - configuration value in CBFS at the selected prefix with the file name - "fw_config". This option will override other sources and allow the - local image to preempt the mainboard selected source. - config FW_CONFIG_SOURCE_CHROMEEC_CBI bool "Obtain Firmware Configuration value from Google Chrome EC CBI" depends on FW_CONFIG && EC_GOOGLE_CHROMEEC @@ -415,6 +405,17 @@ config FW_CONFIG_SOURCE_CHROMEEC_CBI is not tried if FW_CONFIG_SOURCE_CBFS is enabled and the value was found in CBFS. +config FW_CONFIG_SOURCE_CBFS + bool "Obtain Firmware Configuration value from CBFS" + depends on FW_CONFIG + default n + help + With this option enabled coreboot will look for the 32bit firmware + configuration value in CBFS at the selected prefix with the file name + "fw_config". This option will override other sources and allow the + local image to preempt the mainboard selected source and can be used as + FW_CONFIG_SOURCE_CHROMEEC_CBI fallback option. + config HAVE_RAMPAYLOAD bool -- cgit v1.2.3