Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>
> -----Original Message----- > From: Yao, Jiewen <jiewen....@intel.com> > Sent: Tuesday, March 28, 2023 3:40 PM > To: Rebecca Cran <rebe...@bsdio.com>; devel@edk2.groups.io; Oliver > Smith-Denny <o...@smith-denny.com>; Jiang, Guomin > <guomin.ji...@intel.com>; Lu, Xiaoyu1 <xiaoyu1...@intel.com>; Wang, Jian J > <jian.j.w...@intel.com>; Ard Biesheuvel > <ardb+tianoc...@kernel.org>; Justen, Jordan L <jordan.l.jus...@intel.com>; > Gerd Hoffmann <kra...@redhat.com>; Feng, Bob C > <bob.c.f...@intel.com>; Gao, Liming <gaolim...@byosoft.com.cn>; Andrew Fish > <af...@apple.com>; Leif Lindholm > <quic_llind...@quicinc.com>; Kinney, Michael D <michael.d.kin...@intel.com> > Subject: RE: [PATCH v2 01/13] OvmfPkg: Replace static struct initialization > with ZeroMem call > > Reviewed-by: Jiewen Yao <jiewen....@intel.com> > > > -----Original Message----- > > From: Rebecca Cran <rebe...@bsdio.com> > > Sent: Wednesday, March 29, 2023 1:31 AM > > To: devel@edk2.groups.io; Oliver Smith-Denny <o...@smith-denny.com>; > > Jiang, Guomin <guomin.ji...@intel.com>; Lu, Xiaoyu1 > > <xiaoyu1...@intel.com>; Wang, Jian J <jian.j.w...@intel.com>; Yao, Jiewen > > <jiewen....@intel.com>; Ard Biesheuvel <ardb+tianoc...@kernel.org>; > > Justen, Jordan L <jordan.l.jus...@intel.com>; Gerd Hoffmann > > <kra...@redhat.com>; Feng, Bob C <bob.c.f...@intel.com>; Gao, Liming > > <gaolim...@byosoft.com.cn>; Andrew Fish <af...@apple.com>; Leif > > Lindholm <quic_llind...@quicinc.com>; Kinney, Michael D > > <michael.d.kin...@intel.com> > > Cc: Rebecca Cran <rebe...@bsdio.com> > > Subject: [PATCH v2 01/13] 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 <rebe...@bsdio.com> > > Reviewed-by: Gerd Hoffmann <kra...@redhat.com> > > Reviewed-by: Oliver Smith-Denny <o...@smith-denny.com> > > --- > > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c > > b/OvmfPkg/Library/PlatformInitLib/MemDetect.c > > index 38cece9173e8..0bcdfb83721f 100644 > > --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c > > +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c > > @@ -608,10 +608,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; > > -- > > 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102071): https://edk2.groups.io/g/devel/message/102071 Mute This Topic: https://groups.io/mt/97910992/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-