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" }; /*