]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
Add doxygen style comments for functions in DxeMain.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Dispatcher / Dispatcher.c
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