diff options
author | Laszlo Ersek <lersek@redhat.com> | 2021-05-26 22:14:23 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-06-04 16:01:50 +0000 |
commit | 3357ac73807d83eb212632ee7c2e032a20a49c56 (patch) | |
tree | b1c663f363acd095b9ab60686b0e78b973af5876 /OvmfPkg/XenAcpiPlatformDxe | |
parent | e7641171b6c1f858f3d979c0e8f04d6c12870baa (diff) | |
download | edk2-3357ac73807d83eb212632ee7c2e032a20a49c56.zip edk2-3357ac73807d83eb212632ee7c2e032a20a49c56.tar.gz edk2-3357ac73807d83eb212632ee7c2e032a20a49c56.tar.bz2 |
OvmfPkg/XenAcpiPlatformDxe: remove delayed ACPI table installation
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 <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: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210526201446.12554-21-lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'OvmfPkg/XenAcpiPlatformDxe')
-rw-r--r-- | OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c | 56 | ||||
-rw-r--r-- | OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf | 8 |
2 files changed, 2 insertions, 62 deletions
diff --git a/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c b/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c index b6d0835..1a23790 100644 --- a/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c +++ b/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c @@ -7,9 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
-#include <Guid/RootBridgesConnectedEventGroup.h> // gRootBridgesConnectedEve...
-#include <Library/DebugLib.h> // DEBUG()
-#include <Library/PcdLib.h> // PcdGetBool()
+#include <Library/DebugLib.h> // ASSERT_EFI_ERROR()
#include <Library/UefiBootServicesTableLib.h> // gBS
#include <Protocol/AcpiTable.h> // EFI_ACPI_TABLE_PROTOCOL
@@ -34,27 +32,6 @@ FindAcpiTableProtocol ( }
-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 = InstallAcpiTables (FindAcpiTableProtocol ());
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __FUNCTION__, Status));
- }
- gBS->CloseEvent (Event);
-}
-
-
EFI_STATUS
EFIAPI
AcpiPlatformEntryPoint (
@@ -62,34 +39,5 @@ AcpiPlatformEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
- EFI_EVENT RootBridgesConnected;
-
- //
- // If the platform doesn't support PCI, or PCI enumeration has been disabled,
- // install the tables at once, and let the entry point's return code reflect
- // 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 callback
- // setup. (Note that we're a DXE_DRIVER; our entry point function is invoked
- // strictly before BDS is entered and can connect the root bridges.)
- //
- Status = gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
- OnRootBridgesConnected, NULL /* Context */,
- &gRootBridgesConnectedEventGroupGuid, &RootBridgesConnected);
- if (!EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO,
- "%a: waiting for root bridges to be connected, registered callback\n",
- __FUNCTION__));
- }
-
- return Status;
+ return InstallAcpiTables (FindAcpiTableProtocol ());
}
diff --git a/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf index db9b6e0..d3a6353 100644 --- a/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf +++ b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf @@ -28,14 +28,12 @@ Xen.c
[Packages]
- MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
BaseLib
DebugLib
- PcdLib
UefiBootServicesTableLib
UefiDriverEntryPoint
XenPlatformLib
@@ -43,11 +41,5 @@ [Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
-[Guids]
- gRootBridgesConnectedEventGroupGuid
-
-[Pcd]
- gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
-
[Depex]
gEfiAcpiTableProtocolGuid
|