]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
ArmVirtPkg/PlatformBootManagerLib: introduce the progress bar
[mirror_edk2.git] / ArmVirtPkg / Library / PlatformBootManagerLib / PlatformBm.c
index d4bfcd0c071572b0d20d2bcac688183dc1758140..198d0602b3c08a741e16319dccf44bcdfa8cf0a0 100644 (file)
@@ -16,6 +16,7 @@
 **/\r
 \r
 #include <IndustryStandard/Pci22.h>\r
+#include <Library/BootLogoLib.h>\r
 #include <Library/DevicePathLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/QemuBootOrderLib.h>\r
@@ -531,7 +532,13 @@ PlatformBootManagerAfterConsole (
   //\r
   // Show the splash screen.\r
   //\r
-  EnableQuietBoot (PcdGetPtr (PcdLogoFile));\r
+  BootLogoEnableLogo (\r
+    ImageFormatBmp,                          // ImageFormat\r
+    PcdGetPtr (PcdLogoFile),                 // Logo\r
+    EdkiiPlatformLogoDisplayAttributeCenter, // Attribute\r
+    0,                                       // OffsetX\r
+    0                                        // OffsetY\r
+    );\r
 \r
   //\r
   // Connect the rest of the devices.\r
@@ -551,7 +558,7 @@ PlatformBootManagerAfterConsole (
   // the QEMU configuration.\r
   //\r
   EfiBootManagerRefreshAllBootOption ();\r
-  SetBootOrderFromQemu (NULL);\r
+  SetBootOrderFromQemu ();\r
 }\r
 \r
 /**\r
@@ -566,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