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