]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformBootManagerLib: bring back the progress bar
authorLaszlo Ersek <lersek@redhat.com>
Wed, 25 May 2016 12:00:06 +0000 (14:00 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 27 May 2016 09:29:39 +0000 (11:29 +0200)
OVMF's Platform BDS used to have a nice progress bar (with
IntelFrameworkModulePkg BDS). We can restore it by copying the
PlatformBootManagerWaitCallback() function verbatim from

  Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c

It can be tested by passing the following option to QEMU (5 seconds):

  -boot menu=on,splash-time=5000

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c

index 9eb9e390373d89ab51510755c02ea88f63de9f22..b5af58367e32197821f6d75e9cc376a13ce6ddc9 100644 (file)
@@ -1425,5 +1425,22 @@ PlatformBootManagerWaitCallback (
   UINT16          TimeoutRemain\r
   )\r
 {\r
+  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;\r
+  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;\r
+  UINT16                              Timeout;\r
+\r
+  Timeout = PcdGet16 (PcdPlatformBootTimeOut);\r
+\r
+  Black.Raw = 0x00000000;\r
+  White.Raw = 0x00FFFFFF;\r
+\r
+  BootLogoUpdateProgress (\r
+    White.Pixel,\r
+    Black.Pixel,\r
+    L"Start boot option",\r
+    White.Pixel,\r
+    (Timeout - TimeoutRemain) * 100 / Timeout,\r
+    0\r
+    );\r
 }\r
 \r