mb/topton/adl: Use CFR setup menu to manage options

Much like ongoing CFR work, this patch adds support for configuring
certain options (such as iGPU memory allocation, ASPM, S3/s0ix, VT-d) at
runtime, using EDK2 payload.

TEST=Build/boot/toggle coreboot+edk2 on the firewall, test results by
booting Linux.

Change-Id: Id51e704750fd9aa4a8df72804d9205974747d708
Signed-off-by: Alicja Michalska <alicja.michalska@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87652
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Alicja Michalska 2025-05-13 00:44:08 +02:00 committed by Matt DeVillier
commit d93f7f01a6
3 changed files with 47 additions and 0 deletions

View file

@ -5,6 +5,7 @@ if BOARD_TOPTON_X2F_N100
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_OPTION_CFR_ENABLED if PAYLOAD_EDK2 && SMMSTORE
select FSP_TYPE_IOT
select HAVE_ACPI_TABLES
select HAVE_ACPI_RESUME

View file

@ -1,5 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
bootblock-y += bootblock.c
romstage-y += romstage_fsp_params.c
ramstage-y += mainboard.c
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c

View file

@ -0,0 +1,43 @@
/* 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 *[]) {
&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);
}