From 7daf2401d420573f50e3d00ae3a89e54914ef056 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Fri, 4 Mar 2016 01:49:54 +0100 Subject: [PATCH] OvmfPkg: PciHostBridgeLib: permit access to the full extended config space MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Cc: Gerd Hoffmann Cc: Jordan Justen Cc: Marcel Apfelbaum Cc: Michał Zegan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen Tested-by: Gabriel Somlo Tested-by: Michał Zegan --- OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 4 +++- OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index 582e87dd9a..3e02778492 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -139,7 +140,8 @@ InitRootBridge ( RootBus->Mem.Limit = PcdGet64 (PcdPciMmio32Base) + (PcdGet64 (PcdPciMmio32Size) - 1); - RootBus->NoExtendedConfigSpace = TRUE; + RootBus->NoExtendedConfigSpace = (PcdGet16 (PcdOvmfHostBridgePciDevId) != + INTEL_Q35_MCH_DEVICE_ID); DevicePath = AllocateCopyPool (sizeof mRootBridgeDevicePathTemplate, &mRootBridgeDevicePathTemplate); diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf index 5467fff8aa..bbec74645c 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf +++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf @@ -51,3 +51,4 @@ gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId -- 2.39.2