OvmfPkg: PciHostBridgeLib: set bus, IO and 32-bit MMIO windows in RootBus

The bus aperture is copied verbatim from InitRootBridge()
[OvmfPkg/PciHostBridgeDxe/PciHostBridge.c].

The IO and 32-bit MMIO apertures are matched to PlatformPei's settings.
PciHostBridgeLibDxe expects PciHostBridgeLib instances to advertize the
exact apertures.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Laszlo Ersek 2016-01-26 00:36:46 +01:00
parent 0dcd1b1b2a
commit 390951c2b8
2 changed files with 14 additions and 0 deletions

View File

@ -93,6 +93,14 @@ InitRootBridge (
RootBus->MemAbove4G.Base = 0;
RootBus->MemAbove4G.Limit = 0;
RootBus->Bus.Base = RootBusNumber;
RootBus->Bus.Limit = MaxSubBusNumber;
RootBus->Io.Base = PcdGet64 (PcdPciIoBase);
RootBus->Io.Limit = PcdGet64 (PcdPciIoBase) + (PcdGet64 (PcdPciIoSize) - 1);
RootBus->Mem.Base = PcdGet64 (PcdPciMmio32Base);
RootBus->Mem.Limit = PcdGet64 (PcdPciMmio32Base) +
(PcdGet64 (PcdPciMmio32Size) - 1);
return EFI_OUT_OF_RESOURCES;
}

View File

@ -44,3 +44,9 @@
MemoryAllocationLib
PciLib
QemuFwCfgLib
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size