drivers/intel/fsp2_0: Release bmp_logo during OS_PAYLOAD_LOAD stage
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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82121 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
This commit is contained in:
committed by
Karthik Ramasubramanian
parent
0c66e9ddf0
commit
3c7bbde4fd
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <arch/null_breakpoint.h>
|
||||
#include <bootsplash.h>
|
||||
#include <bootstate.h>
|
||||
#include <cbfs.h>
|
||||
#include <cbmem.h>
|
||||
#include <commonlib/fsp.h>
|
||||
@@ -142,9 +143,6 @@ static void do_silicon_init(struct fsp_header *hdr)
|
||||
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);
|
||||
|
||||
@@ -261,3 +259,11 @@ void fsp_silicon_init(void)
|
||||
}
|
||||
|
||||
__weak void soc_load_logo(FSPS_UPD *supd) { }
|
||||
|
||||
static void release_logo(void *arg_unused)
|
||||
{
|
||||
if (CONFIG(BMP_LOGO))
|
||||
bmp_release_logo();
|
||||
}
|
||||
|
||||
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT, release_logo, NULL);
|
||||
|
Reference in New Issue
Block a user