From 6f6a10df88710d2b5da41e9c8a74e6393bdb8aeb Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 31 Aug 2025 15:37:00 -0500 Subject: [PATCH] mb/google/slippy: Add CFR option menu support Add CFR option menu support when using edk2 payload and SMMSTORE. Include relevant items from Haswell/Lynxpoint/ChromeEC. TEST=build/boot google/wolf, verify CFR option functionality. Change-Id: Ife64d46a9866c67fbb941cc83428f7728c6f7f95 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/90162 Tested-by: build bot (Jenkins) Reviewed-by: Sean Rhodes --- src/mainboard/google/slippy/Kconfig | 1 + src/mainboard/google/slippy/Makefile.mk | 1 + src/mainboard/google/slippy/cfr.c | 33 +++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 src/mainboard/google/slippy/cfr.c diff --git a/src/mainboard/google/slippy/Kconfig b/src/mainboard/google/slippy/Kconfig index 08239eb72f..d9684d34b3 100644 --- a/src/mainboard/google/slippy/Kconfig +++ b/src/mainboard/google/slippy/Kconfig @@ -5,6 +5,7 @@ config BOARD_GOOGLE_BASEBOARD_SLIPPY select AZALIA_USE_LEGACY_VERB_TABLE select ACPI_GNVS_USB_CHARGECTL select BOARD_ROMSIZE_KB_8192 + select DRIVERS_OPTION_CFR_ENABLED if PAYLOAD_EDK2 && SMMSTORE select EC_GOOGLE_CHROMEEC select EC_GOOGLE_CHROMEEC_LPC select HAVE_ACPI_RESUME diff --git a/src/mainboard/google/slippy/Makefile.mk b/src/mainboard/google/slippy/Makefile.mk index 990819e16d..7954d5c8bd 100644 --- a/src/mainboard/google/slippy/Makefile.mk +++ b/src/mainboard/google/slippy/Makefile.mk @@ -4,6 +4,7 @@ romstage-$(CONFIG_CHROMEOS) += chromeos.c romstage-y += variants/$(VARIANT_DIR)/gpio.c romstage-y += variants/$(VARIANT_DIR)/romstage.c +ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c ramstage-$(CONFIG_CHROMEOS) += chromeos.c ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads diff --git a/src/mainboard/google/slippy/cfr.c b/src/mainboard/google/slippy/cfr.c new file mode 100644 index 0000000000..a9801ed578 --- /dev/null +++ b/src/mainboard/google/slippy/cfr.c @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include +#include + +static struct sm_obj_form system = { + .ui_name = "System", + .obj_list = (const struct sm_object *[]) { + &me_disable, + &nmi, + NULL + }, +}; + +static struct sm_obj_form ec = { + .ui_name = "ChromeEC Embedded Controller", + .obj_list = (const struct sm_object *[]) { + &auto_fan_control, + NULL + }, +}; +static struct sm_obj_form *sm_root[] = { + &system, + &ec, + NULL +}; + +void mb_cfr_setup_menu(struct lb_cfr *cfr_root) +{ + cfr_write_setup_menu(cfr_root, sm_root); +}