From 4c81178cf0542d2a4b8ac6af9bf6d9e80fd5f1d5 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 May 2021 22:14:37 +0200 Subject: OvmfPkg/PciHostBridgeLibScan: remove PcdOvmfHostBridgePciDevId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Cc: Peter Grehan Cc: Philippe Mathieu-Daudé Cc: Rebecca Cran Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek Message-Id: <20210526201446.12554-35-lersek@redhat.com> Reviewed-by: Ard Biesheuvel Reviewed-by: Philippe Mathieu-Daudé --- OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf | 4 ---- OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf index 1ba880be67..199db4cbbd 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 a4a61e5836..edf993e82d 100644 --- a/OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c +++ b/OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c @@ -9,12 +9,10 @@ **/ #include // EFI_PCI_COMMAND_IO_SPACE -#include // INTEL_Q35_MCH_DEVICE_ID #include // DisableInterrupts() #include // ZeroMem() #include // ASSERT() #include // ReallocatePool() -#include // PcdGet16() #include // PCI_ROOT_BRIDGE_APERTURE #include // PciHostBridgeUtilityInitRoot... #include // 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] -- cgit v1.2.3