OvmfPkg: Replace static struct initialization with ZeroMem call
Replace the static struct initialization with a call to ZeroMem to avoid generating a call to memset in certain build configurations. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
e3aba976f6
commit
8f8e4fa3f3
@@ -595,10 +595,12 @@ PlatformAddressWidthFromCpuid (
|
|||||||
{
|
{
|
||||||
UINT32 RegEax, RegEbx, RegEcx, RegEdx, Max;
|
UINT32 RegEax, RegEbx, RegEcx, RegEdx, Max;
|
||||||
UINT8 PhysBits;
|
UINT8 PhysBits;
|
||||||
CHAR8 Signature[13] = { 0 };
|
CHAR8 Signature[13];
|
||||||
BOOLEAN Valid = FALSE;
|
BOOLEAN Valid = FALSE;
|
||||||
BOOLEAN Page1GSupport = FALSE;
|
BOOLEAN Page1GSupport = FALSE;
|
||||||
|
|
||||||
|
ZeroMem (Signature, sizeof (Signature));
|
||||||
|
|
||||||
AsmCpuid (0x80000000, &RegEax, &RegEbx, &RegEcx, &RegEdx);
|
AsmCpuid (0x80000000, &RegEax, &RegEbx, &RegEcx, &RegEdx);
|
||||||
*(UINT32 *)(Signature + 0) = RegEbx;
|
*(UINT32 *)(Signature + 0) = RegEbx;
|
||||||
*(UINT32 *)(Signature + 4) = RegEdx;
|
*(UINT32 *)(Signature + 4) = RegEdx;
|
||||||
|
Reference in New Issue
Block a user