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: [email protected]; Kinney, Michael D
> <[email protected]>
> Cc: Carsey, Jaben <[email protected]>; Ni, Ray
> <[email protected]>; Sami Mujawar <[email protected]>
> Subject: RE: [edk2-devel] [Patch v2 1/2]
> ShellPkg/AcpiView: Fix IA32 link error
> 
> 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?
> 
> Thanks,
> Zhichao
> 
> > -----Original Message-----
> > From: [email protected]
> [mailto:[email protected]] On Behalf Of
> > Michael D Kinney
> > Sent: Friday, August 2, 2019 4:56 AM
> > To: [email protected]
> > Cc: Carsey, Jaben <[email protected]>; Ni, Ray
> > <[email protected]>; Gao, Zhichao
> <[email protected]>; Sami Mujawar
> > <[email protected]>
> > Subject: [edk2-devel] [Patch v2 1/2]
> ShellPkg/AcpiView: Fix IA32 link
> > error
> >
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1970
> >
> > 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 >= MAX_UINT32 and then skip the
> validation check
> > and print an INFO message instead.
> >
> > Cc: Jaben Carsey <[email protected]>
> > Cc: Ray Ni <[email protected]>
> > Cc: Zhichao Gao <[email protected]>
> > Cc: Sami Mujawar <[email protected]>
> > Signed-off-by: Michael D Kinney
> <[email protected]>
> > ---
> >  .../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 >= MAX_UINT32) {
> > +    Print (L"INFO: Skipping validation of System
> Localities as
> > + locality count
> > is >= MAX_UINT32\n");
> > +    return;
> > +  }
> > +
> >    // Validate
> >    for (Count = 0; Count < LocalityCount; Count++) {
> >      for (Index = 0; Index < LocalityCount; Index++)
> {
> > --
> > 2.21.0.windows.1
> >
> >
> > 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44859): https://edk2.groups.io/g/devel/message/44859
Mute This Topic: https://groups.io/mt/32683877/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to