summaryrefslogtreecommitdiff
path: root/OvmfPkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/Library')
-rw-r--r--OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c8
-rw-r--r--OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf6
2 files changed, 14 insertions, 0 deletions
diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
index b238a8544d..b23939d166 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -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;
}
diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
index 096d728f3c..e95ebfdc93 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
+++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
@@ -44,3 +44,9 @@
MemoryAllocationLib
PciLib
QemuFwCfgLib
+
+[Pcd]
+ gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase
+ gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize
+ gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base
+ gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size