mb/google/puff: 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 wyvern w/edk2 payload

Change-Id: I6ccf0c9c50babb3134669c977eb27b7b3f567546
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87566
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Matt DeVillier 2025-04-21 10:38:04 -05:00
commit c8ddae9ebe
3 changed files with 47 additions and 0 deletions

View file

@ -11,6 +11,7 @@ config BOARD_GOOGLE_BASEBOARD_PUFF
select DRIVERS_I2C_HID
select DRIVERS_I2C_SX9310
select DRIVERS_INTEL_DPTF
select DRIVERS_OPTION_CFR_ENABLED if PAYLOAD_EDK2 && SMMSTORE
select DRIVERS_SPI_ACPI
select DRIVERS_USB_ACPI
select EC_GOOGLE_CHROMEEC

View file

@ -6,6 +6,7 @@ bootblock-$(CONFIG_CHROMEOS) += chromeos.c
ramstage-y += ramstage.c
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c
romstage-y += romstage.c
romstage-$(CONFIG_CHROMEOS) += chromeos.c

View file

@ -0,0 +1,45 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <boot/coreboot_tables.h>
#include <drivers/option/cfr_frontend.h>
#include <intelblocks/cfr.h>
#include <soc/cfr.h>
static struct sm_obj_form system = {
.ui_name = "System",
.obj_list = (const struct sm_object *[]) {
&hyper_threading,
&igd_dvmt,
&igd_aperture,
&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 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);
}