[edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

Ni, Ray ray.ni at intel.com
Wed Apr 27 03:13:01 UTC 2022


I thought the patch is from Ard but it was from Gerd.
So, the question is for Gerd.:)

I am a bit nervous on this change because it's a behavior change and may cause
certain devices malfunction and it's a silent failure.

Thanks,
Ray

> -----Original Message-----
> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Ni, Ray
> Sent: Wednesday, April 27, 2022 11:09 AM
> To: devel at edk2.groups.io; ardb at kernel.org; Gerd Hoffmann <kraxel at redhat.com>
> Cc: Pawel Polawski <ppolawsk at redhat.com>; Ard Biesheuvel <ardb+tianocore at kernel.org>; Gao, Liming
> <gaoliming at byosoft.com.cn>; Wu, Hao A <hao.a.wu at intel.com>; Oliver Steffen <osteffen at redhat.com>; Leif Lindholm
> <quic_llindhol at quicinc.com>; Justen, Jordan L <jordan.l.justen at intel.com>; Yao, Jiewen <jiewen.yao at intel.com>; Chang,
> Abner <abner.chang at hpe.com>; Wang, Jian J <jian.j.wang at intel.com>
> Subject: Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory
> 
> Ard,
> can you explain more?
> 
> Your code changes the PciHostBridge driver to ignore the failure of IO allocation.
> If IO requirement of certain PCI(E) devices can be ignored, can you change the IncompatiblePciDevice protocol implementation
> to override the IO request from the devices?
> 
> Thanks,
> Ray
> 
> > -----Original Message-----
> > From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Ard Biesheuvel
> > Sent: Tuesday, April 26, 2022 4:49 AM
> > To: edk2-devel-groups-io <devel at edk2.groups.io>; Gerd Hoffmann <kraxel at redhat.com>
> > Cc: Pawel Polawski <ppolawsk at redhat.com>; Ard Biesheuvel <ardb+tianocore at kernel.org>; Gao, Liming
> > <gaoliming at byosoft.com.cn>; Wu, Hao A <hao.a.wu at intel.com>; Ni, Ray <ray.ni at intel.com>; Oliver Steffen
> > <osteffen at redhat.com>; Leif Lindholm <quic_llindhol at quicinc.com>; Justen, Jordan L <jordan.l.justen at intel.com>; Yao,
> > Jiewen <jiewen.yao at intel.com>; Chang, Abner <abner.chang at hpe.com>; Wang, Jian J <jian.j.wang at intel.com>
> > Subject: Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory
> >
> > On Fri, 22 Apr 2022 at 09:37, Gerd Hoffmann <kraxel at redhat.com> wrote:
> > >
> > > io range is not mandatory according to pcie spec,
> > > so allow bridge configurations without io address
> > > space assigned.
> > >
> > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
> > > Reviewed-by: Ard Biesheuvel <ardb at kernel.org>
> >
> > Could one of the MdeModulePkg maintainers please get this reviewed? Thanks.
> >
> > > ---
> > >  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
> > b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
> > > index b20bcd310ad5..712662707931 100644
> > > --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
> > > +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
> > > @@ -1085,6 +1085,9 @@ NotifyPhase (
> > >                RootBridge->ResAllocNode[Index].Base   = BaseAddress;
> > >                RootBridge->ResAllocNode[Index].Status = ResAllocated;
> > >                DEBUG ((DEBUG_INFO, "Success\n"));
> > > +            } else if ((Index == TypeIo) && (RootBridge->Io.Base == MAX_UINT64)) {
> > > +              /* optional on PCIe */
> > > +              DEBUG ((DEBUG_INFO, "PCI Root Bridge does not provide IO Resources.\n"));
> > >              } else {
> > >                ReturnStatus = EFI_OUT_OF_RESOURCES;
> > >                DEBUG ((DEBUG_ERROR, "Out Of Resource!\n"));
> > > --
> > > 2.35.1
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89341): https://edk2.groups.io/g/devel/message/89341
Mute This Topic: https://groups.io/mt/90623478/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