]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PciHostBridgeLibScan: remove PcdOvmfHostBridgePciDevId
authorLaszlo Ersek <lersek@redhat.com>
Wed, 26 May 2021 20:14:37 +0000 (22:14 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 4 Jun 2021 16:01:50 +0000 (16:01 +0000)
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>
OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf
OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c

index 1ba880be67820e5650d03665c9c5dd640f127f81..199db4cbbd19fdbb67f2240cf818b4ae988384fa 100644 (file)
@@ -39,9 +39,5 @@
   BaseMemoryLib\r
   DebugLib\r
   MemoryAllocationLib\r
-  PcdLib\r
   PciHostBridgeUtilityLib\r
   PciLib\r
-\r
-[Pcd]\r
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId\r
index a4a61e5836e0237f116a53d30355cd22022097e6..edf993e82dcc3cdb84e903b7427abf3e0925630f 100644 (file)
@@ -9,12 +9,10 @@
 **/\r
 \r
 #include <IndustryStandard/Pci.h>            // EFI_PCI_COMMAND_IO_SPACE\r
-#include <IndustryStandard/Q35MchIch9.h>     // INTEL_Q35_MCH_DEVICE_ID\r
 #include <Library/BaseLib.h>                 // DisableInterrupts()\r
 #include <Library/BaseMemoryLib.h>           // ZeroMem()\r
 #include <Library/DebugLib.h>                // ASSERT()\r
 #include <Library/MemoryAllocationLib.h>     // ReallocatePool()\r
-#include <Library/PcdLib.h>                  // PcdGet16()\r
 #include <Library/PciHostBridgeLib.h>        // PCI_ROOT_BRIDGE_APERTURE\r
 #include <Library/PciHostBridgeUtilityLib.h> // PciHostBridgeUtilityInitRoot...\r
 #include <Library/PciLib.h>                  // PciRead32()\r
@@ -455,7 +453,7 @@ ScanForRootBridges (
       ASSERT (RootBridges != NULL);\r
       PciHostBridgeUtilityInitRootBridge (\r
         Attributes, Attributes, 0,\r
-        FALSE, PcdGet16 (PcdOvmfHostBridgePciDevId) != INTEL_Q35_MCH_DEVICE_ID,\r
+        FALSE, TRUE /* NoExtendedConfigSpace */,\r
         (UINT8) PrimaryBus, (UINT8) SubBus,\r
         &Io, &Mem, &MemAbove4G, &mNonExistAperture, &mNonExistAperture,\r
         &RootBridges[*NumberOfRootBridges]\r