]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
ArmVirtPkg/PlatformBootManagerLib: Don't update progress if Pcd is 0
[mirror_edk2.git] / ArmVirtPkg / Library / PlatformBootManagerLib / PlatformBm.c
index 30c015eec5b0ad86af7bec93636f4d04c8551148..5f6cfe64daca131d31fabe5249c78cf768ee0509 100644 (file)
@@ -842,9 +842,17 @@ PlatformBootManagerWaitCallback (
 {\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;\r
-  UINT16                              Timeout;\r
+  UINT16                              TimeoutInitial;\r
 \r
-  Timeout = PcdGet16 (PcdPlatformBootTimeOut);\r
+  TimeoutInitial = PcdGet16 (PcdPlatformBootTimeOut);\r
+\r
+  //\r
+  // If PcdPlatformBootTimeOut is set to zero, then we consider\r
+  // that no progress update should be enacted.\r
+  //\r
+  if (TimeoutInitial == 0) {\r
+    return;\r
+  }\r
 \r
   Black.Raw = 0x00000000;\r
   White.Raw = 0x00FFFFFF;\r
@@ -854,7 +862,7 @@ PlatformBootManagerWaitCallback (
     Black.Pixel,\r
     L"Start boot option",\r
     White.Pixel,\r
-    (Timeout - TimeoutRemain) * 100 / Timeout,\r
+    (TimeoutInitial - TimeoutRemain) * 100 / TimeoutInitial,\r
     0\r
     );\r
 }\r