Thanks for catching this issue. Patch has been sent out. 

> -----Original Message-----
> From: Laszlo Ersek [mailto:[email protected]]
> Sent: Thursday, October 12, 2017 5:30 AM
> To: Wang, Jian J <[email protected]>; [email protected]
> Cc: Kinney, Michael D <[email protected]>; Wolman, Ayellet
> <[email protected]>; Yao, Jiewen <[email protected]>; Dong, Eric
> <[email protected]>; Zeng, Star <[email protected]>
> Subject: Re: [edk2] [PATCH v4 5/6] IntelFrameworkModulePkg/Csm: Add code
> to bypass NULL pointer detection
> 
> This patch breaks the GCC5 build:
> 
> On 10/09/17 16:17, Jian J Wang wrote:
> 
> > diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
> b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
> > index 3d9a8b9649..f42c13cd89 100644
> > --- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
> > +++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
> > @@ -57,7 +57,11 @@ LegacyBiosInt86 (
> >    IN  EFI_IA32_REGISTER_SET         *Regs
> >    )
> >  {
> > -  UINT32  *VectorBase;
> > +  UINT16                Segment;
> > +  UINT16                Offset;
> > +  LEGACY_BIOS_INSTANCE  *Private;
> > +
> > +  Private = LEGACY_BIOS_INSTANCE_FROM_THIS (This);
> >
> >    Regs->X.Flags.Reserved1 = 1;
> >    Regs->X.Flags.Reserved2 = 0;
> > @@ -72,12 +76,15 @@ LegacyBiosInt86 (
> >    // The base address of legacy interrupt vector table is 0.
> >    // We use this base address to get the legacy interrupt handler.
> >    //
> > -  VectorBase              = 0;
> > +  DisableNullDetection ();
> > +  Segment               = (UINT16)(((UINT32 *)0)[BiosInt] >> 16);
> > +  Offset                = (UINT16)((UINT32 *)0)[BiosInt];
> > +  EnableNullDetection ();
> >
> >    return InternalLegacyBiosFarCall (
> >             This,
> > -           (UINT16) ((VectorBase)[BiosInt] >> 16),
> > -           (UINT16) (VectorBase)[BiosInt],
> > +           Segment,
> > +           Offset,
> >             Regs,
> >             &Regs->X.Flags,
> >             sizeof (Regs->X.Flags)
> 
> IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c: In function
> 'LegacyBiosInt86':
> IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c:62:26: error: variable
> 'Private' set but not used [-Werror=unused-but-set-variable]
>    LEGACY_BIOS_INSTANCE  *Private;
>                           ^~~~~~~
> cc1: all warnings being treated as errors
> 
> Can you please send a patch?
> 
> Thanks!
> Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to