From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.72165.1673272772911918638 for ; Mon, 09 Jan 2023 05:59:35 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=O8KTqGyv; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673272775; x=1704808775; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BzZ3Ci9gT8DwNNC+FfeqVCGI+79NKygaL0jWkeu7LTg=; b=O8KTqGyvLWCcY5shYYrbxatAlZDbieSkDsyGTt3tkYPhwucICA3Op1cE +o71mPTTgCxnOnhZPztKV7/+7v1l4iSJuBig3l0sm556Aeppt6RmC93zo AnToQ2rHz441dhU/u3orBa6AHTM4Ol0PFY1lWtuziFDxMmzKRqAv/y5Ay HOP3ZC3Bz6xZNHtitaKiUrkpBUQp7FCMHz0EqRppPr3j4uXlOjRec28zU 7ofoG2S3lRyDplBHYgI/facaOEBaF5HGox0unh6Hx8LLRYe045Bne8Uut wErGBenHBftqCazNrJpdtsgzo+mlBeM7E77bhhJFE8XoagrAoGgBNY655 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="306394378" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="306394378" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 05:59:34 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="634217671" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="634217671" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.30.4]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 05:59:32 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Laszlo Ersek , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Sebastien Boeuf Subject: [PATCH V2 1/6] OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL Date: Mon, 9 Jan 2023 21:59:12 +0800 Message-Id: <20230109135917.1752-2-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20230109135917.1752-1-min.m.xu@intel.com> References: <20230109135917.1752-1-min.m.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Min M Xu 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 Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Tom Lendacky Cc: Sebastien Boeuf Reported-by: Laszlo Ersek Signed-off-by: Min Xu --- OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 7 ++--- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 6 ++--- .../Include/Protocol/QemuAcpiTableNotify.h | 27 ------------------- 3 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c index cbe8bb9b0c75..ad39e4253478 100644 --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c @@ -15,15 +15,12 @@ #include // PcdGet32() #include // GetFirstGuidHob(), GetNextGuidHob() #include // gBS - #include #include -#include // 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 c8dee17c13e6..1a3852904df9 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -19,10 +19,8 @@ #include // QemuFwCfgS3Enabled() #include // gBS -#include #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 ); } diff --git a/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h b/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h deleted file mode 100644 index a3dd2fc1dc91..000000000000 --- a/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h +++ /dev/null @@ -1,27 +0,0 @@ -/** @file - - SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef QEMU_ACPI_TABLE_NOTIFY_H_ -#define QEMU_ACPI_TABLE_NOTIFY_H_ - -#define QEMU_ACPI_TABLE_NOTIFY_GUID \ - { 0x928939b2, 0x4235, 0x462f, { 0x95, 0x80, 0xf6, 0xa2, 0xb2, 0xc2, 0x1a, 0x4f } }; - -/// -/// Forward declaration -/// -typedef struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL QEMU_ACPI_TABLE_NOTIFY_PROTOCOL; - -/// -/// Protocol structure -/// -struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL { - UINT8 Notify; -}; - -extern EFI_GUID gQemuAcpiTableNotifyProtocolGuid; - -#endif -- 2.29.2.windows.2