]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/SecCore/SecMain.h
UefiCpuPkg/CpuDxe: Enable protection for newly added page table
[mirror_edk2.git] / UefiCpuPkg / SecCore / SecMain.h
index 05175d299d6d85cf41d18339b9c81d5383a6ca64..46c7d41c6e3ef0cc6f3c5f9130ae5353cb3f5cdc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Master header file for SecCore.\r
 \r
-  Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 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
 #include <PiPei.h>\r
 \r
 #include <Ppi/SecPlatformInformation.h>\r
+#include <Ppi/SecPlatformInformation2.h>\r
 #include <Ppi/TemporaryRamDone.h>\r
+#include <Ppi/SecPerformance.h>\r
+\r
+#include <Guid/FirmwarePerformance.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -31,7 +35,9 @@
 #include <Library/DebugAgentLib.h>\r
 #include <Library/CpuExceptionHandlerLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
-\r
+#include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/HobLib.h>\r
+#include <Library/PeiServicesLib.h>\r
 \r
 #define SEC_IDT_ENTRY_COUNT  34\r
 \r
@@ -106,4 +112,72 @@ ProcessLibraryConstructorList (
   VOID\r
   );\r
 \r
+/**\r
+  Implementation of the PlatformInformation service in EFI_SEC_PLATFORM_INFORMATION_PPI.\r
+\r
+  @param  PeiServices                Pointer to the PEI Services Table.\r
+  @param  StructureSize              Pointer to the variable describing size of the input buffer.\r
+  @param  PlatformInformationRecord  Pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD.\r
+\r
+  @retval EFI_SUCCESS                The data was successfully returned.\r
+  @retval EFI_BUFFER_TOO_SMALL       The buffer was too small.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SecPlatformInformationBist (\r
+  IN CONST EFI_PEI_SERVICES                  **PeiServices,\r
+  IN OUT UINT64                              *StructureSize,\r
+     OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord\r
+  );\r
+\r
+/**\r
+  Implementation of the PlatformInformation2 service in EFI_SEC_PLATFORM_INFORMATION2_PPI.\r
+\r
+  @param  PeiServices                The pointer to the PEI Services Table.\r
+  @param  StructureSize              The pointer to the variable describing size of the input buffer.\r
+  @param  PlatformInformationRecord2 The pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD2.\r
+\r
+  @retval EFI_SUCCESS                The data was successfully returned.\r
+  @retval EFI_BUFFER_TOO_SMALL       The buffer was too small. The current buffer size needed to\r
+                                     hold the record is returned in StructureSize.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SecPlatformInformation2Bist (\r
+  IN CONST EFI_PEI_SERVICES                   **PeiServices,\r
+  IN OUT UINT64                               *StructureSize,\r
+     OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2 *PlatformInformationRecord2\r
+  );\r
+\r
+/**\r
+  Republish SecPlatformInformationPpi/SecPlatformInformation2Ppi.\r
+\r
+**/\r
+VOID\r
+RepublishSecPlatformInformationPpi (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Entry point of the notification callback function itself within the PEIM.\r
+  It is to get SEC performance data and build HOB to convey the SEC performance\r
+  data to DXE phase.\r
+\r
+  @param  PeiServices      Indirect reference to the PEI Services Table.\r
+  @param  NotifyDescriptor Address of the notification descriptor data structure.\r
+  @param  Ppi              Address of the PPI that was installed.\r
+\r
+  @return Status of the notification.\r
+          The status code returned from this function is ignored.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SecPerformancePpiCallBack (\r
+  IN EFI_PEI_SERVICES           **PeiServices,\r
+  IN EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyDescriptor,\r
+  IN VOID                       *Ppi\r
+  );\r
+\r
 #endif\r