Attention is currently required from: Andrey Petrov, Felix Held, Fred Reitberger, Jason Glenesk, Matt DeVillier, Ronak Kanabar, Sean Rhodes.
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81618?usp=email )
Change subject: lib: Use platform-independent types in bmp_load_logo() ......................................................................
lib: Use platform-independent types in bmp_load_logo()
This patch replaces fixed-width integers with uintptr_t/size_t in bmp_load_logo() parameters. This is an initial step towards wider portability improvements.
BUG=b:242829490 TEST=google/rex0 builds successfully.
Change-Id: I14bc54670a67980ec93bc366b274832d1f959e50 Signed-off-by: Subrata Banik subratabanik@google.com --- M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/fsp_gop_blt.c M src/include/bootsplash.h M src/lib/bmp_logo.c M src/soc/amd/mendocino/fsp_s_params.c M src/soc/intel/apollolake/chip.c M src/soc/intel/cannonlake/fsp_params.c M src/soc/intel/skylake/chip.c 8 files changed, 13 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/81618/1
diff --git a/src/drivers/intel/fsp1_1/ramstage.c b/src/drivers/intel/fsp1_1/ramstage.c index 5c40966..5a3f073 100644 --- a/src/drivers/intel/fsp1_1/ramstage.c +++ b/src/drivers/intel/fsp1_1/ramstage.c @@ -77,8 +77,8 @@ mainboard_silicon_init_params(&silicon_init_params);
if (CONFIG(BMP_LOGO)) - bmp_load_logo(&silicon_init_params.PcdLogoPtr, - &silicon_init_params.PcdLogoSize); + bmp_load_logo((uintptr_t *)&silicon_init_params.PcdLogoPtr, + (size_t *)&silicon_init_params.PcdLogoSize);
/* Display the UPD data */ if (CONFIG(DISPLAY_UPD_DATA)) diff --git a/src/drivers/intel/fsp2_0/fsp_gop_blt.c b/src/drivers/intel/fsp2_0/fsp_gop_blt.c index a43364a..34cb1b1 100644 --- a/src/drivers/intel/fsp2_0/fsp_gop_blt.c +++ b/src/drivers/intel/fsp2_0/fsp_gop_blt.c @@ -243,7 +243,7 @@ if (!logo || !logo_size || !blt_ptr || !blt_size || !pixel_height || !pixel_width) return;
- bmp_load_logo(&logo_ptr, &logo_ptr_size); + bmp_load_logo((uintptr_t *)&logo_ptr, (size_t *)&logo_ptr_size); if (!logo_ptr || logo_ptr_size < sizeof(efi_bmp_image_header)) { printk(BIOS_ERR, "%s: BMP Image size is too small.\n", __func__); return; diff --git a/src/include/bootsplash.h b/src/include/bootsplash.h index 86048a4..0c9b032 100644 --- a/src/include/bootsplash.h +++ b/src/include/bootsplash.h @@ -20,7 +20,7 @@ * For example: Introduce configurable BMP logo for customization on platforms like ChromeOS */ const char *bmp_logo_filename(void); -void bmp_load_logo(uint32_t *logo_ptr, uint32_t *logo_size); +void bmp_load_logo(uintptr_t *logo_ptr, size_t *logo_size); void bmp_release_logo(void);
#endif diff --git a/src/lib/bmp_logo.c b/src/lib/bmp_logo.c index 2888777..ee0626a 100644 --- a/src/lib/bmp_logo.c +++ b/src/lib/bmp_logo.c @@ -16,7 +16,7 @@ } #endif
-void bmp_load_logo(uint32_t *logo_ptr, uint32_t *logo_size) +void bmp_load_logo(uintptr_t *logo_ptr, size_t *logo_size) { void *logo_buffer;
diff --git a/src/soc/amd/mendocino/fsp_s_params.c b/src/soc/amd/mendocino/fsp_s_params.c index 8374fb3..3cfbef9 100644 --- a/src/soc/amd/mendocino/fsp_s_params.c +++ b/src/soc/amd/mendocino/fsp_s_params.c @@ -55,6 +55,6 @@
void soc_load_logo(FSPS_UPD *supd) { - uint32_t logo_size; - bmp_load_logo(&supd->FspsConfig.logo_bmp_buffer, &logo_size); + size_t logo_size; + bmp_load_logo((uintptr_t *)&supd->FspsConfig.logo_bmp_buffer, &logo_size); } diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index 91e39c9..6cb0c5a 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -915,7 +915,8 @@ /* Handle FSP logo params */ void soc_load_logo(FSPS_UPD *supd) { - bmp_load_logo(&supd->FspsConfig.LogoPtr, &supd->FspsConfig.LogoSize); + bmp_load_logo((uintptr_t *)&supd->FspsConfig.LogoPtr, + (size_t *)&supd->FspsConfig.LogoSize); }
BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, spi_flash_init_cb, NULL); diff --git a/src/soc/intel/cannonlake/fsp_params.c b/src/soc/intel/cannonlake/fsp_params.c index c9ef548..44fa83f 100644 --- a/src/soc/intel/cannonlake/fsp_params.c +++ b/src/soc/intel/cannonlake/fsp_params.c @@ -754,5 +754,6 @@ /* Handle FSP logo params */ void soc_load_logo(FSPS_UPD *supd) { - bmp_load_logo(&supd->FspsConfig.LogoPtr, &supd->FspsConfig.LogoSize); + bmp_load_logo((uintptr_t *)&supd->FspsConfig.LogoPtr, + (size_t *)&supd->FspsConfig.LogoSize); } diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c index ea091ce..fd8b278 100644 --- a/src/soc/intel/skylake/chip.c +++ b/src/soc/intel/skylake/chip.c @@ -529,5 +529,6 @@ /* Handle FSP logo params */ void soc_load_logo(FSPS_UPD *supd) { - bmp_load_logo(&supd->FspsConfig.LogoPtr, &supd->FspsConfig.LogoSize); + bmp_load_logo((uintptr_t *)&supd->FspsConfig.LogoPtr, + (size_t *)&supd->FspsConfig.LogoSize); }