If VirtFdtDxe found no PCI host in the DTB, then the config space base
address will be left at zero -- the default is set in the DSC --, and we
should exit PciHostBridgeDxe immediately.
This causes gEfiPciRootBridgeIoProtocolGuid not to be installed, which in
turn prevents MdeModulePkg/Bus/Pci/PciBusDxe from binding (see
PciBusDriverBindingSupported()).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16898
6f19259b-4bc3-4df7-8a09-
765794883524
@param ImageHandle Handle of driver image\r
@param SystemTable Point to EFI_SYSTEM_TABLE\r
\r
+ @retval EFI_ABORTED PCI host bridge not present\r
@retval EFI_OUT_OF_RESOURCES Can not allocate memory resource\r
@retval EFI_DEVICE_ERROR Can not install the protocol instance\r
@retval EFI_SUCCESS Success to initialize the Pci host bridge.\r
PCI_HOST_BRIDGE_INSTANCE *HostBridge;\r
PCI_ROOT_BRIDGE_INSTANCE *PrivateData;\r
\r
+ if (PcdGet64 (PcdPciExpressBaseAddress) == 0) {\r
+ DEBUG ((EFI_D_INFO, "%a: PCI host bridge not present\n", __FUNCTION__));\r
+ return EFI_ABORTED;\r
+ }\r
+\r
mDriverImageHandle = ImageHandle;\r
\r
mResAperture[0][0].BusBase = PcdGet32 (PcdPciBusMin);\r
gArmPlatformTokenSpaceGuid.PcdPciIoTranslation\r
gArmPlatformTokenSpaceGuid.PcdPciMmio32Base\r
gArmPlatformTokenSpaceGuid.PcdPciMmio32Size\r
+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress\r
\r
[depex]\r
gEfiMetronomeArchProtocolGuid\r