From 65a444572e6fe5a972d78c6712607924d0b2ccd5 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Thu, 16 Feb 2023 09:57:40 -0600 Subject: [PATCH] soc/amd/mendocino: Generalize check for selective GOP init Rather than explicitly checking for Recovery or Developer mode via vboot, use display_init_required() so that vboot is not required, and other instances where the display is needed pre-OS (such as when applying a critical system update) are covered as well. Select VBOOT_MUST_REQUEST_DISPLAY in order for display_init_required() to function properly (and not assert on compilation). BUG=b:255812886 TEST=build/boot skyrim Change-Id: If2fee71bcc11468fd2db0abaafe4ea35e2953993 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/73047 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/amd/mendocino/Kconfig | 1 + src/soc/amd/mendocino/fsp_s_params.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/soc/amd/mendocino/Kconfig b/src/soc/amd/mendocino/Kconfig index 6fc73de102..6300c032be 100644 --- a/src/soc/amd/mendocino/Kconfig +++ b/src/soc/amd/mendocino/Kconfig @@ -83,6 +83,7 @@ config SOC_AMD_REMBRANDT_BASE select USE_FSP_NOTIFY_PHASE_READY_TO_BOOT select USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE select VBOOT_DEFINE_WIDEVINE_COUNTERS if VBOOT_STARTS_BEFORE_BOOTBLOCK + select VBOOT_MUST_REQUEST_DISPLAY if VBOOT select VBOOT_X86_SHA256_ACCELERATION if VBOOT select X86_AMD_FIXED_MTRRS select X86_INIT_NEED_1_SIPI diff --git a/src/soc/amd/mendocino/fsp_s_params.c b/src/soc/amd/mendocino/fsp_s_params.c index 6551e202c7..ce450e8d1f 100644 --- a/src/soc/amd/mendocino/fsp_s_params.c +++ b/src/soc/amd/mendocino/fsp_s_params.c @@ -5,20 +5,20 @@ #include #include #include +#include #include #include #include #include -#include static void fsp_assign_vbios_upds(FSP_S_CONFIG *scfg) { - if (CONFIG(USE_SELECTIVE_GOP_INIT) && vbios_cache_is_valid()) { - if (!vboot_recovery_mode_enabled() && !vboot_developer_mode_enabled()) { - scfg->vbios_buffer = 0; - printk(BIOS_SPEW, "%s: using VBIOS cache; skipping GOP driver.\n", __func__); - return; - } + if (CONFIG(USE_SELECTIVE_GOP_INIT) && vbios_cache_is_valid() && + !display_init_required()) { + scfg->vbios_buffer = 0; + printk(BIOS_SPEW, "%s: using VBIOS cache; skipping GOP driver.\n", __func__); + return; + } printk(BIOS_SPEW, "%s: not using VBIOS cache; running GOP driver.\n", __func__); scfg->vbios_buffer = CONFIG(RUN_FSP_GOP) ? PCI_VGA_RAM_IMAGE_START : 0;