Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78388?usp=email )
Change subject: {commonlib, libpayload}: Add "has_fw_splash_screen" entry ......................................................................
{commonlib, libpayload}: Add "has_fw_splash_screen" entry
A new coreboot table entry, has_fw_splash_screen, has been added. This entry indicates whether the firmware has rendered the splash screen.
This information is useful for overriding the kernel command-line argument fw_splash. If fw_splash=1, the kernel will skip modeset because the splash screen has already been rendered by the firmware.
coreboot will gather this information and pass it to the payload using the fw_splash screen entry. The payload (e.g., deptcharge) does not have any other way to determine whether the firmware has initiated screen rendering.
BUG= b:284799726 TEST= Built and booted google/rex. Overrode the "fw_splash" kernel command-line based on the has_fw_splash_screen information.
Change-Id: I5ef378c4b4ee4845d698184e43d2514410baddc6 Signed-off-by: Subrata Banik subratabanik@google.com --- M payloads/libpayload/include/coreboot_tables.h M src/commonlib/include/commonlib/coreboot_tables.h M src/drivers/intel/fsp2_0/graphics.c 3 files changed, 11 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/78388/1
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index 5c3f0c4..80d122b 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -222,7 +222,8 @@
struct cb_framebuffer_flags { u8 has_external_display : 1; - u8 reserved : 7; + u8 has_fw_splash_screen : 1; + u8 reserved : 6; };
struct cb_framebuffer { diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h index 94985b1..d10f7da 100644 --- a/src/commonlib/include/commonlib/coreboot_tables.h +++ b/src/commonlib/include/commonlib/coreboot_tables.h @@ -277,7 +277,8 @@
struct lb_framebuffer_flags { uint8_t has_external_display : 1; - uint8_t reserved : 7; + uint8_t has_fw_splash_screen : 1; + uint8_t reserved : 6; };
struct lb_framebuffer { diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c index a98f3bb..661ecf8 100644 --- a/src/drivers/intel/fsp2_0/graphics.c +++ b/src/drivers/intel/fsp2_0/graphics.c @@ -83,6 +83,7 @@ enum lb_fb_orientation orientation) { size_t size; + enum fw_splash_screen_status status = FW_SPLASH_SCREEN_DISABLED; const struct hob_graphics_info *ginfo; const struct fsp_framebuffer *fbinfo;
@@ -92,7 +93,7 @@ */ if (!framebuffer_bar) { printk(BIOS_ALERT, "Framebuffer BAR invalid\n"); - update_fw_splash_screen_event(FW_SPLASH_SCREEN_DISABLED); + update_fw_splash_screen_event(status); return; }
@@ -100,18 +101,19 @@
if (!ginfo) { printk(BIOS_ALERT, "Graphics hand-off block not found\n"); - update_fw_splash_screen_event(FW_SPLASH_SCREEN_DISABLED); + update_fw_splash_screen_event(status); return; }
if (ginfo->pixel_format >= ARRAY_SIZE(fsp_framebuffer_format_map)) { printk(BIOS_ALERT, "FSP set unknown framebuffer format: %d\n", ginfo->pixel_format); - update_fw_splash_screen_event(FW_SPLASH_SCREEN_DISABLED); + update_fw_splash_screen_event(status); return; }
- update_fw_splash_screen_event(FW_SPLASH_SCREEN_ENABLED); + status = FW_SPLASH_SCREEN_ENABLED; + update_fw_splash_screen_event(status); fbinfo = fsp_framebuffer_format_map + ginfo->pixel_format;
const struct lb_framebuffer fb = { @@ -132,6 +134,7 @@ .orientation = orientation, .flags = { .has_external_display = fsp_soc_report_external_display(), + .has_fw_splash_screen = status, }, };