]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain.h
Correct comments.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
index 7f7ac196d60b3caf0c159905586240e1219b8158..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
@@ -58,12 +62,34 @@ typedef union {
   VOID                        *Raw;\r
 } PEI_PPI_LIST_POINTERS;\r
 \r
+///\r
+/// PPI database structure which contains two link: PpiList and NotifyList. PpiList\r
+/// is in head of PpiListPtrs array and notify is in end of PpiListPtrs.\r
+///\r
 typedef struct {\r
+  ///\r
+  /// index of end of PpiList link list.\r
+  ///\r
   INTN                    PpiListEnd;\r
+  ///\r
+  /// index of end of notify link list.\r
+  ///\r
   INTN                    NotifyListEnd;\r
+  ///\r
+  /// index of the dispatched notify list.\r
+  ///\r
   INTN                    DispatchListEnd;\r
+  ///\r
+  /// index of last installed Ppi description in PpiList link list.\r
+  ///\r
   INTN                    LastDispatchedInstall;\r
+  ///\r
+  /// index of last dispatched notify in Notify link list.\r
+  /// \r
   INTN                    LastDispatchedNotify;\r
+  ///\r
+  /// Ppi database.\r
+  ///\r
   PEI_PPI_LIST_POINTERS   PpiListPtrs[FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)];\r
 } PEI_PPI_DATABASE;\r
 \r
@@ -94,12 +120,12 @@ typedef struct {
   UINTN                               SectionIndex;\r
 } CACHE_SECTION_DATA;\r
 \r
-//\r
-// Pei Core private data structure instance\r
-//\r
 \r
 #define PEI_CORE_HANDLE_SIGNATURE  EFI_SIGNATURE_32('P','e','i','C')\r
 \r
