diff options
author | Matt DeVillier <matt.devillier@amd.corp-partner.google.com> | 2022-12-16 17:25:01 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-02-13 14:57:31 +0000 |
commit | bcb67ed3c51cf83716247bbe26d5477e2cbe1f84 (patch) | |
tree | ffb8dad1a6531326badefd4dfab65cdf366d1800 /src/soc/amd/mendocino | |
parent | 1fbc1123d798137324cc8876db6386584c475da1 (diff) |
soc/amd/mendocino: Add support for selective GOP driver init
Add support for the selective GOP init feature by only running the FSP
GOP driver when necessary: if the FMAP cache is invalid, or if the
board is booted in either recovery or developer mode.
BUG=b:255812886
TEST=tested with rest of patch train
Change-Id: I7ddadc254e05aca0fdd7a9567160a9329cb0e15c
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70899
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'src/soc/amd/mendocino')
-rw-r--r-- | src/soc/amd/mendocino/fsp_s_params.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/amd/mendocino/fsp_s_params.c b/src/soc/amd/mendocino/fsp_s_params.c index 3f7aa9f854..6551e202c7 100644 --- a/src/soc/amd/mendocino/fsp_s_params.c +++ b/src/soc/amd/mendocino/fsp_s_params.c @@ -4,12 +4,23 @@ #include <acpi/acpi.h> #include <amdblocks/apob_cache.h> +#include <amdblocks/vbios_cache.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; + } + } + 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; } |