]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/SaveSecContext.c
edk2: Remove packages moved to edk2-platforms
[mirror_edk2.git] / Vlv2TbltDevicePkg / FspSupport / Library / SecFspPlatformSecLibVlv2 / SaveSecContext.c
diff --git a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/SaveSecContext.c b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/SaveSecContext.c
deleted file mode 100644 (file)
index 382e617..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/** @file\r
-  This PEIM will parse the hoblist from fsp and report them into pei core.\r
-  This file contains the main entrypoint of the PEIM.\r
-\r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-\r
-#include <PiPei.h>\r
-#include <Library/DebugLib.h>\r
-\r
-#include <Ppi/TopOfTemporaryRam.h>\r
-#include <Ppi/SecPlatformInformation.h>\r
-\r
-/**\r
-  Save BIST value before call FspInit.\r
-\r
-  @param Bist   BIST value.\r
-**/\r
-VOID\r
-AsmSaveBistValue (\r
-  IN UINT32  Bist\r
-  );\r
-\r
-/**\r
-  Save Ticker value before call FspInit.\r
-\r
-  @param Ticker   Ticker value.\r
-**/\r
-VOID\r
-AsmSaveTickerValue (\r
-  IN UINT64  Ticker\r
-  );\r
-\r
-/**\r
-  Save SEC context before call FspInit.\r
-\r
-  @param PeiServices  Pointer to PEI Services Table.\r
-**/\r
-VOID\r
-EFIAPI\r
-SaveSecContext (\r
-  IN CONST EFI_PEI_SERVICES                     **PeiServices\r
-  )\r
-{\r
-  UINT32      *Bist;\r
-  UINT64      *Ticker;\r
-  UINT32      Size;\r
-  UINT32      Count;\r
-  UINT32      TopOfTemporaryRam;\r
-  VOID        *TopOfTemporaryRamPpi;\r
-  EFI_STATUS  Status;\r
-\r
-  DEBUG ((DEBUG_INFO, "SaveSecContext - 0x%x\n", PeiServices));\r
-\r
-  Status = (*PeiServices)->LocatePpi (\r
-                             PeiServices,\r
-                             &gTopOfTemporaryRamPpiGuid,\r
-                             0,\r
-                             NULL,\r
-                             (VOID **) &TopOfTemporaryRamPpi\r
-                             );\r
-  if (EFI_ERROR (Status)) {\r
-    return ;\r
-  }\r
-\r
-  DEBUG ((DEBUG_INFO, "TopOfTemporaryRamPpi - 0x%x\n", TopOfTemporaryRamPpi));\r
-\r
-  //\r
-  // The entries of BIST information, together with the number of them,\r
-  // reside in the bottom of stack, left untouched by normal stack operation.\r
-  // This routine copies the BIST information to the buffer pointed by\r
-  // PlatformInformationRecord for output.\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
-\r
-  TopOfTemporaryRam = (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof(UINT32);\r
-  TopOfTemporaryRam -= sizeof(UINT32) * 2;\r
-  DEBUG ((DEBUG_INFO, "TopOfTemporaryRam - 0x%x\n", TopOfTemporaryRam));\r
-  Count             = *(UINT32 *)(UINTN)(TopOfTemporaryRam - sizeof(UINT32));\r
-  DEBUG ((DEBUG_INFO, "Count - 0x%x\n", Count));\r
-  Size              = Count * sizeof (IA32_HANDOFF_STATUS);\r
-  DEBUG ((DEBUG_INFO, "Size - 0x%x\n", Size));\r
-\r
-  Bist   = (UINT32 *)(UINTN)(TopOfTemporaryRam - sizeof(UINT32) - Size);\r
-  DEBUG ((DEBUG_INFO, "Bist - 0x%x\n", *Bist));\r
-  Ticker = (UINT64 *)(UINTN)(TopOfTemporaryRam - sizeof(UINT32) - Size - sizeof(UINT64));\r
-  DEBUG ((DEBUG_INFO, "Ticker - 0x%lx\n", *Ticker));\r
-\r
-  //\r
-  // Just need record BSP\r
-  //\r
-  AsmSaveBistValue (*Bist);\r
-  AsmSaveTickerValue (*Ticker);\r
-}\r