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>
This commit is contained in:
Subrata Banik 2023-05-15 23:42:23 +05:30 committed by Lean Sheng Tan
parent 063a1b83f8
commit b3485f3833
1 changed files with 5 additions and 1 deletions

View File

@ -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. */