From nobody Mon Feb 9 10:58:25 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+75689+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+75689+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622061365; cv=none; d=zohomail.com; s=zohoarc; b=JbjYf2Thd0vZ260DeVyrvEfKx4/v4mAZ7UPgLh47LzIdsN0Q5fv4lY2sVoVDcL01kgNXiS7LiSwYnLWG4e9+iIrasyW5qJdBH3CB8FohJOU1/HQa9wUuaQXHPPS4LmIJqbPprOXv33nJoFdbjgCCqufF97+jMkbiiuHivYeJlRQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622061365; 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=1UK22CqzKJqkRLsaboN00QcVmeZG+Q8qO2wDWHNAK80=; b=n9qh/H7nU9sW6C/P0ZqTnbhu+IoreZmFdMWGWnr6VCwiWLU+774hpwUS8B+TaLfWyUMfyO2hg616tPgqVEd7GWe4BDq2+Zs+MG8iLScAD8JCN9Rk3WhfX/T78ueLZRslIwxfmw1WcGVLwl8VvHuw0ZwWwo9tRikF6zmKh1Fp+B0= 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+75689+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 1622061365110278.63655606003624; Wed, 26 May 2021 13:36:05 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id r5V0YY1788612xGVKBXLvvOL; Wed, 26 May 2021 13:36:04 -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.web08.3115.1622061358743520282 for ; Wed, 26 May 2021 13:35:59 -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-213-oSGc1Vf9OhmiUwQzVPeQdg-1; Wed, 26 May 2021 16:35:52 -0400 X-MC-Unique: oSGc1Vf9OhmiUwQzVPeQdg-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 72DFB106BB24; Wed, 26 May 2021 20:35:51 +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 016115D6D3; Wed, 26 May 2021 20:35:49 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Anthony Perard , Ard Biesheuvel , Jordan Justen , Julien Grall , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [edk2-devel] [PATCH 20/43] OvmfPkg/XenAcpiPlatformDxe: remove delayed ACPI table installation Date: Wed, 26 May 2021 22:14:23 +0200 Message-Id: <20210526201446.12554-21-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.15 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: XkXt9CYDUAcnVRfpXzDNu9fzx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622061364; bh=1UK22CqzKJqkRLsaboN00QcVmeZG+Q8qO2wDWHNAK80=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=AiL7zzCvPg8LnG/9l4/1HN8njEcFyLUoRdfp4JcXD8nSbKWtj2YJYCpim3Y/LDdw/cA G2zqbUkgNtbPHpbLKqUzy+E+XQH9WF0vWxg3olwGBvn8JHQ52/xNKMqUQ1c8GP+Lqi1sE xsvyPChrzfJ/JwKYDNJYBEpnmDQN32ujBTc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Because "PcdPciDisableBusEnumeration" is always TRUE in the OvmfXen platform, we can remove the delayed ACPI table installation from XenAcpiPlatformDxe. A number of dependencies become useless this way; remove them too. (Note that, conversely, in the QemuFwCfgAcpiPlatformDxe driver, we *cannot* assume that "PcdPciDisableBusEnumeration" is always FALSE, regardless of Xen: in the ArmVirtQemu platform, the PCD may carry either FALSE or TRUE, dependent on whether or not the QEMU "virt" machine configuration includes a PCIe host controller, respectively.) Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall 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/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf | 8 --- OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c | 56 +------------------- 2 files changed, 2 insertions(+), 62 deletions(-) diff --git a/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf b/OvmfPkg/Xe= nAcpiPlatformDxe/XenAcpiPlatformDxe.inf index db9b6e093de4..d3a6353a50a6 100644 --- a/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf +++ b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf @@ -25,29 +25,21 @@ [Sources] AcpiPlatform.c AcpiPlatform.h EntryPoint.c Xen.c =20 [Packages] - MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec OvmfPkg/OvmfPkg.dec =20 [LibraryClasses] BaseLib DebugLib - PcdLib UefiBootServicesTableLib UefiDriverEntryPoint XenPlatformLib =20 [Protocols] gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED =20 -[Guids] - gRootBridgesConnectedEventGroupGuid - -[Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration - [Depex] gEfiAcpiTableProtocolGuid diff --git a/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c b/OvmfPkg/XenAcpiPlatf= ormDxe/EntryPoint.c index b6d0835fe3d4..1a23790a3b2c 100644 --- a/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c +++ b/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c @@ -4,15 +4,13 @@ Copyright (C) 2015-2021, Red Hat, Inc. Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 -#include // gRootBridgesConnectedE= ve... -#include // DEBUG() -#include // PcdGetBool() +#include // ASSERT_EFI_ERROR() #include // gBS #include // EFI_ACPI_TABLE_PROTOCOL =20 #include "AcpiPlatform.h" =20 STATIC @@ -31,65 +29,15 @@ FindAcpiTableProtocol ( ); ASSERT_EFI_ERROR (Status); return AcpiTable; } =20 =20 -STATIC -VOID -EFIAPI -OnRootBridgesConnected ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - EFI_STATUS Status; - - DEBUG ((DEBUG_INFO, - "%a: root bridges have been connected, installing ACPI tables\n", - __FUNCTION__)); - Status =3D InstallAcpiTables (FindAcpiTableProtocol ()); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __FUNCTION__, Stat= us)); - } - gBS->CloseEvent (Event); -} - - EFI_STATUS EFIAPI AcpiPlatformEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; - EFI_EVENT RootBridgesConnected; - - // - // If the platform doesn't support PCI, or PCI enumeration has been disa= bled, - // install the tables at once, and let the entry point's return code ref= lect - // the full functionality. - // - if (PcdGetBool (PcdPciDisableBusEnumeration)) { - DEBUG ((DEBUG_INFO, "%a: PCI or its enumeration disabled, installing " - "ACPI tables\n", __FUNCTION__)); - return InstallAcpiTables (FindAcpiTableProtocol ()); - } - - // - // Otherwise, delay installing the ACPI tables until root bridges are - // connected. The entry point's return status will only reflect the call= back - // setup. (Note that we're a DXE_DRIVER; our entry point function is inv= oked - // strictly before BDS is entered and can connect the root bridges.) - // - Status =3D gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_CALLBACK, - OnRootBridgesConnected, NULL /* Context */, - &gRootBridgesConnectedEventGroupGuid, &RootBridgesConnec= ted); - if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, - "%a: waiting for root bridges to be connected, registered callback\n= ", - __FUNCTION__)); - } - - return Status; + return InstallAcpiTables (FindAcpiTableProtocol ()); } --=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 (#75689): https://edk2.groups.io/g/devel/message/75689 Mute This Topic: https://groups.io/mt/83110694/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-