From bb760bc9f33c0eaac1d0653fb7a4d4fc1937a31a Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 15 Sep 2025 20:45:04 +0000 Subject: [PATCH] Kconfig: Introduce HAVE_CBFS_FILE_OPTION_BACKEND Introduce a new Kconfig option, `HAVE_CBFS_FILE_OPTION_BACKEND`, to explicitly select the capability of using a CBFS file for option storage. This capability is currently only used by ChromeOS boards leveraging FSP 2.0. By decoupling the capability check from the choice default selection logic, we can simplify the configuration of the option backend choice: - The new capability config is set to 'y' only if `CHROMEOS && PLATFORM_USES_FSP2_0`. - The 'Option backend to use' choice now depends on this new capability config. This change allows other SoC platforms beyond Intel to leverage this feature. TEST=Build all ChromeOS FSP 2.0 boards and confirm the default option backend is still USE_CBFS_FILE_OPTION_BACKEND. Change-Id: Ia55e0feae8fd462411ed3e9306d19ed6d1cfcaf1 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/89184 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/Kconfig | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Kconfig b/src/Kconfig index 1a49a8ba55..a7a34b26a5 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -149,7 +149,7 @@ config UTIL_GENPARSER choice prompt "Option backend to use" - default USE_CBFS_FILE_OPTION_BACKEND if CHROMEOS && PLATFORM_USES_FSP2_0 + default USE_CBFS_FILE_OPTION_BACKEND if HAVE_CBFS_FILE_OPTION_BACKEND default USE_MAINBOARD_SPECIFIC_OPTION_BACKEND if HAVE_MAINBOARD_SPECIFIC_OPTION_BACKEND default USE_OPTION_TABLE if NVRAMCUI_SECONDARY_PAYLOAD default USE_UEFI_VARIABLE_STORE if DRIVERS_EFI_VARIABLE_STORE && \ @@ -864,6 +864,20 @@ config HAVE_MAINBOARD_SPECIFIC_OPTION_BACKEND to access the values for runtime-configurable options. For example, a custom BMC interface or an EEPROM with an externally-imposed layout. +config HAVE_CBFS_FILE_OPTION_BACKEND + bool + default y if CHROMEOS && PLATFORM_USES_FSP2_0 + default n + help + Select this option if the platform uses CBFS file-based option backend + for storing configuration values at run time. + + This feature allows for storing and retrieving configuration data + within a dedicated file inside the CBFS. + + At present this feature is typically used by ChromeOS devices that + use Intel's Firmware Support Package (FSP). + config HAVE_OPTION_TABLE bool default n