soc/amd/common/gfx: add support for VBIOS caching, selective GOP init
commite5e82862627eaf6d7edeb29af8b5c71d628e8c3c
authorMatt DeVillier <matt.devillier@amd.corp-partner.google.com>
Fri, 16 Dec 2022 23:14:35 +0000 (16 17:14 -0600)
committerFelix Held <felix-coreboot@felixheld.de>
Fri, 10 Feb 2023 16:02:10 +0000 (10 16:02 +0000)
treefb23183cd6bafd8ad1bc579adad355dccdae922f
parent6e0c78b87fe4bad7f02b893bf1f1ce8d3bbf84d8
soc/amd/common/gfx: add support for VBIOS caching, selective GOP init

One of the main functions performed by the FSP GOP driver is to modify
the ATOMBIOS tables (part of the VBIOS) in memory based on the display
output configuration. This device-specific modified VBIOS can be cached
in a FMAP region specific for that purpose, then loaded into memory
instead of the "generic" VBIOS, saving the ~130ms execution time of the
GOP driver.

As this approach only works when no pre-OS display output is needed,
limit its use to ChromeOS builds, with the GOP driver enabled, and
not booting in either recovery or developer modes.

SoCs supporting this feature will need to selectively run the FSP GOP
driver as needed, using the same criteria used here to determine
whether to load the VBIOS from CBFS or from the FMAP cache.

Boards utilizing this feature will need to add a dedicated FMAP region
with the appropriate name/size, and select the required Kconfig options.

BUG=b:255812886
TEST=tested with rest of patch train

Change-Id: Ib9cfd192500d411655a3c8fa436098897428109e
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70858
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
src/soc/amd/common/block/graphics/Kconfig
src/soc/amd/common/block/graphics/graphics.c
src/soc/amd/common/block/include/amdblocks/vbios_cache.h [new file with mode: 0644]