]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL
authorMin M Xu <min.m.xu@intel.com>
Wed, 11 Jan 2023 01:22:30 +0000 (09:22 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sun, 15 Jan 2023 10:26:15 +0000 (10:26 +0000)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4237

The QEMU_ACPI_TABLE_NOTIFY_PROTOCOL structure is superfluous because NULL
protocol interfaces have been used in edk2 repeatedly. A protocol instance
can exist in the protocol database with a NULL associated interface.
Therefore the QEMU_ACPI_TABLE_NOTIFY_PROTOCOL type, the
"QemuAcpiTableNotify.h" header, and the "mAcpiNotifyProtocol" global
variable can be removed.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Sebastien Boeuf <sebastien.boeuf@intel.com>
Reported-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Message-Id: <20230111012235.189-2-min.m.xu@intel.com>
Reviewed-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h [deleted file]

index cbe8bb9b0c7530a2a214f90a2570e5b3ca19c361..ad39e425347874943a0c6ade63effd75dbdac265 100644 (file)
 #include <Library/PcdLib.h>                               // PcdGet32()\r
 #include <Library/HobLib.h>                               // GetFirstGuidHob(), GetNextGuidHob()\r
 #include <Library/UefiBootServicesTableLib.h>             // gBS\r
-\r
 #include <Protocol/AcpiSystemDescriptionTable.h>\r
 #include <Protocol/AcpiTable.h>\r
-#include <Protocol/QemuAcpiTableNotify.h>                 // QEMU_ACPI_TABLE_NOTIFY_PROTOCOL\r
 \r
 #include "AcpiPlatform.h"\r
 \r
-EFI_HANDLE                       mChAcpiHandle = NULL;\r
-QEMU_ACPI_TABLE_NOTIFY_PROTOCOL  mChAcpiNotifyProtocol;\r
+EFI_HANDLE  mChAcpiHandle = NULL;\r
 \r
 EFI_STATUS\r
 EFIAPI\r
@@ -96,7 +93,7 @@ InstallCloudHvTablesTdx (
          &mChAcpiHandle,\r
          &gQemuAcpiTableNotifyProtocolGuid,\r
          EFI_NATIVE_INTERFACE,\r
-         &mChAcpiNotifyProtocol\r
+         NULL\r
          );\r
 \r
   return EFI_SUCCESS;\r
index c8dee17c13e63aa208ffe15b955c056b3b758805..1a3852904df9387d03a3fd6b7a4c5c16bd2005fd 100644 (file)
 #include <Library/QemuFwCfgS3Lib.h>           // QemuFwCfgS3Enabled()\r
 #include <Library/UefiBootServicesTableLib.h> // gBS\r
 \r
-#include <Protocol/QemuAcpiTableNotify.h>\r
 #include "AcpiPlatform.h"\r
-EFI_HANDLE                       mQemuAcpiHandle = NULL;\r
-QEMU_ACPI_TABLE_NOTIFY_PROTOCOL  mAcpiNotifyProtocol;\r
+EFI_HANDLE  mQemuAcpiHandle = NULL;\r
 \r
 //\r
 // The user structure for the ordered collection that will track the fw_cfg\r
@@ -1284,7 +1282,7 @@ UninstallAcpiTables:
            &mQemuAcpiHandle,\r
            &gQemuAcpiTableNotifyProtocolGuid,\r
            EFI_NATIVE_INTERFACE,\r
-           &mAcpiNotifyProtocol\r
+           NULL\r
            );\r
   }\r
 \r
diff --git a/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h b/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h
deleted file mode 100644 (file)
index a3dd2fc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/** @file\r
-\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef QEMU_ACPI_TABLE_NOTIFY_H_\r
-#define QEMU_ACPI_TABLE_NOTIFY_H_\r
-\r
-#define QEMU_ACPI_TABLE_NOTIFY_GUID \\r
-  { 0x928939b2, 0x4235, 0x462f, { 0x95, 0x80, 0xf6, 0xa2, 0xb2, 0xc2, 0x1a, 0x4f } };\r
-\r
-///\r
-/// Forward declaration\r
-///\r
-typedef struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL QEMU_ACPI_TABLE_NOTIFY_PROTOCOL;\r
-\r
-///\r
-/// Protocol structure\r
-///\r
-struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL {\r
-  UINT8    Notify;\r
-};\r
-\r
-extern EFI_GUID  gQemuAcpiTableNotifyProtocolGuid;\r
-\r
-#endif\r