diff options
author | Wim Vervoorn <wvervoorn@eltan.com> | 2019-12-16 14:21:09 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-12-20 17:50:28 +0000 |
commit | 67117c3971f16e4b47e927821a19f110b4885111 (patch) | |
tree | 321d4462a87aaeed64b8926df22a5cf0085c80c5 /src/drivers/intel/fsp1_1/logo.c | |
parent | 0e45b2875add588ddada7f40e294db99d62c3c3c (diff) | |
download | coreboot-67117c3971f16e4b47e927821a19f110b4885111.tar.xz |
{drivers,soc}/intel/fsp1_1: Move chipset specific logo handling to SoC
FSP logo handling used PcdLogoPtr and PcdLogoSize which are elements of
the chipset specific FSP structures.
Create soc_load_logo() which will pass the logo pointer and size.
This function will call fsp_load_logo which will load the logo.
BUG=NA
TEST= Build and verified logo is displayed on Facebook FBG1701
Change-Id: I86943e64ca1ddd05e7e88fc6b882cfd33b98272e
Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37791
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/intel/fsp1_1/logo.c')
-rw-r--r-- | src/drivers/intel/fsp1_1/logo.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/drivers/intel/fsp1_1/logo.c b/src/drivers/intel/fsp1_1/logo.c index 03b2715f43..23aad01c1b 100644 --- a/src/drivers/intel/fsp1_1/logo.c +++ b/src/drivers/intel/fsp1_1/logo.c @@ -11,15 +11,24 @@ * GNU General Public License for more details. */ +#include <cbfs.h> +#include <cbmem.h> #include <soc/ramstage.h> -#include <console/console.h> -#include <fsp/ramstage.h> -#include <include/cbfs.h> -void load_logo(SILICON_INIT_UPD *params) +const struct cbmem_entry *fsp_load_logo(UINT32 *logo_ptr, UINT32 *logo_size) { - params->PcdLogoSize = cbfs_boot_load_file("logo.bmp", (void *)params->PcdLogoPtr, - params->PcdLogoSize, CBFS_TYPE_RAW); - if (!params->PcdLogoSize) - params->PcdLogoPtr = 0; + const struct cbmem_entry *logo_entry = NULL; + void *logo_buffer; + + logo_entry = cbmem_entry_add(CBMEM_ID_FSP_LOGO, 1 * MiB); + if (logo_entry) { + logo_buffer = cbmem_entry_start(logo_entry); + if (logo_buffer) { + *logo_size = cbfs_boot_load_file("logo.bmp", (void *)logo_buffer, + 1 * MiB, CBFS_TYPE_RAW); + if (logo_size) + *logo_ptr = (UINT32)logo_buffer; + } + } + return (logo_entry); } |