Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/87561?usp=email )
Change subject: mb/google/beltino: Use CFR setup menu to manage options ......................................................................
mb/google/beltino: Use CFR setup menu to manage options
Enable support for managing system options via CFR, and select it by default when using edk2 with SMMSTORE.
TEST=build/boot panther w/edk2 payload
Change-Id: Ic5dff1f046de2b477361822772dd1add64d608af Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/mainboard/google/beltino/Kconfig M src/mainboard/google/beltino/Makefile.mk A src/mainboard/google/beltino/cfr.c 3 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/87561/1
diff --git a/src/mainboard/google/beltino/Kconfig b/src/mainboard/google/beltino/Kconfig index 8bde8e6..2d5c3e9 100644 --- a/src/mainboard/google/beltino/Kconfig +++ b/src/mainboard/google/beltino/Kconfig @@ -3,6 +3,7 @@ config BOARD_GOOGLE_BASEBOARD_BELTINO def_bool n select BOARD_ROMSIZE_KB_8192 + select DRIVERS_OPTION_CFR_ENABLED if PAYLOAD_EDK2 && SMMSTORE select HAVE_ACPI_RESUME select HAVE_ACPI_TABLES select HAVE_OPTION_TABLE diff --git a/src/mainboard/google/beltino/Makefile.mk b/src/mainboard/google/beltino/Makefile.mk index 77edc30..21a5825 100644 --- a/src/mainboard/google/beltino/Makefile.mk +++ b/src/mainboard/google/beltino/Makefile.mk @@ -14,6 +14,7 @@ bootblock-y += variants/$(VARIANT_DIR)/led.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads +ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c
subdirs-y += variants/$(VARIANT_DIR) CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include diff --git a/src/mainboard/google/beltino/cfr.c b/src/mainboard/google/beltino/cfr.c new file mode 100644 index 0000000..0ff1433 --- /dev/null +++ b/src/mainboard/google/beltino/cfr.c @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <boot/coreboot_tables.h> +#include <drivers/option/cfr_frontend.h> +#include <southbridge/intel/lynxpoint/cfr.h> + +static struct sm_obj_form system = { + .ui_name = "System", + .obj_list = (const struct sm_object *[]) { + &me_disable, + &nmi, + NULL + }, +}; + +static struct sm_obj_form power = { + .ui_name = "Power", + .obj_list = (const struct sm_object *[]) { + &power_on_after_fail, + NULL + }, +}; + +static struct sm_obj_form *sm_root[] = { + &system, + &power, + NULL +}; + +void mb_cfr_setup_menu(struct lb_cfr *cfr_root) +{ + cfr_write_setup_menu(cfr_root, sm_root); +}