OvmfPkg: factor the IO aperture shared by all PCI root bridges into PCDs
authorLaszlo Ersek <lersek@redhat.com>
Fri, 26 Feb 2016 15:29:19 +0000 (16:29 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 3 Mar 2016 09:19:32 +0000 (10:19 +0100)
At the moment we don't intend to customize this aperture at runtime, but
going forward, two modules will need to know about it: PlatformPei (as
before), and OVMF's upcoming PciHostBridgeLib instance (because the core
PciHostBridgeDxe driver requires the library to state the exact apertures
for all root bridges).

On QEMU, all root bridges share the same IO port aperture, hence one pair
of PCDs suffices.

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>
OvmfPkg/OvmfPkg.dec
OvmfPkg/PlatformPei/Platform.c
OvmfPkg/PlatformPei/PlatformPei.inf

index df50537d701580bb30de34fa3304a536219582b6..77c1f568afb0a990ba285ccd4e7adcd0199a8249 100644 (file)
   gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize|0x0|UINT32|0x1a\r
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd|0x0|UINT32|0x1f\r
 \r
+  ## The IO port aperture shared by all PCI root bridges.\r
+  #\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase|0xC000|UINT64|0x22\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize|0x4000|UINT64|0x23\r
+\r
 [PcdsDynamic, PcdsDynamicEx]\r
   gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2\r
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10\r
index 6735b50d703520a7a9cbe3d71ca8d29b5c84f59f..1df0f383bca3272be9c0beaf85c3d1f05665cb06 100644 (file)
@@ -201,8 +201,8 @@ MemMapInitialization (
     EFI_RESOURCE_IO,\r
     EFI_RESOURCE_ATTRIBUTE_PRESENT     |\r
     EFI_RESOURCE_ATTRIBUTE_INITIALIZED,\r
-    0xC000,\r
-    0x4000\r
+    PcdGet64 (PcdPciIoBase),\r
+    PcdGet64 (PcdPciIoSize)\r
     );\r
 \r
   //\r
index 11b38652924264466079b9f7f428012bd4612b51..22250c061c4730a64d5496baabbf23b4a008c76c 100644 (file)
@@ -75,6 +75,8 @@
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize\r
   gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize\r
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize\r
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd\r
   gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize\r