summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--OvmfPkg/Library/PlatformInitLib/MemDetect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
index f85a63a..aced853 100644
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
@@ -595,10 +595,12 @@ PlatformAddressWidthFromCpuid (
{
UINT32 RegEax, RegEbx, RegEcx, RegEdx, Max;
UINT8 PhysBits;
- CHAR8 Signature[13] = { 0 };
+ CHAR8 Signature[13];
BOOLEAN Valid = FALSE;
BOOLEAN Page1GSupport = FALSE;
+ ZeroMem (Signature, sizeof (Signature));
+
AsmCpuid (0x80000000, &RegEax, &RegEbx, &RegEcx, &RegEdx);
*(UINT32 *)(Signature + 0) = RegEbx;
*(UINT32 *)(Signature + 4) = RegEdx;