]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Gcd/gcd.c
Add doxygen style comments for functions in DxeMain.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Gcd / gcd.c
index 23477be04748bc2d4e766efb145edc3c247f65d6..b6a0f1b763b0d9f41165b7c9074a16b355fba734 100644 (file)
@@ -89,86 +89,58 @@ GCD_ATTRIBUTE_CONVERSION_ENTRY mAttributeConversionTable[] = {
   { 0, 0, FALSE }\r
 };\r
 \r
+\r
+/**\r
+  Acquire memory lock on mGcdMemorySpaceLock.\r
+\r
+**/\r
 VOID\r
 CoreAcquireGcdMemoryLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Acquire memory lock on mGcdMemorySpaceLock\r
-\r
-Arguments:\r
-    None\r
-\r
-Returns:\r
-    None\r
-\r
---*/\r
 {\r
   CoreAcquireLock (&mGcdMemorySpaceLock);\r
 }\r
 \r
 \r
+\r
+/**\r
+  Release memory lock on mGcdMemorySpaceLock.\r
+\r
+**/\r
 VOID\r
 CoreReleaseGcdMemoryLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Release memory lock on mGcdMemorySpaceLock\r
-\r
-Arguments:\r
-    None\r
-\r
-Returns:\r
-    None\r
-\r
---*/\r
 {\r
   CoreReleaseLock (&mGcdMemorySpaceLock);\r
 }\r
 \r
 \r
+\r
+/**\r
+  Acquire memory lock on mGcdIoSpaceLock.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreAcquireGcdIoLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Acquire memory lock on mGcdIoSpaceLock\r
-\r
-Arguments:\r
-    None\r
-\r
-Returns:\r
-    None\r
-\r
---*/\r
 {\r
   CoreAcquireLock (&mGcdIoSpaceLock);\r
 }\r
 \r
+\r
+/**\r
+  Release memory lock on mGcdIoSpaceLock.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreReleaseGcdIoLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Release memory lock on mGcdIoSpaceLock\r
-\r
-Arguments:\r
-    None\r
-\r
-Returns:\r
-    None\r
-\r
---*/\r
 {\r
   CoreReleaseLock (&mGcdIoSpaceLock);\r
 }\r
@@ -178,6 +150,19 @@ Returns:
 //\r
 // GCD Initialization Worker Functions\r
 //\r
