diff options
author | Pete Batard <pete@akeo.ie> | 2019-10-14 16:03:11 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2019-10-16 18:27:42 +0200 |
commit | 23ab8df01a2c64fcb2eea5300c7b7a43baeba821 (patch) | |
tree | 320c2347ea0f56fb3a6fc8b5a1bfb84260d7fced | |
parent | c3c90d8aa7e6c43e8564cb44dc8f73d0565ad122 (diff) | |
download | edk2-23ab8df01a2c64fcb2eea5300c7b7a43baeba821.tar.gz edk2-23ab8df01a2c64fcb2eea5300c7b7a43baeba821.tar.bz2 edk2-23ab8df01a2c64fcb2eea5300c7b7a43baeba821.zip |
ArmVirtPkg/PlatformBootManagerLib: Don't update progress if Pcd is 0
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2266
Similar to what we now do for OVMF, we need to consider the possibility
that PlatformBootManagerWaitCallback () may be called with a
PcdPlatformBootTimeOut that was set to zero, in which case the call should
simply return.
We also change the initial timeout variable name to make the code explicit.
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Message-Id: <20191014150311.16740-3-pete@akeo.ie>
-rw-r--r-- | ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 30c015eec5..5f6cfe64da 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -842,9 +842,17 @@ PlatformBootManagerWaitCallback ( {
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;
- UINT16 Timeout;
+ UINT16 TimeoutInitial;
- Timeout = PcdGet16 (PcdPlatformBootTimeOut);
+ TimeoutInitial = PcdGet16 (PcdPlatformBootTimeOut);
+
+ //
+ // If PcdPlatformBootTimeOut is set to zero, then we consider
+ // that no progress update should be enacted.
+ //
+ if (TimeoutInitial == 0) {
+ return;
+ }
Black.Raw = 0x00000000;
White.Raw = 0x00FFFFFF;
@@ -854,7 +862,7 @@ PlatformBootManagerWaitCallback ( Black.Pixel,
L"Start boot option",
White.Pixel,
- (Timeout - TimeoutRemain) * 100 / Timeout,
+ (TimeoutInitial - TimeoutRemain) * 100 / TimeoutInitial,
0
);
}
|