diff options
author | Subrata Banik <subratabanik@google.com> | 2023-05-15 23:42:23 +0530 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-05-16 13:08:12 +0000 |
commit | b3485f383345b9eac1c0bab6f3679ef0cfc1c9e1 (patch) | |
tree | f04ee15a4b27b3c0afcebb39a1e94e2b236afd9c | |
parent | 063a1b83f88bdfc090c60ebdfc111bc942958a1d (diff) |
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 <subratabanik@google.com>
Change-Id: Ice1f02ad5c02a6a7e74a97ed23c5f11c7ecfb594
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75197
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
-rw-r--r-- | src/lib/bootmode.c | 6 |
1 files changed, 5 insertions, 1 deletions
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. */ |