Gerd, The fix should work. But I am curious why the if in blow is not hit. https://github.com/TianoCore/edk2/blob/master/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c#L922
The RootBridge->ResAllocNode[TypeIo].Status is assigned as ResNone in: https://github.com/TianoCore/edk2/blob/master/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c#L263 Or maybe your OVMF platform doesn't execute the above code path? Then I guess maybe the Base/Limit of Aperture is not set properly so that below if is hit? https://github.com/tianocore/edk2/blob/64706ef761273ba403f9cb3b7a986bfb804c0a87/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c#L249 Thanks, Ray > -----Original Message----- > From: Gerd Hoffmann <kra...@redhat.com> > Sent: Thursday, June 2, 2022 4:42 PM > To: devel@edk2.groups.io > Cc: Wu, Hao A <hao.a...@intel.com>; Pawel Polawski <ppola...@redhat.com>; Ard > Biesheuvel <ardb+tianoc...@kernel.org>; > Albecki, Mateusz <mateusz.albe...@intel.com>; Chang, Abner > <abner.ch...@hpe.com>; Ni, Ray <ray...@intel.com>; Leif > Lindholm <quic_llind...@quicinc.com>; Yao, Jiewen <jiewen....@intel.com>; > Oliver Steffen <ostef...@redhat.com>; Gao, > Liming <gaolim...@byosoft.com.cn>; Gerd Hoffmann <kra...@redhat.com>; Wang, > Jian J <jian.j.w...@intel.com>; Justen, > Jordan L <jordan.l.jus...@intel.com>; Ard Biesheuvel <a...@kernel.org> > Subject: [PATCH v7 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory > > io range is not mandatory according to pcie spec, so allow > pcie host bridge configurations without io window in case > there are no io reservations. > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > Reviewed-by: Ard Biesheuvel <a...@kernel.org> > --- > MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c > b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c > index b20bcd310ad5..354be6dbb313 100644 > --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c > +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c > @@ -1085,6 +1085,12 @@ 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) && > + (RootBridge->ResAllocNode[Index].Length == 0)) > + { > + /* I/O is optional on PCIe */ > + DEBUG ((DEBUG_INFO, "Success (PCIe NoIO)\n")); > } else { > ReturnStatus = EFI_OUT_OF_RESOURCES; > DEBUG ((DEBUG_ERROR, "Out Of Resource!\n")); > -- > 2.36.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90156): https://edk2.groups.io/g/devel/message/90156 Mute This Topic: https://groups.io/mt/91495635/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-