From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.10991.1680043207185091451 for ; Tue, 28 Mar 2023 15:40:07 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=NBHdj49W; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680043207; x=1711579207; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=tRV8N3sQKPWfsC+isJiHs1GmIMAiUWkFv91u4S2ZXPg=; b=NBHdj49WeNd9NPPkP+Y4QmoUI8BRtDFG/HroBg3H566VkGQZ5TKH1t2M 0KhwvkLSgEWpDh6JorU57wQSCtaw1DWgaohQfjex7SGgtI/kYwitBvNuO zyVBwuzCagy0P7tV7uJCROBNh7cEvEoVsX4cktU1xfDY3Kyms2+ovhC2p Oar47Z4hy2Tyx7oMsMiTk7QYTjepxzu0GPTpIPkO1x9GpXeSaHGslySaF VoesbRSWOgpg/mZUoSXoF4Dh9lEXQVIKXwgz0UtcBc+NiUmnd62Dj1sfj qUvSTCLBP1y8ZKtZ4PaRiIV6pj+XMQ/pf9xsRbFWc0YEOK0AH67cbTje4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="405654954" X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208";a="405654954" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2023 15:40:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="827649141" X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208";a="827649141" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga001.fm.intel.com with ESMTP; 28 Mar 2023 15:40:05 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 28 Mar 2023 15:40:05 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Tue, 28 Mar 2023 15:40:05 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.170) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Tue, 28 Mar 2023 15:40:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bT6LbAiJyGAbaHyrGZvatIztr/9VfEl/0edq5wR9Xi/+574ld26H+BbYfG8xu4MDad6qOkT4qBurt8cTE1fmLOdIuyAX9Pxwa8XozHilXkxKkRtFCF2O0dYY5cRZC2IfzQr+dgYsIgpgbXSpTGTV6MabWylMKeFll05dNdfkfHiY1mpFmfDwBhmjRZP0VmjhKmQCvfSlMcJxbG13CQuWJNa2cKm8q2NO3MDgbFFMf0tiX6CCSeLZ4C6sGpr1dt/d+RUFJ9GyplrWxULqyri5da72gTkumgazwVNNOF09yROFp9atz+Q3uu8lBLs3pGI3z4CaOPLVNdrHiFWhncst+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G3xWQP8TFsmbCfD1nPTlvbHUVsM0NRRG7+Zcc4UeXY8=; b=NXUhqKd9qpudtXoaaAd5ZBCtNKJ/2WHP10gNEbI4nSx8P6Uh+0qxBhD6a3CV42ov0CHUvx3otOBcgLDJiUoF7YhcvZuQx87tb6WKT8OknRQ38zTaktCpkcpH0ta8yI0q2S8V8GjhyzzYeU+dhpLeMY/rHBZ7nFseiMOYXCY3U/80DdAsn5toV6dKL+VaeessxOPq9E/x42u4QRMDs3xWkdB+9HaLQ8kwahPbnnF1WETLd2wV96WL+YIEJWko/QysAyuLujbschwju39njZFFvcPq3+EPt7nxIo3zM5h/ONwhdWMzpPxCbuy0peKMBb3pGuYTYULBF14HY2t//yCl9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by CO1PR11MB5107.namprd11.prod.outlook.com (2603:10b6:303:97::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.33; Tue, 28 Mar 2023 22:40:03 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::c0c0:4b46:1dd4:80d6]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::c0c0:4b46:1dd4:80d6%7]) with mapi id 15.20.6178.041; Tue, 28 Mar 2023 22:40:02 +0000 From: "Yao, Jiewen" To: Rebecca Cran , "devel@edk2.groups.io" , Oliver Smith-Denny , "Jiang, Guomin" , "Lu, Xiaoyu1" , "Wang, Jian J" , Ard Biesheuvel , "Justen, Jordan L" , Gerd Hoffmann , "Feng, Bob C" , "Gao, Liming" , Andrew Fish , Leif Lindholm , "Kinney, Michael D" Subject: Re: [PATCH v2 01/13] OvmfPkg: Replace static struct initialization with ZeroMem call Thread-Topic: [PATCH v2 01/13] OvmfPkg: Replace static struct initialization with ZeroMem call Thread-Index: AQHZYZsxsfbBSzQYREek70v53T6GdK8QyS8g Date: Tue, 28 Mar 2023 22:40:02 +0000 Message-ID: References: <20230328173111.759017-1-rebecca@bsdio.com> <20230328173111.759017-2-rebecca@bsdio.com> In-Reply-To: <20230328173111.759017-2-rebecca@bsdio.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|CO1PR11MB5107:EE_ x-ms-office365-filtering-correlation-id: d27da9ea-d831-472e-11e0-08db2fdd5ec7 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NMgsBOxvs4XTI6vDB4fmiL8/Y2lpK2+b1yTZqyIOjTef5mKgeA2nvDxEef42G8EoIhHYZQocuDHfrzPTSGQSwjUd6iELwGFCN6lWH8uQH//OWCPENuEnDEQi7pqE5D1j1qrnj0sfgb4w6pdsWP8A/3qit8rytpUp3OX8n6tCOeah1kzh71qA7tWXigdCxBQHCMd1wi4g7jIuLIIp6pWoJSYPS1WfKHoWnA1fVb7/ge307HE1L8VN1y+wsxJTiNJqMUaOFFfF78NiMOC46I7F3sdyV806SpHXMvxcUHW7s4h3GT804EI8fi98tVNu1rMsirr4s9jEl7qKfP+ou1peoDE/iVcSlHp+u2F/f7WQNowqkq19CPrhVPn1EY/S1JbmDXeio+6wtqfmY4sZGpAb3E4zwIL7IoGoZjhLsxmYVQ4cZNKjxPgKaVhknEm8I5zSqy4ttztp2wLWfhCIijGwiAAarHH6cLRHNxZHa21WFegUozg/pSY5o+uFJgS35z6u+U9JGCugP3b0Tv/VPje5E+idiP8Oh9SY9b9lz87P7Ft5uaWgtpS6MRrkkXYG2V04o3J4pLZ6QE0FtUZqZdomdFoKR9ZHQFp36IjG/kZ6GZ9fpQ63/H1rcqIekaL+qbeGD1cSEiQoRIbwGqG2DiAS7Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(396003)(346002)(136003)(376002)(39860400002)(451199021)(110136005)(316002)(6636002)(66556008)(66476007)(66446008)(64756008)(8676002)(41300700001)(186003)(66946007)(76116006)(53546011)(6506007)(9686003)(26005)(478600001)(5660300002)(83380400001)(8936002)(52536014)(2906002)(122000001)(921005)(55016003)(38070700005)(33656002)(86362001)(82960400001)(38100700002)(71200400001)(7696005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?OX3/xyto5LZZydRfuDWrdV9jKMyYtd4VLbNtewdozA8BcWMEH38oZl0QIEqi?= =?us-ascii?Q?KihHfvg9sr9coAZBrRFrD/xlhXFTyfH6Pqrnrw62mMT2/fVdZC5rK4JjMqZA?= =?us-ascii?Q?hU0Fp8+b610aLB6fwaRtT6jVKmf0IPGQQzp1TLw4RA0KpYX/tiPBL+zxuHNA?= =?us-ascii?Q?vEs70hp371E52N5/NkKbI84M10paNM2EwoyFbYLu/Ggy2Jl7Tvaz907s7pMW?= =?us-ascii?Q?g+xDYGu2l4Py2y4LqNDOz0QOlaWHwvWpudeeq5ZHbjJvXebJo0vD57M4er0P?= =?us-ascii?Q?hrroSUER3P6pTGZOibuPuJxCV7McZymJaORgmVp+7FU2QPbsamBu7ljWgBB4?= =?us-ascii?Q?6C9aqCowG1/oSPtA0njzBsrMk/lS50ilyz4W6eKRgeOM7YrdkwKO3gEUk/Ws?= =?us-ascii?Q?tUNivy5vWVu7mIzk+QI+X9uhlhOkz7vD61EELyoxKUmfor+cVmamDtiTYXR7?= =?us-ascii?Q?upPbGbDEENhwBpA/Ca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aH33TBMDdGK4kezUw2ejrN4YqTjV9vECkJv7He4vXGUvSqrqUO8Y+tja?= =?us-ascii?Q?rA2CBSQEREU0jwoEPlYWpa5oADryraGy9sb7hTX8RHotIja5phAmONd37r2b?= =?us-ascii?Q?sSqfPMn0Pc7/7ilgkRE9Zj8S619YPGFsT9W3GqRITTQ1Xd/IKp5MrjqSd16X?= =?us-ascii?Q?QbVGataiTdDJFetZSdajbYFhn0WWu2QpSaw3aiVw?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d27da9ea-d831-472e-11e0-08db2fdd5ec7 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2023 22:40:02.6970 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 23kdNLju5uwW+MIIjSd1nk9tvbOJ7MiieWFO9lfzYt/IWQ2vI5IzTnlaVrlelWHNrAWVRtb/ZiDPotYIMJFJvg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5107 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen Yao > -----Original Message----- > From: Rebecca Cran > Sent: Wednesday, March 29, 2023 1:31 AM > To: devel@edk2.groups.io; Oliver Smith-Denny ; > Jiang, Guomin ; Lu, Xiaoyu1 > ; Wang, Jian J ; Yao, Jiewen > ; Ard Biesheuvel ; > Justen, Jordan L ; Gerd Hoffmann > ; Feng, Bob C ; Gao, Liming > ; Andrew Fish ; Leif > Lindholm ; Kinney, Michael D > > Cc: Rebecca Cran > Subject: [PATCH v2 01/13] OvmfPkg: Replace static struct initialization w= ith > ZeroMem call >=20 > Replace the static struct initialization with a call to ZeroMem to avoid > generating a call to memset in certain build configurations. >=20 > Signed-off-by: Rebecca Cran > Reviewed-by: Gerd Hoffmann > Reviewed-by: Oliver Smith-Denny > --- > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > 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] =3D { 0 }; > + CHAR8 Signature[13]; > BOOLEAN Valid =3D FALSE; > BOOLEAN Page1GSupport =3D FALSE; >=20 > + ZeroMem (Signature, sizeof (Signature)); > + > AsmCpuid (0x80000000, &RegEax, &RegEbx, &RegEcx, &RegEdx); > *(UINT32 *)(Signature + 0) =3D RegEbx; > *(UINT32 *)(Signature + 4) =3D RegEdx; > -- > 2.34.1