summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/AcpiPlatformDxe
diff options
context:
space:
mode:
authorMin M Xu <min.m.xu@intel.com>2023-01-11 09:22:30 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-15 10:26:15 +0000
commit43b3ca6b7f626c6dcdc1a347ad8a42d8cf9ea575 (patch)
treec8710396335d3b176d04f491cb627a6f8e0b8bc7 /OvmfPkg/AcpiPlatformDxe
parentba08910df1071bf5ade987529d9becb38d14a14a (diff)
downloadedk2-43b3ca6b7f626c6dcdc1a347ad8a42d8cf9ea575.tar.gz
edk2-43b3ca6b7f626c6dcdc1a347ad8a42d8cf9ea575.tar.bz2
edk2-43b3ca6b7f626c6dcdc1a347ad8a42d8cf9ea575.zip
OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL
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>
Diffstat (limited to 'OvmfPkg/AcpiPlatformDxe')
-rw-r--r--OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c7
-rw-r--r--OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c6
2 files changed, 4 insertions, 9 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
index cbe8bb9b0c..ad39e42534 100644
--- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
@@ -15,15 +15,12 @@
#include <Library/PcdLib.h> // PcdGet32()
#include <Library/HobLib.h> // GetFirstGuidHob(), GetNextGuidHob()
#include <Library/UefiBootServicesTableLib.h> // gBS
-
#include <Protocol/AcpiSystemDescriptionTable.h>
#include <Protocol/AcpiTable.h>
-#include <Protocol/QemuAcpiTableNotify.h> // QEMU_ACPI_TABLE_NOTIFY_PROTOCOL
#include "AcpiPlatform.h"
-EFI_HANDLE mChAcpiHandle = NULL;
-QEMU_ACPI_TABLE_NOTIFY_PROTOCOL mChAcpiNotifyProtocol;
+EFI_HANDLE mChAcpiHandle = NULL;
EFI_STATUS
EFIAPI
@@ -96,7 +93,7 @@ InstallCloudHvTablesTdx (
&mChAcpiHandle,
&gQemuAcpiTableNotifyProtocolGuid,
EFI_NATIVE_INTERFACE,
- &mChAcpiNotifyProtocol
+ NULL
);
return EFI_SUCCESS;
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
index c8dee17c13..1a3852904d 100644
--- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
@@ -19,10 +19,8 @@
#include <Library/QemuFwCfgS3Lib.h> // QemuFwCfgS3Enabled()
#include <Library/UefiBootServicesTableLib.h> // gBS
-#include <Protocol/QemuAcpiTableNotify.h>
#include "AcpiPlatform.h"
-EFI_HANDLE mQemuAcpiHandle = NULL;
-QEMU_ACPI_TABLE_NOTIFY_PROTOCOL mAcpiNotifyProtocol;
+EFI_HANDLE mQemuAcpiHandle = NULL;
//
// The user structure for the ordered collection that will track the fw_cfg
@@ -1284,7 +1282,7 @@ UninstallAcpiTables:
&mQemuAcpiHandle,
&gQemuAcpiTableNotifyProtocolGuid,
EFI_NATIVE_INTERFACE,
- &mAcpiNotifyProtocol
+ NULL
);
}