mb/samsung/stumpy: 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 stumpy w/edk2 payload

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

View file

@ -5,6 +5,7 @@ if BOARD_SAMSUNG_STUMPY
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_8192
select DRIVERS_OPTION_CFR_ENABLED if PAYLOAD_EDK2 && SMMSTORE
select MAINBOARD_HAS_CHROMEOS
select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1

View file

@ -8,3 +8,5 @@ romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
bootblock-y += early_init.c
romstage-y += early_init.c
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c

View file

@ -0,0 +1,37 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <boot/coreboot_tables.h>
#include <drivers/option/cfr_frontend.h>
#include <northbridge/intel/sandybridge/cfr.h>
#include <southbridge/intel/bd82x6x/cfr.h>
static struct sm_obj_form system = {
.ui_name = "System",
.obj_list = (const struct sm_object *[]) {
&gfx_uma_size,
&me_state,
&me_state_prev,
&nmi,
&sata_mode,
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);
}