diff --git a/src/mainboard/google/rex/Kconfig b/src/mainboard/google/rex/Kconfig index b5f5c10b98..f9afd38141 100644 --- a/src/mainboard/google/rex/Kconfig +++ b/src/mainboard/google/rex/Kconfig @@ -3,6 +3,7 @@ config BOARD_GOOGLE_REX_COMMON def_bool n select BOARD_ROMSIZE_KB_32768 + select DRIVERS_OPTION_CFR_ENABLED if PAYLOAD_EDK2 && SMMSTORE select DRIVERS_GFX_GENERIC select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID diff --git a/src/mainboard/google/rex/Makefile.mk b/src/mainboard/google/rex/Makefile.mk index 8c60c591aa..08ef12e4b1 100644 --- a/src/mainboard/google/rex/Makefile.mk +++ b/src/mainboard/google/rex/Makefile.mk @@ -9,6 +9,7 @@ romstage-$(CONFIG_CHROMEOS) += chromeos.c ramstage-y += mainboard.c ramstage-$(CONFIG_CHROMEOS) += chromeos.c +ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c ramstage-y += ec.c smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c diff --git a/src/mainboard/google/rex/cfr.c b/src/mainboard/google/rex/cfr.c new file mode 100644 index 0000000000..a84d9aae4d --- /dev/null +++ b/src/mainboard/google/rex/cfr.c @@ -0,0 +1,46 @@ + +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include +#include +#include + +static struct sm_obj_form system = { + .ui_name = "System", + .obj_list = (const struct sm_object *[]) { + &hyper_threading, + &igd_dvmt, + &legacy_8254_timer, + &me_state, + &me_state_counter, + &pciexp_aspm, + &pciexp_clk_pm, + &pciexp_l1ss, + &pciexp_speed, + &s0ix_enable, + &vtd, + NULL + }, +}; + +static struct sm_obj_form ec = { + .ui_name = "ChromeEC Embedded Controller", + .obj_list = (const struct sm_object *[]) { + &auto_fan_control, + &ec_kb_backlight, + 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); +}