Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82121?usp=email )
Change subject: soc/amd/mendocino: Allocate the buffer from heap to load logo.bmp ......................................................................
soc/amd/mendocino: Allocate the buffer from heap to load logo.bmp
bmp_load_logo() loads the custom logo.bmp file into CBMEM. This cbmem buffer is released after FSP-S init is complete. In certain platforms, the logo file is displayed during PCI enumeration. This means the logo buffer is used after it is released. Fix this issue by releasing the logo buffer when the coreboot has finished loading payload. During S3 scenario CBMEM is locked, bmp logo is not loaded and hence the release is a no-op.
BUG=b:337144954 TEST=Build Skyrim BIOS Image and boot to OS. Ensure that the chromeOS boot logo is seen without any corruption.
Change-Id: Id27cf02de04055075e7c1cb0ae531dee8524f828 Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/drivers/intel/fsp2_0/notify.c M src/drivers/intel/fsp2_0/silicon_init.c 2 files changed, 5 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/82121/1
diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c index 22bbf53..15a1e04 100644 --- a/src/drivers/intel/fsp2_0/notify.c +++ b/src/drivers/intel/fsp2_0/notify.c @@ -2,6 +2,7 @@
#include <arch/null_breakpoint.h> #include <bootstate.h> +#include <bootsplash.h> #include <console/console.h> #include <cpu/x86/mtrr.h> #include <fsp/util.h> @@ -105,8 +106,11 @@ display_mtrrs();
fsp_notify(phase); - if (phase == READY_TO_BOOT) + if (phase == READY_TO_BOOT) { + if (CONFIG(BMP_LOGO)) + bmp_release_logo(); fsp_notify(END_OF_FIRMWARE); + } }
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fsp_notify_dummy, (void *)AFTER_PCI_ENUM); diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c index 52d714d..2287a9e 100644 --- a/src/drivers/intel/fsp2_0/silicon_init.c +++ b/src/drivers/intel/fsp2_0/silicon_init.c @@ -142,9 +142,6 @@ timestamp_add_now(TS_FSP_SILICON_INIT_END); post_code(POSTCODE_FSP_SILICON_EXIT);
- if (CONFIG(BMP_LOGO)) - bmp_release_logo(); - fsp_debug_after_silicon_init(status); fsps_return_value_handler(FSP_SILICON_INIT_API, status);