summaryrefslogtreecommitdiff
path: root/OvmfPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2021-05-26 22:14:37 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-04 16:01:50 +0000
commit4c81178cf0542d2a4b8ac6af9bf6d9e80fd5f1d5 (patch)
treef45956114ac0e3ea5af68119ddd49d69937d027b /OvmfPkg
parent33d4f3e39ee6ea0743bd6a3a8a3261c9a4d16a29 (diff)
downloadedk2-4c81178cf0542d2a4b8ac6af9bf6d9e80fd5f1d5.zip
edk2-4c81178cf0542d2a4b8ac6af9bf6d9e80fd5f1d5.tar.gz
edk2-4c81178cf0542d2a4b8ac6af9bf6d9e80fd5f1d5.tar.bz2
OvmfPkg/PciHostBridgeLibScan: remove PcdOvmfHostBridgePciDevId
The "OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf" instance is used in the following platforms in edk2: OvmfPkg/Bhyve/BhyveX64.dsc OvmfPkg/OvmfXen.dsc Neither Bhyve nor Xen provide a Q35 board, therefore the expression PcdGet16 (PcdOvmfHostBridgePciDevId) != INTEL_Q35_MCH_DEVICE_ID always evaluates to TRUE, in the PciHostBridgeLibScan instance. Replace the expression with constant TRUE, eliminating the PCD dependency. (In effect, this reports that the root bridge being registered does not support extended PCI config space.) Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Julien Grall <julien@xen.org> Cc: Peter Grehan <grehan@freebsd.org> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Rebecca Cran <rebecca@bsdio.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210526201446.12554-35-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf4
-rw-r--r--OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c4
2 files changed, 1 insertions, 7 deletions
diff --git a/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf
index 1ba880b..199db4c 100644
--- a/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf
+++ b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf
@@ -39,9 +39,5 @@
BaseMemoryLib
DebugLib
MemoryAllocationLib
- PcdLib
PciHostBridgeUtilityLib
PciLib
-
-[Pcd]
- gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
diff --git a/OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c b/OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c
index a4a61e5..edf993e 100644
--- a/OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c
+++ b/OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c
@@ -9,12 +9,10 @@
**/
#include <IndustryStandard/Pci.h> // EFI_PCI_COMMAND_IO_SPACE
-#include <IndustryStandard/Q35MchIch9.h> // INTEL_Q35_MCH_DEVICE_ID
#include <Library/BaseLib.h> // DisableInterrupts()
#include <Library/BaseMemoryLib.h> // ZeroMem()
#include <Library/DebugLib.h> // ASSERT()
#include <Library/MemoryAllocationLib.h> // ReallocatePool()
-#include <Library/PcdLib.h> // PcdGet16()
#include <Library/PciHostBridgeLib.h> // PCI_ROOT_BRIDGE_APERTURE
#include <Library/PciHostBridgeUtilityLib.h> // PciHostBridgeUtilityInitRoot...
#include <Library/PciLib.h> // PciRead32()
@@ -455,7 +453,7 @@ ScanForRootBridges (
ASSERT (RootBridges != NULL);
PciHostBridgeUtilityInitRootBridge (
Attributes, Attributes, 0,
- FALSE, PcdGet16 (PcdOvmfHostBridgePciDevId) != INTEL_Q35_MCH_DEVICE_ID,
+ FALSE, TRUE /* NoExtendedConfigSpace */,
(UINT8) PrimaryBus, (UINT8) SubBus,
&Io, &Mem, &MemAbove4G, &mNonExistAperture, &mNonExistAperture,
&RootBridges[*NumberOfRootBridges]