]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: BDS: drop custom boot timeout, revert to IntelFrameworkModulePkg's
authorLaszlo Ersek <lersek@redhat.com>
Thu, 6 Nov 2014 14:21:15 +0000 (14:21 +0000)
committerlersek <lersek@Edk2>
Thu, 6 Nov 2014 14:21:15 +0000 (14:21 +0000)
PlatformBdsEnterFrontPage() already implements a keypress wait (for
entering the setup utility at boot) with a nice progress bar, only OVMF
has not been using it.

Removing our custom code and utilizing PlatformBdsEnterFrontPage()'s
builtin wait has the following benefits:

- It simplifies OVMF's BDS code.

- Because now we call PlatformBdsEnterFrontPage() unconditionally, it
  actually has a chance to look at the EFI_OS_INDICATIONS_BOOT_TO_FW_UI
  bit of the "OsIndications" variable, improving compliance with the UEFI
  specification. References:
  - https://bugzilla.redhat.com/show_bug.cgi?id=1153927
  - http://thread.gmane.org/gmane.comp.bios.tianocore.devel/10487

- The progress bar looks nice. (And it keeps the earlier behavior intact,
  when the user presses a key on the TianoCore splash screen.)

  In any case, we set the timeout to 0 (which doesn't show the progress
  bar and proceeds to the boot options immediately) in order to keep the
  boot time down.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16310 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc

index e974d3fbc7d0b605b23cc70e5a0bedd930c80692..4b76c6e89030b05c1df36dbcba9ce122a2e2ab85 100644 (file)
@@ -1062,10 +1062,6 @@ Returns:
 {\r
   EFI_STATUS                         Status;\r
   UINT16                             Timeout;\r
-  EFI_EVENT                          UserInputDurationTime;\r
-  UINTN                              Index;\r
-  EFI_INPUT_KEY                      Key;\r
-  EFI_TPL                            OldTpl;\r
   EFI_BOOT_MODE                      BootMode;\r
 \r
   DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior\n"));\r
@@ -1114,19 +1110,7 @@ Returns:
     //\r
     PlatformBdsNoConsoleAction ();\r
   }\r
-  //\r
-  // Create a 300ms duration event to ensure user has enough input time to enter Setup\r
-  //\r
-  Status = gBS->CreateEvent (\r
-                  EVT_TIMER,\r
-                  0,\r
-                  NULL,\r
-                  NULL,\r
-                  &UserInputDurationTime\r
-                  );\r
-  ASSERT (Status == EFI_SUCCESS);\r
-  Status = gBS->SetTimer (UserInputDurationTime, TimerRelative, 3000000);\r
-  ASSERT (Status == EFI_SUCCESS);\r
+\r
   //\r
   // Memory test and Logo show\r
   //\r
@@ -1153,25 +1137,7 @@ Returns:
   //\r
   BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder");\r
 \r
-  //\r
-  // To give the User a chance to enter Setup here, if user set TimeOut is 0.\r
-  // BDS should still give user a chance to enter Setup\r
-  //\r
-  // Check whether the user input after the duration time has expired\r
-  //\r
-  OldTpl = EfiGetCurrentTpl();\r
-  gBS->RestoreTPL (TPL_APPLICATION);\r
-  gBS->WaitForEvent (1, &UserInputDurationTime, &Index);\r
-  gBS->CloseEvent (UserInputDurationTime);\r
-  Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
-  gBS->RaiseTPL (OldTpl);\r
-\r
-  if (!EFI_ERROR (Status)) {\r
-    //\r
-    // Enter Setup if user input\r
-    //\r
-    PlatformBdsEnterFrontPage (Timeout, TRUE);\r
-  }\r
+  PlatformBdsEnterFrontPage (Timeout, TRUE);\r
 }\r
 \r
 VOID\r
index baed12950461d6ba33e0133e6a4394d67756d532..96e2d0ccf5923dc07b129ae3cb57d7532b31d595 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600\r
 \r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0\r
 \r
 ################################################################################\r
 #\r
index 32993ccaaab7f003990de20393da127da15a3420..2247e04433c7bf2d51025ac38c1a395256db5297 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600\r
 \r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0\r
 \r
 ################################################################################\r
 #\r
index 736a549ef1b187484871626be2ae18160b004a48..225b0e67841f0ddea2eff58041321b4d50d16ca4 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600\r
 \r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0\r
 \r
 ################################################################################\r
 #\r