]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain.h
Source level security checked
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
index 8e0cedd9b48fda2d5f66cf0a3d84a752b72a04a5..e629b2368a40c93d7d0fdf194db9f8d37456a393 100644 (file)
@@ -120,7 +120,7 @@ typedef struct {
 } CACHE_SECTION_DATA;\r
 \r
 \r
-#define PEI_CORE_HANDLE_SIGNATURE  EFI_SIGNATURE_32('P','e','i','C')\r
+#define PEI_CORE_HANDLE_SIGNATURE  SIGNATURE_32('P','e','i','C')\r
 \r
 ///\r
 /// Pei Core private data structure instance\r
@@ -165,16 +165,15 @@ typedef struct{
 \r
 /**\r
   Function Pointer type for PeiCore function.\r
-  @param SecCoreData     Points to a data structure containing information about the PEI core's operating\r
-                         environment, such as the size and location of temporary RAM, the stack location and\r
-                         the BFV location.\r
+  @param SecCoreData     Points to a data structure containing SEC to PEI handoff data, such as the size \r
+                         and location of temporary RAM, the stack location and the BFV location.\r
   @param PpiList         Points to a list of one or more PPI descriptors to be installed initially by the PEI core.\r
                          An empty PPI list consists of a single descriptor with the end-tag\r
                          EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization\r
                          phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such\r
                          that both the PEI Foundation and any modules can leverage the associated service\r
                          calls and/or code in these early PPIs\r
-  @param Data            Pointer to old core data that is used to initialize the\r
+  @param OldCoreData     Pointer to old core data that is used to initialize the\r
                          core's data areas.\r
 **/\r
 typedef\r
@@ -214,9 +213,8 @@ typedef struct {
   with the old core data.\r
 \r
 \r
-  @param SecCoreData     Points to a data structure containing information about the PEI core's operating\r
-                         environment, such as the size and location of temporary RAM, the stack location and\r
-                         the BFV location.\r
+  @param SecCoreData     Points to a data structure containing SEC to PEI handoff data, such as the size \r
+                         and location of temporary RAM, the stack location and the BFV location.\r
   @param PpiList         Points to a list of one or more PPI descriptors to be installed initially by the PEI core.\r
                          An empty PPI list consists of a single descriptor with the end-tag\r
                          EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization\r
@@ -226,8 +224,6 @@ typedef struct {
   @param Data            Pointer to old core data that is used to initialize the\r
                          core's data areas.\r
 \r
-  @retval EFI_NOT_FOUND  Never reach\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -286,9 +282,8 @@ PeiDispatcher (
   @param PrivateData     PeiCore's private data structure\r
   @param OldCoreData     Old data from SecCore\r
                          NULL if being run in non-permament memory mode.\r
-  @param SecCoreData     Points to a data structure containing information about the PEI core's operating\r
-                         environment, such as the size and location of temporary RAM, the stack location and\r
-                         the BFV location.\r
+  @param SecCoreData     Points to a data structure containing SEC to PEI handoff data, such as the size\r
+                         and location of temporary RAM, the stack location and the BFV location.\r
 \r
 **/\r
 VOID\r
@@ -708,9 +703,8 @@ PeiFvFindNextVolume (
   Initialize the memory services.\r
 \r
   @param PrivateData     PeiCore's private data structure\r
-  @param SecCoreData     Points to a data structure containing information about the PEI core's operating\r
-                         environment, such as the size and location of temporary RAM, the stack location and\r
-                         the BFV location.\r
+  @param SecCoreData     Points to a data structure containing SEC to PEI handoff data, such as the size \r
+                         and location of temporary RAM, the stack location and the BFV location.\r
   @param OldCoreData     Pointer to the PEI Core data.\r
                          NULL if being run in non-permament memory mode.\r
 \r
@@ -1027,4 +1021,47 @@ ProcessFvFile (
   OUT UINT32                 *AuthenticationState\r
   );\r
 \r
+/**\r
+  The wrapper function of PeiLoadImageLoadImage().\r
+\r
+  @param This                 Pointer to EFI_PEI_LOAD_FILE_PPI.\r
+  @param FileHandle           Pointer to the FFS file header of the image.\r
+  @param ImageAddressArg      Pointer to PE/TE image.\r
+  @param ImageSizeArg         Size of PE/TE image.\r
+  @param EntryPoint           Pointer to entry point of specified image file for output.\r
+  @param AuthenticationState  Pointer to attestation authentication state of image.\r
+\r
+  @return Status of PeiLoadImageLoadImage().\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiLoadImageLoadImageWrapper (\r
+  IN     CONST EFI_PEI_LOAD_FILE_PPI  *This,\r
+  IN     EFI_PEI_FILE_HANDLE          FileHandle,\r
+  OUT    EFI_PHYSICAL_ADDRESS         *ImageAddressArg,  OPTIONAL\r
+  OUT    UINT64                       *ImageSizeArg,     OPTIONAL\r
+  OUT    EFI_PHYSICAL_ADDRESS         *EntryPoint,\r
+  OUT    UINT32                       *AuthenticationState\r
+  );\r
+\r
+/**\r
+\r
+  Provide a callback for when the security PPI is installed.\r
+\r
+  @param PeiServices        An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param NotifyDescriptor   The descriptor for the notification event.\r
+  @param Ppi                Pointer to the PPI in question.\r
+\r
+  @return Always success\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SecurityPpiNotifyCallback (\r
+  IN EFI_PEI_SERVICES           **PeiServices,\r
+  IN EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyDescriptor,\r
+  IN VOID                       *Ppi\r
+  );\r
+\r
 #endif\r