From 984c93ece3ea26cfa7f5b5a9274365beeb4aff6e Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 May 2021 22:14:30 +0200 Subject: OvmfPkg/IncompatiblePciDeviceSupportDxe: remove PcdPciDisableBusEnumeration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At this point, the IncompatiblePciDeviceSupportDxe driver is included in the following platforms in edk2: OvmfPkg/AmdSev/AmdSevX64.dsc OvmfPkg/OvmfPkgIa32.dsc OvmfPkg/OvmfPkgIa32X64.dsc OvmfPkg/OvmfPkgX64.dsc All those platforms inherit FALSE for "PcdPciDisableBusEnumeration" from "MdeModulePkg.dec". This makes the PcdGetBool() call in the entry point of the driver superfluous; remove it. Clean up now unused dependencies in the INF file as well. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Philippe Mathieu-Daudé Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek Message-Id: <20210526201446.12554-28-lersek@redhat.com> Reviewed-by: Ard Biesheuvel Reviewed-by: Philippe Mathieu-Daudé --- .../IncompatiblePciDeviceSupport.c | 10 +++------- .../IncompatiblePciDeviceSupport.inf | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c index 53c768167d..db1532f109 100644 --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c @@ -266,14 +266,10 @@ DriverInitialize ( VOID *Registration; // - // If the PCI Bus driver is not supposed to allocate resources, then it makes - // no sense to install a protocol that influences the resource allocation. + // If there is no 64-bit PCI MMIO aperture, then 64-bit MMIO BARs have to be + // allocated under 4 GB unconditionally. // - // Similarly, if there is no 64-bit PCI MMIO aperture, then 64-bit MMIO BARs - // have to be allocated under 4 GB unconditionally. - // - if (PcdGetBool (PcdPciDisableBusEnumeration) || - PcdGet64 (PcdPciMmio64Size) == 0) { + if (PcdGet64 (PcdPciMmio64Size) == 0) { return EFI_UNSUPPORTED; } diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf index f08b6f4bd4..c3e6bb9447 100644 --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf @@ -20,7 +20,6 @@ IncompatiblePciDeviceSupport.c [Packages] - MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec OvmfPkg/OvmfPkg.dec @@ -36,7 +35,6 @@ gEfiLegacyBiosProtocolGuid ## NOTIFY [Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration ## CONSUMES gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size ## CONSUMES [Depex] -- cgit v1.2.3