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 <ardb+tianoc...@kernel.org> Cc: Jordan Justen <jordan.l.jus...@intel.com> Cc: Philippe Mathieu-Daudé <phi...@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek <ler...@redhat.com> --- OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf | 2 -- OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf index f08b6f4bd4b4..c3e6bb944791 100644 --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf @@ -17,13 +17,12 @@ [Defines] ENTRY_POINT = DriverInitialize [Sources] IncompatiblePciDeviceSupport.c [Packages] - MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] DebugLib MemoryAllocationLib @@ -33,11 +32,10 @@ [LibraryClasses] [Protocols] gEfiIncompatiblePciDeviceSupportProtocolGuid ## SOMETIMES_PRODUCES gEfiLegacyBiosProtocolGuid ## NOTIFY [Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration ## CONSUMES gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size ## CONSUMES [Depex] TRUE diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c index 53c768167de9..db1532f10934 100644 --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c @@ -263,20 +263,16 @@ DriverInitialize ( { EFI_STATUS Status; EFI_EVENT Event; 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; } // // Otherwise, create a protocol notify to see if a CSM is present. (With the // CSM absent, the PCI Bus driver won't have to worry about allocating 64-bit -- 2.19.1.3.g30247aa5d201 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75698): https://edk2.groups.io/g/devel/message/75698 Mute This Topic: https://groups.io/mt/83110873/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-