+///\r
+/// Pei Core private data structure instance\r
+///\r
 typedef struct{\r
   UINTN                              Signature;\r
   EFI_PEI_SERVICES                   *PS;     // Point to ServiceTableShadow\r
@@ -134,16 +160,29 @@ typedef struct{
   CACHE_SECTION_DATA                 CacheSection;\r
 } PEI_CORE_INSTANCE;\r
 \r
-//\r
-// Pei Core Instance Data Macros\r
-//\r
-\r
+///\r
+/// Pei Core Instance Data Macros\r
+///\r
 #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
@@ -153,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
@@ -162,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
@@ -218,7 +255,7 @@ PeiCore (
   operation types (AND, OR).\r
 \r
 \r
-  @param PeiServices            Calling context.\r
+  @param PeiServices            An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param DependencyExpression   Pointer to a dependency expression.  The Grammar adheres to\r
                                 the BNF described above and is stored in postfix notation.\r
 \r
@@ -241,9 +278,7 @@ PeimDispatchReadiness (
   @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
-                         PrivateData          - Pointer to the private data passed in from caller\r
-                         DispatchData         - Pointer to PEI_CORE_DISPATCH_DATA data.\r
-  @param Private         EDES_TODO: Add parameter description\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
@@ -266,8 +301,6 @@ PeiDispatcher (
                          environment, such as the size and location of temporary RAM, the stack location and\r
                          the BFV location.\r
 \r
-  @return None.\r
-\r
 **/\r
 VOID\r
 InitializeDispatcherData (\r
@@ -305,7 +338,6 @@ DepexSatisfied (
 \r
   Initialize PPI services.\r
 \r
-\r
   @param PrivateData     Pointer to the PEI Core data.\r
   @param OldCoreData     Pointer to old PEI Core data. \r
                          NULL if being run in non-permament memory mode.\r
@@ -320,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
@@ -331,10 +364,10 @@ InitializePpiServices (
 **/\r
 VOID\r
 ConvertPpiPointers (\r
-  IN CONST EFI_PEI_SERVICES        **PeiServices,\r
-  IN UINTN                         OldCheckingBottom,\r
-  IN UINTN                         OldCheckingTop,\r
-  IN UINTN                         Fixup\r
+  IN PEI_CORE_INSTANCE       *PrivateData,\r
+  IN UINTN                   OldCheckingBottom,\r
+  IN UINTN                   OldCheckingTop,\r
+  IN INTN                    Fixup\r
   )\r
 ;\r
 \r
@@ -342,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
@@ -363,14 +396,14 @@ PeiInstallPpi (
 \r
   Re-Install PPI services.\r
 \r
-  @param PeiServices     - Pointer to the PEI Service Table\r
-  @param OldPpi          - Pointer to the old PEI PPI Descriptors.\r
-  @param NewPpi          - Pointer to the new PEI PPI Descriptors.\r
+  @param PeiServices            An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param OldPpi                 Pointer to the old PEI PPI Descriptors.\r
+  @param NewPpi                 Pointer to the new PEI PPI Descriptors.\r
 \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
-  @retval EFI_NOT_FOUND         if the PPI was not in the database\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
+  @retval EFI_NOT_FOUND         if the PPI was not in the database\r
 \r
 **/\r
 EFI_STATUS\r
@@ -387,12 +420,12 @@ PeiReInstallPpi (
   Locate a given named PPI.\r
 \r
 \r
-  @param PeiServices     - Pointer to the PEI Service Table\r
-  @param Guid            Pointer to GUID of the PPI.\r
-  @param Instance        Instance Number to discover.\r
-  @param PpiDescriptor   Pointer to reference the found descriptor. If not NULL,\r
+  @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param Guid            Pointer to GUID of the PPI.\r
+  @param Instance        Instance Number to discover.\r
+  @param PpiDescriptor   Pointer to reference the found descriptor. If not NULL,\r
                          returns a pointer to the descriptor (includes flags, etc)\r
-  @param Ppi             Pointer to reference the found PPI\r
+  @param Ppi             Pointer to reference the found PPI\r
 \r
   @retval EFI_SUCCESS   if the PPI is in the database\r
   @retval EFI_NOT_FOUND if the PPI is not in the database\r
@@ -401,8 +434,8 @@ PeiReInstallPpi (
 EFI_STATUS\r
 EFIAPI\r
 PeiLocatePpi (\r
-  IN CONST EFI_PEI_SERVICES            **PeiServices,\r
-  IN CONST EFI_GUID                    *Guid,\r
+  IN CONST EFI_PEI_SERVICES      **PeiServices,\r
+  IN CONST EFI_GUID              *Guid,\r
   IN UINTN                       Instance,\r
   IN OUT EFI_PEI_PPI_DESCRIPTOR  **PpiDescriptor,\r
   IN OUT VOID                    **Ppi\r
@@ -414,8 +447,8 @@ PeiLocatePpi (
   Install a notification for a given PPI.\r
 \r
 \r
-  @param PeiServices     - Pointer to the PEI Service Table\r
-  @param NotifyList      - Pointer to list of Descriptors to notify upon.\r
+  @param PeiServices            An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param NotifyList             Pointer to list of Descriptors to notify upon.\r
 \r
   @retval EFI_SUCCESS           if successful\r
   @retval EFI_OUT_OF_RESOURCES  if no space in the database\r
@@ -472,7 +505,7 @@ DispatchNotify (
 /**\r
   This service enables PEIMs to ascertain the present value of the boot mode.\r
 \r
-  @param PeiServices            The PEI core services table.\r
+  @param PeiServices            An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param BootMode               A pointer to contain the value of the boot mode.\r
 \r
   @retval EFI_SUCCESS           The boot mode was returned successfully.\r
@@ -491,10 +524,10 @@ PeiGetBootMode (
   This service enables PEIMs to update the boot mode variable.\r
 \r
 \r
-  @param PeiServices     - The PEI core services table.\r
-  @param BootMode        The value of the boot mode to set.\r
+  @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param BootMode        The value of the boot mode to set.\r
 \r
-  @return EFI_SUCCESS    The value was successfully updated\r
+  @return EFI_SUCCESS    The value was successfully updated\r
 \r
 **/\r
 EFI_STATUS\r
@@ -512,9 +545,8 @@ PeiSetBootMode (
 \r
   Initialize the security services.\r
 \r
-\r
-  @param PeiServices     - The PEI core services table.\r
-  @param OldCoreData     - Pointer to the old core data.\r
+  @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param OldCoreData     Pointer to the old core data.\r
                          NULL if being run in non-permament memory mode.\r
 \r
 **/\r
@@ -528,10 +560,10 @@ InitializeSecurityServices (
 /**\r
   Verify a Firmware volume\r
 \r
-  @param CurrentFvAddress - Pointer to the current Firmware Volume under consideration\r
+  @param CurrentFvAddress           Pointer to the current Firmware Volume under consideration\r
 \r
-  @retval EFI_SUCCESS             - Firmware Volume is legal\r
-  @retval EFI_SECURITY_VIOLATION  - Firmware Volume fails integrity test\r
+  @retval EFI_SUCCESS               Firmware Volume is legal\r
+  @retval EFI_SECURITY_VIOLATION    Firmware Volume fails integrity test\r
 \r
 **/\r
 EFI_STATUS\r
@@ -566,7 +598,7 @@ VerifyPeim (
   Gets the pointer to the HOB List.\r
 \r
 \r
-  @param PeiServices                   The PEI core services table.\r
+  @param PeiServices                   An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param HobList                       Pointer to the HOB List.\r
 \r
   @retval EFI_SUCCESS                  Get the pointer of HOB List\r
@@ -585,10 +617,10 @@ PeiGetHobList (
 /**\r
   Add a new HOB to the HOB List.\r
 \r
-  @param PeiServices     - The PEI core services table.\r
-  @param Type            - Type of the new HOB.\r
-  @param Length          - Length of the new HOB to allocate.\r
-  @param Hob             - Pointer to the new HOB.\r
+  @param PeiServices        An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param Type               Type of the new HOB.\r
+  @param Length             Length of the new HOB to allocate.\r
+  @param Hob                Pointer to the new HOB.\r
 \r
   @return  EFI_SUCCESS           Success to create hob.\r
   @retval  EFI_INVALID_PARAMETER if Hob is NULL\r
@@ -635,11 +667,11 @@ PeiCoreBuildHobHandoffInfoTable (
   the Firmware Volume defined by FwVolHeader.\r
 \r
 \r
-  @param PeiServices     Pointer to the PEI Core Services Table.\r
+  @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
@@ -659,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     Pointer to the PEI Core Services Table.\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
@@ -683,18 +714,18 @@ PeiFfsFindSectionData (
 /**\r
   search the firmware volumes by index\r
 \r
-  @param PeiServices     The PEI core services table.\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
@@ -707,8 +738,7 @@ PeiFvFindNextVolume (
 \r
   Initialize the memory services.\r
 \r
-\r
-  @param PrivateData     Add parameter description\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
@@ -729,9 +759,9 @@ InitializeMemoryServices (
   Install the permanent memory is now available.\r
   Creates HOB (PHIT and Stack).\r
 \r
-  @param PeiServices     - The PEI core services table.\r
-  @param MemoryBegin     Start of memory address.\r
-  @param MemoryLength    Length of memory.\r
+  @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param MemoryBegin     Start of memory address.\r
+  @param MemoryLength    Length of memory.\r
 \r
   @return EFI_SUCCESS Always success.\r
 \r
@@ -751,10 +781,10 @@ PeiInstallPeiMemory (
   not usable prior to the memory installation.\r
 \r
 \r
-  @param PeiServices     - The PEI core services table.\r
-  @param MemoryType      - Type of memory to allocate.\r
-  @param Pages           - Number of pages to allocate.\r
-  @param Memory          - Pointer of memory allocated.\r
+  @param PeiServices               An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param MemoryType                Type of memory to allocate.\r
+  @param Pages                     Number of pages to allocate.\r
+  @param Memory                    Pointer of memory allocated.\r
 \r
   @retval EFI_SUCCESS              The allocation was successful\r
   @retval EFI_INVALID_PARAMETER    Only AllocateAnyAddress is supported.\r
@@ -778,9 +808,9 @@ PeiAllocatePages (
   Memory allocation service on the CAR.\r
 \r
 \r
-  @param PeiServices     - The PEI core services table.\r
-  @param Size            - Amount of memory required\r
-  @param Buffer          - Address of pointer to the buffer\r
+  @param PeiServices        An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param Size               Amount of memory required\r
+  @param Buffer             Address of pointer to the buffer\r
 \r
   @retval EFI_SUCCESS              The allocation was successful\r
   @retval EFI_OUT_OF_RESOURCES     There is not enough heap to satisfy the requirement\r
@@ -801,14 +831,14 @@ PeiAllocatePool (
   Routine for load image file.\r
 \r
 \r
-  @param PeiServices     - The PEI core services table.\r
-  @param FileHandle      - Pointer to the FFS file header of the 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
+  @param PeiServices            An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param FileHandle             Pointer to the FFS file header of the 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
-  @retval EFI_SUCCESS    - Image is successfully loaded.\r
-  @retval EFI_NOT_FOUND  - Fail to locate necessary PPI\r
-  @retval Others         - Fail to load file.\r
+  @retval EFI_SUCCESS     Image is successfully loaded.\r
+  @retval EFI_NOT_FOUND   Fail to locate necessary PPI\r
+  @retval Others          Fail to load file.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -825,12 +855,12 @@ PeiLoadImage (
   Core version of the Status Code reporter\r
 \r
 \r
-  @param PeiServices     The PEI core services table.\r
-  @param CodeType        Type of Status Code.\r
-  @param Value           Value to output for Status Code.\r
-  @param Instance        Instance Number of this status code.\r
-  @param CallerId        ID of the caller of this status code.\r
-  @param Data            Optional data associated with this status code.\r
+  @param PeiServices            An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param CodeType               Type of Status Code.\r
+  @param Value                  Value to output for Status Code.\r
+  @param Instance               Instance Number of this status code.\r
+  @param CallerId               ID of the caller of this status code.\r
+  @param Data                   Optional data associated with this status code.\r
 \r
   @retval EFI_SUCCESS             if status code is successfully reported\r
   @retval EFI_NOT_AVAILABLE_YET   if StatusCodePpi has not been installed\r
@@ -853,7 +883,7 @@ PeiReportStatusCode (
   Core version of the Reset System\r
 \r
 \r
-  @param PeiServices     - The PEI core services table.\r
+  @param PeiServices                An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
 \r
   @retval EFI_NOT_AVAILABLE_YET     PPI not available yet.\r
   @retval EFI_DEVICE_ERROR          Did not reset system.\r
@@ -875,8 +905,6 @@ PeiResetSystem (
   @param PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
   @param SecCoreData     - Pointer to EFI_SEC_PEI_HAND_OFF.\r
 \r
-  @return NONE\r
-\r
 **/\r
 VOID\r
 PeiInitializeFv (\r
@@ -888,10 +916,9 @@ PeiInitializeFv (
 /**\r
   Process Firmware Volum Information once FvInfoPPI install.\r
 \r
-\r
-  @param PeiServices     - General purpose services available to every PEIM.\r
-  @param NotifyDescriptor EDES_TODO: Add parameter description\r
-  @param Ppi             EDES_TODO: Add parameter description\r
+  @param PeiServices       An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param NotifyDescriptor  Address of the notification descriptor data structure.\r
+  @param Ppi               Address of the PPI that was installed.\r
 \r
   @retval EFI_SUCCESS if the interface could be successfully installed\r
 \r
@@ -909,13 +936,13 @@ FirmwareVolmeInfoPpiNotifyCallback (
 \r
   Given the input VolumeHandle, search for the next matching name file.\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
-  @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
@@ -932,8 +959,8 @@ PeiFfsFindFileByName (
   Returns information about a specific file.\r
 \r
 \r
-  @param FileHandle      - The handle to file.\r
-  @param FileInfo        - Pointer to the file information.\r
+  @param FileHandle         The handle to file.\r
+  @param FileInfo           Pointer to the file information.\r
 \r
   @retval EFI_INVALID_PARAMETER Invalid FileHandle or FileInfo.\r
   @retval EFI_SUCCESS           Success to collect file info.\r
@@ -951,8 +978,8 @@ PeiFfsGetFileInfo (
 \r
   Collect information of given Fv Volume.\r
 \r
-  @param VolumeHandle    - The handle to Fv Volume.\r
-  @param VolumeInfo      - The pointer to volume information.\r
+  @param VolumeHandle           The handle to Fv Volume.\r
+  @param VolumeInfo             The pointer to volume information.\r
 \r
   @retval EFI_INVALID_PARAMETER VolumeInfo is NULL\r
   @retval EFI_SUCCESS           Success to collect fv info.\r
@@ -1011,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
@@ -1029,7 +1057,7 @@ InitializeImageServices (
 /**\r
   Get Fv image from the FV type file, then install FV INFO ppi, Build FV hob.\r
 \r
-  @param PeiServices          Pointer to the PEI Core Services Table.\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 AuthenticationState  Pointer to attestation authentication state of image.\r
 \r