]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix function comment to follows doxygen format.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Jul 2008 09:40:06 +0000 (09:40 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Jul 2008 09:40:06 +0000 (09:40 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5499 6f19259b-4bc3-4df7-8a09-765794883524

14 files changed:
MdeModulePkg/Core/Pei/BootMode/BootMode.c
MdeModulePkg/Core/Pei/Dependency/dependency.c
MdeModulePkg/Core/Pei/Dependency/dependency.h
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
MdeModulePkg/Core/Pei/FwVol/FwVol.c
MdeModulePkg/Core/Pei/Hob/Hob.c
MdeModulePkg/Core/Pei/Image/Image.c
MdeModulePkg/Core/Pei/Memory/MemoryServices.c
MdeModulePkg/Core/Pei/PeiMain.h
MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
MdeModulePkg/Core/Pei/Ppi/Ppi.c
MdeModulePkg/Core/Pei/Reset/Reset.c
MdeModulePkg/Core/Pei/Security/Security.c
MdeModulePkg/Core/Pei/StatusCode/StatusCode.c

index afa3c89ebca10dded67c195e949e53900f4479c4..eac541d5742a4a6bb92400e2507d2e0302add851 100644 (file)
@@ -1,6 +1,11 @@
 /** @file\r
-\r
-Copyright (c) 2006, Intel Corporation                                                         \r
+  This module provide function for ascertaining and updating the boot mode:\r
+  GetBootMode()\r
+  SetBootMode()\r
+  See PI Speicifcation volume I, chapter 9 Boot Paths for addtional information\r
+  on the boot mode.\r
+  \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
@@ -9,47 +14,28 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-\r
-  BootMode.c\r
-\r
-Abstract:\r
+**/\r
 \r
-  EFI PEI Core Boot Mode services\r
+#include <PeiMain.h>\r
 \r
+/**\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 BootMode               A pointer to contain the value of the boot mode.\r
 \r
-Revision History\r
+  @retval EFI_SUCCESS           The boot mode was returned successfully.\r
+  @retval EFI_INVALID_PARAMETER BootMode is NULL.\r
 \r
 **/\r
-\r
-#include <PeiMain.h>\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 PeiGetBootMode (\r
-  IN CONST EFI_PEI_SERVICES  **PeiServices,\r
-  OUT EFI_BOOT_MODE          *BootMode\r
+  IN  CONST EFI_PEI_SERVICES  **PeiServices,\r
+  OUT       EFI_BOOT_MODE     *BootMode\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This service enables PEIMs to ascertain the present value of the boot mode.  \r
-\r
-Arguments:\r
-\r
-  PeiServices    - The PEI core services table.\r
-  BootMode       - A pointer to contain the value of the boot mode. \r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The boot mode was returned successfully.\r
-  EFI_INVALID_PARAMETER - BootMode is NULL.\r
-\r
---*/\r
 {\r
-  PEI_CORE_INSTANCE                    *PrivateData;    \r
+  PEI_CORE_INSTANCE             *PrivateData;    \r
   EFI_HOB_HANDOFF_INFO_TABLE    *HandOffHob;\r
 \r
 \r
@@ -68,28 +54,22 @@ Returns:
 }\r
 \r
 \r
+/**\r
+  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
+\r
+  @return EFI_SUCCESS    - The value was successfully updated\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiSetBootMode (\r
   IN CONST EFI_PEI_SERVICES  **PeiServices,\r
   IN EFI_BOOT_MODE           BootMode\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This service enables PEIMs to update the boot mode variable.    \r
-\r
-Arguments:\r
-\r
-  PeiServices    - The PEI core services table.\r
-  BootMode       - The value of the boot mode to set.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS    - The value was successfully updated\r
-\r
---*/\r
 {\r
   PEI_CORE_INSTANCE                    *PrivateData;    \r
   EFI_HOB_HANDOFF_INFO_TABLE    *HandOffHob;\r
index 54006675f4b4e0193a05a9db34ddb464616c0d24..8146c19ca369f373f847840bcf9d7825d6b9eceb 100644 (file)
@@ -1,4 +1,9 @@
 /** @file\r
+  PEI Dispatcher Dependency Evaluator\r
+\r
+  This routine evaluates a dependency expression (DEPENDENCY_EXPRESSION) to determine\r
+  if a driver can be scheduled for execution.  The criteria for\r
+  schedulability is that the dependency expression is satisfied.\r
 \r
 Copyright (c) 2006, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
@@ -9,47 +14,30 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-\r
-  dependency.c\r
-\r
-Abstract:\r
-\r
-  PEI Dispatcher Dependency Evaluator\r
-\r
-  This routine evaluates a dependency expression (DEPENDENCY_EXPRESSION) to determine\r
-  if a driver can be scheduled for execution.  The criteria for\r
-  schedulability is that the dependency expression is satisfied.\r
-  \r
 **/\r
 \r
 #include <PeiMain.h>\r
 #include "dependency.h"\r
 \r
-STATIC\r
-BOOLEAN\r
-IsPpiInstalled (\r
-  IN EFI_PEI_SERVICES  **PeiServices,\r
-  IN EVAL_STACK_ENTRY  *Stack\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   This routine determines if a PPI has been installed.\r
   The truth value of a GUID is determined by if the PPI has\r
   been published and can be queried from the PPI database.\r
 \r
-Arguments:\r
-  PeiServices - The PEI core services table.\r
-  Stack       - Reference to EVAL_STACK_ENTRY that contains PPI GUID to check\r
 \r
-Returns:\r
+  @param PeiServices     The PEI core services table.\r
+  @param Stack           Reference to EVAL_STACK_ENTRY that contains PPI GUID to check\r
 \r
-  True if the PPI is already installed.\r
-  False if the PPI has yet to be installed.\r
+  @retval TRUE  if the PPI is already installed.\r
+  @retval FALSE if the PPI has yet to be installed.\r
 \r
---*/\r
+**/\r
+BOOLEAN\r
+IsPpiInstalled (\r
+  IN EFI_PEI_SERVICES  **PeiServices,\r
+  IN EVAL_STACK_ENTRY  *Stack\r
+  )\r
 {\r
   VOID        *PeiInstance;\r
   EFI_STATUS  Status;\r
@@ -86,15 +74,7 @@ Returns:
   return TRUE;\r
 }\r
 \r
-\r
-BOOLEAN\r
-PeimDispatchReadiness (\r
-  IN EFI_PEI_SERVICES   **PeiServices,\r
-  IN VOID               *DependencyExpression\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   This is the POSTFIX version of the dependency evaluator.  When a\r
   PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on\r
@@ -103,22 +83,22 @@ Routine Description:
   some time savings as not all PPIs must be checked for certain\r
   operation types (AND, OR).\r
 \r
-Arguments:\r
 \r
-  PeiServices               - Calling context.\r
+  @param PeiServices            Calling context.\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
-  DependencyExpression      - Pointer to a dependency expression.  The Grammar adheres to \r
-                              the BNF described above and is stored in postfix notation.\r
-Returns:\r
+  @retval TRUE      if it is a well-formed Grammar\r
+  @retval FALSE     if the dependency expression overflows the evaluation stack\r
+                    if the dependency expression underflows the evaluation stack\r
+                    if the dependency expression is not a well-formed Grammar.\r
 \r
-  Status = EFI_SUCCESS            if it is a well-formed Grammar\r
-           EFI_INVALID_PARAMETER  if the dependency expression overflows\r
-                                  the evaluation stack\r
-           EFI_INVALID_PARAMETER  if the dependency expression underflows\r
-                                  the evaluation stack\r
-           EFI_INVALID_PARAMETER  if the dependency expression is not a\r
-                                  well-formed Grammar.\r
---*/\r
+**/\r
+BOOLEAN\r
+PeimDispatchReadiness (\r
+  IN EFI_PEI_SERVICES   **PeiServices,\r
+  IN VOID               *DependencyExpression\r
+  )\r
 {\r
   DEPENDENCY_EXPRESSION_OPERAND  *Iterator;\r
   EVAL_STACK_ENTRY               *StackPtr;\r
index c1644a4a9417762f91295370d1452df1d17d7ad6..c15fd0d816ad017534c4ec541b93549f938b8054 100644 (file)
@@ -1,6 +1,8 @@
 /** @file\r
-\r
-Copyright (c) 2006, Intel Corporation                                                         \r
+  This module contains data specific to dependency expressions\r
+  and local function prototypes.\r
+  \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
@@ -9,15 +11,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-\r
-  dependency.h\r
-\r
-Abstract:\r
-   \r
-  This module contains data specific to dependency expressions\r
-  and local function prototypes.\r
-        \r
 **/\r
 \r
 #ifndef _PEI_DEPENDENCY_H_\r
index f5ce4dee613a3a883f7719459a51a287c659792b..481cf5d02e5c99da47fb0b26a5a2103bcb14523a 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  EFI PEI Core dispatch services\r
+  \r
 Copyright (c) 2006, 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
@@ -9,23 +10,13 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  Dispatcher.c\r
-\r
-Abstract:\r
-\r
-  EFI PEI Core dispatch services\r
-\r
-Revision History\r
-\r
 **/\r
 \r
 #include <PeiMain.h>\r
 \r
-//\r
-//CAR is filled with this initial value during SEC phase\r
-//\r
+///\r
+//CAR is filled with this initial value during SEC phase\r
+///\r
 #define INIT_CAR_VALUE 0x5AA55AA5\r
 \r
 typedef struct {\r
@@ -33,27 +24,21 @@ typedef struct {
   EFI_HANDLE            Handle;\r
 } PEIM_FILE_HANDLE_EXTENDED_DATA;\r
 \r
-VOID\r
-DiscoverPeimsAndOrderWithApriori (\r
-  IN  PEI_CORE_INSTANCE    *Private,\r
-  IN  EFI_PEI_FV_HANDLE    VolumeHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Discover all Peims and optional Apriori file in one FV. There is at most one\r
   Apriori file in one FV.\r
 \r
-Arguments:\r
 \r
-  Private          - Pointer to the private data passed in from caller\r
-  VolumeHandle     - Fv handle.\r
-Returns:\r
+  @param Private         - Pointer to the private data passed in from caller\r
+  @param VolumeHandle    - Fv handle.\r
 \r
-  NONE\r
-\r
---*/\r
+**/\r
+VOID\r
+DiscoverPeimsAndOrderWithApriori (\r
+  IN  PEI_CORE_INSTANCE    *Private,\r
+  IN  EFI_PEI_FV_HANDLE    VolumeHandle\r
+  )\r
 {\r
   EFI_STATUS                          Status;\r
   EFI_PEI_FV_HANDLE                   FileHandle;\r
@@ -187,6 +172,13 @@ Returns:
 \r
 }\r
 \r
+/**\r
+  Shadow PeiCore module from flash to installed memory.\r
+  \r
+  @param PeiServices     Pointer to PeiService table\r
+  @param PrivateInMem    PeiCore's private data structure\r
+\r
+**/\r
 VOID*\r
 ShadowPeiCore(\r
   EFI_PEI_SERVICES     **PeiServices,\r
@@ -226,32 +218,23 @@ ShadowPeiCore(
   return (VOID*) ((UINTN) EntryPoint + (UINTN) PeiCore - (UINTN) _ModuleEntryPoint);\r
 }\r
 \r
-VOID\r
-PeiDispatcher (\r
-  IN CONST EFI_SEC_PEI_HAND_OFF  *SecCoreData,\r
-  IN PEI_CORE_INSTANCE           *Private\r
-  )\r
-\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   Conduct PEIM dispatch.\r
 \r
-Arguments:\r
-\r
-  SecCoreData          - Points to a data structure containing information about the PEI core's operating\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
-  PrivateData          - Pointer to the private data passed in from caller\r
-  DispatchData         - Pointer to PEI_CORE_DISPATCH_DATA data.\r
-\r
-Returns:\r
+  @param Private         Pointer to the private data passed in from caller\r
 \r
-  EFI_SUCCESS   - Successfully dispatched PEIM.\r
-  EFI_NOT_FOUND - The dispatch failed.\r
+  @retval EFI_SUCCESS   - Successfully dispatched PEIM.\r
+  @retval EFI_NOT_FOUND - The dispatch failed.\r
 \r
---*/\r
+**/\r
+VOID\r
+PeiDispatcher (\r
+  IN CONST EFI_SEC_PEI_HAND_OFF  *SecCoreData,\r
+  IN PEI_CORE_INSTANCE           *Private\r
+  )\r
 {\r
   EFI_STATUS                          Status;\r
   UINT32                              Index1;\r
@@ -674,32 +657,25 @@ Returns:
 \r
 }\r
 \r
-VOID\r
-InitializeDispatcherData (\r
-  IN PEI_CORE_INSTANCE            *PrivateData,\r
-  IN PEI_CORE_INSTANCE            *OldCoreData,\r
-  IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   Initialize the Dispatcher's data members\r
 \r
-Arguments:\r
-\r
-  PeiServices          - The PEI core services table.\r
-  OldCoreData          - Pointer to old core data (before switching stack).\r
+  @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
-  SecCoreData          - Points to a data structure containing information about the PEI core's operating\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
 \r
-Returns:\r
-\r
-  None.\r
+  @return None.\r
 \r
---*/\r
+**/\r
+VOID\r
+InitializeDispatcherData (\r
+  IN PEI_CORE_INSTANCE            *PrivateData,\r
+  IN PEI_CORE_INSTANCE            *OldCoreData,\r
+  IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
+  )\r
 {\r
   if (OldCoreData == NULL) {\r
     PeiInitializeFv (PrivateData, SecCoreData);\r
@@ -708,29 +684,25 @@ Returns:
   return;\r
 }\r
 \r
+/**\r
+  This routine parses the Dependency Expression, if available, and\r
+  decides if the module can be executed.\r
+\r
+\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
 \r
+  @retval TRUE   Can be dispatched\r
+  @retval FALSE  Cannot be dispatched\r
+\r
+**/\r
 BOOLEAN\r
 DepexSatisfied (\r
   IN PEI_CORE_INSTANCE          *Private,\r
   IN EFI_PEI_FILE_HANDLE        FileHandle,\r
   IN UINTN                      PeimCount\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This routine parses the Dependency Expression, if available, and\r
-  decides if the module can be executed.\r
-\r
-Arguments:\r
-  PeiServices - The PEI Service Table\r
-  CurrentPeimAddress - Address of the PEIM Firmware File under investigation\r
-\r
-Returns:\r
-  TRUE  - Can be dispatched\r
-  FALSE - Cannot be dispatched\r
-\r
---*/\r
 {\r
   EFI_STATUS           Status;\r
   VOID                 *DepexData;\r
@@ -768,11 +740,11 @@ Returns:
   This routine enable a PEIM to register itself to shadow when PEI Foundation\r
   discovery permanent memory.\r
 \r
-       @param FileHandle       File handle of a PEIM.\r
+  @param FileHandle             File handle of a PEIM.\r
 \r
-  @retval EFI_NOT_FOUND                                The file handle doesn't point to PEIM itself.\r
-  @retval EFI_ALREADY_STARTED          Indicate that the PEIM has been registered itself.\r
-  @retval EFI_SUCCESS                                          Successfully to register itself.\r
+  @retval EFI_NOT_FOUND         The file handle doesn't point to PEIM itself.\r
+  @retval EFI_ALREADY_STARTED   Indicate that the PEIM has been registered itself.\r
+  @retval EFI_SUCCESS           Successfully to register itself.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -803,18 +775,16 @@ PeiRegisterForShadow (
   return EFI_SUCCESS;\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          Pointer to the PEI Core Services Table.\r
-       @param FileHandle               File handle of a Fv type file.\r
+  @param PeiServices          Pointer to the PEI Core Services Table.\r
+  @param FvFileHandle         File handle of a Fv type file.\r
   @param AuthenticationState  Pointer to attestation authentication state of image.\r
 \r
 \r
-  @retval EFI_NOT_FOUND                                FV image can't be found.\r
-  @retval EFI_SUCCESS                                          Successfully to process it.\r
+  @retval EFI_NOT_FOUND       FV image can't be found.\r
+  @retval EFI_SUCCESS         Successfully to process it.\r
 \r
 **/\r
 EFI_STATUS\r
index 1af4a760362c0518b8fdb76bca7cabf02636642e..d5af3a0b1d0ca84ffe77df9c0ac906389064c901 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  Pei Core Firmware File System service routines.\r
+  \r
 Copyright (c) 2006 - 2007, 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
@@ -15,7 +16,7 @@ Module Name:
 \r
 Abstract:\r
 \r
-  Pei Core Firmware File System service routines.\r
+  \r
 \r
 **/\r
 \r
@@ -31,28 +32,22 @@ STATIC EFI_PEI_NOTIFY_DESCRIPTOR mNotifyOnFvInfoList = {
 #define GET_OCCUPIED_SIZE(ActualSize, Alignment) \\r
   (ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1))\r
 \r
-STATIC\r
-EFI_FFS_FILE_STATE\r
-GetFileState(\r
-  IN UINT8                ErasePolarity,\r
-  IN EFI_FFS_FILE_HEADER  *FfsHeader\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   Returns the highest bit set of the State field\r
 \r
-Arguments:\r
 \r
-  ErasePolarity   - Erase Polarity  as defined by EFI_FVB2_ERASE_POLARITY\r
-                    in the Attributes field.\r
-  FfsHeader       - Pointer to FFS File Header.\r
+  @param ErasePolarity   Erase Polarity  as defined by EFI_FVB2_ERASE_POLARITY\r
+                         in the Attributes field.\r
+  @param FfsHeader       Pointer to FFS File Header.\r
 \r
-Returns:\r
-  Returns the highest bit in the State field\r
+  @return Returns the highest bit in the State field\r
 \r
---*/\r
+**/\r
+EFI_FFS_FILE_STATE\r
+GetFileState(\r
+  IN UINT8                ErasePolarity,\r
+  IN EFI_FFS_FILE_HEADER  *FfsHeader\r
+  )\r
 {\r
   EFI_FFS_FILE_STATE  FileState;\r
   EFI_FFS_FILE_STATE  HighestBit;\r
@@ -71,48 +66,37 @@ Returns:
   return HighestBit;\r
 } \r
 \r
-STATIC\r
+/**\r
+  Calculates the checksum of the header of a file.\r
+\r
+  @param FileHeader      Pointer to FFS File Header.\r
+\r
+  @return Checksum of the header.\r
+          The header is zero byte checksum.\r
+          Zero means the header is good.\r
+          Non-zero means the header is bad.\r
+**/\r
 UINT8\r
 CalculateHeaderChecksum (\r
   IN EFI_FFS_FILE_HEADER  *FileHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Calculates the checksum of the header of a file.\r
-\r
-Arguments:\r
-\r
-  FileHeader       - Pointer to FFS File Header.\r
-\r
-Returns:\r
-  Checksum of the header.\r
-  \r
-  The header is zero byte checksum.\r
-    - Zero means the header is good.\r
-    - Non-zero means the header is bad.\r
-    \r
-  \r
-Bugbug: For PEI performance reason, we comments this code at this time.\r
---*/\r
 {\r
-  UINT8   *ptr;\r
+  UINT8   *Ptr;\r
   UINTN   Index;\r
   UINT8   Sum;\r
   \r
   Sum = 0;\r
-  ptr = (UINT8 *)FileHeader;\r
+  Ptr = (UINT8 *)FileHeader;\r
 \r
   for (Index = 0; Index < sizeof(EFI_FFS_FILE_HEADER) - 3; Index += 4) {\r
-    Sum = (UINT8)(Sum + ptr[Index]);\r
-    Sum = (UINT8)(Sum + ptr[Index+1]);\r
-    Sum = (UINT8)(Sum + ptr[Index+2]);\r
-    Sum = (UINT8)(Sum + ptr[Index+3]);\r
+    Sum = (UINT8)(Sum + Ptr[Index]);\r
+    Sum = (UINT8)(Sum + Ptr[Index+1]);\r
+    Sum = (UINT8)(Sum + Ptr[Index+2]);\r
+    Sum = (UINT8)(Sum + Ptr[Index+3]);\r
   }\r
 \r
   for (; Index < sizeof(EFI_FFS_FILE_HEADER); Index++) {\r
-    Sum = (UINT8)(Sum + ptr[Index]);\r
+    Sum = (UINT8)(Sum + Ptr[Index]);\r
   }\r
   \r
   //\r
@@ -127,7 +111,15 @@ Bugbug: For PEI performance reason, we comments this code at this time.
   return Sum;\r
 }\r
 \r
-STATIC\r
+/**\r
+  Find FV handler according some FileHandle in that FV.\r
+\r
+  @param FileHandle      Handle of file image\r
+  @param VolumeHandle    Handle of FV\r
+\r
+  @return EDES_TODO: Add description for return value\r
+\r
+**/\r
 BOOLEAN\r
 EFIAPI\r
 PeiFileHandleToVolume (\r
@@ -151,7 +143,23 @@ PeiFileHandleToVolume (
   return FALSE;\r
 }\r
 \r
+/**\r
+  Given the input file pointer, search for the next matching file in the\r
+  FFS volume as defined by SearchType. The search starts from FileHeader inside\r
+  the Firmware Volume defined by FwVolHeader.\r
+\r
+\r
+  @param FvHandle        Pointer to the FV header of the volume to search\r
+  @param FileName        File name\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 FileHandle      This parameter must point to a valid FFS volume.\r
+  @param AprioriFile     Pointer to AprioriFile image in this FV if has\r
 \r
+  @return 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
 PeiFindFileEx (\r
   IN  CONST EFI_PEI_FV_HANDLE        FvHandle,\r
@@ -160,28 +168,6 @@ PeiFindFileEx (
   IN OUT    EFI_PEI_FILE_HANDLE      *FileHandle,\r
   IN OUT    EFI_PEI_FV_HANDLE        *AprioriFile  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input file pointer, search for the next matching file in the\r
-    FFS volume as defined by SearchType. The search starts from FileHeader inside\r
-    the Firmware Volume defined by FwVolHeader.\r
-\r
-Arguments:\r
-    PeiServices - Pointer to the PEI Core Services Table.\r
-    SearchType - Filter to find only files of this type.\r
-      Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
-    FwVolHeader - Pointer to the FV header of the volume to search.\r
-      This parameter must point to a valid FFS volume.\r
-    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
-    Flag        - Indicator for if this is for PEI Dispath search \r
-    \r
-Returns:\r
-    EFI_NOT_FOUND - No files matching the search criteria were found\r
-    EFI_SUCCESS\r
-\r
---*/\r
 {\r
   EFI_FIRMWARE_VOLUME_HEADER           *FwVolHeader;\r
   EFI_FFS_FILE_HEADER                   **FileHeader;\r
@@ -297,25 +283,22 @@ Returns:
   return EFI_NOT_FOUND;  \r
 }\r
 \r
+/**\r
+\r
+  Initialize PeiCore Fv List.\r
+\r
+\r
+  @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
   IN  PEI_CORE_INSTANCE           *PrivateData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize PeiCore Fv List.\r
-\r
-Arguments:\r
-  PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
-  SecCoreData     - Pointer to EFI_SEC_PEI_HAND_OFF.\r
-\r
-Returns:\r
-  NONE  \r
-  \r
---*/  \r
 {\r
   EFI_STATUS  Status;\r
   //\r
@@ -340,6 +323,17 @@ Returns:
 \r
 }\r
 \r
+/**\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
+\r
+  @retval EFI_SUCCESS if the interface could be successfully installed\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FirmwareVolmeInfoPpiNotifyCallback (\r
@@ -347,22 +341,6 @@ FirmwareVolmeInfoPpiNotifyCallback (
   IN EFI_PEI_NOTIFY_DESCRIPTOR     *NotifyDescriptor,\r
   IN VOID                          *Ppi\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Process Firmware Volum Information once FvInfoPPI install.\r
-\r
-Arguments:\r
-\r
-  PeiServices - General purpose services available to every PEIM.\r
-    \r
-Returns:\r
-\r
-  Status -  EFI_SUCCESS if the interface could be successfully\r
-            installed\r
-\r
---*/\r
 {\r
   UINT8                                 FvCount;\r
   EFI_PEI_FIRMWARE_VOLUME_INFO_PPI      *Fv;\r
@@ -434,6 +412,22 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\r
+  Go through the file to search SectionType section,\r
+  when meeting an encapsuled section.\r
+\r
+\r
+  @param PeiServices     - General purpose services available to every PEIM.\r
+                         SearchType   - Filter to find only section of this type.\r
+  @param SectionType     EDES_TODO: Add parameter description\r
+  @param Section         - From where to search.\r
+  @param SectionSize     - The file size to search.\r
+  @param OutputBuffer    - Pointer to the section to search.\r
+\r
+  @return EFI_STATUS\r
+\r
+**/\r
 EFI_STATUS\r
 PeiFfsProcessSection (\r
   IN CONST EFI_PEI_SERVICES     **PeiServices,\r
@@ -442,24 +436,6 @@ PeiFfsProcessSection (
   IN UINTN                      SectionSize,\r
   OUT VOID                      **OutputBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Go through the file to search SectionType section,\r
-  when meeting an encapsuled section. \r
-  \r
-Arguments:\r
-  PeiServices  - General purpose services available to every PEIM.\r
-  SearchType   - Filter to find only section of this type.\r
-  Section      - From where to search.\r
-  SectionSize  - The file size to search.\r
-  OutputBuffer - Pointer to the section to search.\r
-\r
-Returns:\r
-  EFI_STATUS\r
-  \r
---*/\r
 {\r
   EFI_STATUS                              Status;\r
   UINT32                                  SectionLength;\r
@@ -571,6 +547,21 @@ Returns:
 }\r
 \r
 \r
+/**\r
+  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 SectionType     Filter to find only sections of this type.\r
+  @param FileHandle      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
+  @retval EFI_NOT_FOUND  No files matching the search criteria were found\r
+  @retval EFI_SUCCESS    Success to find section data in given file\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFindSectionData (\r
@@ -579,24 +570,6 @@ PeiFfsFindSectionData (
   IN     EFI_PEI_FILE_HANDLE   FileHandle,\r
   IN OUT VOID                  **SectionData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input file pointer, search for the next matching section in the\r
-    FFS volume.\r
-\r
-Arguments:\r
-    PeiServices - Pointer to the PEI Core Services Table.\r
-    SearchType - Filter to find only sections of this type.\r
-    FfsFileHeader  - Pointer to the current file to search.\r
-    SectionData - Pointer to the Section matching SectionType in FfsFileHeader.\r
-                - NULL if section not found\r
-\r
-Returns:\r
-    EFI_NOT_FOUND - No files matching the search criteria were found\r
-    EFI_SUCCESS\r
-\r
---*/\r
 {\r
   EFI_FFS_FILE_HEADER                     *FfsFileHeader;\r
   UINT32                                  FileSize;\r
@@ -622,7 +595,22 @@ Returns:
           );\r
 }\r
 \r
+/**\r
+  Given the input file pointer, search for the next matching file in the\r
+  FFS volume as defined by SearchType. The search starts from FileHeader inside\r
+  the Firmware Volume defined by FwVolHeader.\r
 \r
+\r
+  @param PeiServices     Pointer to the PEI Core Services Table.\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
+                         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
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFindNextFile (\r
@@ -631,35 +619,22 @@ PeiFfsFindNextFile (
   IN EFI_PEI_FV_HANDLE           VolumeHandle,\r
   IN OUT EFI_PEI_FILE_HANDLE     *FileHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input file pointer, search for the next matching file in the\r
-    FFS volume as defined by SearchType. The search starts from FileHeader inside\r
-    the Firmware Volume defined by FwVolHeader.\r
-\r
-Arguments:\r
-    PeiServices - Pointer to the PEI Core Services Table.\r
-    \r
-    SearchType - Filter to find only files of this type.\r
-      Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
-      \r
-    FwVolHeader - Pointer to the FV header of the volume to search.\r
-      This parameter must point to a valid FFS volume.\r
-      \r
-    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
-  \r
-Returns:\r
-    EFI_NOT_FOUND - No files matching the search criteria were found\r
-    EFI_SUCCESS\r
-\r
---*/\r
 {\r
   return PeiFindFileEx (VolumeHandle, NULL, SearchType, FileHandle, NULL);\r
 }\r
 \r
 \r
+/**\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
+\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
@@ -667,30 +642,6 @@ PeiFvFindNextVolume (
   IN     UINTN                      Instance,\r
   IN OUT EFI_PEI_FV_HANDLE          *VolumeHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Return the firmware volumes.\r
-\r
-  BugBug -- Move this to the location of this code to where the\r
-  other FV and FFS support code lives.\r
-  Also, update to use FindFV for instances #'s >= 1.\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-  Instance    - Instance of FV to find\r
-  FwVolHeader - Pointer to contain the data to return\r
-\r
-Returns:\r
-  Pointer to the Firmware Volume instance requested\r
-\r
-  EFI_INVALID_PARAMETER     - FwVolHeader is NULL\r
-  \r
-  EFI_SUCCESS               - Firmware volume instance successfully found.\r
-\r
---*/\r
 {\r
   PEI_CORE_INSTANCE   *Private;\r
 \r
@@ -709,6 +660,19 @@ Returns:
 }\r
 \r
 \r
+/**\r
+\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
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI \r
 PeiFfsFindFileByName (\r
@@ -716,22 +680,6 @@ PeiFfsFindFileByName (
   IN  EFI_PEI_FV_HANDLE     VolumeHandle,\r
   OUT EFI_PEI_FILE_HANDLE   *FileHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Given the input VolumeHandle, search for the next matching name file.\r
-\r
-Arguments:\r
-\r
-  FileName      - File name to search.\r
-  VolumeHandle  - The current FV to search.\r
-  FileHandle    - Pointer to the file matching name in VolumeHandle.\r
-                - NULL if file not found\r
-Returns:\r
-  EFI_STATUS\r
-  \r
---*/  \r
 {\r
   EFI_STATUS  Status;\r
   if ((VolumeHandle == NULL) || (FileName == NULL) || (FileHandle == NULL)) {\r
@@ -744,26 +692,24 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Returns information about a specific file.\r
+\r
+\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
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI \r
 PeiFfsGetFileInfo (\r
   IN EFI_PEI_FILE_HANDLE  FileHandle,\r
   OUT EFI_FV_FILE_INFO    *FileInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Collect information of given file.\r
-\r
-Arguments:\r
-  FileHandle   - The handle to file.\r
-  FileInfo     - Pointer to the file information.\r
-\r
-Returns:\r
-  EFI_STATUS\r
-  \r
---*/    \r
 {\r
   UINT8                       FileState;\r
   UINT8                       ErasePolarity;\r
@@ -811,26 +757,22 @@ Returns:
 }\r
 \r
 \r
+/**\r
+\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
+\r
+  @retval EFI_INVALID_PARAMETER VolumeInfo is NULL\r
+  @retval EFI_SUCCESS           Success to collect fv info.\r
+**/\r
 EFI_STATUS\r
 EFIAPI \r
 PeiFfsGetVolumeInfo (\r
   IN EFI_PEI_FV_HANDLE  VolumeHandle,\r
   OUT EFI_FV_INFO       *VolumeInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Collect information of given Fv Volume.\r
-\r
-Arguments:\r
-  VolumeHandle    - The handle to Fv Volume.\r
-  VolumeInfo      - The pointer to volume information.\r
-  \r
-Returns:\r
-  EFI_STATUS\r
-  \r
---*/    \r
 {\r
   EFI_FIRMWARE_VOLUME_HEADER             FwVolHeader;\r
   EFI_FIRMWARE_VOLUME_EXT_HEADER         *FwVolExHeaderInfo;\r
index c353fa5bfab045c0b30b9fc8a593015921ea5db5..aa38228bec647c9312cb3433fda6d79b66f57e07 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  This module provide Hand-Off Block manupulation.\r
+  \r
 Copyright (c) 2006, 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
@@ -9,42 +10,29 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
+**/\r
 \r
-  Hob.c\r
+#include <PeiMain.h>\r
 \r
-Abstract:\r
+/**\r
 \r
-  EFI PEI Core HOB services\r
+  Gets the pointer to the HOB List.\r
 \r
-**/\r
 \r
-#include <PeiMain.h>\r
+  @param PeiServices                   The PEI core services table.\r
+  @param HobList                       Pointer to the HOB List.\r
+\r
+  @retval EFI_SUCCESS                  Get the pointer of HOB List\r
+  @retval EFI_NOT_AVAILABLE_YET        the HOB List is not yet published\r
+  @retval EFI_INVALID_PARAMETER        HobList is NULL (in debug mode)\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiGetHobList (\r
   IN CONST EFI_PEI_SERVICES  **PeiServices,\r
   IN OUT VOID          **HobList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Gets the pointer to the HOB List.\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-  HobList     - Pointer to the HOB List.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS                 - Get the pointer of HOB List\r
-  EFI_NOT_AVAILABLE_YET       - the HOB List is not yet published\r
-  EFI_INVALID_PARAMETER       - HobList is NULL (in debug mode)\r
-            \r
---*/\r
 {\r
   PEI_CORE_INSTANCE *PrivateData;\r
 \r
@@ -68,6 +56,20 @@ Returns:
 }\r
 \r
 \r
+/**\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
+\r
+  @return  EFI_SUCCESS           Success to create hob.\r
+  @retval  EFI_INVALID_PARAMETER if Hob is NULL\r
+  @retval  EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
+  @retval  EFI_OUT_OF_RESOURCES  if there is no more memory to grow the Hoblist.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiCreateHob (\r
@@ -76,27 +78,6 @@ PeiCreateHob (
   IN UINT16            Length,\r
   IN OUT VOID          **Hob\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add a new HOB to the HOB List.\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-  Type        - Type of the new HOB.\r
-  Length      - Length of the new HOB to allocate.\r
-  Hob         - Pointer to the new HOB.\r
-\r
-Returns:\r
-\r
-  Status  - EFI_SUCCESS\r
-          - EFI_INVALID_PARAMETER if Hob is NULL\r
-          - EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
-          - EFI_OUT_OF_RESOURCES if there is no more memory to grow the Hoblist.\r
-            \r
---*/\r
 {\r
   EFI_STATUS                           Status;\r
   EFI_HOB_HANDOFF_INFO_TABLE           *HandOffHob;\r
@@ -142,29 +123,23 @@ Returns:
 }\r
 \r
 \r
+/**\r
+\r
+  Builds a Handoff Information Table HOB\r
+\r
+  @param BootMode        - Current Bootmode\r
+  @param MemoryBegin     - Start Memory Address.\r
+  @param MemoryLength    - Length of Memory.\r
+\r
+  @return EFI_SUCCESS Always success to initialize HOB.\r
+\r
+**/\r
 EFI_STATUS\r
 PeiCoreBuildHobHandoffInfoTable (\r
   IN EFI_BOOT_MODE         BootMode,\r
   IN EFI_PHYSICAL_ADDRESS  MemoryBegin,\r
   IN UINT64                MemoryLength\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Builds a Handoff Information Table HOB\r
-\r
-Arguments:\r
-\r
-  BootMode      - Current Bootmode\r
-  MemoryBegin   - Start Memory Address.\r
-  MemoryLength  - Length of Memory.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
 {\r
   EFI_HOB_HANDOFF_INFO_TABLE   *Hob;\r
   EFI_HOB_GENERIC_HEADER       *HobEnd;\r
index 98553eb10c342b2788554f0837d8b41abda35bae..d08fee42e150b1339f18efc9592c760e26015c6c 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  Pei Core Load Image Support\r
+  \r
 Copyright (c) 2006 - 2007, 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
@@ -9,37 +10,25 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-\r
-  Image.c\r
-\r
-Abstract:\r
-\r
-  Pei Core Load Image Support\r
-\r
 **/\r
 \r
 #include <PeiMain.h>\r
 \r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file\r
-\r
-Arguments:\r
-\r
-  FileHandle - The handle to the PE/COFF file\r
-  FileOffset - The offset, in bytes, into the file to read\r
-  ReadSize   - The number of bytes to read from the file starting at FileOffset\r
-  Buffer     - A pointer to the buffer to read the data into.\r
-\r
-Returns:\r
+/**\r
+  Routine for loading file image.\r
 \r
-  EFI_SUCCESS - ReadSize bytes of data were read into Buffer from the PE/COFF file starting at FileOffset\r
+  @param PeiServices      The PEI core services table.\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
---*/  \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
 PeiLoadImageLoadImage (\r
   IN     EFI_PEI_SERVICES             **PeiServices,\r
@@ -49,30 +38,21 @@ PeiLoadImageLoadImage (
   OUT    EFI_PHYSICAL_ADDRESS         *EntryPoint,\r
   OUT    UINT32                       *AuthenticationState\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Routine for loading file image.\r
-\r
-Arguments:\r
-\r
-  PeiServices          - The PEI core services table.\r
-  FileHandle           - Pointer to the FFS file header of the image.\r
-  ImageAddressArg      - Pointer to PE/TE image.\r
-  ImageSizeArg         - Size of PE/TE image.\r
-  EntryPoint           - Pointer to entry point of specified image file for output.\r
-  AuthenticationState  - Pointer to attestation authentication state of image.\r
+;\r
 \r
-Returns:\r
+/**\r
+  The wrapper function of PeiLoadImageLoadImage().\r
 \r
-  Status - EFI_SUCCESS    - Image is successfully loaded.\r
-           EFI_NOT_FOUND  - Fail to locate necessary PPI\r
-           Others         - Fail to load file.\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
---*/\r
-;\r
+  @return Status of PeiLoadImageLoadImage().\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiLoadImageLoadImageWrapper (\r
@@ -83,27 +63,6 @@ PeiLoadImageLoadImageWrapper (
   OUT    EFI_PHYSICAL_ADDRESS         *EntryPoint,\r
   OUT    UINT32                       *AuthenticationState\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  The wrapper function of PeiLoadImageLoadImage().\r
-\r
-Arguments:\r
-\r
-  This                 - Pointer to EFI_PEI_LOAD_FILE_PPI.\r
-  PeiServices          - The PEI core services table.\r
-  FileHandle           - Pointer to the FFS file header of the image.\r
-  ImageAddressArg      - Pointer to PE/TE image.\r
-  ImageSizeArg         - Size of PE/TE image.\r
-  EntryPoint           - Pointer to entry point of specified image file for output.\r
-  AuthenticationState  - Pointer to attestation authentication state of image.\r
-\r
-Returns:\r
-\r
-  EFI_STATUS.\r
-  \r
---*/ \r
 ;\r
 \r
 STATIC EFI_PEI_LOAD_FILE_PPI   mPeiLoadImagePpi = {\r
@@ -117,6 +76,19 @@ STATIC EFI_PEI_PPI_DESCRIPTOR     gPpiLoadFilePpiList = {
   &mPeiLoadImagePpi\r
 };\r
 \r
+/**\r
+\r
+  Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file\r
+\r
+\r
+  @param FileHandle      - The handle to the PE/COFF file\r
+  @param FileOffset      - The offset, in bytes, into the file to read\r
+  @param ReadSize        - The number of bytes to read from the file starting at FileOffset\r
+  @param Buffer          - A pointer to the buffer to read the data into.\r
+\r
+  @return EFI_SUCCESS - ReadSize bytes of data were read into Buffer from the PE/COFF file starting at FileOffset\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiImageRead (\r
@@ -125,24 +97,6 @@ PeiImageRead (
   IN OUT UINTN   *ReadSize,\r
   OUT    VOID    *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file\r
-\r
-Arguments:\r
-\r
-  FileHandle - The handle to the PE/COFF file\r
-  FileOffset - The offset, in bytes, into the file to read\r
-  ReadSize   - The number of bytes to read from the file starting at FileOffset\r
-  Buffer     - A pointer to the buffer to read the data into.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS - ReadSize bytes of data were read into Buffer from the PE/COFF file starting at FileOffset\r
-\r
---*/\r
 {\r
   CHAR8 *Destination8;\r
   CHAR8 *Source8;\r
@@ -158,27 +112,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-GetImageReadFunction (\r
-  IN      PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Support routine to return the Image Read\r
-\r
-Arguments:\r
-\r
-  PeiServices   - PEI Services Table\r
+/**\r
 \r
-  ImageContext  - The context of the image being loaded\r
+  Support routine to return the Image Read.\r
 \r
-Returns:\r
+  @param ImageContext    - The context of the image being loaded\r
 \r
-  EFI_SUCCESS - If Image function location is found\r
+  @retval EFI_SUCCESS - If Image function location is found\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+GetImageReadFunction (\r
+  IN      PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
+  )\r
 {\r
   VOID*  MemoryBuffer;\r
 \r
@@ -192,7 +138,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
+/**\r
+\r
+  Loads and relocates a PE/COFF image into memory.\r
+\r
+\r
+  @param Pe32Data        - The base address of the PE/COFF file that is to be loaded and relocated\r
+  @param ImageAddress    - The base address of the relocated PE/COFF image\r
+  @param ImageSize       - The size of the relocated PE/COFF image\r
+  @param EntryPoint      - The entry point of the relocated PE/COFF image\r
+\r
+  @retval EFI_SUCCESS           The file was loaded and relocated\r
+  @retval EFI_OUT_OF_RESOURCES  There was not enough memory to load and relocate the PE/COFF file\r
+\r
+**/\r
 EFI_STATUS\r
 LoadAndRelocatePeCoffImage (\r
   IN  VOID                                      *Pe32Data,\r
@@ -200,29 +159,6 @@ LoadAndRelocatePeCoffImage (
   OUT UINT64                                    *ImageSize,\r
   OUT EFI_PHYSICAL_ADDRESS                      *EntryPoint\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Loads and relocates a PE/COFF image into memory.\r
-\r
-Arguments:\r
-\r
-  Pe32Data         - The base address of the PE/COFF file that is to be loaded and relocated\r
-\r
-  ImageAddress     - The base address of the relocated PE/COFF image\r
-\r
-  ImageSize        - The size of the relocated PE/COFF image\r
-\r
-  EntryPoint       - The entry point of the relocated PE/COFF image\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS   - The file was loaded and relocated\r
-\r
-  EFI_OUT_OF_RESOURCES - There was not enough memory to load and relocate the PE/COFF file\r
-\r
---*/\r
 {\r
   EFI_STATUS                            Status;\r
   PE_COFF_LOADER_IMAGE_CONTEXT          ImageContext;\r
@@ -286,6 +222,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Routine for loading file image.\r
+\r
+  @param PeiServices      The PEI core services table.\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
+  @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
 PeiLoadImageLoadImage (\r
   IN     EFI_PEI_SERVICES             **PeiServices,\r
@@ -295,28 +246,6 @@ PeiLoadImageLoadImage (
   OUT    EFI_PHYSICAL_ADDRESS         *EntryPoint,\r
   OUT    UINT32                       *AuthenticationState\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Routine for loading file image.\r
-\r
-Arguments:\r
-\r
-  PeiServices          - The PEI core services table.\r
-  FileHandle           - Pointer to the FFS file header of the image.\r
-  ImageAddressArg      - Pointer to PE/TE image.\r
-  ImageSizeArg         - Size of PE/TE image.\r
-  EntryPoint           - Pointer to entry point of specified image file for output.\r
-  AuthenticationState  - Pointer to attestation authentication state of image.\r
-\r
-Returns:\r
-\r
-  Status - EFI_SUCCESS    - Image is successfully loaded.\r
-           EFI_NOT_FOUND  - Fail to locate necessary PPI\r
-           Others         - Fail to load file.\r
-\r
---*/\r
 {\r
   EFI_STATUS                  Status;\r
   VOID                        *Pe32Data;\r
@@ -464,6 +393,19 @@ Returns:
 }\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
@@ -474,27 +416,6 @@ PeiLoadImageLoadImageWrapper (
   OUT    EFI_PHYSICAL_ADDRESS         *EntryPoint,\r
   OUT    UINT32                       *AuthenticationState\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  The wrapper function of PeiLoadImageLoadImage().\r
-\r
-Arguments:\r
-\r
-  This                 - Pointer to EFI_PEI_LOAD_FILE_PPI.\r
-  PeiServices          - The PEI core services table.\r
-  FileHandle           - Pointer to the FFS file header of the image.\r
-  ImageAddressArg      - Pointer to PE/TE image.\r
-  ImageSizeArg         - Size of PE/TE image.\r
-  EntryPoint           - Pointer to entry point of specified image file for output.\r
-  AuthenticationState  - Pointer to attestation authentication state of image.\r
-\r
-Returns:\r
-\r
-  EFI_STATUS.\r
-  \r
---*/      \r
 {\r
   return PeiLoadImageLoadImage (\r
            GetPeiServicesTablePointer (),\r
@@ -506,6 +427,21 @@ Returns:
            );\r
 }\r
 \r
+/**\r
+\r
+  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
+\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
 PeiLoadImage (\r
   IN     EFI_PEI_SERVICES             **PeiServices,\r
@@ -513,26 +449,6 @@ PeiLoadImage (
   OUT    EFI_PHYSICAL_ADDRESS         *EntryPoint,\r
   OUT    UINT32                       *AuthenticationState\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Routine for load image file.\r
-\r
-Arguments:\r
-\r
-  PeiServices          - The PEI core services table.\r
-  FileHandle           - Pointer to the FFS file header of the image.\r
-  EntryPoint           - Pointer to entry point of specified image file for output.\r
-  AuthenticationState  - Pointer to attestation authentication state of image.\r
-\r
-Returns:\r
-\r
-  Status - EFI_SUCCESS    - Image is successfully loaded.\r
-           EFI_NOT_FOUND  - Fail to locate necessary PPI\r
-           Others         - Fail to load file.\r
-  \r
---*/    \r
 {\r
   EFI_STATUS              PpiStatus;\r
   EFI_STATUS              Status;\r
@@ -585,27 +501,20 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-InitializeImageServices (\r
-  IN  PEI_CORE_INSTANCE   *PrivateData,\r
-  IN  PEI_CORE_INSTANCE   *OldCoreData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Install Pei Load File PPI.\r
 \r
-Arguments:\r
 \r
-  PrivateData    - Pointer to PEI_CORE_INSTANCE.\r
-  OldCoreData    - Pointer to PEI_CORE_INSTANCE.\r
+  @param PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
+  @param OldCoreData     - Pointer to PEI_CORE_INSTANCE.\r
 \r
-Returns:\r
-\r
-  NONE.\r
-  \r
---*/      \r
+**/\r
+VOID\r
+InitializeImageServices (\r
+  IN  PEI_CORE_INSTANCE   *PrivateData,\r
+  IN  PEI_CORE_INSTANCE   *OldCoreData\r
+  )\r
 {\r
   if (OldCoreData == NULL) {\r
     //\r
index f4212c849eb5819d8ea508dc44d3cc3048688032..58c5d81517ea30884c442c590b5c987781ee3161 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  EFI PEI Core memory services\r
+  \r
 Copyright (c) 2006, 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
@@ -9,45 +10,29 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-\r
-  MemoryServices.c\r
-\r
-Abstract:\r
-\r
-  EFI PEI Core memory services\r
-\r
 **/\r
 \r
 #include <PeiMain.h>\r
 \r
-VOID\r
-InitializeMemoryServices (\r
-  IN PEI_CORE_INSTANCE           *PrivateData,\r
-  IN CONST EFI_SEC_PEI_HAND_OFF  *SecCoreData,\r
-  IN PEI_CORE_INSTANCE           *OldCoreData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Initialize the memory services.\r
 \r
-Arguments:\r
 \r
-  PeiServices          - The PEI core services table.\r
-  SecCoreData          - Points to a data structure containing information about the PEI core's operating\r
+  @param PrivateData     Add parameter description\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
-\r
-  OldCoreData          - Pointer to the PEI Core data.\r
+  @param OldCoreData     Pointer to the PEI Core data.\r
                          NULL if being run in non-permament memory mode.\r
 \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
+**/\r
+VOID\r
+InitializeMemoryServices (\r
+  IN PEI_CORE_INSTANCE           *PrivateData,\r
+  IN CONST EFI_SEC_PEI_HAND_OFF  *SecCoreData,\r
+  IN PEI_CORE_INSTANCE           *OldCoreData\r
+  )\r
 {\r
   \r
   PrivateData->SwitchStackSignal      = FALSE;\r
@@ -85,6 +70,18 @@ Returns:
   return;\r
 }\r
 \r
+/**\r
+\r
+  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
+\r
+  @return EFI_SUCCESS Always success.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiInstallPeiMemory (\r
@@ -92,24 +89,6 @@ PeiInstallPeiMemory (
   IN EFI_PHYSICAL_ADDRESS    MemoryBegin,\r
   IN UINT64                  MemoryLength\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Install the permanent memory is now available.\r
-  Creates HOB (PHIT and Stack).\r
-\r
-Arguments:\r
-\r
-  PeiServices   - The PEI core services table.\r
-  MemoryBegin   - Start of memory address.\r
-  MemoryLength  - Length of memory.\r
-\r
-Returns:\r
-\r
-  Status  - EFI_SUCCESS\r
-            \r
---*/\r
 {\r
   PEI_CORE_INSTANCE                     *PrivateData;\r
 \r
@@ -125,6 +104,24 @@ Returns:
   return EFI_SUCCESS;   \r
 }\r
 \r
+/**\r
+\r
+  Memory allocation service on permanent memory,\r
+  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
+\r
+  @retval EFI_SUCCESS              The allocation was successful\r
+  @retval EFI_INVALID_PARAMETER    Only AllocateAnyAddress is supported.\r
+  @retval EFI_NOT_AVAILABLE_YET    Called with permanent memory not available\r
+  @retval EFI_OUT_OF_RESOURCES     There is not enough HOB heap to satisfy the requirement\r
+                                   to allocate the number of pages.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiAllocatePages (\r
@@ -133,29 +130,6 @@ PeiAllocatePages (
   IN UINTN                      Pages,\r
   OUT EFI_PHYSICAL_ADDRESS      *Memory\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Memory allocation service on permanent memory, \r
-  not usable prior to the memory installation.\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-  MemoryType  - Type of memory to allocate.\r
-  Pages       - Number of pages to allocate.\r
-  Memory      - Pointer of memory allocated.\r
-\r
-Returns:\r
-\r
-  Status - EFI_SUCCESS              The allocation was successful\r
-           EFI_INVALID_PARAMETER    Only AllocateAnyAddress is supported.\r
-           EFI_NOT_AVAILABLE_YET    Called with permanent memory not available\r
-           EFI_OUT_OF_RESOURCES     There is not enough HOB heap to satisfy the requirement\r
-                                    to allocate the number of pages.\r
-\r
---*/\r
 {\r
   PEI_CORE_INSTANCE                       *PrivateData;\r
   EFI_PEI_HOB_POINTERS                    Hob;\r
@@ -232,7 +206,20 @@ Returns:
   }\r
 }\r
 \r
+/**\r
+\r
+  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
+\r
+  @retval EFI_SUCCESS              The allocation was successful\r
+  @retval EFI_OUT_OF_RESOURCES     There is not enough heap to satisfy the requirement\r
+                                   to allocate the requested size.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiAllocatePool (\r
@@ -240,27 +227,6 @@ PeiAllocatePool (
   IN UINTN                      Size,\r
   OUT VOID                      **Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Memory allocation service on the CAR.  \r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-\r
-  Size        - Amount of memory required\r
-\r
-  Buffer      - Address of pointer to the buffer\r
-\r
-Returns:\r
-\r
-  Status - EFI_SUCCESS              The allocation was successful\r
-           EFI_OUT_OF_RESOURCES     There is not enough heap to satisfy the requirement\r
-                                    to allocate the requested size.\r
-                                    \r
---*/\r
 {\r
   EFI_STATUS               Status;\r
   EFI_HOB_MEMORY_POOL      *Hob;\r
index ca48a51fbd8698da4cd67cf50fc1e2c4342877bf..8e87aaae05d6b2afe59bf44d7a05bc06ba210ca1 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  Definition of Pei Core Structures and Services\r
+  \r
 Copyright (c) 2006 - 2007, 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
@@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  PeiMain.h\r
-\r
-Abstract:\r
-\r
-  Definition of Pei Core Structures and Services\r
-\r
-Revision History\r
-\r
 **/\r
 \r
 #ifndef _PEI_MAIN_H_\r
@@ -58,9 +49,9 @@ Revision History
 \r
 #define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE   0xff\r
 \r
-//\r
-// Pei Core private data structures\r
-//\r
+///\r
+/// Pei Core private data structures\r
+///\r
 typedef union {\r
   EFI_PEI_PPI_DESCRIPTOR      *Ppi;\r
   EFI_PEI_NOTIFY_DESCRIPTOR   *Notify;\r
@@ -150,9 +141,6 @@ typedef struct{
 #define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \\r
   CR(a, PEI_CORE_INSTANCE, PS, PEI_CORE_HANDLE_SIGNATURE)\r
 \r
-//\r
-// BUGBUG: Where does this go really?\r
-//\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *PEI_CORE_ENTRY_POINT)(\r
@@ -161,9 +149,9 @@ EFI_STATUS
   IN PEI_CORE_INSTANCE              *OldCoreData\r
   );\r
 \r
-//\r
-// Union of temporarily used function pointers (to save stack space)\r
-//\r
+///\r
+/// Union of temporarily used function pointers (to save stack space)\r
+///\r
 typedef union {\r
   PEI_CORE_ENTRY_POINT         PeiCore;\r
   EFI_PEIM_ENTRY_POINT2        PeimEntry;\r
@@ -185,47 +173,42 @@ typedef struct {
 //\r
 // PeiCore function\r
 //\r
-EFI_STATUS\r
-EFIAPI\r
-PeiCore (\r
-  IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreData,\r
-  IN CONST EFI_PEI_PPI_DESCRIPTOR      *PpList,\r
-  IN VOID                              *Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   The entry routine to Pei Core, invoked by PeiMain during transition\r
   from SEC to PEI. After switching stack in the PEI core, it will restart\r
   with the old core data.\r
 \r
-Arguments:\r
 \r
-  PeiStartupDescriptor - Information and services provided by SEC phase.\r
-  OldCoreData          - Pointer to old core data that is used to initialize the\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
-Returns:\r
+  @retval EFI_NOT_FOUND  Never reach\r
 \r
-  This function never returns\r
-  EFI_NOT_FOUND        - Never reach\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiCore (\r
+  IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreData,\r
+  IN CONST EFI_PEI_PPI_DESCRIPTOR      *PpList,\r
+  IN VOID                              *Data\r
+  )\r
 ;\r
 \r
 //\r
 // Dispatcher support functions\r
 //\r
 \r
-BOOLEAN\r
-PeimDispatchReadiness (\r
-  IN EFI_PEI_SERVICES   **PeiServices,\r
-  IN VOID               *DependencyExpression\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   This is the POSTFIX version of the dependency evaluator.  When a\r
   PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on\r
@@ -234,208 +217,117 @@ Routine Description:
   some time savings as not all PPIs must be checked for certain\r
   operation types (AND, OR).\r
 \r
-Arguments:\r
 \r
-  PeiServices               - Calling context.\r
+  @param PeiServices            Calling context.\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
-  DependencyExpression      - Pointer to a dependency expression.  The Grammar adheres to\r
-                              the BNF described above and is stored in postfix notation.\r
+  @retval TRUE      if it is a well-formed Grammar\r
+  @retval FALSE     if the dependency expression overflows the evaluation stack\r
+                    if the dependency expression underflows the evaluation stack\r
+                    if the dependency expression is not a well-formed Grammar.\r
 \r
-Returns:\r
-\r
-  Status = EFI_SUCCESS            if it is a well-formed Grammar\r
-           EFI_INVALID_PARAMETER  if the dependency expression overflows\r
-                                  the evaluation stack\r
-           EFI_INVALID_PARAMETER  if the dependency expression underflows\r
-                                  the evaluation stack\r
-           EFI_INVALID_PARAMETER  if the dependency expression is not a\r
-                                  well-formed Grammar.\r
---*/\r
+**/\r
+BOOLEAN\r
+PeimDispatchReadiness (\r
+  IN EFI_PEI_SERVICES   **PeiServices,\r
+  IN VOID               *DependencyExpression\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
+                         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
 \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
-Routine Description:\r
-\r
-  Conduct PEIM dispatch.\r
-\r
-Arguments:\r
-\r
-  PeiStartupDescriptor - Pointer to IN EFI_PEI_STARTUP_DESCRIPTOR\r
-  PrivateData          - Pointer to the private data passed in from caller\r
-  DispatchData         - Pointer to PEI_CORE_DISPATCH_DATA data.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS   - Successfully dispatched PEIM.\r
-  EFI_NOT_FOUND - The dispatch failed.\r
+/**\r
+  Initialize the Dispatcher's data members\r
 \r
---*/\r
-;\r
+  @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
 \r
+  @return None.\r
 \r
+**/\r
 VOID\r
 InitializeDispatcherData (\r
   IN PEI_CORE_INSTANCE            *PrivateData,\r
   IN PEI_CORE_INSTANCE            *OldCoreData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the Dispatcher's data members\r
-\r
-Arguments:\r
-\r
-  PeiServices          - The PEI core services table.\r
-  OldCoreData          - Pointer to old core data (before switching stack).\r
-                         NULL if being run in non-permament memory mode.\r
-  PeiStartupDescriptor - Information and services provided by SEC phase.\r
-\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-;\r
-\r
-\r
-EFI_STATUS\r
-FindNextPeim (\r
-  IN EFI_PEI_SERVICES            **PeiServices,\r
-  IN EFI_FIRMWARE_VOLUME_HEADER  *FwVolHeader,\r
-  IN OUT EFI_FFS_FILE_HEADER     **PeimFileHeader\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input file pointer, search for the next matching file in the\r
-    FFS volume. The search starts from FileHeader inside\r
-    the Firmware Volume defined by FwVolHeader.\r
-\r
-Arguments:\r
-    PeiServices - Pointer to the PEI Core Services Table.\r
-\r
-    FwVolHeader - Pointer to the FV header of the volume to search.\r
-                     This parameter must point to a valid FFS volume.\r
-\r
-    PeimFileHeader  - Pointer to the current file from which to begin searching.\r
-                  This pointer will be updated upon return to reflect the file found.\r
-\r
-Returns:\r
-    EFI_NOT_FOUND - No files matching the search criteria were found\r
-    EFI_SUCCESS\r
-\r
---*/\r
-;\r
-\r
-BOOLEAN\r
-Dispatched (\r
-  IN UINT8  CurrentPeim,\r
-  IN UINT32 DispatchedPeimBitMap\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This routine checks to see if a particular PEIM has been dispatched during\r
-  the PEI core dispatch.\r
-\r
-Arguments:\r
-  CurrentPeim - The PEIM/FV in the bit array to check.\r
-  DispatchedPeimBitMap - Bit array, each bit corresponds to a PEIM/FV.\r
-\r
-Returns:\r
-  TRUE if PEIM already dispatched\r
-  FALSE if not\r
-\r
---*/\r
 ;\r
 \r
-VOID\r
-SetDispatched (\r
-  IN EFI_PEI_SERVICES   **PeiServices,\r
-  IN UINT8              CurrentPeim,\r
-  OUT UINT32            *DispatchedPeimBitMap\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This routine sets a PEIM as having been dispatched once its entry\r
-  point has been invoked.\r
-\r
-Arguments:\r
+/**\r
+  This routine parses the Dependency Expression, if available, and\r
+  decides if the module can be executed.\r
 \r
-  PeiServices          - The PEI core services table.\r
-  CurrentPeim          - The PEIM/FV in the bit array to check.\r
-  DispatchedPeimBitMap - Bit array, each bit corresponds to a PEIM/FV.\r
 \r
-Returns:\r
-  None\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
 \r
---*/\r
-;\r
+  @retval TRUE   Can be dispatched\r
+  @retval FALSE  Cannot be dispatched\r
 \r
+**/\r
 BOOLEAN\r
 DepexSatisfied (\r
   IN PEI_CORE_INSTANCE          *Private,\r
   IN EFI_PEI_FILE_HANDLE        FileHandle,\r
   IN UINTN                      PeimCount\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This routine parses the Dependency Expression, if available, and\r
-  decides if the module can be executed.\r
-\r
-Arguments:\r
-  PeiServices - The PEI Service Table\r
-  CurrentPeimAddress - Address of the PEIM Firmware File under investigation\r
-\r
-Returns:\r
-  TRUE  - Can be dispatched\r
-  FALSE - Cannot be dispatched\r
-\r
---*/\r
 ;\r
 \r
 //\r
 // PPI support functions\r
 //\r
+/**\r
+\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
+\r
+**/\r
 VOID\r
 InitializePpiServices (\r
   IN PEI_CORE_INSTANCE   *PrivateData,\r
   IN PEI_CORE_INSTANCE   *OldCoreData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize PPI services.\r
-\r
-Arguments:\r
+;\r
 \r
-  PeiServices - The PEI core services table.\r
-  OldCoreData - Pointer to the PEI Core data.\r
-                NULL if being run in non-permament memory mode.\r
+/**\r
 \r
-Returns:\r
-  Nothing\r
+  Migrate the Hob list from the CAR stack to PEI installed memory.\r
 \r
---*/\r
-;\r
+  @param PeiServices         The PEI core services table.\r
+  @param OldCheckingBottom   The old checking bottom.\r
+  @param OldCheckingTop      The old checking top.\r
+  @param NewHandOffHob       The new handoff HOB list.\r
 \r
+**/\r
 VOID\r
 ConvertPpiPointers (\r
   IN CONST EFI_PEI_SERVICES                     **PeiServices,\r
@@ -443,51 +335,43 @@ ConvertPpiPointers (
   IN UINTN                         OldCheckingTop,\r
   IN EFI_HOB_HANDOFF_INFO_TABLE    *NewHandOffHob\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Migrate the Hob list from the CAR stack to PEI installed memory.\r
+;\r
 \r
-Arguments:\r
+/**\r
 \r
-  PeiServices       - The PEI core services table.\r
-  OldCheckingBottom - The old checking bottom.\r
-  OldCheckingTop    - The old checking top.\r
-  NewHandOffHob     - The new handoff HOB list.\r
+  Install PPI services.\r
 \r
-Returns:\r
+  @param PeiServices     - Pointer to the PEI Service Table\r
+  @param PpiList         - Pointer to a list of PEI PPI Descriptors.\r
 \r
---*/\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
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiInstallPpi (\r
   IN CONST EFI_PEI_SERVICES        **PeiServices,\r
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *PpiList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Install PPI services.\r
+;\r
 \r
-Arguments:\r
+/**\r
 \r
-  PeiServices - Pointer to the PEI Service Table\r
-  PpiList     - Pointer to a list of PEI PPI Descriptors.\r
+  Re-Install PPI services.\r
 \r
-Returns:\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
 \r
-    EFI_SUCCESS             - if all PPIs in PpiList are successfully installed.\r
-    EFI_INVALID_PARAMETER   - if PpiList is NULL pointer\r
-    EFI_INVALID_PARAMETER   - if any PPI in PpiList is not valid\r
-    EFI_OUT_OF_RESOURCES    - if there is no more memory resource to install PPI\r
-\r
---*/\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
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiReInstallPpi (\r
@@ -495,28 +379,24 @@ PeiReInstallPpi (
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *OldPpi,\r
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *NewPpi\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Re-Install PPI services.\r
+;\r
 \r
-Arguments:\r
+/**\r
 \r
-  PeiServices - Pointer to the PEI Service Table\r
-  OldPpi      - Pointer to the old PEI PPI Descriptors.\r
-  NewPpi      - Pointer to the new PEI PPI Descriptors.\r
+  Locate a given named PPI.\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS           - if the operation was successful\r
-  EFI_INVALID_PARAMETER - if OldPpi or NewPpi is NULL\r
-  EFI_INVALID_PARAMETER - if NewPpi is not valid\r
-  EFI_NOT_FOUND         - if the PPI was not in the database\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
+                         returns a pointer to the descriptor (includes flags, etc)\r
+  @param Ppi             - Pointer to reference the found PPI\r
 \r
---*/\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
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiLocatePpi (\r
@@ -526,73 +406,54 @@ PeiLocatePpi (
   IN OUT EFI_PEI_PPI_DESCRIPTOR  **PpiDescriptor,\r
   IN OUT VOID                    **Ppi\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Locate a given named PPI.\r
+/**\r
 \r
-Arguments:\r
+  Install a notification for a given PPI.\r
 \r
-  PeiServices   - Pointer to the PEI Service Table\r
-  Guid          - Pointer to GUID of the PPI.\r
-  Instance      - Instance Number to discover.\r
-  PpiDescriptor - Pointer to reference the found descriptor. If not NULL,\r
-                returns a pointer to the descriptor (includes flags, etc)\r
-  Ppi           - Pointer to reference the found PPI\r
 \r
-Returns:\r
+  @param PeiServices     - Pointer to the PEI Service Table\r
+  @param NotifyList      - Pointer to list of Descriptors to notify upon.\r
 \r
-  Status -  EFI_SUCCESS   if the PPI is in the database\r
-            EFI_NOT_FOUND if the PPI is not in the database\r
---*/\r
-;\r
+  @retval EFI_SUCCESS           if successful\r
+  @retval EFI_OUT_OF_RESOURCES  if no space in the database\r
+  @retval EFI_INVALID_PARAMETER if not a good decriptor\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiNotifyPpi (\r
   IN CONST EFI_PEI_SERVICES           **PeiServices,\r
   IN CONST EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Install a notification for a given PPI.\r
-\r
-Arguments:\r
-\r
-  PeiServices - Pointer to the PEI Service Table\r
-  NotifyList  - Pointer to list of Descriptors to notify upon.\r
+;\r
 \r
-Returns:\r
+/**\r
 \r
-  Status - EFI_SUCCESS          if successful\r
-           EFI_OUT_OF_RESOURCES if no space in the database\r
-           EFI_INVALID_PARAMETER if not a good decriptor\r
+  Process the Notify List at dispatch level.\r
 \r
---*/\r
-;\r
+  @param PrivateData  PeiCore's private data structure.\r
 \r
+**/\r
 VOID\r
 ProcessNotifyList (\r
   IN PEI_CORE_INSTANCE  *PrivateData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Process the Notify List at dispatch level.\r
-\r
-Arguments:\r
+;\r
 \r
-  PeiServices - Pointer to the PEI Service Table\r
+/**\r
 \r
-Returns:\r
+  Dispatch notifications.\r
 \r
---*/\r
-;\r
+  @param PrivateData        PeiCore's private data structure\r
+  @param NotifyType         Type of notify to fire.\r
+  @param InstallStartIndex  Install Beginning index.\r
+  @param InstallStopIndex   Install Ending index.\r
+  @param NotifyStartIndex   Notify Beginning index.\r
+  @param NotifyStopIndex    Notify Ending index.\r
 \r
+**/\r
 VOID\r
 DispatchNotify (\r
   IN PEI_CORE_INSTANCE  *PrivateData,\r
@@ -602,178 +463,138 @@ DispatchNotify (
   IN INTN                NotifyStartIndex,\r
   IN INTN                NotifyStopIndex\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Dispatch notifications.\r
-\r
-Arguments:\r
-\r
-  PeiServices         - Pointer to the PEI Service Table\r
-  NotifyType          - Type of notify to fire.\r
-  InstallStartIndex   - Install Beginning index.\r
-  InstallStopIndex    - Install Ending index.\r
-  NotifyStartIndex    - Notify Beginning index.\r
-  NotifyStopIndex    - Notify Ending index.\r
-\r
-Returns:  None\r
-\r
---*/\r
 ;\r
 \r
 //\r
 // Boot mode support functions\r
 //\r
+/**\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 BootMode               A pointer to contain the value of the boot mode.\r
+\r
+  @retval EFI_SUCCESS           The boot mode was returned successfully.\r
+  @retval EFI_INVALID_PARAMETER BootMode is NULL.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiGetBootMode (\r
   IN CONST EFI_PEI_SERVICES  **PeiServices,\r
   IN OUT EFI_BOOT_MODE *BootMode\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This service enables PEIMs to ascertain the present value of the boot mode.\r
+;\r
 \r
-Arguments:\r
+/**\r
+  This service enables PEIMs to update the boot mode variable.\r
 \r
-  PeiServices    - The PEI core services table.\r
-  BootMode       - A pointer to contain the value of the boot mode.\r
 \r
-Returns:\r
+  @param PeiServices     - The PEI core services table.\r
+  @param BootMode        - The value of the boot mode to set.\r
 \r
-  EFI_SUCCESS           - The boot mode was returned successfully.\r
-  EFI_INVALID_PARAMETER - BootMode is NULL.\r
-\r
---*/\r
-;\r
+  @return EFI_SUCCESS    - The value was successfully updated\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiSetBootMode (\r
   IN CONST EFI_PEI_SERVICES  **PeiServices,\r
   IN EFI_BOOT_MODE     BootMode\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This service enables PEIMs to update the boot mode variable.\r
-\r
-Arguments:\r
-\r
-  PeiServices    - The PEI core services table.\r
-  BootMode       - The value of the boot mode to set.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS    - The value was successfully updated\r
-\r
---*/\r
 ;\r
 \r
 //\r
 // Security support functions\r
 //\r
+/**\r
+\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
+                         NULL if being run in non-permament memory mode.\r
+\r
+**/\r
 VOID\r
 InitializeSecurityServices (\r
   IN EFI_PEI_SERVICES  **PeiServices,\r
   IN PEI_CORE_INSTANCE *OldCoreData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the security services.\r
-\r
-Arguments:\r
+;\r
 \r
-  PeiServices - The PEI core services table.\r
-  OldCoreData - Pointer to the old core data.\r
-                NULL if being run in non-permament memory mode.\r
-Returns:\r
+/**\r
+  Verify a Firmware volume\r
 \r
-  None\r
+  @param CurrentFvAddress - Pointer to the current Firmware Volume under consideration\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS             - Firmware Volume is legal\r
+  @retval EFI_SECURITY_VIOLATION  - Firmware Volume fails integrity test\r
 \r
+**/\r
 EFI_STATUS\r
 VerifyFv (\r
   IN EFI_FIRMWARE_VOLUME_HEADER  *CurrentFvAddress\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Provide a callout to the OEM FV verification service.\r
-\r
-Arguments:\r
+;\r
 \r
-  CurrentFvAddress       - Pointer to the FV under investigation.\r
+/**\r
 \r
-Returns:\r
+  Provide a callout to the security verification service.\r
 \r
-  Status - EFI_SUCCESS\r
 \r
---*/\r
-;\r
+  @param PrivateData     PeiCore's private data structure\r
+  @param VolumeHandle    Handle of FV\r
+  @param FileHandle      Handle of PEIM's ffs\r
 \r
+  @retval EFI_SUCCESS              Image is OK\r
+  @retval EFI_SECURITY_VIOLATION   Image is illegal\r
 \r
+**/\r
 EFI_STATUS\r
 VerifyPeim (\r
   IN PEI_CORE_INSTANCE      *PrivateData,\r
   IN EFI_PEI_FV_HANDLE      VolumeHandle,\r
   IN EFI_PEI_FILE_HANDLE    FileHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Provide a callout to the security verification service.\r
-\r
-Arguments:\r
+;\r
 \r
-  PeiServices          - The PEI core services table.\r
-  CurrentPeimAddress   - Pointer to the Firmware File under investigation.\r
+/**\r
 \r
-Returns:\r
+  Gets the pointer to the HOB List.\r
 \r
-  EFI_SUCCESS             - Image is OK\r
-  EFI_SECURITY_VIOLATION  - Image is illegal\r
 \r
---*/\r
-;\r
+  @param PeiServices                   The PEI core services table.\r
+  @param HobList                       Pointer to the HOB List.\r
 \r
+  @retval EFI_SUCCESS                  Get the pointer of HOB List\r
+  @retval EFI_NOT_AVAILABLE_YET        the HOB List is not yet published\r
+  @retval EFI_INVALID_PARAMETER        HobList is NULL (in debug mode)\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiGetHobList (\r
   IN CONST EFI_PEI_SERVICES  **PeiServices,\r
   IN OUT VOID          **HobList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Gets the pointer to the HOB List.\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-  HobList     - Pointer to the HOB List.\r
+;\r
 \r
-Returns:\r
+/**\r
+  Add a new HOB to the HOB List.\r
 \r
-  EFI_SUCCESS                 - Get the pointer of HOB List\r
-  EFI_NOT_AVAILABLE_YET       - the HOB List is not yet published\r
-  EFI_INVALID_PARAMETER       - HobList is NULL (in debug mode)\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
 \r
---*/\r
-;\r
+  @return  EFI_SUCCESS           Success to create hob.\r
+  @retval  EFI_INVALID_PARAMETER if Hob is NULL\r
+  @retval  EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
+  @retval  EFI_OUT_OF_RESOURCES  if there is no more memory to grow the Hoblist.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiCreateHob (\r
@@ -782,58 +603,47 @@ PeiCreateHob (
   IN UINT16            Length,\r
   IN OUT VOID          **Hob\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add a new HOB to the HOB List.\r
-\r
-Arguments:\r
+;\r
 \r
-  PeiServices - The PEI core services table.\r
-  Type        - Type of the new HOB.\r
-  Length      - Length of the new HOB to allocate.\r
-  Hob         - Pointer to the new HOB.\r
+/**\r
 \r
-Returns:\r
+  Builds a Handoff Information Table HOB\r
 \r
-  Status  - EFI_SUCCESS\r
-          - EFI_INVALID_PARAMETER if Hob is NULL\r
-          - EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
-          - EFI_OUT_OF_RESOURCES if there is no more memory to grow the Hoblist.\r
+  @param BootMode        - Current Bootmode\r
+  @param MemoryBegin     - Start Memory Address.\r
+  @param MemoryLength    - Length of Memory.\r
 \r
---*/\r
-;\r
+  @return EFI_SUCCESS Always success to initialize HOB.\r
 \r
+**/\r
 EFI_STATUS\r
 PeiCoreBuildHobHandoffInfoTable (\r
   IN EFI_BOOT_MODE         BootMode,\r
   IN EFI_PHYSICAL_ADDRESS  MemoryBegin,\r
   IN UINT64                MemoryLength\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Builds a Handoff Information Table HOB\r
-\r
-Arguments:\r
-\r
-  BootMode      - Current Bootmode\r
-  MemoryBegin   - Start Memory Address.\r
-  MemoryLength  - Length of Memory.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
 ;\r
 \r
 \r
 //\r
 // FFS Fw Volume support functions\r
 //\r
+/**\r
+  Given the input file pointer, search for the next matching file in the\r
+  FFS volume as defined by SearchType. The search starts from FileHeader inside\r
+  the Firmware Volume defined by FwVolHeader.\r
+\r
+\r
+  @param PeiServices     Pointer to the PEI Core Services Table.\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
+                         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
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFindNextFile (\r
@@ -842,32 +652,23 @@ PeiFfsFindNextFile (
   IN EFI_PEI_FV_HANDLE           FwVolHeader,\r
   IN OUT EFI_PEI_FILE_HANDLE     *FileHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input file pointer, search for the next matching file in the\r
-    FFS volume as defined by SearchType. The search starts from FileHeader inside\r
-    the Firmware Volume defined by FwVolHeader.\r
-\r
-Arguments:\r
-    PeiServices - Pointer to the PEI Core Services Table.\r
-\r
-    SearchType - Filter to find only files of this type.\r
-      Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
+;\r
 \r
-    FwVolHeader - Pointer to the FV header of the volume to search.\r
-      This parameter must point to a valid FFS volume.\r
+/**\r
+  Given the input file pointer, search for the next matching section in the\r
+  FFS volume.\r
 \r
-    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
 \r
-Returns:\r
-    EFI_NOT_FOUND - No files matching the search criteria were found\r
-    EFI_SUCCESS\r
+  @param PeiServices     Pointer to the PEI Core Services Table.\r
+  @param SectionType     Filter to find only sections of this type.\r
+  @param FileHandle      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
---*/\r
-;\r
+  @retval EFI_NOT_FOUND  No files matching the search criteria were found\r
+  @retval EFI_SUCCESS    Success to find section data in given file\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFindSectionData (\r
@@ -876,26 +677,19 @@ PeiFfsFindSectionData (
   IN EFI_PEI_FILE_HANDLE         FfsFileHeader,\r
   IN OUT VOID                    **SectionData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input file pointer, search for the next matching section in the\r
-    FFS volume.\r
+;\r
 \r
-Arguments:\r
-    PeiServices - Pointer to the PEI Core Services Table.\r
-    SearchType - Filter to find only sections of this type.\r
-    FfsFileHeader  - Pointer to the current file to search.\r
-    SectionData - Pointer to the Section matching SectionType in FfsFileHeader.\r
-                - NULL if section not found\r
+/**\r
+  search the firmware volumes by index\r
 \r
-Returns:\r
-    EFI_NOT_FOUND - No files matching the search criteria were found\r
-    EFI_SUCCESS\r
+  @param PeiServices     The PEI core services table.\r
+  @param Instance        Instance of FV to find\r
+  @param VolumeHandle    Pointer to found Volume.\r
 \r
---*/\r
-;\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
@@ -903,61 +697,44 @@ PeiFvFindNextVolume (
   IN UINTN                           Instance,\r
   IN OUT EFI_PEI_FV_HANDLE           *FwVolHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Return the BFV location\r
-\r
-  BugBug -- Move this to the location of this code to where the\r
-  other FV and FFS support code lives.\r
-  Also, update to use FindFV for instances #'s >= 1.\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-  Instance    - Instance of FV to find\r
-  FwVolHeader - Pointer to contain the data to return\r
-\r
-Returns:\r
-  Pointer to the Firmware Volume instance requested\r
-\r
-  EFI_INVALID_PARAMETER     - FwVolHeader is NULL\r
-\r
-  EFI_SUCCESS               - Firmware volume instance successfully found.\r
-\r
---*/\r
 ;\r
 \r
 //\r
 // Memory support functions\r
 //\r
+/**\r
+\r
+  Initialize the memory services.\r
+\r
+\r
+  @param PrivateData     Add parameter description\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 OldCoreData     Pointer to the PEI Core data.\r
+                         NULL if being run in non-permament memory mode.\r
+\r
+**/\r
 VOID\r
 InitializeMemoryServices (\r
   IN PEI_CORE_INSTANCE           *PrivateData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF  *SecCoreData,\r
   IN PEI_CORE_INSTANCE           *OldCoreData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the memory services.\r
-\r
-Arguments:\r
+;\r
 \r
-  PeiServices          - The PEI core services table.\r
-  PeiStartupDescriptor - Information and services provided by SEC phase.\r
-  OldCoreData          - Pointer to the PEI Core data.\r
-                         NULL if being run in non-permament memory mode.\r
+/**\r
 \r
-Returns:\r
+  Install the permanent memory is now available.\r
+  Creates HOB (PHIT and Stack).\r
 \r
-  None\r
+  @param PeiServices     - The PEI core services table.\r
+  @param MemoryBegin     - Start of memory address.\r
+  @param MemoryLength    - Length of memory.\r
 \r
---*/\r
-;\r
+  @return EFI_SUCCESS Always success.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiInstallPeiMemory (\r
@@ -965,26 +742,26 @@ PeiInstallPeiMemory (
   IN EFI_PHYSICAL_ADDRESS  MemoryBegin,\r
   IN UINT64                MemoryLength\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Install the permanent memory is now available.\r
-  Creates HOB (PHIT and Stack).\r
+;\r
 \r
-Arguments:\r
+/**\r
 \r
-  PeiServices   - The PEI core services table.\r
-  MemoryBegin   - Start of memory address.\r
-  MemoryLength  - Length of memory.\r
+  Memory allocation service on permanent memory,\r
+  not usable prior to the memory installation.\r
 \r
-Returns:\r
 \r
-  Status  - EFI_SUCCESS\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
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS              The allocation was successful\r
+  @retval EFI_INVALID_PARAMETER    Only AllocateAnyAddress is supported.\r
+  @retval EFI_NOT_AVAILABLE_YET    Called with permanent memory not available\r
+  @retval EFI_OUT_OF_RESOURCES     There is not enough HOB heap to satisfy the requirement\r
+                                   to allocate the number of pages.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiAllocatePages (\r
@@ -993,32 +770,22 @@ PeiAllocatePages (
   IN UINTN                      Pages,\r
   OUT EFI_PHYSICAL_ADDRESS      *Memory\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Memory allocation service on permanent memory,\r
-  not usable prior to the memory installation.\r
+;\r
 \r
-Arguments:\r
+/**\r
 \r
-  PeiServices - The PEI core services table.\r
-  Type        - Type of allocation.\r
-  MemoryType  - Type of memory to allocate.\r
-  Pages       - Number of pages to allocate.\r
-  Memory      - Pointer of memory allocated.\r
+  Memory allocation service on the CAR.\r
 \r
-Returns:\r
 \r
-  Status - EFI_SUCCESS              The allocation was successful\r
-           EFI_INVALID_PARAMETER    Only AllocateAnyAddress is supported.\r
-           EFI_NOT_AVAILABLE_YET    Called with permanent memory not available\r
-           EFI_OUT_OF_RESOURCES     There is not enough HOB heap to satisfy the requirement\r
-                                    to allocate the number of pages.\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
 \r
---*/\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
+                                   to allocate the requested size.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiAllocatePool (\r
@@ -1026,29 +793,23 @@ PeiAllocatePool (
   IN UINTN                      Size,\r
   OUT VOID                      **Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Memory allocation service on the CAR.\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
+;\r
 \r
-  Size        - Amount of memory required\r
+/**\r
 \r
-  Buffer      - Address of pointer to the buffer\r
+  Routine for load image file.\r
 \r
-Returns:\r
 \r
-  Status - EFI_SUCCESS              The allocation was successful\r
-           EFI_OUT_OF_RESOURCES     There is not enough heap to satisfy the requirement\r
-                                    to allocate the requested size.\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
 \r
---*/\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
 \r
+**/\r
 EFI_STATUS\r
 PeiLoadImage (\r
   IN  EFI_PEI_SERVICES            **PeiServices,\r
@@ -1056,28 +817,24 @@ PeiLoadImage (
   OUT    EFI_PHYSICAL_ADDRESS     *EntryPoint,\r
   OUT    UINT32                   *AuthenticationState\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get entry point of a Peim file.\r
-\r
-Arguments:\r
-\r
-  PeiServices                 - Calling context.\r
-\r
-  PeimFileHeader              - Peim file's header.\r
+;\r
 \r
-  EntryPoint                  - Entry point of that Peim file.\r
+/**\r
 \r
-Returns:\r
+  Core version of the Status Code reporter\r
 \r
-  Status code.\r
 \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
 \r
+  @retval EFI_SUCCESS             if status code is successfully reported\r
+  @retval EFI_NOT_AVAILABLE_YET   if StatusCodePpi has not been installed\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiReportStatusCode (\r
@@ -1088,81 +845,56 @@ PeiReportStatusCode (
   IN CONST EFI_GUID                 *CallerId,\r
   IN CONST EFI_STATUS_CODE_DATA     *Data OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Core version of the Status Code reporter\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-\r
-  CodeType    - Type of Status Code.\r
-\r
-  Value       - Value to output for Status Code.\r
-\r
-  Instance    - Instance Number of this status code.\r
-\r
-  CallerId    - ID of the caller of this status code.\r
+;\r
 \r
-  Data        - Optional data associated with this status code.\r
+/**\r
 \r
-Returns:\r
+  Core version of the Reset System\r
 \r
-  Status  - EFI_SUCCESS             if status code is successfully reported\r
-          - EFI_NOT_AVAILABLE_YET   if StatusCodePpi has not been installed\r
 \r
---*/\r
-;\r
+  @param PeiServices     - The PEI core services table.\r
 \r
+  @retval EFI_NOT_AVAILABLE_YET     PPI not available yet.\r
+  @retval EFI_DEVICE_ERROR          Did not reset system.\r
+                                    Otherwise, resets the system.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiResetSystem (\r
   IN CONST EFI_PEI_SERVICES   **PeiServices\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Core version of the Reset System\r
-\r
-Arguments:\r
+;\r
 \r
-  PeiServices - The PEI core services table.\r
+/**\r
 \r
-Returns:\r
+  Initialize PeiCore Fv List.\r
 \r
-  Status  - EFI_NOT_AVAILABLE_YET. PPI not available yet.\r
-          - EFI_DEVICE_ERROR.   Did not reset system.\r
 \r
-  Otherwise, resets the system.\r
+  @param PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
+  @param SecCoreData     - Pointer to EFI_SEC_PEI_HAND_OFF.\r
 \r
---*/\r
-;\r
+  @return NONE\r
 \r
+**/\r
 VOID\r
 PeiInitializeFv (\r
   IN  PEI_CORE_INSTANCE           *PrivateData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Initialize PeiCore Fv List.\r
+/**\r
+  Process Firmware Volum Information once FvInfoPPI install.\r
 \r
-Arguments:\r
-  PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
-  SecCoreData     - Pointer to EFI_SEC_PEI_HAND_OFF.\r
 \r
-Returns:\r
-  NONE\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
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS if the interface could be successfully installed\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FirmwareVolmeInfoPpiNotifyCallback (\r
@@ -1170,25 +902,21 @@ FirmwareVolmeInfoPpiNotifyCallback (
   IN EFI_PEI_NOTIFY_DESCRIPTOR     *NotifyDescriptor,\r
   IN VOID                          *Ppi\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Process Firmware Volum Information once FvInfoPPI install.\r
-\r
-Arguments:\r
+;\r
 \r
-  PeiServices - General purpose services available to every PEIM.\r
+/**\r
 \r
-Returns:\r
+  Given the input VolumeHandle, search for the next matching name file.\r
 \r
-  Status -  EFI_SUCCESS if the interface could be successfully\r
-            installed\r
 \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
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFindFileByName (\r
@@ -1196,103 +924,55 @@ PeiFfsFindFileByName (
   IN  EFI_PEI_FV_HANDLE     VolumeHandle,\r
   OUT EFI_PEI_FILE_HANDLE   *FileHandle\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
+/**\r
 \r
-  Given the input VolumeHandle, search for the next matching name file.\r
+  Returns information about a specific file.\r
 \r
-Arguments:\r
 \r
-  FileName      - File name to search.\r
-  VolumeHandle  - The current FV to search.\r
-  FileHandle    - Pointer to the file matching name in VolumeHandle.\r
-                - NULL if file not found\r
-Returns:\r
-  EFI_STATUS\r
-\r
---*/\r
-;\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
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsGetFileInfo (\r
   IN EFI_PEI_FILE_HANDLE  FileHandle,\r
   OUT EFI_FV_FILE_INFO    *FileInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Collect information of given file.\r
+/**\r
 \r
-Arguments:\r
-  FileHandle   - The handle to file.\r
-  FileInfo     - Pointer to the file information.\r
+  Collect information of given Fv Volume.\r
 \r
-Returns:\r
-  EFI_STATUS\r
-\r
---*/\r
-;\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
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsGetVolumeInfo (\r
   IN EFI_PEI_FV_HANDLE  VolumeHandle,\r
   OUT EFI_FV_INFO       *VolumeInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Collect information of given Fv Volume.\r
-\r
-Arguments:\r
-  VolumeHandle    - The handle to Fv Volume.\r
-  VolumeInfo      - The pointer to volume information.\r
-\r
-Returns:\r
-  EFI_STATUS\r
-\r
---*/\r
-;\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PeiRegisterForShadow (\r
-  IN EFI_PEI_FILE_HANDLE       FileHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This routine enable a PEIM to register itself to shadow when PEI Foundation\r
-  discovery permanent memory.\r
-\r
-Arguments:\r
-  FileHandle  - File handle of a PEIM.\r
-\r
-Returns:\r
-  EFI_NOT_FOUND        - The file handle doesn't point to PEIM itself.\r
-  EFI_ALREADY_STARTED  - Indicate that the PEIM has been registered itself.\r
-  EFI_SUCCESS          - Successfully to register itself.\r
-\r
---*/\r
 ;\r
 \r
-\r
 /**\r
   This routine enable a PEIM to register itself to shadow when PEI Foundation\r
   discovery permanent memory.\r
 \r
-       @param FileHandle       File handle of a PEIM.\r
+  @param FileHandle             File handle of a PEIM.\r
 \r
-  @retval EFI_NOT_FOUND                                The file handle doesn't point to PEIM itself.\r
-  @retval EFI_ALREADY_STARTED          Indicate that the PEIM has been registered itself.\r
-  @retval EFI_SUCCESS                                          Successfully to register itself.\r
+  @retval EFI_NOT_FOUND         The file handle doesn't point to PEIM itself.\r
+  @retval EFI_ALREADY_STARTED   Indicate that the PEIM has been registered itself.\r
+  @retval EFI_SUCCESS           Successfully to register itself.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1302,6 +982,23 @@ PeiRegisterForShadow (
   )\r
 ;\r
 \r
+/**\r
+  Given the input file pointer, search for the next matching file in the\r
+  FFS volume as defined by SearchType. The search starts from FileHeader inside\r
+  the Firmware Volume defined by FwVolHeader.\r
+\r
+\r
+  @param FvHandle        Pointer to the FV header of the volume to search\r
+  @param FileName        File name\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 FileHandle      This parameter must point to a valid FFS volume.\r
+  @param AprioriFile     Pointer to AprioriFile image in this FV if has\r
+\r
+  @return 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
 PeiFindFileEx (\r
   IN  CONST EFI_PEI_FV_HANDLE        FvHandle,\r
@@ -1310,63 +1007,34 @@ PeiFindFileEx (
   IN OUT    EFI_PEI_FILE_HANDLE      *FileHandle,\r
   IN OUT    EFI_PEI_FV_HANDLE        *AprioriFile  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input file pointer, search for the next matching file in the\r
-    FFS volume as defined by SearchType. The search starts from FileHeader inside\r
-    the Firmware Volume defined by FwVolHeader.\r
-\r
-Arguments:\r
-    PeiServices - Pointer to the PEI Core Services Table.\r
-    SearchType - Filter to find only files of this type.\r
-      Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
-    FwVolHeader - Pointer to the FV header of the volume to search.\r
-      This parameter must point to a valid FFS volume.\r
-    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
-    Flag        - Indicator for if this is for PEI Dispath search\r
-\r
-Returns:\r
-    EFI_NOT_FOUND - No files matching the search criteria were found\r
-    EFI_SUCCESS\r
-\r
---*/\r
 ;\r
 \r
-VOID\r
-InitializeImageServices (\r
-  IN  PEI_CORE_INSTANCE   *PrivateData,\r
-  IN  PEI_CORE_INSTANCE   *OldCoreData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Install Pei Load File PPI.\r
 \r
-Arguments:\r
-\r
-  PrivateData    - Pointer to PEI_CORE_INSTANCE.\r
-  OldCoreData    - Pointer to PEI_CORE_INSTANCE.\r
 \r
-Returns:\r
+  @param PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
+  @param OldCoreData     - Pointer to PEI_CORE_INSTANCE.\r
 \r
-  NONE.\r
-\r
---*/\r
+**/\r
+VOID\r
+InitializeImageServices (\r
+  IN  PEI_CORE_INSTANCE   *PrivateData,\r
+  IN  PEI_CORE_INSTANCE   *OldCoreData\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          Pointer to the PEI Core Services Table.\r
-       @param FileHandle               File handle of a Fv type file.\r
+  @param PeiServices          Pointer to the PEI Core Services Table.\r
+  @param FileHandle           File handle of a Fv type file.\r
   @param AuthenticationState  Pointer to attestation authentication state of image.\r
 \r
 \r
-  @retval EFI_NOT_FOUND                                FV image can't be found.\r
-  @retval EFI_SUCCESS                                          Successfully to process it.\r
+  @retval EFI_NOT_FOUND       FV image can't be found.\r
+  @retval EFI_SUCCESS         Successfully to process it.\r
 \r
 **/\r
 EFI_STATUS\r
index 85dbbd1a6a3e658dc19e7687266128d2fd127253..056165e689931cbc1469ba281d767615ba787c46 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  Pei Core Main Entry Point\r
+  \r
 Copyright (c) 2006, 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
@@ -9,21 +10,11 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  PeiMain.c\r
-\r
-Abstract:\r
-\r
-  Pei Core Main Entry Point\r
-\r
-Revision History\r
-\r
 **/\r
 \r
 #include <PeiMain.h>\r
 \r
-static EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi = {\r
+STATIC EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiPeiMemoryDiscoveredPpiGuid,\r
   NULL\r
@@ -33,7 +24,7 @@ static EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi = {
 // Pei Core Module Variables\r
 //\r
 //\r
-static EFI_PEI_SERVICES  mPS = {\r
+STATIC EFI_PEI_SERVICES  gPs = {\r
   {\r
     PEI_SERVICES_SIGNATURE,\r
     PEI_SERVICES_REVISION,\r
@@ -74,41 +65,35 @@ static EFI_PEI_SERVICES  mPS = {
   PeiRegisterForShadow\r
 };\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-PeiCore (\r
-  IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreData,\r
-  IN CONST EFI_PEI_PPI_DESCRIPTOR      *PpiList,\r
-  IN VOID                              *Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   The entry routine to Pei Core, invoked by PeiMain during transition\r
   from SEC to PEI. After switching stack in the PEI core, it will restart\r
   with the old core data.\r
 \r
-Arguments:\r
 \r
-  SecCoreData          - Points to a data structure containing information about the PEI core's operating\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
-  PpiList              - Points to a list of one or more PPI descriptors to be installed initially by the PEI core.\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
-  Data                 - Pointer to old core data that is used to initialize the\r
+  @param Data            Pointer to old core data that is used to initialize the\r
                          core's data areas.\r
 \r
-Returns:\r
+  @retval EFI_NOT_FOUND  Never reach\r
 \r
-  This function never returns\r
-  EFI_NOT_FOUND        - Never reach\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiCore (\r
+  IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreData,\r
+  IN CONST EFI_PEI_PPI_DESCRIPTOR      *PpiList,\r
+  IN VOID                              *Data\r
+  )\r
 {\r
   PEI_CORE_INSTANCE                                     PrivateData;\r
   EFI_STATUS                                            Status;\r
@@ -144,14 +129,14 @@ Returns:
     CpuIo = (VOID*)PrivateData.ServiceTableShadow.CpuIo;\r
     PciCfg = (VOID*)PrivateData.ServiceTableShadow.PciCfg;\r
     \r
-    CopyMem (&PrivateData.ServiceTableShadow, &mPS, sizeof (mPS));\r
+    CopyMem (&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs));\r
     \r
     PrivateData.ServiceTableShadow.CpuIo  = CpuIo;\r
     PrivateData.ServiceTableShadow.PciCfg = PciCfg;\r
   } else {\r
     ZeroMem (&PrivateData, sizeof (PEI_CORE_INSTANCE));\r
     PrivateData.Signature = PEI_CORE_HANDLE_SIGNATURE;\r
-    CopyMem (&PrivateData.ServiceTableShadow, &mPS, sizeof (mPS));\r
+    CopyMem (&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs));\r
   }\r
 \r
   PrivateData.PS = &PrivateData.ServiceTableShadow;\r
index feae0fbb9fb47cc46cc48dffe2fcaca1fc313ee5..fa60d82a5be0857160a9bd4e537c26f74d8486de 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  EFI PEI Core PPI services\r
+  \r
 Copyright (c) 2006, 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
@@ -9,51 +10,43 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  Ppi.c\r
+**/\r
 \r
-Abstract:\r
+#include <PeiMain.h>\r
 \r
-  EFI PEI Core PPI services\r
+/**\r
 \r
-Revision History\r
+  Initialize PPI services.\r
 \r
-**/\r
 \r
-#include <PeiMain.h>\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
 \r
+**/\r
 VOID\r
 InitializePpiServices (\r
   IN PEI_CORE_INSTANCE *PrivateData,\r
   IN PEI_CORE_INSTANCE *OldCoreData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize PPI services.\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-  OldCoreData - Pointer to the PEI Core data.\r
-                NULL if being run in non-permament memory mode.\r
-\r
-Returns:\r
-  Nothing\r
-\r
---*/\r
 {\r
   if (OldCoreData == NULL) {\r
     PrivateData->PpiData.NotifyListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;\r
     PrivateData->PpiData.DispatchListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;\r
     PrivateData->PpiData.LastDispatchedNotify = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;\r
   }\r
-\r
-  return;\r
 }\r
 \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
+  @param OldCheckingBottom   The old checking bottom.\r
+  @param OldCheckingTop      The old checking top.\r
+  @param NewHandOffHob       The new handoff HOB list.\r
+\r
+**/\r
 VOID\r
 ConvertPpiPointers (\r
   IN CONST EFI_PEI_SERVICES                     **PeiServices,\r
@@ -61,22 +54,6 @@ ConvertPpiPointers (
   IN UINTN                         OldCheckingTop,\r
   IN EFI_HOB_HANDOFF_INFO_TABLE    *NewHandOffHob\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Migrate the Hob list from the CAR stack to PEI installed memory.\r
-\r
-Arguments:\r
-\r
-  PeiServices       - The PEI core services table.\r
-  OldCheckingBottom - The old checking bottom.\r
-  OldCheckingTop    - The old checking top.\r
-  NewHandOffHob     - The new handoff HOB list.\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   PEI_CORE_INSTANCE     *PrivateData;\r
   UINT8                 Index;\r
@@ -132,33 +109,25 @@ Returns:
   }\r
 }\r
 \r
+/**\r
 \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
+\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
 EFIAPI\r
 PeiInstallPpi (\r
   IN CONST EFI_PEI_SERVICES        **PeiServices,\r
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *PpiList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Install PPI services.\r
-\r
-Arguments:\r
-\r
-  PeiServices - Pointer to the PEI Service Table\r
-  PpiList     - Pointer to a list of PEI PPI Descriptors.\r
-\r
-Returns:\r
-\r
-    EFI_SUCCESS             - if all PPIs in PpiList are successfully installed.\r
-    EFI_INVALID_PARAMETER   - if PpiList is NULL pointer\r
-    EFI_INVALID_PARAMETER   - if any PPI in PpiList is not valid\r
-    EFI_OUT_OF_RESOURCES    - if there is no more memory resource to install PPI\r
-\r
---*/\r
 {\r
   PEI_CORE_INSTANCE *PrivateData;\r
   INTN              Index;\r
@@ -230,7 +199,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\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
 \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
 EFIAPI\r
 PeiReInstallPpi (\r
@@ -238,26 +220,6 @@ PeiReInstallPpi (
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *OldPpi,\r
   IN CONST EFI_PEI_PPI_DESCRIPTOR  *NewPpi\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Re-Install PPI services.\r
-\r
-Arguments:\r
-\r
-  PeiServices - Pointer to the PEI Service Table\r
-  OldPpi      - Pointer to the old PEI PPI Descriptors.\r
-  NewPpi      - Pointer to the new PEI PPI Descriptors.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - if the operation was successful\r
-  EFI_INVALID_PARAMETER - if OldPpi or NewPpi is NULL\r
-  EFI_INVALID_PARAMETER - if NewPpi is not valid\r
-  EFI_NOT_FOUND         - if the PPI was not in the database\r
-\r
---*/\r
 {\r
   PEI_CORE_INSTANCE   *PrivateData;\r
   INTN                Index;\r
@@ -308,7 +270,22 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\r
+  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
+                         returns a pointer to the descriptor (includes flags, etc)\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
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiLocatePpi (\r
@@ -318,26 +295,6 @@ PeiLocatePpi (
   IN OUT EFI_PEI_PPI_DESCRIPTOR  **PpiDescriptor,\r
   IN OUT VOID                **Ppi\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locate a given named PPI.\r
-\r
-Arguments:\r
-\r
-  PeiServices   - Pointer to the PEI Service Table\r
-  Guid          - Pointer to GUID of the PPI.\r
-  Instance      - Instance Number to discover.\r
-  PpiDescriptor - Pointer to reference the found descriptor. If not NULL,\r
-                returns a pointer to the descriptor (includes flags, etc)\r
-  Ppi           - Pointer to reference the found PPI\r
-\r
-Returns:\r
-\r
-  Status -  EFI_SUCCESS   if the PPI is in the database\r
-            EFI_NOT_FOUND if the PPI is not in the database\r
---*/\r
 {\r
   PEI_CORE_INSTANCE   *PrivateData;\r
   INTN                Index;\r
@@ -383,31 +340,25 @@ Returns:
   return EFI_NOT_FOUND;\r
 }\r
 \r
+/**\r
 \r
+  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
+\r
+  @retval EFI_SUCCESS           if successful\r
+  @retval EFI_OUT_OF_RESOURCES  if no space in the database\r
+  @retval EFI_INVALID_PARAMETER if not a good decriptor\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiNotifyPpi (\r
   IN CONST EFI_PEI_SERVICES           **PeiServices,\r
   IN CONST EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Install a notification for a given PPI.\r
-\r
-Arguments:\r
-\r
-  PeiServices - Pointer to the PEI Service Table\r
-  NotifyList  - Pointer to list of Descriptors to notify upon.\r
-\r
-Returns:\r
-\r
-  Status - EFI_SUCCESS           if successful\r
-           EFI_OUT_OF_RESOURCES  if no space in the database\r
-           EFI_INVALID_PARAMETER if not a good decriptor\r
-\r
---*/\r
 {\r
   PEI_CORE_INSTANCE                *PrivateData;\r
   INTN                             Index;\r
@@ -507,24 +458,17 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-ProcessNotifyList (\r
-  IN PEI_CORE_INSTANCE  *PrivateData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Process the Notify List at dispatch level.\r
 \r
-Arguments:\r
-\r
-  PeiServices - Pointer to the PEI Service Table\r
-\r
-Returns:\r
-\r
---*/\r
+  @param PrivateData  PeiCore's private data structure.\r
 \r
+**/\r
+VOID\r
+ProcessNotifyList (\r
+  IN PEI_CORE_INSTANCE  *PrivateData\r
+  )\r
 {\r
   INTN                    TempValue;\r
 \r
@@ -577,6 +521,18 @@ Returns:
   return;\r
 }\r
 \r
+/**\r
+\r
+  Dispatch notifications.\r
+\r
+  @param PrivateData        PeiCore's private data structure\r
+  @param NotifyType         Type of notify to fire.\r
+  @param InstallStartIndex  Install Beginning index.\r
+  @param InstallStopIndex   Install Ending index.\r
+  @param NotifyStartIndex   Notify Beginning index.\r
+  @param NotifyStopIndex    Notify Ending index.\r
+\r
+**/\r
 VOID\r
 DispatchNotify (\r
   IN PEI_CORE_INSTANCE  *PrivateData,\r
@@ -586,25 +542,6 @@ DispatchNotify (
   IN INTN                NotifyStartIndex,\r
   IN INTN                NotifyStopIndex\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Dispatch notifications.\r
-\r
-Arguments:\r
-\r
-  PeiServices         - Pointer to the PEI Service Table\r
-  NotifyType          - Type of notify to fire.\r
-  InstallStartIndex   - Install Beginning index.\r
-  InstallStopIndex    - Install Ending index.\r
-  NotifyStartIndex    - Notify Beginning index.\r
-  NotifyStopIndex    - Notify Ending index.\r
-\r
-Returns:  None\r
-\r
---*/\r
-\r
 {\r
   INTN                   Index1;\r
   INTN                   Index2;\r
index 4fcb59f3726a8f964ac37b4ee436cf10b304c16c..f71a23375f62a3f55985aca084bd1ddba68b7ce1 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  Pei Core Reset System Support\r
+  \r
 Copyright (c) 2006, 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
@@ -9,43 +10,27 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
+**/\r
 \r
-  Reset.c\r
+#include <PeiMain.h>\r
 \r
-Abstract:\r
+/**\r
 \r
-  Pei Core Reset System Support\r
+  Core version of the Reset System\r
 \r
-Revision History\r
 \r
-**/\r
+  @param PeiServices     - The PEI core services table.\r
 \r
-#include <PeiMain.h>\r
+  @retval EFI_NOT_AVAILABLE_YET     PPI not available yet.\r
+  @retval EFI_DEVICE_ERROR          Did not reset system.\r
+                                    Otherwise, resets the system.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiResetSystem (\r
   IN CONST EFI_PEI_SERVICES         **PeiServices\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Core version of the Reset System\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-\r
-Returns:\r
-\r
-  Status  - EFI_NOT_AVAILABLE_YET. PPI not available yet.\r
-          - EFI_DEVICE_ERROR.   Did not reset system.\r
-          \r
-  Otherwise, resets the system. \r
-\r
---*/\r
 {\r
   EFI_STATUS        Status;\r
   EFI_PEI_RESET_PPI *ResetPpi;\r
index ac02f594f3b251279dfe3476113646f1fae601f4..cf3344760208164c6420a5379e22556058d2e6be 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  EFI PEI Core Security services\r
+  \r
 Copyright (c) 2006, 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
@@ -9,19 +10,21 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
+**/\r
 \r
-  Security.c\r
+#include <PeiMain.h>\r
 \r
-Abstract:\r
+/**\r
 \r
-  EFI PEI Core Security services\r
+  Provide a callback for when the security PPI is installed.\r
 \r
-**/\r
+  @param PeiServices     - The PEI core services table.\r
+  @param NotifyDescriptor - The descriptor for the notification event.\r
+  @param Ppi             - Pointer to the PPI in question.\r
 \r
-#include <PeiMain.h>\r
+  @return Always success\r
 \r
-STATIC\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 SecurityPpiNotifyCallback (\r
@@ -30,33 +33,27 @@ SecurityPpiNotifyCallback (
   IN VOID                       *Ppi\r
   );\r
 \r
-static EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList = {\r
+STATIC EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList = {\r
    EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,\r
    &gEfiPeiSecurity2PpiGuid,\r
    SecurityPpiNotifyCallback\r
 };\r
 \r
-VOID\r
-InitializeSecurityServices (\r
-  IN EFI_PEI_SERVICES  **PeiServices,\r
-  IN PEI_CORE_INSTANCE *OldCoreData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Initialize the security services.\r
 \r
-Arguments:\r
 \r
-  PeiServices - The PEI core services table.\r
-  OldCoreData - Pointer to the old core data.\r
-                NULL if being run in non-permament memory mode.\r
-Returns:\r
+  @param PeiServices     - The PEI core services table.\r
+  @param OldCoreData     - Pointer to the old core data.\r
+                         NULL if being run in non-permament memory mode.\r
 \r
-  None\r
-\r
---*/\r
+**/\r
+VOID\r
+InitializeSecurityServices (\r
+  IN EFI_PEI_SERVICES  **PeiServices,\r
+  IN PEI_CORE_INSTANCE *OldCoreData\r
+  )\r
 {\r
   if (OldCoreData == NULL) {\r
     PeiServicesNotifyPpi (&mNotifyList);\r
@@ -64,7 +61,17 @@ Returns:
   return;\r
 }\r
 \r
-STATIC\r
+/**\r
+\r
+  Provide a callback for when the security PPI is installed.\r
+\r
+  @param PeiServices     - The PEI core services table.\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
@@ -72,23 +79,6 @@ SecurityPpiNotifyCallback (
   IN EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyDescriptor,\r
   IN VOID                       *Ppi\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Provide a callback for when the security PPI is installed.\r
-\r
-Arguments:\r
-\r
-  PeiServices       - The PEI core services table.\r
-  NotifyDescriptor  - The descriptor for the notification event.\r
-  Ppi               - Pointer to the PPI in question.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS - The function is successfully processed.\r
-\r
---*/\r
 {\r
   PEI_CORE_INSTANCE                       *PrivateData;\r
 \r
@@ -106,29 +96,25 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-VerifyPeim (\r
-  IN PEI_CORE_INSTANCE      *PrivateData,\r
-  IN EFI_PEI_FV_HANDLE      VolumeHandle,\r
-  IN EFI_PEI_FILE_HANDLE    FileHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Provide a callout to the security verification service.\r
 \r
-Arguments:\r
 \r
-  PeiServices          - The PEI core services table.\r
-  CurrentPeimAddress   - Pointer to the Firmware File under investigation.\r
+  @param PrivateData     PeiCore's private data structure\r
+  @param VolumeHandle    Handle of FV\r
+  @param FileHandle      Handle of PEIM's ffs\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS              Image is OK\r
+  @retval EFI_SECURITY_VIOLATION   Image is illegal\r
 \r
-  EFI_SUCCESS             - Image is OK\r
-  EFI_SECURITY_VIOLATION  - Image is illegal\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+VerifyPeim (\r
+  IN PEI_CORE_INSTANCE      *PrivateData,\r
+  IN EFI_PEI_FV_HANDLE      VolumeHandle,\r
+  IN EFI_PEI_FILE_HANDLE    FileHandle\r
+  )\r
 {\r
   EFI_STATUS                      Status;\r
   UINT32                          AuthenticationStatus;\r
@@ -161,26 +147,19 @@ Returns:
 }\r
 \r
 \r
+/**\r
+  Verify a Firmware volume.\r
+\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
+\r
+**/\r
 EFI_STATUS\r
 VerifyFv (\r
   IN EFI_FIRMWARE_VOLUME_HEADER  *CurrentFvAddress\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Verify a Firmware volume\r
-\r
-Arguments:\r
-\r
-  CurrentFvAddress - Pointer to the current Firmware Volume under consideration\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS             - Firmware Volume is legal\r
-  EFI_SECURITY_VIOLATION  - Firmware Volume fails integrity test\r
-\r
---*/\r
 {\r
   //\r
   // Right now just pass the test.  Future can authenticate and/or check the\r
index bd8cb26e61732ce7cc3e66fc61feb6d4945a64a1..8e271d5e633848e736d879f23a81ecd3449e01af 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-\r
+  Pei Core Status Code Support\r
+  \r
 Copyright (c) 2006, 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
@@ -9,20 +10,26 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
+**/\r
 \r
-  StatusCode.c\r
+#include <PeiMain.h>\r
 \r
-Abstract:\r
+/**\r
 \r
-  Pei Core Status Code Support\r
+  Core version of the Status Code reporter\r
 \r
-Revision History\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
 \r
-#include <PeiMain.h>\r
+  @retval EFI_SUCCESS             if status code is successfully reported\r
+  @retval EFI_NOT_AVAILABLE_YET   if StatusCodePpi has not been installed\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiReportStatusCode (\r
@@ -33,32 +40,6 @@ PeiReportStatusCode (
   IN CONST EFI_GUID                 *CallerId,\r
   IN CONST EFI_STATUS_CODE_DATA     *Data OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Core version of the Status Code reporter\r
-\r
-Arguments:\r
-\r
-  PeiServices - The PEI core services table.\r
-  \r
-  CodeType    - Type of Status Code.\r
-  \r
-  Value       - Value to output for Status Code.\r
-  \r
-  Instance    - Instance Number of this status code.\r
-  \r
-  CallerId    - ID of the caller of this status code.\r
-  \r
-  Data        - Optional data associated with this status code.\r
-\r
-Returns:\r
-\r
-  Status  - EFI_SUCCESS             if status code is successfully reported\r
-          - EFI_NOT_AVAILABLE_YET   if StatusCodePpi has not been installed\r
-\r
---*/\r
 {\r
   EFI_STATUS                Status;\r
   EFI_PEI_PROGRESS_CODE_PPI *StatusCodePpi;\r
@@ -87,7 +68,6 @@ Returns:
    return Status;   \r
   } \r
   \r
-  \r
   return  EFI_NOT_AVAILABLE_YET; \r
 }\r
 \r