mirror of https://github.com/acidanthera/audk.git
ArmVirtualizationPkg/PciHostBridgeDxe: abort if there's no PCI host bridge
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
This commit is contained in:
parent
aca7e8b6d4
commit
120a25c287
|
@ -85,6 +85,7 @@ PCI_HOST_BRIDGE_INSTANCE mPciHostBridgeInstanceTemplate = {
|
||||||
@param ImageHandle Handle of driver image
|
@param ImageHandle Handle of driver image
|
||||||
@param SystemTable Point to EFI_SYSTEM_TABLE
|
@param SystemTable Point to EFI_SYSTEM_TABLE
|
||||||
|
|
||||||
|
@retval EFI_ABORTED PCI host bridge not present
|
||||||
@retval EFI_OUT_OF_RESOURCES Can not allocate memory resource
|
@retval EFI_OUT_OF_RESOURCES Can not allocate memory resource
|
||||||
@retval EFI_DEVICE_ERROR Can not install the protocol instance
|
@retval EFI_DEVICE_ERROR Can not install the protocol instance
|
||||||
@retval EFI_SUCCESS Success to initialize the Pci host bridge.
|
@retval EFI_SUCCESS Success to initialize the Pci host bridge.
|
||||||
|
@ -102,6 +103,11 @@ InitializePciHostBridge (
|
||||||
PCI_HOST_BRIDGE_INSTANCE *HostBridge;
|
PCI_HOST_BRIDGE_INSTANCE *HostBridge;
|
||||||
PCI_ROOT_BRIDGE_INSTANCE *PrivateData;
|
PCI_ROOT_BRIDGE_INSTANCE *PrivateData;
|
||||||
|
|
||||||
|
if (PcdGet64 (PcdPciExpressBaseAddress) == 0) {
|
||||||
|
DEBUG ((EFI_D_INFO, "%a: PCI host bridge not present\n", __FUNCTION__));
|
||||||
|
return EFI_ABORTED;
|
||||||
|
}
|
||||||
|
|
||||||
mDriverImageHandle = ImageHandle;
|
mDriverImageHandle = ImageHandle;
|
||||||
|
|
||||||
mResAperture[0][0].BusBase = PcdGet32 (PcdPciBusMin);
|
mResAperture[0][0].BusBase = PcdGet32 (PcdPciBusMin);
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdPciIoTranslation
|
gArmPlatformTokenSpaceGuid.PcdPciIoTranslation
|
||||||
gArmPlatformTokenSpaceGuid.PcdPciMmio32Base
|
gArmPlatformTokenSpaceGuid.PcdPciMmio32Base
|
||||||
gArmPlatformTokenSpaceGuid.PcdPciMmio32Size
|
gArmPlatformTokenSpaceGuid.PcdPciMmio32Size
|
||||||
|
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
|
||||||
|
|
||||||
[depex]
|
[depex]
|
||||||
gEfiMetronomeArchProtocolGuid
|
gEfiMetronomeArchProtocolGuid
|
||||||
|
|
Loading…
Reference in New Issue