From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B732522618171 for ; Tue, 10 Apr 2018 18:28:13 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2018 18:28:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,434,1517904000"; d="scan'208";a="42364162" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga003.jf.intel.com with ESMTP; 10 Apr 2018 18:28:12 -0700 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Liming Gao Date: Wed, 11 Apr 2018 09:27:12 +0800 Message-Id: <20180411012712.122468-1-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [patch] MdeModulePkg/FPDT: Add error message for unsupported case X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2018 01:28:13 -0000 We have updated performance infrastructure in previous commits: between https://github.com/tianocore/edk2/commit/73fef64f14d1b97ae9bd4705df3becc022391eba and https://github.com/tianocore/edk2/commit/115eae650bfd2be2c2bc37360f4a755065e774c4 Update FPDT drivers to collect the performance data reported by gEdkiiFpdtExtendedFirmwarePerformanceGuid. The old implementation which collected performance data through gEfiFirmwarePerformanceGuid is not supported now. We should add error message to remind user for this unsupported case in case anyone use it by mistake. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- .../Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c | 3 +++ .../Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c index e5a38121e9d..e719e9e482c 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c @@ -552,10 +552,13 @@ FpdtStatusCodeListenerDxe ( } else if (Data != NULL && CompareGuid (&Data->Type, &gEdkiiFpdtExtendedFirmwarePerformanceGuid)) { // // Get the Boot performance table and then install it to ACPI table. // CopyMem (&mReceivedAcpiBootPerformanceTable, Data + 1, Data->Size); + } else if (Data != NULL && CompareGuid (&Data->Type, &gEfiFirmwarePerformanceGuid)) { + DEBUG ((DEBUG_ERROR, "FpdtStatusCodeListenerDxe: Performance data reported through gEfiFirmwarePerformanceGuid will not be collected by FirmwarePerformanceDataTableDxe\n")); + Status = EFI_UNSUPPORTED; } else { // // Ignore else progress code. // Status = EFI_UNSUPPORTED; diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c index d4ac849ed00..b011ec11030 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c @@ -104,10 +104,15 @@ FpdtStatusCodeListenerSmm ( ReleaseSpinLock (&mSmmFpdtLock); return EFI_SUCCESS; } + if (Data != NULL && CompareGuid (&Data->Type, &gEfiFirmwarePerformanceGuid)) { + DEBUG ((DEBUG_ERROR, "FpdtStatusCodeListenerSmm: Performance data reported through gEfiFirmwarePerformanceGuid will not be collected by FirmwarePerformanceDataTableSmm\n")); + return EFI_UNSUPPORTED; + } + if ((Value != PcdGet32 (PcdProgressCodeS3SuspendStart)) && (Value != PcdGet32 (PcdProgressCodeS3SuspendEnd))) { return EFI_UNSUPPORTED; } -- 2.14.3.windows.1