]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain.h
updated Alias, Map, and Env functions per errata.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
index 6653240c0ecbcc300e5277349e56e666c95d6429..1d96cc43f8e3a4ffb55f1f966e290ee105fb3f44 100644 (file)
@@ -43,7 +43,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <IndustryStandard/PeImage.h>\r
 #include <Library/PeiServicesTablePointerLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
-#include <Library/PeiPiLib.h>\r
 #include <Guid/FirmwareFileSystem2.h>\r
 #include <Guid/AprioriFileName.h>\r
 \r
@@ -121,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
@@ -137,6 +136,9 @@ typedef struct{
   UINTN                              CurrentPeimFvCount;\r
   UINTN                              CurrentPeimCount;\r
   EFI_PEI_FILE_HANDLE                CurrentFileHandle;\r
+  BOOLEAN                            PeimNeedingDispatch;\r
+  BOOLEAN                            PeimDispatchOnThisPass;\r
+  BOOLEAN                            PeimDispatcherReenter;\r
   UINTN                              AllFvCount;\r
   EFI_PEI_FV_HANDLE                  AllFv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
   EFI_PEI_HOB_POINTERS               HobList;\r
@@ -144,14 +146,9 @@ typedef struct{
   BOOLEAN                            PeiMemoryInstalled;\r
   EFI_PHYSICAL_ADDRESS               StackBase;\r
   UINT64                             StackSize;\r
-  VOID                               *BottomOfCarHeap;\r
-  VOID                               *TopOfCarHeap;\r
   VOID                               *CpuIo;\r
   EFI_PEI_SECURITY2_PPI              *PrivateSecurityPpi;\r
   EFI_PEI_SERVICES                   ServiceTableShadow;\r
-  UINTN                              SizeOfTemporaryMemory;\r
-  UINTN                              SizeOfCacheAsRam;\r
-  VOID                               *MaxTopOfCarHeap;\r
   EFI_PEI_PPI_DESCRIPTOR             *XipLoadFile;\r
   EFI_PHYSICAL_ADDRESS               PhysicalMemoryBegin;\r
   UINT64                             PhysicalMemoryLength;\r
@@ -168,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
@@ -217,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
@@ -229,17 +224,14 @@ 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
-EFI_STATUS\r
+VOID\r
 EFIAPI\r
 PeiCore (\r
   IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreData,\r
-  IN CONST EFI_PEI_PPI_DESCRIPTOR      *PpList,\r
+  IN CONST EFI_PEI_PPI_DESCRIPTOR      *PpiList,\r
   IN VOID                              *Data\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // Dispatcher support functions\r
@@ -269,27 +261,20 @@ BOOLEAN
 PeimDispatchReadiness (\r
   IN EFI_PEI_SERVICES   **PeiServices,\r
   IN VOID               *DependencyExpression\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Conduct PEIM dispatch.\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     Pointer to the data structure containing SEC to PEI handoff data\r
   @param PrivateData     Pointer to the private data passed in from caller\r
 \r
-  @retval EFI_SUCCESS    Successfully dispatched PEIM.\r
-  @retval EFI_NOT_FOUND  The dispatch failed.\r
-\r
 **/\r
 VOID\r
 PeiDispatcher (\r
   IN CONST EFI_SEC_PEI_HAND_OFF  *SecCoreData,\r
   IN PEI_CORE_INSTANCE           *PrivateData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Initialize the Dispatcher's data members\r
@@ -297,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
@@ -307,8 +291,7 @@ InitializeDispatcherData (
   IN PEI_CORE_INSTANCE            *PrivateData,\r
   IN PEI_CORE_INSTANCE            *OldCoreData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   This routine parses the Dependency Expression, if available, and\r
@@ -317,10 +300,10 @@ InitializeDispatcherData (
 \r
   @param Private         PeiCore's private data structure\r
   @param FileHandle      PEIM's file handle\r
-  @param PeimCount       Peim count in all dispatched PEIMs.\r
+  @param PeimCount       The index of last dispatched PEIM.\r
 \r
-  @retval TRUE   Can be dispatched\r
-  @retval FALSE  Cannot be dispatched\r
+  @retval TRUE           Can be dispatched\r
+  @retval FALSE          Cannot be dispatched\r
 \r
 **/\r
 BOOLEAN\r
@@ -328,8 +311,7 @@ DepexSatisfied (
   IN PEI_CORE_INSTANCE          *Private,\r
   IN EFI_PEI_FILE_HANDLE        FileHandle,\r
   IN UINTN                      PeimCount\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // PPI support functions\r
@@ -347,17 +329,17 @@ VOID
 InitializePpiServices (\r
   IN PEI_CORE_INSTANCE   *PrivateData,\r
   IN PEI_CORE_INSTANCE   *OldCoreData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
-  Convert Ppi description and PpiData pointer in heap after temporary memory\r
-  is migrated to permenent memory.\r
-  \r
-  @param PrivateData         PeiCore's private data structure\r
-  @param OldCheckingBottom   The old checking bottom.\r
-  @param OldCheckingTop      The old checking top.\r
+  Migrate the Hob list from the temporary memory stack to PEI installed memory.\r
+\r
+  @param PrivateData         Pointer to PeiCore's private data structure.\r
+  @param OldCheckingBottom   Bottom of temporary memory range. All Ppi in this range\r
+                             will be fixup for PpiData and PpiDescriptor pointer.\r
+  @param OldCheckingTop      Top of temporary memory range. All Ppi in this range\r
+                             will be fixup for PpiData and PpiDescriptor.\r
   @param Fixup               The address difference between\r
                              the new Hob list and old Hob list.\r
 \r
@@ -368,19 +350,18 @@ ConvertPpiPointers (
   IN UINTN                   OldCheckingBottom,\r
   IN UINTN                   OldCheckingTop,\r
   IN INTN                    Fixup\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
-  Install PPI services.\r
+  Install PPI services. It is implementation of EFI_PEI_SERVICE.InstallPpi.\r
 \r
   @param PeiServices                An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param PpiList                    Pointer to ppi array that want to be installed.\r
 \r
   @retval EFI_SUCCESS               if all PPIs in PpiList are successfully installed.\r
   @retval EFI_INVALID_PARAMETER     if PpiList is NULL pointer\r
-  @retval EFI_INVALID_PARAMETER     if any PPI in PpiList is not valid\r
+                                    if any PPI in PpiList is not valid\r
   @retval EFI_OUT_OF_RESOURCES      if there is no more memory resource to install PPI\r
 \r
 **/\r
@@ -389,8 +370,7 @@ EFIAPI
 PeiInstallPpi (\r
   IN CONST EFI_PEI_SERVICES        **PeiServices,\r
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *PpiList\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -402,7 +382,7 @@ PeiInstallPpi (
 \r
   @retval EFI_SUCCESS           if the operation was successful\r
   @retval EFI_INVALID_PARAMETER if OldPpi or NewPpi is NULL\r
-  @retval EFI_INVALID_PARAMETER if NewPpi is not valid\r
+                                if NewPpi is not valid\r
   @retval EFI_NOT_FOUND         if the PPI was not in the database\r
 \r
 **/\r
@@ -412,8 +392,7 @@ PeiReInstallPpi (
   IN CONST EFI_PEI_SERVICES        **PeiServices,\r
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *OldPpi,\r
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *NewPpi\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -439,8 +418,7 @@ PeiLocatePpi (
   IN UINTN                       Instance,\r
   IN OUT EFI_PEI_PPI_DESCRIPTOR  **PpiDescriptor,\r
   IN OUT VOID                    **Ppi\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -460,8 +438,7 @@ EFIAPI
 PeiNotifyPpi (\r
   IN CONST EFI_PEI_SERVICES           **PeiServices,\r
   IN CONST EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyList\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -473,8 +450,7 @@ PeiNotifyPpi (
 VOID\r
 ProcessNotifyList (\r
   IN PEI_CORE_INSTANCE  *PrivateData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -496,8 +472,7 @@ DispatchNotify (
   IN INTN                InstallStopIndex,\r
   IN INTN                NotifyStartIndex,\r
   IN INTN                NotifyStopIndex\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // Boot mode support functions\r
@@ -516,9 +491,8 @@ EFI_STATUS
 EFIAPI\r
 PeiGetBootMode (\r
   IN CONST EFI_PEI_SERVICES  **PeiServices,\r
-  IN OUT EFI_BOOT_MODE *BootMode\r
-  )\r
-;\r
+  IN OUT   EFI_BOOT_MODE     *BootMode\r
+  );\r
 \r
 /**\r
   This service enables PEIMs to update the boot mode variable.\r
@@ -535,8 +509,7 @@ EFIAPI
 PeiSetBootMode (\r
   IN CONST EFI_PEI_SERVICES  **PeiServices,\r
   IN EFI_BOOT_MODE     BootMode\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // Security support functions\r
@@ -554,11 +527,10 @@ VOID
 InitializeSecurityServices (\r
   IN EFI_PEI_SERVICES  **PeiServices,\r
   IN PEI_CORE_INSTANCE *OldCoreData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Verify a Firmware volume\r
+  Verify a Firmware volume.\r
 \r
   @param CurrentFvAddress           Pointer to the current Firmware Volume under consideration\r
 \r
@@ -569,8 +541,7 @@ InitializeSecurityServices (
 EFI_STATUS\r
 VerifyFv (\r
   IN EFI_FIRMWARE_VOLUME_HEADER  *CurrentFvAddress\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -590,8 +561,7 @@ VerifyPeim (
   IN PEI_CORE_INSTANCE      *PrivateData,\r
   IN EFI_PEI_FV_HANDLE      VolumeHandle,\r
   IN EFI_PEI_FILE_HANDLE    FileHandle\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -611,8 +581,7 @@ EFIAPI
 PeiGetHobList (\r
   IN CONST EFI_PEI_SERVICES  **PeiServices,\r
   IN OUT VOID          **HobList\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Add a new HOB to the HOB List.\r
@@ -635,8 +604,7 @@ PeiCreateHob (
   IN UINT16            Type,\r
   IN UINT16            Length,\r
   IN OUT VOID          **Hob\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -654,8 +622,7 @@ PeiCoreBuildHobHandoffInfoTable (
   IN EFI_BOOT_MODE         BootMode,\r
   IN EFI_PHYSICAL_ADDRESS  MemoryBegin,\r
   IN UINT64                MemoryLength\r
-  )\r
-;\r
+  );\r
 \r
 \r
 //\r
@@ -684,8 +651,7 @@ PeiFfsFindNextFile (
   IN UINT8                       SearchType,\r
   IN EFI_PEI_FV_HANDLE           FwVolHeader,\r
   IN OUT EFI_PEI_FILE_HANDLE     *FileHeader\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Given the input file pointer, search for the next matching section in the\r
@@ -708,8 +674,7 @@ PeiFfsFindSectionData (
   IN EFI_SECTION_TYPE            SectionType,\r
   IN EFI_PEI_FILE_HANDLE         FfsFileHeader,\r
   IN OUT VOID                    **SectionData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   search the firmware volumes by index\r
@@ -728,8 +693,7 @@ PeiFvFindNextVolume (
   IN CONST EFI_PEI_SERVICES          **PeiServices,\r
   IN UINTN                           Instance,\r
   IN OUT EFI_PEI_FV_HANDLE           *FwVolHeader\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // Memory support functions\r
@@ -739,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
@@ -751,8 +714,7 @@ InitializeMemoryServices (
   IN PEI_CORE_INSTANCE           *PrivateData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF  *SecCoreData,\r
   IN PEI_CORE_INSTANCE           *OldCoreData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -772,8 +734,7 @@ PeiInstallPeiMemory (
   IN CONST EFI_PEI_SERVICES      **PeiServices,\r
   IN EFI_PHYSICAL_ADDRESS  MemoryBegin,\r
   IN UINT64                MemoryLength\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -800,12 +761,11 @@ PeiAllocatePages (
   IN EFI_MEMORY_TYPE            MemoryType,\r
   IN UINTN                      Pages,\r
   OUT EFI_PHYSICAL_ADDRESS      *Memory\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
-  Memory allocation service on the CAR.\r
+  Memory allocation service on the temporary memory.\r
 \r
 \r
   @param PeiServices        An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
@@ -823,8 +783,7 @@ PeiAllocatePool (
   IN CONST EFI_PEI_SERVICES           **PeiServices,\r
   IN UINTN                      Size,\r
   OUT VOID                      **Buffer\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -843,12 +802,11 @@ PeiAllocatePool (
 **/\r
 EFI_STATUS\r
 PeiLoadImage (\r
-  IN  EFI_PEI_SERVICES            **PeiServices,\r
+  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
   IN  EFI_PEI_FILE_HANDLE         FileHandle,\r
   OUT    EFI_PHYSICAL_ADDRESS     *EntryPoint,\r
   OUT    UINT32                   *AuthenticationState\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -875,8 +833,7 @@ PeiReportStatusCode (
   IN UINT32                   Instance,\r
   IN CONST EFI_GUID                 *CallerId,\r
   IN CONST EFI_STATUS_CODE_DATA     *Data OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -894,8 +851,7 @@ EFI_STATUS
 EFIAPI\r
 PeiResetSystem (\r
   IN CONST EFI_PEI_SERVICES   **PeiServices\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -910,8 +866,7 @@ VOID
 PeiInitializeFv (\r
   IN  PEI_CORE_INSTANCE           *PrivateData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Process Firmware Volum Information once FvInfoPPI install.\r
@@ -929,8 +884,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
   IN EFI_PEI_SERVICES              **PeiServices,\r
   IN EFI_PEI_NOTIFY_DESCRIPTOR     *NotifyDescriptor,\r
   IN VOID                          *Ppi\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -951,8 +905,7 @@ PeiFfsFindFileByName (
   IN  CONST EFI_GUID        *FileName,\r
   IN  EFI_PEI_FV_HANDLE     VolumeHandle,\r
   OUT EFI_PEI_FILE_HANDLE   *FileHandle\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -971,8 +924,7 @@ EFIAPI
 PeiFfsGetFileInfo (\r
   IN EFI_PEI_FILE_HANDLE  FileHandle,\r
   OUT EFI_FV_FILE_INFO    *FileInfo\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
@@ -989,8 +941,7 @@ EFIAPI
 PeiFfsGetVolumeInfo (\r
   IN EFI_PEI_FV_HANDLE  VolumeHandle,\r
   OUT EFI_FV_INFO       *VolumeInfo\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   This routine enable a PEIM to register itself to shadow when PEI Foundation\r
@@ -1007,8 +958,7 @@ EFI_STATUS
 EFIAPI\r
 PeiRegisterForShadow (\r
   IN EFI_PEI_FILE_HANDLE       FileHandle\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Given the input file pointer, search for the next matching file in the\r
@@ -1034,8 +984,7 @@ PeiFindFileEx (
   IN        EFI_FV_FILETYPE          SearchType,\r
   IN OUT    EFI_PEI_FILE_HANDLE      *FileHandle,\r
   IN OUT    EFI_PEI_FV_HANDLE        *AprioriFile  OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Initialize image service that install PeiLoadFilePpi.\r
@@ -1051,16 +1000,16 @@ VOID
 InitializeImageServices (\r
   IN  PEI_CORE_INSTANCE   *PrivateData,\r
   IN  PEI_CORE_INSTANCE   *OldCoreData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Get Fv image from the FV type file, then install FV INFO ppi, Build FV hob.\r
 \r
   @param PeiServices          An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
-  @param FileHandle           File handle of a Fv type file.\r
+  @param ParentFvHandle       Fv handle to parent Fv image that contain this Fv file.\r
+  @param ParentFvFileHandle   File handle of a Fv type file that contain this Fv image.\r
   @param AuthenticationState  Pointer to attestation authentication state of image.\r
-\r
+                              If return 0, means pass security checking.\r
 \r
   @retval EFI_NOT_FOUND       FV image can't be found.\r
   @retval EFI_SUCCESS         Successfully to process it.\r
@@ -1068,9 +1017,53 @@ InitializeImageServices (
 **/\r
 EFI_STATUS\r
 ProcessFvFile (\r
-  IN  EFI_PEI_SERVICES      **PeiServices,\r
-  IN  EFI_PEI_FILE_HANDLE   FvFileHandle,\r
-  OUT UINT32                *AuthenticationState\r
+  IN  CONST EFI_PEI_SERVICES **PeiServices,\r
+  IN  EFI_PEI_FV_HANDLE      ParentFvHandle,\r
+  IN  EFI_PEI_FILE_HANDLE    ParentFvFileHandle,\r
+  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