]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: PciHostBridgeLib: install 64-bit PCI host aperture
authorLaszlo Ersek <lersek@redhat.com>
Fri, 4 Mar 2016 19:06:26 +0000 (20:06 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 23 Mar 2016 16:47:31 +0000 (17:47 +0100)
On the normal boot path (which is when PciHostBridgeDxe runs), the PCDs
have been calculated; report the 64-bit PCI host aperture to
PciHostBridgeDxe.

In the Ia32 build, the PCD values (zeros) come directly from the DEC file,
and this patch makes no difference.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Thomas Lamprecht <t.lamprecht@proxmox.com>
Ref: https://github.com/tianocore/edk2/issues/59
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf

index 3e02778492a8bd0e2ebb9bdb06ed0940f0b1e8ab..1d3d10ad7379d368dabc29cc49d1e18eaed57686 100644 (file)
@@ -132,6 +132,13 @@ InitRootBridge (
   RootBus->MemAbove4G.Base      = 0;\r
   RootBus->MemAbove4G.Limit     = 0;\r
 \r
+  if (PcdGet64 (PcdPciMmio64Size) > 0) {\r
+    RootBus->AllocationAttributes |= EFI_PCI_HOST_BRIDGE_MEM64_DECODE;\r
+    RootBus->MemAbove4G.Base       = PcdGet64 (PcdPciMmio64Base);\r
+    RootBus->MemAbove4G.Limit      = PcdGet64 (PcdPciMmio64Base) +\r
+                                     (PcdGet64 (PcdPciMmio64Size) - 1);\r
+  }\r
+\r
   RootBus->Bus.Base  = RootBusNumber;\r
   RootBus->Bus.Limit = MaxSubBusNumber;\r
   RootBus->Io.Base   = PcdGet64 (PcdPciIoBase);\r
index bbec74645c83a14a41921b9cff6e57334682e95e..7a964c74c6cce45f54d864a9ac68733a39803611 100644 (file)
@@ -51,4 +51,6 @@
   gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize\r
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base\r
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size\r
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId\r