]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add doxygen style comments for functions in DxeMain.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 9 May 2008 07:08:30 +0000 (07:08 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 9 May 2008 07:08:30 +0000 (07:08 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5189 6f19259b-4bc3-4df7-8a09-765794883524

38 files changed:
MdeModulePkg/Core/Dxe/DebugImageInfo.h
MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
MdeModulePkg/Core/Dxe/Dispatcher/dependency.c
MdeModulePkg/Core/Dxe/DxeMain.h
MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
MdeModulePkg/Core/Dxe/Event/event.c
MdeModulePkg/Core/Dxe/Event/timer.c
MdeModulePkg/Core/Dxe/Event/tpl.c
MdeModulePkg/Core/Dxe/Exec.h
MdeModulePkg/Core/Dxe/FwVol/Ffs.c
MdeModulePkg/Core/Dxe/FwVol/FwVol.c
MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c
MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
MdeModulePkg/Core/Dxe/FwVol/FwVolWrite.c
MdeModulePkg/Core/Dxe/FwVolBlock.h
MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
MdeModulePkg/Core/Dxe/FwVolDriver.h
MdeModulePkg/Core/Dxe/Gcd/gcd.c
MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
MdeModulePkg/Core/Dxe/Hand/Notify.c
MdeModulePkg/Core/Dxe/Hand/handle.c
MdeModulePkg/Core/Dxe/Hand/locate.c
MdeModulePkg/Core/Dxe/Image.h
MdeModulePkg/Core/Dxe/Image/Image.c
MdeModulePkg/Core/Dxe/Image/ImageFile.c
MdeModulePkg/Core/Dxe/Library.h
MdeModulePkg/Core/Dxe/Library/Library.c
MdeModulePkg/Core/Dxe/Mem/Page.c
MdeModulePkg/Core/Dxe/Mem/pool.c
MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
MdeModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c
MdeModulePkg/Core/Dxe/Misc/SetWatchdogTimer.c
MdeModulePkg/Core/Dxe/Misc/Stall.c
MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
MdeModulePkg/Core/Dxe/gcd.h
MdeModulePkg/Core/Dxe/hand.h
MdeModulePkg/Core/Dxe/imem.h

index 5f05a90a5258e2281d97937cf992c85f49c38865..26a5bb185c631b631a2b8369d8a216746b5fba73 100644 (file)
@@ -22,99 +22,69 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define EFI_DEBUG_TABLE_ENTRY_SIZE       (sizeof (VOID *))\r
 \r
-VOID\r
-CoreInitializeDebugImageInfoTable (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Creates and initializes the DebugImageInfo Table.  Also creates the configuration\r
   table and registers it into the system table.\r
 \r
-Arguments:\r
-  None\r
-\r
-Returns:\r
-  NA\r
-\r
-Notes:\r
-  This function allocates memory, frees it, and then allocates memory at an\r
-  address within the initial allocation. Since this function is called early\r
-  in DXE core initialization (before drivers are dispatched), this should not\r
-  be a problem.\r
-\r
---*/\r
-;\r
+  Note:\r
+    This function allocates memory, frees it, and then allocates memory at an\r
+    address within the initial allocation. Since this function is called early\r
+    in DXE core initialization (before drivers are dispatched), this should not\r
+    be a problem.\r
 \r
+**/\r
 VOID\r
-CoreUpdateDebugTableCrc32 (\r
+CoreInitializeDebugImageInfoTable (\r
   VOID\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
 \r
+/**\r
   Update the CRC32 in the Debug Table.\r
   Since the CRC32 service is made available by the Runtime driver, we have to\r
   wait for the Runtime Driver to be installed before the CRC32 can be computed.\r
   This function is called elsewhere by the core when the runtime architectural\r
   protocol is produced.\r
 \r
-Arguments:\r
-  None\r
+**/\r
+VOID\r
+CoreUpdateDebugTableCrc32 (\r
+  VOID\r
+  )\r
+;\r
 \r
-Returns:\r
-  NA\r
 \r
---*/\r
-;\r
+/**\r
+  Adds a new DebugImageInfo structure to the DebugImageInfo Table.  Re-Allocates\r
+  the table if it's not large enough to accomidate another entry.\r
+\r
+  @param  ImageInfoType  type of debug image information \r
+  @param  LoadedImage    pointer to the loaded image protocol for the image being \r
+                         loaded \r
+  @param  ImageHandle    image handle for the image being loaded\r
 \r
+**/\r
 VOID\r
 CoreNewDebugImageInfoEntry (\r
   UINT32                    ImageInfoType,\r
   EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,\r
   EFI_HANDLE                ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Adds a new DebugImageInfo structure to the DebugImageInfo Table.  Re-Allocates\r
-  the table if it's not large enough to accomidate another entry.\r
-\r
-Arguments:\r
+;\r
 \r
-  ImageInfoType     - type of debug image information\r
-  LoadedImage       - pointer to the loaded image protocol for the image being loaded\r
-  ImageHandle       - image handle for the image being loaded\r
 \r
-Returns:\r
-  NA\r
+/**\r
+  Removes and frees an entry from the DebugImageInfo Table.\r
 \r
---*/\r
-;\r
+  @param  ImageHandle    image handle for the image being unloaded\r
 \r
+**/\r
 VOID\r
 CoreRemoveDebugImageInfoEntry (\r
   EFI_HANDLE ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Removes and frees an entry from the DebugImageInfo Table.\r
-\r
-Arguments:\r
-\r
-  ImageHandle       - image handle for the image being unloaded\r
-\r
-Returns:\r
-\r
-  NA\r
-\r
---*/\r
 ;\r
 \r
 #endif\r
index 01d2c9fe5aff688caff696ca354fb52fa58dc72f..554a07c42b88797ba3a133232e9d4e7c189bcd28 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   DXE Dispatcher.\r
 \r
   Step #1 - When a FV protocol is added to the system every driver in the FV\r
@@ -26,7 +26,7 @@
   Depex - Dependency Expresion.\r
   SOR   - Schedule On Request - Don't schedule if this bit is set.\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -94,12 +94,40 @@ FV_FILEPATH_DEVICE_PATH mFvDevicePath;
 //\r
 // Function Prototypes\r
 //\r
+/**\r
+  Insert InsertedDriverEntry onto the mScheduledQueue. To do this you\r
+  must add any driver with a before dependency on InsertedDriverEntry first.\r
+  You do this by recursively calling this routine. After all the Befores are\r
+  processed you can add InsertedDriverEntry to the mScheduledQueue.\r
+  Then you can add any driver with an After dependency on InsertedDriverEntry\r
+  by recursively calling this routine.\r
+\r
+  @param  InsertedDriverEntry   The driver to insert on the ScheduledLink Queue\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (\r
   IN  EFI_CORE_DRIVER_ENTRY   *InsertedDriverEntry\r
   );\r
  \r
+/**\r
+  Event notification that is fired every time a FV dispatch protocol is added.\r
+  More than one protocol may have been added when this event is fired, so you\r
+  must loop on CoreLocateHandle () to see how many protocols were added and\r
+  do the following to each FV:\r
+  If the Fv has already been processed, skip it. If the Fv has not been\r
+  processed then mark it as being processed, as we are about to process it.\r
+  Read the Fv and add any driver in the Fv to the mDiscoveredList.The\r
+  mDiscoveredList is never free'ed and contains variables that define\r
+  the other states the DXE driver transitions to..\r
+  While you are at it read the A Priori file into memory.\r
+  Place drivers in the A Priori list onto the mScheduledQueue.\r
+\r
+  @param  Event                 The Event that is being processed, not used. \r
+  @param  Context               Event Context, not used.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 EFIAPI\r
@@ -108,6 +136,19 @@ CoreFwVolEventProtocolNotify (
   IN  VOID            *Context\r
   );\r
 \r
+/**\r
+  Convert FvHandle and DriverName into an EFI device path\r
+\r
+  @param  Fv                    Fv protocol, needed to read Depex info out of \r
+                                FLASH. \r
+  @param  FvHandle              Handle for Fv, needed in the \r
+                                EFI_CORE_DRIVER_ENTRY so that the PE image can be \r
+                                read out of the FV at a later time. \r
+  @param  DriverName            Name of driver to add to mDiscoveredList. \r
+\r
+  @return Pointer to device path constructed from FvHandle and DriverName\r
+\r
+**/\r
 STATIC\r
 EFI_DEVICE_PATH_PROTOCOL *\r
 CoreFvToDevicePath (\r
@@ -116,6 +157,26 @@ CoreFvToDevicePath (
   IN  EFI_GUID                        *DriverName\r
   );\r
 \r
+/**\r
+  Add an entry to the mDiscoveredList. Allocate memory to store the DriverEntry,\r
+  and initilize any state variables. Read the Depex from the FV and store it\r
+  in DriverEntry. Pre-process the Depex to set the SOR, Before and After state.\r
+  The Discovered list is never free'ed and contains booleans that represent the\r
+  other possible DXE driver states.\r
+\r
+  @param  Fv                    Fv protocol, needed to read Depex info out of \r
+                                FLASH. \r
+  @param  FvHandle              Handle for Fv, needed in the \r
+                                EFI_CORE_DRIVER_ENTRY so that the PE image can be \r
+                                read out of the FV at a later time. \r
+  @param  DriverName            Name of driver to add to mDiscoveredList. \r
+\r
+  @retval EFI_SUCCESS           If driver was added to the mDiscoveredList. \r
+  @retval EFI_ALREADY_STARTED   The driver has already been started. Only one \r
+                                DriverName may be active in the system at any one \r
+                                time.\r
+\r
+**/\r
 STATIC \r
 EFI_STATUS\r
 CoreAddToDriverList (\r
@@ -124,6 +185,18 @@ CoreAddToDriverList (
   IN  EFI_GUID                      *DriverName\r
   );\r
 \r
+/**\r
+  Get the driver from the FV through driver name, and produce a FVB protocol on FvHandle.\r
+\r
+  @param  Fv                    The FIRMWARE_VOLUME protocol installed on the FV. \r
+  @param  FvHandle              The handle which FVB protocol installed on. \r
+  @param  DriverName            The driver guid specified. \r
+\r
+  @retval EFI_OUT_OF_RESOURCES  No enough memory or other resource. \r
+  @retval EFI_VOLUME_CORRUPTED  Corrupted volume. \r
+  @retval EFI_SUCCESS           Function successfully returned.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS \r
 CoreProcessFvImageFile (\r
@@ -132,81 +205,52 @@ CoreProcessFvImageFile (
   IN  EFI_GUID                        *DriverName\r
   );\r
 \r
+\r
+/**\r
+  Enter critical section by gaining lock on mDispatcherLock.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreAcquireDispatcherLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Enter critical section by gaining lock on mDispatcherLock\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-\r
 {\r
   CoreAcquireLock (&mDispatcherLock);\r
 }\r
 \r
+\r
+/**\r
+  Exit critical section by releasing lock on mDispatcherLock.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreReleaseDispatcherLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Exit critical section by releasing lock on mDispatcherLock\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   CoreReleaseLock (&mDispatcherLock);\r
 }\r
 \r
-STATIC\r
-EFI_STATUS\r
-CoreGetDepexSectionAndPreProccess (\r
-  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Read Depex and pre-process the Depex for Before and After. If Section Extraction\r
   protocol returns an error via ReadSection defer the reading of the Depex.\r
 \r
-Arguments:\r
-\r
-  DriverEntry - Driver to work on.\r
-  \r
-Returns:\r
-\r
-  EFI_SUCCESS - Depex read and preprossesed \r
-\r
-  EFI_PROTOCOL_ERROR - The section extraction protocol returned an error and \r
-                        Depex reading needs to be retried.\r
+  @param  DriverEntry           Driver to work on. \r
 \r
-  Other Error - DEPEX not found.\r
+  @retval EFI_SUCCESS           Depex read and preprossesed \r
+  @retval EFI_PROTOCOL_ERROR    The section extraction protocol returned an error \r
+                                and  Depex reading needs to be retried. \r
+  @retval Error                 DEPEX not found.\r
 \r
---*/\r
+**/\r
+STATIC\r
+EFI_STATUS\r
+CoreGetDepexSectionAndPreProccess (\r
+  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry\r
+  )\r
 {\r
   EFI_STATUS                    Status;\r
   EFI_SECTION_TYPE              SectionType;\r
@@ -255,6 +299,21 @@ Returns:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Check every driver and locate a matching one. If the driver is found, the Unrequested\r
+  state flag is cleared.\r
+\r
+  @param  FirmwareVolumeHandle  The handle of the Firmware Volume that contains \r
+                                the firmware  file specified by DriverName. \r
+  @param  DriverName            The Driver name to put in the Dependent state. \r
+\r
+  @retval EFI_SUCCESS           The DriverName was found and it's SOR bit was \r
+                                cleared \r
+  @retval EFI_NOT_FOUND         The DriverName does not exist or it's SOR bit was \r
+                                not set. \r
+\r
+**/\r
 EFI_DXESERVICE\r
 EFI_STATUS\r
 EFIAPI\r
@@ -262,27 +321,6 @@ CoreSchedule (
   IN  EFI_HANDLE  FirmwareVolumeHandle,\r
   IN  EFI_GUID    *DriverName\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Check every driver and locate a matching one. If the driver is found, the Unrequested\r
-  state flag is cleared.\r
-\r
-Arguments:\r
-\r
-  FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware \r
-                         file specified by DriverName.\r
-\r
-  DriverName           - The Driver name to put in the Dependent state.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS   - The DriverName was found and it's SOR bit was cleared\r
-\r
-  EFI_NOT_FOUND - The DriverName does not exist or it's SOR bit was not set.\r
-\r
---*/\r
 {\r
   LIST_ENTRY            *Link;\r
   EFI_CORE_DRIVER_ENTRY *DriverEntry;\r
@@ -310,6 +348,19 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Convert a driver from the Untrused back to the Scheduled state\r
+\r
+  @param  FirmwareVolumeHandle  The handle of the Firmware Volume that contains \r
+                                the firmware  file specified by DriverName. \r
+  @param  DriverName            The Driver name to put in the Scheduled state \r
+\r
+  @retval EFI_SUCCESS           The file was found in the untrusted state, and it \r
+                                was promoted  to the trusted state. \r
+  @retval EFI_NOT_FOUND         The file was not found in the untrusted state. \r
+\r
+**/\r
 EFI_DXESERVICE\r
 EFI_STATUS\r
 EFIAPI\r
@@ -317,27 +368,6 @@ CoreTrust (
   IN  EFI_HANDLE  FirmwareVolumeHandle,\r
   IN  EFI_GUID    *DriverName\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Convert a driver from the Untrused back to the Scheduled state\r
-\r
-Arguments:\r
-\r
-  FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware \r
-                         file specified by DriverName.\r
-\r
-  DriverName           - The Driver name to put in the Scheduled state\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS   - The file was found in the untrusted state, and it was promoted \r
-                  to the trusted state.\r
-\r
-  EFI_NOT_FOUND - The file was not found in the untrusted state.\r
-\r
---*/\r
 {\r
   LIST_ENTRY            *Link;\r
   EFI_CORE_DRIVER_ENTRY *DriverEntry;\r
@@ -366,37 +396,29 @@ Returns:
 }\r
 \r
 \r
-EFI_DXESERVICE\r
-EFI_STATUS\r
-EFIAPI\r
-CoreDispatcher (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  This is the main Dispatcher for DXE and it exits when there are no more \r
+/**\r
+  This is the main Dispatcher for DXE and it exits when there are no more\r
   drivers to run. Drain the mScheduledQueue and load and start a PE\r
-  image for each driver. Search the mDiscoveredList to see if any driver can \r
+  image for each driver. Search the mDiscoveredList to see if any driver can\r
   be placed on the mScheduledQueue. If no drivers are placed on the\r
   mScheduledQueue exit the function. On exit it is assumed the Bds()\r
-  will be called, and when the Bds() exits the Dispatcher will be called \r
+  will be called, and when the Bds() exits the Dispatcher will be called\r
   again.\r
 \r
-Arguments:\r
-\r
   NONE\r
 \r
-Returns:\r
+  @retval EFI_ALREADY_STARTED   The DXE Dispatcher is already running \r
+  @retval EFI_NOT_FOUND         No DXE Drivers were dispatched \r
+  @retval EFI_SUCCESS           One or more DXE Drivers were dispatched \r
 \r
-  EFI_ALREADY_STARTED - The DXE Dispatcher is already running\r
-\r
-  EFI_NOT_FOUND       - No DXE Drivers were dispatched\r
-\r
-  EFI_SUCCESS         - One or more DXE Drivers were dispatched\r
-\r
---*/\r
+**/\r
+EFI_DXESERVICE\r
+EFI_STATUS\r
+EFIAPI\r
+CoreDispatcher (\r
+  VOID\r
+  )\r
 {\r
   EFI_STATUS                      Status;\r
   EFI_STATUS                      ReturnStatus;\r
@@ -524,31 +546,23 @@ Returns:
   return ReturnStatus;\r
 }\r
 \r
-STATIC\r
-VOID\r
-CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (\r
-  IN  EFI_CORE_DRIVER_ENTRY   *InsertedDriverEntry\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  Insert InsertedDriverEntry onto the mScheduledQueue. To do this you \r
+/**\r
+  Insert InsertedDriverEntry onto the mScheduledQueue. To do this you\r
   must add any driver with a before dependency on InsertedDriverEntry first.\r
   You do this by recursively calling this routine. After all the Befores are\r
-  processed you can add InsertedDriverEntry to the mScheduledQueue. \r
-  Then you can add any driver with an After dependency on InsertedDriverEntry \r
+  processed you can add InsertedDriverEntry to the mScheduledQueue.\r
+  Then you can add any driver with an After dependency on InsertedDriverEntry\r
   by recursively calling this routine.\r
 \r
-Arguments:\r
-\r
-  InsertedDriverEntry - The driver to insert on the ScheduledLink Queue\r
-\r
-Returns:\r
+  @param  InsertedDriverEntry   The driver to insert on the ScheduledLink Queue\r
 \r
-  NONE \r
-\r
---*/\r
+**/\r
+STATIC\r
+VOID\r
+CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (\r
+  IN  EFI_CORE_DRIVER_ENTRY   *InsertedDriverEntry\r
+  )\r
 {\r
   LIST_ENTRY            *Link;\r
   EFI_CORE_DRIVER_ENTRY *DriverEntry;\r
@@ -595,28 +609,22 @@ Returns:
   }\r
 }\r
 \r
-STATIC\r
-BOOLEAN\r
-FvHasBeenProcessed (\r
-  IN  EFI_HANDLE      FvHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Return TRUE if the Fv has been processed, FALSE if not.\r
 \r
-Arguments:\r
+  @param  FvHandle              The handle of a FV that's being tested \r
 \r
-  FvHandle - The handle of a FV that's being tested\r
+  @retval TRUE                  Fv protocol on FvHandle has been processed \r
+  @retval FALSE                 Fv protocol on FvHandle has not yet been \r
+                                processed\r
 \r
-Returns:\r
-\r
-  TRUE  - Fv protocol on FvHandle has been processed\r
-\r
-  FALSE - Fv protocol on FvHandle has not yet been processed\r
-\r
---*/\r
+**/\r
+STATIC\r
+BOOLEAN\r
+FvHasBeenProcessed (\r
+  IN  EFI_HANDLE      FvHandle\r
+  )\r
 {\r
   LIST_ENTRY      *Link;\r
   KNOWN_HANDLE    *KnownHandle;\r
@@ -630,28 +638,20 @@ Returns:
   return FALSE;\r
 }\r
 \r
-STATIC\r
-VOID\r
-FvIsBeingProcesssed (\r
-  IN  EFI_HANDLE    FvHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Remember that Fv protocol on FvHandle has had it's drivers placed on the\r
   mDiscoveredList. This fucntion adds entries on the mFvHandleList. Items are\r
   never removed/freed from the mFvHandleList.\r
 \r
-Arguments:\r
-\r
-  FvHandle - The handle of a FV that has been processed\r
-\r
-Returns:\r
-\r
-  None\r
+  @param  FvHandle              The handle of a FV that has been processed\r
 \r
---*/\r
+**/\r
+STATIC\r
+VOID\r
+FvIsBeingProcesssed (\r
+  IN  EFI_HANDLE    FvHandle\r
+  )\r
 {\r
   KNOWN_HANDLE  *KnownHandle;\r
 \r
@@ -665,6 +665,20 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Convert FvHandle and DriverName into an EFI device path\r
+\r
+  @param  Fv                    Fv protocol, needed to read Depex info out of \r
+                                FLASH. \r
+  @param  FvHandle              Handle for Fv, needed in the \r
+                                EFI_CORE_DRIVER_ENTRY so that the PE image can be \r
+                                read out of the FV at a later time. \r
+  @param  DriverName            Name of driver to add to mDiscoveredList. \r
+\r
+  @return Pointer to device path constructed from FvHandle and DriverName\r
+\r
+**/\r
 STATIC\r
 EFI_DEVICE_PATH_PROTOCOL *\r
 CoreFvToDevicePath (\r
@@ -672,26 +686,6 @@ CoreFvToDevicePath (
   IN  EFI_HANDLE                      FvHandle,\r
   IN  EFI_GUID                        *DriverName\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Convert FvHandle and DriverName into an EFI device path\r
-\r
-Arguments:\r
-\r
-  Fv         - Fv protocol, needed to read Depex info out of FLASH.\r
-  \r
-  FvHandle   - Handle for Fv, needed in the EFI_CORE_DRIVER_ENTRY so that the\r
-               PE image can be read out of the FV at a later time.\r
-\r
-  DriverName - Name of driver to add to mDiscoveredList.\r
-\r
-Returns:\r
-\r
-  Pointer to device path constructed from FvHandle and DriverName\r
-\r
---*/\r
 {\r
   EFI_STATUS                          Status;\r
   EFI_DEVICE_PATH_PROTOCOL            *FvDevicePath;\r
@@ -723,39 +717,33 @@ Returns:
 \r
 \r
 \r
-EFI_STATUS\r
-CoreAddToDriverList (\r
-  IN  EFI_FIRMWARE_VOLUME2_PROTOCOL   *Fv,\r
-  IN  EFI_HANDLE                      FvHandle,\r
-  IN  EFI_GUID                        *DriverName\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  Add an entry to the mDiscoveredList. Allocate memory to store the DriverEntry, \r
+/**\r
+  Add an entry to the mDiscoveredList. Allocate memory to store the DriverEntry,\r
   and initilize any state variables. Read the Depex from the FV and store it\r
   in DriverEntry. Pre-process the Depex to set the SOR, Before and After state.\r
   The Discovered list is never free'ed and contains booleans that represent the\r
   other possible DXE driver states.\r
 \r
-Arguments:\r
-\r
-  Fv         - Fv protocol, needed to read Depex info out of FLASH.\r
-  \r
-  FvHandle   - Handle for Fv, needed in the EFI_CORE_DRIVER_ENTRY so that the\r
-               PE image can be read out of the FV at a later time.\r
-\r
-  DriverName - Name of driver to add to mDiscoveredList.\r
+  @param  Fv                    Fv protocol, needed to read Depex info out of \r
+                                FLASH. \r
+  @param  FvHandle              Handle for Fv, needed in the \r
+                                EFI_CORE_DRIVER_ENTRY so that the PE image can be \r
+                                read out of the FV at a later time. \r
+  @param  DriverName            Name of driver to add to mDiscoveredList. \r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           If driver was added to the mDiscoveredList. \r
+  @retval EFI_ALREADY_STARTED   The driver has already been started. Only one \r
+                                DriverName may be active in the system at any one \r
+                                time.\r
 \r
-  EFI_SUCCESS - If driver was added to the mDiscoveredList.\r
-\r
-  EFI_ALREADY_STARTED - The driver has already been started. Only one DriverName\r
-                        may be active in the system at any one time.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreAddToDriverList (\r
+  IN  EFI_FIRMWARE_VOLUME2_PROTOCOL   *Fv,\r
+  IN  EFI_HANDLE                      FvHandle,\r
+  IN  EFI_GUID                        *DriverName\r
+  )\r
 {\r
   EFI_CORE_DRIVER_ENTRY               *DriverEntry;\r
 \r
@@ -784,32 +772,25 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
-BOOLEAN\r
-FvFoundInHobFv2 (\r
-  IN  EFI_HANDLE                      FvHandle,\r
-  IN  CONST EFI_GUID                  *DriverName\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Check if a FV Image type file (EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) is\r
   described by a EFI_HOB_FIRMWARE_VOLUME2 Hob.\r
 \r
-Arguments:\r
-\r
-  FvHandle    - The handle which FVB protocol installed on.\r
-  DriverName  - The driver guid specified.\r
-\r
-Returns:\r
+  @param  FvHandle              The handle which FVB protocol installed on. \r
+  @param  DriverName            The driver guid specified. \r
 \r
-  TRUE    - This file is found in a EFI_HOB_FIRMWARE_VOLUME2 Hob.\r
+  @retval TRUE                  This file is found in a EFI_HOB_FIRMWARE_VOLUME2 \r
+                                Hob. \r
+  @retval FALSE                 Not found.\r
 \r
-  FALSE   - Not found.\r
-  \r
-\r
---*/\r
+**/\r
+STATIC\r
+BOOLEAN\r
+FvFoundInHobFv2 (\r
+  IN  EFI_HANDLE                      FvHandle,\r
+  IN  CONST EFI_GUID                  *DriverName\r
+  )\r
 {\r
   EFI_PEI_HOB_POINTERS                HobFv2;\r
   \r
@@ -826,34 +807,25 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Get the driver from the FV through driver name, and produce a FVB protocol on FvHandle.\r
+\r
+  @param  Fv                    The FIRMWARE_VOLUME protocol installed on the FV. \r
+  @param  FvHandle              The handle which FVB protocol installed on. \r
+  @param  DriverName            The driver guid specified. \r
+\r
+  @retval EFI_OUT_OF_RESOURCES  No enough memory or other resource. \r
+  @retval EFI_VOLUME_CORRUPTED  Corrupted volume. \r
+  @retval EFI_SUCCESS           Function successfully returned.\r
+\r
+**/\r
 EFI_STATUS \r
 CoreProcessFvImageFile (\r
   IN  EFI_FIRMWARE_VOLUME2_PROTOCOL   *Fv,\r
   IN  EFI_HANDLE                      FvHandle,\r
   IN  EFI_GUID                        *DriverName\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the driver from the FV through driver name, and produce a FVB protocol on FvHandle.\r
-\r
-Arguments:\r
-\r
-  Fv          - The FIRMWARE_VOLUME protocol installed on the FV.\r
-  FvHandle    - The handle which FVB protocol installed on.\r
-  DriverName  - The driver guid specified.\r
-\r
-Returns:\r
-\r
-  EFI_OUT_OF_RESOURCES    - No enough memory or other resource.\r
-  \r
-  EFI_VOLUME_CORRUPTED    - Corrupted volume.\r
-  \r
-  EFI_SUCCESS             - Function successfully returned.\r
-  \r
-\r
---*/\r
 {\r
   EFI_STATUS                          Status;\r
   EFI_SECTION_TYPE                    SectionType;\r
@@ -932,43 +904,31 @@ Returns:
   return Status;\r
 }\r
 \r
-STATIC\r
-VOID\r
-EFIAPI\r
-CoreFwVolEventProtocolNotify (\r
-  IN  EFI_EVENT       Event,\r
-  IN  VOID            *Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  Event notification that is fired every time a FV dispatch protocol is added. \r
+/**\r
+  Event notification that is fired every time a FV dispatch protocol is added.\r
   More than one protocol may have been added when this event is fired, so you\r
   must loop on CoreLocateHandle () to see how many protocols were added and\r
   do the following to each FV:\r
-\r
-  If the Fv has already been processed, skip it. If the Fv has not been \r
+  If the Fv has already been processed, skip it. If the Fv has not been\r
   processed then mark it as being processed, as we are about to process it.\r
-\r
-  Read the Fv and add any driver in the Fv to the mDiscoveredList.The \r
+  Read the Fv and add any driver in the Fv to the mDiscoveredList.The\r
   mDiscoveredList is never free'ed and contains variables that define\r
-  the other states the DXE driver transitions to.. \r
-  \r
+  the other states the DXE driver transitions to..\r
   While you are at it read the A Priori file into memory.\r
   Place drivers in the A Priori list onto the mScheduledQueue.\r
 \r
-Arguments:\r
-\r
-  Event   - The Event that is being processed, not used.\r
-  \r
-  Context - Event Context, not used.\r
-\r
-Returns:\r
+  @param  Event                 The Event that is being processed, not used. \r
+  @param  Context               Event Context, not used.\r
 \r
-  None\r
-\r
---*/\r
+**/\r
+STATIC\r
+VOID\r
+EFIAPI\r
+CoreFwVolEventProtocolNotify (\r
+  IN  EFI_EVENT       Event,\r
+  IN  VOID            *Context\r
+  )\r
 {\r
   EFI_STATUS                    Status;\r
   EFI_STATUS                    GetNextFileStatus;\r
@@ -1181,26 +1141,16 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-CoreInitializeDispatcher (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Initialize the dispatcher. Initialize the notification function that runs when\r
   a FV protocol is added to the system.\r
 \r
-Arguments:\r
-\r
-  NONE\r
-\r
-Returns:\r
-\r
-  NONE \r
-\r
---*/\r
+**/\r
+VOID\r
+CoreInitializeDispatcher (\r
+  VOID\r
+  )\r
 {\r
   mFwVolEvent = CoreCreateProtocolNotifyEvent (\r
                   &gEfiFirmwareVolume2ProtocolGuid, \r
@@ -1215,26 +1165,16 @@ Returns:
 //\r
 // Function only used in debug builds\r
 //\r
+\r
+/**\r
+  Traverse the discovered list for any drivers that were discovered but not loaded\r
+  because the dependency experessions evaluated to false.\r
+\r
+**/\r
 VOID\r
 CoreDisplayDiscoveredNotDispatched (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Traverse the discovered list for any drivers that were discovered but not loaded \r
-  because the dependency experessions evaluated to false\r
-\r
-Arguments:\r
-\r
-  NONE\r
-\r
-Returns:\r
-\r
-  NONE \r
-\r
---*/\r
 {\r
   LIST_ENTRY                    *Link;\r
   EFI_CORE_DRIVER_ENTRY         *DriverEntry;\r
@@ -1242,7 +1182,7 @@ Returns:
   for (Link = mDiscoveredList.ForwardLink;Link !=&mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_CORE_DRIVER_ENTRY, Link, EFI_CORE_DRIVER_ENTRY_SIGNATURE);\r
     if (DriverEntry->Dependent) {\r
-      DEBUG ((EFI_D_LOAD, "Driver %g was discovered but not loaded!!\n", &DriverEntry->FileName));\r
+      DEBUG ((DEBUG_LOAD, "Driver %g was discovered but not loaded!!\n", &DriverEntry->FileName));\r
     }\r
   }\r
 }\r
index 62bdb14e406272711824b9098473d0f49fdeb821..21f08c2a9c823378d1b49da1a137ad392a6a9c39 100644 (file)
@@ -30,32 +30,20 @@ BOOLEAN *mDepexEvaluationStackPointer = NULL;
 // Worker functions\r
 //\r
 \r
+\r
+/**\r
+  Grow size of the Depex stack\r
+\r
+  @retval EFI_SUCCESS           Stack successfully growed. \r
+  @retval EFI_OUT_OF_RESOURCES  There is not enough system memory to grow the \r
+                                stack.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 GrowDepexStack (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Grow size of the Depex stack\r
-\r
-Arguments:\r
-\r
-  Stack     - Old stack on the way in and new stack on the way out\r
-\r
-  StackSize - New size of the stack\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS          - Stack successfully growed.\r
-  \r
-  EFI_OUT_OF_RESOURCES - There is not enough system memory to grow the stack.\r
-  \r
-  \r
-\r
---*/\r
 {\r
   BOOLEAN     *NewStack;\r
   UINTN       Size;\r
@@ -97,28 +85,22 @@ Returns:
 }\r
 \r
 \r
-STATIC\r
-EFI_STATUS\r
-PushBool (\r
-  IN BOOLEAN  Value\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Push an element onto the Boolean Stack\r
 \r
-Arguments:\r
-\r
-  Value - BOOLEAN to push.\r
+  @param  Value                 BOOLEAN to push. \r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           The value was pushed onto the stack. \r
+  @retval EFI_OUT_OF_RESOURCES  There is not enough system memory to grow the \r
+                                stack.\r
 \r
-  EFI_SUCCESS          - The value was pushed onto the stack.\r
-\r
-  EFI_OUT_OF_RESOURCES - There is not enough system memory to grow the stack.\r
-\r
---*/\r
+**/\r
+STATIC\r
+EFI_STATUS\r
+PushBool (\r
+  IN BOOLEAN  Value\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -145,28 +127,21 @@ Returns:
 }\r
 \r
 \r
-STATIC\r
-EFI_STATUS \r
-PopBool (\r
-  OUT BOOLEAN  *Value\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Pop an element from the Boolean stack.\r
 \r
-Arguments:\r
-\r
-  Value - BOOLEAN to pop.\r
-\r
-Returns:\r
+  @param  Value                 BOOLEAN to pop. \r
 \r
-  EFI_SUCCESS       - The value was popped onto the stack.\r
+  @retval EFI_SUCCESS           The value was popped onto the stack. \r
+  @retval EFI_ACCESS_DENIED     The pop operation underflowed the stack\r
 \r
-  EFI_ACCESS_DENIED - The pop operation underflowed the stack\r
-\r
---*/\r
+**/\r
+STATIC\r
+EFI_STATUS \r
+PopBool (\r
+  OUT BOOLEAN  *Value\r
+  )\r
 {\r
   //\r
   // Check for a stack underflow condition\r
@@ -184,29 +159,23 @@ Returns:
 }\r
 \r
 \r
-EFI_STATUS\r
-CorePreProcessDepex (\r
-  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry  \r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Preprocess dependency expression and update DriverEntry to reflect the\r
   state of  Before, After, and SOR dependencies. If DriverEntry->Before\r
   or DriverEntry->After is set it will never be cleared. If SOR is set\r
-  it will be cleared by CoreSchedule(), and then the driver can be \r
+  it will be cleared by CoreSchedule(), and then the driver can be\r
   dispatched.\r
 \r
-Arguments:\r
+  @param  DriverEntry           DriverEntry element to update \r
 \r
-  DriverEntry - DriverEntry element to update\r
+  @retval EFI_SUCCESS           It always works.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS - It always works.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CorePreProcessDepex (\r
+  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry  \r
+  )\r
 {\r
   UINT8  *Iterator;\r
     \r
@@ -231,31 +200,24 @@ Returns:
 }\r
 \r
 \r
-BOOLEAN\r
-CoreIsSchedulable (\r
-  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry  \r
-  )\r
-/*++\r
 \r
-Routine Description:\r
-\r
-  This is the POSTFIX version of the dependency evaluator.  This code does \r
-  not need to handle Before or After, as it is not valid to call this \r
+/**\r
+  This is the POSTFIX version of the dependency evaluator.  This code does\r
+  not need to handle Before or After, as it is not valid to call this\r
   routine in this case. The SOR is just ignored and is a nop in the grammer.\r
-\r
   POSTFIX means all the math is done on top of the stack.\r
 \r
-Arguments:\r
+  @param  DriverEntry           DriverEntry element to update \r
 \r
-  DriverEntry - DriverEntry element to update\r
-  \r
-Returns:\r
-\r
-  TRUE - If driver is ready to run.\r
-\r
-  FALSE - If driver is not ready to run or some fatal error was found.\r
+  @retval TRUE                  If driver is ready to run. \r
+  @retval FALSE                 If driver is not ready to run or some fatal error \r
+                                was found.\r
 \r
---*/\r
+**/\r
+BOOLEAN\r
+CoreIsSchedulable (\r
+  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry  \r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   UINT8       *Iterator;\r
@@ -444,3 +406,4 @@ Done:
   return FALSE;\r
 }\r
 \r
+\r
index 2830e10a03f3d1aa047c21a90f7ff4eda0dad01f..30f7fe33be76b9cc32b2324a749e8264a0c610a5 100644 (file)
@@ -1,9 +1,9 @@
-/**@file\r
+/** @file\r
 \r
   The internal header file includes the common header files, defines\r
   internal structure and functions used by DxeCore module.\r
   \r
-Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -230,27 +230,33 @@ extern EFI_RUNTIME_ARCH_PROTOCOL                gRuntimeTemplate;
 //\r
 \r
 \r
+\r
+/**\r
+  Called to initialize the pool.\r
+\r
+**/\r
 VOID\r
 CoreInitializePool (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Called to initialize the pool.\r
+;\r
 \r
-Arguments:\r
 \r
-  None\r
+/**\r
+  Called to initialize the memory map and add descriptors to\r
+  the current descriptor list.\r
+  The first descriptor that is added must be general usable\r
+  memory as the addition allocates heap.\r
 \r
-Returns:\r
+  @param  Type                   The type of memory to add \r
+  @param  Start                  The starting address in the memory range Must be \r
+                                 page aligned \r
+  @param  NumberOfPages          The number of pages in the range \r
+  @param  Attribute              Attributes of the memory to add \r
 \r
-  None\r
-\r
---*/\r
-;\r
+  @return None.  The range is added to the memory map\r
 \r
+**/\r
 VOID\r
 CoreAddMemoryDescriptor (\r
   IN EFI_MEMORY_TYPE       Type,\r
@@ -258,512 +264,371 @@ CoreAddMemoryDescriptor (
   IN UINT64                NumberOfPages,\r
   IN UINT64                Attribute\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Called to initialize the memory map and add descriptors to\r
-  the current descriptor list.\r
-\r
-       The first descriptor that is added must be general usable\r
-  memory as the addition allocates heap.\r
-\r
-Arguments:\r
-\r
-  Type          - The type of memory to add\r
-\r
-  Start         - The starting address in the memory range\r
-                  Must be page aligned\r
-\r
-  NumberOfPages - The number of pages in the range\r
-\r
-  Attribute     - Attributes of the memory to add\r
-\r
-Returns:\r
+;\r
 \r
-  None.  The range is added to the memory map\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
 \r
-Returns:\r
-    None\r
 \r
---*/\r
-;\r
+/**\r
+  Acquire memory lock on mGcdMemorySpaceLock.\r
 \r
+**/\r
 VOID\r
 CoreAcquireGcdMemoryLock (\r
   VOID\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-    Acquire memory lock on mGcdMemorySpaceLock\r
 \r
-Arguments:\r
-    None\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
-Returns:\r
-    None\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
---*/\r
-;\r
+  @retval EFI_SUCCESS            Memory services successfully initialized.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreInitializeMemoryServices (\r
   IN VOID                  **HobStart,\r
   IN EFI_PHYSICAL_ADDRESS  *MemoryBaseAddress,\r
   IN UINT64                *MemoryLength\r
   )\r
-/*++\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
-\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
-\r
-Returns:\r
-\r
-  EFI_SUCCESS         - Memory services successfully initialized.\r
+  can be used to intialize the GCD map. The HobStart will be relocated to a pool\r
+  buffer.\r
 \r
---*/\r
-;\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
+**/\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
-  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
-  buffer.\r
-\r
-Arguments:\r
+;\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
 \r
+/**\r
+  Initializes "event" support and populates parts of the System and Runtime Table.\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS         - GCD services successfully initialized.\r
-\r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Always return success\r
 \r
+**/\r
 EFI_STATUS\r
 CoreInitializeEventServices (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initializes "event" support and populates parts of the System and Runtime Table.\r
+;\r
 \r
-Arguments:\r
 \r
-  None\r
-    \r
-Returns:\r
+/**\r
+  Add the Image Services to EFI Boot Services Table and install the protocol\r
+  interfaces for this image.\r
 \r
-  EFI_SUCCESS - Always return success\r
+  @param  HobStart                The HOB to initialize \r
 \r
---*/\r
-;\r
+  @return Status code.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreInitializeImageServices (\r
   IN  VOID *HobStart\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add the Image Services to EFI Boot Services Table and install the protocol\r
-  interfaces for this image.\r
-\r
-Arguments:\r
-\r
-  HobStart        - The HOB to initialize\r
-\r
-Returns:\r
+;\r
 \r
-  Status code.\r
 \r
---*/\r
-;\r
+/**\r
+  Creates an event that is fired everytime a Protocol of a specific type is installed.\r
 \r
+**/\r
 VOID\r
 CoreNotifyOnArchProtocolInstallation (\r
   VOID\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Creates an event that is fired everytime a Protocol of a specific type is installed\r
 \r
-Arguments:\r
-  NONE\r
+/**\r
+  Return TRUE if all AP services are availible.\r
 \r
-Returns:\r
-  NONE\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS    All AP services are available \r
+  @retval EFI_NOT_FOUND  At least one AP service is not available\r
 \r
+**/\r
 EFI_STATUS\r
 CoreAllEfiServicesAvailable (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Return TRUE if all AP services are availible.\r
+;\r
 \r
-Arguments:\r
-  NONE\r
 \r
-Returns:\r
-  EFI_SUCCESS   - All AP services are available\r
-  EFI_NOT_FOUND - At least one AP service is not available \r
+/**\r
+  Calcualte the 32-bit CRC in a EFI table using the service provided by the\r
+  gRuntime service.\r
 \r
---*/\r
-;\r
+  @param  Hdr                    Pointer to an EFI standard header\r
 \r
+**/\r
 VOID\r
 CalculateEfiHdrCrc (\r
   IN  OUT EFI_TABLE_HEADER    *Hdr\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Calcualte the 32-bit CRC in a EFI table using the service provided by the\r
-  gRuntime service.\r
-\r
-Arguments:\r
-\r
-  Hdr  - Pointer to an EFI standard header\r
+;\r
 \r
-Returns:\r
 \r
-  None\r
+/**\r
+  Called by the platform code to process a tick.\r
 \r
---*/\r
-;\r
+  @param  Duration               The number of 100ns elasped since the last call \r
+                                 to TimerTick\r
 \r
+**/\r
 VOID\r
 EFIAPI\r
 CoreTimerTick (\r
   IN UINT64     Duration\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Called by the platform code to process a tick.\r
-\r
-Arguments:\r
-\r
-  Duration    - The number of 100ns elasped since the last call to TimerTick\r
-    \r
-Returns:\r
+;\r
 \r
-  None\r
 \r
---*/\r
-;\r
+/**\r
+  Initialize the dispatcher. Initialize the notification function that runs when\r
+  a FV protocol is added to the system.\r
 \r
+**/\r
 VOID\r
 CoreInitializeDispatcher (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the dispatcher. Initialize the notification function that runs when\r
-  a FV protocol is added to the system.\r
+;\r
 \r
-Arguments:\r
 \r
-  NONE\r
+/**\r
+  This is the POSTFIX version of the dependency evaluator.  This code does\r
+  not need to handle Before or After, as it is not valid to call this\r
+  routine in this case. The SOR is just ignored and is a nop in the grammer.\r
+  POSTFIX means all the math is done on top of the stack.\r
 \r
-Returns:\r
+  @param  DriverEntry           DriverEntry element to update \r
 \r
-  NONE \r
-\r
---*/\r
-;\r
+  @retval TRUE                  If driver is ready to run. \r
+  @retval FALSE                 If driver is not ready to run or some fatal error \r
+                                was found.\r
 \r
+**/\r
 BOOLEAN\r
 CoreIsSchedulable (\r
   IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry  \r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This is the POSTFIX version of the dependency evaluator.  This code does \r
-  not need to handle Before or After, as it is not valid to call this \r
-  routine in this case. The SOR is just ignored and is a nop in the grammer.\r
-\r
-  POSTFIX means all the math is done on top of the stack.\r
-\r
-Arguments:\r
+;\r
 \r
-  DriverEntry - DriverEntry element to update\r
-  \r
-Returns:\r
 \r
-  TRUE - If driver is ready to run.\r
+/**\r
+  Preprocess dependency expression and update DriverEntry to reflect the\r
+  state of  Before, After, and SOR dependencies. If DriverEntry->Before\r
+  or DriverEntry->After is set it will never be cleared. If SOR is set\r
+  it will be cleared by CoreSchedule(), and then the driver can be\r
+  dispatched.\r
 \r
-  FALSE - If driver is not ready to run or some fatal error was found.\r
+  @param  DriverEntry           DriverEntry element to update \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS           It always works.\r
 \r
+**/\r
 EFI_STATUS\r
 CorePreProcessDepex (\r
   IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry  \r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Preprocess dependency expression and update DriverEntry to reflect the\r
-  state of  Before, After, and SOR dependencies. If DriverEntry->Before\r
-  or DriverEntry->After is set it will never be cleared. If SOR is set\r
-  it will be cleared by CoreSchedule(), and then the driver can be \r
-  dispatched.\r
-\r
-Arguments:\r
+;\r
 \r
-  DriverEntry - DriverEntry element to update\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS - It always works.\r
+/**\r
+  Terminates all boot services.\r
 \r
---*/\r
-;\r
+  @param  ImageHandle            Handle that identifies the exiting image. \r
+  @param  MapKey                 Key to the latest memory map.\r
 \r
+  @retval EFI_SUCCESS            Boot Services terminated \r
+  @retval EFI_INVALID_PARAMETER  MapKey is incorrect.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreExitBootServices (\r
   IN EFI_HANDLE   ImageHandle,\r
   IN UINTN        MapKey\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  UEFI 2.0 API to terminate Boot Services\r
-\r
-Arguments:\r
-\r
-  ImageHandle - Handle that represents the identity of the calling image\r
+;\r
 \r
-  MapKey      -Key to the latest memory map.\r
 \r
-Returns:\r
+/**\r
+  Make sure the memory map is following all the construction rules,\r
+  it is the last time to check memory map error before exit boot services.\r
 \r
-  EFI_SUCCESS - Boot Services terminated\r
-  EFI_INVALID_PARAMETER - MapKey is incorrect.\r
+  @param  MapKey                 Memory map key \r
 \r
---*/\r
-;\r
+  @retval EFI_INVALID_PARAMETER  Memory map not consistent with construction \r
+                                 rules. \r
+  @retval EFI_SUCCESS            Valid memory map.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreTerminateMemoryMap (\r
   IN UINTN        MapKey\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Make sure the memory map is following all the construction rules, \r
-  it is the last time to check memory map error before exit boot services.\r
-\r
-Arguments:\r
-\r
-  MapKey        - Memory map key\r
+;\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER       - Memory map not consistent with construction rules.\r
-  \r
-  EFI_SUCCESS                 - Valid memory map.\r
+/**\r
+  Signals all events in the EventGroup.\r
 \r
---*/\r
-;\r
+  @param  EventGroup             The list to signal\r
 \r
+**/\r
 VOID\r
 CoreNotifySignalList (\r
   IN EFI_GUID     *EventGroup\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Signals all events on the requested list\r
+;\r
 \r
-Arguments:\r
 \r
-  SignalType      - The list to signal\r
-    \r
-Returns:\r
 \r
-  None\r
+/**\r
+  Boot Service called to add, modify, or remove a system configuration table from\r
+  the EFI System Table.\r
 \r
---*/\r
-;\r
+  @param  Guid           Pointer to the GUID for the entry to add, update, or \r
+                         remove \r
+  @param  Table          Pointer to the configuration table for the entry to add, \r
+                         update, or remove, may be NULL. \r
 \r
+  @return EFI_SUCCESS               Guid, Table pair added, updated, or removed.\r
+  @return EFI_INVALID_PARAMETER     Input GUID not valid.\r
+  @return EFI_NOT_FOUND             Attempted to delete non-existant entry\r
+  @return EFI_OUT_OF_RESOURCES      Not enough memory available\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreInstallConfigurationTable (\r
   IN EFI_GUID         *Guid,\r
   IN VOID             *Table\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Boot Service called to add, modify, or remove a system configuration table from \r
-  the EFI System Table.\r
+;\r
 \r
-Arguments:\r
 \r
-  Guid:   Pointer to the GUID for the entry to add, update, or remove\r
-  Table:  Pointer to the configuration table for the entry to add, update, or\r
-          remove, may be NULL.\r
 \r
-Returns:\r
-  \r
-  EFI_SUCCESS               Guid, Table pair added, updated, or removed.\r
-  EFI_INVALID_PARAMETER     Input GUID not valid.\r
-  EFI_NOT_FOUND             Attempted to delete non-existant entry\r
-  EFI_OUT_OF_RESOURCES      Not enough memory available\r
+/**\r
+  Raise the task priority level to the new level.\r
+  High level is implemented by disabling processor interrupts.\r
 \r
---*/\r
-;\r
+  @param  NewTpl  New task priority level \r
 \r
+  @return The previous task priority level\r
 \r
+**/\r
 EFI_TPL\r
 EFIAPI\r
 CoreRaiseTpl (\r
   IN EFI_TPL  NewTpl\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Raise the task priority level to the new level.\r
-  High level is implemented by disabling processor interrupts.\r
-\r
-Arguments:\r
+;\r
 \r
-  NewTpl  - New task priority level\r
-    \r
-Returns:\r
 \r
-  The previous task priority level\r
 \r
---*/\r
-;\r
+/**\r
+  Lowers the task priority to the previous value.   If the new\r
+  priority unmasks events at a higher priority, they are dispatched.\r
 \r
+  @param  NewTpl  New, lower, task priority\r
 \r
+**/\r
 VOID\r
 EFIAPI\r
 CoreRestoreTpl (\r
   IN EFI_TPL  NewTpl\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Lowers the task priority to the previous value.   If the new \r
-  priority unmasks events at a higher priority, they are dispatched.\r
+;\r
 \r
-Arguments:\r
 \r
-  NewTpl  - New, lower, task priority\r
-    \r
-Returns:\r
 \r
-  None\r
+/**\r
+  Introduces a fine-grained stall.\r
 \r
---*/\r
-;\r
+  @param  Microseconds           The number of microseconds to stall execution.\r
 \r
+  @retval EFI_SUCCESS            Execution was stalled for at least the requested \r
+                                 amount of microseconds. \r
+  @retval EFI_NOT_AVAILABLE_YET  gMetronome is not available yet\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreStall (\r
   IN UINTN            Microseconds\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Introduces a fine-grained stall.\r
-\r
-Arguments:\r
-\r
-  Microseconds      The number of microseconds to stall execution\r
-\r
-Returns:\r
+;\r
 \r
-  EFI_SUCCESS            - Execution was stalled for at least the requested amount\r
-                           of microseconds.\r
 \r
-  EFI_NOT_AVAILABLE_YET  - gMetronome is not available yet\r
 \r
---*/\r
-;\r
+/**\r
+  Sets the system's watchdog timer.\r
 \r
+  @param  Timeout         The number of seconds to set the watchdog timer to.\r
+                          A value of zero disables the timer.\r
+  @param  WatchdogCode    The numeric code to log on a watchdog timer timeout\r
+                          event. The firmware reserves codes 0x0000 to 0xFFFF.\r
+                          Loaders and operating systems may use other timeout\r
+                          codes.\r
+  @param  DataSize        The size, in bytes, of WatchdogData.\r
+  @param  WatchdogData    A data buffer that includes a Null-terminated Unicode\r
+                          string, optionally followed by additional binary data.\r
+                          The string is a description that the call may use to\r
+                          further indicate the reason to be logged with a\r
+                          watchdog event.\r
+\r
+  @return EFI_SUCCESS               Timeout has been set\r
+  @return EFI_NOT_AVAILABLE_YET     WatchdogTimer is not available yet\r
+  @return EFI_UNSUPPORTED           System does not have a timer (currently not used)\r
+  @return EFI_DEVICE_ERROR          Could not complete due to hardware error\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreSetWatchdogTimer (\r
@@ -772,34 +637,24 @@ CoreSetWatchdogTimer (
   IN UINTN            DataSize,\r
   IN CHAR16           *WatchdogData   OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Sets the system's watchdog timer.\r
-\r
-Arguments:\r
-\r
-  Timeout         The number of seconds.  Zero disables the timer.\r
+;\r
 \r
-  ///////following  three parameters are left for platform specific using  \r
-  \r
-  WatchdogCode    The numberic code to log.  0x0 to 0xffff are firmware\r
-  DataSize        Size of the optional data\r
-  WatchdogData    Optional Null terminated unicode string followed by binary \r
-                  data.\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS               Timeout has been set\r
-  EFI_NOT_AVAILABLE_YET     WatchdogTimer is not available yet \r
-  EFI_UNSUPPORTED           System does not have a timer (currently not used)\r
-  EFI_DEVICE_ERROR          Could not complete due to hardware error\r
+/**\r
+  Wrapper function to CoreInstallProtocolInterfaceNotify.  This is the public API which\r
+  Calls the private one which contains a BOOLEAN parameter for notifications\r
 \r
---*/\r
-;\r
+  @param  UserHandle             The handle to install the protocol handler on, \r
+                                 or NULL if a new handle is to be allocated \r
+  @param  Protocol               The protocol to add to the handle \r
+  @param  InterfaceType          Indicates whether Interface is supplied in \r
+                                 native form. \r
+  @param  Interface              The interface for the protocol being added \r
 \r
+  @return Status code\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreInstallProtocolInterface (\r
@@ -808,31 +663,26 @@ CoreInstallProtocolInterface (
   IN EFI_INTERFACE_TYPE InterfaceType,\r
   IN VOID               *Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Wrapper function to CoreInstallProtocolInterfaceNotify.  This is the public API which\r
-  Calls the private one which contains a BOOLEAN parameter for notifications\r
-\r
-Arguments:\r
-\r
-  UserHandle     - The handle to install the protocol handler on,\r
-                    or NULL if a new handle is to be allocated\r
-\r
-  Protocol       - The protocol to add to the handle\r
-\r
-  InterfaceType  - Indicates whether Interface is supplied in native form.\r
+;\r
 \r
-  Interface      - The interface for the protocol being added\r
 \r
-Returns:\r
+/**\r
+  Installs a protocol interface into the boot services environment.\r
 \r
-  Status code    \r
+  @param  UserHandle             The handle to install the protocol handler on, \r
+                                 or NULL if a new handle is to be allocated \r
+  @param  Protocol               The protocol to add to the handle \r
+  @param  InterfaceType          Indicates whether Interface is supplied in \r
+                                 native form. \r
+  @param  Interface              The interface for the protocol being added \r
+  @param  Notify                 indicates whether notify the notification list  \r
+                                 for this protocol \r
 \r
---*/\r
-;\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate \r
+  @retval EFI_SUCCESS            Protocol interface successfully installed\r
 \r
+**/\r
 EFI_STATUS\r
 CoreInstallProtocolInterfaceNotify (\r
   IN OUT EFI_HANDLE     *UserHandle,\r
@@ -841,100 +691,75 @@ CoreInstallProtocolInterfaceNotify (
   IN VOID               *Interface,\r
   IN BOOLEAN            Notify\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Installs a protocol interface into the boot services environment.\r
-\r
-Arguments:\r
-\r
-  UserHandle     - The handle to install the protocol handler on,\r
-                   or NULL if a new handle is to be allocated\r
-\r
-  Protocol       - The protocol to add to the handle\r
-\r
-  InterfaceType  - Indicates whether Interface is supplied in native form.\r
+;\r
 \r
-  Interface      - The interface for the protocol being added\r
-  \r
-  Notify         - Whether to notify the notification list for this protocol \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               - Protocol interface successfully installed\r
+/**\r
+  Installs a list of protocol interface into the boot services environment.\r
+  This function calls InstallProtocolInterface() in a loop. If any error\r
+  occures all the protocols added by this function are removed. This is\r
+  basically a lib function to save space.\r
 \r
---*/\r
-;\r
+  @param  Handle                 The handle to install the protocol handlers on, \r
+                                 or NULL if a new handle is to be allocated \r
+  @param  ...                    EFI_GUID followed by protocol instance. A NULL \r
+                                 terminates the  list. The pairs are the \r
+                                 arguments to InstallProtocolInterface(). All the \r
+                                 protocols are added to Handle. \r
 \r
+  @retval EFI_INVALID_PARAMETER  Handle is NULL. \r
+  @retval EFI_SUCCESS            Protocol interfaces successfully installed.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreInstallMultipleProtocolInterfaces (\r
   IN OUT EFI_HANDLE           *Handle,\r
   ...\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Installs a list of protocol interface into the boot services environment.\r
-  This function calls InstallProtocolInterface() in a loop. If any error\r
-  occures all the protocols added by this function are removed. This is \r
-  basically a lib function to save space.\r
-\r
-Arguments:\r
+;\r
 \r
-  Handle      - The handle to install the protocol handlers on,\r
-                or NULL if a new handle is to be allocated\r
-  ...         - EFI_GUID followed by protocol instance. A NULL terminates the \r
-                list. The pairs are the arguments to InstallProtocolInterface().\r
-                All the protocols are added to Handle.\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER       - Handle is NULL.\r
-  \r
-  EFI_SUCCESS                 - Protocol interfaces successfully installed.\r
+/**\r
+  Uninstalls a list of protocol interface in the boot services environment.\r
+  This function calls UnisatllProtocolInterface() in a loop. This is\r
+  basically a lib function to save space.\r
 \r
---*/\r
-;\r
+  @param  Handle                 The handle to uninstall the protocol \r
+  @param  ...                    EFI_GUID followed by protocol instance. A NULL \r
+                                 terminates the  list. The pairs are the \r
+                                 arguments to UninstallProtocolInterface(). All \r
+                                 the protocols are added to Handle. \r
 \r
+  @return Status code\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreUninstallMultipleProtocolInterfaces (\r
   IN EFI_HANDLE           Handle,\r
   ...\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Uninstalls a list of protocol interface in the boot services environment. \r
-  This function calls UnisatllProtocolInterface() in a loop. This is \r
-  basically a lib function to save space.\r
-\r
-Arguments:\r
-\r
-  Handle      - The handle to uninstall the protocol\r
+;\r
 \r
-  ...         - EFI_GUID followed by protocol instance. A NULL terminates the \r
-                list. The pairs are the arguments to UninstallProtocolInterface().\r
-                All the protocols are added to Handle.\r
 \r
-Returns:\r
 \r
-  Status code    \r
+/**\r
+  Reinstall a protocol interface on a device handle.  The OldInterface for Protocol is replaced by the NewInterface.\r
 \r
---*/\r
-;\r
+  @param  UserHandle             Handle on which the interface is to be \r
+                                 reinstalled \r
+  @param  Protocol               The numeric ID of the interface \r
+  @param  OldInterface           A pointer to the old interface \r
+  @param  NewInterface           A pointer to the new interface \r
 \r
+  @retval EFI_SUCCESS            The protocol interface was installed\r
+  @retval EFI_NOT_FOUND          The OldInterface on the handle was not found\r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreReinstallProtocolInterface (\r
@@ -943,32 +768,23 @@ CoreReinstallProtocolInterface (
   IN VOID           *OldInterface,\r
   IN VOID           *NewInterface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Reinstall a protocol interface on a device handle.  The OldInterface for Protocol is replaced by the NewInterface.\r
-\r
-Arguments:\r
-\r
-  UserHandle    - Handle on which the interface is to be reinstalled\r
-  Protocol      - The numeric ID of the interface\r
-  OldInterface  - A pointer to the old interface\r
-  NewInterface  - A pointer to the new interface \r
+;\r
 \r
 \r
-Returns:\r
 \r
-  Status code.\r
+/**\r
+  Uninstalls all instances of a protocol:interfacer from a handle.\r
+  If the last protocol interface is remove from the handle, the\r
+  handle is freed.\r
 \r
-  On EFI_SUCCESS            The protocol interface was installed\r
-  On EFI_NOT_FOUND          The OldInterface on the handle was not found\r
-  On EFI_INVALID_PARAMETER  One of the parameters has an invalid value\r
-  \r
---*/\r
-;\r
+  @param  UserHandle             The handle to remove the protocol handler from \r
+  @param  Protocol               The protocol, of protocol:interface, to remove \r
+  @param  Interface              The interface, of protocol:interface, to remove \r
 \r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL. \r
+  @retval EFI_SUCCESS            Protocol interface successfully uninstalled.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreUninstallProtocolInterface (\r
@@ -976,32 +792,21 @@ CoreUninstallProtocolInterface (
   IN EFI_GUID         *Protocol,\r
   IN VOID             *Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Uninstalls all instances of a protocol:interfacer from a handle. \r
-  If the last protocol interface is remove from the handle, the \r
-  handle is freed.\r
-\r
-Arguments:\r
-\r
-  UserHandle      - The handle to remove the protocol handler from\r
-\r
-  Protocol        - The protocol, of protocol:interface, to remove\r
+;\r
 \r
-  Interface       - The interface, of protocol:interface, to remove\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER       - Protocol is NULL.\r
-  \r
-  EFI_SUCCESS                 - Protocol interface successfully uninstalled.\r
+/**\r
+  Queries a handle to determine if it supports a specified protocol.\r
 \r
---*/\r
-;\r
+  @param  UserHandle             The handle being queried. \r
+  @param  Protocol               The published unique identifier of the protocol. \r
+  @param  Interface              Supplies the address where a pointer to the \r
+                                 corresponding Protocol Interface is returned. \r
 \r
+  @return The requested protocol interface for the handle\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreHandleProtocol (\r
@@ -1009,29 +814,30 @@ CoreHandleProtocol (
   IN  EFI_GUID         *Protocol,\r
   OUT VOID             **Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Queries a handle to determine if it supports a specified protocol.\r
-\r
-Arguments:\r
-\r
-  UserHandle  - The handle being queried.\r
+;\r
 \r
-  Protocol    - The published unique identifier of the protocol.\r
 \r
-  Interface   - Supplies the address where a pointer to the corresponding Protocol\r
-               Interface is returned.\r
 \r
-Returns:\r
+/**\r
+  Locates the installed protocol handler for the handle, and\r
+  invokes it to obtain the protocol interface. Usage information\r
+  is registered in the protocol data base.\r
 \r
-  The requested protocol interface for the handle\r
-  \r
---*/  \r
-;\r
+  @param  UserHandle             The handle to obtain the protocol interface on \r
+  @param  Protocol               The ID of the protocol \r
+  @param  Interface              The location to return the protocol interface \r
+  @param  ImageHandle            The handle of the Image that is opening the \r
+                                 protocol interface specified by Protocol and \r
+                                 Interface. \r
+  @param  ControllerHandle       The controller handle that is requiring this \r
+                                 interface. \r
+  @param  Attributes             The open mode of the protocol interface \r
+                                 specified by Handle and Protocol. \r
 \r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL. \r
+  @retval EFI_SUCCESS            Get the protocol interface.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreOpenProtocol (\r
@@ -1042,40 +848,21 @@ CoreOpenProtocol (
   IN  EFI_HANDLE                ControllerHandle,\r
   IN  UINT32                    Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locates the installed protocol handler for the handle, and\r
-  invokes it to obtain the protocol interface. Usage information\r
-  is registered in the protocol data base.\r
-\r
-Arguments:\r
-\r
-  UserHandle        - The handle to obtain the protocol interface on\r
-\r
-  Protocol          - The ID of the protocol \r
-\r
-  Interface         - The location to return the protocol interface\r
-\r
-  ImageHandle       - The handle of the Image that is opening the protocol interface\r
-                    specified by Protocol and Interface.\r
-  \r
-  ControllerHandle  - The controller handle that is requiring this interface.\r
+;\r
 \r
-  Attributes     - The open mode of the protocol interface specified by Handle\r
-                    and Protocol.\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER       - Protocol is NULL.\r
-  \r
-  EFI_SUCCESS                 - Get the protocol interface.\r
-  \r
---*/\r
-;\r
+/**\r
+  Return information about Opened protocols in the system\r
 \r
+  @param  UserHandle             The handle to close the protocol interface on \r
+  @param  Protocol               The ID of the protocol \r
+  @param  EntryBuffer            A pointer to a buffer of open protocol \r
+                                 information in the form of \r
+                                 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures. \r
+  @param  EntryCount             Number of EntryBuffer entries\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreOpenProtocolInformation (\r
@@ -1084,62 +871,70 @@ CoreOpenProtocolInformation (
   OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,\r
   OUT UINTN                               *EntryCount\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Return information about Opened protocols in the system\r
-\r
-Arguments:\r
-\r
-  UserHandle  - The handle to close the protocol interface on\r
-\r
-  Protocol    - The ID of the protocol \r
+;\r
 \r
-  EntryBuffer - A pointer to a buffer of open protocol information in the form of\r
-                EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r
 \r
-  EntryCount  - Number of EntryBuffer entries\r
 \r
-Returns:\r
+/**\r
+  Closes a protocol on a handle that was opened using OpenProtocol().\r
 \r
-  \r
---*/\r
-;\r
+  @param  UserHandle             The handle for the protocol interface that was \r
+                                 previously opened with OpenProtocol(), and is \r
+                                 now being closed. \r
+  @param  Protocol               The published unique identifier of the protocol. \r
+                                 It is the caller's responsibility to pass in a \r
+                                 valid GUID. \r
+  @param  AgentHandle            The handle of the agent that is closing the \r
+                                 protocol interface. \r
+  @param  ControllerHandle       If the agent that opened a protocol is a driver \r
+                                 that follows the EFI Driver Model, then this \r
+                                 parameter is the controller handle that required \r
+                                 the protocol interface. If the agent does not \r
+                                 follow the EFI Driver Model, then this parameter \r
+                                 is optional and may be NULL. \r
 \r
+  @retval EFI_SUCCESS            The protocol instance was closed. \r
+  @retval EFI_INVALID_PARAMETER  Handle, AgentHandle or ControllerHandle is not a \r
+                                 valid EFI_HANDLE. \r
+  @retval EFI_NOT_FOUND          Can not find the specified protocol or \r
+                                 AgentHandle.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCloseProtocol (\r
   IN  EFI_HANDLE                UserHandle,\r
   IN  EFI_GUID                  *Protocol,\r
-  IN  EFI_HANDLE                ImageHandle,\r
+  IN  EFI_HANDLE                AgentHandle,\r
   IN  EFI_HANDLE                ControllerHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Close Protocol\r
-\r
-Arguments:\r
-\r
-  UserHandle       - The handle to close the protocol interface on\r
-\r
-  Protocol         - The ID of the protocol \r
-\r
-  ImageHandle      - The user of the protocol to close\r
-\r
-  ControllerHandle - The user of the protocol to close\r
+;\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER     - Protocol is NULL.\r
-    \r
---*/\r
-;\r
 \r
+/**\r
+  Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r
+  from pool.\r
+\r
+  @param  UserHandle             The handle from which to retrieve the list of \r
+                                 protocol interface GUIDs. \r
+  @param  ProtocolBuffer         A pointer to the list of protocol interface GUID \r
+                                 pointers that are installed on Handle. \r
+  @param  ProtocolBufferCount    A pointer to the number of GUID pointers present \r
+                                 in ProtocolBuffer. \r
+\r
+  @retval EFI_SUCCESS            The list of protocol interface GUIDs installed \r
+                                 on Handle was returned in ProtocolBuffer. The \r
+                                 number of protocol interface GUIDs was returned \r
+                                 in ProtocolBufferCount. \r
+  @retval EFI_INVALID_PARAMETER  Handle is NULL. \r
+  @retval EFI_INVALID_PARAMETER  Handle is not a valid EFI_HANDLE. \r
+  @retval EFI_INVALID_PARAMETER  ProtocolBuffer is NULL. \r
+  @retval EFI_INVALID_PARAMETER  ProtocolBufferCount is NULL. \r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the \r
+                                 results.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreProtocolsPerHandle (\r
@@ -1147,70 +942,52 @@ CoreProtocolsPerHandle (
   OUT EFI_GUID         ***ProtocolBuffer,\r
   OUT UINTN            *ProtocolBufferCount\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r
- from pool.\r
-\r
-Arguments:\r
+;\r
 \r
-  UserHandle           - The handle from which to retrieve the list of protocol interface\r
-                          GUIDs.\r
 \r
-  ProtocolBuffer       - A pointer to the list of protocol interface GUID pointers that are\r
-                          installed on Handle.\r
 \r
-  ProtocolBufferCount  - A pointer to the number of GUID pointers present in\r
-                          ProtocolBuffer.\r
+/**\r
+  Add a new protocol notification record for the request protocol.\r
 \r
-Returns:\r
-  EFI_SUCCESS   -  The list of protocol interface GUIDs installed on Handle was returned in\r
-                   ProtocolBuffer. The number of protocol interface GUIDs was\r
-                   returned in ProtocolBufferCount.\r
-  EFI_INVALID_PARAMETER   -  Handle is NULL.\r
-  EFI_INVALID_PARAMETER   -  Handle is not a valid EFI_HANDLE.\r
-  EFI_INVALID_PARAMETER   -  ProtocolBuffer is NULL.\r
-  EFI_INVALID_PARAMETER   -  ProtocolBufferCount is NULL.\r
-  EFI_OUT_OF_RESOURCES    -  There is not enough pool memory to store the results.\r
-  \r
---*/\r
-;\r
+  @param  Protocol               The requested protocol to add the notify \r
+                                 registration \r
+  @param  Event                  The event to signal \r
+  @param  Registration           Returns the registration record \r
 \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_SUCCESS            Successfully returned the registration record \r
+                                 that has been added\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreRegisterProtocolNotify (\r
   IN  EFI_GUID       *Protocol,\r
   IN  EFI_EVENT      Event,\r
   OUT VOID           **Registration\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add a new protocol notification record for the request protocol.\r
-\r
-Arguments:\r
-\r
-  Protocol      - The requested protocol to add the notify registration\r
-\r
-  Event         - The event to signal \r
-\r
-  Registration  - Returns the registration record\r
+  )\r
+;\r
+  \r
 \r
 \r
-Returns:\r
+/**\r
+  Locates the requested handle(s) and returns them in Buffer.\r
 \r
-  EFI_INVALID_PARAMETER       - Invalid parameter\r
+  @param  SearchType             The type of search to perform to locate the \r
+                                 handles \r
+  @param  Protocol               The protocol to search for \r
+  @param  SearchKey              Dependant on SearchType \r
+  @param  BufferSize             On input the size of Buffer.  On output the  \r
+                                 size of data returned. \r
+  @param  Buffer                 The buffer to return the results in \r
 \r
-  EFI_SUCCESS                 - Successfully returned the registration record that has been added\r
-  \r
---*/\r
-;\r
-  \r
+  @retval EFI_BUFFER_TOO_SMALL   Buffer too small, required buffer size is \r
+                                 returned in BufferSize. \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_SUCCESS            Successfully found the requested handle(s) and \r
+                                 returns them in Buffer.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLocateHandle (\r
@@ -1220,68 +997,58 @@ CoreLocateHandle (
   IN OUT UINTN                          *BufferSize,\r
   OUT    EFI_HANDLE                     *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locates the requested handle(s) and returns them in Buffer.\r
-\r
-Arguments:\r
-\r
-  SearchType  - The type of search to perform to locate the handles\r
-\r
-  Protocol    - The protocol to search for\r
+;\r
   \r
-  SearchKey   - Dependant on SearchType\r
-\r
-  BufferSize  - On input the size of Buffer.  On output the \r
-                size of data returned.  \r
 \r
-  Buffer      - The buffer to return the results in\r
 \r
+/**\r
+  Locates the handle to a device on the device path that best matches the specified protocol.\r
 \r
-Returns:\r
+  @param  Protocol               The protocol to search for. \r
+  @param  DevicePath             On input, a pointer to a pointer to the device \r
+                                 path. On output, the device path pointer is \r
+                                 modified to point to the remaining part of the \r
+                                 devicepath. \r
+  @param  Device                 A pointer to the returned device handle. \r
 \r
-  EFI_BUFFER_TOO_SMALL      - Buffer too small, required buffer size is returned in BufferSize.\r
-\r
-  EFI_INVALID_PARAMETER     - Invalid parameter\r
-  \r
-  EFI_SUCCESS               - Successfully found the requested handle(s) and returns them in Buffer.\r
-  \r
---*/\r
-;\r
-  \r
+  @retval EFI_SUCCESS            The resulting handle was returned. \r
+  @retval EFI_NOT_FOUND          No handles matched the search. \r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLocateDevicePath (\r
   IN     EFI_GUID                       *Protocol,\r
-  IN OUT EFI_DEVICE_PATH_PROTOCOL       **FilePath,\r
+  IN OUT EFI_DEVICE_PATH_PROTOCOL       **DevicePath,\r
   OUT    EFI_HANDLE                     *Device\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locates the handle to a device on the device path that supports the specified protocol.\r
-\r
-Arguments:\r
-\r
-  Protocol    - The protocol to search for.\r
-  FilePath    - On input, a pointer to a pointer to the device path. On output, the device\r
-                  path pointer is modified to point to the remaining part of the devicepath.\r
-  Device      - A pointer to the returned device handle.              \r
+;\r
 \r
-Returns:\r
\r
 \r
-  EFI_SUCCESS           - The resulting handle was returned.\r
-  EFI_NOT_FOUND         - No handles matched the search.\r
-  EFI_INVALID_PARAMETER - One of the parameters has an invalid value.\r
+/**\r
+  Function returns an array of handles that support the requested protocol\r
+  in a buffer allocated from pool. This is a version of CoreLocateHandle()\r
+  that allocates a buffer for the caller.\r
 \r
---*/\r
-;\r
+  @param  SearchType             Specifies which handle(s) are to be returned. \r
+  @param  Protocol               Provides the protocol to search by.    This \r
+                                 parameter is only valid for SearchType \r
+                                 ByProtocol. \r
+  @param  SearchKey              Supplies the search key depending on the \r
+                                 SearchType. \r
+  @param  NumberHandles          The number of handles returned in Buffer. \r
+  @param  Buffer                 A pointer to the buffer to return the requested \r
+                                 array of  handles that support Protocol. \r
+\r
+  @retval EFI_SUCCESS            The result array of handles was returned. \r
+  @retval EFI_NOT_FOUND          No handles match the search. \r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the \r
+                                 matching results. \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
 \r
\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLocateHandleBuffer (\r
@@ -1291,35 +1058,26 @@ CoreLocateHandleBuffer (
   IN OUT UINTN                          *NumberHandles,\r
   OUT    EFI_HANDLE                     **Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Function returns an array of handles that support the requested protocol \r
-  in a buffer allocated from pool. This is a version of CoreLocateHandle()\r
-  that allocates a buffer for the caller.\r
+;\r
 \r
-Arguments:\r
\r
 \r
-  SearchType           - Specifies which handle(s) are to be returned.\r
-  Protocol             - Provides the protocol to search by.   \r
-                         This parameter is only valid for SearchType ByProtocol.\r
-  SearchKey            - Supplies the search key depending on the SearchType.\r
-  NumberHandles      - The number of handles returned in Buffer.\r
-  Buffer               - A pointer to the buffer to return the requested array of \r
-                         handles that support Protocol.\r
+/**\r
+  Return the first Protocol Interface that matches the Protocol GUID. If\r
+  Registration is pasased in return a Protocol Instance that was just add\r
+  to the system. If Retistration is NULL return the first Protocol Interface\r
+  you find.\r
 \r
-Returns:\r
-  \r
-  EFI_SUCCESS             - The result array of handles was returned.\r
-  EFI_NOT_FOUND           - No handles match the search. \r
-  EFI_OUT_OF_RESOURCES    - There is not enough pool memory to store the matching results.\r
-  EFI_INVALID_PARAMETER   - Invalid parameter\r
+  @param  Protocol               The protocol to search for \r
+  @param  Registration           Optional Registration Key returned from \r
+                                 RegisterProtocolNotify() \r
+  @param  Interface              Return the Protocol interface (instance). \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            If a valid Interface is returned \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_NOT_FOUND          Protocol interface not found\r
 \r
\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLocateProtocol (\r
@@ -1327,76 +1085,56 @@ CoreLocateProtocol (
   IN    VOID      *Registration OPTIONAL,\r
   OUT   VOID      **Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Return the first Protocol Interface that matches the Protocol GUID. If\r
-  Registration is pasased in return a Protocol Instance that was just add\r
-  to the system. If Retistration is NULL return the first Protocol Interface\r
-  you find.\r
-\r
-Arguments:\r
-\r
-  Protocol     - The protocol to search for\r
-  \r
-  Registration - Optional Registration Key returned from RegisterProtocolNotify() \r
+;\r
 \r
-  Interface    - Return the Protocol interface (instance).\r
 \r
-Returns:\r
+/**\r
+  return handle database key.\r
 \r
-  EFI_SUCCESS                 - If a valid Interface is returned\r
-  \r
-  EFI_INVALID_PARAMETER       - Invalid parameter\r
-  \r
-  EFI_NOT_FOUND               - Protocol interface not found\r
 \r
---*/\r
-;\r
+  @return Handle database key.\r
 \r
+**/\r
 UINT64\r
 CoreGetHandleDatabaseKey (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  return handle database key.\r
 \r
-Arguments:\r
+/**\r
+  Go connect any handles that were created or modified while a image executed.\r
 \r
-  None\r
-  \r
-Returns:\r
-  \r
-  Handle database key.\r
-  \r
---*/\r
-;\r
+  @param  Key                    The Key to show that the handle has been \r
+                                 created/modified\r
 \r
+**/\r
 VOID\r
 CoreConnectHandlesByKey (\r
   UINT64  Key\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Go connect any handles that were created or modified while a image executed.\r
 \r
-Arguments:\r
 \r
-  Key  -  The Key to show that the handle has been created/modified\r
+/**\r
+  Connects one or more drivers to a controller.\r
 \r
-Returns:\r
-  \r
-  None\r
---*/\r
-;\r
+  @param  ControllerHandle                      Handle of the controller to be \r
+                                                connected. \r
+  @param  DriverImageHandle                     DriverImageHandle A pointer to an \r
+                                                ordered list of driver image \r
+                                                handles. \r
+  @param  RemainingDevicePath                   RemainingDevicePath A pointer to \r
+                                                the device path that specifies a \r
+                                                child of the controller specified \r
+                                                by ControllerHandle. \r
+  @param  Recursive                             Whether the function would be \r
+                                                called recursively or not. \r
 \r
+  @return Status code.\r
 \r
+**/\r
 EFI_STATUS \r
 EFIAPI\r
 CoreConnectController (\r
@@ -1405,31 +1143,43 @@ CoreConnectController (
   IN  EFI_DEVICE_PATH_PROTOCOL  *RemainingDevicePath  OPTIONAL,\r
   IN  BOOLEAN                   Recursive\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Connects one or more drivers to a controller.\r
-\r
-Arguments:\r
-\r
-  ControllerHandle            - Handle of the controller to be connected.\r
-\r
-  DriverImageHandle           - DriverImageHandle A pointer to an ordered list of driver image handles.\r
-\r
-  RemainingDevicePath         - RemainingDevicePath A pointer to the device path that specifies a child of the\r
-                                controller specified by ControllerHandle.\r
-    \r
-  Recursive -                 - Whether the function would be called recursively or not.\r
+;\r
 \r
-Returns:\r
 \r
-  Status code.\r
 \r
---*/\r
-;\r
+/**\r
+  Disonnects a controller from a driver\r
 \r
+  @param  ControllerHandle                      ControllerHandle The handle of \r
+                                                the controller from which \r
+                                                driver(s)  are to be \r
+                                                disconnected. \r
+  @param  DriverImageHandle                     DriverImageHandle The driver to \r
+                                                disconnect from ControllerHandle. \r
+  @param  ChildHandle                           ChildHandle The handle of the \r
+                                                child to destroy. \r
+\r
+  @retval EFI_SUCCESS                           One or more drivers were \r
+                                                disconnected from the controller. \r
+  @retval EFI_SUCCESS                           On entry, no drivers are managing \r
+                                                ControllerHandle. \r
+  @retval EFI_SUCCESS                           DriverImageHandle is not NULL, \r
+                                                and on entry DriverImageHandle is \r
+                                                not managing ControllerHandle. \r
+  @retval EFI_INVALID_PARAMETER                 ControllerHandle is not a valid \r
+                                                EFI_HANDLE. \r
+  @retval EFI_INVALID_PARAMETER                 DriverImageHandle is not NULL, \r
+                                                and it is not a valid EFI_HANDLE. \r
+  @retval EFI_INVALID_PARAMETER                 ChildHandle is not NULL, and it \r
+                                                is not a valid EFI_HANDLE. \r
+  @retval EFI_OUT_OF_RESOURCES                  There are not enough resources \r
+                                                available to disconnect any \r
+                                                drivers from ControllerHandle. \r
+  @retval EFI_DEVICE_ERROR                      The controller could not be \r
+                                                disconnected because of a device \r
+                                                error.\r
 \r
+**/\r
 EFI_STATUS \r
 EFIAPI\r
 CoreDisconnectController (\r
@@ -1437,34 +1187,28 @@ CoreDisconnectController (
   IN EFI_HANDLE  DriverImageHandle  OPTIONAL,\r
   IN EFI_HANDLE  ChildHandle        OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Disonnects a controller from a driver\r
-\r
-Arguments:\r
+;\r
 \r
-  ControllerHandle  - ControllerHandle The handle of the controller from which driver(s) \r
-                        are to be disconnected.\r
-  DriverImageHandle - DriverImageHandle The driver to disconnect from ControllerHandle.\r
-  ChildHandle       - ChildHandle The handle of the child to destroy.\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS           -  One or more drivers were disconnected from the controller.\r
-  EFI_SUCCESS           -  On entry, no drivers are managing ControllerHandle.\r
-  EFI_SUCCESS           -  DriverImageHandle is not NULL, and on entry DriverImageHandle is not managing ControllerHandle.\r
-  EFI_INVALID_PARAMETER -  ControllerHandle is not a valid EFI_HANDLE.\r
-  EFI_INVALID_PARAMETER -  DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.\r
-  EFI_INVALID_PARAMETER -  ChildHandle is not NULL, and it is not a valid EFI_HANDLE.\r
-  EFI_OUT_OF_RESOURCES  -  There are not enough resources available to disconnect any drivers from ControllerHandle.\r
-  EFI_DEVICE_ERROR      -  The controller could not be disconnected because of a device error.\r
+/**\r
+  Allocates pages from the memory map.\r
 \r
---*/\r
-;\r
+  @param  Type                   The type of allocation to perform \r
+  @param  MemoryType             The type of memory to turn the allocated pages \r
+                                 into \r
+  @param  NumberOfPages          The number of pages to allocate \r
+  @param  Memory                 A pointer to receive the base allocated memory \r
+                                 address \r
 \r
+  @return Status. On success, Memory is filled in with the base address allocated\r
+  @retval EFI_INVALID_PARAMETER  Parameters violate checking rules defined in \r
+                                 spec. \r
+  @retval EFI_NOT_FOUND          Could not allocate pages match the requirement. \r
+  @retval EFI_OUT_OF_RESOURCES   No enough pages to allocate. \r
+  @retval EFI_SUCCESS            Pages successfully allocated.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreAllocatePages (\r
@@ -1473,108 +1217,87 @@ CoreAllocatePages (
   IN      UINTN                   NumberOfPages,\r
   IN OUT  EFI_PHYSICAL_ADDRESS    *Memory\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocates pages from the memory map.\r
-\r
-Arguments:\r
-\r
-  Type          - The type of allocation to perform\r
-\r
-  MemoryType    - The type of memory to turn the allocated pages into\r
-\r
-  NumberOfPages - The number of pages to allocate\r
+;\r
 \r
-  Memory        - A pointer to receive the base allocated memory address\r
 \r
-Returns:\r
 \r
-  Status. On success, Memory is filled in with the base address allocated\r
-  \r
-  EFI_INVALID_PARAMETER     - Parameters violate checking rules defined in spec.\r
-  \r
-  EFI_NOT_FOUND             - Could not allocate pages match the requirement.\r
-  \r
-  EFI_OUT_OF_RESOURCES      - No enough pages to allocate.\r
-  \r
-  EFI_SUCCESS               - Pages successfully allocated.\r
+/**\r
+  Frees previous allocated pages.\r
 \r
---*/\r
-;\r
+  @param  Memory                 Base address of memory being freed \r
+  @param  NumberOfPages          The number of pages to free \r
 \r
+  @retval EFI_NOT_FOUND          Could not find the entry that covers the range \r
+  @retval EFI_INVALID_PARAMETER  Address not aligned \r
+  @return EFI_SUCCESS         -Pages successfully freed.\r
 \r
+**/\r
 EFI_STATUS \r
 EFIAPI\r
 CoreFreePages (\r
   IN EFI_PHYSICAL_ADDRESS   Memory,\r
   IN UINTN                  NumberOfPages\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Frees previous allocated pages.\r
-\r
-Arguments:\r
-\r
-  Memory        - Base address of memory being freed\r
+;\r
 \r
-  NumberOfPages - The number of pages to free\r
 \r
-Returns:\r
 \r
-  EFI_NOT_FOUND       - Could not find the entry that covers the range\r
-  \r
-  EFI_INVALID_PARAMETER   - Address not aligned\r
-  \r
-  EFI_SUCCESS         -Pages successfully freed.\r
+/**\r
+  This function returns a copy of the current memory map. The map is an array of\r
+  memory descriptors, each of which describes a contiguous block of memory.\r
 \r
---*/\r
-;\r
+  @param  MemoryMapSize          A pointer to the size, in bytes, of the \r
+                                 MemoryMap buffer. On input, this is the size of \r
+                                 the buffer allocated by the caller.  On output, \r
+                                 it is the size of the buffer returned by the \r
+                                 firmware  if the buffer was large enough, or the \r
+                                 size of the buffer needed  to contain the map if \r
+                                 the buffer was too small. \r
+  @param  MemoryMap              A pointer to the buffer in which firmware places \r
+                                 the current memory map. \r
+  @param  MapKey                 A pointer to the location in which firmware \r
+                                 returns the key for the current memory map. \r
+  @param  DescriptorSize         A pointer to the location in which firmware \r
+                                 returns the size, in bytes, of an individual \r
+                                 EFI_MEMORY_DESCRIPTOR. \r
+  @param  DescriptorVersion      A pointer to the location in which firmware \r
+                                 returns the version number associated with the \r
+                                 EFI_MEMORY_DESCRIPTOR. \r
 \r
+  @retval EFI_SUCCESS            The memory map was returned in the MemoryMap \r
+                                 buffer. \r
+  @retval EFI_BUFFER_TOO_SMALL   The MemoryMap buffer was too small. The current \r
+                                 buffer size needed to hold the memory map is \r
+                                 returned in MemoryMapSize. \r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreGetMemoryMap (\r
   IN OUT UINTN                       *MemoryMapSize,\r
-  IN OUT EFI_MEMORY_DESCRIPTOR       *Desc,\r
+  IN OUT EFI_MEMORY_DESCRIPTOR       *MemoryMap,\r
   OUT    UINTN                       *MapKey,\r
   OUT    UINTN                       *DescriptorSize,\r
   OUT    UINT32                      *DescriptorVersion\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Returns the current memory map.\r
-\r
-Arguments:\r
-\r
-  MemoryMapSize     - On input the buffer size of MemoryMap allocated by caller\r
-                      On output the required buffer size to contain the memory map \r
-                      \r
-  Desc              - The buffer to return the current memory map\r
-\r
-  MapKey            - The address to return the current map key\r
-\r
-  DescriptorSize    - The size in bytes for an individual EFI_MEMORY_DESCRIPTOR\r
-\r
-  DescriptorVersion - The version number associated with the EFI_MEMORY_DESCRIPTOR\r
-\r
-Returns:\r
+;\r
 \r
-  EFI_SUCCESS           The current memory map was returned successfully\r
 \r
-  EFI_BUFFER_TOO_SMALL  The MemoryMap buffer was too small\r
 \r
-  EFI_INVALID_PARAMETER One of the parameters has an invalid value\r
+/**\r
+  Allocate pool of a particular type.\r
 \r
---*/\r
-;\r
+  @param  PoolType               Type of pool to allocate \r
+  @param  Size                   The amount of pool to allocate \r
+  @param  Buffer                 The address to return a pointer to the allocated \r
+                                 pool \r
 \r
+  @retval EFI_INVALID_PARAMETER  PoolType not valid \r
+  @retval EFI_OUT_OF_RESOURCES   Size exceeds max pool size or allocation failed. \r
+  @retval EFI_SUCCESS            Pool successfully allocated.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreAllocatePool (\r
@@ -1582,57 +1305,54 @@ CoreAllocatePool (
   IN   UINTN            Size,\r
   OUT  VOID             **Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate pool of a particular type.\r
-\r
-Arguments:\r
-\r
-  PoolType    - Type of pool to allocate\r
-\r
-  Size        - The amount of pool to allocate\r
+;\r
 \r
-  Buffer      - The address to return a pointer to the allocated pool\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER     - PoolType not valid\r
-  \r
-  EFI_OUT_OF_RESOURCES      - Size exceeds max pool size or allocation failed.  \r
-  \r
-  EFI_SUCCESS               - Pool successfully allocated.\r
+/**\r
+  Frees pool.\r
 \r
---*/\r
-;\r
+  @param  Buffer                 The allocated pool entry to free \r
 \r
+  @retval EFI_INVALID_PARAMETER  Buffer is not a valid value. \r
+  @retval EFI_SUCCESS            Pool successfully freed.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreFreePool (\r
   IN VOID      *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Frees pool.\r
-\r
-Arguments:\r
-\r
-  Buffer      - The allocated pool entry to free\r
+;\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER   - Buffer is not a valid value.\r
-  \r
-  EFI_SUCCESS             - Pool successfully freed.\r
 \r
---*/\r
-;\r
+/**\r
+  Loads an EFI image into memory and returns a handle to the image.\r
 \r
+  @param  BootPolicy              If TRUE, indicates that the request originates \r
+                                  from the boot manager, and that the boot \r
+                                  manager is attempting to load FilePath as a \r
+                                  boot selection. \r
+  @param  ParentImageHandle       The caller's image handle. \r
+  @param  FilePath                The specific file path from which the image is \r
+                                  loaded. \r
+  @param  SourceBuffer            If not NULL, a pointer to the memory location \r
+                                  containing a copy of the image to be loaded. \r
+  @param  SourceSize              The size in bytes of SourceBuffer. \r
+  @param  ImageHandle             Pointer to the returned image handle that is \r
+                                  created when the image is successfully loaded. \r
+\r
+  @retval EFI_SUCCESS             The image was loaded into memory. \r
+  @retval EFI_NOT_FOUND           The FilePath was not found. \r
+  @retval EFI_INVALID_PARAMETER   One of the parameters has an invalid value. \r
+  @retval EFI_UNSUPPORTED         The image type is not supported, or the device \r
+                                  path cannot be parsed to locate the proper \r
+                                  protocol for loading the file. \r
+  @retval EFI_OUT_OF_RESOURCES    Image was not loaded due to insufficient \r
+                                  resources.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLoadImage (\r
@@ -1643,63 +1363,49 @@ CoreLoadImage (
   IN  UINTN                      SourceSize,\r
   OUT EFI_HANDLE                 *ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Loads an EFI image into memory and returns a handle to the image.\r
+;\r
 \r
-Arguments:\r
 \r
-  BootPolicy          - If TRUE, indicates that the request originates from the boot manager,\r
-                        and that the boot manager is attempting to load FilePath as a boot selection.\r
-  ParentImageHandle   - The caller's image handle.\r
-  FilePath            - The specific file path from which the image is loaded.\r
-  SourceBuffer        - If not NULL, a pointer to the memory location containing a copy of \r
-                        the image to be loaded.\r
-  SourceSize          - The size in bytes of SourceBuffer.\r
-  ImageHandle         - Pointer to the returned image handle that is created when the image \r
-                        is successfully loaded.\r
 \r
-Returns:\r
+/**\r
+  Unloads an image.\r
 \r
-  EFI_SUCCESS            - The image was loaded into memory.\r
-  EFI_NOT_FOUND          - The FilePath was not found.\r
-  EFI_INVALID_PARAMETER  - One of the parameters has an invalid value.\r
-  EFI_UNSUPPORTED        - The image type is not supported, or the device path cannot be \r
-                           parsed to locate the proper protocol for loading the file.\r
-  EFI_OUT_OF_RESOURCES   - Image was not loaded due to insufficient resources.\r
---*/\r
-;\r
+  @param  ImageHandle             Handle that identifies the image to be \r
+                                  unloaded. \r
 \r
+  @retval EFI_SUCCESS             The image has been unloaded. \r
+  @retval EFI_UNSUPPORTED         The image has been sarted, and does not support \r
+                                  unload. \r
+  @retval EFI_INVALID_PARAMPETER  ImageHandle is not a valid image handle.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreUnloadImage (\r
   IN EFI_HANDLE  ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Unload the specified image.\r
-\r
-Arguments:\r
+;\r
 \r
-  ImageHandle       - The specified image handle.\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER       - Image handle is NULL.\r
-  \r
-  EFI_UNSUPPORTED             - Attempt to unload an unsupported image.\r
-  \r
-  EFI_SUCCESS                 - Image successfully unloaded.\r
+/**\r
+  Transfer control to a loaded image's entry point.\r
 \r
---*/\r
-;\r
+  @param  ImageHandle             Handle of image to be started. \r
+  @param  ExitDataSize            Pointer of the size to ExitData \r
+  @param  ExitData                Pointer to a pointer to a data buffer that \r
+                                  includes a Null-terminated Unicode string, \r
+                                  optionally followed by additional binary data. \r
+                                  The string is a description that the caller may \r
+                                  use to further indicate the reason for the \r
+                                  image's exit. \r
 \r
+  @retval EFI_INVALID_PARAMETER   Invalid parameter \r
+  @retval EFI_OUT_OF_RESOURCES    No enough buffer to allocate \r
+  @retval EFI_SUCCESS             Successfully transfer control to the image's \r
+                                  entry point.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreStartImage (\r
@@ -1707,35 +1413,33 @@ CoreStartImage (
   OUT UINTN       *ExitDataSize,\r
   OUT CHAR16      **ExitData  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Transfer control to a loaded image's entry point.\r
-\r
-Arguments:\r
-\r
-  ImageHandle     - Handle of image to be started.\r
-  \r
-  ExitDataSize    - Pointer of the size to ExitData\r
-  \r
-  ExitData        - Pointer to a pointer to a data buffer that includes a Null-terminated\r
-                    Unicode string, optionally followed by additional binary data. The string\r
-                    is a description that the caller may use to further indicate the reason for\r
-                    the image's exit.\r
+;\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 transfer control to the image's entry point.\r
 \r
---*/\r
-;\r
+/**\r
+  Terminates the currently loaded EFI image and returns control to boot services.\r
 \r
+  @param  ImageHandle             Handle that identifies the image. This \r
+                                  parameter is passed to the image on entry. \r
+  @param  Status                  The image's exit code. \r
+  @param  ExitDataSize            The size, in bytes, of ExitData. Ignored if \r
+                                  ExitStatus is EFI_SUCCESS. \r
+  @param  ExitData                Pointer to a data buffer that includes a \r
+                                  Null-terminated Unicode string, optionally \r
+                                  followed by additional binary data. The string \r
+                                  is a description that the caller may use to \r
+                                  further indicate the reason for the image's \r
+                                  exit. \r
+\r
+  @retval EFI_INVALID_PARAMETER   Image handle is NULL or it is not current \r
+                                  image. \r
+  @retval EFI_SUCCESS             Successfully terminates the currently loaded \r
+                                  EFI image. \r
+  @retval EFI_ACCESS_DENIED       Should never reach there. \r
+  @retval EFI_OUT_OF_RESOURCES    Could not allocate pool\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreExit (\r
@@ -1744,36 +1448,28 @@ CoreExit (
   IN UINTN       ExitDataSize,\r
   IN CHAR16      *ExitData  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Terminates the currently loaded EFI image and returns control to boot services.\r
-\r
-Arguments:\r
+;\r
 \r
-  ImageHandle       - Handle that identifies the image. This parameter is passed to the image \r
-                      on entry.\r
-  Status            - The image's exit code.\r
-  ExitDataSize      - The size, in bytes, of ExitData. Ignored if ExitStatus is\r
-                      EFI_SUCCESS.\r
-  ExitData          - Pointer to a data buffer that includes a Null-terminated Unicode string,\r
-                      optionally followed by additional binary data. The string is a \r
-                      description that the caller may use to further indicate the reason for\r
-                      the image's exit.\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER     - Image handle is NULL or it is not current image.\r
-  \r
-  EFI_SUCCESS               - Successfully terminates the currently loaded EFI image.\r
-  \r
-  EFI_ACCESS_DENIED         - Should never reach there.\r
+/**\r
+  Creates a general-purpose event structure.\r
 \r
---*/\r
-;\r
+  @param  Type                   The type of event to create and its mode and \r
+                                 attributes \r
+  @param  NotifyTpl              The task priority level of event notifications \r
+  @param  NotifyFunction         Pointer to the events notification function \r
+  @param  NotifyContext          Pointer to the notification functions context; \r
+                                 corresponds to parameter "Context" in the \r
+                                 notification function \r
+  @param  Event                  Pointer to the newly created event if the call \r
+                                 succeeds; undefined otherwise \r
 \r
+  @retval EFI_SUCCESS            The event structure was created \r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value \r
+  @retval EFI_OUT_OF_RESOURCES   The event could not be allocated\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCreateEvent (\r
@@ -1781,33 +1477,32 @@ CoreCreateEvent (
   IN  EFI_TPL              NotifyTpl,\r
   IN  EFI_EVENT_NOTIFY     NotifyFunction,\r
   IN  VOID                 *NotifyContext,\r
-  OUT EFI_EVENT            *pEvent\r
+  OUT EFI_EVENT            *Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Creates a general-purpose event structure\r
-\r
-Arguments:\r
-\r
-  Type                - The type of event to create and its mode and attributes\r
-  NotifyTpl           - The task priority level of event notifications\r
-  NotifyFunction      - Pointer to the event's notification function\r
-  NotifyContext       - Pointer to the notification function's context; corresponds to\r
-                        parameter "Context" in the notification function\r
-  pEvent              - Pointer to the newly created event if the call succeeds; undefined otherwise\r
+;\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS           - The event structure was created\r
-  EFI_INVALID_PARAMETER - One of the parameters has an invalid value\r
-  EFI_OUT_OF_RESOURCES  - The event could not be allocated\r
 \r
---*/\r
-;\r
+/**\r
+  Creates a general-purpose event structure\r
 \r
+  @param  Type                   The type of event to create and its mode and \r
+                                 attributes \r
+  @param  NotifyTpl              The task priority level of event notifications \r
+  @param  NotifyFunction         Pointer to the events notification function \r
+  @param  NotifyContext          Pointer to the notification functions context; \r
+                                 corresponds to parameter "Context" in the \r
+                                 notification function \r
+  @param  EventGroup             GUID for EventGroup if NULL act the same as \r
+                                 gBS->CreateEvent(). \r
+  @param  Event                  Pointer to the newly created event if the call \r
+                                 succeeds; undefined otherwise \r
+\r
+  @retval EFI_SUCCESS            The event structure was created \r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value \r
+  @retval EFI_OUT_OF_RESOURCES   The event could not be allocated\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCreateEventEx (\r
@@ -1818,29 +1513,25 @@ CoreCreateEventEx (
   IN CONST EFI_GUID           *EventGroup,    OPTIONAL\r
   OUT EFI_EVENT               *Event\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Creates a general-purpose event structure\r
 \r
-Arguments:\r
-  Type                - The type of event to create and its mode and attributes\r
-  NotifyTpl           - The task priority level of event notifications\r
-  NotifyFunction      - Pointer to the events notification function\r
-  NotifyContext       - Pointer to the notification functions context; corresponds to\r
-                        parameter "Context" in the notification function\r
-  EventGrout          - GUID for EventGroup if NULL act the same as gBS->CreateEvent().\r
-  Event               - Pointer to the newly created event if the call succeeds; undefined otherwise\r
 \r
-Returns:\r
-  EFI_SUCCESS           - The event structure was created\r
-  EFI_INVALID_PARAMETER - One of the parameters has an invalid value\r
-  EFI_OUT_OF_RESOURCES  - The event could not be allocated\r
+/**\r
+  Sets the type of timer and the trigger time for a timer event.\r
 \r
---*/\r
-;\r
+  @param  UserEvent              The timer event that is to be signaled at the \r
+                                 specified time \r
+  @param  Type                   The type of time that is specified in \r
+                                 TriggerTime \r
+  @param  TriggerTime            The number of 100ns units until the timer \r
+                                 expires \r
 \r
+  @retval EFI_SUCCESS            The event has been set to be signaled at the \r
+                                 requested time \r
+  @retval EFI_INVALID_PARAMETER  Event or Type is not valid\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreSetTimer (\r
@@ -1848,52 +1539,42 @@ CoreSetTimer (
   IN EFI_TIMER_DELAY      Type,\r
   IN UINT64               TriggerTime\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Sets the type of timer and the trigger time for a timer event.\r
+;\r
 \r
-Arguments:\r
 \r
-  UserEvent   - The timer event that is to be signaled at the specified time\r
-  Type        - The type of time that is specified in TriggerTime\r
-  TriggerTime - The number of 100ns units until the timer expires\r
-  \r
-Returns:\r
 \r
-  EFI_SUCCESS           - The event has been set to be signaled at the requested time\r
-  EFI_INVALID_PARAMETER - Event or Type is not valid\r
+/**\r
+  Signals the event.  Queues the event to be notified if needed\r
 \r
---*/\r
-;\r
+  @param  UserEvent              The event to signal \r
 \r
+  @retval EFI_INVALID_PARAMETER  Parameters are not valid. \r
+  @retval EFI_SUCCESS            The event was signaled.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreSignalEvent (\r
   IN EFI_EVENT            Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Signals the event.  Queues the event to be notified if needed\r
-    \r
-Arguments:\r
 \r
-  Event - The event to signal\r
-    \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER - Parameters are not valid.\r
-  \r
-  EFI_SUCCESS - The event was signaled.\r
+/**\r
+  Stops execution until an event is signaled.\r
 \r
---*/\r
-;\r
+  @param  NumberOfEvents         The number of events in the UserEvents array \r
+  @param  UserEvents             An array of EFI_EVENT \r
+  @param  UserIndex              Pointer to the index of the event which \r
+                                 satisfied the wait condition \r
 \r
+  @retval EFI_SUCCESS            The event indicated by Index was signaled. \r
+  @retval EFI_INVALID_PARAMETER  The event indicated by Index has a notification \r
+                                 function or Event was not a valid type \r
+  @retval EFI_UNSUPPORTED        The current TPL is not TPL_APPLICATION\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreWaitForEvent (\r
@@ -1901,78 +1582,58 @@ CoreWaitForEvent (
   IN  EFI_EVENT    *UserEvents,\r
   OUT UINTN        *UserIndex\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Stops execution until an event is signaled.\r
-    \r
-Arguments:\r
 \r
-  NumberOfEvents  - The number of events in the UserEvents array\r
-  UserEvents      - An array of EFI_EVENT\r
-  UserIndex       - Pointer to the index of the event which satisfied the wait condition\r
-    \r
-Returns:\r
 \r
-  EFI_SUCCESS           - The event indicated by Index was signaled.\r
-  EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or \r
-                          Event was not a valid type\r
-  EFI_UNSUPPORTED       - The current TPL is not TPL_APPLICATION\r
+/**\r
+  Closes an event and frees the event structure.\r
 \r
---*/\r
-;\r
+  @param  UserEvent              Event to close \r
 \r
+  @retval EFI_INVALID_PARAMETER  Parameters are not valid. \r
+  @retval EFI_SUCCESS            The event has been closed\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCloseEvent (\r
   IN EFI_EVENT            Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Closes an event and frees the event structure.\r
-    \r
-Arguments:\r
 \r
-  UserEvent - Event to close\r
-    \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER - Parameters are not valid.\r
-  \r
-  EFI_SUCCESS - The event has been closed\r
+/**\r
+  Check the status of an event.\r
 \r
---*/\r
-;\r
+  @param  UserEvent              The event to check \r
 \r
+  @retval EFI_SUCCESS            The event is in the signaled state \r
+  @retval EFI_NOT_READY          The event is not in the signaled state \r
+  @retval EFI_INVALID_PARAMETER  Event is of type EVT_NOTIFY_SIGNAL\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCheckEvent (\r
   IN EFI_EVENT            Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Check the status of an event\r
-    \r
-Arguments:\r
 \r
-  UserEvent - The event to check\r
-    \r
-Returns:\r
+/**\r
+  Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
+  global coherency domain of the processor.\r
 \r
-  EFI_SUCCESS           - The event is in the signaled state\r
-  EFI_NOT_READY         - The event is not in the signaled state\r
-  EFI_INVALID_PARAMETER - Event is of type EVT_NOTIFY_SIGNAL\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
---*/\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
@@ -1980,30 +1641,26 @@ CoreAddMemorySpace (
   IN UINT64                Length,\r
   IN UINT64                Capabilities\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add a segment of memory space to GCD map and add all available pages in this segment \r
-  as memory descriptors.\r
+;\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
 \r
-Returns:\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
-  EFI_SUCCESS       - Merged this segment into GCD map.\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
---*/\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
@@ -2014,195 +1671,141 @@ CoreAllocateMemorySpace (
   IN     EFI_HANDLE             ImageHandle,\r
   IN     EFI_HANDLE             DeviceHandle OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate memory space on GCD map.\r
+;\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
+  Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r
+  I/O resources from the global coherency domain of the processor.\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
+  @param  BaseAddress            Base address of the memory space. \r
+  @param  Length                 Length of the memory space. \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Space successfully freed.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreFreeMemorySpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
   )\r
-/*++\r
-\r
-Routine Description:Routine Description:\r
+;\r
 \r
-  Free a segment of memory space in GCD map.\r
 \r
-Arguments:\r
-    \r
-  BaseAddress       - Base address of the segment.\r
-  \r
-  Length            - Length of the segment.\r
-  \r
-Returns:\r
+/**\r
+  Removes reserved memory, system memory, or memory-mapped I/O resources from\r
+  the global coherency domain of the processor.\r
 \r
-  EFI_SUCCESS       - Space successfully freed.\r
+  @param  BaseAddress            Base address of the memory space. \r
+  @param  Length                 Length of the memory space. \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Successfully remove a segment of memory space.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreRemoveMemorySpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
   )\r
-/*++\r
-\r
-Routine Description:Routine Description:\r
+;\r
 \r
-  Remove a segment of memory space in GCD map.\r
 \r
-Arguments:\r
-    \r
-  BaseAddress       - Base address of the segment.\r
-  \r
-  Length            - Length of the segment.\r
-  \r
-Returns:\r
+/**\r
+  Retrieves the descriptor for a memory region containing a specified address.\r
 \r
-  EFI_SUCCESS       - Successfully a segment of memory space.\r
+  @param  BaseAddress            Specified start address \r
+  @param  Descriptor             Specified length \r
 \r
---*/\r
-;\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_SUCCESS            Successfully get memory space descriptor.\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
-  Search all entries in GCD map which contains specified segment and build it to a descriptor.\r
-\r
-Arguments:\r
+;\r
 \r
-  BaseAddress       - Specified start address\r
-  \r
-  Descriptor        - Specified length\r
 \r
-Returns:\r
+/**\r
+  Modifies the attributes for a memory region in the global coherency domain of the\r
+  processor.\r
 \r
-  EFI_INVALID_PARAMETER       - Invalid parameter\r
-  \r
-  EFI_SUCCESS                 - Successfully get memory space descriptor.\r
+  @param  BaseAddress            Specified start address \r
+  @param  Length                 Specified length \r
+  @param  Attributes             Specified attributes \r
 \r
---*/\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
-  Set memory space with specified attributes.\r
-\r
-Arguments:\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
+  @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
-  Transer all entries of GCD memory map into memory descriptors and pass to caller.\r
-\r
-Arguments:\r
+;\r
 \r
-  NumberOfDescriptors       - Number of descriptors.\r
-  \r
-  MemorySpaceMap            - Descriptor array\r
 \r
-Returns:\r
+/**\r
+  Adds reserved I/O or I/O resources to the global coherency domain of the processor.\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
+  @param  GcdIoType              IO type of the segment. \r
+  @param  BaseAddress            Base address of the segment. \r
+  @param  Length                 Length of the segment. \r
 \r
---*/\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
-  Add a segment of IO space to GCD map.\r
+;\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
+  Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
+  domain of the processor.\r
 \r
-  EFI_SUCCESS       - Merged this segment into GCD map.\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
---*/\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
@@ -2213,173 +1816,120 @@ CoreAllocateIoSpace (
   IN     EFI_HANDLE             ImageHandle,\r
   IN     EFI_HANDLE             DeviceHandle OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate IO space on GCD map.\r
+;\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
+  Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
+  domain of the processor.\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
+  @param  BaseAddress            Base address of the segment. \r
+  @param  Length                 Length of the segment. \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Space successfully freed.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreFreeIoSpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
   )\r
-/*++\r
-\r
-Routine Description:Routine Description:\r
+;\r
 \r
-  Free a segment of IO space in GCD map.\r
 \r
-Arguments:\r
-    \r
-  BaseAddress       - Base address of the segment.\r
-  \r
-  Length            - Length of the segment.\r
-  \r
-Returns:\r
+/**\r
+  Removes reserved I/O or I/O resources from the global coherency domain of the\r
+  processor.\r
 \r
-  EFI_SUCCESS       - Space successfully freed.\r
+  @param  BaseAddress            Base address of the segment. \r
+  @param  Length                 Length of the segment. \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Successfully removed a segment of IO space.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreRemoveIoSpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
   )\r
-/*++\r
-\r
-Routine Description:Routine Description:\r
+;\r
 \r
-  Remove a segment of IO space in GCD map.\r
 \r
-Arguments:\r
-    \r
-  BaseAddress       - Base address of the segment.\r
-  \r
-  Length            - Length of the segment.\r
-  \r
-Returns:\r
+/**\r
+  Retrieves the descriptor for an I/O region containing a specified address.\r
 \r
-  EFI_SUCCESS       - Successfully removed a segment of IO space.\r
+  @param  BaseAddress            Specified start address \r
+  @param  Descriptor             Specified length \r
 \r
---*/\r
-;\r
+  @retval EFI_INVALID_PARAMETER  Descriptor is NULL. \r
+  @retval EFI_SUCCESS            Successfully get the IO space descriptor.\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
-  Search all entries in GCD map which contains specified segment and build it to a descriptor.\r
-\r
-Arguments:\r
+;\r
 \r
-  BaseAddress       - Specified start address\r
-  \r
-  Descriptor        - Specified length\r
 \r
-Returns:\r
+/**\r
+  Returns a map of the I/O resources in the global coherency domain of the processor.\r
 \r
-  EFI_INVALID_PARAMETER       - Descriptor is NULL.\r
-  \r
-  EFI_SUCCESS                 - Successfully get the IO space descriptor.\r
+  @param  NumberOfDescriptors    Number of descriptors. \r
+  @param  IoSpaceMap             Descriptor array \r
 \r
---*/\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 IO space map.\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
-  Transer all entries of GCD IO map into IO descriptors and pass to caller.\r
-\r
-Arguments:\r
+;\r
 \r
-  NumberOfDescriptors       - Number of descriptors.\r
-  \r
-  IoSpaceMap                - Descriptor array\r
 \r
-Returns:\r
+/**\r
+  This is the main Dispatcher for DXE and it exits when there are no more\r
+  drivers to run. Drain the mScheduledQueue and load and start a PE\r
+  image for each driver. Search the mDiscoveredList to see if any driver can\r
+  be placed on the mScheduledQueue. If no drivers are placed on the\r
+  mScheduledQueue exit the function. On exit it is assumed the Bds()\r
+  will be called, and when the Bds() exits the Dispatcher will be called\r
+  again.\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
+  NONE\r
 \r
---*/\r
-;\r
+  @retval EFI_ALREADY_STARTED    The DXE Dispatcher is already running \r
+  @retval EFI_NOT_FOUND          No DXE Drivers were dispatched \r
+  @retval EFI_SUCCESS            One or more DXE Drivers were dispatched \r
 \r
+**/\r
 EFI_DXESERVICE\r
 EFI_STATUS\r
 EFIAPI\r
 CoreDispatcher (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This is the main Dispatcher for DXE and it exits when there are no more \r
-  drivers to run. Drain the mScheduledQueue and load and start a PE\r
-  image for each driver. Search the mDiscoveredList to see if any driver can \r
-  be placed on the mScheduledQueue. If no drivers are placed on the\r
-  mScheduledQueue exit the function. On exit it is assumed the Bds()\r
-  will be called, and when the Bds() exits the Dispatcher will be called \r
-  again.\r
-\r
-Arguments:\r
-\r
-  NONE\r
-\r
-Returns:\r
+;\r
 \r
-  EFI_ALREADY_STARTED - The DXE Dispatcher is already running\r
+/**\r
+  Check every driver and locate a matching one. If the driver is found, the Unrequested\r
+  state flag is cleared.\r
 \r
-  EFI_NOT_FOUND       - No DXE Drivers were dispatched\r
+  @param  FirmwareVolumeHandle   The handle of the Firmware Volume that contains \r
+                                 the firmware  file specified by DriverName. \r
+  @param  DriverName             The Driver name to put in the Dependent state. \r
 \r
-  EFI_SUCCESS         - One or more DXE Drivers were dispatched\r
+  @retval EFI_SUCCESS            The DriverName was found and it's SOR bit was \r
+                                 cleared \r
+  @retval EFI_NOT_FOUND          The DriverName does not exist or it's SOR bit \r
+                                 was not set. \r
 \r
---*/\r
-;\r
+**/\r
 EFI_DXESERVICE\r
 EFI_STATUS\r
 EFIAPI\r
@@ -2387,29 +1937,21 @@ CoreSchedule (
   IN  EFI_HANDLE  FirmwareVolumeHandle,\r
   IN  EFI_GUID    *DriverName\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Check every driver and locate a matching one. If the driver is found, the Unrequested\r
-  state flag is cleared.\r
-\r
-Arguments:\r
-\r
-  FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware \r
-                         file specified by DriverName.\r
-\r
-  DriverName           - The Driver name to put in the Dependent state.\r
+;\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS   - The DriverName was found and it's SOR bit was cleared\r
+/**\r
+  Convert a driver from the Untrused back to the Scheduled state\r
 \r
-  EFI_NOT_FOUND - The DriverName does not exist or it's SOR bit was not set.\r
+  @param  FirmwareVolumeHandle   The handle of the Firmware Volume that contains \r
+                                 the firmware  file specified by DriverName. \r
+  @param  DriverName             The Driver name to put in the Scheduled state \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            The file was found in the untrusted state, and \r
+                                 it was promoted  to the trusted state. \r
+  @retval EFI_NOT_FOUND          The file was not found in the untrusted state. \r
 \r
+**/\r
 EFI_DXESERVICE\r
 EFI_STATUS\r
 EFIAPI\r
@@ -2417,248 +1959,185 @@ CoreTrust (
   IN  EFI_HANDLE  FirmwareVolumeHandle,\r
   IN  EFI_GUID    *DriverName\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Convert a driver from the Untrused back to the Scheduled state\r
-\r
-Arguments:\r
-\r
-  FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware \r
-                         file specified by DriverName.\r
-\r
-  DriverName           - The Driver name to put in the Scheduled state\r
+;\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS   - The file was found in the untrusted state, and it was promoted \r
-                  to the trusted state.\r
+/**\r
+  Helper function called as part of the code needed\r
+  to allocate the proper sized buffer for various\r
+  EFI interfaces.\r
 \r
-  EFI_NOT_FOUND - The file was not found in the untrusted state.\r
+  @param  Status                 Current status \r
+  @param  Buffer                 Current allocated buffer, or NULL \r
+  @param  BufferSize             Current buffer size needed \r
 \r
---*/\r
-;\r
+  @retval TRUE                   if the buffer was reallocated and the caller \r
+                                 should try the API again. \r
+  @retval FALSE                  buffer could not be allocated and the caller \r
+                                 should not try the API again.\r
 \r
+**/\r
 BOOLEAN\r
 CoreGrowBuffer (\r
   IN OUT EFI_STATUS       *Status,\r
   IN OUT VOID             **Buffer,\r
   IN     UINTN            BufferSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Helper function called as part of the code needed\r
-    to allocate the proper sized buffer for various \r
-    EFI interfaces.\r
-\r
-Arguments:\r
-\r
-    Status      - Current status\r
+;\r
 \r
-    Buffer      - Current allocated buffer, or NULL\r
 \r
-    BufferSize  - Current buffer size needed\r
-    \r
-Returns:\r
-    \r
-    TRUE - if the buffer was reallocated and the caller \r
-    should try the API again.\r
+/**\r
+  This routine is the driver initialization entry point.  It initializes the\r
+  libraries, and registers two notification functions.  These notification\r
+  functions are responsible for building the FV stack dynamically.\r
 \r
-    FALSE - buffer could not be allocated and the caller\r
-    should not try the API again.\r
+  @param  ImageHandle           The image handle. \r
+  @param  SystemTable           The system table. \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS           Function successfully returned.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolDriverInit (\r
   IN EFI_HANDLE                   ImageHandle,\r
   IN EFI_SYSTEM_TABLE             *SystemTable\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-    This routine is the driver initialization entry point.  It initializes the\r
-    libraries, and registers two notification functions.  These notification\r
-    functions are responsible for building the FV stack dynamically.\r
-    \r
-Arguments:\r
-    ImageHandle   - The image handle.\r
-    SystemTable   - The system table.\r
-    \r
-Returns:\r
-    EFI_SUCCESS   - Function successfully returned.\r
 \r
---*/\r
-;\r
+/**\r
+  Entry point of the section extraction code. Initializes an instance of the\r
+  section extraction interface and installs it on a new handle.\r
+\r
+  @param  ImageHandle   A handle for the image that is initializing this driver\r
+  @param  SystemTable   A pointer to the EFI system table\r
 \r
+  @retval EFI_SUCCESS           Driver initialized successfully\r
+  @retval EFI_OUT_OF_RESOURCES  Could not allocate needed resources\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeSectionExtraction (\r
   IN EFI_HANDLE                   ImageHandle,\r
   IN EFI_SYSTEM_TABLE             *SystemTable\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description: \r
-  Entry point of the section extraction code. Initializes an instance of the \r
-  section extraction interface and installs it on a new handle.\r
 \r
-Arguments:  \r
-  ImageHandle   EFI_HANDLE: A handle for the image that is initializing this driver\r
-  SystemTable   EFI_SYSTEM_TABLE: A pointer to the EFI system table        \r
+/**\r
+  This DXE service routine is used to process a firmware volume. In\r
+  particular, it can be called by BDS to process a single firmware\r
+  volume found in a capsule.\r
 \r
-Returns:  \r
-  EFI_SUCCESS:  Driver initialized successfully\r
-  EFI_OUT_OF_RESOURCES:   Could not allocate needed resources\r
+  @param  FvHeader               pointer to a firmware volume header \r
+  @param  Size                   the size of the buffer pointed to by FvHeader \r
+  @param  FVProtocolHandle       the handle on which a firmware volume protocol \r
+                                 was produced for the firmware volume passed in. \r
 \r
---*/\r
-;\r
+  @retval EFI_OUT_OF_RESOURCES   if an FVB could not be produced due to lack of  \r
+                                 system resources \r
+  @retval EFI_VOLUME_CORRUPTED   if the volume was corrupted \r
+  @retval EFI_SUCCESS            a firmware volume protocol was produced for the \r
+                                 firmware volume\r
 \r
+**/\r
 EFI_STATUS\r
 CoreProcessFirmwareVolume (\r
   IN  VOID                         *FvHeader,\r
   IN  UINTN                        Size, \r
   OUT EFI_HANDLE                   *FVProtocolHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This DXE service routine is used to process a firmware volume. In\r
-    particular, it can be called by BDS to process a single firmware\r
-    volume found in a capsule. \r
-\r
-Arguments:\r
-    FvHeader              - pointer to a firmware volume header\r
-    Size                  - the size of the buffer pointed to by FvHeader\r
-    FVProtocolHandle      - the handle on which a firmware volume protocol\r
-                            was produced for the firmware volume passed in.\r
-\r
-Returns:\r
-    EFI_OUT_OF_RESOURCES  - if an FVB could not be produced due to lack of \r
-                            system resources\r
-    EFI_VOLUME_CORRUPTED  - if the volume was corrupted\r
-    EFI_SUCCESS           - a firmware volume protocol was produced for the\r
-                            firmware volume\r
-\r
---*/\r
 ;\r
 \r
 //\r
 //Functions used during debug buils\r
 //\r
+\r
+/**\r
+  Displays Architectural protocols that were not loaded and are required for DXE\r
+  core to function Only used in Debug Builds.\r
+\r
+**/\r
 VOID\r
 CoreDisplayMissingArchProtocols (\r
   VOID\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-  Displays Architectural protocols that were not loaded and are required for DXE core to function\r
-  Only used in Debug Builds\r
-\r
-  Arguments:\r
-    NONE\r
+;\r
+  \r
 \r
-  Returns:\r
-    NONE\r
+/**\r
+  Traverse the discovered list for any drivers that were discovered but not loaded\r
+  because the dependency experessions evaluated to false.\r
 \r
---*/;\r
-  \r
+**/\r
 VOID\r
 CoreDisplayDiscoveredNotDispatched (\r
   VOID\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-\r
-    Traverse the discovered list for any drivers that were discovered but not loaded \r
-    because the dependency experessions evaluated to false\r
-\r
-  Arguments:\r
+;\r
 \r
-    NONE\r
 \r
-  Returns:\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-    NONE \r
 \r
---*/;\r
+  @return EFI_NOT_AVAILABLE_YET\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg0 (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
+;\r
 \r
-  None\r
 \r
-Returns:\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  EFI_NOT_AVAILABLE_YET\r
+  @param  Arg1                   Undefined \r
 \r
---*/\r
-;\r
+  @return EFI_NOT_AVAILABLE_YET\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg1 (\r
   UINTN Arg1\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
+;\r
 \r
-  Arg1        - Undefined\r
 \r
-Returns:\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  EFI_NOT_AVAILABLE_YET\r
+  @param  Arg1                   Undefined \r
+  @param  Arg2                   Undefined \r
 \r
---*/\r
-;\r
+  @return EFI_NOT_AVAILABLE_YET\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg2 (\r
   UINTN Arg1,\r
   UINTN Arg2\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
+;\r
 \r
-  Arg1        - Undefined\r
-  \r
-  Arg2        - Undefined\r
 \r
-Returns:\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  EFI_NOT_AVAILABLE_YET\r
+  @param  Arg1                   Undefined \r
+  @param  Arg2                   Undefined \r
+  @param  Arg3                   Undefined \r
 \r
---*/\r
-;\r
+  @return EFI_NOT_AVAILABLE_YET\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg3 (\r
@@ -2666,27 +2145,20 @@ CoreEfiNotAvailableYetArg3 (
   UINTN Arg2,\r
   UINTN Arg3\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
+;\r
 \r
-  Arg1        - Undefined\r
-  \r
-  Arg2        - Undefined\r
-  \r
-  Arg3        - Undefined\r
 \r
-Returns:\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  EFI_NOT_AVAILABLE_YET\r
+  @param  Arg1                   Undefined \r
+  @param  Arg2                   Undefined \r
+  @param  Arg3                   Undefined \r
+  @param  Arg4                   Undefined \r
 \r
---*/\r
-;\r
+  @return EFI_NOT_AVAILABLE_YET\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg4 (\r
@@ -2695,29 +2167,21 @@ CoreEfiNotAvailableYetArg4 (
   UINTN Arg3,\r
   UINTN Arg4\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
+;\r
 \r
-  Arg1        - Undefined\r
-  \r
-  Arg2        - Undefined\r
-  \r
-  Arg3        - Undefined\r
-  \r
-  Arg4        - Undefined\r
 \r
-Returns:\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  EFI_NOT_AVAILABLE_YET\r
+  @param  Arg1                   Undefined \r
+  @param  Arg2                   Undefined \r
+  @param  Arg3                   Undefined \r
+  @param  Arg4                   Undefined \r
+  @param  Arg5                   Undefined \r
 \r
---*/\r
-;\r
+  @return EFI_NOT_AVAILABLE_YET\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg5 (\r
@@ -2727,57 +2191,67 @@ CoreEfiNotAvailableYetArg5 (
   UINTN Arg4,\r
   UINTN Arg5\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
+;\r
 \r
-  Arg1        - Undefined\r
-  \r
-  Arg2        - Undefined\r
-  \r
-  Arg3        - Undefined\r
-  \r
-  Arg4        - Undefined\r
-  \r
-  Arg5        - Undefined\r
 \r
-Returns:\r
+/**\r
+  Searches for a Protocol Interface passed from PEI through a HOB.\r
 \r
-  EFI_NOT_AVAILABLE_YET\r
+  @param  ProtocolGuid           The Protocol GUID to search for in the HOB List \r
+  @param  Interface              A pointer to the interface for the Protocol GUID \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            The Protocol GUID was found and its interface is \r
+                                 returned in Interface \r
+  @retval EFI_NOT_FOUND          The Protocol GUID was not found in the HOB List\r
 \r
+**/\r
 EFI_STATUS\r
 CoreGetPeiProtocol (\r
   IN EFI_GUID  *ProtocolGuid,\r
   IN VOID      **Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Searches for a Protocol Interface passed from PEI through a HOB\r
-\r
-Arguments:\r
-\r
-  ProtocolGuid - The Protocol GUID to search for in the HOB List\r
-\r
-  Interface    - A pointer to the interface for the Protocol GUID\r
-\r
-Returns:\r
+;\r
 \r
-  EFI_SUCCESS   - The Protocol GUID was found and its interface is returned in Interface\r
 \r
-  EFI_NOT_FOUND - The Protocol GUID was not found in the HOB List\r
+/**\r
+  Given a compressed source buffer, this function retrieves the size of the\r
+  uncompressed buffer and the size of the scratch buffer required to decompress\r
+  the compressed source buffer.\r
+\r
+  The GetInfo() function retrieves the size of the uncompressed buffer and the\r
+  temporary scratch buffer required to decompress the buffer specified by Source\r
+  and SourceSize. If the size of the uncompressed buffer or the size of the\r
+  scratch buffer cannot be determined from the compressed data specified by\r
+  Source and SourceData, then EFI_INVALID_PARAMETER is returned. Otherwise, the\r
+  size of the uncompressed buffer is returned in DestinationSize, the size of\r
+  the scratch buffer is returned in ScratchSize, and EFI_SUCCESS is returned.\r
+  The GetInfo() function does not have scratch buffer available to perform a\r
+  thorough checking of the validity of the source data. It just retrieves the\r
+  "Original Size" field from the beginning bytes of the source data and output\r
+  it as DestinationSize. And ScratchSize is specific to the decompression\r
+  implementation.\r
+\r
+  @param  This               A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r
+  @param  Source             The source buffer containing the compressed data.\r
+  @param  SourceSize         The size, in bytes, of the source buffer.\r
+  @param  DestinationSize    A pointer to the size, in bytes, of the\r
+                             uncompressed buffer that will be generated when the\r
+                             compressed buffer specified by Source and\r
+                             SourceSize is decompressed.\r
+  @param  ScratchSize        A pointer to the size, in bytes, of the scratch\r
+                             buffer that is required to decompress the\r
+                             compressed buffer specified by Source and\r
+                             SourceSize.\r
+   \r
+  @retval EFI_SUCCESS        The size of the uncompressed data was returned in\r
+                             DestinationSize and the size of the scratch buffer\r
+                             was returned in ScratchSize.\r
+  @retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of\r
+                                the scratch buffer cannot be determined from the\r
+                                compressed data specified by Source and\r
+                                SourceSize.\r
 \r
---*/\r
-;\r
-  \r
+**/\r
 EFI_STATUS\r
 DxeMainUefiDecompressGetInfo (\r
   IN EFI_DECOMPRESS_PROTOCOL            *This,\r
@@ -2787,6 +2261,41 @@ DxeMainUefiDecompressGetInfo (
   OUT  UINT32                           *ScratchSize\r
   );\r
 \r
+\r
+/**\r
+  Decompresses a compressed source buffer.\r
+\r
+  The Decompress() function extracts decompressed data to its original form.\r
+  This protocol is designed so that the decompression algorithm can be\r
+  implemented without using any memory services. As a result, the Decompress()\r
+  Function is not allowed to call AllocatePool() or AllocatePages() in its\r
+  implementation. It is the caller¡¯s responsibility to allocate and free the\r
+  Destination and Scratch buffers.\r
+  If the compressed source data specified by Source and SourceSize is\r
+  sucessfully decompressed into Destination, then EFI_SUCCESS is returned. If\r
+  the compressed source data specified by Source and SourceSize is not in a\r
+  valid compressed data format, then EFI_INVALID_PARAMETER is returned.\r
+\r
+  @param  This                A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r
+  @param  Source              The source buffer containing the compressed data.\r
+  @param  SourceSize          SourceSizeThe size of source data.\r
+  @param  Destination         On output, the destination buffer that contains\r
+                              the uncompressed data.\r
+  @param  DestinationSize     The size of the destination buffer.  The size of\r
+                              the destination buffer needed is obtained from\r
+                              EFI_DECOMPRESS_PROTOCOL.GetInfo().\r
+  @param  Scratch             A temporary scratch buffer that is used to perform\r
+                              the decompression.\r
+  @param  ScratchSize         The size of scratch buffer. The size of the\r
+                              scratch buffer needed is obtained from GetInfo().\r
+  \r
+  @retval EFI_SUCCESS         Decompression completed successfully, and the\r
+                              uncompressed buffer is returned in Destination.\r
+  @retval EFI_INVALID_PARAMETER  The source buffer specified by Source and\r
+                                 SourceSize is corrupted (not in a valid\r
+                                 compressed format).\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DxeMainUefiDecompress (\r
@@ -2799,48 +2308,21 @@ DxeMainUefiDecompress (
   IN     UINT32                           ScratchSize\r
   );\r
 \r
-EFI_STATUS\r
-DxeMainTianoDecompressGetInfo (\r
-  IN EFI_TIANO_DECOMPRESS_PROTOCOL      *This,\r
-  IN   VOID                             *Source,\r
-  IN   UINT32                           SourceSize,\r
-  OUT  UINT32                           *DestinationSize,\r
-  OUT  UINT32                           *ScratchSize\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-DxeMainTianoDecompress (\r
-  IN EFI_TIANO_DECOMPRESS_PROTOCOL        *This,\r
-  IN     VOID                             *Source,\r
-  IN     UINT32                           SourceSize,\r
-  IN OUT VOID                             *Destination,\r
-  IN     UINT32                           DestinationSize,\r
-  IN OUT VOID                             *Scratch,\r
-  IN     UINT32                           ScratchSize\r
-  );\r
+/**\r
+  SEP member function.  This function creates and returns a new section stream\r
+  handle to represent the new section stream.\r
 \r
-EFI_STATUS\r
-DxeMainCustomDecompressGetInfo (\r
-  IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL  *This,\r
-  IN   VOID                              *Source,\r
-  IN   UINT32                            SourceSize,\r
-  OUT  UINT32                            *DestinationSize,\r
-  OUT  UINT32                            *ScratchSize\r
-  );\r
+  @param  SectionStreamLength    Size in bytes of the section stream. \r
+  @param  SectionStream          Buffer containing the new section stream. \r
+  @param  SectionStreamHandle    A pointer to a caller allocated UINTN that on \r
+                                 output contains the new section stream handle. \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-DxeMainCustomDecompress (\r
-  IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL  *This,\r
-  IN     VOID                            *Source,\r
-  IN     UINT32                          SourceSize,\r
-  IN OUT VOID                            *Destination,\r
-  IN     UINT32                          DestinationSize,\r
-  IN OUT VOID                            *Scratch,\r
-  IN     UINT32                          ScratchSize\r
-  );\r
+  @retval EFI_SUCCESS            The section stream is created successfully.\r
+  @retval EFI_OUT_OF_RESOURCES   memory allocation failed. \r
+  @retval EFI_INVALID_PARAMETER  Section stream does not end concident with end \r
+                                 of last section.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 OpenSectionStream (\r
@@ -2849,6 +2331,65 @@ OpenSectionStream (
      OUT UINTN                                     *SectionStreamHandle\r
   );\r
 \r
+\r
+\r
+/**\r
+  SEP member function.  Retrieves requested section from section stream.\r
+\r
+  @param  SectionStreamHandle   The section stream from which to extract the\r
+                                requested section.\r
+  @param  SectionType           A pointer to the type of section to search for.\r
+  @param  SectionDefinitionGuid If the section type is EFI_SECTION_GUID_DEFINED,\r
+                                then SectionDefinitionGuid indicates which of\r
+                                these types of sections to search for.\r
+  @param  SectionInstance       Indicates which instance of the requested\r
+                                section to return.\r
+  @param  Buffer                Double indirection to buffer.  If *Buffer is\r
+                                non-null on input, then the buffer is caller\r
+                                allocated.  If Buffer is NULL, then the buffer\r
+                                is callee allocated.  In either case, the\r
+                                requried buffer size is returned in *BufferSize.\r
+  @param  BufferSize            On input, indicates the size of *Buffer if\r
+                                *Buffer is non-null on input.  On output,\r
+                                indicates the required size (allocated size if\r
+                                callee allocated) of *Buffer.\r
+  @param  AuthenticationStatus  A pointer to a caller-allocated UINT32 that\r
+                                indicates the authentication status of the\r
+                                output buffer. If the input section¡¯s\r
+                                GuidedSectionHeader.Attributes field\r
+                                has the EFI_GUIDED_SECTION_AUTH_STATUS_VALID\r
+                                bit as clear, AuthenticationStatus must return\r
+                                zero. Both local bits (19:16) and aggregate\r
+                                bits (3:0) in AuthenticationStatus are returned\r
+                                by ExtractSection(). These bits reflect the\r
+                                status of the extraction operation. The bit\r
+                                pattern in both regions must be the same, as\r
+                                the local and aggregate authentication statuses\r
+                                have equivalent meaning at this level. If the\r
+                                function returns anything other than\r
+                                EFI_SUCCESS, the value of *AuthenticationStatus\r
+                                is undefined.\r
+\r
+  @retval EFI_SUCCESS           Section was retrieved successfully\r
+  @retval EFI_PROTOCOL_ERROR    A GUID defined section was encountered in the\r
+                                section stream with its\r
+                                EFI_GUIDED_SECTION_PROCESSING_REQUIRED bit set,\r
+                                but there was no corresponding GUIDed Section\r
+                                Extraction Protocol in the handle database.\r
+                                *Buffer is unmodified.\r
+  @retval EFI_NOT_FOUND         An error was encountered when parsing the\r
+                                SectionStream.  This indicates the SectionStream\r
+                                is not correctly formatted.\r
+  @retval EFI_NOT_FOUND         The requested section does not exist.\r
+  @retval EFI_OUT_OF_RESOURCES  The system has insufficient resources to process\r
+                                the request.\r
+  @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.\r
+  @retval EFI_WARN_TOO_SMALL    The size of the caller allocated input buffer is\r
+                                insufficient to contain the requested section.\r
+                                The input buffer is filled and section contents\r
+                                are truncated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetSection (\r
@@ -2861,6 +2402,18 @@ GetSection (
   OUT UINT32                                            *AuthenticationStatus\r
   );\r
 \r
+\r
+/**\r
+  SEP member function.  Deletes an existing section stream\r
+\r
+  @param  StreamHandleToClose    Indicates the stream to close \r
+\r
+  @retval EFI_SUCCESS            The section stream is closed sucessfully.\r
+  @retval EFI_OUT_OF_RESOURCES   Memory allocation failed. \r
+  @retval EFI_INVALID_PARAMETER  Section stream does not end concident with end \r
+                                 of last section.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CloseSectionStream (\r
index 0f785ddbe0d94db1f0da179c6a61ca75c806aec6..b0a5c60f285ed98b9a72918b7ae9763c6ccbb0b5 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
 \r
   DXE Core Main Entry Point\r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -228,26 +228,21 @@ EFI_DECOMPRESS_PROTOCOL  gEfiDecompress = {
 //\r
 // Main entry point to the DXE Core\r
 //\r
-VOID\r
-EFIAPI\r
-DxeMain (\r
-  IN  VOID *HobStart\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Main entry point to DXE Core.\r
 \r
-Arguments:\r
-\r
-  HobStart - Pointer to the beginning of the HOB List from PEI\r
-\r
-Returns:\r
+  @param  HobStart               Pointer to the beginning of the HOB List from \r
+                                 PEI \r
 \r
-  This function should never return\r
+  @return This function should never return\r
 \r
---*/\r
+**/\r
+VOID\r
+EFIAPI\r
+DxeMain (\r
+  IN  VOID *HobStart\r
+  )\r
 {\r
   EFI_STATUS                         Status;\r
   EFI_PHYSICAL_ADDRESS               MemoryBaseAddress;\r
@@ -335,7 +330,7 @@ Returns:
     gDxeCoreImageHandle\r
     );\r
 \r
-  DEBUG ((EFI_D_INFO | EFI_D_LOAD, "HOBLIST address in DXE = 0x%016lx\n", (UINT64) (UINTN) HobStart));\r
+  DEBUG ((DEBUG_INFO | DEBUG_LOAD, "HOBLIST address in DXE = 0x%016lx\n", (UINT64) (UINTN) HobStart));\r
 \r
   //\r
   // Initialize the Event Services\r
@@ -438,26 +433,19 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are\r
+  available.\r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg0 (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  EFI_NOT_AVAILABLE_YET\r
-\r
---*/\r
 {\r
   //\r
   // This function should never be executed.  If it does, then the architectural protocols\r
@@ -468,26 +456,21 @@ Returns:
   return EFI_NOT_AVAILABLE_YET;\r
 }\r
 \r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are\r
+  available.\r
+\r
+  @param  Arg1                   Undefined \r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg1 (\r
   UINTN Arg1\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
-\r
-  Arg1        - Undefined\r
-\r
-Returns:\r
-\r
-  EFI_NOT_AVAILABLE_YET\r
-\r
---*/\r
 {\r
   //\r
   // This function should never be executed.  If it does, then the architectural protocols\r
@@ -498,29 +481,22 @@ Returns:
   return EFI_NOT_AVAILABLE_YET;\r
 }\r
 \r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
+\r
+  @param  Arg1                   Undefined \r
+  @param  Arg2                   Undefined \r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg2 (\r
   UINTN Arg1,\r
   UINTN Arg2\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
-\r
-  Arg1        - Undefined\r
-\r
-  Arg2        - Undefined\r
-\r
-Returns:\r
-\r
-  EFI_NOT_AVAILABLE_YET\r
-\r
---*/\r
 {\r
   //\r
   // This function should never be executed.  If it does, then the architectural protocols\r
@@ -531,6 +507,17 @@ Returns:
   return EFI_NOT_AVAILABLE_YET;\r
 }\r
 \r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
+\r
+  @param  Arg1                   Undefined \r
+  @param  Arg2                   Undefined \r
+  @param  Arg3                   Undefined \r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg3 (\r
@@ -538,25 +525,6 @@ CoreEfiNotAvailableYetArg3 (
   UINTN Arg2,\r
   UINTN Arg3\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
-\r
-  Arg1        - Undefined\r
-\r
-  Arg2        - Undefined\r
-\r
-  Arg3        - Undefined\r
-\r
-Returns:\r
-\r
-  EFI_NOT_AVAILABLE_YET\r
-\r
---*/\r
 {\r
   //\r
   // This function should never be executed.  If it does, then the architectural protocols\r
@@ -567,6 +535,18 @@ Returns:
   return EFI_NOT_AVAILABLE_YET;\r
 }\r
 \r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
+\r
+  @param  Arg1                   Undefined \r
+  @param  Arg2                   Undefined \r
+  @param  Arg3                   Undefined \r
+  @param  Arg4                   Undefined \r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg4 (\r
@@ -575,27 +555,6 @@ CoreEfiNotAvailableYetArg4 (
   UINTN Arg3,\r
   UINTN Arg4\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
-\r
-  Arg1        - Undefined\r
-\r
-  Arg2        - Undefined\r
-\r
-  Arg3        - Undefined\r
-\r
-  Arg4        - Undefined\r
-\r
-Returns:\r
-\r
-  EFI_NOT_AVAILABLE_YET\r
-\r
---*/\r
 {\r
   //\r
   // This function should never be executed.  If it does, then the architectural protocols\r
@@ -606,6 +565,19 @@ Returns:
   return EFI_NOT_AVAILABLE_YET;\r
 }\r
 \r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
+\r
+  @param  Arg1                   Undefined \r
+  @param  Arg2                   Undefined \r
+  @param  Arg3                   Undefined \r
+  @param  Arg4                   Undefined \r
+  @param  Arg5                   Undefined \r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreEfiNotAvailableYetArg5 (\r
@@ -615,29 +587,6 @@ CoreEfiNotAvailableYetArg5 (
   UINTN Arg4,\r
   UINTN Arg5\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Place holder function until all the Boot Services and Runtime Services are available\r
-\r
-Arguments:\r
-\r
-  Arg1        - Undefined\r
-\r
-  Arg2        - Undefined\r
-\r
-  Arg3        - Undefined\r
-\r
-  Arg4        - Undefined\r
-\r
-  Arg5        - Undefined\r
-\r
-Returns:\r
-\r
-  EFI_NOT_AVAILABLE_YET\r
-\r
---*/\r
 {\r
   //\r
   // This function should never be executed.  If it does, then the architectural protocols\r
@@ -649,30 +598,23 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Searches for a Protocol Interface passed from PEI through a HOB.\r
+\r
+  @param  ProtocolGuid           The Protocol GUID to search for in the HOB List \r
+  @param  Interface              A pointer to the interface for the Protocol GUID \r
+\r
+  @retval EFI_SUCCESS            The Protocol GUID was found and its interface is \r
+                                 returned in Interface \r
+  @retval EFI_NOT_FOUND          The Protocol GUID was not found in the HOB List\r
+\r
+**/\r
 EFI_STATUS\r
 CoreGetPeiProtocol (\r
   IN EFI_GUID  *ProtocolGuid,\r
   IN VOID      **Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Searches for a Protocol Interface passed from PEI through a HOB\r
-\r
-Arguments:\r
-\r
-  ProtocolGuid - The Protocol GUID to search for in the HOB List\r
-\r
-  Interface    - A pointer to the interface for the Protocol GUID\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS   - The Protocol GUID was found and its interface is returned in Interface\r
-\r
-  EFI_NOT_FOUND - The Protocol GUID was not found in the HOB List\r
-\r
---*/\r
 {\r
   EFI_HOB_GUID_TYPE   *GuidHob;\r
   VOID                *Buffer;\r
@@ -691,26 +633,18 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-CalculateEfiHdrCrc (\r
-  IN  OUT EFI_TABLE_HEADER    *Hdr\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Calcualte the 32-bit CRC in a EFI table using the service provided by the\r
   gRuntime service.\r
 \r
-Arguments:\r
+  @param  Hdr                    Pointer to an EFI standard header\r
 \r
-  Hdr  - Pointer to an EFI standard header\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
+**/\r
+VOID\r
+CalculateEfiHdrCrc (\r
+  IN  OUT EFI_TABLE_HEADER    *Hdr\r
+  )\r
 {\r
   UINT32 Crc;\r
 \r
@@ -727,30 +661,23 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Terminates all boot services.\r
+\r
+  @param  ImageHandle            Handle that identifies the exiting image. \r
+  @param  MapKey                 Key to the latest memory map.\r
+\r
+  @retval EFI_SUCCESS            Boot Services terminated \r
+  @retval EFI_INVALID_PARAMETER  MapKey is incorrect.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreExitBootServices (\r
   IN EFI_HANDLE   ImageHandle,\r
   IN UINTN        MapKey\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Terminates all boot services.\r
-\r
-Arguments:\r
-\r
-  ImageHandle   - Handle that identifies the exiting image.\r
-\r
-  MapKey -Key to the latest memory map.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS - Boot Services terminated\r
-  EFI_INVALID_PARAMETER - MapKey is incorrect.\r
-\r
---*/\r
 {\r
   EFI_STATUS    Status;\r
   EFI_STATUS    StatusTemp;\r
@@ -847,7 +774,48 @@ Returns:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Given a compressed source buffer, this function retrieves the size of the\r
+  uncompressed buffer and the size of the scratch buffer required to decompress\r
+  the compressed source buffer.\r
+\r
+  The GetInfo() function retrieves the size of the uncompressed buffer and the\r
+  temporary scratch buffer required to decompress the buffer specified by Source\r
+  and SourceSize. If the size of the uncompressed buffer or the size of the\r
+  scratch buffer cannot be determined from the compressed data specified by\r
+  Source and SourceData, then EFI_INVALID_PARAMETER is returned. Otherwise, the\r
+  size of the uncompressed buffer is returned in DestinationSize, the size of\r
+  the scratch buffer is returned in ScratchSize, and EFI_SUCCESS is returned.\r
+  The GetInfo() function does not have scratch buffer available to perform a\r
+  thorough checking of the validity of the source data. It just retrieves the\r
+  "Original Size" field from the beginning bytes of the source data and output\r
+  it as DestinationSize. And ScratchSize is specific to the decompression\r
+  implementation.\r
+\r
+  @param  This               A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r
+  @param  Source             The source buffer containing the compressed data.\r
+  @param  SourceSize         The size, in bytes, of the source buffer.\r
+  @param  DestinationSize    A pointer to the size, in bytes, of the\r
+                             uncompressed buffer that will be generated when the\r
+                             compressed buffer specified by Source and\r
+                             SourceSize is decompressed.\r
+  @param  ScratchSize        A pointer to the size, in bytes, of the scratch\r
+                             buffer that is required to decompress the\r
+                             compressed buffer specified by Source and\r
+                             SourceSize.\r
+   \r
+  @retval EFI_SUCCESS        The size of the uncompressed data was returned in\r
+                             DestinationSize and the size of the scratch buffer\r
+                             was returned in ScratchSize.\r
+  @retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of\r
+                                the scratch buffer cannot be determined from the\r
+                                compressed data specified by Source and\r
+                                SourceSize.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 DxeMainUefiDecompressGetInfo (\r
   IN EFI_DECOMPRESS_PROTOCOL            *This,\r
   IN   VOID                             *Source,\r
@@ -864,6 +832,41 @@ DxeMainUefiDecompressGetInfo (
   return UefiDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize);\r
 }\r
 \r
+\r
+/**\r
+  Decompresses a compressed source buffer.\r
+\r
+  The Decompress() function extracts decompressed data to its original form.\r
+  This protocol is designed so that the decompression algorithm can be\r
+  implemented without using any memory services. As a result, the Decompress()\r
+  Function is not allowed to call AllocatePool() or AllocatePages() in its\r
+  implementation. It is the caller¡¯s responsibility to allocate and free the\r
+  Destination and Scratch buffers.\r
+  If the compressed source data specified by Source and SourceSize is\r
+  sucessfully decompressed into Destination, then EFI_SUCCESS is returned. If\r
+  the compressed source data specified by Source and SourceSize is not in a\r
+  valid compressed data format, then EFI_INVALID_PARAMETER is returned.\r
+\r
+  @param  This                A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r
+  @param  Source              The source buffer containing the compressed data.\r
+  @param  SourceSize          SourceSizeThe size of source data.\r
+  @param  Destination         On output, the destination buffer that contains\r
+                              the uncompressed data.\r
+  @param  DestinationSize     The size of the destination buffer.  The size of\r
+                              the destination buffer needed is obtained from\r
+                              EFI_DECOMPRESS_PROTOCOL.GetInfo().\r
+  @param  Scratch             A temporary scratch buffer that is used to perform\r
+                              the decompression.\r
+  @param  ScratchSize         The size of scratch buffer. The size of the\r
+                              scratch buffer needed is obtained from GetInfo().\r
+  \r
+  @retval EFI_SUCCESS         Decompression completed successfully, and the\r
+                              uncompressed buffer is returned in Destination.\r
+  @retval EFI_INVALID_PARAMETER  The source buffer specified by Source and\r
+                                 SourceSize is corrupted (not in a valid\r
+                                 compressed format).\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DxeMainUefiDecompress (\r
index a3d4bbaaacee862c678076bb6426aa962186418b..42a7a054e60b68a7a49551f591a5081bc3889a6c 100644 (file)
@@ -45,23 +45,19 @@ ARCHITECTURAL_PROTOCOL_ENTRY  mArchProtocols[] = {
 };\r
 \r
 \r
-EFI_STATUS\r
-CoreAllEfiServicesAvailable (\r
-  VOID\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Return TRUE if all AP services are availible.\r
 \r
-Arguments:\r
-  NONE\r
 \r
-Returns:\r
-  EFI_SUCCESS   - All AP services are available\r
-  EFI_NOT_FOUND - At least one AP service is not available\r
+  @retval EFI_SUCCESS    All AP services are available \r
+  @retval EFI_NOT_FOUND  At least one AP service is not available\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreAllEfiServicesAvailable (\r
+  VOID\r
+  )\r
 {\r
   ARCHITECTURAL_PROTOCOL_ENTRY  *Entry;\r
 \r
@@ -74,33 +70,25 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
-VOID\r
-EFIAPI\r
-GenericArchProtocolNotify (\r
-  IN   EFI_EVENT       Event,\r
-  IN   VOID            *Context\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Notification event handler registered by CoreNotifyOnArchProtocolInstallation ().\r
   This notify function is registered for every architectural protocol. This handler\r
   updates mArchProtocol[] array entry with protocol instance data and sets it's\r
   present flag to TRUE. If any constructor is required it is executed. The EFI\r
   System Table headers are updated.\r
 \r
-Arguments:\r
-\r
-  Event   - The Event that is being processed, not used.\r
+  @param  Event          The Event that is being processed, not used. \r
+  @param  Context        Event Context, not used.\r
 \r
-  Context - Event Context, not used.\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
+**/\r
+STATIC\r
+VOID\r
+EFIAPI\r
+GenericArchProtocolNotify (\r
+  IN  EFI_EVENT       Event,\r
+  IN  VOID            *Context\r
+  )\r
 {\r
   EFI_STATUS                      Status;\r
   ARCHITECTURAL_PROTOCOL_ENTRY    *Entry;\r
@@ -184,22 +172,15 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Creates an event that is fired everytime a Protocol of a specific type is installed.\r
+\r
+**/\r
 VOID\r
 CoreNotifyOnArchProtocolInstallation (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Creates an event that is fired everytime a Protocol of a specific type is installed\r
-\r
-Arguments:\r
-  NONE\r
-\r
-Returns:\r
-  NONE\r
-\r
---*/\r
 {\r
   EFI_STATUS                      Status;\r
   ARCHITECTURAL_PROTOCOL_ENTRY    *Entry;\r
@@ -256,23 +237,16 @@ static const GUID_TO_STRING_PROTOCOL_ENTRY MissingProtocols[] = {
   { &gEfiRealTimeClockArchProtocolGuid,    (CHAR16 *)L"Real Time Clock"    }\r
 };\r
 \r
+\r
+/**\r
+  Displays Architectural protocols that were not loaded and are required for DXE\r
+  core to function.  Only used in Debug Builds.\r
+\r
+**/\r
 VOID\r
 CoreDisplayMissingArchProtocols (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Displays Architectural protocols that were not loaded and are required for DXE core to function\r
-  Only used in Debug Builds\r
-\r
-Arguments:\r
-  NONE\r
-\r
-Returns:\r
-  NONE\r
-\r
---*/\r
 {\r
   const GUID_TO_STRING_PROTOCOL_ENTRY  *MissingEntry;\r
   ARCHITECTURAL_PROTOCOL_ENTRY         *Entry;\r
@@ -282,7 +256,7 @@ Returns:
       MissingEntry = MissingProtocols;\r
       for (MissingEntry = MissingProtocols; TRUE ; MissingEntry++) {\r
         if (CompareGuid (Entry->ProtocolGuid, MissingEntry->ProtocolGuid)) {\r
-          DEBUG ((EFI_D_ERROR, "\n%s Arch Protocol not present!!\n", MissingEntry->GuidString));\r
+          DEBUG ((DEBUG_ERROR, "\n%s Arch Protocol not present!!\n", MissingEntry->GuidString));\r
           break;\r
         }\r
       }\r
index 13949169a0079e3cc8a4b5756d505059ca1a4b34..f5ffbb7d4df3d4eadad764c1bf5efd1caff0baeb 100644 (file)
@@ -62,74 +62,47 @@ UINT32 mEventTable[] = {
   EVT_TIMER | EVT_NOTIFY_WAIT,\r
 };\r
 \r
+\r
+/**\r
+  Enter critical section by acquiring the lock on gEventQueueLock.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreAcquireEventLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Enter critical section by acquiring the lock on gEventQueueLock.\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   CoreAcquireLock (&gEventQueueLock);\r
 }\r
 \r
+\r
+/**\r
+  Exit critical section by releasing the lock on gEventQueueLock.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreReleaseEventLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Exit critical section by releasing the lock on gEventQueueLock.\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   CoreReleaseLock (&gEventQueueLock);\r
 }\r
 \r
 \r
-EFI_STATUS\r
-CoreInitializeEventServices (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Initializes "event" support and populates parts of the System and Runtime Table.\r
 \r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
 \r
-  EFI_SUCCESS - Always return success\r
+  @retval EFI_SUCCESS            Always return success\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreInitializeEventServices (\r
+  VOID\r
+  )\r
 {\r
   UINTN        Index;\r
 \r
@@ -143,25 +116,18 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-CoreDispatchEventNotifies (\r
-  IN EFI_TPL      Priority\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Dispatches all pending events.\r
 \r
-Arguments:\r
-\r
-  Priority - The task priority level of event notifications to dispatch\r
+  @param  Priority               The task priority level of event notifications \r
+                                 to dispatch\r
 \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
+**/\r
+VOID\r
+CoreDispatchEventNotifies (\r
+  IN EFI_TPL      Priority\r
+  )\r
 {\r
   IEVENT          *Event;\r
   LIST_ENTRY      *Head;\r
@@ -207,26 +173,18 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Queues the event's notification function to fire.\r
+\r
+  @param  Event                  The Event to notify\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreNotifyEvent (\r
   IN  IEVENT      *Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Queues the event's notification function to fire\r
-\r
-Arguments:\r
-\r
-  Event       - The Event to notify\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
 \r
   //\r
@@ -253,23 +211,17 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Signals all events in the EventGroup.\r
+\r
+  @param  EventGroup             The list to signal\r
+\r
+**/\r
 VOID\r
 CoreNotifySignalList (\r
   IN EFI_GUID     *EventGroup\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Signals all events in the EventGroup\r
-\r
-Arguments:\r
-  EventGroup - The list to signal\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   LIST_ENTRY              *Link;\r
   LIST_ENTRY              *Head;\r
@@ -288,6 +240,25 @@ Returns:
   CoreReleaseEventLock ();\r
 }\r
 \r
+\r
+/**\r
+  Creates a general-purpose event structure.\r
+\r
+  @param  Type                   The type of event to create and its mode and \r
+                                 attributes \r
+  @param  NotifyTpl              The task priority level of event notifications \r
+  @param  NotifyFunction         Pointer to the events notification function \r
+  @param  NotifyContext          Pointer to the notification functions context; \r
+                                 corresponds to parameter "Context" in the \r
+                                 notification function \r
+  @param  Event                  Pointer to the newly created event if the call \r
+                                 succeeds; undefined otherwise \r
+\r
+  @retval EFI_SUCCESS            The event structure was created \r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value \r
+  @retval EFI_OUT_OF_RESOURCES   The event could not be allocated\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCreateEvent (\r
@@ -297,30 +268,32 @@ CoreCreateEvent (
   IN VOID                     *NotifyContext, OPTIONAL\r
   OUT EFI_EVENT               *Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Creates a general-purpose event structure\r
-\r
-Arguments:\r
-  Type                - The type of event to create and its mode and attributes\r
-  NotifyTpl           - The task priority level of event notifications\r
-  NotifyFunction      - Pointer to the events notification function\r
-  NotifyContext       - Pointer to the notification functions context; corresponds to\r
-                        parameter "Context" in the notification function\r
-  Event               - Pointer to the newly created event if the call succeeds; undefined otherwise\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The event structure was created\r
-  EFI_INVALID_PARAMETER - One of the parameters has an invalid value\r
-  EFI_OUT_OF_RESOURCES  - The event could not be allocated\r
-\r
---*/\r
 {\r
   return CoreCreateEventEx (Type, NotifyTpl, NotifyFunction, NotifyContext, NULL, Event);\r
 }\r
 \r
 \r
+\r
+/**\r
+  Creates a general-purpose event structure\r
+\r
+  @param  Type                   The type of event to create and its mode and \r
+                                 attributes \r
+  @param  NotifyTpl              The task priority level of event notifications \r
+  @param  NotifyFunction         Pointer to the events notification function \r
+  @param  NotifyContext          Pointer to the notification functions context; \r
+                                 corresponds to parameter "Context" in the \r
+                                 notification function \r
+  @param  EventGroup             GUID for EventGroup if NULL act the same as \r
+                                 gBS->CreateEvent(). \r
+  @param  Event                  Pointer to the newly created event if the call \r
+                                 succeeds; undefined otherwise \r
+\r
+  @retval EFI_SUCCESS            The event structure was created \r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value \r
+  @retval EFI_OUT_OF_RESOURCES   The event could not be allocated\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCreateEventEx (\r
@@ -331,26 +304,6 @@ CoreCreateEventEx (
   IN CONST EFI_GUID           *EventGroup,    OPTIONAL\r
   OUT EFI_EVENT               *Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Creates a general-purpose event structure\r
-\r
-Arguments:\r
-  Type                - The type of event to create and its mode and attributes\r
-  NotifyTpl           - The task priority level of event notifications\r
-  NotifyFunction      - Pointer to the events notification function\r
-  NotifyContext       - Pointer to the notification functions context; corresponds to\r
-                        parameter "Context" in the notification function\r
-  EventGroup          - GUID for EventGroup if NULL act the same as gBS->CreateEvent().\r
-  Event               - Pointer to the newly created event if the call succeeds; undefined otherwise\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The event structure was created\r
-  EFI_INVALID_PARAMETER - One of the parameters has an invalid value\r
-  EFI_OUT_OF_RESOURCES  - The event could not be allocated\r
-\r
---*/\r
 {\r
   EFI_STATUS      Status;\r
   IEVENT          *IEvent;\r
@@ -482,28 +435,21 @@ Returns:
 \r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-CoreSignalEvent (\r
-  IN EFI_EVENT    UserEvent\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Signals the event.  Queues the event to be notified if needed\r
 \r
-Arguments:\r
-\r
-  UserEvent - The event to signal\r
-\r
-Returns:\r
+  @param  UserEvent              The event to signal \r
 \r
-  EFI_INVALID_PARAMETER - Parameters are not valid.\r
+  @retval EFI_INVALID_PARAMETER  Parameters are not valid. \r
+  @retval EFI_SUCCESS            The event was signaled.\r
 \r
-  EFI_SUCCESS - The event was signaled.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreSignalEvent (\r
+  IN EFI_EVENT    UserEvent\r
+  )\r
 {\r
   IEVENT          *Event;\r
 \r
@@ -549,29 +495,22 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Check the status of an event.\r
+\r
+  @param  UserEvent              The event to check \r
+\r
+  @retval EFI_SUCCESS            The event is in the signaled state \r
+  @retval EFI_NOT_READY          The event is not in the signaled state \r
+  @retval EFI_INVALID_PARAMETER  Event is of type EVT_NOTIFY_SIGNAL\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCheckEvent (\r
   IN EFI_EVENT        UserEvent\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Check the status of an event\r
-\r
-Arguments:\r
-\r
-  UserEvent - The event to check\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The event is in the signaled state\r
-  EFI_NOT_READY         - The event is not in the signaled state\r
-  EFI_INVALID_PARAMETER - Event is of type EVT_NOTIFY_SIGNAL\r
-\r
---*/\r
-\r
 {\r
   IEVENT      *Event;\r
   EFI_STATUS  Status;\r
@@ -625,6 +564,21 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Stops execution until an event is signaled.\r
+\r
+  @param  NumberOfEvents         The number of events in the UserEvents array \r
+  @param  UserEvents             An array of EFI_EVENT \r
+  @param  UserIndex              Pointer to the index of the event which \r
+                                 satisfied the wait condition \r
+\r
+  @retval EFI_SUCCESS            The event indicated by Index was signaled. \r
+  @retval EFI_INVALID_PARAMETER  The event indicated by Index has a notification \r
+                                 function or Event was not a valid type \r
+  @retval EFI_UNSUPPORTED        The current TPL is not TPL_APPLICATION\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreWaitForEvent (\r
@@ -632,27 +586,6 @@ CoreWaitForEvent (
   IN EFI_EVENT    *UserEvents,\r
   OUT UINTN       *UserIndex\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Stops execution until an event is signaled.\r
-\r
-Arguments:\r
-\r
-  NumberOfEvents  - The number of events in the UserEvents array\r
-  UserEvents      - An array of EFI_EVENT\r
-  UserIndex       - Pointer to the index of the event which satisfied the wait condition\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The event indicated by Index was signaled.\r
-  EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or\r
-                          Event was not a valid type\r
-  EFI_UNSUPPORTED       - The current TPL is not TPL_APPLICATION\r
-\r
---*/\r
-\r
 {\r
   EFI_STATUS      Status;\r
   UINTN           Index;\r
@@ -687,29 +620,21 @@ Returns:
 }\r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-CoreCloseEvent (\r
-  IN EFI_EVENT    UserEvent\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Closes an event and frees the event structure.\r
 \r
-Arguments:\r
-\r
-  UserEvent - Event to close\r
+  @param  UserEvent              Event to close \r
 \r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER - Parameters are not valid.\r
-\r
-  EFI_SUCCESS - The event has been closed\r
-\r
---*/\r
+  @retval EFI_INVALID_PARAMETER  Parameters are not valid. \r
+  @retval EFI_SUCCESS            The event has been closed\r
 \r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreCloseEvent (\r
+  IN EFI_EVENT    UserEvent\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   IEVENT      *Event;\r
index 7a49c2a3bd949da0dbaa8abc8b61b0465fa9d30c..1388512fb8adf69972dfef9e405f559ea833f1a5 100644 (file)
@@ -19,12 +19,26 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Internal prototypes\r
 //\r
+/**\r
+  Returns the current system time.\r
+\r
+  @return The current system time\r
+\r
+**/\r
 STATIC\r
 UINT64\r
 CoreCurrentSystemTime (\r
   VOID\r
   );\r
 \r
+/**\r
+  Checks the sorted timer list against the current system time.\r
+  Signals any expired event timer.\r
+\r
+  @param  CheckEvent             Not used \r
+  @param  Context                Not used\r
+\r
+**/\r
 STATIC\r
 VOID\r
 EFIAPI\r
@@ -33,6 +47,13 @@ CoreCheckTimers (
   IN VOID         *Context\r
   );\r
 \r
+/**\r
+  Inserts the timer event.\r
+\r
+  @param  Event                  Points to the internal structure of timer event \r
+                                 to be installed\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreInsertEventTimer (\r
@@ -54,25 +75,15 @@ static UINT64           mEfiSystemTime = 0;
 // Timer functions\r
 //\r
 \r
+\r
+/**\r
+  Initializes timer support.\r
+\r
+**/\r
 VOID\r
 CoreInitializeTimer (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initializes timer support\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -86,26 +97,18 @@ Returns:
   ASSERT_EFI_ERROR (Status);\r
 }\r
 \r
+\r
+/**\r
+  Returns the current system time.\r
+\r
+  @return The current system time\r
+\r
+**/\r
 STATIC\r
 UINT64\r
 CoreCurrentSystemTime (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Returns the current system time\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  Returns the current system time\r
-\r
---*/\r
 {\r
   UINT64          SystemTime;\r
 \r
@@ -115,26 +118,19 @@ Returns:
   return SystemTime;\r
 }\r
 \r
+\r
+/**\r
+  Called by the platform code to process a tick.\r
+\r
+  @param  Duration               The number of 100ns elasped since the last call \r
+                                 to TimerTick\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 CoreTimerTick (\r
   IN UINT64   Duration\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Called by the platform code to process a tick.\r
-\r
-Arguments:\r
-\r
-  Duration    - The number of 100ns elasped since the last call to TimerTick\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   IEVENT          *Event;\r
 \r
@@ -166,6 +162,15 @@ Returns:
   CoreReleaseLock (&mEfiSystemTimeLock);\r
 }\r
 \r
+\r
+/**\r
+  Checks the sorted timer list against the current system time.\r
+  Signals any expired event timer.\r
+\r
+  @param  CheckEvent             Not used \r
+  @param  Context                Not used\r
+\r
+**/\r
 STATIC\r
 VOID\r
 EFIAPI\r
@@ -173,24 +178,6 @@ CoreCheckTimers (
   IN EFI_EVENT            CheckEvent,\r
   IN VOID                 *Context\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Checks the sorted timer list against the current system time.\r
-  Signals any expired event timer.\r
-\r
-Arguments:\r
-\r
-  CheckEvent  - Not used\r
-\r
-  Context     - Not used\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   UINT64                  SystemTime;\r
   IEVENT                  *Event;\r
@@ -255,26 +242,19 @@ Returns:
   CoreReleaseLock (&mEfiTimerLock);\r
 }\r
 \r
+\r
+/**\r
+  Inserts the timer event.\r
+\r
+  @param  Event                  Points to the internal structure of timer event \r
+                                 to be installed\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreInsertEventTimer (\r
   IN IEVENT   *Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Inserts the timer event\r
-\r
-Arguments:\r
-\r
-  Event - Points to the internal structure of timer event to be installed\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   UINT64          TriggerTime;\r
   LIST_ENTRY      *Link;\r
@@ -305,6 +285,22 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Sets the type of timer and the trigger time for a timer event.\r
+\r
+  @param  UserEvent              The timer event that is to be signaled at the \r
+                                 specified time \r
+  @param  Type                   The type of time that is specified in \r
+                                 TriggerTime \r
+  @param  TriggerTime            The number of 100ns units until the timer \r
+                                 expires \r
+\r
+  @retval EFI_SUCCESS            The event has been set to be signaled at the \r
+                                 requested time \r
+  @retval EFI_INVALID_PARAMETER  Event or Type is not valid\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreSetTimer (\r
@@ -312,24 +308,6 @@ CoreSetTimer (
   IN EFI_TIMER_DELAY      Type,\r
   IN UINT64               TriggerTime\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Sets the type of timer and the trigger time for a timer event.\r
-\r
-Arguments:\r
-\r
-  UserEvent   - The timer event that is to be signaled at the specified time\r
-  Type        - The type of time that is specified in TriggerTime\r
-  TriggerTime - The number of 100ns units until the timer expires\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The event has been set to be signaled at the requested time\r
-  EFI_INVALID_PARAMETER - Event or Type is not valid\r
-\r
---*/\r
 {\r
   IEVENT      *Event;\r
 \r
index 694d7317121e1079543a028ec5cfa66fc8b75c14..02597f3254617edd83cd1af5d400e5488021aede 100644 (file)
@@ -15,27 +15,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <DxeMain.h>\r
 \r
+\r
+/**\r
+  Set Interrupt State.\r
+\r
+  @param  Enable  The state of enable or disable interrupt\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreSetInterruptState (\r
   IN BOOLEAN      Enable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  \r
-  Set Interrupt State\r
-  \r
-Arguments:\r
-  \r
-  Enable - The state of enable or disable interrupt\r
-  \r
-Returns:\r
-  \r
-  None\r
-\r
---*/\r
-\r
 {\r
   if (gCpu != NULL) {\r
     if (Enable) {\r
@@ -49,25 +40,19 @@ Returns:
 //\r
 // Return the highest set bit\r
 //\r
+\r
+/**\r
+  Return the highest set bit.\r
+\r
+  @param  Number  The value to check \r
+\r
+  @return Bit position of the highest set bit\r
+\r
+**/\r
 UINTN\r
 CoreHighestSetBit (\r
   IN UINTN     Number\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  \r
-  Return the highest set bit\r
-  \r
-Arguments:\r
-  \r
-  Number - The value to check\r
-  \r
-Returns:\r
-  \r
-  Bit position of the highest set bit\r
-\r
---*/\r
 {\r
   UINTN   msb;\r
   \r
@@ -81,27 +66,21 @@ Returns:
 \r
 \r
 \r
-EFI_TPL\r
-EFIAPI\r
-CoreRaiseTpl (\r
-  IN EFI_TPL      NewTpl\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Raise the task priority level to the new level.\r
   High level is implemented by disabling processor interrupts.\r
 \r
-Arguments:\r
-\r
-  NewTpl  - New task priority level\r
-    \r
-Returns:\r
+  @param  NewTpl  New task priority level \r
 \r
-  The previous task priority level\r
+  @return The previous task priority level\r
 \r
---*/\r
+**/\r
+EFI_TPL\r
+EFIAPI\r
+CoreRaiseTpl (\r
+  IN EFI_TPL      NewTpl\r
+  )\r
 {\r
   EFI_TPL     OldTpl;\r
 \r
@@ -126,27 +105,19 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Lowers the task priority to the previous value.   If the new\r
+  priority unmasks events at a higher priority, they are dispatched.\r
+\r
+  @param  NewTpl  New, lower, task priority\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 CoreRestoreTpl (\r
   IN EFI_TPL NewTpl\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Lowers the task priority to the previous value.   If the new \r
-  priority unmasks events at a higher priority, they are dispatched.\r
-\r
-Arguments:\r
-\r
-  NewTpl  - New, lower, task priority\r
-    \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   EFI_TPL     OldTpl;\r
 \r
index 7ead363a3bd406467ff5a240a43974de533e6924..05d22e444d04ff56fe7e950d5009f5b17c9b1065 100644 (file)
@@ -73,120 +73,76 @@ typedef struct {
 // Internal prototypes\r
 //\r
 \r
+\r
+/**\r
+  Dispatches all pending events.\r
+\r
+  @param  Priority               The task priority level of event notifications \r
+                                 to dispatch\r
+\r
+**/\r
 VOID\r
 CoreDispatchEventNotifies (\r
   IN EFI_TPL      Priority\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Dispatches all pending events. \r
+;\r
 \r
-Arguments:\r
 \r
-  Priority - The task priority level of event notifications to dispatch\r
-    \r
-Returns:\r
 \r
-  None\r
+/**\r
+  Return the highest set bit.\r
 \r
---*/\r
-;\r
+  @param  Number  The value to check \r
 \r
+  @return Bit position of the highest set bit\r
 \r
+**/\r
 UINTN\r
 CoreHighestSetBit (\r
   IN UINTN         Number\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  \r
-  Return the highest set bit\r
-  \r
-Arguments:\r
-  \r
-  Number - The value to check\r
-  \r
-Returns:\r
-  \r
-  Bit position of the highest set bit\r
 \r
---*/\r
-;\r
 \r
+/**\r
+  Disables CPU interrupts.\r
+\r
+  @retval EFI_SUCCESS            If interrupts were disabled in the CPU. \r
+  @retval EFI_INVALID_PARAMETER  State is NULL.\r
 \r
+**/\r
 BOOLEAN\r
 GetInterruptState (\r
   VOID               \r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Disables CPU interrupts.\r
-\r
-Arguments:\r
-\r
-  This                - Protocol instance structure\r
-\r
-  State               - Pointer to the CPU's current interrupt state\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS           - If interrupts were disabled in the CPU.\r
-\r
-  EFI_INVALID_PARAMETER - State is NULL.\r
-  \r
---*/\r
 ;\r
 \r
 //\r
 // Exported functions\r
 //\r
 \r
+\r
+/**\r
+  A function out of date, should be removed.\r
+\r
+**/\r
 VOID\r
 CoreEventVirtualAddressFixup (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  A function out of date, should be removed.\r
-\r
-Arguments:\r
-\r
-  None\r
-    \r
-Returns:\r
+;\r
 \r
-  None\r
 \r
---*/\r
-;\r
 \r
+/**\r
+  Initializes timer support.\r
 \r
+**/\r
 VOID\r
 CoreInitializeTimer (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initializes timer support\r
-\r
-Arguments:\r
-\r
-  None\r
-    \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 ;\r
 \r
 //\r
@@ -197,6 +153,5 @@ extern EFI_LOCK       gEventQueueLock;
 extern UINTN          gEventPending;\r
 extern LIST_ENTRY     gEventQueue[];\r
 extern LIST_ENTRY     gEventSignalQueue;\r
-extern UINT8          gHSB[];\r
 \r
 #endif\r
index b62fab9cd942702f3e170fef34d2abf6f3a3d506..736e840cb70e5a2eeb78a0dcd13906230a0c3e94 100644 (file)
@@ -19,24 +19,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define PHYSICAL_ADDRESS_TO_POINTER(Address) ((VOID *)((UINTN)(Address)))\r
 \r
 \r
+/**\r
+  Get the FFS file state by checking the highest bit set in the header's state field.\r
+\r
+  @param  ErasePolarity  Erase polarity attribute of the firmware volume \r
+  @param  FfsHeader      Points to the FFS file header \r
+\r
+  @return FFS File state\r
+\r
+**/\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
-  Get the FFS file state by checking the highest bit set in the header's state field\r
-\r
-Arguments:\r
-  ErasePolarity -  Erase polarity attribute of the firmware volume\r
-  FfsHeader     -  Points to the FFS file header\r
-    \r
-Returns:\r
-  FFS File state \r
-    \r
---*/\r
 {\r
   EFI_FFS_FILE_STATE      FileState;\r
   UINT8                   HighestBit;\r
@@ -56,27 +52,24 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Check if a block of buffer is erased.\r
+\r
+  @param  ErasePolarity  Erase polarity attribute of the firmware volume \r
+  @param  InBuffer       The buffer to be checked \r
+  @param  BufferSize     Size of the buffer in bytes \r
+\r
+  @retval TRUE           The block of buffer is erased \r
+  @retval FALSE          The block of buffer is not erased\r
+\r
+**/\r
 BOOLEAN\r
 IsBufferErased (\r
   IN UINT8    ErasePolarity,\r
   IN VOID     *InBuffer,\r
   IN UINTN    BufferSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Check if a block of buffer is erased\r
-\r
-Arguments:\r
-  ErasePolarity -  Erase polarity attribute of the firmware volume\r
-  InBuffer      -  The buffer to be checked\r
-  BufferSize    -  Size of the buffer in bytes\r
-    \r
-Returns:\r
-  TRUE  -  The block of buffer is erased\r
-  FALSE -  The block of buffer is not erased\r
-    \r
---*/\r
 {\r
   UINTN   Count;\r
   UINT8   EraseByte;\r
@@ -99,35 +92,32 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Verify checksum of the firmware volume header.\r
+\r
+  @param  FvHeader       Points to the firmware volume header to be checked \r
+\r
+  @retval TRUE           Checksum verification passed \r
+  @retval FALSE          Checksum verification failed\r
+\r
+**/\r
 BOOLEAN\r
 VerifyFvHeaderChecksum (\r
   IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Verify checksum of the firmware volume header \r
-\r
-Arguments:\r
-  FvHeader  -  Points to the firmware volume header to be checked\r
-    \r
-Returns:\r
-  TRUE  -  Checksum verification passed\r
-  FALSE -  Checksum verification failed\r
-    \r
---*/\r
 {\r
   UINT32  Index;\r
   UINT32  HeaderLength;\r
   UINT16  Checksum;\r
-  UINT16  *ptr;\r
+  UINT16  *Ptr;\r
 \r
   HeaderLength = FvHeader->HeaderLength;\r
-  ptr = (UINT16 *)FvHeader;\r
+  Ptr = (UINT16 *)FvHeader;\r
   Checksum = 0;\r
 \r
   for (Index = 0; Index < HeaderLength / sizeof (UINT16); Index++) {\r
-    Checksum = (UINT16)(Checksum + ptr[Index]);\r
+    Checksum = (UINT16)(Checksum + Ptr[Index]);\r
   }\r
 \r
   if (Checksum == 0) {\r
@@ -137,33 +127,30 @@ Returns:
   }\r
 }\r
 \r
+\r
+/**\r
+  Verify checksum of the FFS file header.\r
+\r
+  @param  FfsHeader      Points to the FFS file header to be checked \r
+\r
+  @retval TRUE           Checksum verification passed \r
+  @retval FALSE          Checksum verification failed\r
+\r
+**/\r
 STATIC\r
 BOOLEAN\r
 VerifyHeaderChecksum (\r
   IN EFI_FFS_FILE_HEADER  *FfsHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Verify checksum of the FFS file header \r
-\r
-Arguments:\r
-  FfsHeader  -  Points to the FFS file header to be checked\r
-    \r
-Returns:\r
-  TRUE  -  Checksum verification passed\r
-  FALSE -  Checksum verification failed\r
-    \r
---*/\r
 {\r
   UINT32            Index;\r
-  UINT8             *ptr;\r
+  UINT8             *Ptr;\r
   UINT8             HeaderChecksum;\r
 \r
-  ptr = (UINT8 *)FfsHeader;\r
+  Ptr = (UINT8 *)FfsHeader;\r
   HeaderChecksum = 0;\r
   for (Index = 0; Index < sizeof(EFI_FFS_FILE_HEADER); Index++) {\r
-    HeaderChecksum = (UINT8)(HeaderChecksum + ptr[Index]);\r
+    HeaderChecksum = (UINT8)(HeaderChecksum + Ptr[Index]);\r
   }\r
 \r
   HeaderChecksum = (UINT8) (HeaderChecksum - FfsHeader->State - FfsHeader->IntegrityCheck.Checksum.File);\r
@@ -176,27 +163,24 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Check if it's a valid FFS file header.\r
+\r
+  @param  ErasePolarity  Erase polarity attribute of the firmware volume \r
+  @param  FfsHeader      Points to the FFS file header to be checked \r
+  @param  FileState      FFS file state to be returned \r
+\r
+  @retval TRUE           Valid FFS file header \r
+  @retval FALSE          Invalid FFS file header\r
+\r
+**/\r
 BOOLEAN\r
 IsValidFfsHeader (\r
   IN UINT8                ErasePolarity,\r
   IN EFI_FFS_FILE_HEADER  *FfsHeader,\r
   OUT EFI_FFS_FILE_STATE  *FileState\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Check if it's a valid FFS file header\r
-\r
-Arguments:\r
-  ErasePolarity -  Erase polarity attribute of the firmware volume\r
-  FfsHeader     -  Points to the FFS file header to be checked\r
-  FileState     -  FFS file state to be returned\r
-    \r
-Returns:\r
-  TRUE  -  Valid FFS file header\r
-  FALSE -  Invalid FFS file header\r
-    \r
---*/\r
 {\r
   *FileState = GetFileState (ErasePolarity, FfsHeader);\r
 \r
@@ -218,26 +202,23 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Check if it's a valid FFS file.\r
+  Here we are sure that it has a valid FFS file header since we must call IsValidFfsHeader() first.\r
+\r
+  @param  ErasePolarity  Erase polarity attribute of the firmware volume \r
+  @param  FfsHeader      Points to the FFS file to be checked \r
+\r
+  @retval TRUE           Valid FFS file \r
+  @retval FALSE          Invalid FFS file\r
+\r
+**/\r
 BOOLEAN\r
 IsValidFfsFile (\r
   IN UINT8                ErasePolarity,\r
   IN EFI_FFS_FILE_HEADER  *FfsHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Check if it's a valid FFS file. \r
-  Here we are sure that it has a valid FFS file header since we must call IsValidFfsHeader() first.\r
-\r
-Arguments:\r
-  ErasePolarity -  Erase polarity attribute of the firmware volume\r
-  FfsHeader     -  Points to the FFS file to be checked\r
-    \r
-Returns:\r
-  TRUE  -  Valid FFS file\r
-  FALSE -  Invalid FFS file\r
-    \r
---*/\r
 {\r
   EFI_FFS_FILE_STATE  FileState;\r
 \r
@@ -258,3 +239,4 @@ Returns:
   }\r
 }\r
 \r
+\r
index 60c5fa19a2ad613c177ca4f9a12216dad88705c7..bdf87731fb9f88fb01eb063c3d1b7e1c7e45dee4 100644 (file)
@@ -1,9 +1,9 @@
-/**@file\r
+/** @file\r
   Firmware File System driver that produce Firmware Volume protocol.\r
   Layers on top of Firmware Block protocol to produce a file abstraction \r
   of FV based files.\r
   \r
-Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2008 Intel Corporation. <BR>\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
@@ -53,29 +53,26 @@ FV_DEVICE mFvDevice = {
 // FFS helper functions\r
 //\r
 \r
-EFI_STATUS\r
-GetFwVolHeader (\r
-  IN     EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL     *Fvb,\r
-  OUT    EFI_FIRMWARE_VOLUME_HEADER             **FwVolHeader\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   given the supplied FW_VOL_BLOCK_PROTOCOL, allocate a buffer for output and\r
   copy the volume header into it.\r
 \r
-Arguments:\r
-  Fvb - The FW_VOL_BLOCK_PROTOCOL instance from which to read the volume\r
-          header\r
-  FwVolHeader - Pointer to pointer to allocated buffer in which the volume\r
-                  header is returned.\r
-\r
-Returns:\r
-  EFI_OUT_OF_RESOURCES    - No enough buffer could be allocated.\r
-  EFI_SUCCESS             - Successfully read volume header to the allocated buffer.\r
+  @param  Fvb                   The FW_VOL_BLOCK_PROTOCOL instance from which to \r
+                                read the volume header \r
+  @param  FwVolHeader           Pointer to pointer to allocated buffer in which \r
+                                the volume header is returned. \r
 \r
---*/\r
+  @retval EFI_OUT_OF_RESOURCES  No enough buffer could be allocated. \r
+  @retval EFI_SUCCESS           Successfully read volume header to the allocated \r
+                                buffer.\r
 \r
+**/\r
+EFI_STATUS\r
+GetFwVolHeader (\r
+  IN     EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL     *Fvb,\r
+  OUT    EFI_FIRMWARE_VOLUME_HEADER             **FwVolHeader\r
+  )\r
 {\r
   EFI_STATUS                  Status;\r
   EFI_FIRMWARE_VOLUME_HEADER  TempFvh;\r
@@ -119,23 +116,20 @@ Returns:
 }\r
 \r
 \r
-STATIC\r
-VOID\r
-FreeFvDeviceResource (\r
-  IN FV_DEVICE  *FvDevice\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Free FvDevice resource when error happens\r
 \r
-Arguments:\r
-  FvDevice - pointer to the FvDevice to be freed.\r
+  @param  FvDevice              pointer to the FvDevice to be freed. \r
 \r
-Returns:\r
-  None.\r
+  @return None.\r
 \r
---*/\r
+**/\r
+STATIC\r
+VOID\r
+FreeFvDeviceResource (\r
+  IN FV_DEVICE  *FvDevice\r
+  )\r
 {\r
   FFS_FILE_LIST_ENTRY         *FfsFileEntry;\r
   LIST_ENTRY                  *NextEntry;\r
@@ -174,24 +168,21 @@ Returns:
 }\r
 \r
 \r
-EFI_STATUS\r
-FvCheck (\r
-  IN OUT FV_DEVICE  *FvDevice\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Check if a FV is consistent and allocate cache\r
 \r
-Arguments:\r
-  FvDevice - pointer to the FvDevice to be checked.\r
+  @param  FvDevice              pointer to the FvDevice to be checked. \r
 \r
-Returns:\r
-  EFI_OUT_OF_RESOURCES    - No enough buffer could be allocated.\r
-  EFI_SUCCESS             - FV is consistent and cache is allocated.\r
-  EFI_VOLUME_CORRUPTED    - File system is corrupted.\r
+  @retval EFI_OUT_OF_RESOURCES  No enough buffer could be allocated. \r
+  @retval EFI_SUCCESS           FV is consistent and cache is allocated. \r
+  @retval EFI_VOLUME_CORRUPTED  File system is corrupted.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FvCheck (\r
+  IN OUT FV_DEVICE  *FvDevice\r
+  )\r
 {\r
   EFI_STATUS                            Status;\r
   EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL    *Fvb;\r
@@ -380,6 +371,17 @@ Done:
 }\r
 \r
 \r
+\r
+/**\r
+  This notification function is invoked when an instance of the\r
+  EFI_FW_VOLUME_BLOCK_PROTOCOL is produced.  It layers an instance of the\r
+  EFI_FIRMWARE_VOLUME2_PROTOCOL on the same handle.  This is the function where\r
+  the actual initialization of the EFI_FIRMWARE_VOLUME2_PROTOCOL is done.\r
+\r
+  @param  Event                 The event that occured \r
+  @param  Context               For EFI compatiblity.  Not used.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 EFIAPI\r
@@ -387,23 +389,6 @@ NotifyFwVolBlock (
   IN  EFI_EVENT Event,\r
   IN  VOID      *Context\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This notification function is invoked when an instance of the\r
-    EFI_FW_VOLUME_BLOCK_PROTOCOL is produced.  It layers an instance of the\r
-    EFI_FIRMWARE_VOLUME2_PROTOCOL on the same handle.  This is the function where\r
-    the actual initialization of the EFI_FIRMWARE_VOLUME2_PROTOCOL is done.\r
-\r
-Arguments:\r
-    Event - The event that occured\r
-    Context - For EFI compatiblity.  Not used.\r
-\r
-Returns:\r
-\r
-    None.\r
-\r
---*/\r
 {\r
   EFI_HANDLE                            Handle;\r
   EFI_STATUS                            Status;\r
@@ -515,27 +500,24 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  This routine is the driver initialization entry point.  It initializes the\r
+  libraries, and registers two notification functions.  These notification\r
+  functions are responsible for building the FV stack dynamically.\r
+\r
+  @param  ImageHandle           The image handle. \r
+  @param  SystemTable           The system table. \r
+\r
+  @retval EFI_SUCCESS           Function successfully returned.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolDriverInit (\r
   IN EFI_HANDLE                   ImageHandle,\r
   IN EFI_SYSTEM_TABLE             *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This routine is the driver initialization entry point.  It initializes the\r
-    libraries, and registers two notification functions.  These notification\r
-    functions are responsible for building the FV stack dynamically.\r
-    \r
-Arguments:\r
-    ImageHandle   - The image handle.\r
-    SystemTable   - The system table.\r
-    \r
-Returns:\r
-    EFI_SUCCESS   - Function successfully returned.\r
-\r
---*/\r
 {\r
   gEfiFwVolBlockEvent = CoreCreateProtocolNotifyEvent (\r
                           &gEfiFirmwareVolumeBlockProtocolGuid,\r
@@ -548,3 +530,4 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
index 54abc0bfd652398bc3307b4ff1b9ae0d505470e5..8b637e82ceba74c2577f3e65042b8023287322ca 100644 (file)
@@ -15,26 +15,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <DxeMain.h>\r
 \r
+\r
+/**\r
+  Retrieves attributes, insures positive polarity of attribute bits, returns\r
+  resulting attributes in output parameter.\r
+\r
+  @param  This             Calling context \r
+  @param  Attributes       output buffer which contains attributes \r
+\r
+  @retval EFI_SUCCESS      Successfully got volume attributes\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvGetVolumeAttributes (\r
   IN  CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
   OUT       EFI_FV_ATTRIBUTES             *Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Retrieves attributes, insures positive polarity of attribute bits, returns\r
-    resulting attributes in output parameter\r
-\r
-Arguments:\r
-    This        - Calling context\r
-    Attributes  - output buffer which contains attributes\r
-\r
-Returns:\r
-    EFI_SUCCESS         - Successfully got volume attributes\r
-\r
---*/\r
 {\r
   EFI_STATUS                                Status;\r
   FV_DEVICE                                 *FvDevice;\r
@@ -67,30 +64,41 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Sets current attributes for volume\r
+\r
+  @param  This             Calling context \r
+  @param  Attributes       At input, contains attributes to be set.  At output \r
+                           contains new value of FV \r
+\r
+  @retval EFI_UNSUPPORTED  Could not be set.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvSetVolumeAttributes (\r
   IN     CONST EFI_FIRMWARE_VOLUME2_PROTOCOL  *This,\r
   IN OUT       EFI_FV_ATTRIBUTES              *Attributes\r
   )\r
-/*++\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
 \r
-Routine Description:\r
-    Sets current attributes for volume\r
 \r
-Arguments:\r
-    This       - Calling context\r
-    Attributes - At input, contains attributes to be set.  At output contains\r
-      new value of FV\r
+/**\r
+  Return information of type InformationType for the requested firmware\r
+  volume.\r
 \r
-Returns:\r
-    EFI_UNSUPPORTED   - Could not be set.\r
+  @param  This             Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL. \r
+  @param  InformationType  InformationType for requested. \r
+  @param  BufferSize       On input, size of Buffer.On output, the amount of data \r
+                           returned in Buffer. \r
+  @param  Buffer           A poniter to the data buffer to return. \r
 \r
---*/\r
-{\r
-  return EFI_UNSUPPORTED;\r
-}\r
+  @retval EFI_SUCCESS      Successfully got volume Information.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvGetVolumeInfo (\r
@@ -99,27 +107,25 @@ FvGetVolumeInfo (
   IN OUT UINTN                                  *BufferSize,\r
   OUT VOID                                      *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Return information of type InformationType for the requested firmware\r
-  volume.\r
-  \r
-Arguments:\r
-    This                - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.\r
-    InformationType     - InformationType for requested.\r
-    BufferSize          - On input, size of Buffer.On output, the amount of\r
-                          data returned in Buffer.\r
-    Buffer              - A poniter to the data buffer to return.\r
-Returns:\r
-    EFI_SUCCESS         - Successfully got volume Information.\r
-\r
---*/\r
 {\r
   return EFI_UNSUPPORTED;\r
 }\r
 \r
 \r
+\r
+/**\r
+  Set information of type InformationType for the requested firmware\r
+  volume.\r
+\r
+  @param  This             Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL. \r
+  @param  InformationType  InformationType for requested. \r
+  @param  BufferSize       On input, size of Buffer.On output, the amount of data \r
+                           returned in Buffer. \r
+  @param  Buffer           A poniter to the data buffer to return. \r
+\r
+  @retval EFI_SUCCESS      Successfully set volume Information.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvSetVolumeInfo (\r
@@ -128,24 +134,9 @@ FvSetVolumeInfo (
   IN  UINTN                                     BufferSize,\r
   IN CONST  VOID                                *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Set information of type InformationType for the requested firmware\r
-  volume.\r
-\r
-Arguments:\r
-    This                - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.\r
-    InformationType     - InformationType for requested.\r
-    BufferSize          - On input, size of Buffer.On output, the amount of\r
-                          data returned in Buffer.\r
-    Buffer              - A poniter to the data buffer to return.\r
-Returns:\r
-    EFI_SUCCESS         - Successfully set volume Information.\r
-\r
---*/\r
 {\r
   return EFI_UNSUPPORTED;\r
 }\r
 \r
 \r
+\r
index 5b5b6599e561a765e69628450814ef84e21efc22..0eda2e5d3e6c96ba23069a3bf313694f14086c12 100644 (file)
@@ -36,23 +36,20 @@ Required Alignment    Alignment Value in FFS       Alignment Value in
 UINT8 mFvAttributes[] = {0, 4, 7, 9, 10, 12, 15, 16}; \r
 \r
 \r
+\r
+/**\r
+  Convert the FFS File Attributes to FV File Attributes\r
+\r
+  @param  FfsAttributes              The attributes of UINT8 type. \r
+\r
+  @return The attributes of EFI_FV_FILE_ATTRIBUTES\r
+\r
+**/\r
 STATIC\r
 EFI_FV_FILE_ATTRIBUTES\r
 FfsAttributes2FvFileAttributes (\r
   IN EFI_FFS_FILE_ATTRIBUTES FfsAttributes\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Convert the FFS File Attributes to FV File Attributes\r
-    \r
-  Arguments:\r
-    FfsAttributes   -   The attributes of UINT8 type.\r
-    \r
-  Returns:\r
-    The attributes of EFI_FV_FILE_ATTRIBUTES\r
-    \r
---*/\r
 {\r
   FfsAttributes = (EFI_FFS_FILE_ATTRIBUTES)((FfsAttributes & FFS_ATTRIB_DATA_ALIGNMENT) >> 3);\r
   ASSERT (FfsAttributes < 8);\r
@@ -61,6 +58,53 @@ FfsAttributes2FvFileAttributes (
 }\r
 \r
 \r
+\r
+/**\r
+  Given the input key, search for the next matching file in the volume.\r
+\r
+  @param  This                       Indicates the calling context. \r
+  @param  Key                        Key is a pointer to a caller allocated \r
+                                     buffer that contains implementation specific \r
+                                     data that is used to track where to begin \r
+                                     the search for the next file. The size of \r
+                                     the buffer must be at least This->KeySize \r
+                                     bytes long. To reinitialize the search and \r
+                                     begin from the beginning of the firmware \r
+                                     volume, the entire buffer must be cleared to \r
+                                     zero. Other than clearing the buffer to \r
+                                     initiate a new search, the caller must not \r
+                                     modify the data in the buffer between calls \r
+                                     to GetNextFile(). \r
+  @param  FileType                   FileType is a pointer to a caller allocated \r
+                                     EFI_FV_FILETYPE. The GetNextFile() API can \r
+                                     filter it's search for files based on the \r
+                                     value of *FileType input. A *FileType input \r
+                                     of 0 causes GetNextFile() to search for \r
+                                     files of all types.  If a file is found, the \r
+                                     file's type is returned in *FileType.  \r
+                                     *FileType is not modified if no file is \r
+                                     found. \r
+  @param  NameGuid                   NameGuid is a pointer to a caller allocated \r
+                                     EFI_GUID. If a file is found, the file's \r
+                                     name is returned in *NameGuid.  *NameGuid is \r
+                                     not modified if no file is found. \r
+  @param  Attributes                 Attributes is a pointer to a caller \r
+                                     allocated EFI_FV_FILE_ATTRIBUTES.  If a file \r
+                                     is found, the file's attributes are returned \r
+                                     in *Attributes. *Attributes is not modified \r
+                                     if no file is found. \r
+  @param  Size                       Size is a pointer to a caller allocated \r
+                                     UINTN. If a file is found, the file's size \r
+                                     is returned in *Size. *Size is not modified \r
+                                     if no file is found. \r
+\r
+  @retval EFI_SUCCESS                Successfully find the file. \r
+  @retval EFI_DEVICE_ERROR           Device error. \r
+  @retval EFI_ACCESS_DENIED          Fv could not read. \r
+  @retval EFI_NOT_FOUND              No matching file found. \r
+  @retval EFI_INVALID_PARAMETER      Invalid parameter\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvGetNextFile (\r
@@ -69,51 +113,8 @@ FvGetNextFile (
   IN OUT     EFI_FV_FILETYPE               *FileType,\r
   OUT        EFI_GUID                      *NameGuid,\r
   OUT        EFI_FV_FILE_ATTRIBUTES        *Attributes,\r
-  OUT        UINTN                          *Size\r
+  OUT        UINTN                         *Size\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input key, search for the next matching file in the volume.\r
-\r
-Arguments:\r
-    This          -   Indicates the calling context.\r
-    FileType      -   FileType is a pointer to a caller allocated\r
-                      EFI_FV_FILETYPE. The GetNextFile() API can filter it's\r
-                      search for files based on the value of *FileType input.\r
-                      A *FileType input of 0 causes GetNextFile() to search for\r
-                      files of all types.  If a file is found, the file's type\r
-                      is returned in *FileType.  *FileType is not modified if\r
-                      no file is found.\r
-    Key           -   Key is a pointer to a caller allocated buffer that\r
-                      contains implementation specific data that is used to\r
-                      track where to begin the search for the next file.\r
-                      The size of the buffer must be at least This->KeySize\r
-                      bytes long. To reinitialize the search and begin from\r
-                      the beginning of the firmware volume, the entire buffer\r
-                      must be cleared to zero. Other than clearing the buffer\r
-                      to initiate a new search, the caller must not modify the\r
-                      data in the buffer between calls to GetNextFile().\r
-    NameGuid      -   NameGuid is a pointer to a caller allocated EFI_GUID.\r
-                      If a file is found, the file's name is returned in\r
-                      *NameGuid.  *NameGuid is not modified if no file is\r
-                      found.\r
-    Attributes    -   Attributes is a pointer to a caller allocated\r
-                      EFI_FV_FILE_ATTRIBUTES.  If a file is found, the file's\r
-                      attributes are returned in *Attributes. *Attributes is\r
-                      not modified if no file is found.\r
-    Size          -   Size is a pointer to a caller allocated UINTN.\r
-                      If a file is found, the file's size is returned in *Size.\r
-                      *Size is not modified if no file is found.\r
-\r
-Returns:\r
-    EFI_SUCCESS                 - Successfully find the file.\r
-    EFI_DEVICE_ERROR            - Device error.\r
-    EFI_ACCESS_DENIED           - Fv could not read.\r
-    EFI_NOT_FOUND               - No matching file found.\r
-    EFI_INVALID_PARAMETER       - Invalid parameter\r
-\r
---*/\r
 {\r
   EFI_STATUS                                  Status;\r
   FV_DEVICE                                   *FvDevice;\r
@@ -218,6 +219,47 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Locates a file in the firmware volume and\r
+  copies it to the supplied buffer.\r
+\r
+  @param  This                       Indicates the calling context. \r
+  @param  NameGuid                   Pointer to an EFI_GUID, which is the \r
+                                     filename. \r
+  @param  Buffer                     Buffer is a pointer to pointer to a buffer \r
+                                     in which the file or section contents or are \r
+                                     returned. \r
+  @param  BufferSize                 BufferSize is a pointer to caller allocated \r
+                                     UINTN. On input *BufferSize indicates the \r
+                                     size in bytes of the memory region pointed \r
+                                     to by Buffer. On output, *BufferSize \r
+                                     contains the number of bytes required to \r
+                                     read the file. \r
+  @param  FoundType                  FoundType is a pointer to a caller allocated \r
+                                     EFI_FV_FILETYPE that on successful return \r
+                                     from Read() contains the type of file read.  \r
+                                     This output reflects the file type \r
+                                     irrespective of the value of the SectionType \r
+                                     input. \r
+  @param  FileAttributes             FileAttributes is a pointer to a caller \r
+                                     allocated EFI_FV_FILE_ATTRIBUTES.  On \r
+                                     successful return from Read(), \r
+                                     *FileAttributes contains the attributes of \r
+                                     the file read. \r
+  @param  AuthenticationStatus       AuthenticationStatus is a pointer to a \r
+                                     caller allocated UINTN in which the \r
+                                     authentication status is returned. \r
+\r
+  @retval EFI_SUCCESS                Successfully read to memory buffer. \r
+  @retval EFI_WARN_BUFFER_TOO_SMALL  Buffer too small. \r
+  @retval EFI_NOT_FOUND              Not found. \r
+  @retval EFI_DEVICE_ERROR           Device error. \r
+  @retval EFI_ACCESS_DENIED          Could not read. \r
+  @retval EFI_INVALID_PARAMETER      Invalid parameter. \r
+  @retval EFI_OUT_OF_RESOURCES       Not enough buffer to be allocated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvReadFile (\r
@@ -229,44 +271,6 @@ FvReadFile (
   OUT      EFI_FV_FILE_ATTRIBUTES        *FileAttributes,\r
   OUT      UINT32                        *AuthenticationStatus\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Locates a file in the firmware volume and\r
-    copies it to the supplied buffer.\r
-\r
-Arguments:\r
-    This              -   Indicates the calling context.\r
-    NameGuid          -   Pointer to an EFI_GUID, which is the filename.\r
-    Buffer            -   Buffer is a pointer to pointer to a buffer in\r
-                          which the file or section contents or are returned.\r
-    BufferSize        -   BufferSize is a pointer to caller allocated\r
-                          UINTN. On input *BufferSize indicates the size\r
-                          in bytes of the memory region pointed to by\r
-                          Buffer. On output, *BufferSize contains the number\r
-                          of bytes required to read the file.\r
-    FoundType         -   FoundType is a pointer to a caller allocated\r
-                          EFI_FV_FILETYPE that on successful return from Read()\r
-                          contains the type of file read.  This output reflects\r
-                          the file type irrespective of the value of the\r
-                          SectionType input.\r
-    FileAttributes    -   FileAttributes is a pointer to a caller allocated\r
-                          EFI_FV_FILE_ATTRIBUTES.  On successful return from\r
-                          Read(), *FileAttributes contains the attributes of\r
-                          the file read.\r
-    AuthenticationStatus -  AuthenticationStatus is a pointer to a caller\r
-                          allocated UINTN in which the authentication status\r
-                          is returned.\r
-Returns:\r
-    EFI_SUCCESS                   - Successfully read to memory buffer.\r
-    EFI_WARN_BUFFER_TOO_SMALL     - Buffer too small.\r
-    EFI_NOT_FOUND                 - Not found.\r
-    EFI_DEVICE_ERROR              - Device error.\r
-    EFI_ACCESS_DENIED             - Could not read.\r
-    EFI_INVALID_PARAMETER         - Invalid parameter.\r
-    EFI_OUT_OF_RESOURCES          - Not enough buffer to be allocated.\r
-\r
---*/\r
 {\r
   EFI_STATUS                        Status;\r
   FV_DEVICE                         *FvDevice;\r
@@ -361,6 +365,35 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Locates a section in a given FFS File and\r
+  copies it to the supplied buffer (not including section header).\r
+\r
+  @param  This                       Indicates the calling context. \r
+  @param  NameGuid                   Pointer to an EFI_GUID, which is the \r
+                                     filename. \r
+  @param  SectionType                Indicates the section type to return. \r
+  @param  SectionInstance            Indicates which instance of sections with a \r
+                                     type of SectionType to return. \r
+  @param  Buffer                     Buffer is a pointer to pointer to a buffer \r
+                                     in which the file or section contents or are \r
+                                     returned. \r
+  @param  BufferSize                 BufferSize is a pointer to caller allocated \r
+                                     UINTN.\r
+  @param  AuthenticationStatus       AuthenticationStatus is a pointer to a \r
+                                     caller allocated UINT32 in which the \r
+                                     authentication status is returned. \r
+\r
+  @retval EFI_SUCCESS                Successfully read the file section into \r
+                                     buffer. \r
+  @retval EFI_WARN_BUFFER_TOO_SMALL  Buffer too small. \r
+  @retval EFI_NOT_FOUND              Section not found. \r
+  @retval EFI_DEVICE_ERROR           Device error. \r
+  @retval EFI_ACCESS_DENIED          Could not read. \r
+  @retval EFI_INVALID_PARAMETER      Invalid parameter.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvReadFileSection (\r
@@ -372,34 +405,6 @@ FvReadFileSection (
   IN OUT    UINTN                          *BufferSize,\r
   OUT       UINT32                         *AuthenticationStatus\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Locates a section in a given FFS File and\r
-    copies it to the supplied buffer (not including section header).\r
-\r
-  Arguments:\r
-    This              -   Indicates the calling context.\r
-    NameGuid          -   Pointer to an EFI_GUID, which is the filename.\r
-    SectionType       -   Indicates the section type to return.\r
-    SectionInstance   -   Indicates which instance of sections with a type of\r
-                          SectionType to return.\r
-    Buffer            -   Buffer is a pointer to pointer to a buffer in which\r
-                          the file or section contents or are returned.\r
-    BufferSize        -   BufferSize is a pointer to caller allocated UINTN.\r
-    AuthenticationStatus -AuthenticationStatus is a pointer to a caller\r
-                          allocated UINT32 in which the authentication status\r
-                          is returned.\r
-\r
-  Returns:\r
-    EFI_SUCCESS                     - Successfully read the file section into buffer.\r
-    EFI_WARN_BUFFER_TOO_SMALL       - Buffer too small.\r
-    EFI_NOT_FOUND                   - Section not found.\r
-    EFI_DEVICE_ERROR                - Device error.\r
-    EFI_ACCESS_DENIED               - Could not read.\r
-    EFI_INVALID_PARAMETER           - Invalid parameter.\r
-\r
---*/\r
 {\r
   EFI_STATUS                        Status;\r
   FV_DEVICE                         *FvDevice;\r
@@ -482,3 +487,4 @@ Done:
   return Status;\r
 }\r
 \r
+\r
index a053a96d43c7c4d59a9be49e64f2e102c7205b5f..5fe01a4889aa2bd7f244f6f2a0ebddecdd50f26b 100644 (file)
@@ -16,6 +16,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <DxeMain.h>\r
 \r
 \r
+\r
+/**\r
+  Writes one or more files to the firmware volume.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  NumberOfFiles          Number of files. \r
+  @param  WritePolicy            WritePolicy indicates the level of reliability \r
+                                 for the write in the event of a power failure or \r
+                                 other system failure during the write operation. \r
+  @param  FileData               FileData is an pointer to an array of \r
+                                 EFI_FV_WRITE_DATA. Each element of array\r
+                                 FileData represents a file to be written. \r
+\r
+  @retval EFI_SUCCESS            Files successfully written to firmware volume \r
+  @retval EFI_OUT_OF_RESOURCES   Not enough buffer to be allocated. \r
+  @retval EFI_DEVICE_ERROR       Device error. \r
+  @retval EFI_WRITE_PROTECTED    Write protected. \r
+  @retval EFI_NOT_FOUND          Not found. \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter. \r
+  @retval EFI_UNSUPPORTED        This function not supported.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvWriteFile (\r
@@ -24,31 +46,8 @@ FvWriteFile (
   IN       EFI_FV_WRITE_POLICY            WritePolicy,\r
   IN       EFI_FV_WRITE_FILE_DATA         *FileData\r
   )\r
-/*++\r
-\r
-    Routine Description:\r
-      Writes one or more files to the firmware volume.\r
-\r
-    Arguments:\r
-    This            - Indicates the calling context.\r
-    NumberOfFiles   - Number of files.\r
-    WritePolicy     - WritePolicy indicates the level of reliability for\r
-                      the write in the event of a power failure or other\r
-                      system failure during the write operation.\r
-    FileData        - FileData is an pointer to an array of EFI_FV_WRITE_DATA.\r
-                      Each element of FileData[] represents a file to be written.\r
-\r
-    Returns:\r
-      EFI_SUCCESS                   - Files successfully written to firmware volume\r
-      EFI_OUT_OF_RESOURCES          - Not enough buffer to be allocated.\r
-      EFI_DEVICE_ERROR              - Device error.\r
-      EFI_WRITE_PROTECTED           - Write protected.\r
-      EFI_NOT_FOUND                 - Not found.\r
-      EFI_INVALID_PARAMETER         - Invalid parameter.\r
-      EFI_UNSUPPORTED               - This function not supported.\r
-\r
---*/\r
 { \r
   return EFI_UNSUPPORTED;\r
 }\r
 \r
+\r
index 9cd17326c91dd551c9c53d559b925b62bf41c8f7..809540b57519b7d6ea9c22f07efcafd6e4165105 100644 (file)
@@ -47,106 +47,123 @@ typedef struct {
 \r
 \r
 \r
+/**\r
+  This routine is the driver initialization entry point.  It initializes the\r
+  libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
+  produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
+\r
+  @param  ImageHandle            The image handle. \r
+  @param  SystemTable            The system table. \r
+\r
+  @retval EFI_SUCCESS            Successfully initialized firmware volume block \r
+                                 driver.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockDriverInit (\r
   IN EFI_HANDLE               ImageHandle,\r
   IN EFI_SYSTEM_TABLE         *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This routine is the driver initialization entry point.  It initializes the\r
-    libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
-    produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
-Arguments:\r
-    ImageHandle   - The image handle.\r
-    SystemTable   - The system table.\r
-Returns:\r
-    EFI_SUCCESS   - Successfully initialized firmware volume block driver.\r
---*/\r
 ;\r
 \r
 \r
+\r
+/**\r
+  Retrieves Volume attributes.  No polarity translations are done.\r
+\r
+  @param  This                   Calling context \r
+  @param  Attributes             output buffer which contains attributes \r
+\r
+  @retval EFI_SUCCESS            The firmware volume attributes were returned.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockGetAttributes (\r
   IN CONST  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *This,\r
   OUT       EFI_FVB_ATTRIBUTES                  *Attributes\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-    Retrieves Volume attributes.  No polarity translations are done.\r
 \r
-Arguments:\r
-    This - Calling context\r
-    Attributes - output buffer which contains attributes\r
 \r
-Returns:\r
-    EFI_SUCCESS - The firmware volume attributes were returned.\r
+/**\r
+  Modifies the current settings of the firmware volume according to the input parameter.\r
 \r
---*/\r
-;\r
+  @param  This                   Calling context \r
+  @param  Attributes             input buffer which contains attributes \r
 \r
+  @retval EFI_SUCCESS            The firmware volume attributes were returned. \r
+  @retval EFI_INVALID_PARAMETER  The attributes requested are in conflict with \r
+                                 the capabilities as declared in the firmware \r
+                                 volume header. \r
+  @retval EFI_UNSUPPORTED        Not supported.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockSetAttributes (\r
   IN CONST  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *This,\r
   IN CONST  EFI_FVB_ATTRIBUTES                  *Attributes\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Modifies the current settings of the firmware volume according to the input parameter.\r
 \r
-Arguments:\r
-  This - Calling context\r
-  Attributes - input buffer which contains attributes\r
 \r
-Returns:\r
-  EFI_SUCCESS -  The firmware volume attributes were returned.\r
-  EFI_INVALID_PARAMETER  -  The attributes requested are in conflict with the capabilities as\r
-                             declared in the firmware volume header.\r
-  EFI_UNSUPPORTED        -  Not supported.\r
---*/\r
-;\r
+/**\r
+  The EraseBlock() function erases one or more blocks as denoted by the\r
+  variable argument list. The entire parameter list of blocks must be verified\r
+  prior to erasing any blocks.  If a block is requested that does not exist\r
+  within the associated firmware volume (it has a larger index than the last\r
+  block of the firmware volume), the EraseBlock() function must return\r
+  EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.\r
+\r
+  @param  This                   Calling context \r
+  @param  ...                    Starting LBA followed by Number of Lba to erase. \r
+                                 a -1 to terminate the list. \r
 \r
+  @retval EFI_SUCCESS            The erase request was successfully completed. \r
+  @retval EFI_ACCESS_DENIED      The firmware volume is in the WriteDisabled \r
+                                 state. \r
+  @retval EFI_DEVICE_ERROR       The block device is not functioning correctly \r
+                                 and could not be written. The firmware device \r
+                                 may have been partially erased. \r
+  @retval EFI_INVALID_PARAMETER  One or more of the LBAs listed in the variable \r
+                                 argument list do \r
+  @retval EFI_UNSUPPORTED        Not supported.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockEraseBlock (\r
   IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL    *This,\r
   ...\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  The EraseBlock() function erases one or more blocks as denoted by the \r
-variable argument list. The entire parameter list of blocks must be verified\r
-prior to erasing any blocks.  If a block is requested that does not exist \r
-within the associated firmware volume (it has a larger index than the last \r
-block of the firmware volume), the EraseBlock() function must return\r
-EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.\r
-\r
-Arguments:\r
-  This - Calling context\r
-  ...  - Starting LBA followed by Number of Lba to erase. a -1 to terminate\r
-           the list.\r
-    \r
-Returns:\r
-  EFI_SUCCESS   -  The erase request was successfully completed.\r
-  EFI_ACCESS_DENIED   -  The firmware volume is in the WriteDisabled state.\r
-  EFI_DEVICE_ERROR    -  The block device is not functioning correctly and could not be\r
-                         written. The firmware device may have been partially erased.\r
-  EFI_INVALID_PARAMETER  -  One or more of the LBAs listed in the variable argument list do\r
-  EFI_UNSUPPORTED        -  Not supported.\r
-    \r
---*/\r
 ;\r
 \r
 \r
+\r
+/**\r
+  Read the specified number of bytes from the block to the input buffer.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  Lba                    The starting logical block index to read. \r
+  @param  Offset                 Offset into the block at which to begin reading. \r
+  @param  NumBytes               Pointer to a UINT32. At entry, *NumBytes \r
+                                 contains the total size of the buffer. At exit, \r
+                                 *NumBytes contains the total number of bytes \r
+                                 actually read. \r
+  @param  Buffer                 Pinter to a caller-allocated buffer that \r
+                                 contains the destine for the read. \r
+\r
+  @retval EFI_SUCCESS            The firmware volume was read successfully. \r
+  @retval EFI_BAD_BUFFER_SIZE    The read was attempted across an LBA boundary. \r
+  @retval EFI_ACCESS_DENIED      Access denied. \r
+  @retval EFI_DEVICE_ERROR       The block device is malfunctioning and could not \r
+                                 be read.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockReadBlock (\r
@@ -156,30 +173,34 @@ FwVolBlockReadBlock (
   IN OUT    UINTN                                *NumBytes,\r
   IN OUT    UINT8                                *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Read the specified number of bytes from the block to the input buffer.\r
-\r
-Arguments:\r
-  This          -  Indicates the calling context.\r
-  Lba           -  The starting logical block index to read.\r
-  Offset        -  Offset into the block at which to begin reading.\r
-  NumBytes      -  Pointer to a UINT32. At entry, *NumBytes contains the\r
-                   total size of the buffer. At exit, *NumBytes contains the\r
-                   total number of bytes actually read.\r
-  Buffer        -  Pinter to a caller-allocated buffer that contains the destine\r
-                   for the read.    \r
-\r
-Returns:      \r
-  EFI_SUCCESS  -  The firmware volume was read successfully.\r
-  EFI_BAD_BUFFER_SIZE -  The read was attempted across an LBA boundary.\r
-  EFI_ACCESS_DENIED  -  Access denied.\r
-  EFI_DEVICE_ERROR   -  The block device is malfunctioning and could not be read.\r
---*/\r
 ;\r
 \r
   \r
+\r
+/**\r
+  Writes the specified number of bytes from the input buffer to the block.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  Lba                    The starting logical block index to write to. \r
+  @param  Offset                 Offset into the block at which to begin writing. \r
+  @param  NumBytes               Pointer to a UINT32. At entry, *NumBytes \r
+                                 contains the total size of the buffer. At exit, \r
+                                 *NumBytes contains the total number of bytes \r
+                                 actually written. \r
+  @param  Buffer                 Pinter to a caller-allocated buffer that \r
+                                 contains the source for the write. \r
+\r
+  @retval EFI_SUCCESS            The firmware volume was written successfully. \r
+  @retval EFI_BAD_BUFFER_SIZE    The write was attempted across an LBA boundary. \r
+                                 On output, NumBytes contains the total number of \r
+                                 bytes actually written. \r
+  @retval EFI_ACCESS_DENIED      The firmware volume is in the WriteDisabled \r
+                                 state. \r
+  @retval EFI_DEVICE_ERROR       The block device is malfunctioning and could not \r
+                                 be written. \r
+  @retval EFI_UNSUPPORTED        Not supported.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockWriteBlock (\r
@@ -189,54 +210,47 @@ FwVolBlockWriteBlock (
   IN OUT UINTN                            *NumBytes,\r
   IN UINT8                                *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Writes the specified number of bytes from the input buffer to the block.\r
-\r
-Arguments:\r
-  This          -  Indicates the calling context.\r
-  Lba           -  The starting logical block index to write to.\r
-  Offset        -  Offset into the block at which to begin writing.\r
-  NumBytes      -  Pointer to a UINT32. At entry, *NumBytes contains the\r
-                   total size of the buffer. At exit, *NumBytes contains the\r
-                   total number of bytes actually written.\r
-  Buffer        -  Pinter to a caller-allocated buffer that contains the source\r
-                   for the write.    \r
-\r
-Returns:     \r
-  EFI_SUCCESS  -  The firmware volume was written successfully.\r
-  EFI_BAD_BUFFER_SIZE -  The write was attempted across an LBA boundary. On output,\r
-                         NumBytes contains the total number of bytes actually written.\r
-  EFI_ACCESS_DENIED  -  The firmware volume is in the WriteDisabled state.\r
-  EFI_DEVICE_ERROR   -  The block device is malfunctioning and could not be written.\r
-  EFI_UNSUPPORTED    -  Not supported.\r
---*/\r
 ;\r
 \r
     \r
+\r
+/**\r
+  Get Fvb's base address.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  Address                Fvb device base address. \r
+\r
+  @retval EFI_SUCCESS            Successfully got Fvb's base address. \r
+  @retval EFI_UNSUPPORTED        Not supported.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockGetPhysicalAddress (\r
   IN CONST  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL    *This,\r
   OUT       EFI_PHYSICAL_ADDRESS                  *Address\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Get Fvb's base address.\r
 \r
-Arguments:\r
-  This          -  Indicates the calling context.\r
-  Address       -  Fvb device base address.\r
 \r
-Returns:     \r
-  EFI_SUCCESS  -  Successfully got Fvb's base address.\r
-  EFI_UNSUPPORTED -  Not supported.\r
---*/\r
-;\r
+/**\r
+  Retrieves the size in bytes of a specific block within a firmware volume.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  Lba                    Indicates the block for which to return the \r
+                                 size. \r
+  @param  BlockSize              Pointer to a caller-allocated UINTN in which the \r
+                                 size of the block is returned. \r
+  @param  NumberOfBlocks         Pointer to a caller-allocated UINTN in which the \r
+                                 number of consecutive blocks starting with Lba \r
+                                 is returned. All blocks in this range have a \r
+                                 size of BlockSize. \r
 \r
+  @retval EFI_SUCCESS            The firmware volume base address is returned. \r
+  @retval EFI_INVALID_PARAMETER  The requested LBA is out of range.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockGetBlockSize (\r
@@ -245,71 +259,52 @@ FwVolBlockGetBlockSize (
   OUT       UINTN                               *BlockSize,\r
   OUT       UINTN                               *NumberOfBlocks\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Retrieves the size in bytes of a specific block within a firmware volume.\r
+/**\r
+  This routine is the driver initialization entry point.  It initializes the\r
+  libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
+  produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
 \r
-Arguments:\r
-  This            -  Indicates the calling context.\r
-  Lba             -  Indicates the block for which to return the size.\r
-  BlockSize       -  Pointer to a caller-allocated UINTN in which the size of the\r
-                     block is returned.\r
-  NumberOfBlocks  -  Pointer to a caller-allocated UINTN in which the number of\r
-                     consecutive blocks starting with Lba is returned. All blocks\r
-                     in this range have a size of BlockSize.   \r
-Returns:\r
-  EFI_SUCCESS  -  The firmware volume base address is returned.\r
-  EFI_INVALID_PARAMETER  -  The requested LBA is out of range.\r
---*/\r
-;\r
+  @param  ImageHandle            The image handle. \r
+  @param  SystemTable            The system table. \r
+\r
+  @retval EFI_SUCCESS            Successfully initialized firmware volume block \r
+                                 driver.\r
+\r
+**/\r
 EFI_STATUS\r
 FwVolBlockDriverInit (\r
   IN EFI_HANDLE               ImageHandle,\r
   IN EFI_SYSTEM_TABLE         *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This routine is the driver initialization entry point.  It initializes the\r
-    libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
-    produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
-Arguments:\r
-    ImageHandle   - The image handle.\r
-    SystemTable   - The system table.\r
-Returns:\r
-    Status code\r
-\r
---*/\r
 ;\r
 \r
+\r
+/**\r
+  This routine produces a firmware volume block protocol on a given\r
+  buffer.\r
+\r
+  @param  BaseAddress            base address of the firmware volume image \r
+  @param  Length                 length of the firmware volume image \r
+  @param  ParentHandle           handle of parent firmware volume, if this image \r
+                                 came from an FV image file in another firmware \r
+                                 volume (ala capsules) \r
+  @param  FvProtocol             Firmware volume block protocol produced. \r
+\r
+  @retval EFI_VOLUME_CORRUPTED   Volume corrupted. \r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to be allocated. \r
+  @retval EFI_SUCCESS            Successfully produced a FVB protocol on given \r
+                                 buffer.\r
+\r
+**/\r
 EFI_STATUS\r
 ProduceFVBProtocolOnBuffer (\r
   IN EFI_PHYSICAL_ADDRESS   BaseAddress,\r
   IN UINT64                 Length,\r
   IN EFI_HANDLE             ParentHandle,\r
-  OUT EFI_HANDLE            *FvProtocolHandle  OPTIONAL\r
+  OUT EFI_HANDLE            *FvProtocol  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This routine produces a firmware volume block protocol on a given\r
-    buffer. \r
-\r
-Arguments:\r
-    BaseAddress     - base address of the firmware volume image\r
-    Length          - length of the firmware volume image\r
-    ParentHandle    - handle of parent firmware volume, if this\r
-                      image came from an FV image file in another\r
-                      firmware volume (ala capsules)\r
-    FvProtocolHandle  - Firmware volume block protocol produced.\r
-    \r
-Returns:\r
-    EFI_VOLUME_CORRUPTED    - Volume corrupted.\r
-    EFI_OUT_OF_RESOURCES    - No enough buffer to be allocated.\r
-    EFI_SUCCESS             - Successfully produced a FVB protocol on given buffer.\r
-                     \r
---*/\r
 ;\r
 \r
 #endif\r
index d50716759448beb0cc4cae170943c6002324fa21..62795b2f355cb5697174b4bc096006da08e168ba 100644 (file)
@@ -1,11 +1,11 @@
-/**@file\r
-  Firmware Volume Block protocol..  Consumes FV hobs and creates\r
+/** @file\r
+  Firmware Volume Block protocol.  Consumes FV hobs and creates\r
   appropriate block protocols.\r
 \r
   Also consumes NT_NON_MM_FV envinronment variable and produces appropriate\r
   block protocols fro them also... (this is TBD)\r
   \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -58,25 +58,22 @@ EFI_FW_VOL_BLOCK_DEVICE  mFwVolBlock = {
 \r
 \r
 \r
+\r
+/**\r
+  Retrieves Volume attributes.  No polarity translations are done.\r
+\r
+  @param  This                   Calling context \r
+  @param  Attributes             output buffer which contains attributes \r
+\r
+  @retval EFI_SUCCESS            The firmware volume attributes were returned.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockGetAttributes (\r
   IN CONST  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *This,\r
   OUT       EFI_FVB_ATTRIBUTES                  *Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Retrieves Volume attributes.  No polarity translations are done.\r
-\r
-Arguments:\r
-    This - Calling context\r
-    Attributes - output buffer which contains attributes\r
-\r
-Returns:\r
-    EFI_SUCCESS - The firmware volume attributes were returned.\r
-\r
---*/\r
 {\r
   EFI_FW_VOL_BLOCK_DEVICE               *FvbDevice;\r
   \r
@@ -91,67 +88,87 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Modifies the current settings of the firmware volume according to the input parameter.\r
+\r
+  @param  This                   Calling context \r
+  @param  Attributes             input buffer which contains attributes \r
+\r
+  @retval EFI_SUCCESS            The firmware volume attributes were returned. \r
+  @retval EFI_INVALID_PARAMETER  The attributes requested are in conflict with \r
+                                 the capabilities as declared in the firmware \r
+                                 volume header. \r
+  @retval EFI_UNSUPPORTED        Not supported.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockSetAttributes (\r
   IN CONST  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *This,\r
   IN CONST  EFI_FVB_ATTRIBUTES                  *Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Modifies the current settings of the firmware volume according to the input parameter.\r
-\r
-Arguments:\r
-  This - Calling context\r
-  Attributes - input buffer which contains attributes\r
-\r
-Returns:\r
-  EFI_SUCCESS -  The firmware volume attributes were returned.\r
-  EFI_INVALID_PARAMETER  -  The attributes requested are in conflict with the capabilities as\r
-                             declared in the firmware volume header.\r
-  EFI_UNSUPPORTED        -  Not supported.\r
---*/\r
 {\r
   return EFI_UNSUPPORTED;\r
 }\r
 \r
 \r
+\r
+/**\r
+  The EraseBlock() function erases one or more blocks as denoted by the\r
+  variable argument list. The entire parameter list of blocks must be verified\r
+  prior to erasing any blocks.  If a block is requested that does not exist\r
+  within the associated firmware volume (it has a larger index than the last\r
+  block of the firmware volume), the EraseBlock() function must return\r
+  EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.\r
+\r
+  @param  This                   Calling context \r
+  @param  ...                    Starting LBA followed by Number of Lba to erase. \r
+                                 a -1 to terminate the list. \r
+\r
+  @retval EFI_SUCCESS            The erase request was successfully completed. \r
+  @retval EFI_ACCESS_DENIED      The firmware volume is in the WriteDisabled \r
+                                 state. \r
+  @retval EFI_DEVICE_ERROR       The block device is not functioning correctly \r
+                                 and could not be written. The firmware device \r
+                                 may have been partially erased. \r
+  @retval EFI_INVALID_PARAMETER  One or more of the LBAs listed in the variable \r
+                                 argument list do \r
+  @retval EFI_UNSUPPORTED        Not supported.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockEraseBlock (\r
   IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL    *This,\r
   ...\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  The EraseBlock() function erases one or more blocks as denoted by the \r
-variable argument list. The entire parameter list of blocks must be verified\r
-prior to erasing any blocks.  If a block is requested that does not exist \r
-within the associated firmware volume (it has a larger index than the last \r
-block of the firmware volume), the EraseBlock() function must return\r
-EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.\r
-\r
-Arguments:\r
-  This - Calling context\r
-  ...  - Starting LBA followed by Number of Lba to erase. a -1 to terminate\r
-           the list.\r
-    \r
-Returns:\r
-  EFI_SUCCESS   -  The erase request was successfully completed.\r
-  EFI_ACCESS_DENIED   -  The firmware volume is in the WriteDisabled state.\r
-  EFI_DEVICE_ERROR    -  The block device is not functioning correctly and could not be\r
-                         written. The firmware device may have been partially erased.\r
-  EFI_INVALID_PARAMETER  -  One or more of the LBAs listed in the variable argument list do\r
-  EFI_UNSUPPORTED        -  Not supported.\r
-    \r
---*/\r
 {\r
   return EFI_UNSUPPORTED;\r
 }\r
 \r
 \r
+\r
+/**\r
+  Read the specified number of bytes from the block to the input buffer.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  Lba                    The starting logical block index to read. \r
+  @param  Offset                 Offset into the block at which to begin reading. \r
+  @param  NumBytes               Pointer to a UINT32. At entry, *NumBytes \r
+                                 contains the total size of the buffer. At exit, \r
+                                 *NumBytes contains the total number of bytes \r
+                                 actually read. \r
+  @param  Buffer                 Pinter to a caller-allocated buffer that \r
+                                 contains the destine for the read. \r
+\r
+  @retval EFI_SUCCESS            The firmware volume was read successfully. \r
+  @retval EFI_BAD_BUFFER_SIZE    The read was attempted across an LBA boundary. \r
+  @retval EFI_ACCESS_DENIED      Access denied. \r
+  @retval EFI_DEVICE_ERROR       The block device is malfunctioning and could not \r
+                                 be read.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockReadBlock (\r
@@ -161,27 +178,6 @@ FwVolBlockReadBlock (
   IN OUT    UINTN                                *NumBytes,\r
   IN OUT    UINT8                                *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Read the specified number of bytes from the block to the input buffer.\r
-\r
-Arguments:\r
-  This          -  Indicates the calling context.\r
-  Lba           -  The starting logical block index to read.\r
-  Offset        -  Offset into the block at which to begin reading.\r
-  NumBytes      -  Pointer to a UINT32. At entry, *NumBytes contains the\r
-                   total size of the buffer. At exit, *NumBytes contains the\r
-                   total number of bytes actually read.\r
-  Buffer        -  Pinter to a caller-allocated buffer that contains the destine\r
-                   for the read.    \r
-\r
-Returns:      \r
-  EFI_SUCCESS  -  The firmware volume was read successfully.\r
-  EFI_BAD_BUFFER_SIZE -  The read was attempted across an LBA boundary.\r
-  EFI_ACCESS_DENIED  -  Access denied.\r
-  EFI_DEVICE_ERROR   -  The block device is malfunctioning and could not be read.\r
---*/\r
 {\r
   EFI_FW_VOL_BLOCK_DEVICE               *FvbDevice;\r
   EFI_FIRMWARE_VOLUME_HEADER            *FwVolHeader;\r
@@ -242,6 +238,31 @@ Returns:
 }\r
   \r
 \r
+\r
+/**\r
+  Writes the specified number of bytes from the input buffer to the block.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  Lba                    The starting logical block index to write to. \r
+  @param  Offset                 Offset into the block at which to begin writing. \r
+  @param  NumBytes               Pointer to a UINT32. At entry, *NumBytes \r
+                                 contains the total size of the buffer. At exit, \r
+                                 *NumBytes contains the total number of bytes \r
+                                 actually written. \r
+  @param  Buffer                 Pinter to a caller-allocated buffer that \r
+                                 contains the source for the write. \r
+\r
+  @retval EFI_SUCCESS            The firmware volume was written successfully. \r
+  @retval EFI_BAD_BUFFER_SIZE    The write was attempted across an LBA boundary. \r
+                                 On output, NumBytes contains the total number of \r
+                                 bytes actually written. \r
+  @retval EFI_ACCESS_DENIED      The firmware volume is in the WriteDisabled \r
+                                 state. \r
+  @retval EFI_DEVICE_ERROR       The block device is malfunctioning and could not \r
+                                 be written. \r
+  @retval EFI_UNSUPPORTED        Not supported.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockWriteBlock (\r
@@ -251,53 +272,28 @@ FwVolBlockWriteBlock (
   IN OUT UINTN                                *NumBytes,\r
   IN     UINT8                                *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Writes the specified number of bytes from the input buffer to the block.\r
-\r
-Arguments:\r
-  This          -  Indicates the calling context.\r
-  Lba           -  The starting logical block index to write to.\r
-  Offset        -  Offset into the block at which to begin writing.\r
-  NumBytes      -  Pointer to a UINT32. At entry, *NumBytes contains the\r
-                   total size of the buffer. At exit, *NumBytes contains the\r
-                   total number of bytes actually written.\r
-  Buffer        -  Pinter to a caller-allocated buffer that contains the source\r
-                   for the write.    \r
-\r
-Returns:     \r
-  EFI_SUCCESS  -  The firmware volume was written successfully.\r
-  EFI_BAD_BUFFER_SIZE -  The write was attempted across an LBA boundary. On output,\r
-                         NumBytes contains the total number of bytes actually written.\r
-  EFI_ACCESS_DENIED  -  The firmware volume is in the WriteDisabled state.\r
-  EFI_DEVICE_ERROR   -  The block device is malfunctioning and could not be written.\r
-  EFI_UNSUPPORTED    -  Not supported.\r
---*/\r
 {\r
   return EFI_UNSUPPORTED;\r
 }\r
  \r
 \r
+\r
+/**\r
+  Get Fvb's base address.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  Address                Fvb device base address. \r
+\r
+  @retval EFI_SUCCESS            Successfully got Fvb's base address. \r
+  @retval EFI_UNSUPPORTED        Not supported.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockGetPhysicalAddress (\r
   IN CONST  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *This,\r
   OUT       EFI_PHYSICAL_ADDRESS                *Address\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Get Fvb's base address.\r
-\r
-Arguments:\r
-  This          -  Indicates the calling context.\r
-  Address       -  Fvb device base address.\r
-\r
-Returns:     \r
-  EFI_SUCCESS  -  Successfully got Fvb's base address.\r
-  EFI_UNSUPPORTED -  Not supported.\r
---*/\r
 {\r
   EFI_FW_VOL_BLOCK_DEVICE               *FvbDevice;\r
   \r
@@ -312,6 +308,24 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Retrieves the size in bytes of a specific block within a firmware volume.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  Lba                    Indicates the block for which to return the \r
+                                 size. \r
+  @param  BlockSize              Pointer to a caller-allocated UINTN in which the \r
+                                 size of the block is returned. \r
+  @param  NumberOfBlocks         Pointer to a caller-allocated UINTN in which the \r
+                                 number of consecutive blocks starting with Lba \r
+                                 is returned. All blocks in this range have a \r
+                                 size of BlockSize. \r
+\r
+  @retval EFI_SUCCESS            The firmware volume base address is returned. \r
+  @retval EFI_INVALID_PARAMETER  The requested LBA is out of range.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockGetBlockSize (\r
@@ -320,23 +334,6 @@ FwVolBlockGetBlockSize (
   IN OUT    UINTN                               *BlockSize,\r
   IN OUT    UINTN                               *NumberOfBlocks\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieves the size in bytes of a specific block within a firmware volume.\r
-\r
-Arguments:\r
-  This            -  Indicates the calling context.\r
-  Lba             -  Indicates the block for which to return the size.\r
-  BlockSize       -  Pointer to a caller-allocated UINTN in which the size of the\r
-                     block is returned.\r
-  NumberOfBlocks  -  Pointer to a caller-allocated UINTN in which the number of\r
-                     consecutive blocks starting with Lba is returned. All blocks\r
-                     in this range have a size of BlockSize.   \r
-Returns:\r
-  EFI_SUCCESS  -  The firmware volume base address is returned.\r
-  EFI_INVALID_PARAMETER  -  The requested LBA is out of range.\r
---*/\r
 {\r
   UINTN                                 TotalBlocks;\r
   EFI_FW_VOL_BLOCK_DEVICE               *FvbDevice;\r
@@ -379,6 +376,24 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  This routine produces a firmware volume block protocol on a given\r
+  buffer.\r
+\r
+  @param  BaseAddress            base address of the firmware volume image \r
+  @param  Length                 length of the firmware volume image \r
+  @param  ParentHandle           handle of parent firmware volume, if this image \r
+                                 came from an FV image file in another firmware \r
+                                 volume (ala capsules) \r
+  @param  FvProtocol             Firmware volume block protocol produced. \r
+\r
+  @retval EFI_VOLUME_CORRUPTED   Volume corrupted. \r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to be allocated. \r
+  @retval EFI_SUCCESS            Successfully produced a FVB protocol on given \r
+                                 buffer.\r
+\r
+**/\r
 EFI_STATUS\r
 ProduceFVBProtocolOnBuffer (\r
   IN EFI_PHYSICAL_ADDRESS   BaseAddress,\r
@@ -386,26 +401,6 @@ ProduceFVBProtocolOnBuffer (
   IN EFI_HANDLE             ParentHandle,\r
   OUT EFI_HANDLE            *FvProtocol  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This routine produces a firmware volume block protocol on a given\r
-    buffer. \r
-\r
-Arguments:\r
-    BaseAddress     - base address of the firmware volume image\r
-    Length          - length of the firmware volume image\r
-    ParentHandle    - handle of parent firmware volume, if this\r
-                      image came from an FV image file in another\r
-                      firmware volume (ala capsules)\r
-    FvProtocol      - Firmware volume block protocol produced.\r
-    \r
-Returns:\r
-    EFI_VOLUME_CORRUPTED    - Volume corrupted.\r
-    EFI_OUT_OF_RESOURCES    - No enough buffer to be allocated.\r
-    EFI_SUCCESS             - Successfully produced a FVB protocol on given buffer.\r
-                     \r
---*/\r
 {\r
   EFI_STATUS                    Status;\r
   EFI_FW_VOL_BLOCK_DEVICE       *FvbDev;\r
@@ -511,24 +506,25 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  This routine is the driver initialization entry point.  It initializes the\r
+  libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
+  produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
+\r
+  @param  ImageHandle            The image handle. \r
+  @param  SystemTable            The system table. \r
+\r
+  @retval EFI_SUCCESS            Successfully initialized firmware volume block \r
+                                 driver.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FwVolBlockDriverInit (\r
   IN EFI_HANDLE                 ImageHandle,\r
   IN EFI_SYSTEM_TABLE           *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This routine is the driver initialization entry point.  It initializes the\r
-    libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
-    produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
-Arguments:\r
-    ImageHandle   - The image handle.\r
-    SystemTable   - The system table.\r
-Returns:\r
-    EFI_SUCCESS   - Successfully initialized firmware volume block driver.\r
---*/\r
 {\r
   EFI_PEI_HOB_POINTERS          FvHob;\r
   //\r
@@ -546,33 +542,30 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  This DXE service routine is used to process a firmware volume. In\r
+  particular, it can be called by BDS to process a single firmware\r
+  volume found in a capsule.\r
+\r
+  @param  FvHeader               pointer to a firmware volume header \r
+  @param  Size                   the size of the buffer pointed to by FvHeader \r
+  @param  FVProtocolHandle       the handle on which a firmware volume protocol \r
+                                 was produced for the firmware volume passed in. \r
+\r
+  @retval EFI_OUT_OF_RESOURCES   if an FVB could not be produced due to lack of  \r
+                                 system resources \r
+  @retval EFI_VOLUME_CORRUPTED   if the volume was corrupted \r
+  @retval EFI_SUCCESS            a firmware volume protocol was produced for the \r
+                                 firmware volume\r
+\r
+**/\r
 EFI_STATUS\r
 CoreProcessFirmwareVolume (\r
   IN VOID                             *FvHeader,\r
   IN UINTN                            Size, \r
   OUT EFI_HANDLE                      *FVProtocolHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    This DXE service routine is used to process a firmware volume. In\r
-    particular, it can be called by BDS to process a single firmware\r
-    volume found in a capsule. \r
-\r
-Arguments:\r
-    FvHeader              - pointer to a firmware volume header\r
-    Size                  - the size of the buffer pointed to by FvHeader\r
-    FVProtocolHandle      - the handle on which a firmware volume protocol\r
-                            was produced for the firmware volume passed in.\r
-\r
-Returns:\r
-    EFI_OUT_OF_RESOURCES  - if an FVB could not be produced due to lack of \r
-                            system resources\r
-    EFI_VOLUME_CORRUPTED  - if the volume was corrupted\r
-    EFI_SUCCESS           - a firmware volume protocol was produced for the\r
-                            firmware volume\r
-\r
---*/\r
 {\r
   VOID        *Ptr;\r
   EFI_STATUS  Status;\r
@@ -604,3 +597,4 @@ Returns:
 }\r
 \r
 \r
+\r
index 6469670d0496afd0fcd89f8ad2b8691ee1ed92cd..d89043e6b5ba6668e6ef6e28d135c0bef5e62e48 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
 \r
   Firmware File System protocol. Layers on top of Firmware\r
   Block protocol to produce a file abstraction of FV based files.\r
@@ -14,8 +14,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef __FWVOL_H\r
-#define __FWVOL_H\r
+#ifndef __FW_VOL_DRIVER_H_\r
+#define __FW_VOL_DRIVER_H_\r
 \r
 \r
 #define FV2_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('_', 'F', 'V', '2')\r
@@ -48,50 +48,90 @@ typedef struct {
 \r
 #define FV_DEVICE_FROM_THIS(a) CR(a, FV_DEVICE, Fv, FV2_DEVICE_SIGNATURE)\r
 \r
+/**\r
+  Retrieves attributes, insures positive polarity of attribute bits, returns\r
+  resulting attributes in output parameter.\r
 \r
+  @param  This             Calling context \r
+  @param  Attributes       output buffer which contains attributes \r
+\r
+  @retval EFI_SUCCESS      Successfully got volume attributes\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvGetVolumeAttributes (\r
   IN    CONST EFI_FIRMWARE_VOLUME2_PROTOCOL  *This,\r
   OUT         EFI_FV_ATTRIBUTES              *Attributes\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-    Retrieves attributes, insures positive polarity of attribute bits, returns\r
-    resulting attributes in output parameter\r
 \r
-Arguments:\r
-    This        - Calling context\r
-    Attributes  - output buffer which contains attributes\r
+/**\r
+  Sets current attributes for volume\r
 \r
-Returns:\r
-    EFI_SUCCESS         - Successfully got volume attributes\r
+  @param  This             Calling context \r
+  @param  Attributes       At input, contains attributes to be set.  At output \r
+                           contains new value of FV \r
 \r
---*/\r
-;\r
+  @retval EFI_UNSUPPORTED  Could not be set.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvSetVolumeAttributes (\r
   IN CONST  EFI_FIRMWARE_VOLUME2_PROTOCOL  *This,\r
   IN OUT    EFI_FV_ATTRIBUTES              *Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Sets current attributes for volume\r
+;\r
 \r
-Arguments:\r
-    This       - Calling context\r
-    Attributes - At input, contains attributes to be set.  At output contains\r
-      new value of FV\r
 \r
-Returns:\r
-    EFI_UNSUPPORTED   - Could not be set.\r
---*/\r
-;\r
+/**\r
+  Given the input key, search for the next matching file in the volume.\r
+\r
+  @param  This                       Indicates the calling context. \r
+  @param  Key                        Key is a pointer to a caller allocated \r
+                                     buffer that contains implementation specific \r
+                                     data that is used to track where to begin \r
+                                     the search for the next file. The size of \r
+                                     the buffer must be at least This->KeySize \r
+                                     bytes long. To reinitialize the search and \r
+                                     begin from the beginning of the firmware \r
+                                     volume, the entire buffer must be cleared to \r
+                                     zero. Other than clearing the buffer to \r
+                                     initiate a new search, the caller must not \r
+                                     modify the data in the buffer between calls \r
+                                     to GetNextFile(). \r
+  @param  FileType                   FileType is a pointer to a caller allocated \r
+                                     EFI_FV_FILETYPE. The GetNextFile() API can \r
+                                     filter it's search for files based on the \r
+                                     value of *FileType input. A *FileType input \r
+                                     of 0 causes GetNextFile() to search for \r
+                                     files of all types.  If a file is found, the \r
+                                     file's type is returned in *FileType.  \r
+                                     *FileType is not modified if no file is \r
+                                     found. \r
+  @param  NameGuid                   NameGuid is a pointer to a caller allocated \r
+                                     EFI_GUID. If a file is found, the file's \r
+                                     name is returned in *NameGuid.  *NameGuid is \r
+                                     not modified if no file is found. \r
+  @param  Attributes                 Attributes is a pointer to a caller \r
+                                     allocated EFI_FV_FILE_ATTRIBUTES.  If a file \r
+                                     is found, the file's attributes are returned \r
+                                     in *Attributes. *Attributes is not modified \r
+                                     if no file is found. \r
+  @param  Size                       Size is a pointer to a caller allocated \r
+                                     UINTN. If a file is found, the file's size \r
+                                     is returned in *Size. *Size is not modified \r
+                                     if no file is found. \r
+\r
+  @retval EFI_SUCCESS                Successfully find the file. \r
+  @retval EFI_DEVICE_ERROR           Device error. \r
+  @retval EFI_ACCESS_DENIED          Fv could not read. \r
+  @retval EFI_NOT_FOUND              No matching file found. \r
+  @retval EFI_INVALID_PARAMETER      Invalid parameter\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvGetNextFile (\r
@@ -102,52 +142,50 @@ FvGetNextFile (
   OUT       EFI_FV_FILE_ATTRIBUTES         *Attributes,\r
   OUT       UINTN                          *Size\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Given the input key, search for the next matching file in the volume.\r
-\r
-Arguments:\r
-    This          -   Indicates the calling context.\r
-    FileType      -   FileType is a pointer to a caller allocated\r
-                      EFI_FV_FILETYPE. The GetNextFile() API can filter it's\r
-                      search for files based on the value of *FileType input.\r
-                      A *FileType input of 0 causes GetNextFile() to search for\r
-                      files of all types.  If a file is found, the file's type\r
-                      is returned in *FileType.  *FileType is not modified if\r
-                      no file is found.\r
-    Key           -   Key is a pointer to a caller allocated buffer that\r
-                      contains implementation specific data that is used to\r
-                      track where to begin the search for the next file.\r
-                      The size of the buffer must be at least This->KeySize\r
-                      bytes long. To reinitialize the search and begin from\r
-                      the beginning of the firmware volume, the entire buffer\r
-                      must be cleared to zero. Other than clearing the buffer\r
-                      to initiate a new search, the caller must not modify the\r
-                      data in the buffer between calls to GetNextFile().\r
-    NameGuid      -   NameGuid is a pointer to a caller allocated EFI_GUID.\r
-                      If a file is found, the file's name is returned in\r
-                      *NameGuid.  *NameGuid is not modified if no file is\r
-                      found.\r
-    Attributes    -   Attributes is a pointer to a caller allocated\r
-                      EFI_FV_FILE_ATTRIBUTES.  If a file is found, the file's\r
-                      attributes are returned in *Attributes. *Attributes is\r
-                      not modified if no file is found.\r
-    Size          -   Size is a pointer to a caller allocated UINTN.\r
-                      If a file is found, the file's size is returned in *Size.\r
-                      *Size is not modified if no file is found.\r
-\r
-Returns:    \r
-    EFI_SUCCESS                 - Successfully find the file.\r
-    EFI_DEVICE_ERROR            - Device error.\r
-    EFI_ACCESS_DENIED           - Fv could not read.\r
-    EFI_NOT_FOUND               - No matching file found.\r
-    EFI_INVALID_PARAMETER       - Invalid parameter\r
-\r
---*/\r
 ;\r
 \r
 \r
+\r
+/**\r
+  Locates a file in the firmware volume and\r
+  copies it to the supplied buffer.\r
+\r
+  @param  This                       Indicates the calling context. \r
+  @param  NameGuid                   Pointer to an EFI_GUID, which is the \r
+                                     filename. \r
+  @param  Buffer                     Buffer is a pointer to pointer to a buffer \r
+                                     in which the file or section contents or are \r
+                                     returned. \r
+  @param  BufferSize                 BufferSize is a pointer to caller allocated \r
+                                     UINTN. On input *BufferSize indicates the \r
+                                     size in bytes of the memory region pointed \r
+                                     to by Buffer. On output, *BufferSize \r
+                                     contains the number of bytes required to \r
+                                     read the file. \r
+  @param  FoundType                  FoundType is a pointer to a caller allocated \r
+                                     EFI_FV_FILETYPE that on successful return \r
+                                     from Read() contains the type of file read.  \r
+                                     This output reflects the file type \r
+                                     irrespective of the value of the SectionType \r
+                                     input. \r
+  @param  FileAttributes             FileAttributes is a pointer to a caller \r
+                                     allocated EFI_FV_FILE_ATTRIBUTES.  On \r
+                                     successful return from Read(), \r
+                                     *FileAttributes contains the attributes of \r
+                                     the file read. \r
+  @param  AuthenticationStatus       AuthenticationStatus is a pointer to a \r
+                                     caller allocated UINTN in which the \r
+                                     authentication status is returned. \r
+\r
+  @retval EFI_SUCCESS                Successfully read to memory buffer. \r
+  @retval EFI_WARN_BUFFER_TOO_SMALL  Buffer too small. \r
+  @retval EFI_NOT_FOUND              Not found. \r
+  @retval EFI_DEVICE_ERROR           Device error. \r
+  @retval EFI_ACCESS_DENIED          Could not read. \r
+  @retval EFI_INVALID_PARAMETER      Invalid parameter. \r
+  @retval EFI_OUT_OF_RESOURCES       Not enough buffer to be allocated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvReadFile (\r
@@ -159,46 +197,37 @@ FvReadFile (
   OUT       EFI_FV_FILE_ATTRIBUTES         *FileAttributes,\r
   OUT       UINT32                         *AuthenticationStatus\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Locates a file in the firmware volume and\r
-    copies it to the supplied buffer.\r
-\r
-Arguments:\r
-    This              -   Indicates the calling context.\r
-    NameGuid          -   Pointer to an EFI_GUID, which is the filename.\r
-    Buffer            -   Buffer is a pointer to pointer to a buffer in\r
-                          which the file or section contents or are returned.\r
-    BufferSize        -   BufferSize is a pointer to caller allocated\r
-                          UINTN. On input *BufferSize indicates the size\r
-                          in bytes of the memory region pointed to by\r
-                          Buffer. On output, *BufferSize contains the number\r
-                          of bytes required to read the file.\r
-    FoundType         -   FoundType is a pointer to a caller allocated\r
-                          EFI_FV_FILETYPE that on successful return from Read()\r
-                          contains the type of file read.  This output reflects\r
-                          the file type irrespective of the value of the\r
-                          SectionType input.\r
-    FileAttributes    -   FileAttributes is a pointer to a caller allocated\r
-                          EFI_FV_FILE_ATTRIBUTES.  On successful return from\r
-                          Read(), *FileAttributes contains the attributes of\r
-                          the file read.\r
-    AuthenticationStatus -  AuthenticationStatus is a pointer to a caller\r
-                          allocated UINTN in which the authentication status\r
-                          is returned.\r
-Returns:\r
-    EFI_SUCCESS                   - Successfully read to memory buffer.\r
-    EFI_WARN_BUFFER_TOO_SMALL     - Buffer too small.\r
-    EFI_NOT_FOUND                 - Not found.\r
-    EFI_DEVICE_ERROR              - Device error.\r
-    EFI_ACCESS_DENIED             - Could not read.\r
-    EFI_INVALID_PARAMETER         - Invalid parameter.\r
-    EFI_OUT_OF_RESOURCES          - Not enough buffer to be allocated.\r
-\r
---*/\r
 ;\r
 \r
+\r
+/**\r
+  Locates a section in a given FFS File and\r
+  copies it to the supplied buffer (not including section header).\r
+\r
+  @param  This                       Indicates the calling context. \r
+  @param  NameGuid                   Pointer to an EFI_GUID, which is the \r
+                                     filename. \r
+  @param  SectionType                Indicates the section type to return. \r
+  @param  SectionInstance            Indicates which instance of sections with a \r
+                                     type of SectionType to return. \r
+  @param  Buffer                     Buffer is a pointer to pointer to a buffer \r
+                                     in which the file or section contents or are \r
+                                     returned. \r
+  @param  BufferSize                 BufferSize is a pointer to caller allocated \r
+                                     UINTN.\r
+  @param  AuthenticationStatus       AuthenticationStatus is a pointer to a \r
+                                     caller allocated UINT32 in which the \r
+                                     authentication status is returned. \r
+\r
+  @retval EFI_SUCCESS                Successfully read the file section into \r
+                                     buffer. \r
+  @retval EFI_WARN_BUFFER_TOO_SMALL  Buffer too small. \r
+  @retval EFI_NOT_FOUND              Section not found. \r
+  @retval EFI_DEVICE_ERROR           Device error. \r
+  @retval EFI_ACCESS_DENIED          Could not read. \r
+  @retval EFI_INVALID_PARAMETER      Invalid parameter.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvReadFileSection (\r
@@ -210,36 +239,30 @@ FvReadFileSection (
   IN OUT    UINTN                          *BufferSize,\r
   OUT       UINT32                         *AuthenticationStatus\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Locates a section in a given FFS File and\r
-    copies it to the supplied buffer (not including section header).\r
-\r
-  Arguments:\r
-    This              -   Indicates the calling context.\r
-    NameGuid          -   Pointer to an EFI_GUID, which is the filename.\r
-    SectionType       -   Indicates the section type to return.\r
-    SectionInstance   -   Indicates which instance of sections with a type of\r
-                          SectionType to return.\r
-    Buffer            -   Buffer is a pointer to pointer to a buffer in which\r
-                          the file or section contents or are returned.\r
-    BufferSize        -   BufferSize is a pointer to caller allocated UINTN.\r
-    AuthenticationStatus -AuthenticationStatus is a pointer to a caller\r
-                          allocated UINT32 in which the authentication status\r
-                          is returned.\r
-\r
-  Returns:\r
-    EFI_SUCCESS                     - Successfully read the file section into buffer.\r
-    EFI_WARN_BUFFER_TOO_SMALL       - Buffer too small.\r
-    EFI_NOT_FOUND                   - Section not found.\r
-    EFI_DEVICE_ERROR                - Device error.\r
-    EFI_ACCESS_DENIED               - Could not read.\r
-    EFI_INVALID_PARAMETER           - Invalid parameter.\r
-\r
---*/\r
 ;\r
 \r
+\r
+/**\r
+  Writes one or more files to the firmware volume.\r
+\r
+  @param  This                   Indicates the calling context. \r
+  @param  NumberOfFiles          Number of files. \r
+  @param  WritePolicy            WritePolicy indicates the level of reliability \r
+                                 for the write in the event of a power failure or \r
+                                 other system failure during the write operation. \r
+  @param  FileData               FileData is an pointer to an array of \r
+                                 EFI_FV_WRITE_DATA. Each element of array\r
+                                 FileData represents a file to be written. \r
+\r
+  @retval EFI_SUCCESS            Files successfully written to firmware volume \r
+  @retval EFI_OUT_OF_RESOURCES   Not enough buffer to be allocated. \r
+  @retval EFI_DEVICE_ERROR       Device error. \r
+  @retval EFI_WRITE_PROTECTED    Write protected. \r
+  @retval EFI_NOT_FOUND          Not found. \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter. \r
+  @retval EFI_UNSUPPORTED        This function not supported.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvWriteFile (\r
@@ -248,31 +271,22 @@ FvWriteFile (
   IN       EFI_FV_WRITE_POLICY                WritePolicy,\r
   IN       EFI_FV_WRITE_FILE_DATA             *FileData\r
   )\r
-/*++\r
-\r
-    Routine Description:\r
-      Writes one or more files to the firmware volume.\r
-\r
-    Arguments:\r
-    This        - Indicates the calling context.\r
-    WritePolicy - WritePolicy indicates the level of reliability for\r
-                  the write in the event of a power failure or other\r
-                  system failure during the write operation.\r
-    FileData    - FileData is an pointer to an array of EFI_FV_WRITE_DATA.\r
-                  Each element of FileData[] represents a file to be written.\r
-\r
-    Returns:\r
-      EFI_SUCCESS                   - Files successfully written to firmware volume\r
-      EFI_OUT_OF_RESOURCES          - Not enough buffer to be allocated.\r
-      EFI_DEVICE_ERROR              - Device error.\r
-      EFI_WRITE_PROTECTED           - Write protected.\r
-      EFI_NOT_FOUND                 - Not found.\r
-      EFI_INVALID_PARAMETER         - Invalid parameter.\r
-      EFI_UNSUPPORTED               - This function not supported.\r
-\r
---*/\r
 ;\r
 \r
+\r
+/**\r
+  Return information of type InformationType for the requested firmware\r
+  volume.\r
+\r
+  @param  This             Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL. \r
+  @param  InformationType  InformationType for requested. \r
+  @param  BufferSize       On input, size of Buffer.On output, the amount of data \r
+                           returned in Buffer. \r
+  @param  Buffer           A poniter to the data buffer to return. \r
+\r
+  @retval EFI_SUCCESS      Successfully got volume Information.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvGetVolumeInfo (\r
@@ -281,25 +295,23 @@ FvGetVolumeInfo (
   IN  OUT   UINTN                               *BufferSize,\r
   OUT       VOID                                *Buffer\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Return information of type InformationType for the requested firmware\r
+\r
+\r
+/**\r
+  Set information of type InformationType for the requested firmware\r
   volume.\r
-  \r
-Arguments:\r
-    This                - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.\r
-    InformationType     - InformationType for requested.\r
-    BufferSize          - On input, size of Buffer.On output, the amount of\r
-                          data returned in Buffer.\r
-    Buffer              - A poniter to the data buffer to return.\r
-Returns:\r
-    EFI_SUCCESS         - Successfully got volume Information.\r
-\r
---*/\r
-;\r
 \r
+  @param  This             Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL. \r
+  @param  InformationType  InformationType for requested. \r
+  @param  BufferSize       On input, size of Buffer.On output, the amount of data \r
+                           returned in Buffer. \r
+  @param  Buffer           A poniter to the data buffer to return. \r
+\r
+  @retval EFI_SUCCESS      Successfully set volume Information.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FvSetVolumeInfo (\r
@@ -308,22 +320,6 @@ FvSetVolumeInfo (
   IN        UINTN                               BufferSize,\r
   IN  CONST  VOID                               *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Set information of type InformationType for the requested firmware\r
-  volume.\r
-\r
-Arguments:\r
-    This                - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.\r
-    InformationType     - InformationType for requested.\r
-    BufferSize          - On input, size of Buffer.On output, the amount of\r
-                          data returned in Buffer.\r
-    Buffer              - A poniter to the data buffer to return.\r
-Returns:\r
-    EFI_SUCCESS         - Successfully set volume Information.\r
-\r
---*/\r
 ;\r
   \r
 //\r
@@ -338,175 +334,153 @@ typedef enum {
 } EFI_CHECKSUM_TYPE;\r
 \r
 \r
+\r
+/**\r
+  Check if a block of buffer is erased.\r
+\r
+  @param  ErasePolarity  Erase polarity attribute of the firmware volume \r
+  @param  InBuffer       The buffer to be checked \r
+  @param  BufferSize     Size of the buffer in bytes \r
+\r
+  @retval TRUE           The block of buffer is erased \r
+  @retval FALSE          The block of buffer is not erased\r
+\r
+**/\r
 BOOLEAN\r
 IsBufferErased (\r
   IN UINT8    ErasePolarity,\r
   IN VOID     *Buffer,\r
   IN UINTN    BufferSize\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Check if a block of buffer is erased\r
 \r
-Arguments:\r
-  ErasePolarity -  Erase polarity attribute of the firmware volume\r
-  Buffer        -  The buffer to be checked\r
-  BufferSize    -  Size of the buffer in bytes\r
-    \r
-Returns:\r
-  TRUE  -  The block of buffer is erased\r
-  FALSE -  The block of buffer is not erased\r
-    \r
---*/\r
-;\r
+/**\r
+  Get the FFS file state by checking the highest bit set in the header's state field.\r
 \r
+  @param  ErasePolarity  Erase polarity attribute of the firmware volume \r
+  @param  FfsHeader      Points to the FFS file header \r
+\r
+  @return FFS File state\r
+\r
+**/\r
 EFI_FFS_FILE_STATE \r
 GetFileState (\r
   IN UINT8                ErasePolarity,\r
   IN EFI_FFS_FILE_HEADER  *FfsHeader\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Get the FFS file state by checking the highest bit set in the header's state field\r
 \r
-Arguments:\r
-  ErasePolarity -  Erase polarity attribute of the firmware volume\r
-  FfsHeader     -  Points to the FFS file header\r
-    \r
-Returns:\r
-  FFS File state \r
-    \r
---*/\r
-;\r
+/**\r
+  Set the FFS file state.\r
+\r
+  @param  State                      The state to be set. \r
+  @param  FfsHeader                  Points to the FFS file header \r
+\r
+  @return None.\r
 \r
+**/\r
 VOID\r
 SetFileState (\r
   IN UINT8                State,\r
   IN EFI_FFS_FILE_HEADER  *FfsHeader\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Set the FFS file state.\r
 \r
-Arguments:\r
-  State         -  The state to be set.\r
-  FfsHeader     -  Points to the FFS file header\r
-    \r
-Returns:\r
-  None.\r
-    \r
---*/\r
-;\r
+/**\r
+  Verify checksum of the firmware volume header.\r
+\r
+  @param  FvHeader       Points to the firmware volume header to be checked \r
 \r
+  @retval TRUE           Checksum verification passed \r
+  @retval FALSE          Checksum verification failed\r
+\r
+**/\r
 BOOLEAN\r
 VerifyFvHeaderChecksum (\r
   IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Verify checksum of the firmware volume header \r
-\r
-Arguments:\r
-  FvHeader  -  Points to the firmware volume header to be checked\r
-    \r
-Returns:\r
-  TRUE  -  Checksum verification passed\r
-  FALSE -  Checksum verification failed\r
-    \r
---*/\r
 ;\r
     \r
+\r
+/**\r
+  Check if it's a valid FFS file header.\r
+\r
+  @param  ErasePolarity  Erase polarity attribute of the firmware volume \r
+  @param  FfsHeader      Points to the FFS file header to be checked \r
+  @param  FileState      FFS file state to be returned \r
+\r
+  @retval TRUE           Valid FFS file header \r
+  @retval FALSE          Invalid FFS file header\r
+\r
+**/\r
 BOOLEAN\r
 IsValidFfsHeader (\r
   IN  UINT8                ErasePolarity,\r
   IN  EFI_FFS_FILE_HEADER  *FfsHeader,\r
   OUT EFI_FFS_FILE_STATE   *FileState\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Check if it's a valid FFS file header\r
 \r
-Arguments:\r
-  ErasePolarity -  Erase polarity attribute of the firmware volume\r
-  FfsHeader     -  Points to the FFS file header to be checked\r
-  FileState     -  FFS file state to be returned\r
-    \r
-Returns:\r
-  TRUE  -  Valid FFS file header\r
-  FALSE -  Invalid FFS file header\r
-    \r
---*/\r
-;\r
+/**\r
+  Check if it's a valid FFS file.\r
+  Here we are sure that it has a valid FFS file header since we must call IsValidFfsHeader() first.\r
+\r
+  @param  ErasePolarity  Erase polarity attribute of the firmware volume \r
+  @param  FfsHeader      Points to the FFS file to be checked \r
 \r
+  @retval TRUE           Valid FFS file \r
+  @retval FALSE          Invalid FFS file\r
+\r
+**/\r
 BOOLEAN\r
 IsValidFfsFile (\r
   IN UINT8                ErasePolarity,\r
   IN EFI_FFS_FILE_HEADER  *FfsHeader\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Check if it's a valid FFS file. \r
-  Here we are sure that it has a valid FFS file header since we must call IsValidFfsHeader() first.\r
 \r
-Arguments:\r
-  ErasePolarity -  Erase polarity attribute of the firmware volume\r
-  FfsHeader     -  Points to the FFS file to be checked\r
-    \r
-Returns:\r
-  TRUE  -  Valid FFS file\r
-  FALSE -  Invalid FFS file\r
-    \r
---*/\r
-;\r
+/**\r
+  given the supplied FW_VOL_BLOCK_PROTOCOL, allocate a buffer for output and\r
+  copy the volume header into it.\r
+\r
+  @param  Fvb                   The FW_VOL_BLOCK_PROTOCOL instance from which to \r
+                                read the volume header \r
+  @param  FwVolHeader           Pointer to pointer to allocated buffer in which \r
+                                the volume header is returned. \r
 \r
+  @retval EFI_OUT_OF_RESOURCES  No enough buffer could be allocated. \r
+  @retval EFI_SUCCESS           Successfully read volume header to the allocated \r
+                                buffer.\r
+\r
+**/\r
 EFI_STATUS\r
 GetFwVolHeader (\r
   IN  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL      *Fvb,\r
   OUT EFI_FIRMWARE_VOLUME_HEADER              **FwVolHeader\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  given the supplied FW_VOL_BLOCK_PROTOCOL, allocate a buffer for output and\r
-  copy the volume header into it.\r
 \r
-Arguments:\r
-  Fvb - The FW_VOL_BLOCK_PROTOCOL instance from which to read the volume\r
-          header\r
-  FwVolHeader - Pointer to pointer to allocated buffer in which the volume\r
-                  header is returned.\r
 \r
-Returns:\r
-  Status code.\r
+/**\r
+  Check if a FV is consistent and allocate cache\r
 \r
---*/\r
-;\r
+  @param  FvDevice              pointer to the FvDevice to be checked. \r
 \r
+  @retval EFI_OUT_OF_RESOURCES  No enough buffer could be allocated. \r
+  @retval EFI_SUCCESS           FV is consistent and cache is allocated. \r
+  @retval EFI_VOLUME_CORRUPTED  File system is corrupted.\r
 \r
+**/\r
 EFI_STATUS\r
 FvCheck (\r
   IN OUT FV_DEVICE  *FvDevice\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Check if a FV is consistent and allocate cache\r
-\r
-Arguments:\r
-  FvDevice - pointer to the FvDevice to be checked.\r
-\r
-Returns:\r
-  EFI_OUT_OF_RESOURCES    - Not enough buffer to be allocated.\r
-  EFI_SUCCESS             - FV is consistent and cache is allocated.\r
-  EFI_VOLUME_CORRUPTED    - File system is corrupted.\r
-\r
---*/\r
 ;\r
 \r
 #endif\r
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
index 72ebc8e8973e5d4e0e0d6df0d1c6022cfd7c30f5..09adddfb532e7aa648d65a6a0a76219b4bf21ee2 100644 (file)
@@ -17,7 +17,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 //\r
 // Driver Support Function Prototypes\r
-//\r
+// \r
+/**\r
+  Connects a controller to a driver.\r
+\r
+  @param  ControllerHandle                      Handle of the controller to be \r
+                                                connected. \r
+  @param  ContextDriverImageHandles             DriverImageHandle A pointer to an \r
+                                                ordered list of driver image \r
+                                                handles. \r
+  @param  RemainingDevicePath                   RemainingDevicePath A pointer to \r
+                                                the device path that specifies a \r
+                                                child  of the controller \r
+                                                specified by ControllerHandle. \r
+\r
+  @retval EFI_SUCCESS                           One or more drivers were \r
+                                                connected to ControllerHandle. \r
+  @retval EFI_OUT_OF_RESOURCES                  No enough system resources to \r
+                                                complete the request. \r
+  @retval EFI_NOT_FOUND                         No drivers were connected to \r
+                                                ControllerHandle.\r
+\r
+**/\r
 EFI_STATUS \r
 CoreConnectSingleController (\r
   IN  EFI_HANDLE                ControllerHandle,\r
@@ -28,6 +49,25 @@ CoreConnectSingleController (
 //\r
 // Driver Support Functions\r
 //\r
+\r
+/**\r
+  Connects one or more drivers to a controller.\r
+\r
+  @param  ControllerHandle                      Handle of the controller to be \r
+                                                connected. \r
+  @param  DriverImageHandle                     DriverImageHandle A pointer to an \r
+                                                ordered list of driver image \r
+                                                handles. \r
+  @param  RemainingDevicePath                   RemainingDevicePath A pointer to \r
+                                                the device path that specifies a \r
+                                                child of the controller specified \r
+                                                by ControllerHandle. \r
+  @param  Recursive                             Whether the function would be \r
+                                                called recursively or not. \r
+\r
+  @return Status code.\r
+\r
+**/\r
 EFI_STATUS \r
 EFIAPI\r
 CoreConnectController (\r
@@ -36,28 +76,6 @@ CoreConnectController (
   IN  EFI_DEVICE_PATH_PROTOCOL  *RemainingDevicePath  OPTIONAL,\r
   IN  BOOLEAN                   Recursive\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Connects one or more drivers to a controller.\r
-\r
-Arguments:\r
-\r
-  ControllerHandle            - Handle of the controller to be connected.\r
-\r
-  DriverImageHandle           - DriverImageHandle A pointer to an ordered list of driver image handles.\r
-\r
-  RemainingDevicePath         - RemainingDevicePath A pointer to the device path that specifies a child of the\r
-                                controller specified by ControllerHandle.\r
-    \r
-  Recursive                   - Whether the function would be called recursively or not.\r
-\r
-Returns:\r
-\r
-  Status code.\r
-\r
---*/\r
 {\r
   EFI_STATUS                           Status;\r
   EFI_STATUS                           ReturnStatus;\r
@@ -195,6 +213,26 @@ Returns:
   return ReturnStatus;\r
 }\r
 \r
+\r
+/**\r
+  Add Driver Binding Protocols from Context Driver Image Handles to sorted\r
+  Driver Binding Protocol list.\r
+\r
+  @param  DriverBindingHandle                   Handle of the driver binding \r
+                                                protocol. \r
+  @param  NumberOfSortedDriverBindingProtocols  Number Of sorted driver binding \r
+                                                protocols \r
+  @param  SortedDriverBindingProtocols          The sorted protocol list. \r
+  @param  DriverBindingHandleCount              Driver Binding Handle Count. \r
+  @param  DriverBindingHandleBuffer             The buffer of driver binding \r
+                                                protocol to be modified. \r
+  @param  IsImageHandle                         Indicate whether \r
+                                                DriverBindingHandle is an image \r
+                                                handle \r
+\r
+  @return None.\r
+\r
+**/\r
 VOID\r
 AddSortedDriverBindingProtocol (\r
   IN      EFI_HANDLE                   DriverBindingHandle,\r
@@ -204,32 +242,6 @@ AddSortedDriverBindingProtocol (
   IN OUT  EFI_HANDLE                   *DriverBindingHandleBuffer,\r
   IN      BOOLEAN                      IsImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add Driver Binding Protocols from Context Driver Image Handles to sorted \r
-   Driver Binding Protocol list.\r
-\r
-Arguments:\r
-\r
-  DriverBindingHandle - Handle of the driver binding protocol.\r
-\r
-  NumberOfSortedDriverBindingProtocols - Number Of sorted driver binding protocols\r
-\r
-  SortedDriverBindingProtocols - The sorted protocol list.                        \r
-    \r
-  DriverBindingHandleCount - Driver Binding Handle Count.\r
-\r
-  DriverBindingHandleBuffer - The buffer of driver binding protocol to be modified.\r
-\r
-  IsImageHandle - Indicate whether DriverBindingHandle is an image handle\r
-  \r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   EFI_STATUS                   Status;\r
   EFI_DRIVER_BINDING_PROTOCOL  *DriverBinding;\r
@@ -324,32 +336,34 @@ Returns:
   }\r
 }\r
  \r
+\r
+/**\r
+  Connects a controller to a driver.\r
+\r
+  @param  ControllerHandle                      Handle of the controller to be \r
+                                                connected. \r
+  @param  ContextDriverImageHandles             DriverImageHandle A pointer to an \r
+                                                ordered list of driver image \r
+                                                handles. \r
+  @param  RemainingDevicePath                   RemainingDevicePath A pointer to \r
+                                                the device path that specifies a \r
+                                                child  of the controller \r
+                                                specified by ControllerHandle. \r
+\r
+  @retval EFI_SUCCESS                           One or more drivers were \r
+                                                connected to ControllerHandle. \r
+  @retval EFI_OUT_OF_RESOURCES                  No enough system resources to \r
+                                                complete the request. \r
+  @retval EFI_NOT_FOUND                         No drivers were connected to \r
+                                                ControllerHandle.\r
+\r
+**/\r
 EFI_STATUS \r
 CoreConnectSingleController (\r
   IN  EFI_HANDLE                ControllerHandle,\r
   IN  EFI_HANDLE                *ContextDriverImageHandles OPTIONAL,\r
   IN  EFI_DEVICE_PATH_PROTOCOL  *RemainingDevicePath       OPTIONAL     \r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Connects a controller to a driver.\r
-\r
-Arguments:\r
-\r
-  ControllerHandle            - Handle of the controller to be connected.\r
-  ContextDriverImageHandles   - DriverImageHandle A pointer to an ordered list of driver image handles.\r
-  RemainingDevicePath         - RemainingDevicePath A pointer to the device path that specifies a child \r
-                                of the controller specified by ControllerHandle.\r
-    \r
-Returns:\r
-\r
-  EFI_SUCCESS           - One or more drivers were connected to ControllerHandle.\r
-  EFI_OUT_OF_RESOURCES  - No enough system resources to complete the request.\r
-  EFI_NOT_FOUND         - No drivers were connected to ControllerHandle.\r
-\r
---*/\r
 {\r
   EFI_STATUS                                 Status;\r
   UINTN                                      Index;\r
@@ -610,6 +624,40 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Disonnects a controller from a driver\r
+\r
+  @param  ControllerHandle                      ControllerHandle The handle of \r
+                                                the controller from which \r
+                                                driver(s)  are to be \r
+                                                disconnected. \r
+  @param  DriverImageHandle                     DriverImageHandle The driver to \r
+                                                disconnect from ControllerHandle. \r
+  @param  ChildHandle                           ChildHandle The handle of the \r
+                                                child to destroy. \r
+\r
+  @retval EFI_SUCCESS                           One or more drivers were \r
+                                                disconnected from the controller. \r
+  @retval EFI_SUCCESS                           On entry, no drivers are managing \r
+                                                ControllerHandle. \r
+  @retval EFI_SUCCESS                           DriverImageHandle is not NULL, \r
+                                                and on entry DriverImageHandle is \r
+                                                not managing ControllerHandle. \r
+  @retval EFI_INVALID_PARAMETER                 ControllerHandle is not a valid \r
+                                                EFI_HANDLE. \r
+  @retval EFI_INVALID_PARAMETER                 DriverImageHandle is not NULL, \r
+                                                and it is not a valid EFI_HANDLE. \r
+  @retval EFI_INVALID_PARAMETER                 ChildHandle is not NULL, and it \r
+                                                is not a valid EFI_HANDLE. \r
+  @retval EFI_OUT_OF_RESOURCES                  There are not enough resources \r
+                                                available to disconnect any \r
+                                                drivers from ControllerHandle. \r
+  @retval EFI_DEVICE_ERROR                      The controller could not be \r
+                                                disconnected because of a device \r
+                                                error.\r
+\r
+**/\r
 EFI_STATUS \r
 EFIAPI\r
 CoreDisconnectController (\r
@@ -617,31 +665,6 @@ CoreDisconnectController (
   IN  EFI_HANDLE  DriverImageHandle  OPTIONAL,\r
   IN  EFI_HANDLE  ChildHandle        OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Disonnects a controller from a driver\r
-\r
-Arguments:\r
-\r
-  ControllerHandle  - ControllerHandle The handle of the controller from which driver(s) \r
-                        are to be disconnected.\r
-  DriverImageHandle - DriverImageHandle The driver to disconnect from ControllerHandle.\r
-  ChildHandle       - ChildHandle The handle of the child to destroy.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           -  One or more drivers were disconnected from the controller.\r
-  EFI_SUCCESS           -  On entry, no drivers are managing ControllerHandle.\r
-  EFI_SUCCESS           -  DriverImageHandle is not NULL, and on entry DriverImageHandle is not managing ControllerHandle.\r
-  EFI_INVALID_PARAMETER -  ControllerHandle is not a valid EFI_HANDLE.\r
-  EFI_INVALID_PARAMETER -  DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.\r
-  EFI_INVALID_PARAMETER -  ChildHandle is not NULL, and it is not a valid EFI_HANDLE.\r
-  EFI_OUT_OF_RESOURCES  -  There are not enough resources available to disconnect any drivers from ControllerHandle.\r
-  EFI_DEVICE_ERROR      -  The controller could not be disconnected because of a device error.\r
-\r
---*/\r
 {\r
   EFI_STATUS                          Status;\r
   IHANDLE                             *Handle;\r
index 8d64a5c8831b30a86fd757762ccb15511d03fc44..7ee81b984e78b965114104231373966c577318a3 100644 (file)
@@ -15,23 +15,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <DxeMain.h>\r
 \r
-VOID\r
-CoreNotifyProtocolEntry (\r
-  IN PROTOCOL_ENTRY   *ProtEntry\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Signal event for every protocol in protocol entry.\r
 \r
-Arguments:\r
-\r
-  ProtEntry     - Protocol entry\r
+  @param  ProtEntry              Protocol entry\r
 \r
-Returns:\r
-\r
---*/\r
+**/\r
+VOID\r
+CoreNotifyProtocolEntry (\r
+  IN PROTOCOL_ENTRY   *ProtEntry\r
+  )\r
 {\r
   PROTOCOL_NOTIFY     *ProtNotify;\r
   LIST_ENTRY          *Link;\r
@@ -45,31 +39,23 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Removes Protocol from the protocol list (but not the handle list).\r
+\r
+  @param  Handle                 The handle to remove protocol on. \r
+  @param  Protocol               GUID of the protocol to be moved \r
+  @param  Interface              The interface of the protocol \r
+\r
+  @return Protocol Entry\r
+\r
+**/\r
 PROTOCOL_INTERFACE *\r
 CoreRemoveInterfaceFromProtocol (\r
   IN IHANDLE        *Handle,\r
   IN EFI_GUID       *Protocol,\r
   IN VOID           *Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Removes Protocol from the protocol list (but not the handle list).\r
-\r
-Arguments:\r
-\r
-  Handle -  The handle to remove protocol on.\r
-\r
-  Protocol  -  GUID of the protocol to be moved\r
-\r
-  Interface - The interface of the protocol\r
-\r
-Returns:\r
-\r
-  Protocol Entry\r
-\r
---*/\r
 {\r
   PROTOCOL_INTERFACE  *Prot;\r
   PROTOCOL_NOTIFY     *ProtNotify;\r
@@ -107,6 +93,20 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Add a new protocol notification record for the request protocol.\r
+\r
+  @param  Protocol               The requested protocol to add the notify \r
+                                 registration \r
+  @param  Event                  The event to signal \r
+  @param  Registration           Returns the registration record \r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_SUCCESS            Successfully returned the registration record \r
+                                 that has been added\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreRegisterProtocolNotify (\r
@@ -114,28 +114,6 @@ CoreRegisterProtocolNotify (
   IN EFI_EVENT      Event,\r
   OUT  VOID           **Registration\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add a new protocol notification record for the request protocol.\r
-\r
-Arguments:\r
-\r
-  Protocol      - The requested protocol to add the notify registration\r
-\r
-  Event         - The event to signal \r
-\r
-  Registration  - Returns the registration record\r
-\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Invalid parameter\r
-\r
-  EFI_SUCCESS                 - Successfully returned the registration record that has been added\r
-  \r
---*/\r
 {\r
   PROTOCOL_ENTRY      *ProtEntry;\r
   PROTOCOL_NOTIFY     *ProtNotify;\r
@@ -194,6 +172,21 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Reinstall a protocol interface on a device handle.  The OldInterface for Protocol is replaced by the NewInterface.\r
+\r
+  @param  UserHandle             Handle on which the interface is to be \r
+                                 reinstalled \r
+  @param  Protocol               The numeric ID of the interface \r
+  @param  OldInterface           A pointer to the old interface \r
+  @param  NewInterface           A pointer to the new interface \r
+\r
+  @retval EFI_SUCCESS            The protocol interface was installed\r
+  @retval EFI_NOT_FOUND          The OldInterface on the handle was not found\r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreReinstallProtocolInterface (\r
@@ -202,29 +195,6 @@ CoreReinstallProtocolInterface (
   IN VOID           *OldInterface,\r
   IN VOID           *NewInterface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Reinstall a protocol interface on a device handle.  The OldInterface for Protocol is replaced by the NewInterface.\r
-\r
-Arguments:\r
-\r
-  UserHandle    - Handle on which the interface is to be reinstalled\r
-  Protocol      - The numeric ID of the interface\r
-  OldInterface  - A pointer to the old interface\r
-  NewInterface  - A pointer to the new interface \r
-\r
-\r
-Returns:\r
-\r
-  Status code.\r
-\r
-  On EFI_SUCCESS            The protocol interface was installed\r
-  On EFI_NOT_FOUND          The OldInterface on the handle was not found\r
-  On EFI_INVALID_PARAMETER  One of the parameters has an invalid value\r
-  \r
---*/\r
 {\r
   EFI_STATUS                Status;\r
   IHANDLE                   *Handle;\r
index 36d81997c93f336f633c55189e27c2e7af1629bb..d95cef76dfe7ac44e31e3486f5118997c8c5600d 100644 (file)
@@ -1,6 +1,6 @@
 /** @file \r
 \r
-  UEFI handle & protocol handling\r
+  UEFI handle & protocol handling.\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
@@ -28,75 +28,48 @@ EFI_LOCK               gProtocolDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL
 UINT64                 gHandleDatabaseKey    = 0;\r
 \r
 \r
+\r
+/**\r
+  Acquire lock on gProtocolDatabaseLock.\r
+\r
+**/\r
 VOID\r
 CoreAcquireProtocolLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Acquire lock on gProtocolDatabaseLock.\r
-  \r
-Arguments:\r
-\r
-  None\r
-  \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   CoreAcquireLock (&gProtocolDatabaseLock);\r
 }\r
 \r
 \r
+\r
+/**\r
+  Release lock on gProtocolDatabaseLock.\r
+\r
+**/\r
 VOID\r
 CoreReleaseProtocolLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Release lock on gProtocolDatabaseLock.\r
-  \r
-Arguments:\r
-\r
-  None\r
-  \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   CoreReleaseLock (&gProtocolDatabaseLock);\r
 }\r
 \r
 \r
-EFI_STATUS\r
-CoreValidateHandle (\r
-  IN  EFI_HANDLE                UserHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Check whether a handle is a valid EFI_HANDLE\r
-  \r
-Arguments:\r
-\r
-  UserHandle    - The handle to check\r
-  \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER   - The handle is NULL or not a valid EFI_HANDLE.\r
+  @param  UserHandle             The handle to check \r
 \r
-  EFI_SUCCESS             - The handle is valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER  The handle is NULL or not a valid EFI_HANDLE. \r
+  @retval EFI_SUCCESS            The handle is valid EFI_HANDLE.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreValidateHandle (\r
+  IN  EFI_HANDLE                UserHandle\r
+  )\r
 {\r
   IHANDLE             *Handle;\r
 \r
@@ -111,30 +84,22 @@ Returns:
 }\r
 \r
 \r
-PROTOCOL_ENTRY  *\r
-CoreFindProtocolEntry (\r
-  IN EFI_GUID   *Protocol,\r
-  IN BOOLEAN    Create\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Finds the protocol entry for the requested protocol.\r
-  \r
   The gProtocolDatabaseLock must be owned\r
 \r
-Arguments:\r
-  \r
-  Protocol  - The ID of the protocol \r
-\r
-  Create    - Create a new entry if not found\r
+  @param  Protocol               The ID of the protocol \r
+  @param  Create                 Create a new entry if not found \r
 \r
-Returns:\r
+  @return Protocol entry\r
 \r
-  Protocol entry\r
-\r
---*/\r
+**/\r
+PROTOCOL_ENTRY  *\r
+CoreFindProtocolEntry (\r
+  IN EFI_GUID   *Protocol,\r
+  IN BOOLEAN    Create\r
+  )\r
 {\r
   LIST_ENTRY          *Link;\r
   PROTOCOL_ENTRY      *Item;\r
@@ -190,34 +155,25 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Finds the protocol instance for the requested handle and protocol.\r
+  Note: This function doesn't do parameters checking, it's caller's responsibility\r
+  to pass in valid parameters.\r
+\r
+  @param  Handle                 The handle to search the protocol on \r
+  @param  Protocol               GUID of the protocol \r
+  @param  Interface              The interface for the protocol being searched \r
+\r
+  @return Protocol instance (NULL: Not found)\r
+\r
+**/\r
 PROTOCOL_INTERFACE *\r
 CoreFindProtocolInterface (\r
   IN IHANDLE        *Handle,\r
   IN EFI_GUID       *Protocol,\r
   IN VOID           *Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Finds the protocol instance for the requested handle and protocol.\r
-  \r
-  Note: This function doesn't do parameters checking, it's caller's responsibility \r
-        to pass in valid parameters.\r
-  \r
-Arguments:\r
-  \r
-  Handle    - The handle to search the protocol on\r
-  \r
-  Protocol  - GUID of the protocol\r
-\r
-  Interface - The interface for the protocol being searched\r
-\r
-Returns:\r
-\r
-  Protocol instance (NULL: Not found)\r
-\r
---*/  \r
 {\r
   PROTOCOL_INTERFACE  *Prot;\r
   PROTOCOL_ENTRY      *ProtEntry;\r
@@ -253,27 +209,22 @@ Returns:
   return Prot;\r
 }\r
 \r
-STATIC\r
-EFI_STATUS\r
-CoreUnregisterProtocolNotifyEvent (\r
-  IN EFI_EVENT      Event\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Removes an event from a register protocol notify list on a protocol.\r
 \r
-Arguments:\r
-  \r
-  Event   - The event to search for in the protocol database.\r
-\r
-Returns:\r
+  @param  Event                  The event to search for in the protocol \r
+                                 database. \r
 \r
-  EFI_SUCCESS   if the event was found and removed.\r
-  EFI_NOT_FOUND if the event was not found in the protocl database.\r
+  @return EFI_SUCCESS   if the event was found and removed.\r
+  @return EFI_NOT_FOUND if the event was not found in the protocl database.\r
 \r
---*/\r
+**/\r
+STATIC\r
+EFI_STATUS\r
+CoreUnregisterProtocolNotifyEvent (\r
+  IN EFI_EVENT      Event\r
+  )\r
 {\r
   LIST_ENTRY         *Link;\r
   PROTOCOL_ENTRY     *ProtEntry;\r
@@ -308,25 +259,20 @@ Returns:
 }\r
 \r
 \r
-EFI_STATUS\r
-CoreUnregisterProtocolNotify (\r
-  IN EFI_EVENT      Event\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Removes all the events in the protocol database that match Event.\r
 \r
-Arguments:\r
-  \r
-  Event   - The event to search for in the protocol database.\r
-\r
-Returns:\r
+  @param  Event                  The event to search for in the protocol \r
+                                 database. \r
 \r
-  EFI_SUCCESS when done searching the entire database.\r
+  @return EFI_SUCCESS when done searching the entire database.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreUnregisterProtocolNotify (\r
+  IN EFI_EVENT      Event\r
+  )\r
 {\r
   EFI_STATUS       Status;\r
 \r
@@ -339,6 +285,21 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Wrapper function to CoreInstallProtocolInterfaceNotify.  This is the public API which\r
+  Calls the private one which contains a BOOLEAN parameter for notifications\r
+\r
+  @param  UserHandle             The handle to install the protocol handler on, \r
+                                 or NULL if a new handle is to be allocated \r
+  @param  Protocol               The protocol to add to the handle \r
+  @param  InterfaceType          Indicates whether Interface is supplied in \r
+                                 native form. \r
+  @param  Interface              The interface for the protocol being added \r
+\r
+  @return Status code\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreInstallProtocolInterface (\r
@@ -347,29 +308,6 @@ CoreInstallProtocolInterface (
   IN EFI_INTERFACE_TYPE InterfaceType,\r
   IN VOID               *Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Wrapper function to CoreInstallProtocolInterfaceNotify.  This is the public API which\r
-  Calls the private one which contains a BOOLEAN parameter for notifications\r
-\r
-Arguments:\r
-\r
-  UserHandle     - The handle to install the protocol handler on,\r
-                    or NULL if a new handle is to be allocated\r
-\r
-  Protocol       - The protocol to add to the handle\r
-\r
-  InterfaceType  - Indicates whether Interface is supplied in native form.\r
-\r
-  Interface      - The interface for the protocol being added\r
-\r
-Returns:\r
-\r
-  Status code    \r
-\r
---*/\r
 {\r
   return CoreInstallProtocolInterfaceNotify (\r
             UserHandle, \r
@@ -380,6 +318,24 @@ Returns:
             );\r
 }\r
 \r
+\r
+/**\r
+  Installs a protocol interface into the boot services environment.\r
+\r
+  @param  UserHandle             The handle to install the protocol handler on, \r
+                                 or NULL if a new handle is to be allocated \r
+  @param  Protocol               The protocol to add to the handle \r
+  @param  InterfaceType          Indicates whether Interface is supplied in \r
+                                 native form. \r
+  @param  Interface              The interface for the protocol being added \r
+  @param  Notify                 indicates whether notify the notification list  \r
+                                 for this protocol \r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate \r
+  @retval EFI_SUCCESS            Protocol interface successfully installed\r
+\r
+**/\r
 EFI_STATUS\r
 CoreInstallProtocolInterfaceNotify (\r
   IN OUT EFI_HANDLE     *UserHandle,\r
@@ -388,35 +344,6 @@ CoreInstallProtocolInterfaceNotify (
   IN VOID               *Interface,\r
   IN BOOLEAN            Notify\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Installs a protocol interface into the boot services environment.\r
-\r
-Arguments:\r
-\r
-  UserHandle     - The handle to install the protocol handler on,\r
-                   or NULL if a new handle is to be allocated\r
-\r
-  Protocol       - The protocol to add to the handle\r
-\r
-  InterfaceType  - Indicates whether Interface is supplied in native form.\r
-\r
-  Interface      - The interface for the protocol being added\r
-\r
-  Notify         - indicates whether notify the notification list \r
-                   for this protocol\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               - Protocol interface successfully installed\r
-\r
---*/\r
 {\r
   PROTOCOL_INTERFACE  *Prot;\r
   PROTOCOL_ENTRY      *ProtEntry;\r
@@ -439,7 +366,7 @@ Returns:
   //\r
   // Print debug message\r
   //\r
-  DEBUG((EFI_D_ERROR | EFI_D_INFO, "InstallProtocolInterface: %g %p\n", Protocol, Interface));\r
+  DEBUG((DEBUG_ERROR | DEBUG_INFO, "InstallProtocolInterface: %g %p\n", Protocol, Interface));\r
 \r
   Status = EFI_OUT_OF_RESOURCES;\r
   Prot = NULL;\r
@@ -574,38 +501,32 @@ Done:
 \r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-CoreInstallMultipleProtocolInterfaces (\r
-  IN OUT EFI_HANDLE           *Handle,\r
-  ...\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Installs a list of protocol interface into the boot services environment.\r
   This function calls InstallProtocolInterface() in a loop. If any error\r
-  occures all the protocols added by this function are removed. This is \r
+  occures all the protocols added by this function are removed. This is\r
   basically a lib function to save space.\r
 \r
-Arguments:\r
-\r
-  Handle      - The handle to install the protocol handlers on,\r
-                or NULL if a new handle is to be allocated\r
-  ...         - EFI_GUID followed by protocol instance. A NULL terminates the \r
-                list. The pairs are the arguments to InstallProtocolInterface().\r
-                All the protocols are added to Handle.\r
+  @param  Handle                 The handle to install the protocol handlers on, \r
+                                 or NULL if a new handle is to be allocated \r
+  @param  ...                    EFI_GUID followed by protocol instance. A NULL \r
+                                 terminates the  list. The pairs are the \r
+                                 arguments to InstallProtocolInterface(). All the \r
+                                 protocols are added to Handle. \r
 \r
-Returns:\r
+  @retval EFI_INVALID_PARAMETER  Handle is NULL. \r
+  @retval EFI_SUCCESS            Protocol interfaces successfully installed.\r
 \r
-  EFI_INVALID_PARAMETER       - Handle is NULL.\r
-  \r
-  EFI_SUCCESS                 - Protocol interfaces successfully installed.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreInstallMultipleProtocolInterfaces (\r
+  IN OUT EFI_HANDLE           *Handle,\r
+  ...\r
+  )\r
 {\r
-  VA_LIST                   args;\r
+  VA_LIST                   Args;\r
   EFI_STATUS                Status;\r
   EFI_GUID                  *Protocol;\r
   VOID                      *Interface;\r
@@ -628,17 +549,17 @@ Returns:
   //\r
   // Check for duplicate device path and install the protocol interfaces\r
   //\r
-  VA_START (args, Handle);\r
+  VA_START (Args, Handle);\r
   for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {\r
     //\r
     // If protocol is NULL, then it's the end of the list\r
     //\r
-    Protocol = VA_ARG (args, EFI_GUID *);\r
+    Protocol = VA_ARG (Args, EFI_GUID *);\r
     if (Protocol == NULL) {\r
       break;\r
     }\r
 \r
-    Interface = VA_ARG (args, VOID *);\r
+    Interface = VA_ARG (Args, VOID *);\r
 \r
     //\r
     // Make sure you are installing on top a device path that has already been added.\r
@@ -666,10 +587,10 @@ Returns:
     //\r
     // Reset the va_arg back to the first argument.\r
     //\r
-    VA_START (args, Handle);\r
+    VA_START (Args, Handle);\r
     for (; Index > 1; Index--) {\r
-      Protocol = VA_ARG (args, EFI_GUID *);\r
-      Interface = VA_ARG (args, VOID *);\r
+      Protocol = VA_ARG (Args, EFI_GUID *);\r
+      Interface = VA_ARG (Args, VOID *);\r
       CoreUninstallProtocolInterface (*Handle, Protocol, Interface);\r
     }        \r
     *Handle = OldHandle;\r
@@ -682,32 +603,26 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-CoreDisconnectControllersUsingProtocolInterface (\r
-  IN EFI_HANDLE           UserHandle,\r
-  IN PROTOCOL_INTERFACE   *Prot\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Attempts to disconnect all drivers that are using the protocol interface being queried.\r
   If failed, reconnect all drivers disconnected.\r
-  \r
-  Note: This function doesn't do parameters checking, it's caller's responsibility \r
-        to pass in valid parameters.\r
-\r
-Arguments:\r
-\r
-  UserHandle  - The handle on which the protocol is installed \r
-  Prot        - The protocol to disconnect drivers from\r
+  Note: This function doesn't do parameters checking, it's caller's responsibility\r
+  to pass in valid parameters.\r
 \r
-Returns:\r
+  @param  UserHandle             The handle on which the protocol is installed \r
+  @param  Prot                   The protocol to disconnect drivers from \r
 \r
-  EFI_SUCCESS       - Drivers using the protocol interface are all disconnected\r
-  EFI_ACCESS_DENIED - Failed to disconnect one or all of the drivers\r
+  @retval EFI_SUCCESS            Drivers using the protocol interface are all \r
+                                 disconnected \r
+  @retval EFI_ACCESS_DENIED      Failed to disconnect one or all of the drivers\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreDisconnectControllersUsingProtocolInterface (\r
+  IN EFI_HANDLE           UserHandle,\r
+  IN PROTOCOL_INTERFACE   *Prot\r
+  )\r
 {\r
   EFI_STATUS            Status;\r
   BOOLEAN               ItemFound;\r
@@ -773,6 +688,20 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Uninstalls all instances of a protocol:interfacer from a handle.\r
+  If the last protocol interface is remove from the handle, the\r
+  handle is freed.\r
+\r
+  @param  UserHandle             The handle to remove the protocol handler from \r
+  @param  Protocol               The protocol, of protocol:interface, to remove \r
+  @param  Interface              The interface, of protocol:interface, to remove \r
+\r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL. \r
+  @retval EFI_SUCCESS            Protocol interface successfully uninstalled.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreUninstallProtocolInterface (\r
@@ -780,29 +709,6 @@ CoreUninstallProtocolInterface (
   IN EFI_GUID         *Protocol,\r
   IN VOID             *Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Uninstalls all instances of a protocol:interfacer from a handle. \r
-  If the last protocol interface is remove from the handle, the \r
-  handle is freed.\r
-\r
-Arguments:\r
-\r
-  UserHandle      - The handle to remove the protocol handler from\r
-\r
-  Protocol        - The protocol, of protocol:interface, to remove\r
-\r
-  Interface       - The interface, of protocol:interface, to remove\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Protocol is NULL.\r
-  \r
-  EFI_SUCCESS                 - Protocol interface successfully uninstalled.\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   IHANDLE               *Handle;\r
@@ -897,51 +803,45 @@ Done:
 \r
 \r
 \r
+\r
+/**\r
+  Uninstalls a list of protocol interface in the boot services environment.\r
+  This function calls UnisatllProtocolInterface() in a loop. This is\r
+  basically a lib function to save space.\r
+\r
+  @param  Handle                 The handle to uninstall the protocol \r
+  @param  ...                    EFI_GUID followed by protocol instance. A NULL \r
+                                 terminates the  list. The pairs are the \r
+                                 arguments to UninstallProtocolInterface(). All \r
+                                 the protocols are added to Handle. \r
+\r
+  @return Status code\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreUninstallMultipleProtocolInterfaces (\r
   IN EFI_HANDLE           Handle,\r
   ...\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Uninstalls a list of protocol interface in the boot services environment. \r
-  This function calls UnisatllProtocolInterface() in a loop. This is \r
-  basically a lib function to save space.\r
-\r
-Arguments:\r
-\r
-  Handle      - The handle to uninstall the protocol\r
-\r
-  ...         - EFI_GUID followed by protocol instance. A NULL terminates the \r
-                list. The pairs are the arguments to UninstallProtocolInterface().\r
-                All the protocols are added to Handle.\r
-\r
-Returns:\r
-\r
-  Status code    \r
-\r
---*/\r
 {\r
   EFI_STATUS      Status;\r
-  VA_LIST         args;\r
+  VA_LIST         Args;\r
   EFI_GUID        *Protocol;\r
   VOID            *Interface;\r
   UINTN           Index;\r
 \r
-  VA_START (args, Handle);\r
+  VA_START (Args, Handle);\r
   for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {\r
     //\r
     // If protocol is NULL, then it's the end of the list\r
     //\r
-    Protocol = VA_ARG (args, EFI_GUID *);\r
+    Protocol = VA_ARG (Args, EFI_GUID *);\r
     if (Protocol == NULL) {\r
       break;\r
     }\r
 \r
-    Interface = VA_ARG (args, VOID *);\r
+    Interface = VA_ARG (Args, VOID *);\r
 \r
     //\r
     // Uninstall it\r
@@ -957,10 +857,10 @@ Returns:
     //\r
     // Reset the va_arg back to the first argument.\r
     //\r
-    VA_START (args, Handle);\r
+    VA_START (Args, Handle);\r
     for (; Index > 1; Index--) {\r
-      Protocol = VA_ARG(args, EFI_GUID *);\r
-      Interface = VA_ARG(args, VOID *);\r
+      Protocol = VA_ARG(Args, EFI_GUID *);\r
+      Interface = VA_ARG(Args, VOID *);\r
       CoreInstallProtocolInterface (&Handle, Protocol, EFI_NATIVE_INTERFACE, Interface);\r
     }        \r
   }\r
@@ -968,29 +868,22 @@ Returns:
   return Status;\r
 }    \r
 \r
+\r
+/**\r
+  Locate a certain GUID protocol interface in a Handle's protocols.\r
+\r
+  @param  UserHandle             The handle to obtain the protocol interface on \r
+  @param  Protocol               The GUID of the protocol \r
+\r
+  @return The requested protocol interface for the handle\r
+\r
+**/\r
 STATIC\r
 PROTOCOL_INTERFACE  *\r
 CoreGetProtocolInterface (\r
   IN  EFI_HANDLE                UserHandle,\r
   IN  EFI_GUID                  *Protocol\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locate a certain GUID protocol interface in a Handle's protocols.\r
-\r
-Arguments:\r
-\r
-  UserHandle  - The handle to obtain the protocol interface on\r
-\r
-  Protocol    - The GUID of the protocol \r
-\r
-Returns:\r
-\r
-  The requested protocol interface for the handle\r
-  \r
---*/  \r
 {\r
   EFI_STATUS          Status;\r
   PROTOCOL_ENTRY      *ProtEntry;\r
@@ -1019,6 +912,18 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Queries a handle to determine if it supports a specified protocol.\r
+\r
+  @param  UserHandle             The handle being queried. \r
+  @param  Protocol               The published unique identifier of the protocol. \r
+  @param  Interface              Supplies the address where a pointer to the \r
+                                 corresponding Protocol Interface is returned. \r
+\r
+  @return The requested protocol interface for the handle\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreHandleProtocol (\r
@@ -1026,26 +931,6 @@ CoreHandleProtocol (
   IN EFI_GUID         *Protocol,\r
   OUT VOID            **Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Queries a handle to determine if it supports a specified protocol.\r
-\r
-Arguments:\r
-\r
-  UserHandle  - The handle being queried.\r
-\r
-  Protocol    - The published unique identifier of the protocol.\r
-\r
-  Interface   - Supplies the address where a pointer to the corresponding Protocol\r
-               Interface is returned.\r
-\r
-Returns:\r
-\r
-  The requested protocol interface for the handle\r
-  \r
---*/  \r
 {\r
   return CoreOpenProtocol (\r
           UserHandle,     \r
@@ -1058,6 +943,27 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Locates the installed protocol handler for the handle, and\r
+  invokes it to obtain the protocol interface. Usage information\r
+  is registered in the protocol data base.\r
+\r
+  @param  UserHandle             The handle to obtain the protocol interface on \r
+  @param  Protocol               The ID of the protocol \r
+  @param  Interface              The location to return the protocol interface \r
+  @param  ImageHandle            The handle of the Image that is opening the \r
+                                 protocol interface specified by Protocol and \r
+                                 Interface. \r
+  @param  ControllerHandle       The controller handle that is requiring this \r
+                                 interface. \r
+  @param  Attributes             The open mode of the protocol interface \r
+                                 specified by Handle and Protocol. \r
+\r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL. \r
+  @retval EFI_SUCCESS            Get the protocol interface.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreOpenProtocol (\r
@@ -1068,37 +974,6 @@ CoreOpenProtocol (
   IN  EFI_HANDLE                ControllerHandle,\r
   IN  UINT32                    Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locates the installed protocol handler for the handle, and\r
-  invokes it to obtain the protocol interface. Usage information\r
-  is registered in the protocol data base.\r
-\r
-Arguments:\r
-\r
-  UserHandle     - The handle to obtain the protocol interface on\r
-\r
-  Protocol       - The ID of the protocol \r
-\r
-  Interface      - The location to return the protocol interface\r
-\r
-  ImageHandle       - The handle of the Image that is opening the protocol interface\r
-                    specified by Protocol and Interface.\r
-  \r
-  ControllerHandle  - The controller handle that is requiring this interface.\r
-\r
-  Attributes     - The open mode of the protocol interface specified by Handle\r
-                    and Protocol.\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Protocol is NULL.\r
-  \r
-  EFI_SUCCESS                 - Get the protocol interface.\r
-  \r
---*/\r
 {\r
   EFI_STATUS          Status;\r
   PROTOCOL_INTERFACE  *Prot;\r
@@ -1298,6 +1173,32 @@ Done:
 }\r
 \r
 \r
+\r
+/**\r
+  Closes a protocol on a handle that was opened using OpenProtocol().\r
+\r
+  @param  UserHandle             The handle for the protocol interface that was \r
+                                 previously opened with OpenProtocol(), and is \r
+                                 now being closed. \r
+  @param  Protocol               The published unique identifier of the protocol. \r
+                                 It is the caller's responsibility to pass in a \r
+                                 valid GUID. \r
+  @param  AgentHandle            The handle of the agent that is closing the \r
+                                 protocol interface. \r
+  @param  ControllerHandle       If the agent that opened a protocol is a driver \r
+                                 that follows the EFI Driver Model, then this \r
+                                 parameter is the controller handle that required \r
+                                 the protocol interface. If the agent does not \r
+                                 follow the EFI Driver Model, then this parameter \r
+                                 is optional and may be NULL. \r
+\r
+  @retval EFI_SUCCESS            The protocol instance was closed. \r
+  @retval EFI_INVALID_PARAMETER  Handle, AgentHandle or ControllerHandle is not a \r
+                                 valid EFI_HANDLE. \r
+  @retval EFI_NOT_FOUND          Can not find the specified protocol or \r
+                                 AgentHandle.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreCloseProtocol (\r
@@ -1306,31 +1207,6 @@ CoreCloseProtocol (
   IN  EFI_HANDLE                AgentHandle,\r
   IN  EFI_HANDLE                ControllerHandle  \r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Closes a protocol on a handle that was opened using OpenProtocol().\r
-\r
-Arguments:\r
-\r
-  UserHandle       -  The handle for the protocol interface that was previously opened\r
-                      with OpenProtocol(), and is now being closed.\r
-  Protocol         -  The published unique identifier of the protocol. It is the caller's\r
-                      responsibility to pass in a valid GUID.\r
-  AgentHandle      -  The handle of the agent that is closing the protocol interface.\r
-  ControllerHandle -  If the agent that opened a protocol is a driver that follows the\r
-                      EFI Driver Model, then this parameter is the controller handle\r
-                      that required the protocol interface. If the agent does not follow\r
-                      the EFI Driver Model, then this parameter is optional and may be NULL.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS             - The protocol instance was closed.\r
-  EFI_INVALID_PARAMETER   - Handle, AgentHandle or ControllerHandle is not a valid EFI_HANDLE. \r
-  EFI_NOT_FOUND           - Can not find the specified protocol or AgentHandle.\r
-  \r
---*/\r
 {\r
   EFI_STATUS          Status;\r
   PROTOCOL_INTERFACE  *ProtocolInterface;\r
@@ -1397,6 +1273,18 @@ Done:
 \r
 \r
 \r
+\r
+/**\r
+  Return information about Opened protocols in the system\r
+\r
+  @param  UserHandle             The handle to close the protocol interface on \r
+  @param  Protocol               The ID of the protocol \r
+  @param  EntryBuffer            A pointer to a buffer of open protocol \r
+                                 information in the form of \r
+                                 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures. \r
+  @param  EntryCount             Number of EntryBuffer entries\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreOpenProtocolInformation (\r
@@ -1405,27 +1293,6 @@ CoreOpenProtocolInformation (
   OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,\r
   OUT UINTN                               *EntryCount\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Return information about Opened protocols in the system\r
-\r
-Arguments:\r
-\r
-  UserHandle  - The handle to close the protocol interface on\r
-\r
-  Protocol    - The ID of the protocol \r
-\r
-  EntryBuffer - A pointer to a buffer of open protocol information in the form of\r
-                EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r
-\r
-  EntryCount  - Number of EntryBuffer entries\r
-\r
-Returns:\r
-\r
-  \r
---*/\r
 {\r
   EFI_STATUS                          Status;\r
   PROTOCOL_INTERFACE                  *ProtocolInterface;\r
@@ -1500,6 +1367,30 @@ Done:
 \r
 \r
 \r
+\r
+/**\r
+  Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r
+  from pool.\r
+\r
+  @param  UserHandle             The handle from which to retrieve the list of \r
+                                 protocol interface GUIDs. \r
+  @param  ProtocolBuffer         A pointer to the list of protocol interface GUID \r
+                                 pointers that are installed on Handle. \r
+  @param  ProtocolBufferCount    A pointer to the number of GUID pointers present \r
+                                 in ProtocolBuffer. \r
+\r
+  @retval EFI_SUCCESS            The list of protocol interface GUIDs installed \r
+                                 on Handle was returned in ProtocolBuffer. The \r
+                                 number of protocol interface GUIDs was returned \r
+                                 in ProtocolBufferCount. \r
+  @retval EFI_INVALID_PARAMETER  Handle is NULL. \r
+  @retval EFI_INVALID_PARAMETER  Handle is not a valid EFI_HANDLE. \r
+  @retval EFI_INVALID_PARAMETER  ProtocolBuffer is NULL. \r
+  @retval EFI_INVALID_PARAMETER  ProtocolBufferCount is NULL. \r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the \r
+                                 results.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreProtocolsPerHandle (\r
@@ -1507,35 +1398,6 @@ CoreProtocolsPerHandle (
   OUT EFI_GUID        ***ProtocolBuffer,\r
   OUT UINTN           *ProtocolBufferCount\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r
- from pool.\r
-\r
-Arguments:\r
-\r
-  UserHandle           - The handle from which to retrieve the list of protocol interface\r
-                          GUIDs.\r
-\r
-  ProtocolBuffer       - A pointer to the list of protocol interface GUID pointers that are\r
-                          installed on Handle.\r
-\r
-  ProtocolBufferCount  - A pointer to the number of GUID pointers present in\r
-                          ProtocolBuffer.\r
-\r
-Returns:\r
-  EFI_SUCCESS   -  The list of protocol interface GUIDs installed on Handle was returned in\r
-                   ProtocolBuffer. The number of protocol interface GUIDs was\r
-                   returned in ProtocolBufferCount.\r
-  EFI_INVALID_PARAMETER   -  Handle is NULL.\r
-  EFI_INVALID_PARAMETER   -  Handle is not a valid EFI_HANDLE.\r
-  EFI_INVALID_PARAMETER   -  ProtocolBuffer is NULL.\r
-  EFI_INVALID_PARAMETER   -  ProtocolBufferCount is NULL.\r
-  EFI_OUT_OF_RESOURCES    -  There is not enough pool memory to store the results.\r
-  \r
---*/\r
 {\r
   EFI_STATUS                          Status;\r
   IHANDLE                             *Handle;\r
@@ -1600,48 +1462,35 @@ Done:
 }\r
 \r
 \r
-UINT64\r
-CoreGetHandleDatabaseKey (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   return handle database key.\r
 \r
-Arguments:\r
 \r
-  None\r
-  \r
-Returns:\r
-  \r
-  Handle database key.\r
-  \r
---*/\r
+  @return Handle database key.\r
+\r
+**/\r
+UINT64\r
+CoreGetHandleDatabaseKey (\r
+  VOID\r
+  )\r
 {\r
   return gHandleDatabaseKey;\r
 }\r
 \r
 \r
-VOID\r
-CoreConnectHandlesByKey (\r
-  UINT64  Key\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Go connect any handles that were created or modified while a image executed.\r
 \r
-Arguments:\r
+  @param  Key                    The Key to show that the handle has been \r
+                                 created/modified\r
 \r
-  Key  -  The Key to show that the handle has been created/modified\r
-\r
-Returns:\r
-  \r
-  None\r
---*/\r
+**/\r
+VOID\r
+CoreConnectHandlesByKey (\r
+  UINT64  Key\r
+  )\r
 {\r
   UINTN           Count;\r
   LIST_ENTRY      *Link;\r
index 959e98883172d71dacb5a135f52346b9b1929262..9c423837911d8259980c33a9c1253cc62d886794 100644 (file)
@@ -38,6 +38,18 @@ IHANDLE *
   OUT VOID                  **Interface\r
   );\r
 \r
+/**\r
+  Routine to get the next Handle, when you are searching for all handles.\r
+\r
+  @param  Position               Information about which Handle to seach for. \r
+  @param  Interface              Return the interface structure for the matching \r
+                                 protocol. \r
+\r
+  @retval IHANDLE                An IHANDLE is returned if the next Position is \r
+                                 not the end of the list. A NULL_HANDLE is \r
+                                 returned if it's the end of the list.\r
+\r
+**/\r
 STATIC\r
 IHANDLE *\r
 CoreGetNextLocateAllHandles (\r
@@ -45,6 +57,19 @@ CoreGetNextLocateAllHandles (
   OUT VOID                  **Interface\r
   );\r
 \r
+/**\r
+  Routine to get the next Handle, when you are searching for register protocol\r
+  notifies.\r
+\r
+  @param  Position               Information about which Handle to seach for. \r
+  @param  Interface              Return the interface structure for the matching \r
+                                 protocol. \r
+\r
+  @retval IHANDLE                An IHANDLE is returned if the next Position is \r
+                                 not the end of the list. A NULL_HANDLE is \r
+                                 returned if it's the end of the list.\r
+\r
+**/\r
 STATIC\r
 IHANDLE *\r
 CoreGetNextLocateByRegisterNotify (\r
@@ -52,6 +77,18 @@ CoreGetNextLocateByRegisterNotify (
   OUT VOID                  **Interface\r
   );\r
 \r
+/**\r
+  Routine to get the next Handle, when you are searching for a given protocol.\r
+\r
+  @param  Position               Information about which Handle to seach for. \r
+  @param  Interface              Return the interface structure for the matching \r
+                                 protocol. \r
+\r
+  @retval IHANDLE                An IHANDLE is returned if the next Position is \r
+                                 not the end of the list. A NULL_HANDLE is \r
+                                 returned if it's the end of the list.\r
+\r
+**/\r
 STATIC\r
 IHANDLE *\r
 CoreGetNextLocateByProtocol (\r
@@ -59,13 +96,25 @@ CoreGetNextLocateByProtocol (
   OUT VOID                  **Interface\r
   );\r
 \r
-//\r
-//\r
-//\r
 \r
+/**\r
+  Locates the requested handle(s) and returns them in Buffer.\r
+\r
+  @param  SearchType             The type of search to perform to locate the \r
+                                 handles \r
+  @param  Protocol               The protocol to search for \r
+  @param  SearchKey              Dependant on SearchType \r
+  @param  BufferSize             On input the size of Buffer.  On output the  \r
+                                 size of data returned. \r
+  @param  Buffer                 The buffer to return the results in \r
 \r
+  @retval EFI_BUFFER_TOO_SMALL   Buffer too small, required buffer size is \r
+                                 returned in BufferSize. \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_SUCCESS            Successfully found the requested handle(s) and \r
+                                 returns them in Buffer.\r
 \r
\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLocateHandle (\r
@@ -75,35 +124,6 @@ CoreLocateHandle (
   IN OUT UINTN                *BufferSize,\r
   OUT EFI_HANDLE              *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locates the requested handle(s) and returns them in Buffer.\r
-\r
-Arguments:\r
-\r
-  SearchType  - The type of search to perform to locate the handles\r
-\r
-  Protocol    - The protocol to search for\r
-  \r
-  SearchKey   - Dependant on SearchType\r
-\r
-  BufferSize  - On input the size of Buffer.  On output the \r
-                size of data returned.  \r
-\r
-  Buffer      - The buffer to return the results in\r
-\r
-\r
-Returns:\r
-\r
-  EFI_BUFFER_TOO_SMALL      - Buffer too small, required buffer size is returned in BufferSize.\r
-\r
-  EFI_INVALID_PARAMETER     - Invalid parameter\r
-  \r
-  EFI_SUCCESS               - Successfully found the requested handle(s) and returns them in Buffer.\r
-  \r
---*/\r
 {\r
   EFI_STATUS          Status;\r
   LOCATE_POSITION     Position;\r
@@ -243,29 +263,25 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Routine to get the next Handle, when you are searching for all handles.\r
+\r
+  @param  Position               Information about which Handle to seach for. \r
+  @param  Interface              Return the interface structure for the matching \r
+                                 protocol. \r
+\r
+  @retval IHANDLE                An IHANDLE is returned if the next Position is \r
+                                 not the end of the list. A NULL_HANDLE is \r
+                                 returned if it's the end of the list.\r
+\r
+**/\r
 STATIC\r
 IHANDLE *\r
 CoreGetNextLocateAllHandles (\r
   IN OUT LOCATE_POSITION    *Position,\r
   OUT VOID                  **Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Routine to get the next Handle, when you are searching for all handles.\r
-\r
-Arguments:\r
-\r
-  Position  - Information about which Handle to seach for.\r
-\r
-  Interface - Return the interface structure for the matching protocol.\r
-  \r
-Returns:\r
-  IHANDLE - An IHANDLE is returned if the next Position is not the end of the\r
-            list. A NULL_HANDLE is returned if it's the end of the list.\r
-  \r
---*/\r
 {\r
   IHANDLE     *Handle;\r
 \r
@@ -287,30 +303,26 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Routine to get the next Handle, when you are searching for register protocol\r
+  notifies.\r
+\r
+  @param  Position               Information about which Handle to seach for. \r
+  @param  Interface              Return the interface structure for the matching \r
+                                 protocol. \r
+\r
+  @retval IHANDLE                An IHANDLE is returned if the next Position is \r
+                                 not the end of the list. A NULL_HANDLE is \r
+                                 returned if it's the end of the list.\r
+\r
+**/\r
 STATIC\r
 IHANDLE *\r
 CoreGetNextLocateByRegisterNotify (\r
   IN OUT LOCATE_POSITION    *Position,\r
   OUT VOID                  **Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Routine to get the next Handle, when you are searching for register protocol \r
-  notifies.\r
-\r
-Arguments:\r
-\r
-  Position  - Information about which Handle to seach for.\r
-\r
-  Interface - Return the interface structure for the matching protocol.\r
-  \r
-Returns:\r
-  IHANDLE - An IHANDLE is returned if the next Position is not the end of the\r
-            list. A NULL_HANDLE is returned if it's the end of the list.\r
-  \r
---*/\r
 {\r
   IHANDLE             *Handle;\r
   PROTOCOL_NOTIFY     *ProtNotify;\r
@@ -343,29 +355,25 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Routine to get the next Handle, when you are searching for a given protocol.\r
+\r
+  @param  Position               Information about which Handle to seach for. \r
+  @param  Interface              Return the interface structure for the matching \r
+                                 protocol. \r
+\r
+  @retval IHANDLE                An IHANDLE is returned if the next Position is \r
+                                 not the end of the list. A NULL_HANDLE is \r
+                                 returned if it's the end of the list.\r
+\r
+**/\r
 STATIC\r
 IHANDLE *\r
 CoreGetNextLocateByProtocol (\r
   IN OUT LOCATE_POSITION    *Position,\r
   OUT VOID                  **Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Routine to get the next Handle, when you are searching for a given protocol.\r
-\r
-Arguments:\r
-\r
-  Position  - Information about which Handle to seach for.\r
-\r
-  Interface - Return the interface structure for the matching protocol.\r
-  \r
-Returns:\r
-  IHANDLE - An IHANDLE is returned if the next Position is not the end of the\r
-            list. A NULL_HANDLE is returned if it's the end of the list.\r
-  \r
---*/\r
 {\r
   IHANDLE             *Handle;\r
   LIST_ENTRY          *Link;\r
@@ -410,6 +418,22 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Locates the handle to a device on the device path that best matches the specified protocol.\r
+\r
+  @param  Protocol               The protocol to search for. \r
+  @param  DevicePath             On input, a pointer to a pointer to the device \r
+                                 path. On output, the device path pointer is \r
+                                 modified to point to the remaining part of the \r
+                                 devicepath. \r
+  @param  Device                 A pointer to the returned device handle. \r
+\r
+  @retval EFI_SUCCESS            The resulting handle was returned. \r
+  @retval EFI_NOT_FOUND          No handles matched the search. \r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLocateDevicePath (\r
@@ -417,26 +441,6 @@ CoreLocateDevicePath (
   IN OUT EFI_DEVICE_PATH_PROTOCOL   **DevicePath,\r
   OUT EFI_HANDLE                    *Device\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locates the handle to a device on the device path that best matches the specified protocol.\r
-\r
-Arguments:\r
-\r
-  Protocol    - The protocol to search for.\r
-  DevicePath  - On input, a pointer to a pointer to the device path. On output, the device\r
-                  path pointer is modified to point to the remaining part of the devicepath.\r
-  Device      - A pointer to the returned device handle.              \r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The resulting handle was returned.\r
-  EFI_NOT_FOUND         - No handles matched the search.\r
-  EFI_INVALID_PARAMETER - One of the parameters has an invalid value.\r
-\r
---*/\r
 {\r
   INTN                        SourceSize;\r
   INTN                        Size;\r
@@ -469,7 +473,7 @@ Returns:
   // The source path can only have 1 instance\r
   //\r
   if (CoreIsDevicePathMultiInstance (SourcePath)) {\r
-    DEBUG((EFI_D_ERROR, "LocateDevicePath: Device path has too many instances\n"));\r
+    DEBUG((DEBUG_ERROR, "LocateDevicePath: Device path has too many instances\n"));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -533,39 +537,30 @@ Returns:
 \r
 \r
  \r
-EFI_STATUS\r
-EFIAPI\r
-CoreLocateProtocol (\r
-  IN  EFI_GUID  *Protocol,\r
-  IN  VOID      *Registration OPTIONAL,\r
-  OUT VOID      **Interface\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Return the first Protocol Interface that matches the Protocol GUID. If\r
   Registration is pasased in return a Protocol Instance that was just add\r
   to the system. If Retistration is NULL return the first Protocol Interface\r
   you find.\r
 \r
-Arguments:\r
-\r
-  Protocol     - The protocol to search for\r
-  \r
-  Registration - Optional Registration Key returned from RegisterProtocolNotify() \r
-\r
-  Interface    - Return the Protocol interface (instance).\r
-\r
-Returns:\r
+  @param  Protocol               The protocol to search for \r
+  @param  Registration           Optional Registration Key returned from \r
+                                 RegisterProtocolNotify() \r
+  @param  Interface              Return the Protocol interface (instance). \r
 \r
-  EFI_SUCCESS - If a valid Interface is returned\r
-  \r
-  EFI_INVALID_PARAMETER       - Invalid parameter\r
-  \r
-  EFI_NOT_FOUND               - Protocol interface not found\r
+  @retval EFI_SUCCESS            If a valid Interface is returned \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_NOT_FOUND          Protocol interface not found\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreLocateProtocol (\r
+  IN  EFI_GUID  *Protocol,\r
+  IN  VOID      *Registration OPTIONAL,\r
+  OUT VOID      **Interface\r
+  )\r
 {\r
   EFI_STATUS              Status;\r
   LOCATE_POSITION         Position;\r
@@ -631,6 +626,29 @@ Done:
 \r
 \r
  \r
+\r
+/**\r
+  Function returns an array of handles that support the requested protocol\r
+  in a buffer allocated from pool. This is a version of CoreLocateHandle()\r
+  that allocates a buffer for the caller.\r
+\r
+  @param  SearchType             Specifies which handle(s) are to be returned. \r
+  @param  Protocol               Provides the protocol to search by.    This \r
+                                 parameter is only valid for SearchType \r
+                                 ByProtocol. \r
+  @param  SearchKey              Supplies the search key depending on the \r
+                                 SearchType. \r
+  @param  NumberHandles          The number of handles returned in Buffer. \r
+  @param  Buffer                 A pointer to the buffer to return the requested \r
+                                 array of  handles that support Protocol. \r
+\r
+  @retval EFI_SUCCESS            The result array of handles was returned. \r
+  @retval EFI_NOT_FOUND          No handles match the search. \r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the \r
+                                 matching results. \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLocateHandleBuffer (\r
@@ -640,32 +658,6 @@ CoreLocateHandleBuffer (
   IN OUT UINTN                    *NumberHandles,\r
   OUT EFI_HANDLE                  **Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Function returns an array of handles that support the requested protocol \r
-  in a buffer allocated from pool. This is a version of CoreLocateHandle()\r
-  that allocates a buffer for the caller.\r
-\r
-Arguments:\r
-\r
-  SearchType           - Specifies which handle(s) are to be returned.\r
-  Protocol             - Provides the protocol to search by.   \r
-                         This parameter is only valid for SearchType ByProtocol.\r
-  SearchKey            - Supplies the search key depending on the SearchType.\r
-  NumberHandles      - The number of handles returned in Buffer.\r
-  Buffer               - A pointer to the buffer to return the requested array of \r
-                         handles that support Protocol.\r
-\r
-Returns:\r
-  \r
-  EFI_SUCCESS          - The result array of handles was returned.\r
-  EFI_NOT_FOUND        - No handles match the search. \r
-  EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the matching results.\r
-  EFI_INVALID_PARAMETER   - Invalid parameter\r
-\r
---*/\r
 {\r
   EFI_STATUS          Status;\r
   UINTN               BufferSize;\r
@@ -723,3 +715,4 @@ Returns:
 }\r
 \r
 \r
+\r
index e233104a503520c24b5940e8e8481da0b8fc475a..0b8201ee5efc43e17930ab162f0bbe074d5c9c56 100644 (file)
@@ -89,6 +89,30 @@ typedef struct {
 // Abstractions for reading image contents\r
 //\r
 \r
+\r
+/**\r
+  Opens a file for (simple) reading.  The simple read abstraction\r
+  will access the file either from a memory copy, from a file\r
+  system interface, or from the load file interface.\r
+\r
+  @param  BootPolicy             Policy for Open Image File. \r
+  @param  SourceBuffer           Pointer to the memory location containing copy \r
+                                 of the image to be loaded. \r
+  @param  SourceSize             The size in bytes of SourceBuffer. \r
+  @param  FilePath               The specific file path from which the image is \r
+                                 loaded \r
+  @param  DeviceHandle           Pointer to the return device handle. \r
+  @param  ImageFileHandle        Pointer to the image file handle. \r
+  @param  AuthenticationStatus   Pointer to a caller-allocated UINT32 in which \r
+                                 the authentication status is returned. \r
+\r
+  @retval EFI_SUCCESS            Image file successfully opened. \r
+  @retval EFI_LOAD_ERROR         If the caller passed a copy of the file, and \r
+                                 SourceSize is 0. \r
+  @retval EFI_INVALID_PARAMETER  File path is not valid. \r
+  @retval EFI_NOT_FOUND          File not found.\r
+\r
+**/\r
 EFI_STATUS\r
 CoreOpenImageFile (\r
   IN BOOLEAN                        BootPolicy,\r
@@ -99,33 +123,24 @@ CoreOpenImageFile (
   IN IMAGE_FILE_HANDLE              *ImageFileHandle,\r
   OUT UINT32                        *AuthenticationStatus\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Opens a file for (simple) reading.  The simple read abstraction\r
-    will access the file either from a memory copy, from a file\r
-    system interface, or from the load file interface.\r
-\r
-Arguments:\r
+;\r
 \r
-  BootPolicy    - Policy for Open Image File.\r
-  SourceBuffer  - Pointer to the memory location containing copy\r
-                  of the image to be loaded.\r
-  SourceSize    - The size in bytes of SourceBuffer.\r
-  FilePath      - The specific file path from which the image is loaded\r
-  DeviceHandle  - Pointer to the return device handle.\r
-  ImageFileHandle      - Pointer to the image file handle.\r
-  AuthenticationStatus - Pointer to a caller-allocated UINT32 in which the authentication status is returned.\r
 \r
-Returns:\r
 \r
-    A handle to access the file\r
+/**\r
+  Read image file (specified by UserHandle) into user specified buffer with specified offset\r
+  and length.\r
 \r
---*/\r
-;\r
+  @param  UserHandle             Image file handle \r
+  @param  Offset                 Offset to the source file \r
+  @param  ReadSize               For input, pointer of size to read; For output, \r
+                                 pointer of size actually read. \r
+  @param  Buffer                 Buffer to write into \r
 \r
+  @retval EFI_SUCCESS            Successfully read the specified part of file \r
+                                 into buffer.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreReadImageFile (\r
@@ -134,56 +149,39 @@ CoreReadImageFile (
   IN OUT UINTN    *ReadSize,\r
   OUT     VOID    *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Read image file (specified by UserHandle) into user specified buffer with specified offset\r
-  and length.\r
-\r
-Arguments:\r
-\r
-  UserHandle      - Image file handle\r
-\r
-  Offset          - Offset to the source file\r
-\r
-  ReadSize        - For input, pointer of size to read;\r
-                    For output, pointer of size actually read.\r
-\r
-  Buffer          - Buffer to write into\r
+;\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS     - Successfully read the specified part of file into buffer.\r
+/**\r
+  A function out of date, should be removed.\r
 \r
---*/\r
-;\r
+  @param  ImageFileHandle        Handle of the file to close\r
 \r
+**/\r
 VOID\r
 EFIAPI\r
 CoreCloseImageFile (\r
   IN IMAGE_FILE_HANDLE *ImageFileHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  A function out of date, should be removed.\r
-\r
-Arguments:\r
-\r
-  ImageFileHandle    - Handle of the file to close\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 ;\r
 \r
 //\r
 // Image processing worker functions\r
 //\r
+\r
+/**\r
+  Search a handle to a device on a specified device path that supports a specified protocol,\r
+  interface of that protocol on that handle is another output.\r
+\r
+  @param  Protocol               The protocol to search for \r
+  @param  FilePath               The specified device path \r
+  @param  Interface              Interface of the protocol on the handle \r
+  @param  Handle                 The handle to the device on the specified device \r
+                                 path that supports the protocol. \r
+\r
+  @return Status code.\r
+\r
+**/\r
 EFI_STATUS\r
 CoreDevicePathToInterface (\r
   IN EFI_GUID                     *Protocol,\r
@@ -191,30 +189,30 @@ CoreDevicePathToInterface (
   OUT VOID                        **Interface,\r
   OUT EFI_HANDLE                  *Handle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Search a handle to a device on a specified device path that supports a specified protocol,\r
-  interface of that protocol on that handle is another output.\r
-\r
-Arguments:\r
-\r
-  Protocol      - The protocol to search for\r
-\r
-  FilePath      - The specified device path\r
-\r
-  Interface     - Interface of the protocol on the handle\r
-\r
-  Handle        - The handle to the device on the specified device path that supports the protocol.\r
+;\r
 \r
-Returns:\r
 \r
-  Status code.\r
+/**\r
+  Loads, relocates, and invokes a PE/COFF image\r
 \r
---*/\r
-;\r
+  @param  BootPolicy              If TRUE, indicates that the request originates \r
+                                  from the boot manager, and that the boot \r
+                                  manager is attempting to load FilePath as a \r
+                                  boot selection. \r
+  @param  Pe32Handle              The handle of PE32 image \r
+  @param  Image                   PE image to be loaded \r
+  @param  DstBuffer               The buffer to store the image \r
+  @param  EntryPoint              A pointer to the entry point \r
+  @param  Attribute               The bit mask of attributes to set for the load \r
+                                  PE image \r
+\r
+  @retval EFI_SUCCESS             The file was loaded, relocated, and invoked \r
+  @retval EFI_OUT_OF_RESOURCES    There was not enough memory to load and \r
+                                  relocate the PE/COFF file \r
+  @retval EFI_INVALID_PARAMETER   Invalid parameter \r
+  @retval EFI_BUFFER_TOO_SMALL    Buffer for image is too small\r
 \r
+**/\r
 EFI_STATUS\r
 CoreLoadPeImage (\r
   IN  BOOLEAN                    BootPolicy,\r
@@ -224,76 +222,36 @@ CoreLoadPeImage (
   OUT EFI_PHYSICAL_ADDRESS       *EntryPoint  OPTIONAL,\r
   IN  UINT32                     Attribute\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Loads, relocates, and invokes a PE/COFF image\r
-\r
-Arguments:\r
-\r
-  BootPolicy       - Policy for Open Image File.\r
-  Pe32Handle       - The handle of PE32 image\r
-  Image            - PE image to be loaded\r
-  DstBuffer        - The buffer to store the image\r
-  EntryPoint       - A pointer to the entry point\r
-  Attribute        - The bit mask of attributes to set for the load PE image\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The file was loaded, relocated, and invoked\r
+;\r
 \r
-  EFI_OUT_OF_RESOURCES  - There was not enough memory to load and relocate the PE/COFF file\r
 \r
-  EFI_INVALID_PARAMETER - Invalid parameter\r
+/**\r
+  Get the image's private data from its handle.\r
 \r
-  EFI_BUFFER_TOO_SMALL  - Buffer for image is too small\r
+  @param  ImageHandle             The image handle \r
 \r
---*/\r
-;\r
+  @return Return the image private data associated with ImageHandle.\r
 \r
+**/\r
 LOADED_IMAGE_PRIVATE_DATA *\r
 CoreLoadedImageInfo (\r
   IN EFI_HANDLE  ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  ImageHandle - TODO: add argument description\r
+;\r
 \r
-Returns:\r
 \r
-  TODO: add return values\r
+/**\r
+  Unloads EFI image from memory.\r
 \r
---*/\r
-;\r
+  @param  Image                   EFI image \r
+  @param  FreePage                Free allocated pages\r
 \r
+**/\r
 VOID\r
 CoreUnloadAndCloseImage (\r
   IN LOADED_IMAGE_PRIVATE_DATA  *Image,\r
   IN BOOLEAN                    FreePage\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Unloads EFI image from memory.\r
-\r
-Arguments:\r
-\r
-  Image      - EFI image\r
-  FreePage   - Free allocated pages\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 ;\r
 \r
 \r
@@ -301,6 +259,36 @@ Returns:
 // Exported Image functions\r
 //\r
 \r
+\r
+/**\r
+  Loads an EFI image into memory and returns a handle to the image with extended parameters.\r
+\r
+  @param  This                    Calling context \r
+  @param  ParentImageHandle       The caller's image handle. \r
+  @param  FilePath                The specific file path from which the image is \r
+                                  loaded. \r
+  @param  SourceBuffer            If not NULL, a pointer to the memory location \r
+                                  containing a copy of the image to be loaded. \r
+  @param  SourceSize              The size in bytes of SourceBuffer. \r
+  @param  DstBuffer               The buffer to store the image. \r
+  @param  NumberOfPages           For input, specifies the space size of the \r
+                                  image by caller if not NULL. For output, \r
+                                  specifies the actual space size needed. \r
+  @param  ImageHandle             Image handle for output. \r
+  @param  EntryPoint              Image entry point for output. \r
+  @param  Attribute               The bit mask of attributes to set for the load \r
+                                  PE image. \r
+\r
+  @retval EFI_SUCCESS             The image was loaded into memory. \r
+  @retval EFI_NOT_FOUND           The FilePath was not found. \r
+  @retval EFI_INVALID_PARAMETER   One of the parameters has an invalid value. \r
+  @retval EFI_UNSUPPORTED         The image type is not supported, or the device \r
+                                  path cannot be parsed to locate the proper \r
+                                  protocol for loading the file. \r
+  @retval EFI_OUT_OF_RESOURCES    Image was not loaded due to insufficient \r
+                                  resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLoadImageEx (\r
@@ -315,63 +303,25 @@ CoreLoadImageEx (
   OUT EFI_PHYSICAL_ADDRESS             *EntryPoint         OPTIONAL,\r
   IN  UINT32                           Attribute\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
 \r
-  Loads an EFI image into memory and returns a handle to the image with extended parameters.\r
+/**\r
+  Unload the specified image.\r
 \r
-Arguments:\r
-\r
-  ParentImageHandle   - The caller's image handle.\r
-  FilePath            - The specific file path from which the image is loaded.\r
-  SourceBuffer        - If not NULL, a pointer to the memory location containing a copy of\r
-                        the image to be loaded.\r
-  SourceSize          - The size in bytes of SourceBuffer.\r
-  DstBuffer           - The buffer to store the image.\r
-  NumberOfPages       - For input, specifies the space size of the image by caller if not NULL.\r
-                        For output, specifies the actual space size needed.\r
-  ImageHandle         - Image handle for output.\r
-  EntryPoint          - Image entry point for output.\r
-  Attribute           - The bit mask of attributes to set for the load PE image.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS            - The image was loaded into memory.\r
-  EFI_NOT_FOUND          - The FilePath was not found.\r
-  EFI_INVALID_PARAMETER  - One of the parameters has an invalid value.\r
-  EFI_UNSUPPORTED        - The image type is not supported, or the device path cannot be\r
-                           parsed to locate the proper protocol for loading the file.\r
-  EFI_OUT_OF_RESOURCES   - Image was not loaded due to insufficient resources.\r
---*/\r
-;\r
+  @param  This                    Indicates the calling context. \r
+  @param  ImageHandle             The specified image handle. \r
+\r
+  @retval EFI_INVALID_PARAMETER   Image handle is NULL. \r
+  @retval EFI_UNSUPPORTED         Attempt to unload an unsupported image. \r
+  @retval EFI_SUCCESS             Image successfully unloaded.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreUnloadImageEx (\r
   IN EFI_PE32_IMAGE_PROTOCOL            *This,\r
   IN EFI_HANDLE                         ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Unload the specified image.\r
-\r
-Arguments:\r
-\r
-  This              - Indicates the calling context.\r
-\r
-  ImageHandle       - The specified image handle.\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Image handle is NULL.\r
-\r
-  EFI_UNSUPPORTED             - Attempt to unload an unsupported image.\r
-\r
-  EFI_SUCCESS                 - Image successfully unloaded.\r
-\r
---*/\r
 ;\r
 #endif\r
index 95528b89961e2808a20f9e1c98bb181fd878c384..7c66f07d760dc4f56f2b0c9797504b75a9d08e12 100644 (file)
@@ -72,26 +72,20 @@ LOADED_IMAGE_PRIVATE_DATA mCorePrivateImage  = {
 };\r
 \r
 \r
-EFI_STATUS\r
-CoreInitializeImageServices (\r
-  IN  VOID *HobStart\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Add the Image Services to EFI Boot Services Table and install the protocol\r
   interfaces for this image.\r
 \r
-Arguments:\r
+  @param  HobStart                The HOB to initialize \r
 \r
-  HobStart        - The HOB to initialize\r
+  @return Status code.\r
 \r
-Returns:\r
-\r
-  Status code.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreInitializeImageServices (\r
+  IN  VOID *HobStart\r
+  )\r
 {\r
   EFI_STATUS                        Status;\r
   LOADED_IMAGE_PRIVATE_DATA         *Image;\r
@@ -161,6 +155,28 @@ Returns:
            );\r
 }\r
 \r
+\r
+/**\r
+  Loads, relocates, and invokes a PE/COFF image\r
+\r
+  @param  BootPolicy              If TRUE, indicates that the request originates \r
+                                  from the boot manager, and that the boot \r
+                                  manager is attempting to load FilePath as a \r
+                                  boot selection. \r
+  @param  Pe32Handle              The handle of PE32 image \r
+  @param  Image                   PE image to be loaded \r
+  @param  DstBuffer               The buffer to store the image \r
+  @param  EntryPoint              A pointer to the entry point \r
+  @param  Attribute               The bit mask of attributes to set for the load \r
+                                  PE image \r
+\r
+  @retval EFI_SUCCESS             The file was loaded, relocated, and invoked \r
+  @retval EFI_OUT_OF_RESOURCES    There was not enough memory to load and \r
+                                  relocate the PE/COFF file \r
+  @retval EFI_INVALID_PARAMETER   Invalid parameter \r
+  @retval EFI_BUFFER_TOO_SMALL    Buffer for image is too small\r
+\r
+**/\r
 EFI_STATUS\r
 CoreLoadPeImage (\r
   IN BOOLEAN                     BootPolicy,  \r
@@ -170,32 +186,6 @@ CoreLoadPeImage (
   OUT EFI_PHYSICAL_ADDRESS       *EntryPoint  OPTIONAL,\r
   IN  UINT32                     Attribute\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Loads, relocates, and invokes a PE/COFF image\r
-\r
-Arguments:\r
-  BootPolicy       - If TRUE, indicates that the request originates from the boot manager,\r
-                     and that the boot manager is attempting to load FilePath as a boot selection.\r
-  Pe32Handle       - The handle of PE32 image\r
-  Image            - PE image to be loaded\r
-  DstBuffer        - The buffer to store the image\r
-  EntryPoint       - A pointer to the entry point\r
-  Attribute        - The bit mask of attributes to set for the load PE image\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS          - The file was loaded, relocated, and invoked\r
-\r
-  EFI_OUT_OF_RESOURCES - There was not enough memory to load and relocate the PE/COFF file\r
-\r
-  EFI_INVALID_PARAMETER - Invalid parameter\r
-\r
-  EFI_BUFFER_TOO_SMALL  - Buffer for image is too small\r
-\r
---*/\r
 {\r
   EFI_STATUS                Status;\r
   BOOLEAN                   DstBufAlocated;\r
@@ -477,7 +467,7 @@ Returns:
     CHAR8 EfiFileName[256];\r
     \r
     if (Image->ImageContext.Machine != IMAGE_FILE_MACHINE_IA64) {\r
-      DEBUG ((EFI_D_INFO | EFI_D_LOAD, \r
+      DEBUG ((DEBUG_INFO | DEBUG_LOAD, \r
               "Loading driver at 0x%10p EntryPoint=0x%10p ", \r
               (VOID *)(UINTN)Image->ImageContext.ImageAddress, \r
               (VOID *)(UINTN)Image->ImageContext.EntryPoint));\r
@@ -485,7 +475,7 @@ Returns:
       //\r
       // For IPF Image, the real entry point should be print.\r
       //      \r
-      DEBUG ((EFI_D_INFO | EFI_D_LOAD, \r
+      DEBUG ((DEBUG_INFO | DEBUG_LOAD, \r
               "Loading driver at 0x%10p EntryPoint=0x%10p ", \r
               (VOID *)(UINTN)Image->ImageContext.ImageAddress, \r
               (VOID *)(UINTN)(*(UINT64 *)(UINTN)Image->ImageContext.EntryPoint)));\r
@@ -517,9 +507,9 @@ Returns:
           break;\r
         }\r
       }\r
-      DEBUG ((EFI_D_INFO | EFI_D_LOAD, "%a", EfiFileName)); // &Image->ImageContext.PdbPointer[StartIndex]));\r
+      DEBUG ((DEBUG_INFO | DEBUG_LOAD, "%a", EfiFileName)); // &Image->ImageContext.PdbPointer[StartIndex]));\r
     }\r
-    DEBUG ((EFI_D_INFO | EFI_D_LOAD, "\n"));\r
+    DEBUG ((DEBUG_INFO | DEBUG_LOAD, "\n"));\r
 \r
   DEBUG_CODE_END ();\r
 \r
@@ -543,25 +533,19 @@ Done:
 }\r
 \r
 \r
-LOADED_IMAGE_PRIVATE_DATA *\r
-CoreLoadedImageInfo (\r
-  IN EFI_HANDLE  ImageHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Get the image's private data from its handle.\r
 \r
-Arguments:\r
+  @param  ImageHandle             The image handle \r
 \r
-  ImageHandle     - The image handle\r
+  @return Return the image private data associated with ImageHandle.\r
 \r
-Returns:\r
-\r
-  Return the image private data associated with ImageHandle.\r
-\r
---*/\r
+**/\r
+LOADED_IMAGE_PRIVATE_DATA *\r
+CoreLoadedImageInfo (\r
+  IN EFI_HANDLE  ImageHandle\r
+  )\r
 {\r
   EFI_STATUS                 Status;\r
   EFI_LOADED_IMAGE_PROTOCOL  *LoadedImage;\r
@@ -575,13 +559,50 @@ Returns:
   if (!EFI_ERROR (Status)) {\r
     Image = LOADED_IMAGE_PRIVATE_DATA_FROM_THIS (LoadedImage);\r
   } else {\r
-    DEBUG ((EFI_D_LOAD, "CoreLoadedImageInfo: Not an ImageHandle %x\n", ImageHandle));\r
+    DEBUG ((DEBUG_LOAD, "CoreLoadedImageInfo: Not an ImageHandle %x\n", ImageHandle));\r
     Image = NULL;\r
   }\r
 \r
   return Image;\r
 }\r
 \r
+\r
+/**\r
+  Loads an EFI image into memory and returns a handle to the image.\r
+\r
+  @param  BootPolicy              If TRUE, indicates that the request originates \r
+                                  from the boot manager, and that the boot \r
+                                  manager is attempting to load FilePath as a \r
+                                  boot selection. \r
+  @param  ParentImageHandle       The caller's image handle. \r
+  @param  FilePath                The specific file path from which the image is \r
+                                  loaded. \r
+  @param  SourceBuffer            If not NULL, a pointer to the memory location \r
+                                  containing a copy of the image to be loaded. \r
+  @param  SourceSize              The size in bytes of SourceBuffer. \r
+  @param  DstBuffer               The buffer to store the image \r
+  @param  NumberOfPages           If not NULL, it inputs a pointer to the page \r
+                                  number of DstBuffer and outputs a pointer to \r
+                                  the page number of the image. If this number is \r
+                                  not enough,  return EFI_BUFFER_TOO_SMALL and \r
+                                  this parameter contains the required number. \r
+  @param  ImageHandle             Pointer to the returned image handle that is \r
+                                  created when the image is successfully loaded. \r
+  @param  EntryPoint              A pointer to the entry point \r
+  @param  Attribute               The bit mask of attributes to set for the load \r
+                                  PE image \r
+\r
+  @retval EFI_SUCCESS             The image was loaded into memory. \r
+  @retval EFI_NOT_FOUND           The FilePath was not found. \r
+  @retval EFI_INVALID_PARAMETER   One of the parameters has an invalid value. \r
+  @retval EFI_BUFFER_TOO_SMALL    The buffer is too small \r
+  @retval EFI_UNSUPPORTED         The image type is not supported, or the device \r
+                                  path cannot be parsed to locate the proper \r
+                                  protocol for loading the file. \r
+  @retval EFI_OUT_OF_RESOURCES    Image was not loaded due to insufficient \r
+                                  resources.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreLoadImageCommon (\r
@@ -596,40 +617,6 @@ CoreLoadImageCommon (
   OUT EFI_PHYSICAL_ADDRESS             *EntryPoint         OPTIONAL,\r
   IN  UINT32                           Attribute\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Loads an EFI image into memory and returns a handle to the image.\r
-\r
-Arguments:\r
-\r
-  BootPolicy          - If TRUE, indicates that the request originates from the boot manager,\r
-                        and that the boot manager is attempting to load FilePath as a boot selection.\r
-  ParentImageHandle   - The caller's image handle.\r
-  FilePath            - The specific file path from which the image is loaded.\r
-  SourceBuffer        - If not NULL, a pointer to the memory location containing a copy of\r
-                        the image to be loaded.\r
-  SourceSize          - The size in bytes of SourceBuffer.\r
-  DstBuffer           - The buffer to store the image\r
-  NumberOfPages       - If not NULL, it inputs a pointer to the page number of DstBuffer and outputs\r
-                        a pointer to the page number of the image. If this number is not enough, \r
-                        return EFI_BUFFER_TOO_SMALL and this parameter contains the required number.\r
-  ImageHandle         - Pointer to the returned image handle that is created when the image\r
-                        is successfully loaded.\r
-  EntryPoint          - A pointer to the entry point\r
-  Attribute           - The bit mask of attributes to set for the load PE image\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS            - The image was loaded into memory.\r
-  EFI_NOT_FOUND          - The FilePath was not found.\r
-  EFI_INVALID_PARAMETER  - One of the parameters has an invalid value.\r
-  EFI_BUFFER_TOO_SMALL   - The buffer is too small\r
-  EFI_UNSUPPORTED        - The image type is not supported, or the device path cannot be\r
-                           parsed to locate the proper protocol for loading the file.\r
-  EFI_OUT_OF_RESOURCES   - Image was not loaded due to insufficient resources.\r
---*/\r
 {\r
   LOADED_IMAGE_PRIVATE_DATA  *Image;\r
   LOADED_IMAGE_PRIVATE_DATA  *ParentImage;\r
@@ -656,7 +643,7 @@ Returns:
 \r
   ParentImage = CoreLoadedImageInfo (ParentImageHandle);\r
   if (ParentImage == NULL) {\r
-    DEBUG((EFI_D_LOAD|EFI_D_ERROR, "LoadImageEx: Parent handle not an image handle\n"));\r
+    DEBUG((DEBUG_LOAD|DEBUG_ERROR, "LoadImageEx: Parent handle not an image handle\n"));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -721,7 +708,7 @@ Returns:
   Image->Signature         = LOADED_IMAGE_PRIVATE_DATA_SIGNATURE;\r
   Image->Info.SystemTable  = gDxeCoreST;\r
   Image->Info.DeviceHandle = DeviceHandle;\r
-  Image->Info.Revision     = EFI_LOADED_IMAGE_INFORMATION_REVISION;\r
+  Image->Info.Revision     = EFI_LOADED_IMAGE_PROTOCOL_REVISION;\r
   Image->Info.FilePath     = CoreDuplicateDevicePath (FilePath);\r
   Image->Info.ParentHandle = ParentImageHandle;\r
 \r
@@ -836,6 +823,33 @@ Done:
 \r
 \r
 \r
+\r
+/**\r
+  Loads an EFI image into memory and returns a handle to the image.\r
+\r
+  @param  BootPolicy              If TRUE, indicates that the request originates \r
+                                  from the boot manager, and that the boot \r
+                                  manager is attempting to load FilePath as a \r
+                                  boot selection. \r
+  @param  ParentImageHandle       The caller's image handle. \r
+  @param  FilePath                The specific file path from which the image is \r
+                                  loaded. \r
+  @param  SourceBuffer            If not NULL, a pointer to the memory location \r
+                                  containing a copy of the image to be loaded. \r
+  @param  SourceSize              The size in bytes of SourceBuffer. \r
+  @param  ImageHandle             Pointer to the returned image handle that is \r
+                                  created when the image is successfully loaded. \r
+\r
+  @retval EFI_SUCCESS             The image was loaded into memory. \r
+  @retval EFI_NOT_FOUND           The FilePath was not found. \r
+  @retval EFI_INVALID_PARAMETER   One of the parameters has an invalid value. \r
+  @retval EFI_UNSUPPORTED         The image type is not supported, or the device \r
+                                  path cannot be parsed to locate the proper \r
+                                  protocol for loading the file. \r
+  @retval EFI_OUT_OF_RESOURCES    Image was not loaded due to insufficient \r
+                                  resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLoadImage (\r
@@ -846,33 +860,6 @@ CoreLoadImage (
   IN UINTN                      SourceSize,\r
   OUT EFI_HANDLE                *ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Loads an EFI image into memory and returns a handle to the image.\r
-\r
-Arguments:\r
-\r
-  BootPolicy          - If TRUE, indicates that the request originates from the boot manager,\r
-                        and that the boot manager is attempting to load FilePath as a boot selection.\r
-  ParentImageHandle   - The caller's image handle.\r
-  FilePath            - The specific file path from which the image is loaded.\r
-  SourceBuffer        - If not NULL, a pointer to the memory location containing a copy of\r
-                        the image to be loaded.\r
-  SourceSize          - The size in bytes of SourceBuffer.\r
-  ImageHandle         - Pointer to the returned image handle that is created when the image\r
-                        is successfully loaded.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS            - The image was loaded into memory.\r
-  EFI_NOT_FOUND          - The FilePath was not found.\r
-  EFI_INVALID_PARAMETER  - One of the parameters has an invalid value.\r
-  EFI_UNSUPPORTED        - The image type is not supported, or the device path cannot be\r
-                           parsed to locate the proper protocol for loading the file.\r
-  EFI_OUT_OF_RESOURCES   - Image was not loaded due to insufficient resources.\r
---*/\r
 {\r
   EFI_STATUS    Status;\r
 \r
@@ -897,6 +884,36 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Loads an EFI image into memory and returns a handle to the image with extended parameters.\r
+\r
+  @param  This                    Calling context \r
+  @param  ParentImageHandle       The caller's image handle. \r
+  @param  FilePath                The specific file path from which the image is \r
+                                  loaded. \r
+  @param  SourceBuffer            If not NULL, a pointer to the memory location \r
+                                  containing a copy of the image to be loaded. \r
+  @param  SourceSize              The size in bytes of SourceBuffer. \r
+  @param  DstBuffer               The buffer to store the image. \r
+  @param  NumberOfPages           For input, specifies the space size of the \r
+                                  image by caller if not NULL. For output, \r
+                                  specifies the actual space size needed. \r
+  @param  ImageHandle             Image handle for output. \r
+  @param  EntryPoint              Image entry point for output. \r
+  @param  Attribute               The bit mask of attributes to set for the load \r
+                                  PE image. \r
+\r
+  @retval EFI_SUCCESS             The image was loaded into memory. \r
+  @retval EFI_NOT_FOUND           The FilePath was not found. \r
+  @retval EFI_INVALID_PARAMETER   One of the parameters has an invalid value. \r
+  @retval EFI_UNSUPPORTED         The image type is not supported, or the device \r
+                                  path cannot be parsed to locate the proper \r
+                                  protocol for loading the file. \r
+  @retval EFI_OUT_OF_RESOURCES    Image was not loaded due to insufficient \r
+                                  resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreLoadImageEx (\r
@@ -911,36 +928,6 @@ CoreLoadImageEx (
   OUT EFI_PHYSICAL_ADDRESS             *EntryPoint         OPTIONAL,\r
   IN  UINT32                           Attribute\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Loads an EFI image into memory and returns a handle to the image with extended parameters.\r
-\r
-Arguments:\r
-\r
-  This                - Calling context\r
-  ParentImageHandle   - The caller's image handle.\r
-  FilePath            - The specific file path from which the image is loaded.\r
-  SourceBuffer        - If not NULL, a pointer to the memory location containing a copy of\r
-                        the image to be loaded.\r
-  SourceSize          - The size in bytes of SourceBuffer.\r
-  DstBuffer           - The buffer to store the image.\r
-  NumberOfPages       - For input, specifies the space size of the image by caller if not NULL.\r
-                        For output, specifies the actual space size needed.\r
-  ImageHandle         - Image handle for output.\r
-  EntryPoint          - Image entry point for output.\r
-  Attribute           - The bit mask of attributes to set for the load PE image.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS            - The image was loaded into memory.\r
-  EFI_NOT_FOUND          - The FilePath was not found.\r
-  EFI_INVALID_PARAMETER  - One of the parameters has an invalid value.\r
-  EFI_UNSUPPORTED        - The image type is not supported, or the device path cannot be\r
-                           parsed to locate the proper protocol for loading the file.\r
-  EFI_OUT_OF_RESOURCES   - Image was not loaded due to insufficient resources.\r
---*/\r
 {\r
   return CoreLoadImageCommon (\r
            TRUE,\r
@@ -956,6 +943,25 @@ Returns:
            );\r
 }\r
 \r
+\r
+/**\r
+  Transfer control to a loaded image's entry point.\r
+\r
+  @param  ImageHandle             Handle of image to be started. \r
+  @param  ExitDataSize            Pointer of the size to ExitData \r
+  @param  ExitData                Pointer to a pointer to a data buffer that \r
+                                  includes a Null-terminated Unicode string, \r
+                                  optionally followed by additional binary data. \r
+                                  The string is a description that the caller may \r
+                                  use to further indicate the reason for the \r
+                                  image's exit. \r
+\r
+  @retval EFI_INVALID_PARAMETER   Invalid parameter \r
+  @retval EFI_OUT_OF_RESOURCES    No enough buffer to allocate \r
+  @retval EFI_SUCCESS             Successfully transfer control to the image's \r
+                                  entry point.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreStartImage (\r
@@ -963,32 +969,6 @@ CoreStartImage (
   OUT UINTN      *ExitDataSize,\r
   OUT CHAR16     **ExitData  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Transfer control to a loaded image's entry point.\r
-\r
-Arguments:\r
-\r
-  ImageHandle     - Handle of image to be started.\r
-\r
-  ExitDataSize    - Pointer of the size to ExitData\r
-\r
-  ExitData        - Pointer to a pointer to a data buffer that includes a Null-terminated\r
-                    Unicode string, optionally followed by additional binary data. The string\r
-                    is a description that the caller may use to further indicate the reason for\r
-                    the image's exit.\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 transfer control to the image's entry point.\r
-\r
---*/\r
 {\r
   EFI_STATUS                    Status;\r
   LOADED_IMAGE_PRIVATE_DATA     *Image;\r
@@ -1048,7 +1028,7 @@ Returns:
     //\r
     DEBUG_CODE_BEGIN ();\r
       if (EFI_ERROR (Image->Status)) {\r
-        DEBUG ((EFI_D_ERROR, "Error: Image at %10p start failed: %r\n", Image->Info.ImageBase, Image->Status));\r
+        DEBUG ((DEBUG_ERROR, "Error: Image at %10p start failed: %r\n", Image->Info.ImageBase, Image->Status));\r
       }\r
     DEBUG_CODE_END ();\r
 \r
@@ -1083,15 +1063,15 @@ Returns:
     if (Image->ExitDataSize != 0 || Image->ExitData != NULL) {\r
 \r
       DEBUG (\r
-        (EFI_D_LOAD,\r
+        (DEBUG_LOAD,\r
         "StartImage: ExitDataSize %d, ExitData %x",\r
                             Image->ExitDataSize,\r
         Image->ExitData)\r
         );\r
       if (Image->ExitData != NULL) {\r
-        DEBUG ((EFI_D_LOAD, " (%hs)", Image->ExitData));\r
+        DEBUG ((DEBUG_LOAD, " (%hs)", Image->ExitData));\r
       }\r
-      DEBUG ((EFI_D_LOAD, "\n"));\r
+      DEBUG ((DEBUG_LOAD, "\n"));\r
     }\r
   DEBUG_CODE_END ();\r
 \r
@@ -1130,27 +1110,19 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Unloads EFI image from memory.\r
+\r
+  @param  Image                   EFI image \r
+  @param  FreePage                Free allocated pages\r
+\r
+**/\r
 VOID\r
 CoreUnloadAndCloseImage (\r
   IN LOADED_IMAGE_PRIVATE_DATA  *Image,\r
   IN BOOLEAN                    FreePage\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Unloads EFI image from memory.\r
-\r
-Arguments:\r
-\r
-  Image      - EFI image\r
-  FreePage   - Free allocated pages\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   EFI_STATUS                          Status;\r
   UINTN                               HandleCount;\r
@@ -1281,6 +1253,30 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Terminates the currently loaded EFI image and returns control to boot services.\r
+\r
+  @param  ImageHandle             Handle that identifies the image. This \r
+                                  parameter is passed to the image on entry. \r
+  @param  Status                  The image's exit code. \r
+  @param  ExitDataSize            The size, in bytes, of ExitData. Ignored if \r
+                                  ExitStatus is EFI_SUCCESS. \r
+  @param  ExitData                Pointer to a data buffer that includes a \r
+                                  Null-terminated Unicode string, optionally \r
+                                  followed by additional binary data. The string \r
+                                  is a description that the caller may use to \r
+                                  further indicate the reason for the image's \r
+                                  exit. \r
+\r
+  @retval EFI_INVALID_PARAMETER   Image handle is NULL or it is not current \r
+                                  image. \r
+  @retval EFI_SUCCESS             Successfully terminates the currently loaded \r
+                                  EFI image. \r
+  @retval EFI_ACCESS_DENIED       Should never reach there. \r
+  @retval EFI_OUT_OF_RESOURCES    Could not allocate pool\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreExit (\r
@@ -1289,35 +1285,6 @@ CoreExit (
   IN UINTN       ExitDataSize,\r
   IN CHAR16      *ExitData  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Terminates the currently loaded EFI image and returns control to boot services.\r
-\r
-Arguments:\r
-\r
-  ImageHandle       - Handle that identifies the image. This parameter is passed to the image\r
-                      on entry.\r
-  Status            - The image's exit code.\r
-  ExitDataSize      - The size, in bytes, of ExitData. Ignored if ExitStatus is\r
-                      EFI_SUCCESS.\r
-  ExitData          - Pointer to a data buffer that includes a Null-terminated Unicode string,\r
-                      optionally followed by additional binary data. The string is a\r
-                      description that the caller may use to further indicate the reason for\r
-                      the image's exit.\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER     - Image handle is NULL or it is not current image.\r
-\r
-  EFI_SUCCESS               - Successfully terminates the currently loaded EFI image.\r
-\r
-  EFI_ACCESS_DENIED         - Should never reach there.\r
-\r
-  EFI_OUT_OF_RESOURCES      - Could not allocate pool\r
-\r
---*/\r
 {\r
   LOADED_IMAGE_PRIVATE_DATA  *Image;\r
   EFI_TPL                    OldTpl;\r
@@ -1347,7 +1314,7 @@ Returns:
   // Image has been started, verify this image can exit\r
   //\r
   if (Image != mCurrentImage) {\r
-    DEBUG ((EFI_D_LOAD|EFI_D_ERROR, "Exit: Image is not exitable image\n"));\r
+    DEBUG ((DEBUG_LOAD|DEBUG_ERROR, "Exit: Image is not exitable image\n"));\r
     Status = EFI_INVALID_PARAMETER;\r
     goto Done;\r
   }\r
@@ -1388,28 +1355,24 @@ Done:
 \r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-CoreUnloadImage (\r
-  IN EFI_HANDLE  ImageHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Unloads an image.\r
 \r
-Arguments:\r
-\r
-  ImageHandle           - Handle that identifies the image to be unloaded.\r
+  @param  ImageHandle             Handle that identifies the image to be \r
+                                  unloaded. \r
 \r
-Returns:\r
+  @retval EFI_SUCCESS             The image has been unloaded. \r
+  @retval EFI_UNSUPPORTED         The image has been sarted, and does not support \r
+                                  unload. \r
+  @retval EFI_INVALID_PARAMPETER  ImageHandle is not a valid image handle.\r
 \r
- EFI_SUCCESS            - The image has been unloaded.\r
- EFI_UNSUPPORTED        - The image has been sarted, and does not support unload.\r
- EFI_INVALID_PARAMPETER - ImageHandle is not a valid image handle.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreUnloadImage (\r
+  IN EFI_HANDLE  ImageHandle\r
+  )\r
 {\r
   EFI_STATUS                 Status;\r
   LOADED_IMAGE_PRIVATE_DATA  *Image;\r
@@ -1460,33 +1423,24 @@ Done:
 }\r
 \r
 \r
+\r
+/**\r
+  Unload the specified image.\r
+\r
+  @param  This                    Indicates the calling context. \r
+  @param  ImageHandle             The specified image handle. \r
+\r
+  @retval EFI_INVALID_PARAMETER   Image handle is NULL. \r
+  @retval EFI_UNSUPPORTED         Attempt to unload an unsupported image. \r
+  @retval EFI_SUCCESS             Image successfully unloaded.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreUnloadImageEx (\r
   IN EFI_PE32_IMAGE_PROTOCOL  *This,\r
   IN EFI_HANDLE                         ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Unload the specified image.\r
-\r
-Arguments:\r
-\r
-  This              - Indicates the calling context.\r
-\r
-  ImageHandle       - The specified image handle.\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Image handle is NULL.\r
-\r
-  EFI_UNSUPPORTED             - Attempt to unload an unsupported image.\r
-\r
-  EFI_SUCCESS                 - Image successfully unloaded.\r
-\r
---*/\r
 {\r
   return CoreUnloadImage (ImageHandle);\r
 }\r
index 7ff867e18105f35218c6c17b051124b958eda0f6..7cb2576c4f501d7b3e40d6247db6155d1a4bd1b1 100644 (file)
@@ -15,6 +15,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <DxeMain.h>\r
 \r
+\r
+/**\r
+  Opens a file for (simple) reading.  The simple read abstraction\r
+  will access the file either from a memory copy, from a file\r
+  system interface, or from the load file interface.\r
+\r
+  @param  BootPolicy             Policy for Open Image File. \r
+  @param  SourceBuffer           Pointer to the memory location containing copy \r
+                                 of the image to be loaded. \r
+  @param  SourceSize             The size in bytes of SourceBuffer. \r
+  @param  FilePath               The specific file path from which the image is \r
+                                 loaded \r
+  @param  DeviceHandle           Pointer to the return device handle. \r
+  @param  ImageFileHandle        Pointer to the image file handle. \r
+  @param  AuthenticationStatus   Pointer to a caller-allocated UINT32 in which \r
+                                 the authentication status is returned. \r
+\r
+  @retval EFI_SUCCESS            Image file successfully opened. \r
+  @retval EFI_LOAD_ERROR         If the caller passed a copy of the file, and \r
+                                 SourceSize is 0. \r
+  @retval EFI_INVALID_PARAMETER  File path is not valid. \r
+  @retval EFI_NOT_FOUND          File not found.\r
+\r
+**/\r
 EFI_STATUS\r
 CoreOpenImageFile (\r
   IN BOOLEAN                        BootPolicy,\r
@@ -25,36 +49,6 @@ CoreOpenImageFile (
   IN IMAGE_FILE_HANDLE              *ImageFileHandle,\r
   OUT UINT32                        *AuthenticationStatus\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Opens a file for (simple) reading.  The simple read abstraction\r
-    will access the file either from a memory copy, from a file\r
-    system interface, or from the load file interface.\r
-\r
-Arguments:\r
-\r
-  BootPolicy    - Policy for Open Image File.\r
-  SourceBuffer  - Pointer to the memory location containing copy\r
-                  of the image to be loaded.\r
-  SourceSize    - The size in bytes of SourceBuffer.\r
-  FilePath      - The specific file path from which the image is loaded\r
-  DeviceHandle  - Pointer to the return device handle.\r
-  ImageFileHandle      - Pointer to the image file handle.\r
-  AuthenticationStatus - Pointer to a caller-allocated UINT32 in which the authentication status is returned.\r
-\r
-Returns:\r
-\r
-    EFI_SUCCESS     - Image file successfully opened.\r
-\r
-    EFI_LOAD_ERROR  - If the caller passed a copy of the file, and SourceSize is 0.\r
-\r
-    EFI_INVALID_PARAMETER   - File path is not valid.\r
-\r
-    EFI_NOT_FOUND   - File not found.\r
-\r
---*/\r
 {\r
   EFI_STATUS                        Status;\r
   EFI_DEVICE_PATH_PROTOCOL          *TempFilePath;\r
@@ -318,7 +312,7 @@ Returns:
   //\r
   // Nothing else to try\r
   //\r
-  DEBUG ((EFI_D_LOAD|EFI_D_WARN, "CoreOpenImageFile: Device did not support a known load protocol\n"));\r
+  DEBUG ((DEBUG_LOAD|DEBUG_WARN, "CoreOpenImageFile: Device did not support a known load protocol\n"));\r
   Status = EFI_NOT_FOUND;\r
 \r
 Done:\r
@@ -340,6 +334,21 @@ Done:
 \r
 \r
 \r
+\r
+/**\r
+  Read image file (specified by UserHandle) into user specified buffer with specified offset\r
+  and length.\r
+\r
+  @param  UserHandle             Image file handle \r
+  @param  Offset                 Offset to the source file \r
+  @param  ReadSize               For input, pointer of size to read; For output, \r
+                                 pointer of size actually read. \r
+  @param  Buffer                 Buffer to write into \r
+\r
+  @retval EFI_SUCCESS            Successfully read the specified part of file \r
+                                 into buffer.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreReadImageFile (\r
@@ -348,29 +357,6 @@ CoreReadImageFile (
   IN OUT UINTN   *ReadSize,\r
   OUT    VOID    *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Read image file (specified by UserHandle) into user specified buffer with specified offset\r
-  and length.\r
-\r
-Arguments:\r
-\r
-  UserHandle      - Image file handle\r
-\r
-  Offset          - Offset to the source file\r
-\r
-  ReadSize        - For input, pointer of size to read;\r
-                    For output, pointer of size actually read.\r
-\r
-  Buffer          - Buffer to write into\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     - Successfully read the specified part of file into buffer.\r
-\r
---*/\r
 {\r
   UINTN               EndPosition;\r
   IMAGE_FILE_HANDLE  *FHand;\r
@@ -393,6 +379,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Search a handle to a device on a specified device path that supports a specified protocol,\r
+  interface of that protocol on that handle is another output.\r
+\r
+  @param  Protocol               The protocol to search for \r
+  @param  FilePath               The specified device path \r
+  @param  Interface              Interface of the protocol on the handle \r
+  @param  Handle                 The handle to the device on the specified device \r
+                                 path that supports the protocol. \r
+\r
+  @return Status code.\r
+\r
+**/\r
 EFI_STATUS\r
 CoreDevicePathToInterface (\r
   IN EFI_GUID                     *Protocol,\r
@@ -400,28 +400,6 @@ CoreDevicePathToInterface (
   OUT VOID                        **Interface,\r
   OUT EFI_HANDLE                  *Handle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Search a handle to a device on a specified device path that supports a specified protocol,\r
-  interface of that protocol on that handle is another output.\r
-\r
-Arguments:\r
-\r
-  Protocol      - The protocol to search for\r
-\r
-  FilePath      - The specified device path\r
-\r
-  Interface     - Interface of the protocol on the handle\r
-\r
-  Handle        - The handle to the device on the specified device path that supports the protocol.\r
-\r
-Returns:\r
-\r
-  Status code.\r
-\r
---*/\r
 {\r
   EFI_STATUS                      Status;\r
 \r
@@ -432,37 +410,28 @@ Returns:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Helper function called as part of the code needed\r
+  to allocate the proper sized buffer for various\r
+  EFI interfaces.\r
+\r
+  @param  Status                 Current status \r
+  @param  Buffer                 Current allocated buffer, or NULL \r
+  @param  BufferSize             Current buffer size needed \r
+\r
+  @retval TRUE                   if the buffer was reallocated and the caller \r
+                                 should try the API again. \r
+  @retval FALSE                  buffer could not be allocated and the caller \r
+                                 should not try the API again.\r
+\r
+**/\r
 BOOLEAN\r
 CoreGrowBuffer (\r
   IN OUT EFI_STATUS   *Status,\r
   IN OUT VOID         **Buffer,\r
   IN UINTN            BufferSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Helper function called as part of the code needed\r
-    to allocate the proper sized buffer for various\r
-    EFI interfaces.\r
-\r
-Arguments:\r
-\r
-    Status      - Current status\r
-\r
-    Buffer      - Current allocated buffer, or NULL\r
-\r
-    BufferSize  - Current buffer size needed\r
-\r
-Returns:\r
-\r
-    TRUE - if the buffer was reallocated and the caller\r
-    should try the API again.\r
-\r
-    FALSE - buffer could not be allocated and the caller\r
-    should not try the API again.\r
-\r
---*/\r
 {\r
   BOOLEAN         TryAgain;\r
 \r
@@ -506,3 +475,4 @@ Returns:
   return TryAgain;\r
 }\r
 \r
+\r
index 7c15c938e2dc65bd3b70a3c54faadd24f3db74ea..067f0dab5e63cb905675416470726fb4df6e4f69 100644 (file)
@@ -11,356 +11,286 @@ 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
---*/\r
+\r
+**/\r
 \r
 #ifndef _DXE_LIBRARY_H_\r
 #define _DXE_LIBRARY_H_\r
 \r
 \r
+\r
+/**\r
+  Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid.\r
+\r
+  @param  Value              Describes the class/subclass/operation of the \r
+                             hardware or software entity that the Status Code \r
+                             relates to.\r
+\r
+**/\r
 VOID\r
 CoreReportProgressCode (\r
   IN  EFI_STATUS_CODE_VALUE   Value\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid.\r
-    \r
-Arguments:\r
+;\r
 \r
-  Value    - Describes the class/subclass/operation of the hardware or software entity \r
-             that the Status Code relates to. \r
-   \r
-Returns:\r
 \r
-  None\r
+/**\r
+  Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid,\r
+  with a handle as additional information.\r
 \r
---*/\r
-;\r
+  @param  Value              Describes the class/subclass/operation of the \r
+                             hardware or software entity that the Status Code \r
+                             relates to. \r
+  @param  Handle             Additional information.\r
 \r
+**/\r
 VOID\r
 CoreReportProgressCodeSpecific (\r
   IN  EFI_STATUS_CODE_VALUE   Value,\r
   IN  EFI_HANDLE              Handle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid, \r
-  with a handle as additional information.\r
-    \r
-Arguments:\r
 \r
-  Value    - Describes the class/subclass/operation of the hardware or software entity \r
-             that the Status Code relates to. \r
-             \r
-  Handle   - Additional information.\r
-   \r
-Returns:\r
+/**\r
+  Raising to the task priority level of the mutual exclusion\r
+  lock, and then acquires ownership of the lock.\r
 \r
-  None\r
+  @param  Lock               The lock to acquire \r
 \r
---*/\r
-;\r
+  @return Lock owned\r
 \r
+**/\r
 VOID\r
 CoreAcquireLock (\r
   IN EFI_LOCK *Lock\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Raising to the task priority level of the mutual exclusion\r
-  lock, and then acquires ownership of the lock.\r
-    \r
-Arguments:\r
 \r
-  Lock - The lock to acquire\r
-    \r
-Returns:\r
+/**\r
+  Initialize a basic mutual exclusion lock.   Each lock\r
+  provides mutual exclusion access at it's task priority\r
+  level.  Since there is no-premption (at any TPL) or\r
+  multiprocessor support, acquiring the lock only consists\r
+  of raising to the locks TPL.\r
 \r
-  Lock owned\r
+  @param  Lock               The EFI_LOCK structure to initialize \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS        Lock Owned. \r
+  @retval EFI_ACCESS_DENIED  Reentrant Lock Acquisition, Lock not Owned.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreAcquireLockOrFail (\r
   IN EFI_LOCK  *Lock\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Initialize a basic mutual exclusion lock.   Each lock\r
-  provides mutual exclusion access at it's task priority\r
-  level.  Since there is no-premption (at any TPL) or\r
-  multiprocessor support, acquiring the lock only consists\r
-  of raising to the locks TPL.\r
-    \r
-Arguments:\r
 \r
-  Lock        - The EFI_LOCK structure to initialize\r
-   \r
-Returns:\r
+/**\r
+  Releases ownership of the mutual exclusion lock, and\r
+  restores the previous task priority level.\r
 \r
-  EFI_SUCCESS       - Lock Owned.\r
-  EFI_ACCESS_DENIED - Reentrant Lock Acquisition, Lock not Owned.\r
+  @param  Lock               The lock to release \r
 \r
---*/\r
-;\r
+  @return Lock unowned\r
 \r
+**/\r
 VOID\r
 CoreReleaseLock (\r
   IN EFI_LOCK *Lock\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Releases ownership of the mutual exclusion lock, and\r
-    restores the previous task priority level.\r
-    \r
-Arguments:\r
-\r
-    Lock - The lock to release\r
-    \r
-Returns:\r
-\r
-    Lock unowned\r
-\r
---*/\r
 ;\r
 \r
 //\r
 // Device Path functions\r
 //\r
 \r
+\r
+/**\r
+  Calculate the size of a whole device path.\r
+\r
+  @param  DevicePath         The pointer to the device path data. \r
+\r
+  @return Size of device path data structure..\r
+\r
+**/\r
 UINTN\r
 CoreDevicePathSize (\r
   IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Calculate the size of a whole device path.    \r
-    \r
-Arguments:\r
 \r
-  DevicePath - The pointer to the device path data.\r
-    \r
-Returns:\r
+/**\r
+  Return TRUE is this is a multi instance device path.\r
 \r
-  Size of device path data structure..\r
+  @param  DevicePath         A pointer to a device path data structure. \r
 \r
---*/\r
-;\r
+  @retval TRUE               If DevicePath is multi instance. FALSE - If \r
+                             DevicePath is not multi instance.\r
 \r
+**/\r
 BOOLEAN\r
 CoreIsDevicePathMultiInstance (\r
   IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Return TRUE is this is a multi instance device path.\r
+;\r
 \r
-Arguments:\r
-  DevicePath  - A pointer to a device path data structure.\r
 \r
 \r
-Returns:\r
-  TRUE - If DevicePath is multi instance. FALSE - If DevicePath is not multi\r
-  instance.\r
+/**\r
+  Duplicate a new device path data structure from the old one.\r
 \r
---*/\r
-;\r
+  @param  DevicePath         A pointer to a device path data structure. \r
 \r
+  @return A pointer to the new allocated device path data.\r
+  @return Caller must free the memory used by DevicePath if it is no longer needed.\r
 \r
+**/\r
 EFI_DEVICE_PATH_PROTOCOL *\r
 CoreDuplicateDevicePath (\r
   IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Duplicate a new device path data structure from the old one.\r
 \r
-Arguments:\r
-  DevicePath  - A pointer to a device path data structure.\r
+/**\r
+  Function is used to append a Src1 and Src2 together.\r
 \r
-Returns:\r
-  A pointer to the new allocated device path data.\r
-  Caller must free the memory used by DevicePath if it is no longer needed.\r
+  @param  Src1               A pointer to a device path data structure. \r
+  @param  Src2               A pointer to a device path data structure. \r
 \r
---*/\r
-;\r
+  @return A pointer to the new device path is returned.\r
+  @return NULL is returned if space for the new device path could not be allocated from pool.\r
+  @return It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
 \r
+**/\r
 EFI_DEVICE_PATH_PROTOCOL *\r
 CoreAppendDevicePath (\r
   IN EFI_DEVICE_PATH_PROTOCOL  *Src1,\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Node\r
+  IN EFI_DEVICE_PATH_PROTOCOL  *Src2\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Function is used to append a Src1 and Src2 together.\r
-\r
-Arguments:\r
-  Src1  - A pointer to a device path data structure.\r
+;\r
 \r
-  Node  - A pointer to a device path data structure.\r
 \r
-Returns:\r
+/**\r
+  Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.\r
 \r
-  A pointer to the new device path is returned.\r
-  NULL is returned if space for the new device path could not be allocated from pool.\r
-  It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
+  @param  AllocationSize     Size to allocate. \r
 \r
---*/\r
-;\r
+  @return Pointer of the allocated pool.\r
 \r
+**/\r
 VOID *\r
 CoreAllocateBootServicesPool (\r
   IN  UINTN   AllocationSize\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
 \r
-  Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.\r
-    \r
-Arguments:\r
-\r
-  AllocationSize    - Size to allocate.\r
-   \r
-Returns:\r
+/**\r
+  Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.\r
 \r
-  Pointer of the allocated pool.\r
+  @param  AllocationSize     Size to allocate. \r
 \r
---*/\r
-;\r
+  @return Pointer of the allocated pool.\r
 \r
+**/\r
 VOID *\r
 CoreAllocateZeroBootServicesPool (\r
   IN  UINTN   AllocationSize\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
 \r
-  Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.\r
-    \r
-Arguments:\r
+/**\r
+  Find a config table by name in system table's ConfigurationTable.\r
 \r
-  AllocationSize    - Size to allocate.\r
-   \r
-Returns:\r
+  @param  Guid           The table name to look for \r
+  @param  Table          Pointer of the config table \r
 \r
-  Pointer of the allocated pool.\r
-\r
---*/\r
-;\r
+  @retval EFI_NOT_FOUND  Could not find the table in system table's \r
+                         ConfigurationTable. \r
+  @retval EFI_SUCCESS    Table successfully found.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreGetConfigTable (\r
   IN EFI_GUID *Guid,\r
   IN OUT VOID **Table\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Find a config table by name in system table's ConfigurationTable.\r
-\r
-Arguments:\r
+;\r
 \r
-  Guid        - The table name to look for\r
-  \r
-  Table       - Pointer of the config table\r
 \r
-Returns: \r
+/**\r
+  Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.\r
 \r
-  EFI_NOT_FOUND       - Could not find the table in system table's ConfigurationTable.\r
-  \r
-  EFI_SUCCESS         - Table successfully found.\r
+  @param  AllocationSize     Size to allocate. \r
+  @param  Buffer             Specified buffer that will be copy to the allocated \r
+                             pool \r
 \r
---*/\r
-;\r
+  @return Pointer of the allocated pool.\r
 \r
+**/\r
 VOID *\r
 CoreAllocateRuntimeCopyPool (\r
   IN  UINTN   AllocationSize,\r
   IN  VOID    *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.\r
-    \r
-Arguments:\r
 \r
-  AllocationSize    - Size to allocate.\r
-  \r
-  Buffer            - Specified buffer that will be copy to the allocated pool\r
-   \r
-Returns:\r
+/**\r
+  Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.\r
 \r
-  Pointer of the allocated pool.\r
+  @param  AllocationSize     Size to allocate. \r
 \r
---*/\r
-;\r
+  @return Pointer of the allocated pool.\r
 \r
+**/\r
 VOID *\r
 CoreAllocateRuntimePool (\r
   IN  UINTN   AllocationSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+;\r
 \r
-  Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.\r
-    \r
-Arguments:\r
 \r
-  AllocationSize    - Size to allocate.\r
-   \r
-Returns:\r
+/**\r
+  Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.\r
 \r
-  Pointer of the allocated pool.\r
+  @param  AllocationSize     Size to allocate. \r
+  @param  Buffer             Specified buffer that will be copy to the allocated \r
+                             pool \r
 \r
---*/\r
-;\r
+  @return Pointer of the allocated pool.\r
 \r
+**/\r
 VOID *\r
 CoreAllocateCopyPool (\r
   IN  UINTN   AllocationSize,\r
   IN  VOID    *Buffer\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
 \r
-  Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.\r
-    \r
-Arguments:\r
-\r
-  AllocationSize    - Size to allocate.\r
-  \r
-  Buffer            - Specified buffer that will be copy to the allocated pool\r
-   \r
-Returns:\r
+/**\r
+  Create a protocol notification event and return it.\r
 \r
-  Pointer of the allocated pool.\r
+  @param  ProtocolGuid       Protocol to register notification event on. \r
+  @param  NotifyTpl          Maximum TPL to signal the NotifyFunction. \r
+  @param  NotifyFunction     EFI notification routine. \r
+  @param  NotifyContext      Context passed into Event when it is created. \r
+  @param  Registration       Registration key returned from \r
+                             RegisterProtocolNotify(). \r
+  @param  SignalFlag         Boolean value to decide whether kick the event after \r
+                             register or not. \r
 \r
---*/\r
-;\r
+  @return The EFI_EVENT that has been registered to be signaled when a ProtocolGuid\r
+          is added to the system.\r
 \r
+**/\r
 EFI_EVENT\r
 CoreCreateProtocolNotifyEvent (\r
   IN EFI_GUID             *ProtocolGuid,\r
@@ -370,32 +300,6 @@ CoreCreateProtocolNotifyEvent (
   OUT VOID                **Registration,\r
   IN  BOOLEAN             SignalFlag\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a protocol notification event and return it.\r
-\r
-Arguments:\r
-\r
-  ProtocolGuid    - Protocol to register notification event on.\r
-\r
-  NotifyTpl       - Maximum TPL to signal the NotifyFunction.\r
-\r
-  NotifyFuncition - EFI notification routine.\r
-\r
-  NotifyContext   - Context passed into Event when it is created.\r
-\r
-  Registration    - Registration key returned from RegisterProtocolNotify().\r
-\r
-  SignalFlag      -  Boolean value to decide whether kick the event after register or not. \r
-\r
-Returns:\r
-\r
-  The EFI_EVENT that has been registered to be signaled when a ProtocolGuid\r
-  is added to the system.\r
-\r
---*/\r
 ;\r
 \r
 #endif\r
index b0f9a0f55d60528d69964d91cec3f3efbcb42a7f..fa53788371de2bf55bf482e1a0cc2c81b84a6b75 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   DXE Core library services.\r
   \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <DxeMain.h>\r
 \r
-UINTN mErrorLevel = EFI_D_ERROR | EFI_D_LOAD;\r
+UINTN mErrorLevel = DEBUG_ERROR | DEBUG_LOAD;\r
 \r
 EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA mStatusCodeData = {\r
   {\r
@@ -25,30 +25,22 @@ EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA mStatusCodeData = {
   NULL\r
 };\r
 \r
-VOID\r
-CoreReportProgressCodeSpecific (\r
-  IN  EFI_STATUS_CODE_VALUE   Value,\r
-  IN  EFI_HANDLE              Handle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid,\r
   with a handle as additional information.\r
 \r
-Arguments:\r
-\r
-  Value    - Describes the class/subclass/operation of the hardware or software entity\r
-             that the Status Code relates to.\r
+  @param  Value              Describes the class/subclass/operation of the \r
+                             hardware or software entity that the Status Code \r
+                             relates to. \r
+  @param  Handle             Additional information.\r
 \r
-  Handle   - Additional information.\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
+**/\r
+VOID\r
+CoreReportProgressCodeSpecific (\r
+  IN  EFI_STATUS_CODE_VALUE   Value,\r
+  IN  EFI_HANDLE              Handle\r
+  )\r
 {\r
   mStatusCodeData.DataHeader.Size = sizeof (EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA) - sizeof (EFI_STATUS_CODE_DATA);\r
   mStatusCodeData.Handle          = Handle;\r
@@ -64,26 +56,19 @@ Returns:
   }\r
 }\r
 \r
-VOID\r
-CoreReportProgressCode (\r
-  IN  EFI_STATUS_CODE_VALUE   Value\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid.\r
 \r
-Arguments:\r
-\r
-  Value    - Describes the class/subclass/operation of the hardware or software entity\r
-             that the Status Code relates to.\r
+  @param  Value              Describes the class/subclass/operation of the \r
+                             hardware or software entity that the Status Code \r
+                             relates to.\r
 \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
+**/\r
+VOID\r
+CoreReportProgressCode (\r
+  IN  EFI_STATUS_CODE_VALUE   Value\r
+  )\r
 {\r
   if ((gStatusCode != NULL) && (gStatusCode->ReportStatusCode != NULL) ) {\r
     gStatusCode->ReportStatusCode (\r
@@ -97,25 +82,19 @@ Returns:
 }\r
 \r
 \r
-VOID *\r
-CoreAllocateBootServicesPool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.\r
 \r
-Arguments:\r
-\r
-  AllocationSize    - Size to allocate.\r
+  @param  AllocationSize     Size to allocate. \r
 \r
-Returns:\r
+  @return Pointer of the allocated pool.\r
 \r
-  Pointer of the allocated pool.\r
-\r
---*/\r
+**/\r
+VOID *\r
+CoreAllocateBootServicesPool (\r
+  IN  UINTN   AllocationSize\r
+  )\r
 {\r
   VOID  *Memory;\r
 \r
@@ -124,25 +103,19 @@ Returns:
 }\r
 \r
 \r
-VOID *\r
-CoreAllocateZeroBootServicesPool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.\r
 \r
-Arguments:\r
-\r
-  AllocationSize    - Size to allocate.\r
+  @param  AllocationSize     Size to allocate. \r
 \r
-Returns:\r
+  @return Pointer of the allocated pool.\r
 \r
-  Pointer of the allocated pool.\r
-\r
---*/\r
+**/\r
+VOID *\r
+CoreAllocateZeroBootServicesPool (\r
+  IN  UINTN   AllocationSize\r
+  )\r
 {\r
   VOID  *Memory;\r
 \r
@@ -152,28 +125,22 @@ Returns:
 }\r
 \r
 \r
-VOID *\r
-CoreAllocateCopyPool (\r
-  IN  UINTN   AllocationSize,\r
-  IN  VOID    *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.\r
 \r
-Arguments:\r
-\r
-  AllocationSize    - Size to allocate.\r
+  @param  AllocationSize     Size to allocate. \r
+  @param  Buffer             Specified buffer that will be copy to the allocated \r
+                             pool \r
 \r
-  Buffer            - Specified buffer that will be copy to the allocated pool\r
+  @return Pointer of the allocated pool.\r
 \r
-Returns:\r
-\r
-  Pointer of the allocated pool.\r
-\r
---*/\r
+**/\r
+VOID *\r
+CoreAllocateCopyPool (\r
+  IN  UINTN   AllocationSize,\r
+  IN  VOID    *Buffer\r
+  )\r
 {\r
   VOID  *Memory;\r
 \r
@@ -185,25 +152,19 @@ Returns:
 \r
 \r
 \r
-VOID *\r
-CoreAllocateRuntimePool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.\r
 \r
-Arguments:\r
-\r
-  AllocationSize    - Size to allocate.\r
-\r
-Returns:\r
+  @param  AllocationSize     Size to allocate. \r
 \r
-  Pointer of the allocated pool.\r
+  @return Pointer of the allocated pool.\r
 \r
---*/\r
+**/\r
+VOID *\r
+CoreAllocateRuntimePool (\r
+  IN  UINTN   AllocationSize\r
+  )\r
 {\r
   VOID  *Memory;\r
 \r
@@ -211,29 +172,22 @@ Returns:
   return Memory;\r
 }\r
 \r
-VOID *\r
-CoreAllocateRuntimeCopyPool (\r
-  IN  UINTN   AllocationSize,\r
-  IN  VOID    *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.\r
 \r
-Arguments:\r
-\r
-  AllocationSize    - Size to allocate.\r
+  @param  AllocationSize     Size to allocate. \r
+  @param  Buffer             Specified buffer that will be copy to the allocated \r
+                             pool \r
 \r
-  Buffer            - Specified buffer that will be copy to the allocated pool\r
-\r
-Returns:\r
-\r
-  Pointer of the allocated pool.\r
-\r
---*/\r
+  @return Pointer of the allocated pool.\r
 \r
+**/\r
+VOID *\r
+CoreAllocateRuntimeCopyPool (\r
+  IN  UINTN   AllocationSize,\r
+  IN  VOID    *Buffer\r
+  )\r
 {\r
   VOID  *Memory;\r
 \r
@@ -250,31 +204,23 @@ Returns:
 //\r
 \r
 \r
-\r
-EFI_STATUS\r
-CoreAcquireLockOrFail (\r
-  IN EFI_LOCK  *Lock\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   Initialize a basic mutual exclusion lock.   Each lock\r
   provides mutual exclusion access at it's task priority\r
   level.  Since there is no-premption (at any TPL) or\r
   multiprocessor support, acquiring the lock only consists\r
   of raising to the locks TPL.\r
 \r
-Arguments:\r
+  @param  Lock               The EFI_LOCK structure to initialize \r
 \r
-  Lock        - The EFI_LOCK structure to initialize\r
+  @retval EFI_SUCCESS        Lock Owned. \r
+  @retval EFI_ACCESS_DENIED  Reentrant Lock Acquisition, Lock not Owned.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS       - Lock Owned.\r
-  EFI_ACCESS_DENIED - Reentrant Lock Acquisition, Lock not Owned.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreAcquireLockOrFail (\r
+  IN EFI_LOCK  *Lock\r
+  )\r
 {\r
   ASSERT (Lock != NULL);\r
   ASSERT (Lock->Lock != EfiLockUninitialized);\r
@@ -293,26 +239,20 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-CoreAcquireLock (\r
-  IN EFI_LOCK  *Lock\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Raising to the task priority level of the mutual exclusion\r
   lock, and then acquires ownership of the lock.\r
 \r
-Arguments:\r
+  @param  Lock               The lock to acquire \r
 \r
-  Lock - The lock to acquire\r
+  @return Lock owned\r
 \r
-Returns:\r
-\r
-  Lock owned\r
-\r
---*/\r
+**/\r
+VOID\r
+CoreAcquireLock (\r
+  IN EFI_LOCK  *Lock\r
+  )\r
 {\r
   ASSERT (Lock != NULL);\r
   ASSERT (Lock->Lock == EfiLockReleased);\r
@@ -322,26 +262,20 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-CoreReleaseLock (\r
-  IN EFI_LOCK  *Lock\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Releases ownership of the mutual exclusion lock, and\r
-    restores the previous task priority level.\r
 \r
-Arguments:\r
+/**\r
+  Releases ownership of the mutual exclusion lock, and\r
+  restores the previous task priority level.\r
 \r
-    Lock - The lock to release\r
+  @param  Lock               The lock to release \r
 \r
-Returns:\r
+  @return Lock unowned\r
 \r
-    Lock unowned\r
-\r
---*/\r
+**/\r
+VOID\r
+CoreReleaseLock (\r
+  IN EFI_LOCK  *Lock\r
+  )\r
 {\r
   EFI_TPL Tpl;\r
 \r
@@ -356,25 +290,19 @@ Returns:
 }\r
 \r
 \r
-UINTN\r
-CoreDevicePathSize (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Calculate the size of a whole device path.\r
 \r
-Arguments:\r
-\r
-  DevicePath - The pointer to the device path data.\r
+  @param  DevicePath         The pointer to the device path data. \r
 \r
-Returns:\r
+  @return Size of device path data structure..\r
 \r
-  Size of device path data structure..\r
-\r
---*/\r
+**/\r
+UINTN\r
+CoreDevicePathSize (\r
+  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
+  )\r
 {\r
   EFI_DEVICE_PATH_PROTOCOL     *Start;\r
 \r
@@ -397,24 +325,20 @@ Returns:
 }\r
 \r
 \r
-BOOLEAN\r
-CoreIsDevicePathMultiInstance (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Return TRUE is this is a multi instance device path.\r
 \r
-Arguments:\r
-  DevicePath  - A pointer to a device path data structure.\r
-\r
+  @param  DevicePath         A pointer to a device path data structure. \r
 \r
-Returns:\r
-  TRUE - If DevicePath is multi instance. FALSE - If DevicePath is not multi\r
-  instance.\r
+  @retval TRUE               If DevicePath is multi instance. FALSE - If \r
+                             DevicePath is not multi instance.\r
 \r
---*/\r
+**/\r
+BOOLEAN\r
+CoreIsDevicePathMultiInstance (\r
+  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
+  )\r
 {\r
   EFI_DEVICE_PATH_PROTOCOL *Node;\r
 \r
@@ -434,23 +358,20 @@ Returns:
 \r
 \r
 \r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreDuplicateDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Duplicate a new device path data structure from the old one.\r
 \r
-Arguments:\r
-  DevicePath  - A pointer to a device path data structure.\r
+  @param  DevicePath         A pointer to a device path data structure. \r
 \r
-Returns:\r
-  A pointer to the new allocated device path data.\r
-  Caller must free the memory used by DevicePath if it is no longer needed.\r
+  @return A pointer to the new allocated device path data.\r
+  @return Caller must free the memory used by DevicePath if it is no longer needed.\r
 \r
---*/\r
+**/\r
+EFI_DEVICE_PATH_PROTOCOL *\r
+CoreDuplicateDevicePath (\r
+  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
+  )\r
 {\r
   EFI_DEVICE_PATH_PROTOCOL  *NewDevicePath;\r
   UINTN                     Size;\r
@@ -474,28 +395,23 @@ Returns:
 \r
 \r
 \r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreAppendDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src1,\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src2\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Function is used to append a Src1 and Src2 together.\r
 \r
-Arguments:\r
-  Src1  - A pointer to a device path data structure.\r
-\r
-  Src2  - A pointer to a device path data structure.\r
+  @param  Src1               A pointer to a device path data structure. \r
+  @param  Src2               A pointer to a device path data structure. \r
 \r
-Returns:\r
+  @return A pointer to the new device path is returned.\r
+  @return NULL is returned if space for the new device path could not be allocated from pool.\r
+  @return It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
 \r
-  A pointer to the new device path is returned.\r
-  NULL is returned if space for the new device path could not be allocated from pool.\r
-  It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
-\r
---*/\r
+**/\r
+EFI_DEVICE_PATH_PROTOCOL *\r
+CoreAppendDevicePath (\r
+  IN EFI_DEVICE_PATH_PROTOCOL  *Src1,\r
+  IN EFI_DEVICE_PATH_PROTOCOL  *Src2\r
+  )\r
 {\r
   UINTN                       Size;\r
   UINTN                       Size1;\r
@@ -530,6 +446,23 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Create a protocol notification event and return it.\r
+\r
+  @param  ProtocolGuid       Protocol to register notification event on. \r
+  @param  NotifyTpl          Maximum TPL to signal the NotifyFunction. \r
+  @param  NotifyFunction     EFI notification routine. \r
+  @param  NotifyContext      Context passed into Event when it is created. \r
+  @param  Registration       Registration key returned from \r
+                             RegisterProtocolNotify(). \r
+  @param  SignalFlag         Boolean value to decide whether kick the event after \r
+                             register or not. \r
+\r
+  @return The EFI_EVENT that has been registered to be signaled when a ProtocolGuid\r
+          is added to the system.\r
+\r
+**/\r
 EFI_EVENT\r
 CoreCreateProtocolNotifyEvent (\r
   IN EFI_GUID             *ProtocolGuid,\r
@@ -539,32 +472,6 @@ CoreCreateProtocolNotifyEvent (
   OUT VOID                **Registration,\r
   IN  BOOLEAN             SignalFlag\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a protocol notification event and return it.\r
-\r
-Arguments:\r
-\r
-  ProtocolGuid    - Protocol to register notification event on.\r
-\r
-  NotifyTpl        - Maximum TPL to signal the NotifyFunction.\r
-\r
-  NotifyFuncition  - EFI notification routine.\r
-\r
-  NotifyContext   - Context passed into Event when it is created.\r
-\r
-  Registration    - Registration key returned from RegisterProtocolNotify().\r
-\r
-  SignalFlag      -  Boolean value to decide whether kick the event after register or not.\r
-\r
-Returns:\r
-\r
-  The EFI_EVENT that has been registered to be signaled when a ProtocolGuid\r
-  is added to the system.\r
-\r
---*/\r
 {\r
   EFI_STATUS              Status;\r
   EFI_EVENT               Event;\r
@@ -604,3 +511,4 @@ Returns:
   return Event;\r
 }\r
 \r
+\r
index daf00f237d0f8a3b77431dad27d372d0eb2ded8e..9ec83141ac50a3dc608eafe2301b8de1f0298a85 100644 (file)
@@ -91,12 +91,30 @@ EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1] = {
 //\r
 // Internal prototypes\r
 //\r
+/**\r
+  Find untested but initialized memory regions in GCD map and convert them to be DXE allocatable.\r
+\r
+**/\r
 STATIC\r
 VOID \r
 PromoteMemoryResource (\r
   VOID\r
-);\r
+  );\r
+\r
+/**\r
+  Internal function.  Adds a ranges to the memory map.\r
+  The range must not already exist in the map.\r
+\r
+  @param  Type                   The type of memory range to add \r
+  @param  Start                  The starting address in the memory range Must be \r
+                                 paged aligned \r
+  @param  End                    The last address in the range Must be the last \r
+                                 byte of a page \r
+  @param  Attribute              The attributes of the memory range to add \r
 \r
+  @return None.  The range is added to the memory map\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreAddRange (\r
@@ -106,12 +124,33 @@ CoreAddRange (
   IN UINT64                   Attribute\r
   );\r
 \r
+/**\r
+  Internal function.  Moves any memory descriptors that are on the\r
+  temporary descriptor stack to heap.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreFreeMemoryMapStack (\r
   VOID\r
   );\r
 \r
+/**\r
+  Internal function.  Converts a memory range to the specified type.\r
+  The range must exist in the memory map.\r
+\r
+  @param  Start                  The first address of the range Must be page \r
+                                 aligned \r
+  @param  NumberOfPages          The number of pages to convert \r
+  @param  NewType                The new type for the memory range \r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_NOT_FOUND          Could not find a descriptor cover the specified \r
+                                 range  or convertion not allowed. \r
+  @retval EFI_SUCCESS            Successfully converts the memory range to the \r
+                                 specified type.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreConvertPages (\r
@@ -120,90 +159,79 @@ CoreConvertPages (
   IN EFI_MEMORY_TYPE  NewType\r
   );\r
 \r
+/**\r
+  Internal function.  Removes a descriptor entry.\r
+\r
+  @param  Entry                  The entry to remove\r
+\r
+**/\r
 STATIC\r
 VOID\r
 RemoveMemoryMapEntry (\r
   MEMORY_MAP      *Entry\r
   );\r
   \r
+/**\r
+  Internal function.  Deque a descriptor entry from the mFreeMemoryMapEntryList.\r
+  If the list is emtry, then allocate a new page to refuel the list.\r
+  Please Note this algorithm to allocate the memory map descriptor has a property\r
+  that the memory allocated for memory entries always grows, and will never really be freed\r
+  For example, if the current boot uses 2000 memory map entries at the maximum point, but\r
+  ends up with only 50 at the time the OS is booted, then the memory associated with the 1950\r
+  memory map entries is still allocated from EfiBootServicesMemory.\r
+\r
+\r
+  @return The Memory map descriptor dequed from the mFreeMemoryMapEntryList\r
+\r
+**/\r
 STATIC\r
 MEMORY_MAP *\r
 AllocateMemoryMapEntry (\r
   VOID\r
   );\r
  \r
+\r
+/**\r
+  Enter critical section by gaining lock on gMemoryLock.\r
+\r
+**/\r
 VOID\r
 CoreAcquireMemoryLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Enter critical section by gaining lock on gMemoryLock\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   CoreAcquireLock (&gMemoryLock);\r
 }\r
 \r
 \r
+\r
+/**\r
+  Exit critical section by releasing lock on gMemoryLock.\r
+\r
+**/\r
 VOID\r
 CoreReleaseMemoryLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Exit critical section by releasing lock on gMemoryLock\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   CoreReleaseLock (&gMemoryLock);\r
 }\r
 \r
+\r
+/**\r
+  Find untested but initialized memory regions in GCD map and convert them to be DXE allocatable.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 PromoteMemoryResource (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Find untested but initialized memory regions in GCD map and convert them to be DXE allocatable.\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   LIST_ENTRY                       *Link;\r
   EFI_GCD_MAP_ENTRY                *Entry;\r
 \r
-  DEBUG ((EFI_D_ERROR | EFI_D_PAGE, "Promote the memory resource\n"));\r
+  DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "Promote the memory resource\n"));\r
   \r
   CoreAcquireGcdMemoryLock ();\r
   \r
@@ -246,39 +274,29 @@ Returns:
   return;\r
 }\r
 \r
-VOID\r
-CoreAddMemoryDescriptor (\r
-  IN EFI_MEMORY_TYPE       Type,\r
-  IN EFI_PHYSICAL_ADDRESS  Start,\r
-  IN UINT64                NumberOfPages,\r
-  IN UINT64                Attribute\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Called to initialize the memory map and add descriptors to\r
   the current descriptor list.\r
-\r
   The first descriptor that is added must be general usable\r
   memory as the addition allocates heap.\r
 \r
-Arguments:\r
-\r
-  Type          - The type of memory to add\r
-\r
-  Start         - The starting address in the memory range\r
-                  Must be page aligned\r
+  @param  Type                   The type of memory to add \r
+  @param  Start                  The starting address in the memory range Must be \r
+                                 page aligned \r
+  @param  NumberOfPages          The number of pages in the range \r
+  @param  Attribute              Attributes of the memory to add \r
 \r
-  NumberOfPages - The number of pages in the range\r
+  @return None.  The range is added to the memory map\r
 \r
-  Attribute     - Attributes of the memory to add\r
-\r
-Returns:\r
-\r
-  None.  The range is added to the memory map\r
-\r
---*/\r
+**/\r
+VOID\r
+CoreAddMemoryDescriptor (\r
+  IN EFI_MEMORY_TYPE       Type,\r
+  IN EFI_PHYSICAL_ADDRESS  Start,\r
+  IN UINT64                NumberOfPages,\r
+  IN UINT64                Attribute\r
+  )\r
 {\r
   EFI_PHYSICAL_ADDRESS        End;\r
   EFI_STATUS                  Status;\r
@@ -416,6 +434,21 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Internal function.  Adds a ranges to the memory map.\r
+  The range must not already exist in the map.\r
+\r
+  @param  Type                   The type of memory range to add \r
+  @param  Start                  The starting address in the memory range Must be \r
+                                 paged aligned \r
+  @param  End                    The last address in the range Must be the last \r
+                                 byte of a page \r
+  @param  Attribute              The attributes of the memory range to add \r
+\r
+  @return None.  The range is added to the memory map\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreAddRange (\r
@@ -424,30 +457,6 @@ CoreAddRange (
   IN EFI_PHYSICAL_ADDRESS     End,\r
   IN UINT64                   Attribute\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function.  Adds a ranges to the memory map.\r
-  The range must not already exist in the map.\r
-\r
-Arguments:\r
-\r
-  Type    - The type of memory range to add\r
-\r
-  Start   - The starting address in the memory range\r
-            Must be paged aligned\r
-\r
-  End     - The last address in the range\r
-          Must be the last byte of a page\r
-\r
-  Attribute - The attributes of the memory range to add\r
-\r
-Returns:\r
-\r
-  None.  The range is added to the memory map\r
-\r
---*/\r
 {\r
   LIST_ENTRY        *Link;\r
   MEMORY_MAP        *Entry;\r
@@ -457,7 +466,7 @@ Returns:
 \r
   ASSERT_LOCKED (&gMemoryLock);\r
   \r
-  DEBUG ((EFI_D_PAGE, "AddRange: %lx-%lx to %d\n", Start, End, Type));\r
+  DEBUG ((DEBUG_PAGE, "AddRange: %lx-%lx to %d\n", Start, End, Type));\r
 \r
   //\r
   // Memory map being altered so updated key\r
@@ -527,27 +536,17 @@ Returns:
   return ;\r
 }\r
 \r
+\r
+/**\r
+  Internal function.  Moves any memory descriptors that are on the\r
+  temporary descriptor stack to heap.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CoreFreeMemoryMapStack (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function.  Moves any memory descriptors that are on the\r
-  temporary descriptor stack to heap.\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   MEMORY_MAP      *Entry;\r
   MEMORY_MAP      *Entry2;\r
@@ -615,64 +614,49 @@ Returns:
   mFreeMapStack -= 1;\r
 }\r
 \r
+\r
+/**\r
+  Internal function.  Removes a descriptor entry.\r
+\r
+  @param  Entry                  The entry to remove\r
+\r
+**/\r
 STATIC\r
 VOID\r
 RemoveMemoryMapEntry (\r
   MEMORY_MAP      *Entry\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function.  Removes a descriptor entry.\r
-\r
-Arguments:\r
-\r
-  Entry   - The entry to remove\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   RemoveEntryList (&Entry->Link);\r
   Entry->Link.ForwardLink = NULL;\r
 \r
   if (Entry->FromPages) {\r
-       //\r
-       // Insert the free memory map descriptor to the end of mFreeMemoryMapEntryList\r
-       //\r
+    //\r
+    // Insert the free memory map descriptor to the end of mFreeMemoryMapEntryList\r
+    //\r
     InsertTailList (&mFreeMemoryMapEntryList, &Entry->Link);\r
   }\r
 }\r
 \r
-STATIC\r
-MEMORY_MAP *\r
-AllocateMemoryMapEntry (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Internal function.  Deque a descriptor entry from the mFreeMemoryMapEntryList.\r
-  If the list is emtry, then allocate a new page to refuel the list. \r
+  If the list is emtry, then allocate a new page to refuel the list.\r
   Please Note this algorithm to allocate the memory map descriptor has a property\r
-  that the memory allocated for memory entries always grows, and will never really be freed \r
+  that the memory allocated for memory entries always grows, and will never really be freed\r
   For example, if the current boot uses 2000 memory map entries at the maximum point, but\r
-  ends up with only 50 at the time the OS is booted, then the memory associated with the 1950 \r
-  memory map entries is still allocated from EfiBootServicesMemory.  \r
-\r
-Arguments:\r
-\r
-  NONE\r
+  ends up with only 50 at the time the OS is booted, then the memory associated with the 1950\r
+  memory map entries is still allocated from EfiBootServicesMemory.\r
 \r
-Returns:\r
 \r
-  The Memory map descriptor dequed from the mFreeMemoryMapEntryList\r
+  @return The Memory map descriptor dequed from the mFreeMemoryMapEntryList\r
 \r
---*/ \r
+**/\r
+STATIC\r
+MEMORY_MAP *\r
+AllocateMemoryMapEntry (\r
+  VOID\r
+  )\r
 {\r
   MEMORY_MAP*            FreeDescriptorEntries;\r
   MEMORY_MAP*            Entry;\r
@@ -704,6 +688,23 @@ Returns:
   return Entry;\r
 }    \r
 \r
+\r
+/**\r
+  Internal function.  Converts a memory range to the specified type.\r
+  The range must exist in the memory map.\r
+\r
+  @param  Start                  The first address of the range Must be page \r
+                                 aligned \r
+  @param  NumberOfPages          The number of pages to convert \r
+  @param  NewType                The new type for the memory range \r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_NOT_FOUND          Could not find a descriptor cover the specified \r
+                                 range  or convertion not allowed. \r
+  @retval EFI_SUCCESS            Successfully converts the memory range to the \r
+                                 specified type.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CoreConvertPages (\r
@@ -711,32 +712,6 @@ CoreConvertPages (
   IN UINT64           NumberOfPages,\r
   IN EFI_MEMORY_TYPE  NewType\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function.  Converts a memory range to the specified type.\r
-  The range must exist in the memory map.\r
-\r
-Arguments:\r
-\r
-  Start         - The first address of the range\r
-                  Must be page aligned\r
-\r
-  NumberOfPages - The number of pages to convert\r
-\r
-  NewType       - The new type for the memory range\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER   - Invalid parameter\r
-  \r
-  EFI_NOT_FOUND           - Could not find a descriptor cover the specified range \r
-                            or convertion not allowed.\r
-  \r
-  EFI_SUCCESS             - Successfully converts the memory range to the specified type.\r
-\r
---*/\r
 {\r
 \r
   UINT64          NumberOfBytes;\r
@@ -777,7 +752,7 @@ Returns:
     }\r
 \r
     if (Link == &gMemoryMap) {\r
-      DEBUG ((EFI_D_ERROR | EFI_D_PAGE, "ConvertPages: failed to find range %lx - %lx\n", Start, End));\r
+      DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ConvertPages: failed to find range %lx - %lx\n", Start, End));\r
       return EFI_NOT_FOUND;\r
     }\r
 \r
@@ -790,13 +765,13 @@ Returns:
       RangeEnd = Entry->End;\r
     }\r
 \r
-    DEBUG ((EFI_D_PAGE, "ConvertRange: %lx-%lx to %d\n", Start, RangeEnd, NewType));\r
+    DEBUG ((DEBUG_PAGE, "ConvertRange: %lx-%lx to %d\n", Start, RangeEnd, NewType));\r
 \r
     //\r
     // Debug code - verify conversion is allowed\r
     //\r
     if (!(NewType == EfiConventionalMemory ? 1 : 0) ^ (Entry->Type == EfiConventionalMemory ? 1 : 0)) {\r
-      DEBUG ((EFI_D_ERROR , "ConvertPages: Incompatible memory types\n"));\r
+      DEBUG ((DEBUG_ERROR , "ConvertPages: Incompatible memory types\n"));\r
       return EFI_NOT_FOUND;\r
     }  \r
 \r
@@ -909,6 +884,20 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Internal function. Finds a consecutive free page range below\r
+  the requested address.\r
+\r
+  @param  MaxAddress             The address that the range must be below \r
+  @param  NumberOfPages          Number of pages needed \r
+  @param  NewType                The type of memory the range is going to be \r
+                                 turned into \r
+  @param  Alignment              Bits to align with \r
+\r
+  @return The base address of the range, or 0 if the range was not found\r
+\r
+**/\r
 STATIC\r
 UINT64\r
 CoreFindFreePagesI (\r
@@ -917,28 +906,6 @@ CoreFindFreePagesI (
   IN EFI_MEMORY_TYPE  NewType,\r
   IN UINTN            Alignment\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function. Finds a consecutive free page range below\r
-  the requested address.\r
-\r
-Arguments:\r
-\r
-  MaxAddress    - The address that the range must be below\r
-\r
-  NumberOfPages - Number of pages needed\r
-\r
-  NewType       - The type of memory the range is going to be turned into\r
-\r
-  Alignment     - Bits to align with\r
-\r
-Returns:\r
-\r
-  The base address of the range, or 0 if the range was not found\r
-\r
---*/\r
 {\r
   UINT64          NumberOfBytes;\r
   UINT64          Target;\r
@@ -1038,6 +1005,20 @@ Returns:
   return Target;\r
 }\r
 \r
+\r
+/**\r
+  Internal function.  Finds a consecutive free page range below\r
+  the requested address\r
+\r
+  @param  MaxAddress             The address that the range must be below \r
+  @param  NoPages                Number of pages needed \r
+  @param  NewType                The type of memory the range is going to be \r
+                                 turned into \r
+  @param  Alignment              Bits to align with \r
+\r
+  @return The base address of the range, or 0 if the range was not found.\r
+\r
+**/\r
 STATIC\r
 UINT64\r
 FindFreePages (\r
@@ -1046,28 +1027,6 @@ FindFreePages (
     IN EFI_MEMORY_TYPE  NewType,\r
     IN UINTN            Alignment\r
     )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Internal function.  Finds a consecutive free page range below\r
-    the requested address\r
-\r
-Arguments:\r
-\r
-    MaxAddress          - The address that the range must be below\r
-\r
-    NoPages             - Number of pages needed\r
-\r
-    NewType             - The type of memory the range is going to be turned into\r
-\r
-    Alignment           - Bits to align with\r
-\r
-Returns:\r
-\r
-    The base address of the range, or 0 if the range was not found.\r
-\r
---*/\r
 {\r
   UINT64  NewMaxAddress;\r
   UINT64  Start;\r
@@ -1103,6 +1062,25 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Allocates pages from the memory map.\r
+\r
+  @param  Type                   The type of allocation to perform \r
+  @param  MemoryType             The type of memory to turn the allocated pages \r
+                                 into \r
+  @param  NumberOfPages          The number of pages to allocate \r
+  @param  Memory                 A pointer to receive the base allocated memory \r
+                                 address \r
+\r
+  @return Status. On success, Memory is filled in with the base address allocated\r
+  @retval EFI_INVALID_PARAMETER  Parameters violate checking rules defined in \r
+                                 spec. \r
+  @retval EFI_NOT_FOUND          Could not allocate pages match the requirement. \r
+  @retval EFI_OUT_OF_RESOURCES   No enough pages to allocate. \r
+  @retval EFI_SUCCESS            Pages successfully allocated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreAllocatePages (\r
@@ -1111,35 +1089,6 @@ CoreAllocatePages (
   IN UINTN                  NumberOfPages,\r
   IN OUT EFI_PHYSICAL_ADDRESS  *Memory\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocates pages from the memory map.\r
-\r
-Arguments:\r
-\r
-  Type          - The type of allocation to perform\r
-\r
-  MemoryType    - The type of memory to turn the allocated pages into\r
-\r
-  NumberOfPages - The number of pages to allocate\r
-\r
-  Memory        - A pointer to receive the base allocated memory address\r
-\r
-Returns:\r
-\r
-  Status. On success, Memory is filled in with the base address allocated\r
-\r
-  EFI_INVALID_PARAMETER     - Parameters violate checking rules defined in spec.\r
-  \r
-  EFI_NOT_FOUND             - Could not allocate pages match the requirement.\r
-  \r
-  EFI_OUT_OF_RESOURCES      - No enough pages to allocate.\r
-  \r
-  EFI_SUCCESS               - Pages successfully allocated.\r
-\r
---*/\r
 {\r
   EFI_STATUS      Status;\r
   UINT64          Start;\r
@@ -1219,33 +1168,24 @@ Done:
 \r
 \r
 \r
+\r
+/**\r
+  Frees previous allocated pages.\r
+\r
+  @param  Memory                 Base address of memory being freed \r
+  @param  NumberOfPages          The number of pages to free \r
+\r
+  @retval EFI_NOT_FOUND          Could not find the entry that covers the range \r
+  @retval EFI_INVALID_PARAMETER  Address not aligned \r
+  @return EFI_SUCCESS         -Pages successfully freed.\r
+\r
+**/\r
 EFI_STATUS \r
 EFIAPI\r
 CoreFreePages (\r
   IN EFI_PHYSICAL_ADDRESS   Memory,\r
   IN UINTN                  NumberOfPages\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Frees previous allocated pages.\r
-\r
-Arguments:\r
-\r
-  Memory        - Base address of memory being freed\r
-\r
-  NumberOfPages - The number of pages to free\r
-\r
-Returns:\r
-\r
-  EFI_NOT_FOUND       - Could not find the entry that covers the range\r
-  \r
-  EFI_INVALID_PARAMETER   - Address not aligned\r
-  \r
-  EFI_SUCCESS         -Pages successfully freed.\r
-\r
---*/\r
 {\r
   EFI_STATUS      Status;\r
   LIST_ENTRY      *Link;\r
@@ -1311,6 +1251,37 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  This function returns a copy of the current memory map. The map is an array of\r
+  memory descriptors, each of which describes a contiguous block of memory.\r
+\r
+  @param  MemoryMapSize          A pointer to the size, in bytes, of the \r
+                                 MemoryMap buffer. On input, this is the size of \r
+                                 the buffer allocated by the caller.  On output, \r
+                                 it is the size of the buffer returned by the \r
+                                 firmware  if the buffer was large enough, or the \r
+                                 size of the buffer needed  to contain the map if \r
+                                 the buffer was too small. \r
+  @param  MemoryMap              A pointer to the buffer in which firmware places \r
+                                 the current memory map. \r
+  @param  MapKey                 A pointer to the location in which firmware \r
+                                 returns the key for the current memory map. \r
+  @param  DescriptorSize         A pointer to the location in which firmware \r
+                                 returns the size, in bytes, of an individual \r
+                                 EFI_MEMORY_DESCRIPTOR. \r
+  @param  DescriptorVersion      A pointer to the location in which firmware \r
+                                 returns the version number associated with the \r
+                                 EFI_MEMORY_DESCRIPTOR. \r
+\r
+  @retval EFI_SUCCESS            The memory map was returned in the MemoryMap \r
+                                 buffer. \r
+  @retval EFI_BUFFER_TOO_SMALL   The MemoryMap buffer was too small. The current \r
+                                 buffer size needed to hold the memory map is \r
+                                 returned in MemoryMapSize. \r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreGetMemoryMap (\r
@@ -1320,36 +1291,6 @@ CoreGetMemoryMap (
   OUT UINTN                     *DescriptorSize,\r
   OUT UINT32                    *DescriptorVersion\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function returns a copy of the current memory map. The map is an array of \r
-  memory descriptors, each of which describes a contiguous block of memory.\r
-\r
-Arguments:\r
-\r
-  MemoryMapSize     - A pointer to the size, in bytes, of the MemoryMap buffer. On\r
-                      input, this is the size of the buffer allocated by the caller. \r
-                      On output, it is the size of the buffer returned by the firmware \r
-                      if the buffer was large enough, or the size of the buffer needed \r
-                      to contain the map if the buffer was too small.\r
-  MemoryMap         - A pointer to the buffer in which firmware places the current memory map.\r
-  MapKey            - A pointer to the location in which firmware returns the key for the\r
-                      current memory map.\r
-  DescriptorSize    - A pointer to the location in which firmware returns the size, in\r
-                      bytes, of an individual EFI_MEMORY_DESCRIPTOR.\r
-  DescriptorVersion - A pointer to the location in which firmware returns the version\r
-                      number associated with the EFI_MEMORY_DESCRIPTOR.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The memory map was returned in the MemoryMap buffer.       \r
-  EFI_BUFFER_TOO_SMALL  - The MemoryMap buffer was too small. The current buffer size\r
-                          needed to hold the memory map is returned in MemoryMapSize.\r
-  EFI_INVALID_PARAMETER - One of the parameters has an invalid value.                \r
-\r
---*/\r
 {\r
   EFI_STATUS                        Status;\r
   UINTN                             Size;  \r
@@ -1506,32 +1447,24 @@ Done:
   return Status;\r
 }\r
 \r
-VOID *\r
-CoreAllocatePoolPages (\r
-  IN EFI_MEMORY_TYPE    PoolType,\r
-  IN UINTN              NumberOfPages,\r
-  IN UINTN              Alignment\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Internal function.  Used by the pool functions to allocate pages\r
   to back pool allocation requests.\r
 \r
-Arguments:\r
-\r
-  PoolType      - The type of memory for the new pool pages\r
-\r
-  NumberOfPages - No of pages to allocate\r
-\r
-  Alignment     - Bits to align.\r
+  @param  PoolType               The type of memory for the new pool pages \r
+  @param  NumberOfPages          No of pages to allocate \r
+  @param  Alignment              Bits to align. \r
 \r
-Returns:\r
+  @return The allocated memory, or NULL\r
 \r
-  The allocated memory, or NULL\r
-\r
---*/\r
+**/\r
+VOID *\r
+CoreAllocatePoolPages (\r
+  IN EFI_MEMORY_TYPE    PoolType,\r
+  IN UINTN              NumberOfPages,\r
+  IN UINTN              Alignment\r
+  )\r
 {\r
   UINT64            Start;\r
 \r
@@ -1544,7 +1477,7 @@ Returns:
   // Convert it to boot services data\r
   //\r
   if (Start == 0) {\r
-    DEBUG ((EFI_D_ERROR | EFI_D_PAGE, "AllocatePoolPages: failed to allocate %d pages\n", NumberOfPages));\r
+    DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "AllocatePoolPages: failed to allocate %d pages\n", NumberOfPages));\r
   } else {\r
     CoreConvertPages (Start, NumberOfPages, PoolType);\r
   }\r
@@ -1552,55 +1485,40 @@ Returns:
   return (VOID *)(UINTN)Start;\r
 }\r
 \r
+\r
+/**\r
+  Internal function.  Frees pool pages allocated via AllocatePoolPages ()\r
+\r
+  @param  Memory                 The base address to free \r
+  @param  NumberOfPages          The number of pages to free\r
+\r
+**/\r
 VOID\r
 CoreFreePoolPages (\r
   IN EFI_PHYSICAL_ADDRESS   Memory,\r
   IN UINTN                  NumberOfPages\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function.  Frees pool pages allocated via AllocatePoolPages ()\r
-\r
-Arguments:\r
-\r
-  Memory        - The base address to free\r
-\r
-  NumberOfPages - The number of pages to free\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   CoreConvertPages (Memory, NumberOfPages, EfiConventionalMemory);\r
 }\r
 \r
 \r
-EFI_STATUS\r
-CoreTerminateMemoryMap (\r
-  IN UINTN          MapKey\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  Make sure the memory map is following all the construction rules, \r
+/**\r
+  Make sure the memory map is following all the construction rules,\r
   it is the last time to check memory map error before exit boot services.\r
 \r
-Arguments:\r
+  @param  MapKey                 Memory map key \r
 \r
-  MapKey        - Memory map key\r
+  @retval EFI_INVALID_PARAMETER  Memory map not consistent with construction \r
+                                 rules. \r
+  @retval EFI_SUCCESS            Valid memory map.\r
 \r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER       - Memory map not consistent with construction rules.\r
-  \r
-  EFI_SUCCESS                 - Valid memory map.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreTerminateMemoryMap (\r
+  IN UINTN          MapKey\r
+  )\r
 {\r
   EFI_STATUS        Status;\r
   LIST_ENTRY        *Link;\r
@@ -1622,17 +1540,17 @@ Returns:
       Entry = CR(Link, MEMORY_MAP, Link, MEMORY_MAP_SIGNATURE);\r
       if (Entry->Attribute & EFI_MEMORY_RUNTIME) { \r
         if (Entry->Type == EfiACPIReclaimMemory || Entry->Type == EfiACPIMemoryNVS) {\r
-          DEBUG((EFI_D_ERROR, "ExitBootServices: ACPI memory entry has RUNTIME attribute set.\n"));\r
+          DEBUG((DEBUG_ERROR, "ExitBootServices: ACPI memory entry has RUNTIME attribute set.\n"));\r
           CoreReleaseMemoryLock ();\r
           return EFI_INVALID_PARAMETER;\r
         }\r
         if (Entry->Start & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) {\r
-          DEBUG((EFI_D_ERROR, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));\r
+          DEBUG((DEBUG_ERROR, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));\r
           CoreReleaseMemoryLock ();\r
           return EFI_INVALID_PARAMETER;\r
         }\r
         if ((Entry->End + 1) & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) {\r
-          DEBUG((EFI_D_ERROR, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));\r
+          DEBUG((DEBUG_ERROR, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));\r
           CoreReleaseMemoryLock ();\r
           return EFI_INVALID_PARAMETER;\r
         }\r
@@ -1662,3 +1580,4 @@ Returns:
 \r
 \r
 \r
+\r
index 6a98cdcca1917e2a4864a959ae80c06ce10c03d6..1adaa1f26970536ae97381617165b5b852112283 100644 (file)
@@ -77,25 +77,15 @@ LIST_ENTRY      PoolHeadList;
 //\r
 //\r
 \r
+\r
+/**\r
+  Called to initialize the pool.\r
+\r
+**/\r
 VOID\r
 CoreInitializePool (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Called to initialize the pool.\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   UINTN  Type;\r
   UINTN  Index;\r
@@ -111,26 +101,20 @@ Returns:
   InitializeListHead (&PoolHeadList);\r
 }\r
 \r
-STATIC\r
-POOL *\r
-LookupPoolHead (\r
-  IN EFI_MEMORY_TYPE  MemoryType\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Look up pool head for specified memory type.\r
 \r
-Arguments:\r
+  @param  MemoryType             Memory type of which pool head is looked for \r
 \r
-  MemoryType      - Memory type of which pool head is looked for\r
+  @return Pointer of Corresponding pool head.\r
 \r
-Returns:\r
-\r
-  Pointer of Corresponding pool head.\r
-\r
---*/\r
+**/\r
+STATIC\r
+POOL *\r
+LookupPoolHead (\r
+  IN EFI_MEMORY_TYPE  MemoryType\r
+  )\r
 {\r
   LIST_ENTRY      *Link;\r
   POOL            *Pool;\r
@@ -171,6 +155,20 @@ Returns:
 \r
  \r
 \r
+\r
+/**\r
+  Allocate pool of a particular type.\r
+\r
+  @param  PoolType               Type of pool to allocate \r
+  @param  Size                   The amount of pool to allocate \r
+  @param  Buffer                 The address to return a pointer to the allocated \r
+                                 pool \r
+\r
+  @retval EFI_INVALID_PARAMETER  PoolType not valid \r
+  @retval EFI_OUT_OF_RESOURCES   Size exceeds max pool size or allocation failed. \r
+  @retval EFI_SUCCESS            Pool successfully allocated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreAllocatePool (\r
@@ -178,29 +176,6 @@ CoreAllocatePool (
   IN UINTN            Size,\r
   OUT VOID            **Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate pool of a particular type.\r
-\r
-Arguments:\r
-\r
-  PoolType    - Type of pool to allocate\r
-\r
-  Size        - The amount of pool to allocate\r
-\r
-  Buffer      - The address to return a pointer to the allocated pool\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER     - PoolType not valid\r
-  \r
-  EFI_OUT_OF_RESOURCES      - Size exceeds max pool size or allocation failed.  \r
-  \r
-  EFI_SUCCESS               - Pool successfully allocated.\r
-\r
---*/\r
 {\r
   EFI_STATUS    Status;\r
 \r
@@ -236,31 +211,22 @@ Returns:
 }\r
 \r
 \r
-VOID *\r
-CoreAllocatePoolI (\r
-  IN EFI_MEMORY_TYPE  PoolType,\r
-  IN UINTN            Size\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Internal function to allocate pool of a particular type.\r
-\r
   Caller must have the memory lock held\r
 \r
+  @param  PoolType               Type of pool to allocate \r
+  @param  Size                   The amount of pool to allocate \r
 \r
-Arguments:\r
-\r
-  PoolType    - Type of pool to allocate\r
+  @return The allocate pool, or NULL\r
 \r
-  Size        - The amount of pool to allocate\r
-\r
-Returns:\r
-\r
-  The allocate pool, or NULL\r
-\r
---*/\r
+**/\r
+VOID *\r
+CoreAllocatePoolI (\r
+  IN EFI_MEMORY_TYPE  PoolType,\r
+  IN UINTN            Size\r
+  )\r
 {\r
   POOL        *Pool;\r
   POOL_FREE   *Free;\r
@@ -270,7 +236,7 @@ Returns:
   VOID        *Buffer;\r
   UINTN       Index;\r
   UINTN       FSize;\r
-  UINTN       offset;\r
+  UINTN       Offset;\r
   UINTN       Adjustment;\r
   UINTN       NoPages;\r
 \r
@@ -322,23 +288,23 @@ Returns:
     //\r
     // Carve up new page into free pool blocks\r
     //\r
-    offset = 0;\r
-    while (offset < DEFAULT_PAGE_ALLOCATION) {\r
+    Offset = 0;\r
+    while (Offset < DEFAULT_PAGE_ALLOCATION) {\r
       ASSERT (Index < MAX_POOL_LIST);\r
       FSize = LIST_TO_SIZE(Index);\r
 \r
-      while (offset + FSize <= DEFAULT_PAGE_ALLOCATION) {\r
-        Free = (POOL_FREE *) &NewPage[offset];          \r
+      while (Offset + FSize <= DEFAULT_PAGE_ALLOCATION) {\r
+        Free = (POOL_FREE *) &NewPage[Offset];          \r
         Free->Signature = POOL_FREE_SIGNATURE;\r
         Free->Index     = (UINT32)Index;\r
         InsertHeadList (&Pool->FreeList[Index], &Free->Link);\r
-        offset += FSize;\r
+        Offset += FSize;\r
       }\r
 \r
       Index -= 1;\r
     }\r
 \r
-    ASSERT (offset == DEFAULT_PAGE_ALLOCATION);\r
+    ASSERT (Offset == DEFAULT_PAGE_ALLOCATION);\r
     Index = SIZE_TO_LIST(Size);\r
   }\r
 \r
@@ -368,7 +334,7 @@ Done:
     DEBUG_CLEAR_MEMORY (Buffer, Size - POOL_OVERHEAD);\r
 \r
     DEBUG (\r
-      (EFI_D_POOL,\r
+      (DEBUG_POOL,\r
       "AllocatePoolI: Type %x, Addr %x (len %x) %,d\n",\r
        PoolType, \r
        Buffer, \r
@@ -382,7 +348,7 @@ Done:
     Pool->Used += Size;\r
 \r
   } else {\r
-    DEBUG ((EFI_D_ERROR | EFI_D_POOL, "AllocatePool: failed to allocate %d bytes\n", Size));\r
+    DEBUG ((DEBUG_ERROR | DEBUG_POOL, "AllocatePool: failed to allocate %d bytes\n", Size));\r
   }\r
 \r
   return Buffer;\r
@@ -390,28 +356,21 @@ Done:
   \r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-CoreFreePool (\r
-  IN VOID        *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Frees pool.\r
 \r
-Arguments:\r
+  @param  Buffer                 The allocated pool entry to free \r
 \r
-  Buffer      - The allocated pool entry to free\r
+  @retval EFI_INVALID_PARAMETER  Buffer is not a valid value. \r
+  @retval EFI_SUCCESS            Pool successfully freed.\r
 \r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER   - Buffer is not a valid value.\r
-  \r
-  EFI_SUCCESS             - Pool successfully freed.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreFreePool (\r
+  IN VOID        *Buffer\r
+  )\r
 {\r
   EFI_STATUS Status;\r
 \r
@@ -426,30 +385,21 @@ Returns:
 }\r
 \r
 \r
-EFI_STATUS\r
-CoreFreePoolI (\r
-  IN VOID       *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Internal function to free a pool entry.\r
-\r
   Caller must have the memory lock held\r
 \r
+  @param  Buffer                 The allocated pool entry to free \r
 \r
-Arguments:\r
-\r
-  Buffer      - The allocated pool entry to free\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER     - Buffer not valid\r
-  \r
-  EFI_SUCCESS               - Buffer successfully freed.\r
+  @retval EFI_INVALID_PARAMETER  Buffer not valid \r
+  @retval EFI_SUCCESS            Buffer successfully freed.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreFreePoolI (\r
+  IN VOID       *Buffer\r
+  )\r
 {\r
   POOL        *Pool;\r
   POOL_HEAD   *Head;\r
@@ -460,7 +410,7 @@ Returns:
   UINTN       Size;\r
   CHAR8       *NewPage;\r
   UINTN       FSize;\r
-  UINTN       offset;\r
+  UINTN       Offset;\r
   BOOLEAN     AllFree;\r
 \r
   ASSERT(NULL != Buffer);\r
@@ -501,7 +451,7 @@ Returns:
     return EFI_INVALID_PARAMETER;\r
   }\r
   Pool->Used -= Size;\r
-  DEBUG ((EFI_D_POOL, "FreePool: %x (len %x) %,d\n", Head->Data, Head->Size - POOL_OVERHEAD, Pool->Used));\r
+  DEBUG ((DEBUG_POOL, "FreePool: %x (len %x) %,d\n", Head->Data, Head->Size - POOL_OVERHEAD, Pool->Used));\r
 \r
   //\r
   // Determine the pool list \r
@@ -545,17 +495,17 @@ Returns:
       Index = Free->Index;\r
 \r
       AllFree = TRUE;\r
-      offset = 0;\r
+      Offset = 0;\r
       \r
-      while ((offset < DEFAULT_PAGE_ALLOCATION) && (AllFree)) {\r
+      while ((Offset < DEFAULT_PAGE_ALLOCATION) && (AllFree)) {\r
         FSize = LIST_TO_SIZE(Index);\r
-        while (offset + FSize <= DEFAULT_PAGE_ALLOCATION) {\r
-          Free = (POOL_FREE *) &NewPage[offset];\r
+        while (Offset + FSize <= DEFAULT_PAGE_ALLOCATION) {\r
+          Free = (POOL_FREE *) &NewPage[Offset];\r
           ASSERT(NULL != Free);\r
           if (Free->Signature != POOL_FREE_SIGNATURE) {\r
             AllFree = FALSE;\r
           }\r
-          offset += FSize;\r
+          Offset += FSize;\r
         }\r
         Index -= 1;\r
       }\r
@@ -570,15 +520,15 @@ Returns:
         Free = (POOL_FREE *) &NewPage[0];\r
         ASSERT(NULL != Free);\r
         Index = Free->Index;\r
-        offset = 0;\r
+        Offset = 0;\r
         \r
-        while (offset < DEFAULT_PAGE_ALLOCATION) {\r
+        while (Offset < DEFAULT_PAGE_ALLOCATION) {\r
           FSize = LIST_TO_SIZE(Index);\r
-          while (offset + FSize <= DEFAULT_PAGE_ALLOCATION) {\r
-            Free = (POOL_FREE *) &NewPage[offset];\r
+          while (Offset + FSize <= DEFAULT_PAGE_ALLOCATION) {\r
+            Free = (POOL_FREE *) &NewPage[Offset];\r
             ASSERT(NULL != Free);\r
             RemoveEntryList (&Free->Link);\r
-            offset += FSize;\r
+            Offset += FSize;\r
           }\r
           Index -= 1;\r
         }\r
index 90e5738532acce6884139a8025ac38ca73c1d575..e318b4239f4f9e5f9dc4debd13cc02cbd9984b42 100644 (file)
@@ -26,30 +26,22 @@ static EFI_DEBUG_IMAGE_INFO_TABLE_HEADER  mDebugInfoTableHeader = {
 static EFI_SYSTEM_TABLE_POINTER *mDebugTable = NULL;\r
 \r
     \r
-VOID\r
-CoreInitializeDebugImageInfoTable (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Creates and initializes the DebugImageInfo Table.  Also creates the configuration\r
   table and registers it into the system table.\r
 \r
-Arguments:\r
-  None\r
-\r
-Returns:\r
-  NA\r
-\r
-Notes:\r
-  This function allocates memory, frees it, and then allocates memory at an\r
-  address within the initial allocation. Since this function is called early\r
-  in DXE core initialization (before drivers are dispatched), this should not\r
-  be a problem.\r
+  Note:\r
+    This function allocates memory, frees it, and then allocates memory at an\r
+    address within the initial allocation. Since this function is called early\r
+    in DXE core initialization (before drivers are dispatched), this should not\r
+    be a problem.\r
 \r
---*/\r
+**/\r
+VOID\r
+CoreInitializeDebugImageInfoTable (\r
+  VOID\r
+  )\r
 { \r
   EFI_STATUS                          Status;\r
   EFI_PHYSICAL_ADDRESS                Mem;\r
@@ -97,56 +89,42 @@ Notes:
   ASSERT_EFI_ERROR (Status);\r
 }\r
 \r
-VOID\r
-CoreUpdateDebugTableCrc32 (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Update the CRC32 in the Debug Table.\r
   Since the CRC32 service is made available by the Runtime driver, we have to\r
   wait for the Runtime Driver to be installed before the CRC32 can be computed.\r
   This function is called elsewhere by the core when the runtime architectural\r
   protocol is produced.\r
 \r
-Arguments:\r
-  None\r
-\r
-Returns:\r
-  NA\r
-\r
---*/\r
+**/\r
+VOID\r
+CoreUpdateDebugTableCrc32 (\r
+  VOID\r
+  )\r
 {\r
   ASSERT(mDebugTable != NULL);\r
   mDebugTable->Crc32 = 0;\r
   gDxeCoreBS->CalculateCrc32 ((VOID *)mDebugTable, sizeof (EFI_SYSTEM_TABLE_POINTER), &mDebugTable->Crc32);\r
 }\r
 \r
+\r
+/**\r
+  Adds a new DebugImageInfo structure to the DebugImageInfo Table.  Re-Allocates\r
+  the table if it's not large enough to accomidate another entry.\r
+\r
+  @param  ImageInfoType  type of debug image information \r
+  @param  LoadedImage    pointer to the loaded image protocol for the image being \r
+                         loaded \r
+  @param  ImageHandle    image handle for the image being loaded\r
+\r
+**/\r
 VOID\r
 CoreNewDebugImageInfoEntry (\r
   IN  UINT32                      ImageInfoType,\r
   IN  EFI_LOADED_IMAGE_PROTOCOL   *LoadedImage,\r
   IN  EFI_HANDLE                  ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Adds a new DebugImageInfo structure to the DebugImageInfo Table.  Re-Allocates\r
-  the table if it's not large enough to accomidate another entry.\r
-\r
-Arguments:\r
-\r
-  ImageInfoType     - type of debug image information\r
-  LoadedImage       - pointer to the loaded image protocol for the image being loaded\r
-  ImageHandle       - image handle for the image being loaded\r
-\r
-Returns:\r
-  NA\r
-\r
---*/\r
 {    \r
   EFI_DEBUG_IMAGE_INFO      *Table;\r
   EFI_DEBUG_IMAGE_INFO      *NewTable;\r
@@ -211,25 +189,17 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-CoreRemoveDebugImageInfoEntry (\r
-  EFI_HANDLE ImageHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Removes and frees an entry from the DebugImageInfo Table.\r
 \r
-Arguments:\r
-\r
-  ImageHandle       - image handle for the image being unloaded\r
-\r
-Returns:\r
-\r
-  NA\r
+  @param  ImageHandle    image handle for the image being unloaded\r
 \r
---*/\r
+**/\r
+VOID\r
+CoreRemoveDebugImageInfoEntry (\r
+  EFI_HANDLE ImageHandle\r
+  )\r
 {    \r
   EFI_DEBUG_IMAGE_INFO  *Table;\r
   UINTN                 Index;\r
@@ -252,3 +222,4 @@ Returns:
   mDebugInfoTableHeader.UpdateStatus &= ~EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS;\r
 }\r
 \r
+\r
index 26db2fbc1f4978837fcbce19d33cef02aaa255eb..95d0393a8419db22d3fb13f4da18c75d8fe8fb17 100644 (file)
@@ -20,30 +20,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 UINTN mSystemTableAllocateSize = 0;\r
 \r
 \r
-EFI_STATUS\r
-CoreGetConfigTable (\r
-  IN EFI_GUID *Guid,\r
-  OUT VOID    **Table\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Find a config table by name in system table's ConfigurationTable.\r
 \r
-Arguments:\r
-\r
-  Guid        - The table name to look for\r
-  \r
-  Table       - Pointer of the config table\r
+  @param  Guid           The table name to look for \r
+  @param  Table          Pointer of the config table \r
 \r
-Returns: \r
+  @retval EFI_NOT_FOUND  Could not find the table in system table's \r
+                         ConfigurationTable. \r
+  @retval EFI_SUCCESS    Table successfully found.\r
 \r
-  EFI_NOT_FOUND       - Could not find the table in system table's ConfigurationTable.\r
-  \r
-  EFI_SUCCESS         - Table successfully found.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+CoreGetConfigTable (\r
+  IN EFI_GUID *Guid,\r
+  OUT VOID    **Table\r
+  )\r
 {\r
   UINTN Index;\r
 \r
@@ -59,33 +52,28 @@ Returns:
 \r
 \r
 \r
+\r
+/**\r
+  Boot Service called to add, modify, or remove a system configuration table from\r
+  the EFI System Table.\r
+\r
+  @param  Guid           Pointer to the GUID for the entry to add, update, or \r
+                         remove \r
+  @param  Table          Pointer to the configuration table for the entry to add, \r
+                         update, or remove, may be NULL. \r
+\r
+  @return EFI_SUCCESS               Guid, Table pair added, updated, or removed.\r
+  @return EFI_INVALID_PARAMETER     Input GUID not valid.\r
+  @return EFI_NOT_FOUND             Attempted to delete non-existant entry\r
+  @return EFI_OUT_OF_RESOURCES      Not enough memory available\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreInstallConfigurationTable (\r
   IN EFI_GUID *Guid,\r
   IN VOID     *Table\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Boot Service called to add, modify, or remove a system configuration table from \r
-  the EFI System Table.\r
-\r
-Arguments:\r
-\r
-  Guid     -  Pointer to the GUID for the entry to add, update, or remove\r
-  Table    -  Pointer to the configuration table for the entry to add, update, or\r
-              remove, may be NULL.\r
-\r
-Returns:\r
-  \r
-  EFI_SUCCESS               Guid, Table pair added, updated, or removed.\r
-  EFI_INVALID_PARAMETER     Input GUID not valid.\r
-  EFI_NOT_FOUND             Attempted to delete non-existant entry\r
-  EFI_OUT_OF_RESOURCES      Not enough memory available\r
-\r
---*/\r
 {\r
   UINTN                   Index;\r
   EFI_CONFIGURATION_TABLE *EfiConfigurationTable;\r
index 94e8db35abbe210991e11bc53be9eb5d5440899f..c17c1a8deb5103824fe7623706c7f87e4fb75571 100644 (file)
@@ -17,7 +17,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define WATCHDOG_TIMER_CALIBRATE_PER_SECOND 10000000\r
 \r
+/**\r
+  Sets the system's watchdog timer.\r
+\r
+  @param  Timeout         The number of seconds to set the watchdog timer to.\r
+                          A value of zero disables the timer.\r
+  @param  WatchdogCode    The numeric code to log on a watchdog timer timeout\r
+                          event. The firmware reserves codes 0x0000 to 0xFFFF.\r
+                          Loaders and operating systems may use other timeout\r
+                          codes.\r
+  @param  DataSize        The size, in bytes, of WatchdogData.\r
+  @param  WatchdogData    A data buffer that includes a Null-terminated Unicode\r
+                          string, optionally followed by additional binary data.\r
+                          The string is a description that the call may use to\r
+                          further indicate the reason to be logged with a\r
+                          watchdog event.\r
+\r
+  @return EFI_SUCCESS               Timeout has been set\r
+  @return EFI_NOT_AVAILABLE_YET     WatchdogTimer is not available yet\r
+  @return EFI_UNSUPPORTED           System does not have a timer (currently not used)\r
+  @return EFI_DEVICE_ERROR          Could not complete due to hardware error\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CoreSetWatchdogTimer (\r
@@ -26,31 +47,6 @@ CoreSetWatchdogTimer (
   IN UINTN    DataSize,\r
   IN CHAR16   *WatchdogData OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Sets the system's watchdog timer.\r
-\r
-Arguments:\r
-\r
-  Timeout         The number of seconds.  Zero disables the timer.\r
-\r
-  ///////following  three parameters are left for platform specific using  \r
-  \r
-  WatchdogCode    The numberic code to log.  0x0 to 0xffff are firmware\r
-  DataSize        Size of the optional data\r
-  WatchdogData    Optional Null terminated unicode string followed by binary \r
-                  data.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS               Timeout has been set\r
-  EFI_NOT_AVAILABLE_YET     WatchdogTimer is not available yet \r
-  EFI_UNSUPPORTED           System does not have a timer (currently not used)\r
-  EFI_DEVICE_ERROR          Could not complete due to hardware error\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
 \r
index db32c1fa3adbb2d91d48b85931e1801a24feb424..8ab48e6cf30e7f1f2dd045c78076da520ca7060c 100644 (file)
@@ -20,29 +20,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <DxeMain.h>\r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-CoreStall (\r
-  IN UINTN            Microseconds\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Introduces a fine-grained stall.\r
 \r
-Arguments:\r
-\r
-  Microseconds      The number of microseconds to stall execution\r
-\r
-Returns:\r
+  @param  Microseconds           The number of microseconds to stall execution.\r
 \r
-  EFI_SUCCESS            - Execution was stalled for at least the requested amount\r
-                           of microseconds.\r
+  @retval EFI_SUCCESS            Execution was stalled for at least the requested \r
+                                 amount of microseconds. \r
+  @retval EFI_NOT_AVAILABLE_YET  gMetronome is not available yet\r
 \r
-  EFI_NOT_AVAILABLE_YET  - gMetronome is not available yet\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreStall (\r
+  IN UINTN            Microseconds\r
+  )\r
 {\r
   UINT32  Counter;\r
   UINT32  Remainder;\r
index 8d33322c42a791801679ff10e2f8814cf1917fa4..54049cffb621079ede841cb31bae8ca7f363bda5 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   Section Extraction Protocol implementation.\r
   \r
   Stream database is implemented as a linked list of section streams,\r
@@ -27,7 +27,7 @@
   3) A support protocol is not found, and the data is not available to be read\r
      without it.  This results in EFI_PROTOCOL_ERROR.\r
      \r
-Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -100,6 +100,21 @@ typedef struct {
 // Local prototypes\r
 //\r
 \r
+/**\r
+  Worker function.  Determine if the input stream:child matches the input type.\r
+\r
+  @param  Stream                 Indicates the section stream associated with the \r
+                                 child \r
+  @param  Child                  Indicates the child to check \r
+  @param  SearchType             Indicates the type of section to check against \r
+                                 for \r
+  @param  SectionDefinitionGuid  Indicates the GUID to check against if the type \r
+                                 is EFI_SECTION_GUID_DEFINED \r
+\r
+  @retval TRUE                   The child matches \r
+  @retval FALSE                  The child doesn't match\r
+\r
+**/\r
 STATIC\r
 BOOLEAN\r
 ChildIsType (\r
@@ -110,6 +125,15 @@ ChildIsType (
   );\r
 \r
 #if 0\r
+/**\r
+  RPN callback function.  Removes a stale section stream and re-initializes it\r
+  with an updated AuthenticationStatus.\r
+\r
+  @param  Event                  The event that fired \r
+  @param  RpnContext             A pointer to the context that allows us to \r
+                                 identify the relevent encapsulation...\r
+\r
+**/\r
 STATIC\r
 VOID\r
 EFIAPI\r
@@ -120,6 +144,16 @@ NotifyGuidedExtraction (
 #endif\r
 \r
 #if 0\r
+/**\r
+  Worker function.  Constructor for RPN event if needed to keep AuthenticationStatus\r
+  cache correct when a missing GUIDED_SECTION_EXTRACTION_PROTOCOL appears.\r
+\r
+  @param  ParentStream           Indicates the parent of the ecnapsulation \r
+                                 section (child) \r
+  @param  ChildNode              Indicates the child node that is the \r
+                                 encapsulation section.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CreateGuidedExtractionRpnEvent (\r
@@ -128,6 +162,18 @@ CreateGuidedExtractionRpnEvent (
   );\r
 #endif\r
 \r
+/**\r
+  Worker function.  Search stream database for requested stream handle.\r
+\r
+  @param  SearchHandle           Indicates which stream to look for. \r
+  @param  FoundStream            Output pointer to the found stream. \r
+\r
+  @retval EFI_SUCCESS            StreamHandle was found and *FoundStream contains \r
+                                 the stream node. \r
+  @retval EFI_NOT_FOUND          SearchHandle was not found in the stream \r
+                                 database.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FindStreamNode (\r
@@ -135,6 +181,32 @@ FindStreamNode (
   OUT CORE_SECTION_STREAM_NODE                **FoundStream\r
   );\r
   \r
+/**\r
+  Worker function  Recursively searches / builds section stream database\r
+  looking for requested section.\r
+\r
+  @param  SourceStream           Indicates the section stream in which to do the \r
+                                 search. \r
+  @param  SearchType             Indicates the type of section to search for. \r
+  @param  SectionInstance        Indicates which instance of section to find.  \r
+                                 This is an in/out parameter to deal with \r
+                                 recursions. \r
+  @param  SectionDefinitionGuid  Guid of section definition \r
+  @param  FoundChild             Output indicating the child node that is found. \r
+  @param  FoundStream            Output indicating which section stream the child \r
+                                 was found in.  If this stream was generated as a \r
+                                 result of an encapsulation section, the \r
+                                 streamhandle is visible within the SEP driver \r
+                                 only.\r
+  @param  AuthenticationStatus   Indicates the authentication status of the found section. \r
+\r
+  @retval EFI_SUCCESS            Child node was found and returned. \r
+                                 EFI_OUT_OF_RESOURCES- Memory allocation failed. \r
+  @retval EFI_NOT_FOUND          Requested child node does not exist. \r
+  @retval EFI_PROTOCOL_ERROR     a required GUIDED section extraction protocol \r
+                                 does not exist\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FindChildNode (\r
@@ -147,6 +219,27 @@ FindChildNode (
   OUT    UINT32                               *AuthenticationStatus\r
   );\r
   \r
+/**\r
+  Worker function.  Constructor for new child nodes.\r
+\r
+  @param  Stream                 Indicates the section stream in which to add the \r
+                                 child. \r
+  @param  ChildOffset            Indicates the offset in Stream that is the \r
+                                 beginning of the child section. \r
+  @param  ChildNode              Indicates the Callee allocated and initialized \r
+                                 child. \r
+\r
+  @retval EFI_SUCCESS            Child node was found and returned. \r
+                                 EFI_OUT_OF_RESOURCES- Memory allocation failed. \r
+  @retval EFI_PROTOCOL_ERROR     Encapsulation sections produce new stream \r
+                                 handles when the child node is created.  If the \r
+                                 section type is GUID defined, and the extraction \r
+                                 GUID does not exist, and producing the stream \r
+                                 requires the GUID, then a protocol error is \r
+                                 generated and no child is produced. Values \r
+                                 returned by OpenSectionStreamEx.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CreateChildNode (\r
@@ -155,12 +248,51 @@ CreateChildNode (
   OUT    CORE_SECTION_CHILD_NODE              **ChildNode\r
   );\r
   \r
+/**\r
+  Worker function.  Destructor for child nodes.\r
+\r
+  @param  ChildNode              Indicates the node to destroy\r
+\r
+**/\r
 STATIC\r
 VOID\r
 FreeChildNode (\r
   IN  CORE_SECTION_CHILD_NODE                 *ChildNode\r
   );\r
   \r
+/**\r
+  Worker function.  Constructor for section streams.\r
+\r
+  @param  SectionStreamLength    Size in bytes of the section stream. \r
+  @param  SectionStream          Buffer containing the new section stream. \r
+  @param  AllocateBuffer         Indicates whether the stream buffer is to be \r
+                                 copied or the input buffer is to be used in \r
+                                 place. AuthenticationStatus- Indicates the \r
+                                 default authentication status for the new \r
+                                 stream. \r
+  @param  AuthenticationStatus   A pointer to a caller-allocated UINT32 that\r
+                                 indicates the authentication status of the\r
+                                 output buffer. If the input section¡¯s\r
+                                 GuidedSectionHeader.Attributes field\r
+                                 has the EFI_GUIDED_SECTION_AUTH_STATUS_VALID\r
+                                 bit as clear, AuthenticationStatus must return\r
+                                 zero. Both local bits (19:16) and aggregate\r
+                                 bits (3:0) in AuthenticationStatus are returned\r
+                                 by ExtractSection(). These bits reflect the\r
+                                 status of the extraction operation. The bit\r
+                                 pattern in both regions must be the same, as\r
+                                 the local and aggregate authentication statuses\r
+                                 have equivalent meaning at this level. If the\r
+                                 function returns anything other than\r
+                                 EFI_SUCCESS, the value of *AuthenticationStatus\r
+                                 is undefined.\r
+  @param  SectionStreamHandle    A pointer to a caller allocated section stream \r
+                                 handle. \r
+\r
+  @retval EFI_SUCCESS            Stream was added to stream database. \r
+  @retval EFI_OUT_OF_RESOURCES   memory allocation failed.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 OpenSectionStreamEx (\r
@@ -171,6 +303,15 @@ OpenSectionStreamEx (
      OUT UINTN                                *SectionStreamHandle\r
   );\r
   \r
+/**\r
+  Check if a stream is valid.\r
+\r
+  @param  SectionStream          The section stream to be checked \r
+  @param  SectionStreamLength    The length of section stream \r
+\r
+  @return A boolean value indicating the validness of the section stream.\r
+\r
+**/\r
 STATIC\r
 BOOLEAN\r
 IsValidSectionStream (\r
@@ -178,6 +319,90 @@ IsValidSectionStream (
   IN  UINTN                                   SectionStreamLength\r
   );\r
 \r
+/**\r
+  The ExtractSection() function processes the input section and\r
+  allocates a buffer from the pool in which it returns the section\r
+  contents. If the section being extracted contains\r
+  authentication information (the section's\r
+  GuidedSectionHeader.Attributes field has the\r
+  EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit set), the values\r
+  returned in AuthenticationStatus must reflect the results of\r
+  the authentication operation. Depending on the algorithm and\r
+  size of the encapsulated data, the time that is required to do\r
+  a full authentication may be prohibitively long for some\r
+  classes of systems. To indicate this, use\r
+  EFI_SECURITY_POLICY_PROTOCOL_GUID, which may be published by\r
+  the security policy driver (see the Platform Initialization\r
+  Driver Execution Environment Core Interface Specification for\r
+  more details and the GUID definition). If the\r
+  EFI_SECURITY_POLICY_PROTOCOL_GUID exists in the handle\r
+  database, then, if possible, full authentication should be\r
+  skipped and the section contents simply returned in the\r
+  OutputBuffer. In this case, the\r
+  EFI_AUTH_STATUS_PLATFORM_OVERRIDE bit AuthenticationStatus\r
+  must be set on return. ExtractSection() is callable only from\r
+  TPL_NOTIFY and below. Behavior of ExtractSection() at any\r
+  EFI_TPL above TPL_NOTIFY is undefined. Type EFI_TPL is\r
+  defined in RaiseTPL() in the UEFI 2.0 specification.\r
+\r
+  \r
+  @param This         Indicates the\r
+                      EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.\r
+\r
+  @param InputSection Buffer containing the input GUIDed section\r
+                      to be processed. OutputBuffer OutputBuffer\r
+                      is allocated from boot services pool\r
+                      memory and contains the new section\r
+                      stream. The caller is responsible for\r
+                      freeing this buffer.\r
+  @param OutputBuffer *OutputBuffer is allocated from boot services\r
+                      pool memory and contains the new section stream.\r
+                      The caller is responsible for freeing this buffer.\r
+  @param OutputSize   A pointer to a caller-allocated UINTN in\r
+                      which the size of OutputBuffer allocation\r
+                      is stored. If the function returns\r
+                      anything other than EFI_SUCCESS, the value\r
+                      of OutputSize is undefined.\r
+\r
+  @param AuthenticationStatus A pointer to a caller-allocated\r
+                              UINT32 that indicates the\r
+                              authentication status of the\r
+                              output buffer. If the input\r
+                              section's\r
+                              GuidedSectionHeader.Attributes\r
+                              field has the\r
+                              EFI_GUIDED_SECTION_AUTH_STATUS_VAL\r
+                              bit as clear, AuthenticationStatus\r
+                              must return zero. Both local bits\r
+                              (19:16) and aggregate bits (3:0)\r
+                              in AuthenticationStatus are\r
+                              returned by ExtractSection().\r
+                              These bits reflect the status of\r
+                              the extraction operation. The bit\r
+                              pattern in both regions must be\r
+                              the same, as the local and\r
+                              aggregate authentication statuses\r
+                              have equivalent meaning at this\r
+                              level. If the function returns\r
+                              anything other than EFI_SUCCESS,\r
+                              the value of AuthenticationStatus\r
+                              is undefined.\r
+\r
+\r
+  @retval EFI_SUCCESS          The InputSection was successfully\r
+                               processed and the section contents were\r
+                               returned.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES The system has insufficient\r
+                               resources to process the\r
+                               request.\r
+\r
+  @retval EFI_INVALID_PARAMETER The GUID in InputSection does\r
+                                not match this instance of the\r
+                                GUIDed Section Extraction\r
+                                Protocol.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CustomGuidedSectionExtract (\r
@@ -198,27 +423,24 @@ EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL mCustomGuidedSectionExtractionProtocol =
   CustomGuidedSectionExtract\r
 };\r
                                              \r
+\r
+/**\r
+  Entry point of the section extraction code. Initializes an instance of the\r
+  section extraction interface and installs it on a new handle.\r
+\r
+  @param  ImageHandle   A handle for the image that is initializing this driver\r
+  @param  SystemTable   A pointer to the EFI system table\r
+\r
+  @retval EFI_SUCCESS           Driver initialized successfully\r
+  @retval EFI_OUT_OF_RESOURCES  Could not allocate needed resources\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeSectionExtraction (\r
   IN EFI_HANDLE                   ImageHandle,\r
   IN EFI_SYSTEM_TABLE             *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-  Entry point of the section extraction code. Initializes an instance of the \r
-  section extraction interface and installs it on a new handle.\r
-\r
-Arguments:  \r
-  ImageHandle   EFI_HANDLE: A handle for the image that is initializing this driver\r
-  SystemTable   EFI_SYSTEM_TABLE: A pointer to the EFI system table        \r
-\r
-Returns:  \r
-  EFI_SUCCESS:  Driver initialized successfully\r
-  EFI_OUT_OF_RESOURCES:   Could not allocate needed resources\r
-\r
---*/\r
 {\r
   EFI_STATUS                         Status;\r
   EFI_GUID                           *ExtractHandlerGuidTable;\r
@@ -246,6 +468,22 @@ Returns:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  SEP member function.  This function creates and returns a new section stream\r
+  handle to represent the new section stream.\r
+\r
+  @param  SectionStreamLength    Size in bytes of the section stream. \r
+  @param  SectionStream          Buffer containing the new section stream. \r
+  @param  SectionStreamHandle    A pointer to a caller allocated UINTN that on \r
+                                 output contains the new section stream handle. \r
+\r
+  @retval EFI_SUCCESS            The section stream is created successfully.\r
+  @retval EFI_OUT_OF_RESOURCES   memory allocation failed. \r
+  @retval EFI_INVALID_PARAMETER  Section stream does not end concident with end \r
+                                 of last section.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 OpenSectionStream (\r
@@ -253,26 +491,6 @@ OpenSectionStream (
   IN     VOID                                      *SectionStream,\r
      OUT UINTN                                     *SectionStreamHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  SEP member function.  This function creates and returns a new section stream\r
-  handle to represent the new section stream.\r
-\r
-Arguments:\r
-  This                - Indicates the calling context.\r
-  SectionStreamLength - Size in bytes of the section stream.\r
-  SectionStream       - Buffer containing the new section stream.\r
-  SectionStreamHandle - A pointer to a caller allocated UINTN that on output\r
-                        contains the new section stream handle.\r
-\r
-Returns:\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES - memory allocation failed.\r
-  EFI_INVALID_PARAMETER - section stream does not end concident with end of\r
-                          last section.\r
-\r
---*/\r
 {\r
   //\r
   // Check to see section stream looks good...\r
@@ -290,6 +508,64 @@ Returns:
           );\r
 }\r
   \r
+\r
+/**\r
+  SEP member function.  Retrieves requested section from section stream.\r
+\r
+  @param  SectionStreamHandle   The section stream from which to extract the\r
+                                requested section.\r
+  @param  SectionType           A pointer to the type of section to search for.\r
+  @param  SectionDefinitionGuid If the section type is EFI_SECTION_GUID_DEFINED,\r
+                                then SectionDefinitionGuid indicates which of\r
+                                these types of sections to search for.\r
+  @param  SectionInstance       Indicates which instance of the requested\r
+                                section to return.\r
+  @param  Buffer                Double indirection to buffer.  If *Buffer is\r
+                                non-null on input, then the buffer is caller\r
+                                allocated.  If Buffer is NULL, then the buffer\r
+                                is callee allocated.  In either case, the\r
+                                requried buffer size is returned in *BufferSize.\r
+  @param  BufferSize            On input, indicates the size of *Buffer if\r
+                                *Buffer is non-null on input.  On output,\r
+                                indicates the required size (allocated size if\r
+                                callee allocated) of *Buffer.\r
+  @param  AuthenticationStatus  A pointer to a caller-allocated UINT32 that\r
+                                indicates the authentication status of the\r
+                                output buffer. If the input section¡¯s\r
+                                GuidedSectionHeader.Attributes field\r
+                                has the EFI_GUIDED_SECTION_AUTH_STATUS_VALID\r
+                                bit as clear, AuthenticationStatus must return\r
+                                zero. Both local bits (19:16) and aggregate\r
+                                bits (3:0) in AuthenticationStatus are returned\r
+                                by ExtractSection(). These bits reflect the\r
+                                status of the extraction operation. The bit\r
+                                pattern in both regions must be the same, as\r
+                                the local and aggregate authentication statuses\r
+                                have equivalent meaning at this level. If the\r
+                                function returns anything other than\r
+                                EFI_SUCCESS, the value of *AuthenticationStatus\r
+                                is undefined.\r
+\r
+  @retval EFI_SUCCESS           Section was retrieved successfully\r
+  @retval EFI_PROTOCOL_ERROR    A GUID defined section was encountered in the\r
+                                section stream with its\r
+                                EFI_GUIDED_SECTION_PROCESSING_REQUIRED bit set,\r
+                                but there was no corresponding GUIDed Section\r
+                                Extraction Protocol in the handle database.\r
+                                *Buffer is unmodified.\r
+  @retval EFI_NOT_FOUND         An error was encountered when parsing the\r
+                                SectionStream.  This indicates the SectionStream\r
+                                is not correctly formatted.\r
+  @retval EFI_NOT_FOUND         The requested section does not exist.\r
+  @retval EFI_OUT_OF_RESOURCES  The system has insufficient resources to process\r
+                                the request.\r
+  @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.\r
+  @retval EFI_WARN_TOO_SMALL    The size of the caller allocated input buffer is\r
+                                insufficient to contain the requested section.\r
+                                The input buffer is filled and section contents\r
+                                are truncated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetSection (\r
@@ -301,51 +577,6 @@ GetSection (
   IN OUT UINTN                                          *BufferSize,\r
   OUT UINT32                                            *AuthenticationStatus\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  SEP member function.  Retrieves requested section from section stream.\r
-\r
-Arguments:  \r
-  SectionStreamHandle:  The section stream from which to extract the requested\r
-                          section.\r
-  SectionType:         A pointer to the type of section to search for.\r
-  SectionDefinitionGuid: If the section type is EFI_SECTION_GUID_DEFINED, then\r
-                        SectionDefinitionGuid indicates which of these types\r
-                          of sections to search for.\r
-  SectionInstance:      Indicates which instance of the requested section to\r
-                          return.\r
-  Buffer:               Double indirection to buffer.  If *Buffer is non-null on\r
-                          input, then the buffer is caller allocated.  If\r
-                          *Buffer is NULL, then the buffer is callee allocated.\r
-                          In either case, the requried buffer size is returned\r
-                          in *BufferSize.\r
-  BufferSize:           On input, indicates the size of *Buffer if *Buffer is\r
-                          non-null on input.  On output, indicates the required\r
-                          size (allocated size if callee allocated) of *Buffer.\r
-  AuthenticationStatus: Indicates the authentication status of the retrieved\r
-                          section.\r
-\r
-Returns:  \r
-  EFI_SUCCESS:        Section was retrieved successfully\r
-  EFI_PROTOCOL_ERROR: A GUID defined section was encountered in the section \r
-                        stream with its EFI_GUIDED_SECTION_PROCESSING_REQUIRED\r
-                        bit set, but there was no corresponding GUIDed Section \r
-                        Extraction Protocol in the handle database.  *Buffer is \r
-                        unmodified.\r
-  EFI_NOT_FOUND:      An error was encountered when parsing the SectionStream.\r
-                        This indicates the SectionStream  is not correctly \r
-                        formatted.\r
-  EFI_NOT_FOUND:      The requested section does not exist.\r
-  EFI_OUT_OF_RESOURCES: The system has insufficient resources to process the \r
-                        request.\r
-  EFI_INVALID_PARAMETER: The SectionStreamHandle does not exist.\r
-  EFI_WARN_TOO_SMALL: The size of the caller allocated input buffer is \r
-                        insufficient to contain the requested section.  The \r
-                        input buffer is filled and contents are section contents\r
-                        are truncated.\r
-\r
---*/\r
 {\r
   CORE_SECTION_STREAM_NODE                              *StreamNode;\r
   EFI_TPL                                               OldTpl;\r
@@ -430,27 +661,23 @@ GetSection_Done:
 }\r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-CloseSectionStream (\r
-  IN  UINTN                                     StreamHandleToClose\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   SEP member function.  Deletes an existing section stream\r
 \r
-Arguments:\r
-  This                - Indicates the calling context.\r
-  StreamHandleToClose - Indicates the stream to close\r
+  @param  StreamHandleToClose    Indicates the stream to close \r
 \r
-Returns:\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES - memory allocation failed.\r
-  EFI_INVALID_PARAMETER - section stream does not end concident with end of\r
-                          last section.\r
+  @retval EFI_SUCCESS            The section stream is closed sucessfully.\r
+  @retval EFI_OUT_OF_RESOURCES   Memory allocation failed. \r
+  @retval EFI_INVALID_PARAMETER  Section stream does not end concident with end \r
+                                 of last section.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CloseSectionStream (\r
+  IN  UINTN                                     StreamHandleToClose\r
+  )\r
 {\r
   CORE_SECTION_STREAM_NODE                      *StreamNode;\r
   EFI_TPL                                       OldTpl;\r
@@ -486,6 +713,22 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Worker function.  Determine if the input stream:child matches the input type.\r
+\r
+  @param  Stream                 Indicates the section stream associated with the \r
+                                 child \r
+  @param  Child                  Indicates the child to check \r
+  @param  SearchType             Indicates the type of section to check against \r
+                                 for \r
+  @param  SectionDefinitionGuid  Indicates the GUID to check against if the type \r
+                                 is EFI_SECTION_GUID_DEFINED \r
+\r
+  @retval TRUE                   The child matches \r
+  @retval FALSE                  The child doesn't match\r
+\r
+**/\r
 STATIC\r
 BOOLEAN\r
 ChildIsType (\r
@@ -494,22 +737,6 @@ ChildIsType (
   IN EFI_SECTION_TYPE         SearchType,\r
   IN EFI_GUID                 *SectionDefinitionGuid\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Worker function.  Determine if the input stream:child matches the input type.\r
-\r
-Arguments:\r
-  Stream              - Indicates the section stream associated with the child\r
-  Child               - Indicates the child to check\r
-  SearchType          - Indicates the type of section to check against for\r
-  SectionDefinitionGuid - Indicates the GUID to check against if the type is\r
-                        EFI_SECTION_GUID_DEFINED\r
-Returns:\r
-  TRUE                - The child matches\r
-  FALSE               - The child doesn't match\r
-\r
---*/\r
 {\r
   EFI_GUID_DEFINED_SECTION    *GuidedSection;\r
   \r
@@ -527,6 +754,33 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Worker function  Recursively searches / builds section stream database\r
+  looking for requested section.\r
+\r
+  @param  SourceStream           Indicates the section stream in which to do the \r
+                                 search. \r
+  @param  SearchType             Indicates the type of section to search for. \r
+  @param  SectionInstance        Indicates which instance of section to find.  \r
+                                 This is an in/out parameter to deal with \r
+                                 recursions. \r
+  @param  SectionDefinitionGuid  Guid of section definition \r
+  @param  FoundChild             Output indicating the child node that is found. \r
+  @param  FoundStream            Output indicating which section stream the child \r
+                                 was found in.  If this stream was generated as a \r
+                                 result of an encapsulation section, the \r
+                                 streamhandle is visible within the SEP driver \r
+                                 only.\r
+  @param  AuthenticationStatus   Indicates the authentication status of the found section. \r
+\r
+  @retval EFI_SUCCESS            Child node was found and returned. \r
+                                 EFI_OUT_OF_RESOURCES- Memory allocation failed. \r
+  @retval EFI_NOT_FOUND          Requested child node does not exist. \r
+  @retval EFI_PROTOCOL_ERROR     a required GUIDED section extraction protocol \r
+                                 does not exist\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FindChildNode (\r
@@ -538,33 +792,6 @@ FindChildNode (
   OUT    CORE_SECTION_STREAM_NODE                   **FoundStream,\r
   OUT    UINT32                                     *AuthenticationStatus\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Worker function  Recursively searches / builds section stream database\r
-  looking for requested section.\r
-\r
-Arguments:\r
-  SourceStream        - Indicates the section stream in which to do the search.\r
-  SearchType          - Indicates the type of section to search for.\r
-  SectionInstance     - Indicates which instance of section to find.  This is\r
-                        an in/out parameter to deal with recursions.\r
-  SectionDefinitionGuid  - Guid of section definition\r
-  FoundChild          - Output indicating the child node that is found.\r
-  FoundStream         - Output indicating which section stream the child was\r
-                        found in.  If this stream was generated as a result of\r
-                        an encapsulation section, the streamhandle is visible\r
-                        within the SEP driver only.\r
-  AuthenticationStatus- Indicates the authentication status of the found section.\r
-\r
-Returns:\r
-  EFI_SUCCESS         - Child node was found and returned.\r
-  EFI_OUT_OF_RESOURCES- Memory allocation failed.\r
-  EFI_NOT_FOUND       - Requested child node does not exist.\r
-  EFI_PROTOCOL_ERROR  - a required GUIDED section extraction protocol does not\r
-                        exist\r
-\r
---*/\r
 {\r
   CORE_SECTION_CHILD_NODE                       *CurrentChildNode;\r
   CORE_SECTION_CHILD_NODE                       *RecursedChildNode;\r
@@ -684,6 +911,28 @@ Returns:
 }\r
 \r
 \r
+\r
+/**\r
+  Worker function.  Constructor for new child nodes.\r
+\r
+  @param  Stream                 Indicates the section stream in which to add the \r
+                                 child. \r
+  @param  ChildOffset            Indicates the offset in Stream that is the \r
+                                 beginning of the child section. \r
+  @param  ChildNode              Indicates the Callee allocated and initialized \r
+                                 child. \r
+\r
+  @retval EFI_SUCCESS            Child node was found and returned. \r
+                                 EFI_OUT_OF_RESOURCES- Memory allocation failed. \r
+  @retval EFI_PROTOCOL_ERROR     Encapsulation sections produce new stream \r
+                                 handles when the child node is created.  If the \r
+                                 section type is GUID defined, and the extraction \r
+                                 GUID does not exist, and producing the stream \r
+                                 requires the GUID, then a protocol error is \r
+                                 generated and no child is produced. Values \r
+                                 returned by OpenSectionStreamEx.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 CreateChildNode (\r
@@ -691,28 +940,6 @@ CreateChildNode (
   IN     UINT32                                ChildOffset,\r
      OUT CORE_SECTION_CHILD_NODE               **ChildNode\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Worker function.  Constructor for new child nodes.\r
-\r
-Arguments:\r
-  Stream              - Indicates the section stream in which to add the child.\r
-  ChildOffset         - Indicates the offset in Stream that is the beginning\r
-                        of the child section.\r
-  ChildNode           - Indicates the Callee allocated and initialized child.\r
-\r
-Returns:\r
-  EFI_SUCCESS         - Child node was found and returned.\r
-  EFI_OUT_OF_RESOURCES- Memory allocation failed.\r
-  EFI_PROTOCOL_ERROR  - Encapsulation sections produce new stream handles when\r
-                        the child node is created.  If the section type is GUID\r
-                        defined, and the extraction GUID does not exist, and\r
-                        producing the stream requires the GUID, then a protocol\r
-                        error is generated and no child is produced.\r
-  Values returned by OpenSectionStreamEx.\r
-\r
---*/\r
 {\r
   EFI_STATUS                                   Status;\r
   EFI_COMMON_SECTION_HEADER                    *SectionHeader;\r
@@ -939,26 +1166,22 @@ Returns:
 \r
 \r
 #if 0\r
+/**\r
+  Worker function.  Constructor for RPN event if needed to keep AuthenticationStatus\r
+  cache correct when a missing GUIDED_SECTION_EXTRACTION_PROTOCOL appears...\r
+\r
+  @param  ParentStream           Indicates the parent of the ecnapsulation \r
+                                 section (child) \r
+  @param  ChildNode              Indicates the child node that is the \r
+                                 encapsulation section.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 CreateGuidedExtractionRpnEvent (\r
   IN CORE_SECTION_STREAM_NODE       *ParentStream,\r
   IN CORE_SECTION_CHILD_NODE        *ChildNode\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Worker function.  Constructor for RPN event if needed to keep AuthenticationStatus\r
-  cache correct when a missing GUIDED_SECTION_EXTRACTION_PROTOCOL appears...\r
-\r
-Arguments:\r
-  ParentStream        - Indicates the parent of the ecnapsulation section (child)\r
-  ChildNode           - Indicates the child node that is the encapsulation section.\r
-\r
-Returns:\r
-  None\r
-\r
---*/\r
 {\r
   RPN_EVENT_CONTEXT *Context;\r
   \r
@@ -984,6 +1207,15 @@ Returns:
 \r
 \r
 #if 0\r
+/**\r
+  RPN callback function.  Removes a stale section stream and re-initializes it\r
+  with an updated AuthenticationStatus.\r
+\r
+  @param  Event                  The event that fired \r
+  @param  RpnContext             A pointer to the context that allows us to \r
+                                 identify the relevent encapsulation...\r
+\r
+**/\r
 STATIC\r
 VOID\r
 EFIAPI\r
@@ -991,21 +1223,6 @@ NotifyGuidedExtraction (
   IN   EFI_EVENT   Event,\r
   IN   VOID        *RpnContext\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  RPN callback function.  Removes a stale section stream and re-initializes it\r
-  with an updated AuthenticationStatus.\r
-\r
-Arguments:\r
-  Event               - The event that fired\r
-  RpnContext          - A pointer to the context that allows us to identify\r
-                        the relevent encapsulation...\r
-\r
-Returns:\r
-  None\r
-\r
---*/\r
 {\r
   EFI_STATUS                              Status;\r
   EFI_GUID_DEFINED_SECTION                *GuidedHeader;\r
@@ -1064,24 +1281,17 @@ Returns:
 }  \r
 #endif\r
 \r
+/**\r
+  Worker function.  Destructor for child nodes.\r
+\r
+  @param  ChildNode              Indicates the node to destroy\r
 \r
+**/\r
 STATIC\r
 VOID\r
 FreeChildNode (\r
   IN  CORE_SECTION_CHILD_NODE                   *ChildNode\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Worker function.  Destructor for child nodes.\r
-\r
-Arguments:\r
-  ChildNode           - Indicates the node to destroy\r
-\r
-Returns:\r
-  none\r
-\r
---*/\r
 {\r
   ASSERT (ChildNode->Signature == CORE_SECTION_CHILD_SIGNATURE);\r
   //\r
@@ -1103,6 +1313,40 @@ Returns:
 }  \r
 \r
 \r
+\r
+/**\r
+  Worker function.  Constructor for section streams.\r
+\r
+  @param  SectionStreamLength    Size in bytes of the section stream. \r
+  @param  SectionStream          Buffer containing the new section stream. \r
+  @param  AllocateBuffer         Indicates whether the stream buffer is to be \r
+                                 copied or the input buffer is to be used in \r
+                                 place. AuthenticationStatus- Indicates the \r
+                                 default authentication status for the new \r
+                                 stream. \r
+  @param  AuthenticationStatus   A pointer to a caller-allocated UINT32 that\r
+                                 indicates the authentication status of the\r
+                                 output buffer. If the input section¡¯s\r
+                                 GuidedSectionHeader.Attributes field\r
+                                 has the EFI_GUIDED_SECTION_AUTH_STATUS_VALID\r
+                                 bit as clear, AuthenticationStatus must return\r
+                                 zero. Both local bits (19:16) and aggregate\r
+                                 bits (3:0) in AuthenticationStatus are returned\r
+                                 by ExtractSection(). These bits reflect the\r
+                                 status of the extraction operation. The bit\r
+                                 pattern in both regions must be the same, as\r
+                                 the local and aggregate authentication statuses\r
+                                 have equivalent meaning at this level. If the\r
+                                 function returns anything other than\r
+                                 EFI_SUCCESS, the value of *AuthenticationStatus\r
+                                 is undefined.\r
+  @param  SectionStreamHandle    A pointer to a caller allocated section stream \r
+                                 handle. \r
+\r
+  @retval EFI_SUCCESS            Stream was added to stream database. \r
+  @retval EFI_OUT_OF_RESOURCES   memory allocation failed.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 OpenSectionStreamEx (\r
@@ -1112,25 +1356,6 @@ OpenSectionStreamEx (
   IN     UINT32                                    AuthenticationStatus,   \r
      OUT UINTN                                     *SectionStreamHandle\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Worker function.  Constructor for section streams.\r
-\r
-  Arguments:\r
-    SectionStreamLength - Size in bytes of the section stream.\r
-    SectionStream       - Buffer containing the new section stream.\r
-    AllocateBuffer      - Indicates whether the stream buffer is to be copied\r
-                          or the input buffer is to be used in place.\r
-    AuthenticationStatus- Indicates the default authentication status for the\r
-                          new stream.\r
-    SectionStreamHandle - A pointer to a caller allocated section stream handle.\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - Stream was added to stream database.\r
-    EFI_OUT_OF_RESOURCES - memory allocation failed.\r
-\r
---*/\r
 {\r
   CORE_SECTION_STREAM_NODE    *NewStream;\r
   EFI_TPL                     OldTpl;\r
@@ -1195,27 +1420,25 @@ OpenSectionStreamEx (
 }\r
 \r
 \r
+\r
+/**\r
+  Worker function.  Search stream database for requested stream handle.\r
+\r
+  @param  SearchHandle           Indicates which stream to look for. \r
+  @param  FoundStream            Output pointer to the found stream. \r
+\r
+  @retval EFI_SUCCESS            StreamHandle was found and *FoundStream contains \r
+                                 the stream node. \r
+  @retval EFI_NOT_FOUND          SearchHandle was not found in the stream \r
+                                 database.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FindStreamNode (\r
   IN  UINTN                                     SearchHandle,\r
   OUT CORE_SECTION_STREAM_NODE                  **FoundStream\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Worker function.  Search stream database for requested stream handle.\r
-\r
-  Arguments:\r
-    SearchHandle        - Indicates which stream to look for.\r
-    FoundStream         - Output pointer to the found stream.\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - StreamHandle was found and *FoundStream contains\r
-                          the stream node.\r
-    EFI_NOT_FOUND       - SearchHandle was not found in the stream database.\r
-\r
---*/\r
 {  \r
   CORE_SECTION_STREAM_NODE                      *StreamNode;\r
   \r
@@ -1237,26 +1460,22 @@ FindStreamNode (
 }\r
 \r
 \r
+\r
+/**\r
+  Check if a stream is valid.\r
+\r
+  @param  SectionStream          The section stream to be checked \r
+  @param  SectionStreamLength    The length of section stream \r
+\r
+  @return A boolean value indicating the validness of the section stream.\r
+\r
+**/\r
 STATIC\r
 BOOLEAN\r
 IsValidSectionStream (\r
   IN  VOID              *SectionStream,\r
   IN  UINTN             SectionStreamLength\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Check if a stream is valid.\r
-\r
-Arguments:\r
-  SectionStream         - The section stream to be checked\r
-  SectionStreamLength   - The length of section stream\r
-\r
-Returns:\r
-  TRUE\r
-  FALSE\r
-\r
---*/\r
 {\r
   UINTN                       TotalLength;\r
   UINTN                       SectionLength;\r
@@ -1319,16 +1538,18 @@ Returns:
   defined in RaiseTPL() in the UEFI 2.0 specification.\r
 \r
   \r
-  @param This   Indicates the\r
-                EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.\r
-  \r
+  @param This         Indicates the\r
+                      EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.\r
+\r
   @param InputSection Buffer containing the input GUIDed section\r
                       to be processed. OutputBuffer OutputBuffer\r
                       is allocated from boot services pool\r
                       memory and contains the new section\r
                       stream. The caller is responsible for\r
                       freeing this buffer.\r
-\r
+  @param OutputBuffer *OutputBuffer is allocated from boot services\r
+                      pool memory and contains the new section stream.\r
+                      The caller is responsible for freeing this buffer.\r
   @param OutputSize   A pointer to a caller-allocated UINTN in\r
                       which the size of OutputBuffer allocation\r
                       is stored. If the function returns\r
@@ -1360,13 +1581,13 @@ Returns:
                               is undefined.\r
 \r
 \r
-  @retval EFI_SUCCESS The InputSection was successfully\r
-                      processed and the section contents were\r
-                      returned.\r
+  @retval EFI_SUCCESS          The InputSection was successfully\r
+                               processed and the section contents were\r
+                               returned.\r
 \r
-  @retval EFI_OUT_OF_RESOURCES  The system has insufficient\r
-                                resources to process the\r
-                                request.\r
+  @retval EFI_OUT_OF_RESOURCES The system has insufficient\r
+                               resources to process the\r
+                               request.\r
 \r
   @retval EFI_INVALID_PARAMETER The GUID in InputSection does\r
                                 not match this instance of the\r
@@ -1401,14 +1622,14 @@ CustomGuidedSectionExtract (
   // Call GetInfo to get the size and attribute of input guided section data.\r
   //\r
   Status = ExtractGuidedSectionGetInfo (\r
-            InputSection,\r
-            &OutputBufferSize,\r
-            &ScratchBufferSize,\r
-            &SectionAttribute\r
-           );\r
+             InputSection,\r
+             &OutputBufferSize,\r
+             &ScratchBufferSize,\r
+             &SectionAttribute\r
+             );\r
   \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "GetInfo from guided section Failed - %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "GetInfo from guided section Failed - %r\n", Status));\r
     return Status;\r
   }\r
   \r
@@ -1452,7 +1673,7 @@ CustomGuidedSectionExtract (
     if (ScratchBuffer != NULL) {\r
       CoreFreePool (ScratchBuffer);\r
     }\r
-    DEBUG ((EFI_D_ERROR, "Extract guided section Failed - %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "Extract guided section Failed - %r\n", Status));\r
     return Status;\r
   }\r
 \r
index 2672e1ec91e89d8ece91bb88deeaef9b1d9da3cb..abe8730124b66ddc3067e690c6e725cd0001170c 100644 (file)
@@ -14,8 +14,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _GCD_H\r
-#define _GCD_H\r
+#ifndef _GCD_H_\r
+#define _GCD_H_\r
 \r
 //\r
 // GCD Operations\r
index 98669dea35ecb8c49d14f7d5e84149a078cb0628..e52b7e390d2a82d5562955b3810f8cfc14914530 100644 (file)
@@ -100,220 +100,151 @@ typedef struct {
 //\r
 \r
 \r
-PROTOCOL_ENTRY  *\r
-CoreFindProtocolEntry (\r
-  IN EFI_GUID     *Protocol,\r
-  IN BOOLEAN      Create\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Finds the protocol entry for the requested protocol.\r
-  \r
   The gProtocolDatabaseLock must be owned\r
 \r
-Arguments:\r
-  \r
-  Protocol  - The ID of the protocol \r
+  @param  Protocol               The ID of the protocol \r
+  @param  Create                 Create a new entry if not found \r
+\r
+  @return Protocol entry\r
 \r
-  Create    - Create a new entry if not found\r
+**/\r
+PROTOCOL_ENTRY  *\r
+CoreFindProtocolEntry (\r
+  IN EFI_GUID     *Protocol,\r
+  IN BOOLEAN      Create\r
+  )\r
+;\r
 \r
-Returns:\r
 \r
-  Protocol entry\r
+/**\r
+  Signal event for every protocol in protocol entry.\r
 \r
---*/\r
-;\r
+  @param  ProtEntry              Protocol entry\r
 \r
+**/\r
 VOID\r
 CoreNotifyProtocolEntry (\r
   IN PROTOCOL_ENTRY       *ProtEntry\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Signal event for every protocol in protocol entry.\r
+;\r
 \r
-Arguments:\r
 \r
-  ProtEntry     - Protocol entry\r
+/**\r
+  Finds the protocol instance for the requested handle and protocol.\r
+  Note: This function doesn't do parameters checking, it's caller's responsibility\r
+  to pass in valid parameters.\r
 \r
-Returns:\r
+  @param  Handle                 The handle to search the protocol on \r
+  @param  Protocol               GUID of the protocol \r
+  @param  Interface              The interface for the protocol being searched \r
 \r
---*/\r
-;\r
+  @return Protocol instance (NULL: Not found)\r
 \r
+**/\r
 PROTOCOL_INTERFACE *\r
 CoreFindProtocolInterface (\r
   IN IHANDLE              *Handle,\r
   IN EFI_GUID             *Protocol,\r
   IN VOID                 *Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Finds the protocol instance for the requested handle and protocol.\r
-  \r
-  Note: This function doesn't do parameters checking, it's caller's responsibility \r
-        to pass in valid parameters.\r
-  \r
-Arguments:\r
-  \r
-  Handle    - The handle to search the protocol on\r
-  \r
-  Protocol  - GUID of the protocol\r
+;\r
 \r
-  Interface - The interface for the protocol being searched\r
 \r
-Returns:\r
+/**\r
+  Removes Protocol from the protocol list (but not the handle list).\r
 \r
-  Protocol instance (NULL: Not found)\r
+  @param  Handle                 The handle to remove protocol on. \r
+  @param  Protocol               GUID of the protocol to be moved \r
+  @param  Interface              The interface of the protocol \r
 \r
---*/\r
-;\r
+  @return Protocol Entry\r
 \r
+**/\r
 PROTOCOL_INTERFACE *\r
 CoreRemoveInterfaceFromProtocol (\r
   IN IHANDLE              *Handle,\r
   IN EFI_GUID             *Protocol,\r
   IN VOID                 *Interface\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Removes Protocol from the protocol list (but not the handle list).\r
-\r
-Arguments:\r
-\r
-  Handle -  The handle to remove protocol on.\r
-\r
-  Protocol  -  GUID of the protocol to be moved\r
+;\r
 \r
-  Interface - The interface of the protocol\r
 \r
-Returns:\r
+/**\r
+  Removes all the events in the protocol database that match Event.\r
 \r
-  Protocol Entry\r
+  @param  Event                  The event to search for in the protocol \r
+                                 database. \r
 \r
---*/\r
-;\r
+  @return EFI_SUCCESS when done searching the entire database.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreUnregisterProtocolNotify (\r
   IN EFI_EVENT            Event\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Removes all the events in the protocol database that match Event.\r
+;\r
 \r
-Arguments:\r
-  \r
-  Event   - The event to search for in the protocol database.\r
 \r
-Returns:\r
+/**\r
+  Attempts to disconnect all drivers that are using the protocol interface being queried.\r
+  If failed, reconnect all drivers disconnected.\r
+  Note: This function doesn't do parameters checking, it's caller's responsibility\r
+  to pass in valid parameters.\r
 \r
-  EFI_SUCCESS when done searching the entire database.\r
+  @param  UserHandle             The handle on which the protocol is installed \r
+  @param  Prot                   The protocol to disconnect drivers from \r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Drivers using the protocol interface are all \r
+                                 disconnected \r
+  @retval EFI_ACCESS_DENIED      Failed to disconnect one or all of the drivers\r
 \r
+**/\r
 EFI_STATUS\r
 CoreDisconnectControllersUsingProtocolInterface (\r
   IN EFI_HANDLE           UserHandle,\r
   IN PROTOCOL_INTERFACE   *Prot\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Attempts to disconnect all drivers that are using the protocol interface being queried.\r
-  If failed, reconnect all drivers disconnected.\r
-  \r
-  Note: This function doesn't do parameters checking, it's caller's responsibility \r
-        to pass in valid parameters.\r
-\r
-Arguments:\r
-\r
-  UserHandle  - The handle on which the protocol is installed \r
-  Prot        - The protocol to disconnect drivers from\r
-\r
-Returns:\r
+;\r
 \r
-  EFI_SUCCESS       - Drivers using the protocol interface are all disconnected\r
-  EFI_ACCESS_DENIED - Failed to disconnect one or all of the drivers\r
 \r
---*/\r
-;\r
+/**\r
+  Acquire lock on gProtocolDatabaseLock.\r
 \r
+**/\r
 VOID\r
 CoreAcquireProtocolLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Acquire lock on gProtocolDatabaseLock.\r
-  \r
-Arguments:\r
-\r
-  None\r
-  \r
-Returns:\r
+;\r
 \r
-  None\r
 \r
---*/\r
-;\r
+/**\r
+  Release lock on gProtocolDatabaseLock.\r
 \r
+**/\r
 VOID\r
 CoreReleaseProtocolLock (\r
   VOID\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
 \r
-  Release lock on gProtocolDatabaseLock.\r
-  \r
-Arguments:\r
+/**\r
+  Check whether a handle is a valid EFI_HANDLE\r
 \r
-  None\r
-  \r
-Returns:\r
+  @param  UserHandle             The handle to check \r
 \r
-  None\r
-\r
---*/\r
-;\r
+  @retval EFI_INVALID_PARAMETER  The handle is NULL or not a valid EFI_HANDLE. \r
+  @retval EFI_SUCCESS            The handle is valid EFI_HANDLE.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreValidateHandle (\r
   IN  EFI_HANDLE                UserHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Check whether a handle is a valid EFI_HANDLE\r
-  \r
-Arguments:\r
-\r
-  UserHandle           -       The handle to check\r
-  \r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER                -       The handle is NULL or not a valid EFI_HANDLE.\r
-  \r
-  EFI_SUCCESS                                                  -       The handle is valid EFI_HANDLE.\r
-\r
---*/\r
 ;\r
 \r
 //\r
index a9df0ba5b0b52b344692250077fd6a9a13c20dd1..0caaa4303e9bcfb306154a679ba7c7bd80162c13 100644 (file)
@@ -11,7 +11,8 @@ 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
---*/\r
+\r
+**/\r
 \r
 #ifndef _IMEM_H_\r
 #define _IMEM_H_\r
@@ -55,155 +56,100 @@ typedef struct {
 // Internal prototypes\r
 //\r
 \r
-VOID *\r
-CoreAllocatePoolPages (\r
-  IN EFI_MEMORY_TYPE   PoolType,\r
-  IN UINTN             NumberOfPages,\r
-  IN UINTN             Alignment\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Internal function.  Used by the pool functions to allocate pages\r
   to back pool allocation requests.\r
 \r
-Arguments:\r
+  @param  PoolType               The type of memory for the new pool pages \r
+  @param  NumberOfPages          No of pages to allocate \r
+  @param  Alignment              Bits to align. \r
 \r
-  PoolType      - The type of memory for the new pool pages\r
+  @return The allocated memory, or NULL\r
 \r
-  NumberOfPages - No of pages to allocate\r
-  \r
-  Alignment     - Bits to align.\r
+**/\r
+VOID *\r
+CoreAllocatePoolPages (\r
+  IN EFI_MEMORY_TYPE   PoolType,\r
+  IN UINTN             NumberOfPages,\r
+  IN UINTN             Alignment\r
+  )\r
+;\r
 \r
-Returns:\r
 \r
-  The allocated memory, or NULL\r
 \r
---*/\r
-;\r
+/**\r
+  Internal function.  Frees pool pages allocated via AllocatePoolPages ()\r
 \r
+  @param  Memory                 The base address to free \r
+  @param  NumberOfPages          The number of pages to free\r
 \r
+**/\r
 VOID\r
 CoreFreePoolPages (\r
   IN EFI_PHYSICAL_ADDRESS   Memory,\r
   IN UINTN                  NumberOfPages\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function.  Frees pool pages allocated via AllocatePoolPages ()\r
-\r
-Arguments:\r
-\r
-  Memory        - The base address to free\r
+;\r
 \r
-  NumberOfPages - The number of pages to free\r
 \r
-Returns:\r
 \r
-  None\r
+/**\r
+  Internal function to allocate pool of a particular type.\r
+  Caller must have the memory lock held\r
 \r
---*/\r
-;\r
+  @param  PoolType               Type of pool to allocate \r
+  @param  Size                   The amount of pool to allocate \r
 \r
+  @return The allocate pool, or NULL\r
 \r
+**/\r
 VOID *\r
 CoreAllocatePoolI (\r
   IN EFI_MEMORY_TYPE  PoolType,\r
   IN UINTN            Size\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
 \r
-  Internal function to allocate pool of a particular type.\r
 \r
+/**\r
+  Internal function to free a pool entry.\r
   Caller must have the memory lock held\r
 \r
+  @param  Buffer                 The allocated pool entry to free \r
 \r
-Arguments:\r
-\r
-  PoolType    - Type of pool to allocate\r
-\r
-  Size        - The amount of pool to allocate\r
-\r
-Returns:\r
-\r
-  The allocate pool, or NULL\r
-\r
---*/\r
-;\r
-\r
+  @retval EFI_INVALID_PARAMETER  Buffer not valid \r
+  @retval EFI_SUCCESS            Buffer successfully freed.\r
 \r
+**/\r
 EFI_STATUS\r
 CoreFreePoolI (\r
   IN VOID           *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Internal function to free a pool entry.\r
-\r
-  Caller must have the memory lock held\r
-\r
-\r
-Arguments:\r
-\r
-  Buffer      - The allocated pool entry to free\r
+;\r
 \r
-Returns:\r
 \r
-  EFI_INVALID_PARAMETER     - Buffer not valid\r
-  \r
-  EFI_SUCCESS               - Buffer successfully freed.\r
-\r
---*/\r
-;\r
 \r
+/**\r
+  Enter critical section by gaining lock on gMemoryLock.\r
 \r
+**/\r
 VOID\r
 CoreAcquireMemoryLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Enter critical section by gaining lock on gMemoryLock\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
+;\r
 \r
-  None\r
 \r
---*/\r
-;\r
+/**\r
+  Exit critical section by releasing lock on gMemoryLock.\r
 \r
+**/\r
 VOID\r
 CoreReleaseMemoryLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Exit critical section by releasing lock on gMemoryLock\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 ;\r
 \r
 \r