]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain.h
Correct comments.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
index 647edae4167431bf1462dfe0604968091f0ab475..6653240c0ecbcc300e5277349e56e666c95d6429 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definition of Pei Core Structures and Services\r
   \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation\r
 All rights reserved. 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
@@ -47,6 +47,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/FirmwareFileSystem2.h>\r
 #include <Guid/AprioriFileName.h>\r
 \r
+///\r
+/// It is an FFS type extension used for PeiFindFileEx. It indicates current\r
+/// Ffs searching is for all PEIMs can be dispatched by PeiCore.\r
+///\r
 #define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE   0xff\r
 \r
 ///\r
@@ -162,9 +166,23 @@ typedef struct{
 #define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \\r
   CR(a, PEI_CORE_INSTANCE, PS, PEI_CORE_HANDLE_SIGNATURE)\r
 \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 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
+                         core's data areas.\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *PEI_CORE_ENTRY_POINT)(\r
+(EFIAPI *PEICORE_FUNCTION_POINTER)(\r
   IN CONST  EFI_SEC_PEI_HAND_OFF    *SecCoreData,\r
   IN CONST  EFI_PEI_PPI_DESCRIPTOR  *PpiList,\r
   IN PEI_CORE_INSTANCE              *OldCoreData\r
@@ -174,7 +192,7 @@ EFI_STATUS
 /// Union of temporarily used function pointers (to save stack space)\r
 ///\r
 typedef union {\r
-  PEI_CORE_ENTRY_POINT         PeiCore;\r
+  PEICORE_FUNCTION_POINTER     PeiCore;\r
   EFI_PEIM_ENTRY_POINT2        PeimEntry;\r
   EFI_PEIM_NOTIFY_ENTRY_POINT  PeimNotifyEntry;\r
   EFI_DXE_IPL_PPI              *DxeIpl;\r
@@ -183,8 +201,6 @@ typedef union {
   VOID                         *Raw;\r
 } PEI_CORE_TEMP_POINTERS;\r
 \r
-\r
-\r
 typedef struct {\r
   CONST EFI_SEC_PEI_HAND_OFF    *SecCoreData;\r
   EFI_PEI_PPI_DESCRIPTOR        *PpiList;\r
@@ -336,9 +352,10 @@ InitializePpiServices (
 \r
 /**\r
 \r
-  Migrate the Hob list from the CAR stack to PEI installed memory.\r
-\r
-  @param PeiServices         The PEI core services table.\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
   @param Fixup               The address difference between\r
@@ -358,13 +375,13 @@ ConvertPpiPointers (
 \r
   Install PPI services.\r
 \r
-  @param PeiServices     - Pointer to the PEI Service Table\r
-  @param PpiList         - Pointer to a list of PEI PPI Descriptors.\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
-  @retval EFI_OUT_OF_RESOURCES    - if there is no more memory resource to install PPI\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
+  @retval EFI_OUT_OF_RESOURCES      if there is no more memory resource to install PPI\r
 \r
 **/\r
 EFI_STATUS\r
@@ -653,8 +670,8 @@ PeiCoreBuildHobHandoffInfoTable (
   @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param SearchType      Filter to find only files of this type.\r
                          Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
-  @param VolumeHandle    Pointer to the FV header of the volume to search.\r
-  @param FileHandle      Pointer to the current file from which to begin searching.\r
+  @param FwVolHeader     Pointer to the FV header of the volume to search.\r
+  @param FileHeader      Pointer to the current file from which to begin searching.\r
                          This pointer will be updated upon return to reflect the file found.\r
   @retval EFI_NOT_FOUND  No files matching the search criteria were found\r
   @retval EFI_SUCCESS    Success to find next file in given volume\r
@@ -674,10 +691,9 @@ PeiFfsFindNextFile (
   Given the input file pointer, search for the next matching section in the\r
   FFS volume.\r
 \r
-\r
   @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param SectionType     Filter to find only sections of this type.\r
-  @param FileHandle      Pointer to the current file to search.\r
+  @param FfsFileHeader   Pointer to the current file to search.\r
   @param SectionData     Pointer to the Section matching SectionType in FfsFileHeader.\r
                          NULL if section not found\r
 \r
@@ -698,18 +714,18 @@ PeiFfsFindSectionData (
 /**\r
   search the firmware volumes by index\r
 \r
-  @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
-  @param Instance        Instance of FV to find\r
-  @param VolumeHandle    Pointer to found Volume.\r
+  @param PeiServices            An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param Instance               Instance of FV to find\r
+  @param FwVolHeader            Pointer to found Volume.\r
 \r
-  @retval EFI_INVALID_PARAMETER  FwVolHeader is NULL\r
-  @retval EFI_SUCCESS            Firmware volume instance successfully found.\r
+  @retval EFI_INVALID_PARAMETER FwVolHeader is NULL\r
+  @retval EFI_SUCCESS           Firmware volume instance successfully found.\r
 \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFvFindNextVolume (\r
-  IN CONST EFI_PEI_SERVICES                **PeiServices,\r
+  IN CONST EFI_PEI_SERVICES          **PeiServices,\r
   IN UINTN                           Instance,\r
   IN OUT EFI_PEI_FV_HANDLE           *FwVolHeader\r
   )\r
@@ -722,7 +738,6 @@ PeiFvFindNextVolume (
 \r
   Initialize the memory services.\r
 \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
@@ -921,13 +936,13 @@ FirmwareVolmeInfoPpiNotifyCallback (
 \r
   Given the input VolumeHandle, search for the next matching name file.\r
 \r
-\r
   @param FileName        File name to search.\r
   @param VolumeHandle    The current FV to search.\r
   @param FileHandle      Pointer to the file matching name in VolumeHandle.\r
                          NULL if file not found\r
 \r
-  @return EFI_STATUS\r
+  @retval EFI_NOT_FOUND  No files matching the search criteria were found\r
+  @retval EFI_SUCCESS    Success to search given file\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1023,12 +1038,13 @@ PeiFindFileEx (
 ;\r
 \r
 /**\r
+  Initialize image service that install PeiLoadFilePpi.\r
 \r
-  Install Pei Load File PPI.\r
-\r
-\r
-  @param PrivateData        Pointer to PEI_CORE_INSTANCE.\r
-  @param OldCoreData        Pointer to PEI_CORE_INSTANCE.\r
+  @param PrivateData     Pointer to PeiCore's private data structure PEI_CORE_INSTANCE.\r
+  @param OldCoreData     Pointer to Old PeiCore's private data.\r
+                         If NULL, PeiCore is entered at first time, stack/heap in temporary memory.\r
+                         If not NULL, PeiCore is entered at second time, stack/heap has been moved\r
+                         to permenent memory.\r
 \r
 **/\r
 VOID\r