]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/IfrSupportLib.h
1) Cleanup HiiLib, IfrSupportLib.
[mirror_edk2.git] / MdePkg / Include / Library / IfrSupportLib.h
index 0b54a8eb9bbba31251c85ec6bdfe630ffeef0d94..75c7f4785b02bb67bb83ed109859b319aeebef99 100644 (file)
@@ -11,16 +11,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 Module Name:\r
 \r
-  UefiIfrLibrary.h\r
+  IfrSupportLibrary.h\r
 \r
 Abstract:\r
 \r
-  The file contain all library function for Ifr Operations.\r
+  The file contain all library functions and definitions for IFR opcode creation and \r
+  related Form Browser utility Operations.\r
 \r
 --*/\r
 \r
-#ifndef _IFRLIBRARY_H\r
-#define _IFRLIBRARY_H\r
+#ifndef _IFR_SUPPORT_LIBRARY_H\r
+#define _IFR_SUPPORT_LIBRARY_H\r
 \r
 \r
 #include <Protocol/HiiFont.h>\r
@@ -34,8 +35,6 @@ Abstract:
 \r
 #include <Guid/GlobalVariable.h>\r
 \r
-#define IFR_LIB_DEFAULT_STRING_SIZE     0x200\r
-\r
 //\r
 // The architectural variable "Lang" and "LangCodes" are deprecated in UEFI\r
 // specification. While, UEFI specification also states that these deprecated\r
@@ -94,50 +93,62 @@ typedef struct {
 } EFI_HII_UPDATE_DATA;\r
 \r
 \r
