diff options
-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; } |