From fa80ab014665884a1342f95bdfdef7e4c53db83f Mon Sep 17 00:00:00 2001 From: Sergii Dmytruk Date: Tue, 9 Dec 2025 16:22:10 +0200 Subject: [PATCH] src/Kconfig: add MAINBOARD_NEEDS_CMOS_OPTIONS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The addition provides a way to select USE_OPTION_TABLE for a mainboard which depends on the CMOS backend for options. This is needed to support update mechanism based on Top Swap that permits recovery via a CMOS reset (see [0]). The indirection is necessary because USE_OPTION_TABLE is part of a `choice`. [0]: https://mail.coreboot.org/archives/list/coreboot@coreboot.org/thread/C6JN2PB7K7D67EG7OIKB6BBERZU5YV35/ Change-Id: I9e8f044077a5158650627a305c352cc9de578293 Signed-off-by: Sergii Dmytruk Reviewed-on: https://review.coreboot.org/c/coreboot/+/90433 Reviewed-by: Michał Kopeć Tested-by: build bot (Jenkins) Reviewed-by: Filip Lewiński Reviewed-by: Filip Gołaś --- src/Kconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Kconfig b/src/Kconfig index 2b5a2241cc..6c59e4fa5b 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -151,7 +151,7 @@ choice prompt "Option backend to use" 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_OPTION_TABLE if NVRAMCUI_SECONDARY_PAYLOAD || MAINBOARD_NEEDS_CMOS_OPTIONS default USE_UEFI_VARIABLE_STORE if DRIVERS_EFI_VARIABLE_STORE && \ PAYLOAD_EDK2 && SMMSTORE_V2 @@ -904,6 +904,12 @@ config CMOS_LAYOUT_FILE default "src/mainboard/\$(MAINBOARDDIR)/cmos.layout" depends on HAVE_OPTION_TABLE +config MAINBOARD_NEEDS_CMOS_OPTIONS + bool + help + Select this option if a mainboard depends on storing options in CMOS + for the implementation of some feature. + config PCI_IO_CFG_EXT bool default n