From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: zhichao.gao@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Thu, 01 Aug 2019 22:28:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 22:28:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,337,1559545200"; d="scan'208";a="372260723" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 01 Aug 2019 22:28:11 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 1 Aug 2019 22:28:11 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 1 Aug 2019 22:28:11 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.15]) with mapi id 14.03.0439.000; Fri, 2 Aug 2019 13:28:09 +0800 From: "Gao, Zhichao" To: "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Carsey, Jaben" , "Ni, Ray" , Sami Mujawar Subject: Re: [edk2-devel] [Patch v2 1/2] ShellPkg/AcpiView: Fix IA32 link error Thread-Topic: [edk2-devel] [Patch v2 1/2] ShellPkg/AcpiView: Fix IA32 link error Thread-Index: AQHVSKuCGJDZS+tZ30iZbeSNzQBU0abnU7qA Date: Fri, 2 Aug 2019 05:28:08 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B81E41F@SHSMSX101.ccr.corp.intel.com> References: <20190801205541.24792-1-michael.d.kinney@intel.com> <20190801205541.24792-2-michael.d.kinney@intel.com> In-Reply-To: <20190801205541.24792-2-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zhichao.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Mike, Sorry for late update. I missed the v1 version. I found there is a API named MultU64x64 may fix this issue. Can we use it = in SLIT_ELEMENT() macro?=20 Thanks, Zhichao > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Michael D Kinney > Sent: Friday, August 2, 2019 4:56 AM > To: devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray ; > Gao, Zhichao ; Sami Mujawar > > Subject: [edk2-devel] [Patch v2 1/2] ShellPkg/AcpiView: Fix IA32 link er= ror >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1970 >=20 > Update local variable in ParseAcpiSlot() to be UINT32 instead of UINT64 = to > avoid 64-bit multiply operation in the SLIT_ELEMENT() macro. >=20 > If LocalityCount is >=3D MAX_UINT32 and then skip the validation check a= nd > print an INFO message instead. >=20 > Cc: Jaben Carsey > Cc: Ray Ni > Cc: Zhichao Gao > Cc: Sami Mujawar > Signed-off-by: Michael D Kinney > --- > .../Parsers/Slit/SlitParser.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c > index 1f9dac66ee..6913ad8b31 100644 > --- > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitPars > +++ er.c > @@ -57,8 +57,8 @@ ParseAcpiSlit ( > ) > { > UINT32 Offset; > - UINT64 Count; > - UINT64 Index; > + UINT32 Count; > + UINT32 Index; > UINT64 LocalityCount; > UINT8* LocalityPtr; > CHAR16 Buffer[80]; // Used for AsciiName param of ParseAcpi @@ -105,= 6 > +105,11 @@ ParseAcpiSlit ( > } > } >=20 > + if (LocalityCount >=3D MAX_UINT32) { > + Print (L"INFO: Skipping validation of System Localities as locality= count > is >=3D MAX_UINT32\n"); > + return; > + } > + > // Validate > for (Count =3D 0; Count < LocalityCount; Count++) { > for (Index =3D 0; Index < LocalityCount; Index++) { > -- > 2.21.0.windows.1 >=20 >=20 >=20