]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/PlatformBootManagerLib: introduce the progress bar
authorLaszlo Ersek <lersek@redhat.com>
Wed, 25 May 2016 12:00:06 +0000 (14:00 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Mon, 6 Jun 2016 15:07:02 +0000 (17:07 +0200)
ArmVirtPkg's Platform BDS has never had a progress bar. We can easily add
one, 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: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c

index b7e02f3d00f4070ac339c88e6480ee0448f5e2d3..198d0602b3c08a741e16319dccf44bcdfa8cf0a0 100644 (file)
@@ -573,4 +573,21 @@ 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