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:33 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=TE4edWQf; 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=1673272772; x=1704808772; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=admoAxFi+62G2UD31CbvyQcwwa57JuQVF6Y+wlFDX4o=; b=TE4edWQfUXQfap82qacEFMoNZQWnlsIxxBQ7zxDTrYpENS6d0uEhnB9m 3q/2uUWVCGbweO18xHfTuEuVAzg5x3CTo2dNr3SV9CnyTo+WzTRDDTaqR tN4N2LDUTxn152zUh6O7f7AK90ygwnAICL1DWe7wSqSF1DoZ3yxW7J8u4 oE2sEa6BXaLFF0w/ZqJJVONkB78fUe/BAfEz67yiwPWDjcmXrwT4Q+M49 4rX32nVl/n8WeuileRX9ryXu6N32Sxg6piisfiBwl/2mNCgMGlpJA7X3h jndWtV0yiryKz60vt74u/Bt/fc1kZy8FUrgfHI6tpccrXU1qYAfn3phiA Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="306394369" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="306394369" 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:32 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="634217661" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="634217661" 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:29 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Laszlo Ersek , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Sebastien Boeuf Subject: [PATCH V2 0/6] Refactor installation of gQemuAcpiTableNotifyProtocol Date: Mon, 9 Jan 2023 21:59:11 +0800 Message-Id: <20230109135917.1752-1-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4237 Commit 9fdc70af6ba8 breaks log analysis and code cohesion in AcpiPlatformDxe. See the detailed information in BZ#4237. This patch-set contains below patches to fix above issues. #1: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL and delete QemuAcpiTableNotify.h. #2: Use local variable of ChAcpiHandle to store the handle. #3: Use local variable of QemuAcpiHandle to store the handle. #4: Add log to show how many ACPI tables installed. #5: Refactor the installation of QemuAcpiTableNotifyProtocol and its error handling. #6: Return error code if QemuAcpiTableNotifyProtocol is failed to be installed so that the caller can handle the error. Code: https://github.com/mxu9/edk2/tree/AcpiPlatformDxe.v2 v2 changes: - Split v1 patch into 6 separate patches. 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 Min M Xu (6): OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL OvmfPkg/AcpiPlatformDxe: Use local variable in CloudHvAcpi.c OvmfPkg/AcpiPlatformDxe: Use local variable in QemuFwCfgAcpi.c OvmfPkg/AcpiPlatformDxe: Add log to show the installed tables OvmfPkg/AcpiPlatformDxe: Refactor QemuAcpiTableNotifyProtocol OvmfPkg/AcpiPlatformDxe: Return error if installing NotifyProtocol failed OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 27 ++++++------ OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 44 ++++++++++++------- .../Include/Protocol/QemuAcpiTableNotify.h | 27 ------------ 3 files changed, 43 insertions(+), 55 deletions(-) delete mode 100644 OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h -- 2.29.2.windows.2