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>
#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
&mChAcpiHandle,\r
&gQemuAcpiTableNotifyProtocolGuid,\r
EFI_NATIVE_INTERFACE,\r
- &mChAcpiNotifyProtocol\r
+ NULL\r
);\r
\r
return EFI_SUCCESS;\r
#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
&mQemuAcpiHandle,\r
&gQemuAcpiTableNotifyProtocolGuid,\r
EFI_NATIVE_INTERFACE,\r
- &mAcpiNotifyProtocol\r
+ NULL\r
);\r
}\r
\r
+++ /dev/null
-/** @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