]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg FirmwarePerfPei: Remove SEC performance data getting code
authorStar Zeng <star.zeng@intel.com>
Fri, 28 Jul 2017 02:05:19 +0000 (10:05 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 1 Aug 2017 09:49:22 +0000 (17:49 +0800)
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 <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.inf
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.uni

index 396462e7aa975822effc1075cec85f3b14e6229b..e4800b7bdd8ab18f3d96b5ed9c33420bcc15821d 100644 (file)
@@ -1,13 +1,11 @@
 /** @file\r
   This module updates S3 Resume Performance Record in ACPI Firmware Performance\r
-  Data Table in S3 resume boot mode. In normal boot mode, this module consumes\r
-  SecPerformance PPI produced by SEC phase and build Hob to convey the SEC\r
-  performance data to DXE phase.\r
+  Data Table in S3 resume boot mode.\r
 \r
   This module register report status code listener to collect performance data\r
   for S3 Resume Performance Record on S3 resume boot path.\r
 \r
-  Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,7 +19,6 @@
 #include <PiPei.h>\r
 \r
 #include <Ppi/ReportStatusCodeHandler.h>\r
-#include <Ppi/SecPerformance.h>\r
 \r
 #include <Guid/FirmwarePerformance.h>\r
 \r
@@ -31,7 +28,6 @@
 #include <Library/TimerLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/LockBoxLib.h>\r
-#include <Library/HobLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
 /**\r
@@ -79,7 +75,7 @@ FpdtStatusCodeListenerPei (
   // Check whether status code is what we are interested in.\r
   //\r
   if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) != EFI_PROGRESS_CODE) ||\r
-         (Value != (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_OS_WAKE))) {\r
+      (Value != (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_OS_WAKE))) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -157,8 +153,6 @@ FirmwarePerformancePeiEntryPoint (
 {\r
   EFI_STATUS               Status;\r
   EFI_PEI_RSC_HANDLER_PPI  *RscHandler;\r
-  PEI_SEC_PERFORMANCE_PPI  *SecPerf;\r
-  FIRMWARE_SEC_PERFORMANCE Performance;\r
 \r
   if (FeaturePcdGet (PcdFirmwarePerformanceDataTableS3Support)) {\r
     //\r
@@ -176,32 +170,5 @@ FirmwarePerformancePeiEntryPoint (
     ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
-  //\r
-  // Normal boot - build Hob for SEC performance data.\r
-  //\r
-  Status = PeiServicesLocatePpi (\r
-             &gPeiSecPerformancePpiGuid,\r
-             0,\r
-             NULL,\r
-             (VOID **) &SecPerf\r
-             );\r
-  if (!EFI_ERROR (Status)) {\r
-    Status = SecPerf->GetPerformance (PeiServices, SecPerf, &Performance);\r
-  }\r
-  if (!EFI_ERROR (Status)) {\r
-    BuildGuidDataHob (\r
-      &gEfiFirmwarePerformanceGuid,\r
-      &Performance,\r
-      sizeof (FIRMWARE_SEC_PERFORMANCE)\r
-    );\r
-    DEBUG ((EFI_D_INFO, "FPDT: SEC Performance Hob ResetEnd = %ld\n", Performance.ResetEnd));\r
-  } else {\r
-    //\r
-    // SEC performance PPI is not installed or fail to get performance data\r
-    // from SEC Performance PPI.\r
-    //\r
-    DEBUG ((EFI_D_ERROR, "FPDT: WARNING: SEC Performance PPI not installed or failed!\n"));\r
-  }\r
-\r
   return EFI_SUCCESS;\r
 }\r
index 25049f832371968804ee0c8e83b897edc8740c24..53b45a2017f3eb367b968c3c64ef4d51aece7515 100644 (file)
@@ -2,13 +2,11 @@
 #  Firmware Performance Pei Module.\r
 #\r
 #  In S3 resume boot mode, it updates S3 Resume Performance Record in ACPI Firmware Performance Data Table.\r
-#  In normal boot mode, it consumes SecPerformance PPI produced by SEC phase\r
-#  and build Hob to convey the SEC performance data to DXE phase.\r
 #\r
 #  This module register report status code listener to collect performance data\r
 #  for S3 Resume Performance Record on S3 resume boot path.\r
 #\r
-#  Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution.  The full text of the license may be found at\r
@@ -46,7 +44,6 @@
   PeiServicesLib\r
   BaseLib\r
   DebugLib\r
-  HobLib\r
   TimerLib\r
   BaseMemoryLib\r
   LockBoxLib\r
 \r
 [Ppis]\r
   gEfiPeiRscHandlerPpiGuid                      ## CONSUMES\r
-  gPeiSecPerformancePpiGuid                     ## SOMETIMES_CONSUMES\r
 \r
 [Guids]\r
   ## SOMETIMES_CONSUMES   ## UNDEFINED # RestoreLockBox\r
-  ## SOMETIMES_PRODUCES   ## HOB\r
-  ## SOMETIMES_CONSUMES   ## Variable:L"FirmwarePerformance"\r
   gEfiFirmwarePerformanceGuid\r
   gFirmwarePerformanceS3PointerGuid             ## SOMETIMES_CONSUMES ## UNDEFINED # RestoreLockBox\r
 \r
index 8e718c0c0126c1c9d1bd96bf8d9b03bdece8bf65..3ae182c7d65e9d64fbe291867c9510332b9b4d9d 100644 (file)
@@ -2,13 +2,11 @@
 // Firmware Performance Pei Module.\r
 //\r
 // In S3 resume boot mode, it updates S3 Resume Performance Record in ACPI Firmware Performance Data Table.\r
-// In normal boot mode, it consumes SecPerformance PPI produced by SEC phase\r
-// and build Hob to convey the SEC performance data to DXE phase.\r
 // \r
 // This module register report status code listener to collect performance data\r
 // for S3 Resume Performance Record on S3 resume boot path.\r
 //\r
-// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -23,5 +21,5 @@
 \r
 #string STR_MODULE_ABSTRACT             #language en-US "Firmware Performance Pei Module."\r
 \r
-#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 by SEC phase and builds a 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."\r
+#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 performance data for S3 Resume Performance Record on S3 resume boot path."\r
 \r