-//\r
-// Exported Library functions\r
-//\r
+/**\r
+  Create EFI_IFR_END_OP opcode.\r
+\r
+  If Data is NULL or Data->Data is NULL, then ASSERT.\r
+\r
+  @param  Data                   Destination for the created opcode binary\r
+\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateEndOpCode (\r
   IN OUT EFI_HII_UPDATE_DATA *Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create EFI_IFR_END_OP opcode.\r
+;\r
 \r
-Arguments:\r
-  Data            - Destination for the created opcode binary\r
+/**\r
+  Create EFI_IFR_DEFAULT_OP opcode.\r
 \r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
+  @param  Value                  Value for the default\r
+  @param  Type                   Type for the default\r
+  @param  Data                   Destination for the created opcode binary\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  @retval EFI_INVALID_PARAMETER The type is not valid.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateDefaultOpCode (\r
   IN     EFI_IFR_TYPE_VALUE  *Value,\r
   IN     UINT8               Type,\r
   IN OUT EFI_HII_UPDATE_DATA *Data\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Create EFI_IFR_DEFAULT_OP opcode.\r
+/**\r
+  Create EFI_IFR_ACTION_OP opcode.\r
 \r
-Arguments:\r
-  Value           - Value for the default\r
-  Type            - Type for the default\r
-  Data            - Destination for the created opcode binary\r
+  @param  QuestionId             Question ID\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  QuestionFlags          Flags in Question Header\r
+  @param  QuestionConfig         String ID for configuration\r
+  @param  Data                   Destination for the created opcode binary\r
 \r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
-\r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateActionOpCode (\r
   IN     EFI_QUESTION_ID      QuestionId,\r
   IN     EFI_STRING_ID        Prompt,\r
@@ -146,26 +157,23 @@ CreateActionOpCode (
   IN     EFI_STRING_ID        QuestionConfig,\r
   IN OUT EFI_HII_UPDATE_DATA  *Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create EFI_IFR_ACTION_OP opcode.\r
-\r
-Arguments:\r
-  QuestionId      - Question ID\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  QuestionFlags   - Flags in Question Header\r
-  QuestionConfig  - String ID for configuration\r
-  Data            - Destination for the created opcode binary\r
+;\r
 \r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
+/**\r
+  Create EFI_IFR_SUBTITLE_OP opcode.\r
 \r
---*/\r
-;\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  Flags                  Subtitle opcode flags\r
+  @param  Scope                  Subtitle Scope bit\r
+  @param  Data                   Destination for the created opcode binary\r
 \r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateSubTitleOpCode (\r
   IN      EFI_STRING_ID       Prompt,\r
   IN      EFI_STRING_ID       Help,\r
@@ -173,49 +181,47 @@ CreateSubTitleOpCode (
   IN      UINT8               Scope,\r
   IN OUT EFI_HII_UPDATE_DATA  *Data\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Create EFI_IFR_SUBTITLE_OP opcode.\r
+/**\r
+  Create EFI_IFR_TEXT_OP opcode.\r
 \r
-Arguments:\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  Flags           - Subtitle opcode flags\r
-  Scope           - Subtitle Scope bit\r
-  Data            - Destination for the created opcode binary\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  TextTwo                String ID for text two\r
+  @param  Data                   Destination for the created opcode binary\r
 \r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
-\r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateTextOpCode (\r
   IN      EFI_STRING_ID       Prompt,\r
   IN      EFI_STRING_ID       Help,\r
   IN      EFI_STRING_ID       TextTwo,\r
   IN OUT  EFI_HII_UPDATE_DATA *Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create EFI_IFR_TEXT_OP opcode.\r
+;\r
 \r
-Arguments:\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  TextTwo         - String ID for text two\r
-  Data            - Destination for the created opcode binary\r
+/**\r
+  Create EFI_IFR_REF_OP opcode.\r
 \r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
+  @param  FormId                 Destination Form ID\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  QuestionFlags          Flags in Question Header\r
+  @param  QuestionId             Question ID\r
+  @param  Data                   Destination for the created opcode binary\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateGotoOpCode (\r
   IN      EFI_FORM_ID         FormId,\r
   IN      EFI_STRING_ID       Prompt,\r
@@ -224,26 +230,22 @@ CreateGotoOpCode (
   IN      EFI_QUESTION_ID     QuestionId,\r
   IN OUT  EFI_HII_UPDATE_DATA *Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create EFI_IFR_REF_OP opcode.\r
+;\r
 \r
-Arguments:\r
-  FormId          - Destination Form ID\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  QuestionFlags   - Flags in Question Header\r
-  QuestionId      - Question ID\r
-  Data            - Destination for the created opcode binary\r
+/**\r
+  Create EFI_IFR_ONE_OF_OPTION_OP opcode.\r
 \r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
+  @param  QuestionId             Question ID\r
+  @param  OptionList             The list of Options.\r
+  @param  Type                   The data type.\r
+  @param  Data                   Destination for the created opcode binary\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateOneOfOptionOpCode (\r
   IN     UINTN                OptionCount,\r
   IN     IFR_OPTION           *OptionsList,\r
@@ -252,7 +254,27 @@ CreateOneOfOptionOpCode (
   )\r
 ;\r
 \r
+/**\r
+  Create EFI_IFR_ONE_OF_OP opcode.\r
+\r
+  @param  QuestionId             Question ID\r
+  @param  VarStoreId             Storage ID\r
+  @param  VarOffset              Offset in Storage\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  QuestionFlags          Flags in Question Header\r
+  @param  OneOfFlags             Flags for oneof opcode\r
+  @param  OptionsList            List of options\r
+  @param  OptionCount            Number of options in option list\r
+  @param  Data                   Destination for the created opcode binary\r
+\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateOneOfOpCode (\r
   IN     EFI_QUESTION_ID      QuestionId,\r
   IN     EFI_VARSTORE_ID      VarStoreId,\r
@@ -265,30 +287,31 @@ CreateOneOfOpCode (
   IN     UINTN                OptionCount,\r
   IN OUT EFI_HII_UPDATE_DATA  *Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create EFI_IFR_ONE_OF_OP opcode.\r
-\r
-Arguments:\r
-  QuestionId      - Question ID\r
-  VarStoreId      - Storage ID\r
-  VarOffset       - Offset in Storage\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  QuestionFlags   - Flags in Question Header\r
-  OneOfFlags      - Flags for oneof opcode\r
-  OptionsList     - List of options\r
-  OptionCount     - Number of options in option list\r
-  Data            - Destination for the created opcode binary\r
-\r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  Create EFI_IFR_ORDERED_LIST_OP opcode.\r
+\r
+  @param  QuestionId             Question ID\r
+  @param  VarStoreId             Storage ID\r
+  @param  VarOffset              Offset in Storage\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  QuestionFlags          Flags in Question Header\r
+  @param  Flags                  Flags for ordered list opcode\r
+  @param  DataType               Type for option value\r
+  @param  MaxContainers          Maximum count for options in this ordered list\r
+  @param  OptionsList            List of options\r
+  @param  OptionCount            Number of options in option list\r
+  @param  Data                   Destination for the created opcode binary\r
+\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateOrderedListOpCode (\r
   IN      EFI_QUESTION_ID     QuestionId,\r
   IN      EFI_VARSTORE_ID     VarStoreId,\r
@@ -303,32 +326,27 @@ CreateOrderedListOpCode (
   IN     UINTN                OptionCount,\r
   IN OUT EFI_HII_UPDATE_DATA  *Data\r
   )\r
-/*++\r
+;\r
 \r
-Routine Description:\r
-  Create EFI_IFR_ORDERED_LIST_OP opcode.\r
+/**\r
+  Create EFI_IFR_CHECKBOX_OP opcode.\r
 \r
-Arguments:\r
-  QuestionId      - Question ID\r
-  VarStoreId      - Storage ID\r
-  VarOffset       - Offset in Storage\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  QuestionFlags   - Flags in Question Header\r
-  Flags           - Flags for ordered list opcode\r
-  DataType        - Type for option value\r
-  MaxContainers   - Maximum count for options in this ordered list\r
-  OptionsList     - List of options\r
-  OptionCount     - Number of options in option list\r
-  Data            - Destination for the created opcode binary\r
-\r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
+  @param  QuestionId             Question ID\r
+  @param  VarStoreId             Storage ID\r
+  @param  VarOffset              Offset in Storage\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  QuestionFlags          Flags in Question Header\r
+  @param  CheckBoxFlags          Flags for checkbox opcode\r
+  @param  Data                   Destination for the created opcode binary\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateCheckBoxOpCode (\r
   IN      EFI_QUESTION_ID     QuestionId,\r
   IN      EFI_VARSTORE_ID     VarStoreId,\r
@@ -339,28 +357,31 @@ CreateCheckBoxOpCode (
   IN      UINT8               CheckBoxFlags,\r
   IN OUT EFI_HII_UPDATE_DATA  *Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create EFI_IFR_CHECKBOX_OP opcode.\r
-\r
-Arguments:\r
-  QuestionId      - Question ID\r
-  VarStoreId      - Storage ID\r
-  VarOffset       - Offset in Storage\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  QuestionFlags   - Flags in Question Header\r
-  CheckBoxFlags   - Flags for checkbox opcode\r
-  Data            - Destination for the created opcode binary\r
-\r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  Create EFI_IFR_NUMERIC_OP opcode.\r
+\r
+  @param  QuestionId             Question ID\r
+  @param  VarStoreId             Storage ID\r
+  @param  VarOffset              Offset in Storage\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  QuestionFlags          Flags in Question Header\r
+  @param  NumericFlags           Flags for numeric opcode\r
+  @param  Minimum                Numeric minimum value\r
+  @param  Maximum                Numeric maximum value\r
+  @param  Step                   Numeric step for edit\r
+  @param  Default                Numeric default value\r
+  @param  Data                   Destination for the created opcode binary\r
+\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateNumericOpCode (\r
   IN     EFI_QUESTION_ID     QuestionId,\r
   IN     EFI_VARSTORE_ID     VarStoreId,\r
@@ -375,32 +396,29 @@ CreateNumericOpCode (
   IN     UINT64              Default,\r
   IN OUT EFI_HII_UPDATE_DATA *Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create EFI_IFR_NUMERIC_OP opcode.\r
-\r
-Arguments:\r
-  QuestionId      - Question ID\r
-  VarStoreId      - Storage ID\r
-  VarOffset       - Offset in Storage\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  QuestionFlags   - Flags in Question Header\r
-  NumericFlags    - Flags for numeric opcode\r
-  Minimum         - Numeric minimum value\r
-  Maximum         - Numeric maximum value\r
-  Step            - Numeric step for edit\r
-  Default         - Numeric default value\r
-  Data            - Destination for the created opcode binary\r
-\r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  Create EFI_IFR_STRING_OP opcode.\r
+\r
+  @param  QuestionId             Question ID\r
+  @param  VarStoreId             Storage ID\r
+  @param  VarOffset              Offset in Storage\r
+  @param  Prompt                 String ID for Prompt\r
+  @param  Help                   String ID for Help\r
+  @param  QuestionFlags          Flags in Question Header\r
+  @param  StringFlags            Flags for string opcode\r
+  @param  MinSize                String minimum length\r
+  @param  MaxSize                String maximum length\r
+  @param  Data                   Destination for the created opcode binary\r
+\r
+  @retval EFI_SUCCESS            Opcode create success\r
+  @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.\r
+  @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 CreateStringOpCode (\r
   IN      EFI_QUESTION_ID     QuestionId,\r
   IN      EFI_VARSTORE_ID     VarStoreId,\r
@@ -413,188 +431,71 @@ CreateStringOpCode (
   IN      UINT8               MaxSize,\r
   IN OUT EFI_HII_UPDATE_DATA  *Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create EFI_IFR_STRING_OP opcode.\r
-\r
-Arguments:\r
-  QuestionId      - Question ID\r
-  VarStoreId      - Storage ID\r
-  VarOffset       - Offset in Storage\r
-  Prompt          - String ID for Prompt\r
-  Help            - String ID for Help\r
-  QuestionFlags   - Flags in Question Header\r
-  StringFlags     - Flags for string opcode\r
-  MinSize         - String minimum length\r
-  MaxSize         - String maximum length\r
-  Data            - Destination for the created opcode binary\r
-\r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
-\r
---*/\r
 ;\r
 \r
-EFI_STATUS\r
-CreateBannerOpCode (\r
-  IN      EFI_STRING_ID       Title,\r
-  IN      UINT16              LineNumber,\r
-  IN      UINT8               Alignment,\r
-  IN OUT  EFI_HII_UPDATE_DATA *Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Create GUIDed opcode for banner.\r
-\r
-Arguments:\r
-  Title           - String ID for title\r
-  LineNumber      - Line number for this banner\r
-  Alignment       - Alignment for this banner, left, center or right\r
-  Data            - Destination for the created opcode binary\r
-\r
-Returns:\r
-  EFI_SUCCESS     - Opcode create success\r
-\r
---*/\r
-;\r
-\r
-EFI_HII_PACKAGE_LIST_HEADER *\r
-PreparePackageList (\r
-  IN UINTN                    NumberOfPackages,\r
-  IN EFI_GUID                 *GuidId,\r
-  ...\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Assemble EFI_HII_PACKAGE_LIST according to the passed in packages.\r
-\r
-Arguments:\r
-  NumberOfPackages  -  Number of packages.\r
-  GuidId            -  Package GUID.\r
-\r
-Returns:\r
-  Pointer of EFI_HII_PACKAGE_LIST_HEADER.\r
-\r
---*/\r
-;\r
-\r
-EFI_HII_HANDLE\r
-DevicePathToHiiHandle (\r
-  IN EFI_HII_DATABASE_PROTOCOL  *HiiDatabase,\r
-  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Find HII Handle associated with given Device Path.\r
-\r
-Arguments:\r
-  HiiDatabase - Point to EFI_HII_DATABASE_PROTOCOL instance.\r
-  DevicePath  - Device Path associated with the HII package list handle.\r
-\r
-Returns:\r
-  Handle - HII package list Handle associated with the Device Path.\r
-  NULL   - Hii Package list handle is not found.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-ExtractDefault(\r
-  IN VOID                         *Buffer,\r
-  IN UINTN                        *BufferSize,\r
-  UINTN                           Number,\r
-  ...\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Configure the buffer accrording to ConfigBody strings.\r
-\r
-  Arguments:\r
-    DefaultId             - the ID of default.\r
-    Buffer                - the start address of buffer.\r
-    BufferSize            - the size of buffer.\r
-    Number                - the number of the strings.\r
-\r
-  Returns:\r
-    EFI_BUFFER_TOO_SMALL  - the BufferSize is too small to operate.\r
-    EFI_INVALID_PARAMETER - Buffer is NULL or BufferSize is 0.\r
-    EFI_SUCCESS           - Operation successful.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-ExtractGuidFromHiiHandle (\r
-  IN      EFI_HII_HANDLE      Handle,\r
-  OUT     EFI_GUID            *Guid\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Extract Hii package list GUID for given HII handle.\r
-\r
-Arguments:\r
-  HiiHandle     - Hii handle\r
-  Guid          - Package list GUID\r
+/**\r
+  Converts binary buffer to Unicode string in reversed byte order to BufToHexString().\r
 \r
-Returns:\r
-  EFI_SUCCESS   - Successfully extract GUID from Hii database.\r
+  @param  Str                    String for output\r
+  @param  Buffer                 Binary buffer.\r
+  @param  BufferSize             Size of the buffer in bytes.\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            The function completed successfully.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 BufferToHexString (\r
   IN OUT CHAR16    *Str,\r
   IN UINT8         *Buffer,\r
   IN UINTN         BufferSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Converts binary buffer to Unicode string in reversed byte order to BufToHexString().\r
+;\r
 \r
-Arguments:\r
-  Str        -  String for output\r
-  Buffer     -  Binary buffer.\r
-  BufferSize -  Size of the buffer in bytes.\r
+/**\r
+  Converts Hex String to binary buffer in reversed byte order to HexStringToBuf().\r
 \r
-Returns:\r
-  EFI_SUCCESS    -  The function completed successfully.\r
+  @param  Buffer                 Pointer to buffer that receives the data.\r
+  @param  BufferSize             Length in bytes of the buffer to hold converted\r
+                                 data. If routine return with EFI_SUCCESS,\r
+                                 containing length of converted data. If routine\r
+                                 return with EFI_BUFFER_TOO_SMALL, containg length\r
+                                 of buffer desired.\r
+  @param  Str                    String to be converted from.\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            The function completed successfully.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 HexStringToBuffer (\r
   IN OUT UINT8         *Buffer,\r
   IN OUT UINTN         *BufferSize,\r
   IN CHAR16            *Str\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Converts Hex String to binary buffer in reversed byte order to HexStringToBuf().\r
-\r
-Arguments:\r
-    Buffer     - Pointer to buffer that receives the data.\r
-    BufferSize - Length in bytes of the buffer to hold converted data.\r
-                 If routine return with EFI_SUCCESS, containing length of converted data.\r
-                 If routine return with EFI_BUFFER_TOO_SMALL, containg length of buffer desired.\r
-    Str        - String to be converted from.\r
-\r
-Returns:\r
-  EFI_SUCCESS    -  The function completed successfully.\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  Construct <ConfigHdr> using routing information GUID/NAME/PATH.\r
+\r
+  @param  ConfigHdr              Pointer to the ConfigHdr string.\r
+  @param  StrBufferLen           On input: Length in bytes of buffer to hold the\r
+                                 ConfigHdr string. Includes tailing '\0' character.\r
+                                 On output: If return EFI_SUCCESS, containing\r
+                                 length of ConfigHdr string buffer. If return\r
+                                 EFI_BUFFER_TOO_SMALL, containg length of string\r
+                                 buffer desired.\r
+  @param  Guid                   Routing information: GUID.\r
+  @param  Name                   Routing information: NAME.\r
+  @param  DriverHandle           Driver handle which contains the routing\r
+                                 information: PATH.\r
+\r
+  @retval EFI_SUCCESS            Routine success.\r
+  @retval EFI_BUFFER_TOO_SMALL   The ConfigHdr string buffer is too small.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 ConstructConfigHdr (\r
   IN OUT CHAR16                *ConfigHdr,\r
   IN OUT UINTN                 *StrBufferLen,\r
@@ -602,104 +503,77 @@ ConstructConfigHdr (
   IN CHAR16                    *Name, OPTIONAL\r
   IN EFI_HANDLE                *DriverHandle\r
   )\r
-/*++\r
 \r
-Routine Description:\r
-  Construct <ConfigHdr> using routing information GUID/NAME/PATH.\r
+;\r
 \r
-Arguments:\r
-  ConfigHdr    - Pointer to the ConfigHdr string.\r
-  StrBufferLen - On input: Length in bytes of buffer to hold the ConfigHdr string. Includes tailing '\0' character.\r
-                 On output:\r
-                    If return EFI_SUCCESS, containing length of ConfigHdr string buffer.\r
-                    If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired.\r
-  Guid         - Routing information: GUID.\r
-  Name         - Routing information: NAME.\r
-  DriverHandle  - Driver handle which contains the routing information: PATH.\r
+/**\r
+  Search BlockName "&OFFSET=Offset&WIDTH=Width" in a string.\r
 \r
-Returns:\r
-  EFI_SUCCESS          - Routine success.\r
-  EFI_BUFFER_TOO_SMALL - The ConfigHdr string buffer is too small.\r
+  @param  String                 The string to be searched in.\r
+  @param  Offset                 Offset in BlockName.\r
+  @param  Width                  Width in BlockName.\r
 \r
---*/\r
-;\r
+  @retval TRUE                   Block name found.\r
+  @retval FALSE                  Block name not found.\r
 \r
+**/\r
 BOOLEAN\r
+EFIAPI\r
 FindBlockName (\r
   IN OUT CHAR16                *String,\r
   UINTN                        Offset,\r
   UINTN                        Width\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Search BlockName "&OFFSET=Offset&WIDTH=Width" in a string.\r
+;\r
 \r
-Arguments:\r
-  String       - The string to be searched in.\r
-  Offset       - Offset in BlockName.\r
-  Width        - Width in BlockName.\r
+/**\r
+  This routine is invoked by ConfigAccess.Callback() to retrived uncommitted data from Form Browser.\r
 \r
-Returns:\r
-  TRUE         - Block name found.\r
-  FALSE        - Block name not found.\r
+  @param  VariableGuid           An optional field to indicate the target variable\r
+                                 GUID name to use.\r
+  @param  VariableName           An optional field to indicate the target\r
+                                 human-readable variable name.\r
+  @param  BufferSize             On input: Length in bytes of buffer to hold\r
+                                 retrived data. On output: If return\r
+                                 EFI_BUFFER_TOO_SMALL, containg length of buffer\r
+                                 desired.\r
+  @param  Buffer                 Buffer to hold retrived data.\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            Routine success.\r
+  @retval EFI_BUFFER_TOO_SMALL   The intput buffer is too small.\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 GetBrowserData (\r
   EFI_GUID                   *VariableGuid, OPTIONAL\r
   CHAR16                     *VariableName, OPTIONAL\r
   UINTN                      *BufferSize,\r
   UINT8                      *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  This routine is invoked by ConfigAccess.Callback() to retrived uncommitted data from Form Browser.\r
-\r
-Arguments:\r
-  VariableGuid  - An optional field to indicate the target variable GUID name to use.\r
-  VariableName  - An optional field to indicate the target human-readable variable name.\r
-  BufferSize    - On input: Length in bytes of buffer to hold retrived data.\r
-                  On output:\r
-                    If return EFI_BUFFER_TOO_SMALL, containg length of buffer desired.\r
-  Buffer        - Buffer to hold retrived data.\r
-\r
-Returns:\r
-  EFI_SUCCESS          - Routine success.\r
-  EFI_BUFFER_TOO_SMALL - The intput buffer is too small.\r
-\r
---*/\r
 ;\r
 \r
-EFI_STATUS\r
-GetHiiHandles (\r
-  IN OUT UINTN                     *HandleBufferLength,\r
-  OUT    EFI_HII_HANDLE            **HiiHandleBuffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Determines the handles that are currently active in the database.\r
-  It's the caller's responsibility to free handle buffer.\r
-\r
-Arguments:\r
-  HiiDatabase           - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r
-  HandleBufferLength    - On input, a pointer to the length of the handle buffer. On output,\r
-                          the length of the handle buffer that is required for the handles found.\r
-  HiiHandleBuffer       - Pointer to an array of Hii Handles returned.\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Get an array of Hii Handles successfully.\r
-  EFI_INVALID_PARAMETER - Hii is NULL.\r
-  EFI_NOT_FOUND         - Database not found.\r
-\r
---*/\r
-;\r
+/**\r
+  This routine is invoked by ConfigAccess.Callback() to update uncommitted data of Form Browser.\r
 \r
+  @param  VariableGuid           An optional field to indicate the target variable\r
+                                 GUID name to use.\r
+  @param  VariableName           An optional field to indicate the target\r
+                                 human-readable variable name.\r
+  @param  BufferSize             Length in bytes of buffer to hold retrived data.\r
+  @param  Buffer                 Buffer to hold retrived data.\r
+  @param  RequestElement         An optional field to specify which part of the\r
+                                 buffer data will be send back to Browser. If NULL,\r
+                                 the whole buffer of data will be committed to\r
+                                 Browser. <RequestElement> ::=\r
+                                 &OFFSET=<Number>&WIDTH=<Number>*\r
+\r
+  @retval EFI_SUCCESS            Routine success.\r
+  @retval Other                  Updating Browser uncommitted data failed.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 SetBrowserData (\r
   EFI_GUID                   *VariableGuid, OPTIONAL\r
   CHAR16                     *VariableName, OPTIONAL\r
@@ -707,325 +581,31 @@ SetBrowserData (
   UINT8                      *Buffer,\r
   CHAR16                     *RequestElement  OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  This routine is invoked by ConfigAccess.Callback() to update uncommitted data of Form Browser.\r
-\r
-Arguments:\r
-  VariableGuid   - An optional field to indicate the target variable GUID name to use.\r
-  VariableName   - An optional field to indicate the target human-readable variable name.\r
-  BufferSize     - Length in bytes of buffer to hold retrived data.\r
-  Buffer         - Buffer to hold retrived data.\r
-  RequestElement - An optional field to specify which part of the buffer data\r
-                   will be send back to Browser. If NULL, the whole buffer of\r
-                   data will be committed to Browser.\r
-                   <RequestElement> ::= &OFFSET=<Number>&WIDTH=<Number>*\r
-\r
-Returns:\r
-  EFI_SUCCESS  - Routine success.\r
-  Other        - Updating Browser uncommitted data failed.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-ConvertRfc3066LanguageToIso639Language (\r
-  CHAR8   *LanguageRfc3066,\r
-  CHAR8   *LanguageIso639\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Convert language code from RFC3066 to ISO639-2.\r
-\r
-Arguments:\r
-  LanguageRfc3066 - RFC3066 language code.\r
-  LanguageIso639  - ISO639-2 language code.\r
-\r
-Returns:\r
-  EFI_SUCCESS   - Language code converted.\r
-  EFI_NOT_FOUND - Language code not found.\r
-\r
---*/\r
-;\r
-\r
-CHAR8 *\r
-Rfc3066ToIso639 (\r
-  CHAR8  *SupportedLanguages\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Convert language code list from RFC3066 to ISO639-2, e.g. "en-US;fr-FR" will\r
-  be converted to "engfra".\r
-\r
-Arguments:\r
-  SupportedLanguages - The RFC3066 language list.\r
-\r
-Returns:\r
-  The ISO639-2 language list.\r
-\r
---*/\r
 ;\r
 \r
-EFI_STATUS\r
-GetCurrentLanguage (\r
-  OUT     CHAR8               *Lang\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Determine what is the current language setting\r
-\r
-Arguments:\r
-  Lang      - Pointer of system language\r
-\r
-Returns:\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-GetNextLanguage (\r
-  IN OUT CHAR8      **LangCode,\r
-  OUT CHAR8         *Lang\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Get next language from language code list.\r
-\r
-Arguments:\r
-  LangCode - The language code.\r
-  Lang     - Returned language.\r
-\r
-Returns:\r
-  None.\r
-\r
---*/\r
-;\r
-\r
-CHAR8 *\r
-GetSupportedLanguages (\r
-  IN EFI_HII_HANDLE           HiiHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This function returns the list of supported languages, in the format specified\r
-  in UEFI specification Appendix M.\r
-\r
-Arguments:\r
-  HiiHandle  - The HII package list handle.\r
-\r
-Returns:\r
-  The supported languages.\r
-\r
---*/\r
-;\r
-\r
-UINT16\r
-GetSupportedLanguageNumber (\r
-  IN EFI_HII_HANDLE           HiiHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This function returns the number of supported languages\r
-\r
-Arguments:\r
-  HiiHandle  - The HII package list handle.\r
-\r
-Returns:\r
-  The  number of supported languages.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-GetStringFromHandle (\r
-  IN  EFI_HII_HANDLE                  HiiHandle,\r
-  IN  EFI_STRING_ID                   StringId,\r
-  OUT EFI_STRING                      *String\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Get string specified by StringId form the HiiHandle.\r
-\r
-Arguments:\r
-  HiiHandle     - The HII handle of package list.\r
-  StringId      - The String ID.\r
-  String        - The output string.\r
-\r
-Returns:\r
-  EFI_NOT_FOUND         - String is not found.\r
-  EFI_SUCCESS           - Operation is successful.\r
-  EFI_OUT_OF_RESOURCES  - There is not enought memory in the system.\r
-  EFI_INVALID_PARAMETER - The String is NULL.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-GetStringFromToken (\r
-  IN  EFI_GUID                        *ProducerGuid,\r
-  IN  EFI_STRING_ID                   StringId,\r
-  OUT EFI_STRING                      *String\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Get the string given the StringId and String package Producer's Guid.\r
-\r
-Arguments:\r
-  ProducerGuid  - The Guid of String package list.\r
-  StringId      - The String ID.\r
-  String        - The output string.\r
-\r
-Returns:\r
-  EFI_NOT_FOUND         - String is not found.\r
-  EFI_SUCCESS           - Operation is successful.\r
-  EFI_OUT_OF_RESOURCES  - There is not enought memory in the system.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-IfrLibNewString (\r
-  IN  EFI_HII_HANDLE                  PackageList,\r
-  OUT EFI_STRING_ID                   *StringId,\r
-  IN  CONST EFI_STRING                String\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    This function adds the string into String Package of each language.\r
-\r
-  Arguments:\r
-    PackageList       - Handle of the package list where this string will be added.\r
-    StringId          - On return, contains the new strings id, which is unique within PackageList.\r
-    String            - Points to the new null-terminated string.\r
-\r
-  Returns:\r
-    EFI_SUCCESS            - The new string was added successfully.\r
-    EFI_NOT_FOUND          - The specified PackageList could not be found in database.\r
-    EFI_OUT_OF_RESOURCES   - Could not add the string due to lack of resources.\r
-    EFI_INVALID_PARAMETER  - String is NULL or StringId is NULL is NULL.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-IfrLibGetString (\r
-  IN  EFI_HII_HANDLE                  PackageList,\r
-  IN  EFI_STRING_ID                   StringId,\r
-  OUT EFI_STRING                      String,\r
-  IN  OUT UINTN                       *StringSize\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    This function try to retrieve string from String package of current language.\r
-    If fail, it try to retrieve string from String package of first language it support.\r
-\r
-  Arguments:\r
-    PackageList       - The package list in the HII database to search for the specified string.\r
-    StringId          - The string's id, which is unique within PackageList.\r
-    String            - Points to the new null-terminated string.\r
-    StringSize        - On entry, points to the size of the buffer pointed to by String, in bytes. On return,\r
-                        points to the length of the string, in bytes.\r
-\r
-  Returns:\r
-    EFI_SUCCESS            - The string was returned successfully.\r
-    EFI_NOT_FOUND          - The string specified by StringId is not available.\r
-    EFI_BUFFER_TOO_SMALL   - The buffer specified by StringLength is too small to hold the string.\r
-    EFI_INVALID_PARAMETER  - The String or StringSize was NULL.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-IfrLibSetString (\r
-  IN EFI_HII_HANDLE                   PackageList,\r
-  IN EFI_STRING_ID                    StringId,\r
-  IN CONST EFI_STRING                 String\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    This function updates the string in String package of current language.\r
+/**\r
+  Draw a dialog and return the selected key.\r
 \r
-  Arguments:\r
-    PackageList       - The package list containing the strings.\r
-    StringId          - The string's id, which is unique within PackageList.\r
-    String            - Points to the new null-terminated string.\r
+  @param  NumberOfLines          The number of lines for the dialog box\r
+  @param  KeyValue               The EFI_KEY value returned if HotKey is TRUE..\r
+  @param  String                 Pointer to the first string in the list\r
+  @param  ...                    A series of (quantity == NumberOfLines) text\r
+                                 strings which will be used to construct the dialog\r
+                                 box\r
 \r
-  Returns:\r
-    EFI_SUCCESS            - The string was updated successfully.\r
-    EFI_NOT_FOUND          - The string specified by StringId is not in the database.\r
-    EFI_INVALID_PARAMETER  - The String was NULL.\r
-    EFI_OUT_OF_RESOURCES   - The system is out of resources to accomplish the task.\r
+  @retval EFI_SUCCESS            Displayed dialog and received user interaction\r
+  @retval EFI_INVALID_PARAMETER  One of the parameters was invalid.\r
 \r
---*/\r
-;\r
+**/\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 IfrLibCreatePopUp (\r
   IN  UINTN                       NumberOfLines,\r
   OUT EFI_INPUT_KEY               *KeyValue,\r
   IN  CHAR16                      *String,\r
   ...\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Draw a dialog and return the selected key.\r
-\r
-Arguments:\r
-  NumberOfLines     - The number of lines for the dialog box\r
-  KeyValue          - The EFI_KEY value returned if HotKey is TRUE..\r
-  String            - Pointer to the first string in the list\r
-  ...               - A series of (quantity == NumberOfLines) text strings which\r
-                      will be used to construct the dialog box\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Displayed dialog and received user interaction\r
-  EFI_INVALID_PARAMETER - One of the parameters was invalid.\r
-\r
---*/\r
 ;\r
 \r
-EFI_STATUS\r
-IfrLibUpdateForm (\r
-  IN EFI_HII_HANDLE            Handle,\r
-  IN EFI_GUID                  *FormSetGuid, OPTIONAL\r
-  IN EFI_FORM_ID               FormId,\r
-  IN UINT16                    Label,\r
-  IN BOOLEAN                   Insert,\r
-  IN EFI_HII_UPDATE_DATA       *Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This function allows the caller to update a form that has\r
-  previously been registered with the EFI HII database.\r
-\r
-Arguments:\r
-  Handle       - Hii Handle\r
-  FormSetGuid  - The formset should be updated.\r
-  FormId       - The form should be updated.\r
-  Label        - Update information starting immediately after this label in the IFR\r
-  Insert       - If TRUE and Data is not NULL, insert data after Label.\r
-                 If FALSE, replace opcodes between two labels with Data.\r
-  Data         - The adding data; If NULL, remove opcodes between two Label.\r
-\r
-Returns:\r
-  EFI_SUCCESS  - Update success.\r
-  Other        - Update fail.\r
-\r
---*/\r
-;\r
 #endif\r