+\r
+/**\r
+  Aligns a value to the specified boundary.\r
+\r
+  @param  Value                  64 bit value to align \r
+  @param  Alignment              Log base 2 of the boundary to align Value to \r
+  @param  RoundUp                TRUE if Value is to be rounded up to the nearest \r
+                                 aligned boundary.  FALSE is Value is to be \r
+                                 rounded down to the nearest aligned boundary. \r
+\r
+  @return A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
+\r
+**/\r
 STATIC\r
 UINT64\r
 AlignValue (\r
@@ -185,24 +170,6 @@ AlignValue (
   IN UINTN    Alignment,\r
   IN BOOLEAN  RoundUp\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Aligns a value to the specified boundary.\r
-\r
-Arguments:\r
-\r
-  Value     - 64 bit value to align\r
-  Alignment - Log base 2 of the boundary to align Value to\r
-  RoundUp   - TRUE if Value is to be rounded up to the nearest aligned boundary. \r
-              FALSE is Value is to be rounded down to the nearest aligned boundary.\r
-\r
-Returns:\r
-\r
-  A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
-\r
---*/\r
 {\r
   UINT64  AlignmentMask;\r
 \r
@@ -213,50 +180,38 @@ Returns:
   return Value & (~AlignmentMask);\r
 }\r
 \r
-STATIC\r
-UINT64\r
-PageAlignAddress (\r
-  IN UINT64 Value\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Aligns address to the page boundary.\r
 \r
-Arguments:\r
+  @param  Value                  64 bit address to align \r
 \r
-  Value     - 64 bit address to align\r
-\r
-Returns:\r
-\r
-  A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
-\r
---*/\r
-{\r
-  return AlignValue (Value, EFI_PAGE_SHIFT, TRUE);\r
-}\r
+  @return A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
 \r
+**/\r
 STATIC\r
 UINT64\r
-PageAlignLength (\r
+PageAlignAddress (\r
   IN UINT64 Value\r
   )\r
-/*++\r
+{\r
+  return AlignValue (Value, EFI_PAGE_SHIFT, TRUE);\r
+}\r
 \r
-Routine Description:\r
 \r
+/**\r
   Aligns length to the page boundary.\r
 \r
-Arguments:\r
+  @param  Value                  64 bit length to align \r
 \r
-  Value     - 64 bit length to align\r
+  @return A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
 \r
-Returns:\r
-\r
-  A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
-\r
---*/\r
+**/\r
+STATIC\r
+UINT64\r
+PageAlignLength (\r
+  IN UINT64 Value\r
+  )\r
 {\r
   return AlignValue (Value, EFI_PAGE_SHIFT, FALSE);\r
 }\r
@@ -264,29 +219,23 @@ Returns:
 //\r
 // GCD Memory Space Worker Functions\r
 //\r
+\r
+/**\r
+  Allocate pool for two entries.\r
+\r
+  @param  TopEntry               An entry of GCD map \r
+  @param  BottomEntry            An entry of GCD map \r
+\r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to be allocated. \r
+  @retval EFI_SUCCESS            Both entries successfully allocated.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreAllocateGcdMapEntry (\r
   IN OUT EFI_GCD_MAP_ENTRY  **TopEntry,\r
   IN OUT EFI_GCD_MAP_ENTRY  **BottomEntry\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate pool for two entries.\r
-\r
-Arguments:\r
-\r
-  TopEntry      - An entry of GCD map\r
-  BottomEntry   - An entry of GCD map\r
-\r
-Returns:\r
-\r
-  EFI_OUT_OF_RESOURCES    - No enough buffer to be allocated.\r
-  EFI_SUCCESS             - Both entries successfully allocated.\r
-\r
---*/\r
 {\r
   *TopEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_GCD_MAP_ENTRY));\r
   if (*TopEntry == NULL) {\r
@@ -302,6 +251,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Internal function.  Inserts a new descriptor into a sorted list\r
+\r
+  @param  Link                   The linked list to insert the range BaseAddress \r
+                                 and Length into \r
+  @param  Entry                  A pointer to the entry that is inserted \r
+  @param  BaseAddress            The base address of the new range \r
+  @param  Length                 The length of the new range in bytes \r
+  @param  TopEntry               Top pad entry to insert if needed. \r
+  @param  BottomEntry            Bottom pad entry to insert if needed. \r
+\r
+  @retval EFI_SUCCESS            The new range was inserted into the linked list\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreInsertGcdMapEntry (\r
@@ -312,31 +276,6 @@ CoreInsertGcdMapEntry (
   IN EFI_GCD_MAP_ENTRY     *TopEntry,\r
   IN EFI_GCD_MAP_ENTRY     *BottomEntry\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function.  Inserts a new descriptor into a sorted list\r
-\r
-Arguments:\r
-\r
-  Link        - The linked list to insert the range BaseAddress and Length into\r
-\r
-  Entry     -   A pointer to the entry that is inserted\r
-\r
-  BaseAddress - The base address of the new range\r
-  \r
-  Length      - The length of the new range in bytes\r
-  \r
-  TopEntry    - Top pad entry to insert if needed.\r
-\r
-  BottomEntry - Bottom pad entry to insert if needed.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS - The new range was inserted into the linked list\r
-  \r
---*/\r
 {\r
   ASSERT (Length != 0);\r
   ASSERT (TopEntry->Signature == 0);\r
@@ -359,6 +298,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Merge the Gcd region specified by Link and its adjacent entry\r
+\r
+  @param  Link                   Specify the entry to be merged (with its \r
+                                 adjacent entry). \r
+  @param  Forward                Direction (forward or backward). \r
+  @param  Map                    Boundary. \r
+\r
+  @retval EFI_SUCCESS            Successfully returned. \r
+  @retval EFI_UNSUPPORTED        These adjacent regions could not merge.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreMergeGcdMapEntry (\r
@@ -366,27 +318,6 @@ CoreMergeGcdMapEntry (
   IN BOOLEAN         Forward,\r
   IN LIST_ENTRY      *Map\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Merge the Gcd region specified by Link and its adjacent entry\r
-\r
-Arguments:\r
-\r
-  Link      - Specify the entry to be merged (with its adjacent entry).\r
-  \r
-  Forward   - Direction (forward or backward).\r
-  \r
-  Map       - Boundary.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     - Successfully returned.\r
-  \r
-  EFI_UNSUPPORTED - These adjacent regions could not merge.\r
-\r
---*/\r
 {\r
   LIST_ENTRY         *AdjacentLink;\r
   EFI_GCD_MAP_ENTRY  *Entry;\r
@@ -441,6 +372,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Merge adjacent entries on total chain.\r
+\r
+  @param  TopEntry               Top entry of GCD map. \r
+  @param  BottomEntry            Bottom entry of GCD map. \r
+  @param  StartLink              Start link of the list for this loop. \r
+  @param  EndLink                End link of the list for this loop. \r
+  @param  Map                    Boundary. \r
+\r
+  @retval EFI_SUCCESS            GCD map successfully cleaned up.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreCleanupGcdMapEntry (\r
@@ -450,29 +394,6 @@ CoreCleanupGcdMapEntry (
   IN LIST_ENTRY         *EndLink,\r
   IN LIST_ENTRY         *Map\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Merge adjacent entries on total chain.\r
-\r
-Arguments:\r
-\r
-  TopEntry      - Top entry of GCD map.\r
-  \r
-  BottomEntry   - Bottom entry of GCD map.\r
-  \r
-  StartLink     - Start link of the list for this loop.\r
-  \r
-  EndLink       - End link of the list for this loop.\r
-  \r
-  Map           - Boundary.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS   - GCD map successfully cleaned up.\r
-\r
---*/\r
 {\r
   LIST_ENTRY  *Link;\r
 \r
@@ -493,6 +414,22 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Search a segment of memory space in GCD map. The result is a range of GCD entry list.\r
+\r
+  @param  BaseAddress            The start address of the segment. \r
+  @param  Length                 The length of the segment. \r
+  @param  StartLink              The first GCD entry involves this segment of \r
+                                 memory space. \r
+  @param  EndLink                The first GCD entry involves this segment of \r
+                                 memory space. \r
+  @param  Map                    Points to the start entry to search. \r
+\r
+  @retval EFI_SUCCESS            Successfully found the entry. \r
+  @retval EFI_NOT_FOUND          Not found.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreSearchGcdMapEntry (\r
@@ -502,31 +439,6 @@ CoreSearchGcdMapEntry (
   OUT LIST_ENTRY            **EndLink,\r
   IN  LIST_ENTRY            *Map\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Search a segment of memory space in GCD map. The result is a range of GCD entry list.\r
-\r
-Arguments:\r
-\r
-  BaseAddress       - The start address of the segment.\r
-  \r
-  Length            - The length of the segment.\r
-  \r
-  StartLink         - The first GCD entry involves this segment of memory space.\r
-  \r
-  EndLink           - The first GCD entry involves this segment of memory space.\r
-  \r
-  Map               - Points to the start entry to search.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS       - Successfully found the entry.\r
-  \r
-  EFI_NOT_FOUND     - Not found.\r
-\r
---*/\r
 {\r
   LIST_ENTRY         *Link;\r
   EFI_GCD_MAP_ENTRY  *Entry;\r
@@ -554,26 +466,20 @@ Returns:
   return EFI_NOT_FOUND;\r
 }\r
 \r
-STATIC\r
-UINTN\r
-CoreCountGcdMapEntry (\r
-  IN LIST_ENTRY  *Map\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Count the amount of GCD map entries.\r
 \r
-Arguments:\r
-\r
-  Map       - Points to the start entry to do the count loop.\r
+  @param  Map                    Points to the start entry to do the count loop. \r
 \r
-Returns:\r
+  @return The count.\r
 \r
-  The count.\r
-\r
---*/\r
+**/\r
+STATIC\r
+UINTN\r
+CoreCountGcdMapEntry (\r
+  IN LIST_ENTRY  *Map\r
+  )\r
 {\r
   UINTN           Count;\r
   LIST_ENTRY      *Link;\r
@@ -588,26 +494,20 @@ Returns:
 }\r
 \r
 \r
-STATIC\r
-UINT64\r
-ConverToCpuArchAttributes (\r
-  UINT64 Attributes\r
-  ) \r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Return the memory attribute specified by Attributes\r
 \r
-Arguments:\r
-\r
-  Attributes        - A num with some attribute bits on.\r
+  @param  Attributes             A num with some attribute bits on. \r
 \r
-Returns:\r
+  @return The enum value of memory attribute.\r
 \r
-  The enum value of memory attribute.\r
-\r
---*/\r
+**/\r
+STATIC\r
+UINT64\r
+ConverToCpuArchAttributes (\r
+  UINT64 Attributes\r
+  ) \r
 {\r
   if ( (Attributes & EFI_MEMORY_UC) == EFI_MEMORY_UC) {\r
     return EFI_MEMORY_UC;\r
@@ -633,6 +533,30 @@ Returns:
 \r
 }\r
 \r
+\r
+/**\r
+  Do operation on a segment of memory space specified (add, free, remove, change attribute ...).\r
+\r
+  @param  Operation              The type of the operation \r
+  @param  GcdMemoryType          Additional information for the operation \r
+  @param  GcdIoType              Additional information for the operation \r
+  @param  BaseAddress            Start address of the segment \r
+  @param  Length                 length of the segment \r
+  @param  Capabilities           The alterable attributes of a newly added entry \r
+  @param  Attributes             The attributes needs to be set \r
+\r
+  @retval EFI_INVALID_PARAMETER  Length is 0 or address (length) not aligned when \r
+                                 setting attribute. \r
+  @retval EFI_SUCCESS            Action successfully done. \r
+  @retval EFI_UNSUPPORTED        Could not find the proper descriptor on this \r
+                                 segment or  set an upsupported attribute. \r
+  @retval EFI_ACCESS_DENIED      Operate on an space non-exist or is used for an \r
+                                 image. \r
+  @retval EFI_NOT_FOUND          Free a non-using space or remove a non-exist \r
+                                 space, and so on. \r
+  @retval EFI_OUT_OF_RESOURCES   No buffer could be allocated.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreConvertSpace (\r
@@ -644,46 +568,6 @@ CoreConvertSpace (
   IN UINT64                Capabilities,\r
   IN UINT64                Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Do operation on a segment of memory space specified (add, free, remove, change attribute ...).\r
-\r
-Arguments:\r
-\r
-  Operation       - The type of the operation\r
-  \r
-  GcdMemoryType   - Additional information for the operation\r
-  \r
-  GcdIoType       - Additional information for the operation\r
-  \r
-  BaseAddress     - Start address of the segment\r
-  \r
-  Length          - length of the segment\r
-  \r
-  Capabilities    - The alterable attributes of a newly added entry\r
-  \r
-  Attributes      - The attributes needs to be set\r
-  \r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Length is 0 or address (length) not aligned when setting attribute.\r
-  \r
-  EFI_SUCCESS                 - Action successfully done.\r
-  \r
-  EFI_UNSUPPORTED             - Could not find the proper descriptor on this segment or \r
-                                set an upsupported attribute.\r
-  \r
-  EFI_ACCESS_DENIED           - Operate on an space non-exist or is used for an image.\r
-  \r
-  EFI_NOT_FOUND               - Free a non-using space or remove a non-exist space, and so on.\r
-  \r
-  EFI_OUT_OF_RESOURCES        - No buffer could be allocated.\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   EFI_STATUS         Status;\r
   LIST_ENTRY         *Map;\r
@@ -901,6 +785,22 @@ Done:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Check whether an entry could be used to allocate space.\r
+\r
+  @param  Operation              Allocate memory or IO \r
+  @param  Entry                  The entry to be tested \r
+  @param  GcdMemoryType          The desired memory type \r
+  @param  GcdIoType              The desired IO type \r
+\r
+  @retval EFI_NOT_FOUND          The memory type does not match or there's an \r
+                                 image handle on the entry. \r
+  @retval EFI_UNSUPPORTED        The operation unsupported. \r
+  @retval EFI_SUCCESS            It's ok for this entry to be used to allocate \r
+                                 space.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreAllocateSpaceCheckEntry (\r
@@ -909,31 +809,6 @@ CoreAllocateSpaceCheckEntry (
   IN EFI_GCD_MEMORY_TYPE  GcdMemoryType,\r
   IN EFI_GCD_IO_TYPE      GcdIoType\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Check whether an entry could be used to allocate space.\r
-\r
-Arguments:\r
-\r
-  Operation       - Allocate memory or IO\r
-  \r
-  Entry           - The entry to be tested\r
-  \r
-  GcdMemoryType   - The desired memory type\r
-  \r
-  GcdIoType       - The desired IO type\r
-  \r
-Returns:\r
-\r
-  EFI_NOT_FOUND   - The memory type does not match or there's an image handle on the entry.\r
-  \r
-  EFI_UNSUPPORTED - The operation unsupported.\r
-  \r
-  EFI_SUCCESS     - It's ok for this entry to be used to allocate space.\r
-\r
---*/\r
 {\r
   if (Entry->ImageHandle != NULL) {\r
     return EFI_NOT_FOUND;\r
@@ -955,6 +830,25 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Allocate space on specified address and length.\r
+\r
+  @param  Operation              The type of operation (memory or IO) \r
+  @param  GcdAllocateType        The type of allocate operation \r
+  @param  GcdMemoryType          The desired memory type \r
+  @param  GcdIoType              The desired IO type \r
+  @param  Alignment              Align with 2^Alignment \r
+  @param  Length                 Length to allocate \r
+  @param  BaseAddress            Base address to allocate \r
+  @param  ImageHandle            The image handle consume the allocated space. \r
+  @param  DeviceHandle           The device handle consume the allocated space. \r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter. \r
+  @retval EFI_NOT_FOUND          No descriptor for the desired space exists. \r
+  @retval EFI_SUCCESS            Space successfully allocated.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreAllocateSpace (\r
@@ -968,41 +862,6 @@ CoreAllocateSpace (
   IN     EFI_HANDLE             ImageHandle,\r
   IN     EFI_HANDLE             DeviceHandle OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate space on specified address and length.\r
-\r
-Arguments:\r
-\r
-  Operation         - The type of operation (memory or IO)\r
-  \r
-  GcdAllocateType   - The type of allocate operation\r
-  \r
-  GcdMemoryType     - The desired memory type\r
-  \r
-  GcdIoType         - The desired IO type\r
-  \r
-  Alignment         - Align with 2^Alignment\r
-  \r
-  Length            - Length to allocate\r
-  \r
-  BaseAddress       - Base address to allocate\r
-  \r
-  ImageHandle       - The image handle consume the allocated space.\r
-  \r
-  DeviceHandle      - The device handle consume the allocated space.\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Invalid parameter.\r
-  \r
-  EFI_NOT_FOUND               - No descriptor for the desired space exists.\r
-  \r
-  EFI_SUCCESS                 - Space successfully allocated.\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   EFI_PHYSICAL_ADDRESS  AlignmentMask;\r
@@ -1224,37 +1083,27 @@ Done:
   return Status;\r
 }\r
 \r
-STATIC\r
-EFI_STATUS\r
-CoreInternalAddMemorySpace (\r
-  IN EFI_GCD_MEMORY_TYPE   GcdMemoryType,\r
-  IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
-  IN UINT64                Length,\r
-  IN UINT64                Capabilities\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Add a segment of memory to GCD map.\r
 \r
-Arguments:\r
-\r
-  GcdMemoryType     - Memory type of the segment.\r
-  \r
-  BaseAddress       - Base address of the segment.\r
-  \r
-  Length            - Length of the segment.\r
-  \r
-  Capabilities      - alterable attributes of the segment.\r
+  @param  GcdMemoryType          Memory type of the segment. \r
+  @param  BaseAddress            Base address of the segment. \r
+  @param  Length                 Length of the segment. \r
+  @param  Capabilities           alterable attributes of the segment. \r
 \r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Invalid parameters.\r
-  \r
-  EFI_SUCCESS                 - Successfully add a segment of memory space.\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameters. \r
+  @retval EFI_SUCCESS            Successfully add a segment of memory space.\r
 \r
---*/\r
+**/\r
+STATIC\r
+EFI_STATUS\r
+CoreInternalAddMemorySpace (\r
+  IN EFI_GCD_MEMORY_TYPE   GcdMemoryType,\r
+  IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
+  IN UINT64                Length,\r
+  IN UINT64                Capabilities\r
+  )\r
 {\r
   //\r
   // Make sure parameters are valid\r
@@ -1269,6 +1118,24 @@ Returns:
 //\r
 // GCD Core Services\r
 //\r
+\r
+/**\r
+  Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r
+  I/O resources from the global coherency domain of the processor.\r
+\r
+  @param  GcdAllocateType        The type of allocate operation \r
+  @param  GcdMemoryType          The desired memory type \r
+  @param  Alignment              Align with 2^Alignment \r
+  @param  Length                 Length to allocate \r
+  @param  BaseAddress            Base address to allocate \r
+  @param  ImageHandle            The image handle consume the allocated space. \r
+  @param  DeviceHandle           The device handle consume the allocated space. \r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter. \r
+  @retval EFI_NOT_FOUND          No descriptor contains the desired space. \r
+  @retval EFI_SUCCESS            Memory space successfully allocated.\r
+\r
+**/\r
 EFI_STATUS\r
 CoreAllocateMemorySpace (\r
   IN     EFI_GCD_ALLOCATE_TYPE  GcdAllocateType,\r
@@ -1279,38 +1146,6 @@ CoreAllocateMemorySpace (
   IN     EFI_HANDLE             ImageHandle,\r
   IN     EFI_HANDLE             DeviceHandle OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r
-I/O resources from the global coherency domain of the processor.\r
-\r
-Arguments:\r
-\r
-  GcdAllocateType   - The type of allocate operation\r
-  \r
-  GcdMemoryType     - The desired memory type\r
-  \r
-  Alignment         - Align with 2^Alignment\r
-  \r
-  Length            - Length to allocate\r
-  \r
-  BaseAddress       - Base address to allocate\r
-  \r
-  ImageHandle       - The image handle consume the allocated space.\r
-  \r
-  DeviceHandle      - The device handle consume the allocated space.\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Invalid parameter.\r
-  \r
-  EFI_NOT_FOUND               - No descriptor contains the desired space.\r
-  \r
-  EFI_SUCCESS                 - Memory space successfully allocated.\r
-\r
---*/\r
 {\r
   return CoreAllocateSpace (\r
            GCD_ALLOCATE_MEMORY_OPERATION, \r
@@ -1325,6 +1160,19 @@ Returns:
            );\r
 }\r
 \r
+\r
+/**\r
+  Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
+  global coherency domain of the processor.\r
+\r
+  @param  GcdMemoryType          Memory type of the memory space. \r
+  @param  BaseAddress            Base address of the memory space. \r
+  @param  Length                 Length of the memory space. \r
+  @param  Capabilities           alterable attributes of the memory space. \r
+\r
+  @retval EFI_SUCCESS            Merged this memory space into GCD map.\r
+\r
+**/\r
 EFI_STATUS\r
 CoreAddMemorySpace (\r
   IN EFI_GCD_MEMORY_TYPE   GcdMemoryType,\r
@@ -1332,28 +1180,6 @@ CoreAddMemorySpace (
   IN UINT64                Length,\r
   IN UINT64                Capabilities\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
-global coherency domain of the processor.\r
-\r
-Arguments:\r
-\r
-  GcdMemoryType     - Memory type of the memory space.\r
-  \r
-  BaseAddress       - Base address of the memory space.\r
-  \r
-  Length            - Length of the memory space.\r
-  \r
-  Capabilities      - alterable attributes of the memory space.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS       - Merged this memory space into GCD map.  \r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   EFI_PHYSICAL_ADDRESS  PageBaseAddress;\r
@@ -1409,83 +1235,60 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-CoreFreeMemorySpace (\r
-  IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
-  IN UINT64                Length\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r
-I/O resources from the global coherency domain of the processor.\r
+  I/O resources from the global coherency domain of the processor.\r
 \r
-Arguments:\r
+  @param  BaseAddress            Base address of the memory space. \r
+  @param  Length                 Length of the memory space. \r
 \r
-  BaseAddress       - Base address of the memory space.\r
-  \r
-  Length            - Length of the memory space.\r
-  \r
-Returns:\r
-\r
-  EFI_SUCCESS       - Space successfully freed.\r
-\r
---*/\r
-{\r
-  return CoreConvertSpace (GCD_FREE_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);\r
-}\r
+  @retval EFI_SUCCESS            Space successfully freed.\r
 \r
+**/\r
 EFI_STATUS\r
-CoreRemoveMemorySpace (\r
+CoreFreeMemorySpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
   )\r
-/*++\r
+{\r
+  return CoreConvertSpace (GCD_FREE_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);\r
+}\r
 \r
-Routine Description:\r
 \r
+/**\r
   Removes reserved memory, system memory, or memory-mapped I/O resources from\r
-the global coherency domain of the processor.\r
+  the global coherency domain of the processor.\r
 \r
-Arguments:\r
+  @param  BaseAddress            Base address of the memory space. \r
+  @param  Length                 Length of the memory space. \r
 \r
-  BaseAddress       - Base address of the memory space.\r
-  \r
-  Length            - Length of the memory space.\r
-  \r
-Returns:\r
-\r
-  EFI_SUCCESS       - Successfully remove a segment of memory space.\r
+  @retval EFI_SUCCESS            Successfully remove a segment of memory space.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreRemoveMemorySpace (\r
+  IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
+  IN UINT64                Length\r
+  )\r
 {\r
   return CoreConvertSpace (GCD_REMOVE_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);\r
 }\r
 \r
+\r
+/**\r
+  Build a memory descriptor according to an entry.\r
+\r
+  @param  Descriptor             The descriptor to be built \r
+  @param  Entry                  According to this entry\r
+\r
+**/\r
 STATIC\r
 VOID\r
 BuildMemoryDescriptor (\r
   IN OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  *Descriptor,\r
   IN EFI_GCD_MAP_ENTRY                *Entry\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Build a memory descriptor according to an entry.\r
-\r
-Arguments:\r
-\r
-  Descriptor          - The descriptor to be built\r
-  \r
-  Entry               - According to this entry\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   Descriptor->BaseAddress   = Entry->BaseAddress;\r
   Descriptor->Length        = Entry->EndAddress - Entry->BaseAddress + 1;\r
@@ -1496,30 +1299,22 @@ Returns:
   Descriptor->DeviceHandle  = Entry->DeviceHandle;\r
 }\r
 \r
-EFI_STATUS\r
-CoreGetMemorySpaceDescriptor (\r
-  IN  EFI_PHYSICAL_ADDRESS             BaseAddress,\r
-  OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  *Descriptor\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Retrieves the descriptor for a memory region containing a specified address.\r
 \r
-Arguments:\r
-\r
-  BaseAddress       - Specified start address\r
-  \r
-  Descriptor        - Specified length\r
+  @param  BaseAddress            Specified start address \r
+  @param  Descriptor             Specified length \r
 \r
-Returns:\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_SUCCESS            Successfully get memory space descriptor.\r
 \r
-  EFI_INVALID_PARAMETER       - Invalid parameter\r
-  \r
-  EFI_SUCCESS                 - Successfully get memory space descriptor.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreGetMemorySpaceDescriptor (\r
+  IN  EFI_PHYSICAL_ADDRESS             BaseAddress,\r
+  OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  *Descriptor\r
+  )\r
 {\r
   EFI_STATUS         Status;\r
   LIST_ENTRY         *StartLink;\r
@@ -1554,63 +1349,47 @@ Returns:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Modifies the attributes for a memory region in the global coherency domain of the\r
+  processor.\r
+\r
+  @param  BaseAddress            Specified start address \r
+  @param  Length                 Specified length \r
+  @param  Attributes             Specified attributes \r
+\r
+  @retval EFI_SUCCESS            Successfully set attribute of a segment of \r
+                                 memory space.\r
+\r
+**/\r
 EFI_STATUS\r
 CoreSetMemorySpaceAttributes (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length,\r
   IN UINT64                Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Modifies the attributes for a memory region in the global coherency domain of the\r
-processor.\r
-\r
-Arguments:\r
+{\r
+  return CoreConvertSpace (GCD_SET_ATTRIBUTES_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, Attributes);\r
+}\r
 \r
-  BaseAddress       - Specified start address\r
-  \r
-  Length            - Specified length\r
-  \r
-  Attributes        - Specified attributes\r
 \r
-Returns:\r
+/**\r
+  Returns a map of the memory resources in the global coherency domain of the\r
+  processor.\r
 \r
-  EFI_SUCCESS       - Successfully set attribute of a segment of memory space.\r
+  @param  NumberOfDescriptors    Number of descriptors. \r
+  @param  MemorySpaceMap         Descriptor array \r
 \r
---*/\r
-{\r
-  return CoreConvertSpace (GCD_SET_ATTRIBUTES_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, Attributes);\r
-}\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate \r
+  @retval EFI_SUCCESS            Successfully get memory space map.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreGetMemorySpaceMap (\r
   OUT UINTN                            *NumberOfDescriptors,\r
   OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  **MemorySpaceMap\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Returns a map of the memory resources in the global coherency domain of the\r
-processor.\r
-\r
-Arguments:\r
-\r
-  NumberOfDescriptors       - Number of descriptors.\r
-  \r
-  MemorySpaceMap            - Descriptor array\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER     - Invalid parameter\r
-  \r
-  EFI_OUT_OF_RESOURCES      - No enough buffer to allocate\r
-  \r
-  EFI_SUCCESS               - Successfully get memory space map.\r
-\r
---*/\r
 {\r
   EFI_STATUS                       Status;\r
   LIST_ENTRY                       *Link;\r
@@ -1661,32 +1440,24 @@ Done:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
+\r
+  @param  GcdIoType              IO type of the segment. \r
+  @param  BaseAddress            Base address of the segment. \r
+  @param  Length                 Length of the segment. \r
+\r
+  @retval EFI_SUCCESS            Merged this segment into GCD map. \r
+  @retval EFI_INVALID_PARAMETER  Parameter not valid\r
+\r
+**/\r
 EFI_STATUS\r
 CoreAddIoSpace (\r
   IN EFI_GCD_IO_TYPE       GcdIoType,\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
-\r
-Arguments:\r
-\r
-  GcdIoType         - IO type of the segment.\r
-  \r
-  BaseAddress       - Base address of the segment.\r
-  \r
-  Length            - Length of the segment.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS       - Merged this segment into GCD map.\r
-  EFI_INVALID_PARAMETER    - Parameter not valid\r
-\r
---*/\r
 {\r
   //\r
   // Make sure parameters are valid\r
@@ -1697,6 +1468,24 @@ Returns:
   return CoreConvertSpace (GCD_ADD_IO_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, GcdIoType, BaseAddress, Length, 0, 0);\r
 }\r
 \r
+\r
+/**\r
+  Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
+  domain of the processor.\r
+\r
+  @param  GcdAllocateType        The type of allocate operation \r
+  @param  GcdIoType              The desired IO type \r
+  @param  Alignment              Align with 2^Alignment \r
+  @param  Length                 Length to allocate \r
+  @param  BaseAddress            Base address to allocate \r
+  @param  ImageHandle            The image handle consume the allocated space. \r
+  @param  DeviceHandle           The device handle consume the allocated space. \r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter. \r
+  @retval EFI_NOT_FOUND          No descriptor contains the desired space. \r
+  @retval EFI_SUCCESS            IO space successfully allocated.\r
+\r
+**/\r
 EFI_STATUS\r
 CoreAllocateIoSpace (\r
   IN     EFI_GCD_ALLOCATE_TYPE  GcdAllocateType,\r
@@ -1707,38 +1496,6 @@ CoreAllocateIoSpace (
   IN     EFI_HANDLE             ImageHandle,\r
   IN     EFI_HANDLE             DeviceHandle OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
-domain of the processor.\r
-\r
-Arguments:\r
-\r
-  GcdAllocateType   - The type of allocate operation\r
-  \r
-  GcdIoType         - The desired IO type\r
-  \r
-  Alignment         - Align with 2^Alignment\r
-  \r
-  Length            - Length to allocate\r
-  \r
-  BaseAddress       - Base address to allocate\r
-  \r
-  ImageHandle       - The image handle consume the allocated space.\r
-  \r
-  DeviceHandle      - The device handle consume the allocated space.\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Invalid parameter.\r
-  \r
-  EFI_NOT_FOUND               - No descriptor contains the desired space.\r
-  \r
-  EFI_SUCCESS                 - IO space successfully allocated.\r
-\r
---*/\r
 {\r
   return CoreAllocateSpace (\r
            GCD_ALLOCATE_IO_OPERATION, \r
@@ -1753,83 +1510,60 @@ Returns:
            );\r
 }\r
 \r
-EFI_STATUS\r
-CoreFreeIoSpace (\r
-  IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
-  IN UINT64                Length\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
-domain of the processor.\r
-\r
-Arguments:\r
+  domain of the processor.\r
 \r
-  BaseAddress       - Base address of the segment.\r
-  \r
-  Length            - Length of the segment.\r
-  \r
-Returns:\r
+  @param  BaseAddress            Base address of the segment. \r
+  @param  Length                 Length of the segment. \r
 \r
-  EFI_SUCCESS       - Space successfully freed.\r
-\r
---*/\r
-{\r
-  return CoreConvertSpace (GCD_FREE_IO_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);\r
-}\r
+  @retval EFI_SUCCESS            Space successfully freed.\r
 \r
+**/\r
 EFI_STATUS\r
-CoreRemoveIoSpace (\r
+CoreFreeIoSpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
   )\r
-/*++\r
+{\r
+  return CoreConvertSpace (GCD_FREE_IO_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);\r
+}\r
 \r
-Routine Description:\r
 \r
+/**\r
   Removes reserved I/O or I/O resources from the global coherency domain of the\r
-processor.\r
+  processor.\r
 \r
-Arguments:\r
+  @param  BaseAddress            Base address of the segment. \r
+  @param  Length                 Length of the segment. \r
 \r
-  BaseAddress       - Base address of the segment.\r
-  \r
-  Length            - Length of the segment.\r
-  \r
-Returns:\r
-\r
-  EFI_SUCCESS       - Successfully removed a segment of IO space.\r
+  @retval EFI_SUCCESS            Successfully removed a segment of IO space.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreRemoveIoSpace (\r
+  IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
+  IN UINT64                Length\r
+  )\r
 {\r
   return CoreConvertSpace (GCD_REMOVE_IO_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0);\r
 }\r
 \r
+\r
+/**\r
+  Build a IO descriptor according to an entry.\r
+\r
+  @param  Descriptor             The descriptor to be built \r
+  @param  Entry                  According to this entry\r
+\r
+**/\r
 STATIC\r
 VOID\r
 BuildIoDescriptor (\r
   IN EFI_GCD_IO_SPACE_DESCRIPTOR  *Descriptor,\r
   IN EFI_GCD_MAP_ENTRY            *Entry\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Build a IO descriptor according to an entry.\r
-\r
-Arguments:\r
-\r
-  Descriptor          - The descriptor to be built\r
-  \r
-  Entry               - According to this entry\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   Descriptor->BaseAddress  = Entry->BaseAddress;\r
   Descriptor->Length       = Entry->EndAddress - Entry->BaseAddress + 1;\r
@@ -1838,30 +1572,22 @@ Returns:
   Descriptor->DeviceHandle = Entry->DeviceHandle;\r
 }\r
 \r
-EFI_STATUS\r
-CoreGetIoSpaceDescriptor (\r
-  IN  EFI_PHYSICAL_ADDRESS         BaseAddress,\r
-  OUT EFI_GCD_IO_SPACE_DESCRIPTOR  *Descriptor\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Retrieves the descriptor for an I/O region containing a specified address.\r
 \r
-Arguments:\r
-\r
-  BaseAddress       - Specified start address\r
-  \r
-  Descriptor        - Specified length\r
+  @param  BaseAddress            Specified start address \r
+  @param  Descriptor             Specified length \r
 \r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Descriptor is NULL.\r
-  \r
-  EFI_SUCCESS                 - Successfully get the IO space descriptor.\r
+  @retval EFI_INVALID_PARAMETER  Descriptor is NULL. \r
+  @retval EFI_SUCCESS            Successfully get the IO space descriptor.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreGetIoSpaceDescriptor (\r
+  IN  EFI_PHYSICAL_ADDRESS         BaseAddress,\r
+  OUT EFI_GCD_IO_SPACE_DESCRIPTOR  *Descriptor\r
+  )\r
 {\r
   EFI_STATUS         Status;\r
   LIST_ENTRY         *StartLink;\r
@@ -1896,32 +1622,23 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-CoreGetIoSpaceMap (\r
-  OUT UINTN                        *NumberOfDescriptors,\r
-  OUT EFI_GCD_IO_SPACE_DESCRIPTOR  **IoSpaceMap\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Returns a map of the I/O resources in the global coherency domain of the processor.\r
 \r
-Arguments:\r
+  @param  NumberOfDescriptors    Number of descriptors. \r
+  @param  IoSpaceMap             Descriptor array \r
 \r
-  NumberOfDescriptors       - Number of descriptors.\r
-  \r
-  IoSpaceMap                - Descriptor array\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate \r
+  @retval EFI_SUCCESS            Successfully get IO space map.\r
 \r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER     - Invalid parameter\r
-  \r
-  EFI_OUT_OF_RESOURCES      - No enough buffer to allocate\r
-  \r
-  EFI_SUCCESS               - Successfully get IO space map.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreGetIoSpaceMap (\r
+  OUT UINTN                        *NumberOfDescriptors,\r
+  OUT EFI_GCD_IO_SPACE_DESCRIPTOR  **IoSpaceMap\r
+  )\r
 {\r
   EFI_STATUS                   Status;\r
   LIST_ENTRY                   *Link;\r
@@ -1972,29 +1689,24 @@ Done:
   return Status;\r
 }  \r
 \r
+\r
+/**\r
+  Converts a Resource Descriptor HOB attributes mask to an EFI Memory Descriptor\r
+  capabilities mask\r
+\r
+  @param  GcdMemoryType          Type of resource in the GCD memory map. \r
+  @param  Attributes             The attribute mask in the Resource Descriptor \r
+                                 HOB. \r
+\r
+  @return The capabilities mask for an EFI Memory Descriptor.\r
+\r
+**/\r
 STATIC\r
 UINT64\r
 CoreConvertResourceDescriptorHobAttributesToCapabilities (\r
   EFI_GCD_MEMORY_TYPE  GcdMemoryType,\r
   UINT64               Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Converts a Resource Descriptor HOB attributes mask to an EFI Memory Descriptor \r
-  capabilities mask\r
-\r
-Arguments:\r
-\r
-  GcdMemoryType   - Type of resource in the GCD memory map.\r
-  Attributes      - The attribute mask in the Resource Descriptor HOB.\r
-\r
-Returns:\r
-\r
-  The capabilities mask for an EFI Memory Descriptor.\r
-\r
---*/\r
 {\r
   UINT64                          Capabilities;\r
   GCD_ATTRIBUTE_CONVERSION_ENTRY  *Conversion;\r
@@ -2013,34 +1725,29 @@ Returns:
   return Capabilities;\r
 }\r
 \r
-EFI_STATUS\r
-CoreInitializeMemoryServices (\r
-  IN  VOID                  **HobStart,\r
-  OUT EFI_PHYSICAL_ADDRESS  *MemoryBaseAddress,\r
-  OUT UINT64                *MemoryLength\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  External function. Initializes the GCD and memory services based on the memory \r
+/**\r
+  External function. Initializes the GCD and memory services based on the memory\r
   descriptor HOBs.  This function is responsible for priming the GCD map and the\r
   memory map, so memory allocations and resource allocations can be made.  The first\r
   part of this function can not depend on any memory services until at least one\r
   memory descriptor is provided to the memory services.  Then the memory services\r
   can be used to intialize the GCD map.\r
 \r
-Arguments:\r
+  @param  HobStart               The start address of the HOB. \r
+  @param  MemoryBaseAddress      Start address of memory region found to init DXE \r
+                                 core. \r
+  @param  MemoryLength           Length of memory region found to init DXE core. \r
 \r
-  HobStart            - The start address of the HOB.\r
-  MemoryBaseAddress   - Start address of memory region found to init DXE core.\r
-  MemoryLength        - Length of memory region found to init DXE core.\r
+  @retval EFI_SUCCESS            Memory services successfully initialized.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS   - Memory services successfully initialized.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreInitializeMemoryServices (\r
+  IN  VOID                  **HobStart,\r
+  OUT EFI_PHYSICAL_ADDRESS  *MemoryBaseAddress,\r
+  OUT UINT64                *MemoryLength\r
+  )\r
 {\r
   EFI_PEI_HOB_POINTERS               Hob;\r
   EFI_MEMORY_TYPE_INFORMATION        *EfiMemoryTypeInformation;\r
@@ -2235,38 +1942,30 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-CoreInitializeGcdServices (\r
-  IN OUT VOID                  **HobStart,\r
-  IN EFI_PHYSICAL_ADDRESS  MemoryBaseAddress,\r
-  IN UINT64                MemoryLength\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  External function. Initializes the GCD and memory services based on the memory \r
+/**\r
+  External function. Initializes the GCD and memory services based on the memory\r
   descriptor HOBs.  This function is responsible for priming the GCD map and the\r
   memory map, so memory allocations and resource allocations can be made.  The first\r
   part of this function can not depend on any memory services until at least one\r
   memory descriptor is provided to the memory services.  Then the memory services\r
-  can be used to intialize the GCD map. The HobStart will be relocated to a pool \r
+  can be used to intialize the GCD map. The HobStart will be relocated to a pool\r
   buffer.\r
 \r
-Arguments:\r
-\r
-  HobStart - The start address of the HOB\r
-\r
-  MemoryBaseAddress   - Start address of memory region found to init DXE core.\r
-  \r
-  MemoryLength        - Length of memory region found to init DXE core.\r
+  @param  HobStart               The start address of the HOB \r
+  @param  MemoryBaseAddress      Start address of memory region found to init DXE \r
+                                 core. \r
+  @param  MemoryLength           Length of memory region found to init DXE core. \r
 \r
+  @retval EFI_SUCCESS            GCD services successfully initialized.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS         - GCD services successfully initialized.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreInitializeGcdServices (\r
+  IN OUT VOID                  **HobStart,\r
+  IN EFI_PHYSICAL_ADDRESS  MemoryBaseAddress,\r
+  IN UINT64                MemoryLength\r
+  )\r
 {\r
   EFI_PEI_HOB_POINTERS                   Hob;\r
   VOID                               *NewHobList;\r