]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/SecGetPerformance.c
edk2: Remove packages moved to edk2-platforms
[mirror_edk2.git] / Vlv2TbltDevicePkg / FspSupport / Library / SecFspPlatformSecLibVlv2 / SecGetPerformance.c
diff --git a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/SecGetPerformance.c b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/SecGetPerformance.c
deleted file mode 100644 (file)
index c5c22a2..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/** @file\r
-\r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include <PiPei.h>\r
-\r
-#include <Ppi/SecPerformance.h>\r
-#include <Ppi/TopOfTemporaryRam.h>\r
-\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/TimerLib.h>\r
-#include <Library/DebugLib.h>\r
-\r
-/**\r
-  This interface conveys performance information out of the Security (SEC) phase into PEI.\r
-\r
-  This service is published by the SEC phase. The SEC phase handoff has an optional\r
-  EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed from SEC into the\r
-  PEI Foundation. As such, if the platform supports collecting performance data in SEC,\r
-  this information is encapsulated into the data structure abstracted by this service.\r
-  This information is collected for the boot-strap processor (BSP) on IA-32.\r
-\r
-  @param[in]  PeiServices  The pointer to the PEI Services Table.\r
-  @param[in]  This         The pointer to this instance of the PEI_SEC_PERFORMANCE_PPI.\r
-  @param[out] Performance  The pointer to performance data collected in SEC phase.\r
-\r
-  @retval EFI_SUCCESS  The data was successfully returned.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-SecGetPerformance (\r
-  IN CONST EFI_PEI_SERVICES          **PeiServices,\r
-  IN       PEI_SEC_PERFORMANCE_PPI   *This,\r
-  OUT      FIRMWARE_SEC_PERFORMANCE  *Performance\r
-  )\r
-{\r
-  UINT32      Size;\r
-  UINT32      Count;\r
-  UINT32      TopOfTemporaryRam;\r
-  UINT64      Ticker;\r
-  VOID        *TopOfTemporaryRamPpi;\r
-  EFI_STATUS  Status;\r
-\r
-  DEBUG ((DEBUG_INFO, "SecGetPerformance\n"));\r
-\r
-  Status = (*PeiServices)->LocatePpi (\r
-                             PeiServices,\r
-                             &gTopOfTemporaryRamPpiGuid,\r
-                             0,\r
-                             NULL,\r
-                             (VOID **) &TopOfTemporaryRamPpi\r
-                             );\r
-  if (EFI_ERROR (Status)) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  //\r
-  // |--------------| <- TopOfTemporaryRam\r
-  // |Number of BSPs|\r
-  // |--------------|\r
-  // |     BIST     |\r
-  // |--------------|\r
-  // |     ....     |\r
-  // |--------------|\r
-  // |  TSC[63:32]  |\r
-  // |--------------|\r
-  // |  TSC[31:00]  |\r
-  // |--------------|\r
-  //\r
-  TopOfTemporaryRam = (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof(UINT32);\r
-  TopOfTemporaryRam -= sizeof(UINT32) * 2;\r
-  Count             = *(UINT32 *) (UINTN) (TopOfTemporaryRam - sizeof (UINT32));\r
-  Size              = Count * sizeof (UINT64);\r
-\r
-  Ticker = *(UINT64 *) (UINTN) (TopOfTemporaryRam - sizeof (UINT32) - Size - sizeof (UINT32) * 2);\r
-  Performance->ResetEnd = GetTimeInNanoSecond (Ticker);\r
-\r
-  return EFI_SUCCESS;\r
-}\r