diff options
author | Matt DeVillier <matt.devillier@amd.corp-partner.google.com> | 2023-02-16 09:57:40 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-02-23 21:47:50 +0000 |
commit | 65a444572e6fe5a972d78c6712607924d0b2ccd5 (patch) | |
tree | 8353d5d445bf3899b2036bd7bbcfbf0137beef91 | |
parent | 3271ea513d8ad99df105ee5d5a6368b7a13681da (diff) |
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 <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73047
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
-rw-r--r-- | src/soc/amd/mendocino/Kconfig | 1 | ||||
-rw-r--r-- | 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 <acpi/acpi.h> #include <amdblocks/apob_cache.h> #include <amdblocks/vbios_cache.h> +#include <bootmode.h> #include <console/console.h> #include <device/pci.h> #include <fsp/api.h> #include <program_loading.h> -#include <security/vboot/vboot_common.h> 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; |