From nobody Mon Feb 9 20:35:40 2026 Delivered-To: importer@patchew.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; 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 Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501471944861920.551964473614; Sun, 30 Jul 2017 20:32:24 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8A93A21E1DB57; Sun, 30 Jul 2017 20:29:59 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 4B8A721D49C77 for ; Sun, 30 Jul 2017 20:29:58 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 30 Jul 2017 20:32:06 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.12]) by fmsmga004.fm.intel.com with ESMTP; 30 Jul 2017 20:32:04 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,439,1496127600"; d="scan'208";a="293545280" From: Star Zeng To: edk2-devel@lists.01.org Date: Mon, 31 Jul 2017 11:31:57 +0800 Message-Id: <1501471917-11272-4-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1501471917-11272-1-git-send-email-star.zeng@intel.com> References: <1501471917-11272-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [PATCH 3/3] MdeModulePkg FirmwarePerfPei: Remove SEC performance data getting code X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao , Star Zeng 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" Current SEC performance data getting code in FirmwarePerformancePei may get wrong SEC performance data if FirmwarePerformancePei executes after memory discovered. And as SecCore has added SecPerformancePpiCallBack to get SEC performance data and build HOB to convey the SEC performance data to DXE phase. This patch is to remove the SEC performance data getting code in FirmwarePerformancePei. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- .../FirmwarePerformancePei.c | 39 ++----------------= ---- .../FirmwarePerformancePei.inf | 9 +---- .../FirmwarePerformancePei.uni | 6 ++-- 3 files changed, 6 insertions(+), 48 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/Fi= rmwarePerformancePei.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDat= aTablePei/FirmwarePerformancePei.c index 396462e7aa97..e4800b7bdd8a 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwareP= erformancePei.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwareP= erformancePei.c @@ -1,13 +1,11 @@ /** @file This module updates S3 Resume Performance Record in ACPI Firmware Perfor= mance - Data Table in S3 resume boot mode. In normal boot mode, this module cons= umes - SecPerformance PPI produced by SEC phase and build Hob to convey the SEC - performance data to DXE phase. + Data Table in S3 resume boot mode. =20 This module register report status code listener to collect performance = data for S3 Resume Performance Record on S3 resume boot path. =20 - Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
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 @@ -21,7 +19,6 @@ #include =20 #include -#include =20 #include =20 @@ -31,7 +28,6 @@ #include #include #include -#include #include =20 /** @@ -79,7 +75,7 @@ FpdtStatusCodeListenerPei ( // Check whether status code is what we are interested in. // if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) !=3D EFI_PROGRESS_CODE) || - (Value !=3D (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_OS_WAKE))) { + (Value !=3D (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_OS_WAKE))) { return EFI_UNSUPPORTED; } =20 @@ -157,8 +153,6 @@ FirmwarePerformancePeiEntryPoint ( { EFI_STATUS Status; EFI_PEI_RSC_HANDLER_PPI *RscHandler; - PEI_SEC_PERFORMANCE_PPI *SecPerf; - FIRMWARE_SEC_PERFORMANCE Performance; =20 if (FeaturePcdGet (PcdFirmwarePerformanceDataTableS3Support)) { // @@ -176,32 +170,5 @@ FirmwarePerformancePeiEntryPoint ( ASSERT_EFI_ERROR (Status); } =20 - // - // Normal boot - build Hob for SEC performance data. - // - Status =3D PeiServicesLocatePpi ( - &gPeiSecPerformancePpiGuid, - 0, - NULL, - (VOID **) &SecPerf - ); - if (!EFI_ERROR (Status)) { - Status =3D SecPerf->GetPerformance (PeiServices, SecPerf, &Performance= ); - } - if (!EFI_ERROR (Status)) { - BuildGuidDataHob ( - &gEfiFirmwarePerformanceGuid, - &Performance, - sizeof (FIRMWARE_SEC_PERFORMANCE) - ); - DEBUG ((EFI_D_INFO, "FPDT: SEC Performance Hob ResetEnd =3D %ld\n", Pe= rformance.ResetEnd)); - } else { - // - // SEC performance PPI is not installed or fail to get performance data - // from SEC Performance PPI. - // - DEBUG ((EFI_D_ERROR, "FPDT: WARNING: SEC Performance PPI not installed= or failed!\n")); - } - return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/Fi= rmwarePerformancePei.inf b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceD= ataTablePei/FirmwarePerformancePei.inf index 25049f832371..88cd0af8a1b2 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwareP= erformancePei.inf +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwareP= erformancePei.inf @@ -2,13 +2,11 @@ # Firmware Performance Pei Module. # # In S3 resume boot mode, it updates S3 Resume Performance Record in ACPI= Firmware Performance Data Table. -# In normal boot mode, it consumes SecPerformance PPI produced by SEC pha= se -# and build Hob to convey the SEC performance data to DXE phase. # # This module register report status code listener to collect performance= data # for S3 Resume Performance Record on S3 resume boot path. # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2017, 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 @@ -46,7 +44,6 @@ [LibraryClasses] PeiServicesLib BaseLib DebugLib - HobLib TimerLib BaseMemoryLib LockBoxLib @@ -54,13 +51,9 @@ [LibraryClasses] =20 [Ppis] gEfiPeiRscHandlerPpiGuid ## CONSUMES - gPeiSecPerformancePpiGuid ## SOMETIMES_CONSUMES =20 [Guids] ## SOMETIMES_CONSUMES ## UNDEFINED # RestoreLockBox - ## SOMETIMES_PRODUCES ## HOB - ## SOMETIMES_CONSUMES ## Variable:L"FirmwarePerformance" - gEfiFirmwarePerformanceGuid gFirmwarePerformanceS3PointerGuid ## SOMETIMES_CONSUMES ## U= NDEFINED # RestoreLockBox =20 [FeaturePcd] diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/Fi= rmwarePerformancePei.uni b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceD= ataTablePei/FirmwarePerformancePei.uni index 8e718c0c0126..3ae182c7d65e 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwareP= erformancePei.uni +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwareP= erformancePei.uni @@ -2,13 +2,11 @@ // Firmware Performance Pei Module. // // In S3 resume boot mode, it updates S3 Resume Performance Record in ACPI= Firmware Performance Data Table. -// In normal boot mode, it consumes SecPerformance PPI produced by SEC pha= se -// and build Hob to convey the SEC performance data to DXE phase. //=20 // This module register report status code listener to collect performance= data // for S3 Resume Performance Record on S3 resume boot path. // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2017, 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 @@ -23,5 +21,5 @@ =20 #string STR_MODULE_ABSTRACT #language en-US "Firmware Performa= nce Pei Module." =20 -#string STR_MODULE_DESCRIPTION #language en-US "In S3 resume boot= mode, it updates S3 Resume Performance Record in ACPI Firmware Performance= Data Table. In normal boot mode, it consumes SecPerformance PPI produced b= y SEC phase and builds a Hob to convey the SEC performance data to DXE phas= e. This module register report status code listener to collect performance = data for S3 Resume Performance Record on S3 resume boot path." +#string STR_MODULE_DESCRIPTION #language en-US "In S3 resume boot= mode, it updates S3 Resume Performance Record in ACPI Firmware Performance= Data Table. This module register report status code listener to collect pe= rformance data for S3 Resume Performance Record on S3 resume boot path." =20 --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel