OvmfPkg: PciHostBridgeLib: permit access to the full extended config space
authorLaszlo Ersek <lersek@redhat.com>
Fri, 4 Mar 2016 00:49:54 +0000 (01:49 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 10 Mar 2016 20:28:37 +0000 (21:28 +0100)
By now OVMF makes MdeModulePkg/Bus/Pci/PciHostBridgeDxe go through
MMCONFIG (when running on Q35). Enable the driver to address each B/D/F's
config space up to and including offset 0xFFF.

Cc: Gabriel Somlo <somlo@cmu.edu>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Michał Zegan <webczat_200@poczta.onet.pl>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Gabriel Somlo <somlo@cmu.edu>
Tested-by: Michał Zegan <webczat_200@poczta.onet.pl>
OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf

index 582e87d..3e02778 100644 (file)
@@ -16,6 +16,7 @@
 #include <PiDxe.h>\r
 \r
 #include <IndustryStandard/Pci.h>\r
 #include <PiDxe.h>\r
 \r
 #include <IndustryStandard/Pci.h>\r
+#include <IndustryStandard/Q35MchIch9.h>\r
 \r
 #include <Protocol/PciHostBridgeResourceAllocation.h>\r
 #include <Protocol/PciRootBridgeIo.h>\r
 \r
 #include <Protocol/PciHostBridgeResourceAllocation.h>\r
 #include <Protocol/PciRootBridgeIo.h>\r
@@ -139,7 +140,8 @@ InitRootBridge (
   RootBus->Mem.Limit = PcdGet64 (PcdPciMmio32Base) +\r
                        (PcdGet64 (PcdPciMmio32Size) - 1);\r
 \r
   RootBus->Mem.Limit = PcdGet64 (PcdPciMmio32Base) +\r
                        (PcdGet64 (PcdPciMmio32Size) - 1);\r
 \r
-  RootBus->NoExtendedConfigSpace = TRUE;\r
+  RootBus->NoExtendedConfigSpace = (PcdGet16 (PcdOvmfHostBridgePciDevId) !=\r
+                                    INTEL_Q35_MCH_DEVICE_ID);\r
 \r
   DevicePath = AllocateCopyPool (sizeof mRootBridgeDevicePathTemplate,\r
                  &mRootBridgeDevicePathTemplate);\r
 \r
   DevicePath = AllocateCopyPool (sizeof mRootBridgeDevicePathTemplate,\r
                  &mRootBridgeDevicePathTemplate);\r
index 5467fff..bbec746 100644 (file)
@@ -51,3 +51,4 @@
   gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize\r
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base\r
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size\r
   gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize\r
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base\r
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId\r