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