From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: michael.d.kinney@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Fri, 02 Aug 2019 08:01:41 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2019 08:01:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,338,1559545200"; d="scan'208";a="201683015" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga002.fm.intel.com with ESMTP; 02 Aug 2019 08:01:40 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.177]) by ORSMSX106.amr.corp.intel.com ([169.254.1.52]) with mapi id 14.03.0439.000; Fri, 2 Aug 2019 08:01:40 -0700 From: "Michael D Kinney" To: "Gao, Zhichao" , "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: AQHVSKuEnma62zQuEkumTeYrcJgm26bnyiQAgAAo+kA= Date: Fri, 2 Aug 2019 15:01:40 +0000 Message-ID: References: <20190801205541.24792-1-michael.d.kinney@intel.com> <20190801205541.24792-2-michael.d.kinney@intel.com> <3CE959C139B4C44DBEA1810E3AA6F9000B81E41F@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <3CE959C139B4C44DBEA1810E3AA6F9000B81E41F@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Zhichao, Yes. I think that idea could work as well. I will try it out. Mike > -----Original Message----- > From: Gao, Zhichao > Sent: Thursday, August 1, 2019 10:28 PM > 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 >=20 > Hi Mike, >=20 > 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 >=20 > > -----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 > > error > > > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1970 > > > > Update local variable in ParseAcpiSlot() to be UINT32 > instead of > > UINT64 to avoid 64-bit multiply operation in the > SLIT_ELEMENT() macro. > > > > If LocalityCount is >=3D MAX_UINT32 and then skip the > validation check > > and print an INFO message instead. > > > > 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(-) > > > > 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/SlitPa > > +++ rs > > +++ 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 ( > > } > > } > > > > + 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