From nobody Fri Apr 26 09:22:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 153292952046933.70472113684889; Sun, 29 Jul 2018 22:45:20 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7470D210C5146; Sun, 29 Jul 2018 22:45:19 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 ABBE9210C513D for ; Sun, 29 Jul 2018 22:45:17 -0700 (PDT) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2018 22:45:17 -0700 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga006.jf.intel.com with ESMTP; 29 Jul 2018 22:45:16 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,421,1526367600"; d="scan'208";a="61768955" From: Dandan Bi To: edk2-devel@lists.01.org Date: Mon, 30 Jul 2018 13:45:01 +0800 Message-Id: <20180730054504.6480-2-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 In-Reply-To: <20180730054504.6480-1-dandan.bi@intel.com> References: <20180730054504.6480-1-dandan.bi@intel.com> Subject: [edk2] [patch 1/4] QuarkPlatformPkg: Remove DxeSmmPerformanceLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" DxeSmmPerformanceLib previously is used by DP tool. But in new pweformance infrastructure, we have updated Dp tool to get the performance data from firmware performance data table in ACPI. So remove the usage of DxeSmmPerformanceLib here. Cc: Michael D Kinney Cc: Kelly Steele Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- QuarkPlatformPkg/Quark.dsc | 2 -- QuarkPlatformPkg/QuarkMin.dsc | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index 14142087bd..96ae404f47 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -891,12 +891,10 @@ # !if $(PERFORMANCE_ENABLE) ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE - - PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerfo= rmanceLib.inf } !endif =20 # # Force Recovery Application diff --git a/QuarkPlatformPkg/QuarkMin.dsc b/QuarkPlatformPkg/QuarkMin.dsc index 404f507966..d7a25686a3 100644 --- a/QuarkPlatformPkg/QuarkMin.dsc +++ b/QuarkPlatformPkg/QuarkMin.dsc @@ -1,10 +1,10 @@ ## @file # Clanton Peak CRB platform with 32-bit DXE for 4MB/8MB flash devices. # # This package provides Clanton Peak CRB platform specific modules. -# Copyright (c) 2013 - 2017 Intel Corporation. +# Copyright (c) 2013 - 2018 Intel Corporation. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BS= D License # which accompanies this distribution. The full text of the license may b= e found at # http://opensource.org/licenses/bsd-license.php @@ -619,12 +619,10 @@ # !if $(PERFORMANCE_ENABLE) ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE - - PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerfo= rmanceLib.inf } !endif =20 ShellPkg/Application/Shell/Shell.inf { --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri Apr 26 09:22:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 15329295301011005.2132367689356; Sun, 29 Jul 2018 22:45:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D1FEA210C5154; Sun, 29 Jul 2018 22:45:27 -0700 (PDT) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 7EC6B210C5145 for ; Sun, 29 Jul 2018 22:45:26 -0700 (PDT) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2018 22:45:26 -0700 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga006.jf.intel.com with ESMTP; 29 Jul 2018 22:45:21 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,421,1526367600"; d="scan'208";a="61768969" From: Dandan Bi To: edk2-devel@lists.01.org Date: Mon, 30 Jul 2018 13:45:02 +0800 Message-Id: <20180730054504.6480-3-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 In-Reply-To: <20180730054504.6480-1-dandan.bi@intel.com> References: <20180730054504.6480-1-dandan.bi@intel.com> Subject: [edk2] [patch 2/4] Vlv2TbltDevicePkg: Remove DxeSmmPerformanceLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao , David Wei MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" DxeSmmPerformanceLib previously is used by DP tool. But in new pweformance infrastructure, we have updated Dp tool to get the performance data from firmware performance data table in ACPI. So remove the usage of DxeSmmPerformanceLib here. Cc: David Wei Cc: Mang Guo Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi Reviewed-by: David Wei --- Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 -- Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 -- Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 -- 3 files changed, 6 deletions(-) diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Vlv2TbltDevicePkg/Pl= atformPkgGccX64.dsc index af845ed19f..8b8a55ae6f 100644 --- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -1292,12 +1292,10 @@ $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TAR= GET)/IA32/fTPMInitPeim.inf # !if $(PERFORMANCE_ENABLE) =3D=3D TRUE ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE - - PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerfo= rmanceLib.inf } !endif =20 Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf{ diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/Plat= formPkgIA32.dsc index 44a6fcab18..cbdfb1b83a 100644 --- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -1280,12 +1280,10 @@ $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TAR= GET)/IA32/fTPMInitPeim.inf # !if $(PERFORMANCE_ENABLE) =3D=3D TRUE ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE - - PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerfo= rmanceLib.inf } !endif =20 Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf{ diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/Platf= ormPkgX64.dsc index 0217a2818f..6396f7aad4 100644 --- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -1292,12 +1292,10 @@ $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TAR= GET)/IA32/fTPMInitPeim.inf # !if $(PERFORMANCE_ENABLE) =3D=3D TRUE ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE - - PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerfo= rmanceLib.inf } !endif =20 Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf{ --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri Apr 26 09:22:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532929528579146.39700942689433; Sun, 29 Jul 2018 22:45:28 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A36A8210C5150; Sun, 29 Jul 2018 22:45:27 -0700 (PDT) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 72367210C513D for ; Sun, 29 Jul 2018 22:45:26 -0700 (PDT) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2018 22:45:26 -0700 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga006.jf.intel.com with ESMTP; 29 Jul 2018 22:45:24 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,421,1526367600"; d="scan'208";a="61768975" From: Dandan Bi To: edk2-devel@lists.01.org Date: Mon, 30 Jul 2018 13:45:03 +0800 Message-Id: <20180730054504.6480-4-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 In-Reply-To: <20180730054504.6480-1-dandan.bi@intel.com> References: <20180730054504.6480-1-dandan.bi@intel.com> Subject: [edk2] [patch 3/4] ShellPkg: Remove DxeSmmPerformanceLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jaben Carsey , Ruiyu Ni , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" DxeSmmPerformanceLib previously is used by DP tool. But in new pweformance infrastructure, we have updated Dp tool to get the performance data from firmware performance data table in ACPI. So remove the usage of DxeSmmPerformanceLib here. Cc: Jaben Carsey Cc: Ruiyu Ni Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi Reviewed-by: Jaben Carsey --- ShellPkg/ShellPkg.dsc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc index cb2a2422ed..59dd07e0ae 100644 --- a/ShellPkg/ShellPkg.dsc +++ b/ShellPkg/ShellPkg.dsc @@ -127,15 +127,10 @@ } ShellPkg/DynamicCommand/TftpDynamicCommand/TftpApp.inf ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE - - PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerfo= rmanceLib.inf - } - ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf { - - PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerfo= rmanceLib.inf } + ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf =20 [BuildOptions] *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri Apr 26 09:22:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532929533253142.68385219246977; Sun, 29 Jul 2018 22:45:33 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0A6B2210C5155; Sun, 29 Jul 2018 22:45:32 -0700 (PDT) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 2DBB321BADAB6 for ; Sun, 29 Jul 2018 22:45:31 -0700 (PDT) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2018 22:45:31 -0700 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga006.jf.intel.com with ESMTP; 29 Jul 2018 22:45:29 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,421,1526367600"; d="scan'208";a="61769009" From: Dandan Bi To: edk2-devel@lists.01.org Date: Mon, 30 Jul 2018 13:45:04 +0800 Message-Id: <20180730054504.6480-5-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 In-Reply-To: <20180730054504.6480-1-dandan.bi@intel.com> References: <20180730054504.6480-1-dandan.bi@intel.com> Subject: [edk2] [patch 4/4] MdeModulePkg: Remove DxeSmmPerformanceLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" DxeSmmPerformanceLib previously is used by DP tool. But in new pweformance infrastructure, we have updated Dp tool to get the performance data from firmware performance data table in ACPI. Now the DxeSmmPerformanceLib is not used by any module. So remove it from edk2 code base to avoid being used by mistake. Cc: Liming Gao Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi Reviewed-by: Liming Gao --- .../DxeSmmPerformanceLib/DxeSmmPerformanceLib.c | 866 -----------------= ---- .../DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf | 68 -- .../DxeSmmPerformanceLib/DxeSmmPerformanceLib.uni | 24 - MdeModulePkg/MdeModulePkg.dsc | 1 - 4 files changed, 959 deletions(-) delete mode 100644 MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerform= anceLib.c delete mode 100644 MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerform= anceLib.inf delete mode 100644 MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerform= anceLib.uni diff --git a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib= .c b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c deleted file mode 100644 index 353174724e..0000000000 --- a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c +++ /dev/null @@ -1,866 +0,0 @@ -/** @file - Performance library instance used in DXE phase to dump both PEI/DXE and = SMM performance data. - - This library instance allows a DXE driver or UEFI application to dump bo= th PEI/DXE and SMM performance data. - StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerform= anceMeasurementEx() - and EndPerformanceMeasurementEx() are not implemented. - - Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD = License -which accompanies this distribution. The full text of the license may be = found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLI= ED. - -**/ - - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE (OFFSET_OF (EFI_SMM_COMM= UNICATE_HEADER, Data) + sizeof (SMM_PERF_COMMUNICATE)) - -EFI_SMM_COMMUNICATION_PROTOCOL *mSmmCommunication =3D NULL; -UINT8 *mSmmPerformanceBuffer; -GAUGE_DATA_ENTRY *mGaugeData =3D NULL; -UINTN mGaugeNumberOfEntries =3D 0; -GAUGE_DATA_ENTRY_EX *mGaugeDataEx =3D NULL; -UINTN mGaugeNumberOfEntriesEx =3D 0; - -BOOLEAN mNoSmmPerfHandler =3D FALSE; -BOOLEAN mNoSmmPerfExHandler =3D FALSE; - -// -// The cached Performance Protocol and PerformanceEx Protocol interface. -// -PERFORMANCE_PROTOCOL *mPerformance =3D NULL; -PERFORMANCE_EX_PROTOCOL *mPerformanceEx =3D NULL; - -/** - The function caches the pointer to SMM Communication protocol. - - The function locates SMM Communication protocol from protocol database. - - @retval EFI_SUCCESS SMM Communication protocol is successfully locat= ed. - @retval Other SMM Communication protocol is not located to log= performance. - -**/ -EFI_STATUS -GetCommunicationProtocol ( - VOID - ) -{ - EFI_STATUS Status; - EFI_SMM_COMMUNICATION_PROTOCOL *Communication; - - if (mSmmCommunication !=3D NULL) { - return EFI_SUCCESS; - } - - Status =3D gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL,= (VOID **) &Communication); - if (!EFI_ERROR (Status)) { - ASSERT (Communication !=3D NULL); - // - // Cache SMM Communication protocol. - // - mSmmCommunication =3D Communication; - } - - return Status; -} - -/** - The function caches the pointers to PerformanceEx protocol and Performan= ce Protocol. - - The function locates PerformanceEx protocol and Performance Protocol fro= m protocol database. - - @retval EFI_SUCCESS PerformanceEx protocol or Performance Protocol i= s successfully located. - @retval EFI_NOT_FOUND Both PerformanceEx protocol and Performance Prot= ocol are not located to log performance. - -**/ -EFI_STATUS -GetPerformanceProtocol ( - VOID - ) -{ - EFI_STATUS Status; - PERFORMANCE_PROTOCOL *Performance; - PERFORMANCE_EX_PROTOCOL *PerformanceEx; - - if (mPerformanceEx !=3D NULL || mPerformance !=3D NULL) { - return EFI_SUCCESS; - } - - Status =3D gBS->LocateProtocol (&gPerformanceExProtocolGuid, NULL, (VOID= **) &PerformanceEx); - if (!EFI_ERROR (Status)) { - ASSERT (PerformanceEx !=3D NULL); - // - // Cache PerformanceEx Protocol. - // - mPerformanceEx =3D PerformanceEx; - return EFI_SUCCESS; - } - - Status =3D gBS->LocateProtocol (&gPerformanceProtocolGuid, NULL, (VOID *= *) &Performance); - if (!EFI_ERROR (Status)) { - ASSERT (Performance !=3D NULL); - // - // Cache performance protocol. - // - mPerformance =3D Performance; - return EFI_SUCCESS; - } - - return EFI_NOT_FOUND; -} - -/** - Creates a record for the beginning of a performance measurement. - - Creates a record that contains the Handle, Token, Module and Identifier. - If TimeStamp is not zero, then TimeStamp is added to the record as the s= tart time. - If TimeStamp is zero, then this function reads the current time stamp - and adds that time stamp value to the record as the start time. - - @param Handle Pointer to environment specific context = used - to identify the component being measured. - @param Token Pointer to a Null-terminated ASCII string - that identifies the component being meas= ured. - @param Module Pointer to a Null-terminated ASCII string - that identifies the module being measure= d. - @param TimeStamp 64-bit time stamp. - @param Identifier 32-bit identifier. If the value is 0, th= e created record - is same as the one created by StartPerfo= rmanceMeasurement. - - @retval RETURN_SUCCESS The start of the measurement was recorde= d. - @retval RETURN_OUT_OF_RESOURCES There are not enough resources to record= the measurement. - -**/ -RETURN_STATUS -EFIAPI -StartPerformanceMeasurementEx ( - IN CONST VOID *Handle, OPTIONAL - IN CONST CHAR8 *Token, OPTIONAL - IN CONST CHAR8 *Module, OPTIONAL - IN UINT64 TimeStamp, - IN UINT32 Identifier - ) -{ - return RETURN_SUCCESS; -} - -/** - Fills in the end time of a performance measurement. - - Looks up the record that matches Handle, Token and Module. - If the record can not be found then return RETURN_NOT_FOUND. - If the record is found and TimeStamp is not zero, - then TimeStamp is added to the record as the end time. - If the record is found and TimeStamp is zero, then this function reads - the current time stamp and adds that time stamp value to the record as t= he end time. - - @param Handle Pointer to environment specific context = used - to identify the component being measured. - @param Token Pointer to a Null-terminated ASCII string - that identifies the component being meas= ured. - @param Module Pointer to a Null-terminated ASCII string - that identifies the module being measure= d. - @param TimeStamp 64-bit time stamp. - @param Identifier 32-bit identifier. If the value is 0, th= e found record - is same as the one found by EndPerforman= ceMeasurement. - - @retval RETURN_SUCCESS The end of the measurement was recorded. - @retval RETURN_NOT_FOUND The specified measurement record could n= ot be found. - -**/ -RETURN_STATUS -EFIAPI -EndPerformanceMeasurementEx ( - IN CONST VOID *Handle, OPTIONAL - IN CONST CHAR8 *Token, OPTIONAL - IN CONST CHAR8 *Module, OPTIONAL - IN UINT64 TimeStamp, - IN UINT32 Identifier - ) -{ - return RETURN_SUCCESS; -} - -/** - Creates a record for the beginning of a performance measurement. - - Creates a record that contains the Handle, Token, and Module. - If TimeStamp is not zero, then TimeStamp is added to the record as the s= tart time. - If TimeStamp is zero, then this function reads the current time stamp - and adds that time stamp value to the record as the start time. - - @param Handle Pointer to environment specific context = used - to identify the component being measured. - @param Token Pointer to a Null-terminated ASCII string - that identifies the component being meas= ured. - @param Module Pointer to a Null-terminated ASCII string - that identifies the module being measure= d. - @param TimeStamp 64-bit time stamp. - - @retval RETURN_SUCCESS The start of the measurement was recorde= d. - @retval RETURN_OUT_OF_RESOURCES There are not enough resources to record= the measurement. - -**/ -RETURN_STATUS -EFIAPI -StartPerformanceMeasurement ( - IN CONST VOID *Handle, OPTIONAL - IN CONST CHAR8 *Token, OPTIONAL - IN CONST CHAR8 *Module, OPTIONAL - IN UINT64 TimeStamp - ) -{ - return RETURN_SUCCESS; -} - -/** - Fills in the end time of a performance measurement. - - Looks up the record that matches Handle, Token, and Module. - If the record can not be found then return RETURN_NOT_FOUND. - If the record is found and TimeStamp is not zero, - then TimeStamp is added to the record as the end time. - If the record is found and TimeStamp is zero, then this function reads - the current time stamp and adds that time stamp value to the record as t= he end time. - - @param Handle Pointer to environment specific context = used - to identify the component being measured. - @param Token Pointer to a Null-terminated ASCII string - that identifies the component being meas= ured. - @param Module Pointer to a Null-terminated ASCII string - that identifies the module being measure= d. - @param TimeStamp 64-bit time stamp. - - @retval RETURN_SUCCESS The end of the measurement was recorded. - @retval RETURN_NOT_FOUND The specified measurement record could n= ot be found. - -**/ -RETURN_STATUS -EFIAPI -EndPerformanceMeasurement ( - IN CONST VOID *Handle, OPTIONAL - IN CONST CHAR8 *Token, OPTIONAL - IN CONST CHAR8 *Module, OPTIONAL - IN UINT64 TimeStamp - ) -{ - return RETURN_SUCCESS; -} - -/** - Attempts to retrieve a performance measurement log entry from the perfor= mance measurement log. - It can also retrieve the log created by StartPerformanceMeasurement and = EndPerformanceMeasurement, - and then assign the Identifier with 0. - - Attempts to retrieve the performance log entry specified by LogEntryKey.= If LogEntryKey is - zero on entry, then an attempt is made to retrieve the first entry from = the performance log, - and the key for the second entry in the log is returned. If the perform= ance log is empty, - then no entry is retrieved and zero is returned. If LogEntryKey is not = zero, then the performance - log entry associated with LogEntryKey is retrieved, and the key for the = next entry in the log is - returned. If LogEntryKey is the key for the last entry in the log, then= the last log entry is - retrieved and an implementation specific non-zero key value that specifi= es the end of the performance - log is returned. If LogEntryKey is equal this implementation specific n= on-zero key value, then no entry - is retrieved and zero is returned. In the cases where a performance log= entry can be returned, - the log entry is returned in Handle, Token, Module, StartTimeStamp, EndT= imeStamp and Identifier. - If LogEntryKey is not a valid log entry key for the performance measurem= ent log, then ASSERT(). - If Handle is NULL, then ASSERT(). - If Token is NULL, then ASSERT(). - If Module is NULL, then ASSERT(). - If StartTimeStamp is NULL, then ASSERT(). - If EndTimeStamp is NULL, then ASSERT(). - If Identifier is NULL, then ASSERT(). - - @param LogEntryKey On entry, the key of the performance mea= surement log entry to retrieve. - 0, then the first performance measuremen= t log entry is retrieved. - On exit, the key of the next performance= log entry. - @param Handle Pointer to environment specific context = used to identify the component - being measured. - @param Token Pointer to a Null-terminated ASCII strin= g that identifies the component - being measured. - @param Module Pointer to a Null-terminated ASCII strin= g that identifies the module - being measured. - @param StartTimeStamp Pointer to the 64-bit time stamp that wa= s recorded when the measurement - was started. - @param EndTimeStamp Pointer to the 64-bit time stamp that wa= s recorded when the measurement - was ended. - @param Identifier Pointer to the 32-bit identifier that wa= s recorded. - - @return The key for the next performance log entry (in general case). - -**/ -UINTN -EFIAPI -GetByPerformanceProtocol ( - IN UINTN LogEntryKey, - OUT CONST VOID **Handle, - OUT CONST CHAR8 **Token, - OUT CONST CHAR8 **Module, - OUT UINT64 *StartTimeStamp, - OUT UINT64 *EndTimeStamp, - OUT UINT32 *Identifier - ) -{ - EFI_STATUS Status; - GAUGE_DATA_ENTRY_EX *GaugeData; - - Status =3D GetPerformanceProtocol (); - if (EFI_ERROR (Status)) { - return 0; - } - - if (mPerformanceEx !=3D NULL) { - Status =3D mPerformanceEx->GetGaugeEx (LogEntryKey++, &GaugeData); - } else if (mPerformance !=3D NULL) { - Status =3D mPerformance->GetGauge (LogEntryKey++, (GAUGE_DATA_ENTRY **= ) &GaugeData); - } else { - ASSERT (FALSE); - return 0; - } - - // - // Make sure that LogEntryKey is a valid log entry key, - // - ASSERT (Status !=3D EFI_INVALID_PARAMETER); - - if (EFI_ERROR (Status)) { - // - // The LogEntryKey is the last entry (equals to the total entry number= ). - // - return 0; - } - - ASSERT (GaugeData !=3D NULL); - - *Handle =3D (VOID *) (UINTN) GaugeData->Handle; - *Token =3D GaugeData->Token; - *Module =3D GaugeData->Module; - *StartTimeStamp =3D GaugeData->StartTimeStamp; - *EndTimeStamp =3D GaugeData->EndTimeStamp; - if (mPerformanceEx !=3D NULL) { - *Identifier =3D GaugeData->Identifier; - } else { - *Identifier =3D 0; - } - - return LogEntryKey; -} - - -/** - Retrieves all previous logged performance measurement. - Function will use SMM communicate protocol to get all previous SMM perfo= rmance measurement data. - If success, data buffer will be returned. If fail function will return N= ULL. - - @param LogEntryKey On entry, the key of the performance mea= surement log entry to retrieve. - 0, then the first performance measuremen= t log entry is retrieved. - On exit, the key of the next performance= log entry. - - @retval !NULL Get all gauge data success. - @retval NULL Get all gauge data failed. -**/ -GAUGE_DATA_ENTRY * -EFIAPI -GetAllSmmGaugeData ( - IN UINTN LogEntryKey - ) -{ - EFI_STATUS Status; - EFI_SMM_COMMUNICATE_HEADER *SmmCommBufferHeader; - SMM_PERF_COMMUNICATE *SmmPerfCommData; - UINTN CommSize; - UINTN DataSize; - EDKII_PI_SMM_COMMUNICATION_REGION_TABLE *PiSmmCommunicationRegionTable; - UINT32 Index; - EFI_MEMORY_DESCRIPTOR *Entry; - UINT8 *Buffer; - UINTN Size; - UINTN NumberOfEntries; - UINTN EntriesGot; - - if (mNoSmmPerfHandler) { - // - // Not try to get the SMM gauge data again - // if no SMM Performance handler found. - // - return NULL; - } - - if (LogEntryKey !=3D 0) { - if (mGaugeData !=3D NULL) { - return mGaugeData; - } - } else { - // - // Reget the SMM gauge data at the first entry get. - // - if (mGaugeData !=3D NULL) { - FreePool (mGaugeData); - mGaugeData =3D NULL; - mGaugeNumberOfEntries =3D 0; - } - } - - Status =3D GetCommunicationProtocol (); - if (EFI_ERROR (Status)) { - return NULL; - } - - Status =3D EfiGetSystemConfigurationTable ( - &gEdkiiPiSmmCommunicationRegionTableGuid, - (VOID **) &PiSmmCommunicationRegionTable - ); - if (EFI_ERROR (Status)) { - return NULL; - } - ASSERT (PiSmmCommunicationRegionTable !=3D NULL); - Entry =3D (EFI_MEMORY_DESCRIPTOR *) (PiSmmCommunicationRegionTable + 1); - Size =3D 0; - for (Index =3D 0; Index < PiSmmCommunicationRegionTable->NumberOfEntries= ; Index++) { - if (Entry->Type =3D=3D EfiConventionalMemory) { - Size =3D EFI_PAGES_TO_SIZE ((UINTN) Entry->NumberOfPages); - if (Size >=3D (SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE + sizeof (G= AUGE_DATA_ENTRY))) { - break; - } - } - Entry =3D (EFI_MEMORY_DESCRIPTOR *) ((UINT8 *) Entry + PiSmmCommunicat= ionRegionTable->DescriptorSize); - } - ASSERT (Index < PiSmmCommunicationRegionTable->NumberOfEntries); - mSmmPerformanceBuffer =3D (UINT8 *) (UINTN) Entry->PhysicalStart; - - // - // Initialize communicate buffer - // - SmmCommBufferHeader =3D (EFI_SMM_COMMUNICATE_HEADER *)mSmmPerformanceBuf= fer; - SmmPerfCommData =3D (SMM_PERF_COMMUNICATE *)SmmCommBufferHeader->Data; - ZeroMem((UINT8*)SmmPerfCommData, sizeof(SMM_PERF_COMMUNICATE)); - - CopyGuid (&SmmCommBufferHeader->HeaderGuid, &gSmmPerformanceProtocolGuid= ); - SmmCommBufferHeader->MessageLength =3D sizeof(SMM_PERF_COMMUNICATE); - CommSize =3D SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE; - - // - // Get total number of SMM gauge entries - // - SmmPerfCommData->Function =3D SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER; - Status =3D mSmmCommunication->Communicate (mSmmCommunication, mSmmPerfor= manceBuffer, &CommSize); - if (Status =3D=3D EFI_NOT_FOUND) { - mNoSmmPerfHandler =3D TRUE; - } - if (EFI_ERROR (Status) || EFI_ERROR (SmmPerfCommData->ReturnStatus) || S= mmPerfCommData->NumberOfEntries =3D=3D 0) { - return NULL; - } - - mGaugeNumberOfEntries =3D SmmPerfCommData->NumberOfEntries; - - Buffer =3D mSmmPerformanceBuffer + SMM_PERFORMANCE_COMMUNICATION_BUFFER_= SIZE; - NumberOfEntries =3D (Size - SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE) /= sizeof (GAUGE_DATA_ENTRY); - DataSize =3D mGaugeNumberOfEntries * sizeof(GAUGE_DATA_ENTRY); - mGaugeData =3D AllocateZeroPool(DataSize); - ASSERT (mGaugeData !=3D NULL); - - // - // Get all SMM gauge data - // - SmmPerfCommData->Function =3D SMM_PERF_FUNCTION_GET_GAUGE_DATA; - SmmPerfCommData->GaugeData =3D (GAUGE_DATA_ENTRY *) Buffer; - EntriesGot =3D 0; - do { - SmmPerfCommData->LogEntryKey =3D EntriesGot; - if ((mGaugeNumberOfEntries - EntriesGot) >=3D NumberOfEntries) { - SmmPerfCommData->NumberOfEntries =3D NumberOfEntries; - } else { - SmmPerfCommData->NumberOfEntries =3D mGaugeNumberOfEntries - Entries= Got; - } - Status =3D mSmmCommunication->Communicate (mSmmCommunication, mSmmPerf= ormanceBuffer, &CommSize); - if (EFI_ERROR (Status) || EFI_ERROR (SmmPerfCommData->ReturnStatus)) { - FreePool (mGaugeData); - mGaugeData =3D NULL; - mGaugeNumberOfEntries =3D 0; - return NULL; - } else { - CopyMem (&mGaugeData[EntriesGot], Buffer, SmmPerfCommData->NumberOfE= ntries * sizeof (GAUGE_DATA_ENTRY)); - } - EntriesGot +=3D SmmPerfCommData->NumberOfEntries; - } while (EntriesGot < mGaugeNumberOfEntries); - - return mGaugeData; -} - -/** - Retrieves all previous logged performance measurement. - Function will use SMM communicate protocol to get all previous SMM perfo= rmance measurement data. - If success, data buffer will be returned. If fail function will return N= ULL. - - @param LogEntryKey On entry, the key of the performance mea= surement log entry to retrieve. - 0, then the first performance measuremen= t log entry is retrieved. - On exit, the key of the next performance= log entry. - - @retval !NULL Get all gauge data success. - @retval NULL Get all gauge data failed. -**/ -GAUGE_DATA_ENTRY_EX * -EFIAPI -GetAllSmmGaugeDataEx ( - IN UINTN LogEntryKey - ) -{ - EFI_STATUS Status; - EFI_SMM_COMMUNICATE_HEADER *SmmCommBufferHeader; - SMM_PERF_COMMUNICATE_EX *SmmPerfCommData; - UINTN CommSize; - UINTN DataSize; - EDKII_PI_SMM_COMMUNICATION_REGION_TABLE *PiSmmCommunicationRegionTable; - UINT32 Index; - EFI_MEMORY_DESCRIPTOR *Entry; - UINT8 *Buffer; - UINTN Size; - UINTN NumberOfEntries; - UINTN EntriesGot; - - if (mNoSmmPerfExHandler) { - // - // Not try to get the SMM gauge data again - // if no SMM PerformanceEx handler found. - // - return NULL; - } - - if (LogEntryKey !=3D 0) { - if (mGaugeDataEx !=3D NULL) { - return mGaugeDataEx; - } - } else { - // - // Reget the SMM gauge data at the first entry get. - // - if (mGaugeDataEx !=3D NULL) { - FreePool (mGaugeDataEx); - mGaugeDataEx =3D NULL; - mGaugeNumberOfEntriesEx =3D 0; - } - } - - Status =3D GetCommunicationProtocol (); - if (EFI_ERROR (Status)) { - return NULL; - } - - Status =3D EfiGetSystemConfigurationTable ( - &gEdkiiPiSmmCommunicationRegionTableGuid, - (VOID **) &PiSmmCommunicationRegionTable - ); - if (EFI_ERROR (Status)) { - return NULL; - } - ASSERT (PiSmmCommunicationRegionTable !=3D NULL); - Entry =3D (EFI_MEMORY_DESCRIPTOR *) (PiSmmCommunicationRegionTable + 1); - Size =3D 0; - for (Index =3D 0; Index < PiSmmCommunicationRegionTable->NumberOfEntries= ; Index++) { - if (Entry->Type =3D=3D EfiConventionalMemory) { - Size =3D EFI_PAGES_TO_SIZE ((UINTN) Entry->NumberOfPages); - if (Size >=3D (SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE + sizeof (G= AUGE_DATA_ENTRY_EX))) { - break; - } - } - Entry =3D (EFI_MEMORY_DESCRIPTOR *) ((UINT8 *) Entry + PiSmmCommunicat= ionRegionTable->DescriptorSize); - } - ASSERT (Index < PiSmmCommunicationRegionTable->NumberOfEntries); - mSmmPerformanceBuffer =3D (UINT8 *) (UINTN) Entry->PhysicalStart; - // - // Initialize communicate buffer - // - SmmCommBufferHeader =3D (EFI_SMM_COMMUNICATE_HEADER *)mSmmPerformanceBuf= fer; - SmmPerfCommData =3D (SMM_PERF_COMMUNICATE_EX *)SmmCommBufferHeader->Data; - ZeroMem((UINT8*)SmmPerfCommData, sizeof(SMM_PERF_COMMUNICATE_EX)); - - CopyGuid (&SmmCommBufferHeader->HeaderGuid, &gSmmPerformanceExProtocolGu= id); - SmmCommBufferHeader->MessageLength =3D sizeof(SMM_PERF_COMMUNICATE_EX); - CommSize =3D SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE; - - // - // Get total number of SMM gauge entries - // - SmmPerfCommData->Function =3D SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER; - Status =3D mSmmCommunication->Communicate (mSmmCommunication, mSmmPerfor= manceBuffer, &CommSize); - if (Status =3D=3D EFI_NOT_FOUND) { - mNoSmmPerfExHandler =3D TRUE; - } - if (EFI_ERROR (Status) || EFI_ERROR (SmmPerfCommData->ReturnStatus) || S= mmPerfCommData->NumberOfEntries =3D=3D 0) { - return NULL; - } - - mGaugeNumberOfEntriesEx =3D SmmPerfCommData->NumberOfEntries; - - Buffer =3D mSmmPerformanceBuffer + SMM_PERFORMANCE_COMMUNICATION_BUFFER_= SIZE; - NumberOfEntries =3D (Size - SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE) /= sizeof (GAUGE_DATA_ENTRY_EX); - DataSize =3D mGaugeNumberOfEntriesEx * sizeof(GAUGE_DATA_ENTRY_EX); - mGaugeDataEx =3D AllocateZeroPool(DataSize); - ASSERT (mGaugeDataEx !=3D NULL); - - // - // Get all SMM gauge data - // - SmmPerfCommData->Function =3D SMM_PERF_FUNCTION_GET_GAUGE_DATA; - SmmPerfCommData->GaugeDataEx =3D (GAUGE_DATA_ENTRY_EX *) Buffer; - EntriesGot =3D 0; - do { - SmmPerfCommData->LogEntryKey =3D EntriesGot; - if ((mGaugeNumberOfEntriesEx - EntriesGot) >=3D NumberOfEntries) { - SmmPerfCommData->NumberOfEntries =3D NumberOfEntries; - } else { - SmmPerfCommData->NumberOfEntries =3D mGaugeNumberOfEntriesEx - Entri= esGot; - } - Status =3D mSmmCommunication->Communicate (mSmmCommunication, mSmmPerf= ormanceBuffer, &CommSize); - if (EFI_ERROR (Status) || EFI_ERROR (SmmPerfCommData->ReturnStatus)) { - FreePool (mGaugeDataEx); - mGaugeDataEx =3D NULL; - mGaugeNumberOfEntriesEx =3D 0; - return NULL; - } else { - CopyMem (&mGaugeDataEx[EntriesGot], Buffer, SmmPerfCommData->NumberO= fEntries * sizeof (GAUGE_DATA_ENTRY_EX)); - } - EntriesGot +=3D SmmPerfCommData->NumberOfEntries; - } while (EntriesGot < mGaugeNumberOfEntriesEx); - - return mGaugeDataEx; -} - -/** - Attempts to retrieve a performance measurement log entry from the perfor= mance measurement log. - It can also retrieve the log created by StartPerformanceMeasurement and = EndPerformanceMeasurement, - and then assign the Identifier with 0. - - Attempts to retrieve the performance log entry specified by LogEntryKey.= If LogEntryKey is - zero on entry, then an attempt is made to retrieve the first entry from = the performance log, - and the key for the second entry in the log is returned. If the perform= ance log is empty, - then no entry is retrieved and zero is returned. If LogEntryKey is not = zero, then the performance - log entry associated with LogEntryKey is retrieved, and the key for the = next entry in the log is - returned. If LogEntryKey is the key for the last entry in the log, then= the last log entry is - retrieved and an implementation specific non-zero key value that specifi= es the end of the performance - log is returned. If LogEntryKey is equal this implementation specific n= on-zero key value, then no entry - is retrieved and zero is returned. In the cases where a performance log= entry can be returned, - the log entry is returned in Handle, Token, Module, StartTimeStamp, EndT= imeStamp and Identifier. - If LogEntryKey is not a valid log entry key for the performance measurem= ent log, then ASSERT(). - If Handle is NULL, then ASSERT(). - If Token is NULL, then ASSERT(). - If Module is NULL, then ASSERT(). - If StartTimeStamp is NULL, then ASSERT(). - If EndTimeStamp is NULL, then ASSERT(). - If Identifier is NULL, then ASSERT(). - - @param LogEntryKey On entry, the key of the performance mea= surement log entry to retrieve. - 0, then the first performance measuremen= t log entry is retrieved. - On exit, the key of the next performance= log entry. - @param Handle Pointer to environment specific context = used to identify the component - being measured. - @param Token Pointer to a Null-terminated ASCII strin= g that identifies the component - being measured. - @param Module Pointer to a Null-terminated ASCII strin= g that identifies the module - being measured. - @param StartTimeStamp Pointer to the 64-bit time stamp that wa= s recorded when the measurement - was started. - @param EndTimeStamp Pointer to the 64-bit time stamp that wa= s recorded when the measurement - was ended. - @param Identifier Pointer to the 32-bit identifier that wa= s recorded. - - @return The key for the next performance log entry (in general case). - -**/ -UINTN -EFIAPI -GetPerformanceMeasurementEx ( - IN UINTN LogEntryKey, - OUT CONST VOID **Handle, - OUT CONST CHAR8 **Token, - OUT CONST CHAR8 **Module, - OUT UINT64 *StartTimeStamp, - OUT UINT64 *EndTimeStamp, - OUT UINT32 *Identifier - ) -{ - GAUGE_DATA_ENTRY_EX *GaugeData; - - GaugeData =3D NULL; - - ASSERT (Handle !=3D NULL); - ASSERT (Token !=3D NULL); - ASSERT (Module !=3D NULL); - ASSERT (StartTimeStamp !=3D NULL); - ASSERT (EndTimeStamp !=3D NULL); - ASSERT (Identifier !=3D NULL); - - mGaugeDataEx =3D GetAllSmmGaugeDataEx (LogEntryKey); - if (mGaugeDataEx !=3D NULL) { - if (LogEntryKey >=3D mGaugeNumberOfEntriesEx) { - // - // Try to get the data by Performance Protocol. - // - LogEntryKey =3D LogEntryKey - mGaugeNumberOfEntriesEx; - LogEntryKey =3D GetByPerformanceProtocol ( - LogEntryKey, - Handle, - Token, - Module, - StartTimeStamp, - EndTimeStamp, - Identifier - ); - if (LogEntryKey =3D=3D 0) { - // - // Last entry. - // - return LogEntryKey; - } else { - return (LogEntryKey + mGaugeNumberOfEntriesEx); - } - } - - GaugeData =3D &mGaugeDataEx[LogEntryKey++]; - *Identifier =3D GaugeData->Identifier; - } else { - mGaugeData =3D GetAllSmmGaugeData (LogEntryKey); - if (mGaugeData !=3D NULL) { - if (LogEntryKey >=3D mGaugeNumberOfEntries) { - // - // Try to get the data by Performance Protocol. - // - LogEntryKey =3D LogEntryKey - mGaugeNumberOfEntries; - LogEntryKey =3D GetByPerformanceProtocol ( - LogEntryKey, - Handle, - Token, - Module, - StartTimeStamp, - EndTimeStamp, - Identifier - ); - if (LogEntryKey =3D=3D 0) { - // - // Last entry. - // - return LogEntryKey; - } else { - return (LogEntryKey + mGaugeNumberOfEntries); - } - } - - GaugeData =3D (GAUGE_DATA_ENTRY_EX *) &mGaugeData[LogEntryKey++]; - *Identifier =3D 0; - } else { - return GetByPerformanceProtocol ( - LogEntryKey, - Handle, - Token, - Module, - StartTimeStamp, - EndTimeStamp, - Identifier - ); - } - } - - *Handle =3D (VOID *) (UINTN) GaugeData->Handle; - *Token =3D GaugeData->Token; - *Module =3D GaugeData->Module; - *StartTimeStamp =3D GaugeData->StartTimeStamp; - *EndTimeStamp =3D GaugeData->EndTimeStamp; - - return LogEntryKey; -} - -/** - Attempts to retrieve a performance measurement log entry from the perfor= mance measurement log. - It can also retrieve the log created by StartPerformanceMeasurementEx an= d EndPerformanceMeasurementEx, - and then eliminate the Identifier. - - Attempts to retrieve the performance log entry specified by LogEntryKey.= If LogEntryKey is - zero on entry, then an attempt is made to retrieve the first entry from = the performance log, - and the key for the second entry in the log is returned. If the perform= ance log is empty, - then no entry is retrieved and zero is returned. If LogEntryKey is not = zero, then the performance - log entry associated with LogEntryKey is retrieved, and the key for the = next entry in the log is - returned. If LogEntryKey is the key for the last entry in the log, then= the last log entry is - retrieved and an implementation specific non-zero key value that specifi= es the end of the performance - log is returned. If LogEntryKey is equal this implementation specific n= on-zero key value, then no entry - is retrieved and zero is returned. In the cases where a performance log= entry can be returned, - the log entry is returned in Handle, Token, Module, StartTimeStamp, and = EndTimeStamp. - If LogEntryKey is not a valid log entry key for the performance measurem= ent log, then ASSERT(). - If Handle is NULL, then ASSERT(). - If Token is NULL, then ASSERT(). - If Module is NULL, then ASSERT(). - If StartTimeStamp is NULL, then ASSERT(). - If EndTimeStamp is NULL, then ASSERT(). - - @param LogEntryKey On entry, the key of the performance mea= surement log entry to retrieve. - 0, then the first performance measuremen= t log entry is retrieved. - On exit, the key of the next performance= log entry. - @param Handle Pointer to environment specific context = used to identify the component - being measured. - @param Token Pointer to a Null-terminated ASCII strin= g that identifies the component - being measured. - @param Module Pointer to a Null-terminated ASCII strin= g that identifies the module - being measured. - @param StartTimeStamp Pointer to the 64-bit time stamp that wa= s recorded when the measurement - was started. - @param EndTimeStamp Pointer to the 64-bit time stamp that wa= s recorded when the measurement - was ended. - - @return The key for the next performance log entry (in general case). - -**/ -UINTN -EFIAPI -GetPerformanceMeasurement ( - IN UINTN LogEntryKey, - OUT CONST VOID **Handle, - OUT CONST CHAR8 **Token, - OUT CONST CHAR8 **Module, - OUT UINT64 *StartTimeStamp, - OUT UINT64 *EndTimeStamp - ) -{ - UINT32 Identifier; - return GetPerformanceMeasurementEx (LogEntryKey, Handle, Token, Module, = StartTimeStamp, EndTimeStamp, &Identifier); -} - -/** - Returns TRUE if the performance measurement macros are enabled. - - This function returns TRUE if the PERFORMANCE_LIBRARY_PROPERTY_MEASUREME= NT_ENABLED bit of - PcdPerformanceLibraryPropertyMask is set. Otherwise FALSE is returned. - - @retval TRUE The PERFORMANCE_LIBRARY_PROPERTY_MEASURE= MENT_ENABLED bit of - PcdPerformanceLibraryPropertyMask is set. - @retval FALSE The PERFORMANCE_LIBRARY_PROPERTY_MEASURE= MENT_ENABLED bit of - PcdPerformanceLibraryPropertyMask is cle= ar. - -**/ -BOOLEAN -EFIAPI -PerformanceMeasurementEnabled ( - VOID - ) -{ - return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMA= NCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) !=3D 0); -} diff --git a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib= .inf b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf deleted file mode 100644 index f4d94c23e8..0000000000 --- a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf +++ /dev/null @@ -1,68 +0,0 @@ -## @file -# Performance library instance used in DXE phase to dump SMM performance = data. -# -# This library instance allows a DXE driver or UEFI application to dump b= oth PEI/DXE and SMM performance data. -# StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerfor= manceMeasurementEx() -# and EndPerformanceMeasurementEx() are not implemented. -# -# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
-# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the B= SD License -# which accompanies this distribution. The full text of the license may = be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D DxeSmmPerformanceLib - MODULE_UNI_FILE =3D DxeSmmPerformanceLib.uni - FILE_GUID =3D DA80C15C-0B4D-4e75-8946-4043DE559B0C - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D PerformanceLib|DXE_DRIVER DXE_RUNTIME= _DRIVER UEFI_APPLICATION - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 -# - -[Sources] - DxeSmmPerformanceLib.c - - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - - -[LibraryClasses] - BaseLib - UefiBootServicesTableLib - PcdLib - DebugLib - BaseMemoryLib - UefiRuntimeServicesTableLib - MemoryAllocationLib - UefiLib - -[Guids] - gPerformanceProtocolGuid ## SOMETIMES_CONSUMES ## UNDEFIN= ED # Locate protocol - gPerformanceExProtocolGuid ## SOMETIMES_CONSUMES ## UNDEFIN= ED # Locate protocol - gSmmPerformanceProtocolGuid ## SOMETIMES_PRODUCES ## UNDEFIN= ED # Used to do smm communication - gSmmPerformanceExProtocolGuid ## SOMETIMES_PRODUCES ## UNDEFIN= ED # Used to do smm communication - gEdkiiPiSmmCommunicationRegionTableGuid ## CONSUMES ## SystemTable - -[Protocols] - gEfiSmmCommunicationProtocolGuid ## CONSUMES - - -[Pcd] - gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask ## CONSUMES - -[Depex.common.DXE_DRIVER, Depex.common.DXE_RUNTIME_DRIVER] - gEfiSmmCommunicationProtocolGuid diff --git a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib= .uni b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.uni deleted file mode 100644 index 6db8cff7a4..0000000000 --- a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.uni +++ /dev/null @@ -1,24 +0,0 @@ -// /** @file -// Performance library instance used in DXE phase to dump SMM performance = data. -// -// This library instance allows a DXE driver or UEFI application to dump t= he SMM performance data. -// StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerfor= manceMeasurementEx() -// and EndPerformanceMeasurementEx() are not implemented. -// -// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
-// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the B= SD License -// which accompanies this distribution. The full text of the license may = be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. -// -// **/ - - -#string STR_MODULE_ABSTRACT #language en-US "Used in DXE phase= to dump SMM performance data" - -#string STR_MODULE_DESCRIPTION #language en-US "This library inst= ance allows a DXE driver or UEFI application to dump the SMM performance da= ta. StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerfor= manceMeasurementEx() and EndPerformanceMeasurementEx() are not implemented." - diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index ef7b46fedc..19d7713c33 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -487,11 +487,10 @@ MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryAllocationPr= ofileLib.inf MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocat= ionProfileLib.inf MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocat= ionLib.inf MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.inf MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf - MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNu= ll.inf MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.inf --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel