From 9bc780fc9fef78f5af8f2d93190ab4c5876cca60 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 20 May 2021 16:43:08 +0200 Subject: option: Allow mainboards to implement the API Some mainboards need a mainboard-specific mechanism to access option values. Allow mainboards to implement the option API. Also, add some documentation about the current option API, and describe when should one reimplement the option API in mainboard code: only when the code is mainboard-specific to comply with externally-imposed constraints. Change-Id: Idccdb9a008b1ebb89821961659f27b1c0b17d29c Signed-off-by: Patrick Rudolph Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/54729 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/Kconfig b/src/Kconfig index b019e9d8b2..6b6076741f 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -122,6 +122,7 @@ config UTIL_GENPARSER choice prompt "Option backend to use" + default USE_MAINBOARD_SPECIFIC_OPTION_BACKEND if HAVE_MAINBOARD_SPECIFIC_OPTION_BACKEND default USE_OPTION_TABLE if NVRAMCUI_SECONDARY_PAYLOAD config OPTION_BACKEND_NONE @@ -134,6 +135,13 @@ config USE_OPTION_TABLE Enable this option if coreboot shall read options from the "CMOS" NVRAM instead of using hard-coded values. +config USE_MAINBOARD_SPECIFIC_OPTION_BACKEND + bool "Use mainboard-specific option backend" + depends on HAVE_MAINBOARD_SPECIFIC_OPTION_BACKEND + help + Use a mainboard-specific mechanism to access runtime-configurable + options. + endchoice config STATIC_OPTION_TABLE @@ -683,6 +691,13 @@ config NUM_THREADS help How many execution threads to cooperatively multitask with. +config HAVE_MAINBOARD_SPECIFIC_OPTION_BACKEND + bool + help + Selected by mainboards which implement a mainboard-specific mechanism + to access the values for runtime-configurable options. For example, a + custom BMC interface or an EEPROM with an externally-imposed layout. + config HAVE_OPTION_TABLE bool default n -- cgit v1.2.3