[EXT] RE: [edk2-devel] [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT PCIIO Protocol Test.

Gaurav Jain gaurav.jain at nxp.com
Wed Feb 19 05:59:18 UTC 2020


Hi Gao

> Gaurav:
>   Does this patch catch to edk2 stable tag 202002?
Yes

> -----Original Message-----
> From: Gao, Liming <liming.gao at intel.com>
> Sent: Monday, February 17, 2020 2:15 PM
> To: devel at edk2.groups.io; Gaurav Jain <gaurav.jain at nxp.com>; Gao, Liming
> <liming.gao at intel.com>
> Cc: Wang, Jian J <jian.j.wang at intel.com>; Wu, Hao A <hao.a.wu at intel.com>;
> Ni, Ray <ray.ni at intel.com>; Pankaj Bansal <pankaj.bansal at nxp.com>
> Subject: [EXT] RE: [edk2-devel] [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in
> SCT PCIIO Protocol Test.
> 
> Caution: EXT Email
> 
> Gaurav:
>   Does this patch catch to edk2 stable tag 202002?
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Gaurav
> > Jain
> > Sent: Monday, February 17, 2020 3:18 PM
> > To: devel at edk2.groups.io
> > Cc: Wang, Jian J <jian.j.wang at intel.com>; Wu, Hao A
> > <hao.a.wu at intel.com>; Ni, Ray <ray.ni at intel.com>; Pankaj Bansal
> > <pankaj.bansal at nxp.com>
> > Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT
> PCIIO Protocol Test.
> >
> > Gentle Reminder!!
> > Please review..
> >
> > > -----Original Message-----
> > > From: Gaurav Jain <gaurav.jain at nxp.com>
> > > Sent: Thursday, January 30, 2020 1:48 PM
> > > To: devel at edk2.groups.io
> > > Cc: Jian J Wang <jian.j.wang at intel.com>; Hao A Wu
> > > <hao.a.wu at intel.com>; Ray Ni <ray.ni at intel.com>; Pankaj Bansal
> > > <pankaj.bansal at nxp.com>; Gaurav Jain <gaurav.jain at nxp.com>
> > > Subject: [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT PCIIO
> > > Protocol Test.
> > >
> > > ASSERT in CopyMem_Conf, PollMem_Conf, SetBarAttributes_Conf
> > > Conformance Test.
> > > SCT Test expect return as Invalid Parameter.
> > > So removed ASSERT().
> > >
> > > Signed-off-by: Gaurav Jain <gaurav.jain at nxp.com>
> > > ---
> > >  .../NonDiscoverablePciDeviceIo.c              | 20 ++++++++++++++++---
> > >  1 file changed, 17 insertions(+), 3 deletions(-)
> > >
> > > diff --git
> > >
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePc
> > > iD
> > > eviceIo.c
> > >
> b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePc
> > > iD
> > > eviceIo.c
> > > index 2d55c9699322..76cb000602fc 100644
> > > ---
> > >
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePc
> > > iD
> > > eviceIo.c
> > > +++
> > >
> b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePc
> > > +++ iDeviceIo.c
> > > @@ -93,7 +93,15 @@ PciIoPollMem (
> > >    OUT UINT64                      *Result
> > >    )
> > >  {
> > > -  ASSERT (FALSE);
> > > +  if ((UINT32)Width >= EfiPciIoWidthMaximum ||
> > > +      Width > EfiPciIoWidthUint64) {
> > > +    return EFI_INVALID_PARAMETER;
> > > +  }
> > > +
> > > +  if (Result == NULL) {
> > > +    return EFI_INVALID_PARAMETER;
> > > +  }
> > > +
> > >    return EFI_UNSUPPORTED;
> > >  }
> > >
> > > @@ -556,7 +564,10 @@ PciIoCopyMem (
> > >    IN     UINTN                        Count
> > >    )
> > >  {
> > > -  ASSERT (FALSE);
> > > +  if ((UINT32)Width >= EfiPciIoWidthMaximum ||
> > > +      Width > EfiPciIoWidthUint64) {
> > > +    return EFI_INVALID_PARAMETER;
> > > +  }
> > >    return EFI_UNSUPPORTED;
> > >  }
> > >
> > > @@ -1414,7 +1425,10 @@ PciIoSetBarAttributes (
> > >    IN OUT UINT64                       *Length
> > >    )
> > >  {
> > > -  ASSERT (FALSE);
> > > +  if (Offset == NULL || Length == NULL) {
> > > +    return EFI_INVALID_PARAMETER;
> > > +  }
> > > +
> > >    return EFI_UNSUPPORTED;
> > >  }
> > >
> > > --
> > > 2.17.1
> >
> >
> > 


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

View/Reply Online (#54604): https://edk2.groups.io/g/devel/message/54604
Mute This Topic: https://groups.io/mt/71389950/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list