From b3485f383345b9eac1c0bab6f3679ef0cfc1c9e1 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 15 May 2023 23:42:23 +0530 Subject: lib: Perform display init in normal boot mode if BMP_LOGO is set Traditionally, display init during vboot "verified/secure/normal boot mode" relies on the VB2_CONTEXT_DISPLAY_INIT. This is the default behavior for vboot, meaning skip display init during verified boot mode. However, if the intention is to show the OEM splash screen (using BMP_LOGO config) during boot, then the policy enforced by vboot needs to be overridden. This can be done by setting the BMP_LOGO config flag. If BMP_LOGO is not enabled, then the vboot policy will be followed and display init will be skipped. This change was made to allow OEMs to show their splash screen during boot, even if the system is in verified/secure/normal mode. Signed-off-by: Subrata Banik Change-Id: Ice1f02ad5c02a6a7e74a97ed23c5f11c7ecfb594 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75197 Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Paul Menzel Reviewed-by: Lean Sheng Tan --- src/lib/bootmode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/bootmode.c b/src/lib/bootmode.c index 56b39271e8..2d5a7eb004 100644 --- a/src/lib/bootmode.c +++ b/src/lib/bootmode.c @@ -21,7 +21,11 @@ void gfx_set_init_done(int done) int display_init_required(void) { - /* For vboot, always honor VB2_CONTEXT_DISPLAY_INIT. */ + /* Need display for showing splash screen. */ + if (CONFIG(BMP_LOGO)) + return 1; + + /* For vboot, honor VB2_CONTEXT_DISPLAY_INIT. */ if (CONFIG(VBOOT)) { /* Must always select MUST_REQUEST_DISPLAY when using this function. */ -- cgit v1.2.3