summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library/PciHostBridgeLib
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-03-04 01:49:54 +0100
committerLaszlo Ersek <lersek@redhat.com>2016-03-10 21:28:37 +0100
commit7daf2401d420573f50e3d00ae3a89e54914ef056 (patch)
treecaf19e6e6da25c6d2be6378a3cbc1b52b554cb8a /OvmfPkg/Library/PciHostBridgeLib
parentc47ed6fcb5e606cf6d55ff5c954944e7376144de (diff)
downloadedk2-7daf2401d420573f50e3d00ae3a89e54914ef056.tar.gz
edk2-7daf2401d420573f50e3d00ae3a89e54914ef056.tar.bz2
edk2-7daf2401d420573f50e3d00ae3a89e54914ef056.zip
OvmfPkg: PciHostBridgeLib: permit access to the full extended config space
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>
Diffstat (limited to 'OvmfPkg/Library/PciHostBridgeLib')
-rw-r--r--OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c4
-rw-r--r--OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf1
2 files changed, 4 insertions, 1 deletions
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 <PiDxe.h>
#include <IndustryStandard/Pci.h>
+#include <IndustryStandard/Q35MchIch9.h>
#include <Protocol/PciHostBridgeResourceAllocation.h>
#include <Protocol/PciRootBridgeIo.h>
@@ -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