From 4373eea5d82ef1ae9a57799e1d560d5d1b90c704 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 10 Jun 2025 19:29:56 +0530 Subject: [PATCH] {lib, drivers/intel}: Add splash screen footer This commit introduces the `SPLASH_SCREEN_FOOTER` Kconfig option, enabling a custom footer image or logo on the firmware splash screen. This provides an additional branding opportunity for device manufacturers. `soc_load_logo_by_coreboot()` now conditionally loads and renders `footer_logo.bmp` when this option is enabled. The footer logo is positioned at the bottom of the screen. A new `SPLASH_SCREEN_FOOTER_LOGO_PATH` Kconfig option is added to define the footer logo's file path. It defaults to a mainboard-specific location. `Makefile.mk` is updated to ensure this logo is included in the CBFS. This additional branding is made possible by rendering bitmaps using coreboot's native implementation (`USE_COREBOOT_FOR_BMP_RENDERING`). FSP currently lacks the necessary callbacks to support this feature. Currently, the OEM footer branding will appear even when the system is booting in low-battery mode. A planned update will fix this by exiting early from the boot process, preventing the footer from showing and conserving power. BUG=b:423591644 TEST=Able to display custom footer logo on boot. Change-Id: I57f8af910e8b8f56e8a4a88f8cca6d60fad380b6 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/88029 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/drivers/intel/fsp2_0/cb_logo.c | 21 +++++++++++++++++++++ src/include/bootsplash.h | 2 ++ src/lib/Kconfig | 15 +++++++++++++++ src/lib/Makefile.mk | 2 ++ src/lib/bmp_logo.c | 3 ++- 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/drivers/intel/fsp2_0/cb_logo.c b/src/drivers/intel/fsp2_0/cb_logo.c index 4eaf343323..e132432401 100644 --- a/src/drivers/intel/fsp2_0/cb_logo.c +++ b/src/drivers/intel/fsp2_0/cb_logo.c @@ -179,6 +179,27 @@ void soc_load_logo_by_coreboot(void) copy_logo_to_framebuffer(framebuffer_bar, bytes_per_scanline, blt_buffer_addr, logo_width, logo_height, logo_coords.x, logo_coords.y); + if (CONFIG(SPLASH_SCREEN_FOOTER)) { + bmp_release_logo(); + logo_ptr = (uintptr_t)bmp_load_logo_by_type(BOOTSPLASH_FOOTER, &logo_ptr_size); + if (!logo_ptr || logo_ptr_size < sizeof(efi_bmp_image_header)) { + printk(BIOS_ERR, "%s: BMP image (%zu) is less than expected minimum size (%zu).\n", + __func__, logo_ptr_size, sizeof(efi_bmp_image_header)); + return; + } + + /* Convert BMP logo to GOP BLT format */ + fsp_convert_bmp_to_gop_blt(logo_ptr, logo_ptr_size, &blt_buffer_addr, &blt_size, + &logo_height, &logo_width, config->panel_orientation); + + logo_coords = calculate_logo_coordinates(horizontal_resolution, + vertical_resolution, logo_width, logo_height, FW_SPLASH_VALIGNMENT_BOTTOM); + + /* Copy the logo to the framebuffer */ + copy_logo_to_framebuffer(framebuffer_bar, bytes_per_scanline, blt_buffer_addr, + logo_width, logo_height, logo_coords.x, logo_coords.y); + } + /* Clear temporary Write Combine (WC) MTRR */ clear_var_mtrr(temp_mtrr_index); } diff --git a/src/include/bootsplash.h b/src/include/bootsplash.h index 9dffc28eb8..a8e51cf1ba 100644 --- a/src/include/bootsplash.h +++ b/src/include/bootsplash.h @@ -10,6 +10,8 @@ enum bootsplash_type { BOOTSPLASH_LOW_BATTERY, /* Indicates a Main OEM defined bootsplash logo for center of the splash screen. */ BOOTSPLASH_CENTER, + /* Indicates an optional OEM defined bootsplash logo for footer of the splash screen. */ + BOOTSPLASH_FOOTER, /* It's used to determine the total number of bootsplash types. */ BOOTSPLASH_MAX_NUM, diff --git a/src/lib/Kconfig b/src/lib/Kconfig index be3a19866f..ea6852d601 100644 --- a/src/lib/Kconfig +++ b/src/lib/Kconfig @@ -254,6 +254,21 @@ config PLATFORM_LOW_BATTERY_INDICATOR_LOGO_PATH default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/low_battery.bmp" endif +config SPLASH_SCREEN_FOOTER + bool "Enable custom footer on firmware splash screen" + depends on BMP_LOGO + help + Enable this option to display a custom footer image or logo on the + firmware splash screen during the boot process. This provides an + additional branding opportunity for device manufacturers, allowing + them to display a logo or other graphic at the bottom of the + splash screen, complementing the main OEM splash image. + +config SPLASH_SCREEN_FOOTER_LOGO_PATH + string "Path to splash screen footer logo file" + depends on SPLASH_SCREEN_FOOTER + default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/logo.bmp" + endmenu config HAVE_EARLY_POWEROFF_SUPPORT diff --git a/src/lib/Makefile.mk b/src/lib/Makefile.mk index e0bec03427..f13bb66f79 100644 --- a/src/lib/Makefile.mk +++ b/src/lib/Makefile.mk @@ -447,3 +447,5 @@ endif $(eval $(call add_bmp_logo_file_to_cbfs,CONFIG_PLATFORM_HAS_LOW_BATTERY_INDICATOR, \ low_battery.bmp,CONFIG_PLATFORM_LOW_BATTERY_INDICATOR_LOGO_PATH)) +$(eval $(call add_bmp_logo_file_to_cbfs,CONFIG_SPLASH_SCREEN_FOOTER, \ + footer_logo.bmp,CONFIG_SPLASH_SCREEN_FOOTER_LOGO_PATH)) diff --git a/src/lib/bmp_logo.c b/src/lib/bmp_logo.c index b62cb867fa..9dfe15a085 100644 --- a/src/lib/bmp_logo.c +++ b/src/lib/bmp_logo.c @@ -12,7 +12,8 @@ static const struct cbmem_entry *logo_entry; /* Mapping of different bootsplash logo name based on bootsplash type */ static const char *bootsplash_list[BOOTSPLASH_MAX_NUM] = { [BOOTSPLASH_LOW_BATTERY] = "low_battery.bmp", - [BOOTSPLASH_CENTER] = "logo.bmp" + [BOOTSPLASH_CENTER] = "logo.bmp", + [BOOTSPLASH_FOOTER] = "footer_logo.bmp" }; /*