From nobody Mon Feb 9 08:56:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75698+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75698+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622061805; cv=none; d=zohomail.com; s=zohoarc; b=CH2/7/TJNSdwAEHsOyK5bkYEG3UD+XFMDASgyLfeYnXiwcuYO0Jlc0D5PVBGNelr2ED1MwNrwoLXoluvF19s42ITSPX3gNDxAJFNGJPM9c2Yg5mHOeHUAx1TbEf3GANk4do38701AhJcFhoNCPYc1SE3T4JnetDNmI641EVQo7Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622061805; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=29rjQ0qpiG/guQioZFDJ+uq9M12McSjTUGJ2taRa2pQ=; b=HJ5o+vJ9/VU7qHeyGYNglOwxqF8zMNf7kFrqBN876RKyLXKZE8qzS4pBcpZtQ61/zduDIFtsyvv2K2fEmJYI9DwDukUfcEYqzV8TYNERlrr2tBx9z3L3FuWVzpOfleexEEJcLn5va1oi6Mp7jZejDU9DuSR9PJeEHyk6j/CBHuU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75698+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622061805218925.6760390751452; Wed, 26 May 2021 13:43:25 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id av0sYY1788612xfkyk5ekIk6; Wed, 26 May 2021 13:43:24 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web10.3132.1622061798232848678 for ; Wed, 26 May 2021 13:43:18 -0700 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491-O1GF4MvXOkKghI63QgE2yA-1; Wed, 26 May 2021 16:43:14 -0400 X-MC-Unique: O1GF4MvXOkKghI63QgE2yA-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 39BCA6D4E3; Wed, 26 May 2021 20:43:13 +0000 (UTC) X-Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-61.ams2.redhat.com [10.36.114.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27B0B60CCD; Wed, 26 May 2021 20:43:11 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jordan Justen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [edk2-devel] [PATCH 27/43] OvmfPkg/IncompatiblePciDeviceSupportDxe: remove PcdPciDisableBusEnumeration Date: Wed, 26 May 2021 22:14:30 +0200 Message-Id: <20210526201446.12554-28-lersek@redhat.com> In-Reply-To: <20210526201446.12554-1-lersek@redhat.com> References: <20210526201446.12554-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com X-Gm-Message-State: PwDQ5xipySQIX9bDFsj0DwWrx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622061804; bh=29rjQ0qpiG/guQioZFDJ+uq9M12McSjTUGJ2taRa2pQ=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=q0dw9J0kxuLKI1PM31tSy/Zv/whYuy03CFqVkFCJBCA3lwn6+S2zODnb0VgltCMrhK+ 4UayvfC7fi0JjJOPoKEZXkvk+Iqb4/SexGpIIBu2Lg1Bw+/IOXKr9TFN6V2rUEyw9ZGJG nJCUzMUoYfCCMQFcKV9zvp1bNqYo1sqsZ64= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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=C3=A9 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2122 Signed-off-by: Laszlo Ersek Reviewed-by: Philippe Mathieu-Daude --- OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf |= 2 -- OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c |= 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceS= upport.inf b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceS= upport.inf index f08b6f4bd4b4..c3e6bb944791 100644 --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.= inf +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.= inf @@ -17,13 +17,12 @@ [Defines] ENTRY_POINT =3D DriverInitialize =20 [Sources] IncompatiblePciDeviceSupport.c =20 [Packages] - MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec OvmfPkg/OvmfPkg.dec =20 [LibraryClasses] DebugLib MemoryAllocationLib @@ -33,11 +32,10 @@ [LibraryClasses] =20 [Protocols] gEfiIncompatiblePciDeviceSupportProtocolGuid ## SOMETIMES_PRODUCES gEfiLegacyBiosProtocolGuid ## NOTIFY =20 [Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration ## CONSUMES gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size ## CONSUMES =20 [Depex] TRUE diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceS= upport.c b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSup= port.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; =20 // - // If the PCI Bus driver is not supposed to allocate resources, then it = makes - // no sense to install a protocol that influences the resource allocatio= n. + // If there is no 64-bit PCI MMIO aperture, then 64-bit MMIO BARs have t= o 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) =3D=3D 0) { + if (PcdGet64 (PcdPciMmio64Size) =3D=3D 0) { return EFI_UNSUPPORTED; } =20 // // 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 6= 4-bit --=20 2.19.1.3.g30247aa5d201 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-