From b0f8ea3c9c4238b083fb4b226c54669e805c0445 Mon Sep 17 00:00:00 2001 From: ReddestDream Date: Fri, 31 Mar 2017 00:35:43 -0400 Subject: [PATCH] BdsPlatform: cleanup and use coreboot logo - remove 'start boot option' text - use boot logo splash for 1s, align to BGRT - rework frontpage usage --- .../Library/CorebootBdsLib/BdsPlatform.c | 67 ++++++------------- .../Library/GenericBdsLib/BdsConsole.c | 4 +- 2 files changed, 24 insertions(+), 47 deletions(-) diff --git a/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c b/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c index cf3e5320cb..699f3335a1 100644 --- a/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c +++ b/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c @@ -1237,8 +1237,22 @@ Returns: // PlatformBdsNoConsoleAction (); } + // - // Create a 300ms duration event to ensure user has enough input time to enter Setup + // Perform some platform specific connect sequence + // + PlatformBdsConnectSequence (); + + // + // Memory test and Logo show + // + PlatformBdsDiagnostics (IGNORE, TRUE, BaseMemoryTest); + + // + BdsLibConnectAll (); + + // + // Create a 1s duration event to ensure user has enough input time to enter Setup // Status = gBS->CreateEvent ( EVT_TIMER, @@ -1248,50 +1262,8 @@ Returns: &UserInputDurationTime ); ASSERT (Status == EFI_SUCCESS); - Status = gBS->SetTimer (UserInputDurationTime, TimerRelative, 3000000); + Status = gBS->SetTimer (UserInputDurationTime, TimerRelative, 10000000); ASSERT (Status == EFI_SUCCESS); - // - // Memory test and Logo show - // - PlatformBdsDiagnostics (IGNORE, TRUE, BaseMemoryTest); - - // - // Perform some platform specific connect sequence - // - PlatformBdsConnectSequence (); - - // - // Give one chance to enter the setup if we - // have the time out - // - // BUGBUG: hard code timeout to 5 second to show logo in graphic mode. - Timeout = 5; - if (Timeout != 0) { - PlatformBdsEnterFrontPage (Timeout, FALSE); - } - - // - //BdsLibConnectAll (); - //BdsLibEnumerateAllBootOption (BootOptionList); - - // - // Please uncomment above ConnectAll and EnumerateAll code and remove following first boot - // checking code in real production tip. - // - // In BOOT_WITH_FULL_CONFIGURATION boot mode, should always connect every device - // and do enumerate all the default boot options. But in development system board, the boot mode - // cannot be BOOT_ASSUMING_NO_CONFIGURATION_CHANGES because the machine box - // is always open. So the following code only do the ConnectAll and EnumerateAll at first boot. - // - Status = BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); - if (EFI_ERROR(Status)) { - // - // If cannot find "BootOrder" variable, it may be first boot. - // Try to connect all devices and enumerate all boot options here. - // - BdsLibConnectAll (); - BdsLibEnumerateAllBootOption (BootOptionList); - } // // To give the User a chance to enter Setup here, if user set TimeOut is 0. @@ -1307,9 +1279,14 @@ Returns: // Enter Setup if user input // Timeout = 0xffff; - PlatformBdsEnterFrontPage (Timeout, FALSE); + } else { + Timeout = 0; } + BdsLibEnumerateAllBootOption (BootOptionList); + PlatformBdsEnterFrontPage (Timeout, FALSE); + //not run/reached if Timeout = 0xffff + return ; } diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c index 167ad69c64..ff4f2cd815 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c @@ -861,8 +861,8 @@ EnableQuietBoot ( break; case EfiBadgingDisplayAttributeCenter: - DestX = (SizeOfX - Width) / 2; - DestY = (SizeOfY - Height) / 2; + DestX = (GraphicsOutput->Mode->Info->HorizontalResolution - 200)/2; + DestY = (GraphicsOutput->Mode->Info->VerticalResolution * 2/3 - 161)/2; break; case EfiBadgingDisplayAttributeCustomized: