]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/HiiLib.h
Patch from open source community for CryptoPkg to allow it to build for ARM using...
[mirror_edk2.git] / MdeModulePkg / Include / Library / HiiLib.h
index fa1963b27735d31deac4ea5bd4b36ed132c27321..25729c6d71c836485fc2e7caf9cae904aeb1c125 100644 (file)
 /** @file\r
   Public include file for the HII Library\r
 \r
-  Copyright (c) 2007 - 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
-  http://opensource.org/licenses/bsd-license.php                                            \r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under \r
+the terms and conditions of the BSD License that accompanies this distribution.  \r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php.                                            \r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
 **/\r
 \r
 #ifndef __HII_LIB_H__\r
 #define __HII_LIB_H__\r
 \r
-\r
-/**\r
-  Assemble EFI_HII_PACKAGE_LIST according to the passed in packages.\r
-\r
-  If GuidId is NULL, then ASSERT.\r
-  If not enough resource to complete the operation, then ASSERT.\r
-\r
-  @param  NumberOfPackages       Number of packages.\r
-  @param  GuidId                 Package GUID.\r
-  @param  ...                    Variable argument list for packages to be assembled.\r
-\r
-  @return Pointer of EFI_HII_PACKAGE_LIST_HEADER.\r
-\r
-**/\r
-EFI_HII_PACKAGE_LIST_HEADER *\r
-EFIAPI\r
-HiiLibPreparePackageList (\r
-  IN UINTN                    NumberOfPackages,\r
-  IN CONST EFI_GUID                 *GuidId,\r
-  ...\r
-  )\r
-;\r
-\r
-/**\r
-  This function allocates pool for an EFI_HII_PACKAGE_LIST structure\r
-  with additional space that is big enough to host all packages described by the variable \r
-  argument list of package pointers.  The allocated structure is initialized using NumberOfPackages, \r
-  GuidId,  and the variable length argument list of package pointers.\r
-\r
-  Then, EFI_HII_PACKAGE_LIST will be register to the default System HII Database. The\r
-  Handle to the newly registered Package List is returned throught HiiHandle.\r
-\r
-  If HiiHandle is NULL, then ASSERT.\r
-\r
-  @param  NumberOfPackages    The number of HII packages to register.\r
-  @param  GuidId              Package List GUID ID.\r
-  @param  DriverHandle        Optional. If not NULL, the DriverHandle on which an instance of DEVICE_PATH_PROTOCOL is installed.\r
-                              This DriverHandle uniquely defines the device that the added packages are associated with.\r
-  @param  HiiHandle           On output, the HiiHandle is update with the handle which can be used to retrieve the Package \r
-                              List later. If the functions failed to add the package to the default HII database, this value will\r
-                              be set to NULL.\r
-  @param  ...                 The variable argument list describing all HII Package.\r
-\r
-  @return  EFI_SUCCESS         If the packages are successfully added to the default HII database.\r
-  @return  EFI_OUT_OF_RESOURCE Not enough resource to complete the operation.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibAddPackages (\r
-  IN       UINTN               NumberOfPackages,\r
-  IN CONST EFI_GUID            *GuidId,\r
-  IN       EFI_HANDLE          DriverHandle, OPTIONAL\r
-  OUT      EFI_HII_HANDLE      *HiiHandle,\r
-  ...\r
-  )\r
-;\r
-\r
-/**\r
-  Removes a package list from the default HII database.\r
-\r
-  If HiiHandle is NULL, then ASSERT.\r
-  If HiiHandle is not a valid EFI_HII_HANDLE in the default HII database, then ASSERT.\r
-\r
-  @param  HiiHandle                The handle that was previously registered to the data base that is requested for removal.\r
-                                             List later.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-HiiLibRemovePackages (\r
-  IN      EFI_HII_HANDLE      HiiHandle\r
-  )\r
-;\r
-\r
-/**\r
-  This function adds the string into String Package of each language\r
-  supported by the package list.\r
-\r
-  If String is NULL, then ASSERT.\r
-  If StringId is NULL, the ASSERT.\r
-  If PackageList could not be found in the default HII database, then ASSERT.\r
-\r
-  @param  PackageList            Handle of the package list where this string will\r
-                                            be added.\r
-  @param  StringId               On return, contains the new strings id, which is\r
-                                          unique within PackageList.\r
-  @param  String                 Points to the new null-terminated string.\r
-\r
-  @retval EFI_SUCCESS             The new string was added successfully.\r
-  @retval EFI_OUT_OF_RESOURCES   Could not add the string due to lack of resources.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibNewString (\r
-  IN  EFI_HII_HANDLE                  PackageList,\r
-  OUT EFI_STRING_ID                   *StringId,\r
-  IN  CONST EFI_STRING                String\r
-  )\r
-;\r
-\r
-/**\r
-  This function update the specified string in String Package of each language\r
-  supported by the package list.\r
-\r
-  If String is NULL, then ASSERT.\r
-  If PackageList could not be found in the default HII database, then ASSERT.\r
-  If StringId is not found in PackageList, then ASSERT.\r
-\r
-  @param  PackageList            Handle of the package list where this string will\r
-                                            be added.\r
-  @param  StringId               Ths String Id to be updated.\r
-  @param  String                 Points to the new null-terminated string.\r
-\r
-  @retval EFI_SUCCESS            The new string was added successfully.\r
-  @retval EFI_OUT_OF_RESOURCES   Could not add the string due to lack of resources.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibSetString (\r
-  IN  EFI_HII_HANDLE                  PackageList,\r
-  IN  EFI_STRING_ID                   StringId,\r
-  IN  CONST EFI_STRING                String\r
-  )\r
-;\r
-\r
-/**\r
-  This function try to retrieve string from String package of current language.\r
-  If fails, it try to retrieve string from String package of first language it support.\r
-\r
-  If StringSize is NULL, then ASSERT.\r
-  If String is NULL and *StringSize is not 0, then ASSERT.\r
-  If PackageList could not be found in the default HII database, then ASSERT.\r
-  If StringId is not found in PackageList, then ASSERT.\r
-\r
-  @param  PackageList     The package list in the HII database to search for\r
-                                     the specified string.\r
-  @param  StringId          The string's id, which is unique within\r
-                                      PackageList.\r
-  @param  String             Points to the new null-terminated string.\r
-  @param  StringSize       On entry, points to the size of the buffer pointed\r
-                                 to by String, in bytes. On return, points to the\r
-                                 length of the string, in bytes.\r
-\r
-  @retval EFI_SUCCESS            The string was returned successfully.\r
-  @retval EFI_NOT_FOUND          The string specified by StringId is not available.\r
-  @retval EFI_BUFFER_TOO_SMALL   The buffer specified by StringLength is too small\r
-                                 to hold the string.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibGetString (\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
-/**\r
-  Get string specified by StringId form the HiiHandle. The caller\r
-  is responsible to free the *String.\r
-\r
-  If String is NULL, then ASSERT.\r
-  If HiiHandle could not be found in the default HII database, then ASSERT.\r
-  If StringId is not found in PackageList, then ASSERT.\r
-\r
-  @param  HiiHandle              The HII handle of package list.\r
-  @param  StringId               The String ID.\r
-  @param  String                 The output string.\r
-\r
-  @retval EFI_NOT_FOUND          String is not found.\r
-  @retval EFI_SUCCESS            Operation is successful.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enought memory in the system.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibGetStringFromHandle (\r
-  IN  EFI_HII_HANDLE                  HiiHandle,\r
-  IN  EFI_STRING_ID                   StringId,\r
-  OUT EFI_STRING                      *String\r
-  )\r
-;\r
-\r
-/**\r
-  Get the string given the StringId and String package Producer's Guid. The caller\r
-  is responsible to free the *String.\r
-\r
-  If PackageList with the matching ProducerGuid is not found, then ASSERT.\r
-  If PackageList with the matching ProducerGuid is found but no String is\r
-  specified by StringId is found, then ASSERT.\r
-\r
-  @param  ProducerGuid           The Guid of String package list.\r
-  @param  StringId               The String ID.\r
-  @param  String                 The output string.\r
-\r
-  @retval EFI_SUCCESS            Operation is successful.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enought memory in the system.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibGetStringFromToken (\r
-  IN  EFI_GUID                        *ProducerGuid,\r
-  IN  EFI_STRING_ID                   StringId,\r
-  OUT EFI_STRING                      *String\r
-  )\r
-;\r
-\r
-/**\r
-  Determines the handles that are currently active in the database.\r
-  It's the caller's responsibility to free handle buffer.\r
-\r
-  If HandleBufferLength is NULL, then ASSERT.\r
-  If HiiHandleBuffer is NULL, then ASSERT.\r
-\r
-  @param  HandleBufferLength     On input, a pointer to the length of the handle\r
-                                 buffer. On output, the length of the handle buffer\r
-                                 that is required for the handles found.\r
-  @param  HiiHandleBuffer        Pointer to an array of Hii Handles returned.\r
-\r
-  @retval EFI_SUCCESS            Get an array of Hii Handles successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibGetHiiHandles (\r
-  IN OUT UINTN                     *HandleBufferLength,\r
-  OUT    EFI_HII_HANDLE            **HiiHandleBuffer\r
-  )\r
-;\r
-\r
-/**\r
-  Extract Hii package list GUID for given HII handle.\r
-\r
-  If HiiHandle could not be found in the default HII database, then ASSERT.\r
-  If Guid is NULL, then ASSERT.\r
-\r
-  @param  Handle              Hii handle\r
-  @param  Guid                Package list GUID\r
-\r
-  @retval EFI_SUCCESS            Successfully extract GUID from Hii database.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibExtractGuidFromHiiHandle (\r
-  IN      EFI_HII_HANDLE      Handle,\r
-  OUT     EFI_GUID            *Guid\r
-  )\r
-;\r
-\r
-/**\r
-  Find HII Handle in the default HII database associated with given Device Path.\r
-\r
-  If DevicePath is NULL, then ASSERT.\r
-\r
-  @param  DevicePath             Device Path associated with the HII package list\r
-                                 handle.\r
-\r
-  @retval Handle                 HII package list Handle associated with the Device\r
-                                        Path.\r
-  @retval NULL                   Hii Package list handle is not found.\r
-\r
-**/\r
-EFI_HII_HANDLE\r
-EFIAPI\r
-HiiLibDevicePathToHiiHandle (\r
-  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
-  )\r
-;\r
-\r
-\r
-/**\r
-  Get next language from language code list (with separator ';').\r
-\r
-  If LangCode is NULL, then ASSERT.\r
-  If Lang is NULL, then ASSERT.\r
-\r
-  @param  LangCode    On input: point to first language in the list. On\r
-                                 output: point to next language in the list, or\r
-                                 NULL if no more language in the list.\r
-  @param  Lang           The first language in the list.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-HiiLibGetNextLanguage (\r
-  IN OUT CHAR8      **LangCode,\r
-  OUT CHAR8         *Lang\r
-  )\r
-;\r
-\r
-/**\r
-  This function returns the list of supported languages, in the format specified\r
-  in UEFI specification Appendix M.\r
-\r
-  If HiiHandle is not a valid Handle in the default HII database, then ASSERT.\r
-\r
-  @param  HiiHandle              The HII package list handle.\r
-\r
-  @retval   !NULL  The supported languages.\r
-  @retval   NULL    If Supported Languages can not be retrived.\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-HiiLibGetSupportedLanguages (\r
-  IN EFI_HII_HANDLE           HiiHandle\r
-  )\r
-;\r
-\r
-/**\r
-  This function returns the list of supported 2nd languages, in the format specified\r
-  in UEFI specification Appendix M.\r
-\r
-  If HiiHandle is not a valid Handle in the default HII database, then ASSERT.\r
-  If not enough resource to complete the operation, then ASSERT.\r
-\r
-  @param  HiiHandle              The HII package list handle.\r
-  @param  FirstLanguage          Pointer to language name buffer.\r
-  \r
-  @return The supported languages.\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-HiiLibGetSupportedSecondaryLanguages (\r
-  IN EFI_HII_HANDLE           HiiHandle,\r
-  IN CONST CHAR8              *FirstLanguage\r
-  )\r
-;\r
-\r
-\r
-/**\r
-  This function returns the number of supported languages on HiiHandle.\r
-\r
-  If HiiHandle is not a valid Handle in the default HII database, then ASSERT.\r
-  If not enough resource to complete the operation, then ASSERT.\r
-\r
-  @param  HiiHandle              The HII package list handle.\r
-\r
-  @return The  number of supported languages.\r
-\r
-**/\r
-UINT16\r
-EFIAPI\r
-HiiLibGetSupportedLanguageNumber (\r
-  IN EFI_HII_HANDLE           HiiHandle\r
-  )\r
-;\r
-\r
-/**\r
-  Exports the contents of one or all package lists in the HII database into a buffer.\r
-\r
-  If Handle is not NULL and not a valid EFI_HII_HANDLE registered in the database, \r
-  then ASSERT.\r
-  If PackageListHeader is NULL, then ASSERT.\r
-  If PackageListSize is NULL, then ASSERT.\r
-\r
-  @param  Handle                 The HII Handle.\r
-  @param  PackageListHeader      A pointer to a buffer that will contain the results of \r
-                                 the export function.\r
-  @param  PackageListSize        On output, the length of the buffer that is required for the exported data.\r
-\r
-  @retval EFI_SUCCESS            Package exported.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES   Not enought memory to complete the operations.\r
-\r
-**/\r
-EFI_STATUS \r
-EFIAPI\r
-HiiLibExportPackageLists (\r
-  IN EFI_HII_HANDLE                    Handle,\r
-  OUT EFI_HII_PACKAGE_LIST_HEADER      **PackageListHeader,\r
-  OUT UINTN                            *PackageListSize\r
-  )\r
-;\r
-\r
-/**\r
-  \r
-  This function returns a list of the package handles of the   \r
-  specified type that are currently active in the HII database. The   \r
-  pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package   \r
-  handles to be listed.\r
-\r
-  If HandleBufferLength is NULL, then ASSERT.\r
-  If HandleBuffer is NULL, the ASSERT.\r
-  If PackageType is EFI_HII_PACKAGE_TYPE_GUID and PackageGuid is\r
-  NULL, then ASSERT.\r
-  If PackageType is not EFI_HII_PACKAGE_TYPE_GUID and PackageGuid is not\r
-  NULL, then ASSERT.\r
-  \r
-  \r
-  @param PackageType          Specifies the package type of the packages\r
-                              to list or EFI_HII_PACKAGE_TYPE_ALL for\r
-                              all packages to be listed.\r
-  \r
-  @param PackageGuid          If PackageType is\r
-                              EFI_HII_PACKAGE_TYPE_GUID, then this is\r
-                              the pointer to the GUID which must match\r
-                              the Guid field of\r
-                              EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it\r
-                              must be NULL.\r
-  \r
-  @param HandleBufferLength   On output, the length of the handle buffer\r
-                              that is required for the handles found.\r
-\r
-  @param HandleBuffer         On output, an array of EFI_HII_HANDLE  instances returned.\r
-                              The caller is responcible to free this pointer allocated.\r
-\r
-  @retval EFI_SUCCESS           The matching handles are outputed successfully.\r
-                                HandleBufferLength is updated with the actual length.\r
-  @retval EFI_OUT_OF_RESOURCES  Not enough resource to complete the operation.\r
-  @retval EFI_NOT_FOUND         No matching handle could not be found in database.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibListPackageLists (\r
-  IN        UINT8                     PackageType,\r
-  IN CONST  EFI_GUID                  *PackageGuid,\r
-  IN OUT    UINTN                     *HandleBufferLength,\r
-  OUT       EFI_HII_HANDLE            **Handle\r
-  )\r
-;\r
-\r
-/**\r
-  Convert language code from RFC3066 to ISO639-2.\r
-\r
-  LanguageRfc3066 contain a single RFC 3066 code such as\r
-  "en-US" or "fr-FR".\r
-\r
-  The LanguageRfc3066 must be a buffer large enough\r
-  for ISO_639_2_ENTRY_SIZE characters.\r
-\r
-  If LanguageRfc3066 is NULL, then ASSERT.\r
-  If LanguageIso639 is NULL, then ASSERT.\r
-\r
-  @param  LanguageRfc3066        RFC3066 language code.\r
-  @param  LanguageIso639         ISO639-2 language code.\r
-\r
-  @retval EFI_SUCCESS            Language code converted.\r
-  @retval EFI_NOT_FOUND          Language code not found.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ConvertRfc3066LanguageToIso639Language (\r
-  IN  CHAR8   *LanguageRfc3066,\r
-  OUT CHAR8   *LanguageIso639\r
-  )\r
-;\r
-\r
-/**\r
-  Convert language code from ISO639-2 to RFC3066 and return the converted language.\r
-  Caller is responsible for freeing the allocated buffer.\r
-\r
-  LanguageIso639 contain a single ISO639-2 code such as\r
-  "eng" or "fra".\r
-\r
-  If LanguageIso639 is NULL, then ASSERT.\r
-  If LanguageRfc3066 is NULL, then ASSERT.\r
-\r
-  @param  LanguageIso639         ISO639-2 language code.\r
-\r
-  @return the allocated buffer or NULL, if the language is not found.\r
-\r
-**/\r
-CHAR8*\r
-EFIAPI\r
-ConvertIso639LanguageToRfc3066Language (\r
-  IN  CONST CHAR8   *LanguageIso639\r
-  )\r
-;\r
-\r
-/**\r
-  Convert language code list from RFC3066 to ISO639-2, e.g. "en-US;fr-FR" will\r
-  be converted to "engfra".\r
-\r
-  If SupportedLanguages is NULL, then ASSERT.\r
-\r
-  @param  SupportedLanguages     The RFC3066 language list.\r
-\r
-  @return The ISO639-2 language list.\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-Rfc3066ToIso639 (\r
-  CHAR8  *SupportedLanguages\r
-  )\r
-;\r
-\r
-\r
 ////////////////////////////////////////////////////////\r
 ////////////////////////////////////////////////////////\r
 // HiiLib Functions\r
@@ -522,116 +24,128 @@ Rfc3066ToIso639 (
 /**\r
   Registers a list of packages in the HII Database and returns the HII Handle\r
   associated with that registration.  If an HII Handle has already been registered\r
-  with the same PackageListGuid, then NULL is returned.  If there are not enough \r
-  resources to perform the registration, then NULL is returned.  If an empty list \r
-  of packages is passed in, then NULL is returned.  If the size of the list of \r
-  package is 0, then NULL is returned.\r
-\r
-  @param[in]  PackageListGuid  An optional parameter that is used to identify \r
-                               the GUID of the package list.  If this parameter \r
-                               is NULL, then gEfiCallerIdGuid is used.\r
-  @param[in]  DeviceHandle     Optional. If not NULL, the Device Handle on which \r
+  with the same PackageListGuid and DeviceHandle, then NULL is returned.  If there\r
+  are not enough resources to perform the registration, then NULL is returned.\r
+  If an empty list of packages is passed in, then NULL is returned.  If the size of\r
+  the list of package is 0, then NULL is returned.\r
+\r
+  The variable arguments are pointers that point to package headers defined \r
+  by UEFI VFR compiler and StringGather tool.\r
+\r
+  #pragma pack (push, 1)\r
+  typedef struct {\r
+    UINT32                  BinaryLength;\r
+    EFI_HII_PACKAGE_HEADER  PackageHeader;\r
+  } EDKII_AUTOGEN_PACKAGES_HEADER;\r
+  #pragma pack (pop)\r
+  \r
+  @param[in]  PackageListGuid  The GUID of the package list.\r
+  @param[in]  DeviceHandle     If not NULL, the Device Handle on which \r
                                an instance of DEVICE_PATH_PROTOCOL is installed.\r
                                This Device Handle uniquely defines the device that \r
                                the added packages are associated with.\r
   @param[in]  ...              The variable argument list that contains pointers \r
                                to packages terminated by a NULL.\r
 \r
-  @retval NULL   A HII Handle has already been registered in the HII Database with\r
+  @retval NULL   An HII Handle has already been registered in the HII Database with\r
                  the same PackageListGuid.\r
   @retval NULL   The HII Handle could not be created.\r
+  @retval NULL   An empty list of packages was passed in.\r
+  @retval NULL   All packages are empty.\r
   @retval Other  The HII Handle associated with the newly registered package list.\r
 \r
 **/\r
 EFI_HII_HANDLE\r
 EFIAPI\r
 HiiAddPackages (\r
-  IN CONST EFI_GUID    *PackageListGuid,  OPTIONAL\r
-  IN       EFI_HANDLE  DeviceHandle,      OPTIONAL\r
+  IN CONST EFI_GUID    *PackageListGuid,\r
+  IN       EFI_HANDLE  DeviceHandle  OPTIONAL,\r
   ...\r
-  );\r
+  )\r
+;\r
 \r
 /**\r
-  Removes a package list from the HII Database.\r
+  Removes a package list from the HII database.\r
 \r
   If HiiHandle is NULL, then ASSERT().\r
-  If HiiHandle is not a valid EFI_HII_HANDLE in the HII Database, then ASSERT().\r
+  If HiiHandle is not a valid EFI_HII_HANDLE in the HII database, then ASSERT().\r
 \r
-  @param[in]  HiiHandle  A handle that was previously registered in the HII Database.\r
+  @param[in]  HiiHandle   The handle that was previously registered in the HII database\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 HiiRemovePackages (\r
-  IN EFI_HII_HANDLE  HiiHandle\r
-  );\r
-\r
-/**\r
-  Retrieves the array of all the HII Handles in the HII Database.\r
-  This array is terminated with a NULL HII Handle.\r
-  This function allocates the returned array using AllocatePool().\r
-  The caller is responsible for freeing the array with FreePool().\r
-\r
-  @param[in]  PackageListGuid  An optional parameter that is used to request \r
-                               an HII Handle that is associatd with a specific\r
-                               Package List GUID.  If this parameter is NULL\r
-                               then all the HII Handles in the HII Database\r
-                               are returned.  If this parameter is not NULL\r
-                               then at most 1 HII Handle is returned.\r
-\r
-  @retval NULL   There are no HII handles in the HII database\r
-  @retval NULL   The array of HII Handles could not be retrieved\r
-  @retval Other  A pointer to the NULL terminated array of HII Handles\r
-\r
-**/\r
-EFI_HII_HANDLE *\r
-EFIAPI\r
-HiiGetHiiHandles (\r
-  IN CONST EFI_GUID  *PackageListGuid  OPTIONAL\r
-  );\r
+  IN      EFI_HII_HANDLE      HiiHandle\r
+  )\r
+;\r
 \r
 /**\r
-  Retrieves a pointer to the a Null-terminated ASCII string containing the list \r
-  of languages that an HII handle in the HII Database supports.  The returned \r
-  string is allocated using AllocatePool().  The caller is responsible for freeing\r
-  the returned string using FreePool().  The format of the returned string follows\r
-  the language format assumed the HII Database.\r
-  \r
+  This function creates a new string in String Package or updates an existing \r
+  string in a String Package.  If StringId is 0, then a new string is added to\r
+  a String Package.  If StringId is not zero, then a string in String Package is\r
+  updated.  If SupportedLanguages is NULL, then the string is added or updated\r
+  for all the languages that the String Package supports.  If SupportedLanguages\r
+  is not NULL, then the string is added or updated for the set of languages \r
+  specified by SupportedLanguages.\r
+    \r
   If HiiHandle is NULL, then ASSERT().\r
+  If String is NULL, then ASSERT().\r
 \r
-  @param[in]  HiiHandle  A handle that was previously registered in the HII Database.\r
+  @param[in]  HiiHandle           A handle that was previously registered in the \r
+                                  HII Database.\r
+  @param[in]  StringId            If zero, then a new string is created in the \r
+                                  String Package associated with HiiHandle.  If \r
+                                  non-zero, then the string specified by StringId \r
+                                  is updated in the String Package associated \r
+                                  with HiiHandle. \r
+  @param[in]  String              A pointer to the Null-terminated Unicode string \r
+                                  to add or update in the String Package associated \r
+                                  with HiiHandle.\r
+  @param[in]  SupportedLanguages  A pointer to a Null-terminated ASCII string of \r
+                                  language codes.  If this parameter is NULL, then \r
+                                  String is added or updated in the String Package \r
+                                  associated with HiiHandle for all the languages \r
+                                  that the String Package supports.  If this \r
+                                  parameter is not NULL, then String is added \r
+                                  or updated in the String Package associated with \r
+                                  HiiHandle for the set of languages specified by \r
+                                  SupportedLanguages.  The format of \r
+                                  SupportedLanguages must follow the language \r
+                                  format assumed in the HII Database.\r
 \r
-  @retval NULL   HiiHandle is not registered in the HII database\r
-  @retval NULL   There are not enough resources available to retrieve the suported \r
-                 languages.\r
-  @retval NULL   The list of suported languages could not be retrieved.\r
-  @retval Other  A pointer to the Null-terminated ASCII string of supported languages.\r
+  @retval 0      The string could not be added or updated in the String Package.\r
+  @retval Other  The EFI_STRING_ID of the newly added or updated string.\r
 \r
 **/\r
-CHAR8 *\r
+EFI_STRING_ID\r
 EFIAPI\r
-HiiGetSupportedLanguages (\r
-  IN EFI_HII_HANDLE  HiiHandle\r
-  );\r
+HiiSetString (\r
+  IN EFI_HII_HANDLE    HiiHandle,\r
+  IN EFI_STRING_ID     StringId,            OPTIONAL\r
+  IN CONST EFI_STRING  String,\r
+  IN CONST CHAR8       *SupportedLanguages  OPTIONAL\r
+  )\r
+;\r
 \r
 /**\r
   Retrieves a string from a string package in a specific language.  If the language\r
   is not specified, then a string from a string package in the current platform \r
-  language is retrieved.  If the string can not be retrieved using the specified \r
+  language is retrieved.  If the string cannot be retrieved using the specified \r
   language or the current platform language, then the string is retrieved from \r
   the string package in the first language the string package supports.  The \r
   returned string is allocated using AllocatePool().  The caller is responsible \r
   for freeing the allocated buffer using FreePool().\r
   \r
   If HiiHandle is NULL, then ASSERT().\r
-  If StringId is 0, then ASSET.\r
+  If StringId is 0, then ASSERT().\r
 \r
   @param[in]  HiiHandle  A handle that was previously registered in the HII Database.\r
   @param[in]  StringId   The identifier of the string to retrieved from the string \r
                          package associated with HiiHandle.\r
   @param[in]  Language   The language of the string to retrieve.  If this parameter \r
                          is NULL, then the current platform language is used.  The \r
-                         format of Language must follow the language format assumed \r
+                         format of Language must follow the language format assumed in\r
                          the HII Database.\r
 \r
   @retval NULL   The string specified by StringId is not present in the string package.\r
@@ -644,19 +158,20 @@ HiiGetString (
   IN EFI_HII_HANDLE  HiiHandle,\r
   IN EFI_STRING_ID   StringId,\r
   IN CONST CHAR8     *Language  OPTIONAL\r
-  );\r
+  )\r
+;\r
 \r
 /**\r
-  Retrieves a string from a string package names by GUID in a specific language.  \r
+  Retrieves a string from a string package named by GUID, in the specified language.  \r
   If the language is not specified, then a string from a string package in the \r
-  current platform  language is retrieved.  If the string can not be retrieved \r
+  current platform  language is retrieved.  If the string cannot be retrieved \r
   using the specified language or the current platform language, then the string \r
   is retrieved from the string package in the first language the string package \r
   supports.  The returned string is allocated using AllocatePool().  The caller \r
   is responsible for freeing the allocated buffer using FreePool().\r
   \r
   If PackageListGuid is NULL, then ASSERT().\r
-  If StringId is 0, then ASSET.\r
+  If StringId is 0, then ASSERT().\r
 \r
   @param[in]  PackageListGuid  The GUID of a package list that was previously \r
                                registered in the HII Database.\r
@@ -665,7 +180,7 @@ HiiGetString (
   @param[in]  Language         The language of the string to retrieve.  If this \r
                                parameter is NULL, then the current platform \r
                                language is used.  The format of Language must \r
-                               follow the language format assumed the HII Database.\r
+                               follow the language format assumed in the HII Database.\r
 \r
   @retval NULL   The package list specified by PackageListGuid is not present in the\r
                  HII Database.\r
@@ -679,97 +194,84 @@ HiiGetPackageString (
   IN CONST EFI_GUID  *PackageListGuid,\r
   IN EFI_STRING_ID   StringId,\r
   IN CONST CHAR8     *Language  OPTIONAL\r
-  );\r
+  )\r
+;\r
 \r
 /**\r
-  This function create a new string in String Package or updates an existing \r
-  string in a String Package.  If StringId is 0, then a new string is added to\r
-  a String Package.  If StringId is not zero, then a string in String Package is\r
-  updated.  If SupportedLanguages is NULL, then the string is added or updated\r
-  for all the languages that the String Package supports.  If SupportedLanguages\r
-  is not NULL, then the string is added or updated for the set of languages \r
-  specified by SupportedLanguages.\r
-    \r
-  If HiiHandle is NULL, then ASSERT().\r
-  If String is NULL, then ASSERT().\r
+  Retrieves the array of all the HII Handles or the HII handles of a specific\r
+  package list GUID in the HII Database.\r
+  This array is terminated with a NULL HII Handle.\r
+  This function allocates the returned array using AllocatePool().\r
+  The caller is responsible for freeing the array with FreePool().\r
 \r
-  @param[in]  HiiHandle           A handle that was previously registered in the \r
-                                  HII Database.\r
-  @param[in]  StringId            If zero, then a new string is created in the \r
-                                  String Package associated with HiiHandle.  If \r
-                                  non-zero, then the string specified by StringId \r
-                                  is updated in the String Package  associated \r
-                                  with HiiHandle. \r
-  @param[in]  String              A pointer to the Null-terminated Unicode string \r
-                                  to add or update in the String Package associated \r
-                                  with HiiHandle.\r
-  @param[in]  SupportedLanguages  A pointer to a Null-terminated ASCII string of \r
-                                  language codes.  If this parameter is NULL, then \r
-                                  String is added or updated in the String Package \r
-                                  associated with HiiHandle for all the languages \r
-                                  that the String Package supports.  If this \r
-                                  parameter is not NULL, then then String is added \r
-                                  or updated in the String Package associated with \r
-                                  HiiHandle for the set oflanguages specified by \r
-                                  SupportedLanguages.  The format of \r
-                                  SupportedLanguages must follow the language \r
-                                  format assumed the HII Database.\r
+  @param[in]  PackageListGuid  An optional parameter that is used to request \r
+                               HII Handles associated with a specific\r
+                               Package List GUID.  If this parameter is NULL,\r
+                               then all the HII Handles in the HII Database\r
+                               are returned.  If this parameter is not NULL,\r
+                               then zero or more HII Handles associated with \r
+                               PackageListGuid are returned.\r
 \r
-  @retval 0      The string could not be added or updated in the String Package.\r
-  @retval Other  The EFI_STRING_ID of the newly added or updated string.\r
+  @retval NULL   No HII handles were found in the HII database\r
+  @retval NULL   The array of HII Handles could not be retrieved\r
+  @retval Other  A pointer to the NULL terminated array of HII Handles\r
 \r
 **/\r
-EFI_STRING_ID\r
+EFI_HII_HANDLE *\r
 EFIAPI\r
-HiiSetString (\r
-  IN EFI_HII_HANDLE    HiiHandle,\r
-  IN EFI_STRING_ID     StringId,            OPTIONAL\r
-  IN CONST EFI_STRING  String,\r
-  IN CONST CHAR8       *SupportedLanguages  OPTIONAL\r
-  );\r
+HiiGetHiiHandles (\r
+  IN CONST EFI_GUID  *PackageListGuid  OPTIONAL\r
+  )\r
+;\r
 \r
 /**\r
-  Validates the config data associated with an HII handle in the HII Database.\r
-    \r
+  Retrieves a pointer to a Null-terminated ASCII string containing the list \r
+  of languages that an HII handle in the HII Database supports.  The returned \r
+  string is allocated using AllocatePool().  The caller is responsible for freeing\r
+  the returned string using FreePool().  The format of the returned string follows\r
+  the language format assumed in the HII Database.\r
+  \r
   If HiiHandle is NULL, then ASSERT().\r
 \r
   @param[in]  HiiHandle  A handle that was previously registered in the HII Database.\r
 \r
-  @retval TRUE   The config data associated with HiiHandle passes all validation\r
-                 checks.\r
-  @retval FALSE  The config data associated with HiiHandle failed one or more \r
-                 validation checks.\r
+  @retval NULL   HiiHandle is not registered in the HII database\r
+  @retval NULL   There are not enough resources available to retrieve the suported \r
+                 languages.\r
+  @retval NULL   The list of suported languages could not be retrieved.\r
+  @retval Other  A pointer to the Null-terminated ASCII string of supported languages.\r
 \r
 **/\r
-BOOLEAN\r
+CHAR8 *\r
 EFIAPI\r
-HiiValidateDataFromHiiHandle (\r
-  IN EFI_HII_HANDLE  HiiHandle\r
-  );\r
+HiiGetSupportedLanguages (\r
+  IN EFI_HII_HANDLE           HiiHandle\r
+  )\r
+;\r
 \r
 /**\r
   Allocates and returns a Null-terminated Unicode <ConfigHdr> string using routing \r
   information that includes a GUID, an optional Unicode string name, and a device\r
-  path.  The string returned is allocated with AllocatePool().  The caller is \r
+  path. The string returned is allocated with AllocatePool().  The caller is \r
   responsible for freeing the allocated string with FreePool().\r
   \r
   The format of a <ConfigHdr> is as follows:\r
 \r
     GUID=<HexCh>32&NAME=<Char>NameLength&PATH=<HexChar>DevicePathSize<Null>\r
 \r
-  @param[in]  Guid          Pointer to an EFI_GUID that is the routing information\r
+  @param[in]  Guid          The pointer to an EFI_GUID that is the routing information\r
                             GUID.  Each of the 16 bytes in Guid is converted to \r
                             a 2 Unicode character hexidecimal string.  This is \r
                             an optional parameter that may be NULL.\r
-  @param[in]  Name          Pointer to a Null-terminated Unicode string that is \r
+  @param[in]  Name          The pointer to a Null-terminated Unicode string that is \r
                             the routing information NAME.  This is an optional \r
                             parameter that may be NULL.  Each 16-bit Unicode \r
                             character in Name is converted to a 4 character Unicode \r
                             hexidecimal string.                        \r
-  @param[in]  DriverHandle  The driver handle which supports a Device Path Protocol\r
+  @param[in]  DriverHandle  The driver handle that supports a Device Path Protocol\r
                             that is the routing information PATH.  Each byte of\r
                             the Device Path associated with DriverHandle is converted\r
-                            to a 2 Unicode character hexidecimal string.\r
+                            to a two (Unicode) character hexidecimal string.\r
 \r
   @retval NULL   DriverHandle does not support the Device Path Protocol.\r
   @retval NULL   DriverHandle does not support the Device Path Protocol.\r
@@ -785,52 +287,46 @@ HiiConstructConfigHdr (
   );\r
 \r
 /**\r
-  Allocates and returns a Null-terminated Unicode <ConfigAltResp> string.\r
+  Reset the default value specified by DefaultId to the driver\r
+  configuration specified by the Request string. \r
 \r
-  If Guid is NULL, then ASSERT().\r
-  If Name is NULL, then ASSERT().\r
-  If BlockNameArray is NULL, then ASSERT().\r
-\r
-  @param[in] Guid               GUID of the buffer storage.\r
-  @param[in] Name               Name of the buffer storage.\r
-  @param[in] DriverHandle       The DriverHandle that support a Device Path\r
-                                Protocol.    \r
-  @param[in] BufferStorage      Content of the buffer storage.\r
-  @param[in] BufferStorageSize  Length in bytes of the buffer storage.\r
-  @param[in] BlockNameArray     Array generated by VFR compiler.  This array\r
-                                contains a UINT32 value that is the length\r
-                                of BlockNameArray in bytes, followed by pairs\r
-                                of 16-bit values that are the offset and length\r
-                                values used to contruct a <ConfigRequest> string.\r
-  @param[in]  ...               A variable argument list that contains pairs of 16-bit\r
-                                ALTCFG identifiers and pointers to DefaultValueArrays.\r
-                                The variable argument list is terminated by a NULL \r
-                                DefaultValueArray pointer.  A DefaultValueArray \r
-                                contains a UINT32 value that is the length, in bytes,\r
-                                of the DefaultValueArray.  The UINT32 length value \r
-                                is followed by a series of records that contain\r
-                                a 16-bit WIDTH value followed by a byte array with \r
-                                WIDTH entries.  The records must be parsed from\r
-                                beginning to end until the UINT32 length limit\r
-                                is reached.  \r
-\r
-  @retval NULL          There are not enough resources to process the request.\r
-  @retval NULL          A <ConfigResp> could not be retrieved from the Config \r
-                        Routing Protocol.\r
-  @retval Other         A pointer to the Null-terminate Unicode <ConfigAltResp>\r
-                        string.\r
+  NULL request string support depends on the ExportConfig interface of\r
+  HiiConfigRouting protocol in UEFI specification.\r
+  \r
+  @param Request    A null-terminated Unicode string in \r
+                    <MultiConfigRequest> format. It can be NULL.\r
+                    If it is NULL, all configurations for the\r
+                    entirety of the current HII database will be reset.\r
+  @param DefaultId  Specifies the type of defaults to retrieve.\r
+  \r
+  @retval TURE    The default value was set successfully.\r
+  @retval FALSE   The default value was not found.\r
+**/\r
+BOOLEAN\r
+EFIAPI                               \r
+HiiSetToDefaults (     \r
+  IN CONST EFI_STRING  Request,  OPTIONAL\r
+  IN UINT16            DefaultId\r
+  );\r
+\r
+/**\r
+  Validate the current configuration by parsing the IFR opcode in HII form.\r
 \r
+  NULL request string support depends on the ExportConfig interface of\r
+  HiiConfigRouting protocol in the UEFI specification.\r
+  \r
+  @param  Request   A null-terminated Unicode string in \r
+                    <MultiConfigRequest> format. It can be NULL.\r
+                    If it is NULL, all current configurations for the\r
+                    entirety of the current HII database will be validated.\r
+  \r
+  @retval TRUE    The current configuration is valid.\r
+  @retval FALSE   The current configuration is invalid.\r
 **/\r
-EFI_STRING\r
-EFIAPI\r
-HiiConstructConfigAltResp (\r
-  IN CONST EFI_GUID  *Guid,\r
-  IN CONST CHAR16    *Name,\r
-  IN EFI_HANDLE      DriverHandle,\r
-  IN CONST VOID      *BufferStorage,\r
-  IN UINTN           BufferStorageSize,\r
-  IN CONST VOID      *BlockNameArray, \r
-  ...\r
+BOOLEAN\r
+EFIAPI                               \r
+HiiValidateSettings (\r
+  IN CONST EFI_STRING  Request  OPTIONAL\r
   );\r
 \r
 /**\r
@@ -839,8 +335,8 @@ HiiConstructConfigAltResp (
   If ConfigHdr is NULL, then ASSERT().\r
 \r
   @param[in] ConfigHdr  Either <ConfigRequest> or <ConfigResp>.\r
-  @param[in] Guid       GUID of the storage.\r
-  @param[in] Name       NAME of the storage.\r
+  @param[in] Guid       The GUID of the storage.\r
+  @param[in] Name       The NAME of the storage.\r
 \r
   @retval TRUE   Routing information matches <ConfigHdr>.\r
   @retval FALSE  Routing information does not match <ConfigHdr>.\r
@@ -855,26 +351,27 @@ HiiIsConfigHdrMatch (
   );\r
 \r
 /**\r
-  Retrieves uncommited data from the Form Browser and converts it to a binary\r
-  buffer.  The returned buffer is allocated using AllocatePool().  The caller\r
-  is responsible for freeing the returned buffer using FreePool().\r
+  Retrieves uncommitted data from the Form Browser and converts it to a binary\r
+  buffer.\r
 \r
-  @param[in]  VariableName  Pointer to a Null-terminated Unicode string.  This \r
-                            is an optional parameter that may be NULL.\r
-  @param[in]  VariableGuid  Pointer to an EFI_GUID structure.  This is an optional \r
+  @param[in]  VariableGuid  The pointer to an EFI_GUID structure.  This is an optional \r
                             parameter that may be NULL.\r
-  @param[in]  BufferSize    Length in bytes of buffer to hold retrived data. \r
+  @param[in]  VariableName  The pointer to a Null-terminated Unicode string.  This \r
+                            is an optional parameter that may be NULL.\r
+  @param[in]  BufferSize    The length in bytes of buffer to hold retrieved data. \r
+  @param[out] Buffer        The buffer of data to be updated.\r
 \r
-  @retval NULL   The uncommitted data could not be retrieved.\r
-  @retval Other  A pointer to a buffer containing the uncommitted data.\r
+  @retval FALSE  The uncommitted data could not be retrieved.\r
+  @retval TRUE   The uncommitted data was retrieved.\r
 \r
 **/\r
-UINT8 *\r
+BOOLEAN\r
 EFIAPI\r
 HiiGetBrowserData (\r
   IN CONST EFI_GUID  *VariableGuid,  OPTIONAL\r
   IN CONST CHAR16    *VariableName,  OPTIONAL\r
-  IN UINTN           BlockSize\r
+  IN UINTN           BufferSize,\r
+  OUT UINT8          *Buffer\r
   );\r
 \r
 /**\r
@@ -882,12 +379,12 @@ HiiGetBrowserData (
 \r
   If Buffer is NULL, then ASSERT().\r
 \r
-  @param[in]  VariableName    Pointer to a Null-terminated Unicode string.  This\r
-                              is an optional parameter that may be NULL.\r
-  @param[in]  VariableGuid    Pointer to an EFI_GUID structure.  This is an optional\r
+  @param[in]  VariableGuid    The pointer to an EFI_GUID structure.  This is an optional\r
                               parameter that may be NULL.\r
-  @param[in]  BufferSize      Length, in bytes, of Buffer.\r
-  @param[in]  Buffer          Buffer of data to commit.\r
+  @param[in]  VariableName    The pointer to a Null-terminated Unicode string.  This\r
+                              is an optional parameter that may be NULL.\r
+  @param[in]  BufferSize      The length, in bytes, of Buffer.\r
+  @param[in]  Buffer          The buffer of data to commit.\r
   @param[in]  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
@@ -918,11 +415,11 @@ HiiSetBrowserData (
   Returns a UINT64 value that contains bitfields for Hour, Minute, and Second.\r
   The lower 8-bits of Hour are placed in bits 0..7.  The lower 8-bits of Minute \r
   are placed in bits 8..15, and the lower 8-bits of Second are placed in bits \r
-  16..23.  This format is selected because it can be easily translated to \r
+  16..23.  This format was selected because it can be easily translated to \r
   an EFI_HII_TIME structure in an EFI_IFR_TYPE_VALUE union.\r
 \r
   @param  Hour    The hour value to be encoded.\r
-  @param  Minute  The miniute value to be encoded.\r
+  @param  Minute  The minute value to be encoded.\r
   @param  Second  The second value to be encoded.\r
 \r
   @return A 64-bit containing Hour, Minute, and Second.\r
@@ -931,10 +428,10 @@ HiiSetBrowserData (
   (UINT64)((Hour & 0xff) | ((Minute & 0xff) << 8) | ((Second & 0xff) << 16))\r
 \r
 /**\r
-  Returns a UINT64 value that contains bitfields for Year, Month, and Day.\r
+  Returns a UINT64 value that contains bit fields for Year, Month, and Day.\r
   The lower 16-bits of Year are placed in bits 0..15.  The lower 8-bits of Month \r
   are placed in bits 16..23, and the lower 8-bits of Day are placed in bits \r
-  24..31.  This format is selected because it can be easily translated to \r
+  24..31.  This format was selected because it can be easily translated to \r
   an EFI_HII_DATE structure in an EFI_IFR_TYPE_VALUE union.\r
 \r
   @param  Year   The year value to be encoded.\r
@@ -961,12 +458,14 @@ HiiAllocateOpCodeHandle (
   );\r
 \r
 /**\r
-  Frees an OpCode Handle that was peviously allocated with HiiAllocateOpCodeHandle().\r
+  Frees an OpCode Handle that was previously allocated with HiiAllocateOpCodeHandle().\r
   When an OpCode Handle is freed, all of the opcodes associated with the OpCode\r
   Handle are also freed.\r
 \r
   If OpCodeHandle is NULL, then ASSERT().\r
 \r
+  @param[in]  OpCodeHandle   The handle to the buffer of opcodes.\r
+\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -974,6 +473,28 @@ HiiFreeOpCodeHandle (
   VOID  *OpCodeHandle\r
   );\r
 \r
+/**\r
+  Append raw opcodes to an OpCodeHandle.\r
+\r
+  If OpCodeHandle is NULL, then ASSERT().\r
+  If RawBuffer is NULL, then ASSERT();\r
+\r
+  @param[in]  OpCodeHandle   The handle to the buffer of opcodes.\r
+  @param[in]  RawBuffer      The buffer of opcodes to append.\r
+  @param[in]  RawBufferSize  The size, in bytes, of Buffer.\r
+\r
+  @retval NULL   There is not enough space left in Buffer to add the opcode.\r
+  @retval Other  A pointer to the appended opcodes.\r
+\r
+**/\r
+UINT8 *\r
+EFIAPI\r
+HiiCreateRawOpCodes (\r
+  IN VOID   *OpCodeHandle,\r
+  IN UINT8  *RawBuffer,\r
+  IN UINTN  RawBufferSize\r
+  );\r
+\r
 /**\r
   Create EFI_IFR_END_OP opcode.\r
 \r
@@ -998,11 +519,11 @@ HiiCreateEndOpCode (
   If Type is invalid, then ASSERT().\r
   If Flags is invalid, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle  Handle to the buffer of opcodes.\r
-  @param[in]  StringId      StringId for the option\r
-  @param[in]  Flags         Flags for the option\r
-  @param[in]  Type          Type for the option\r
-  @param[in]  Value         Value for the option\r
+  @param[in]  OpCodeHandle  The handle to the buffer of opcodes.\r
+  @param[in]  StringId      StringId for the option.\r
+  @param[in]  Flags         The flags for the option.\r
+  @param[in]  Type          The type for the option.\r
+  @param[in]  Value         The value for the option.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -1024,10 +545,10 @@ HiiCreateOneOfOptionOpCode (
   If OpCodeHandle is NULL, then ASSERT().\r
   If Type is invalid, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle  Handle to the buffer of opcodes.\r
-  @param[in]  DefaultId     DefaultId for the default\r
-  @param[in]  Type          Type for the default\r
-  @param[in]  Value         Value for the default\r
+  @param[in]  OpCodeHandle  The handle to the buffer of opcodes.\r
+  @param[in]  DefaultId     The DefaultId for the default.\r
+  @param[in]  Type          The type for the default.\r
+  @param[in]  Value         The value for the default.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -1049,9 +570,9 @@ HiiCreateDefaultOpCode (
   If Guid is NULL, then ASSERT().\r
   If OpCodeSize < sizeof (EFI_IFR_GUID), then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle  Handle to the buffer of opcodes.\r
-  @param[in]  Guid          Pointer to EFI_GUID of this guided opcode.\r
-  @param[in]  GuidOpCode    Pointer to an EFI_IFR_GUID opcode.  This is an \r
+  @param[in]  OpCodeHandle  The handle to the buffer of opcodes.\r
+  @param[in]  Guid          The pointer to EFI_GUID of this guided opcode.\r
+  @param[in]  GuidOpCode    The pointer to an EFI_IFR_GUID opcode.  This is an \r
                             optional parameter that may be NULL.  If this\r
                             parameter is NULL, then the GUID extension \r
                             region of the created opcode is filled with zeros.\r
@@ -1080,12 +601,12 @@ HiiCreateGuidOpCode (
   If OpCodeHandle is NULL, then ASSERT().\r
   If any reserved bits are set in QuestionFlags, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle  Handle to the buffer of opcodes.\r
-  @param[in]  QuestionId      Question ID\r
-  @param[in]  Prompt          String ID for Prompt\r
-  @param[in]  Help            String ID for Help\r
-  @param[in]  QuestionFlags   Flags in Question Header\r
-  @param[in]  QuestionConfig  String ID for configuration\r
+  @param[in]  OpCodeHandle  The handle to the buffer of opcodes.\r
+  @param[in]  QuestionId      The Question ID.\r
+  @param[in]  Prompt          The String ID for Prompt.\r
+  @param[in]  Help            The String ID for Help.\r
+  @param[in]  QuestionFlags   The flags in the Question Header.\r
+  @param[in]  QuestionConfig  The String ID for the configuration.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -1109,11 +630,11 @@ HiiCreateActionOpCode (
   If any reserved bits are set in Flags, then ASSERT().\r
   If Scope > 1, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle  Handle to the buffer of opcodes.\r
-  @param[in]  Prompt      String ID for Prompt\r
-  @param[in]  Help        String ID for Help\r
-  @param[in]  Flags       Subtitle opcode flags\r
-  @param[in]  Scope       1 if this opcpde is the beginning of a new scope.\r
+  @param[in]  OpCodeHandle  The handle to the buffer of opcodes.\r
+  @param[in]  Prompt      The string ID for Prompt.\r
+  @param[in]  Help        The string ID for Help.\r
+  @param[in]  Flags       The subtitle opcode flags.\r
+  @param[in]  Scope       1 if this opcode is the beginning of a new scope.\r
                           0 if this opcode is within the current scope.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
@@ -1136,12 +657,12 @@ HiiCreateSubTitleOpCode (
   If OpCodeHandle is NULL, then ASSERT().\r
   If any reserved bits are set in QuestionFlags, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle   Handle to the buffer of opcodes.\r
-  @param[in]  FormId         Destination Form ID\r
-  @param[in]  Prompt         String ID for Prompt\r
-  @param[in]  Help           String ID for Help\r
-  @param[in]  QuestionFlags  Flags in Question Header\r
-  @param[in]  QuestionId     Question ID\r
+  @param[in]  OpCodeHandle   The handle to the buffer of opcodes.\r
+  @param[in]  FormId         The Destination Form ID.\r
+  @param[in]  Prompt         The string ID for Prompt.\r
+  @param[in]  Help           The string ID for Help.\r
+  @param[in]  QuestionFlags  The flags in Question Header\r
+  @param[in]  QuestionId     Question ID.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -1165,15 +686,15 @@ HiiCreateGotoOpCode (
   If any reserved bits are set in QuestionFlags, then ASSERT().\r
   If any reserved bits are set in CheckBoxFlags, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle          Handle to the buffer of opcodes.\r
-  @param[in]  QuestionId            Question ID\r
-  @param[in]  VarStoreId            Storage ID\r
-  @param[in]  VarOffset             Offset in Storage\r
-  @param[in]  Prompt                String ID for Prompt\r
-  @param[in]  Help                  String ID for Help\r
-  @param[in]  QuestionFlags         Flags in Question Header\r
-  @param[in]  CheckBoxFlags         Flags for checkbox opcode\r
-  @param[in]  DefaultsOpCodeHandle  Handle for a buffer of DEFAULT opcodes.  This\r
+  @param[in]  OpCodeHandle          The handle to the buffer of opcodes.\r
+  @param[in]  QuestionId            The question ID.\r
+  @param[in]  VarStoreId            The storage ID.\r
+  @param[in]  VarOffset             The offset in Storage.\r
+  @param[in]  Prompt                The string ID for Prompt.\r
+  @param[in]  Help                  The string ID for Help.\r
+  @param[in]  QuestionFlags         The flags in Question Header.\r
+  @param[in]  CheckBoxFlags         The flags for checkbox opcode.\r
+  @param[in]  DefaultsOpCodeHandle  The handle for a buffer of DEFAULT opcodes.  This\r
                                     is an optional parameter that may be NULL.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
@@ -1201,18 +722,18 @@ HiiCreateCheckBoxOpCode (
   If any reserved bits are set in QuestionFlags, then ASSERT().\r
   If any reserved bits are set in NumericFlags, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle          Handle to the buffer of opcodes.\r
-  @param[in]  QuestionId            Question ID\r
-  @param[in]  VarStoreId            Storage ID\r
-  @param[in]  VarOffset             Offset in Storage\r
-  @param[in]  Prompt                String ID for Prompt\r
-  @param[in]  Help                  String ID for Help\r
-  @param[in]  QuestionFlags         Flags in Question Header\r
-  @param[in]  NumericFlags          Flags for numeric opcode\r
-  @param[in]  Minimum               Numeric minimum value\r
-  @param[in]  Maximum               Numeric maximum value\r
-  @param[in]  Step                  Numeric step for edit\r
-  @param[in]  DefaultsOpCodeHandle  Handle for a buffer of DEFAULT opcodes.  This\r
+  @param[in]  OpCodeHandle          The handle to the buffer of opcodes.\r
+  @param[in]  QuestionId            The question ID.\r
+  @param[in]  VarStoreId            The storage ID.\r
+  @param[in]  VarOffset             The offset in Storage.\r
+  @param[in]  Prompt                The string ID for Prompt.\r
+  @param[in]  Help                  The string ID for Help.\r
+  @param[in]  QuestionFlags         The flags in Question Header.\r
+  @param[in]  NumericFlags          The flags for a numeric opcode.\r
+  @param[in]  Minimum               The numeric minimum value.\r
+  @param[in]  Maximum               The numeric maximum value.\r
+  @param[in]  Step                  The numeric step for edit.\r
+  @param[in]  DefaultsOpCodeHandle  The handle for a buffer of DEFAULT opcodes.  This\r
                                     is an optional parameter that may be NULL.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
@@ -1243,17 +764,17 @@ HiiCreateNumericOpCode (
   If any reserved bits are set in QuestionFlags, then ASSERT().\r
   If any reserved bits are set in StringFlags, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle          Handle to the buffer of opcodes.\r
-  @param[in]  QuestionId            Question ID\r
-  @param[in]  VarStoreId            Storage ID\r
-  @param[in]  VarOffset             Offset in Storage\r
-  @param[in]  Prompt                String ID for Prompt\r
-  @param[in]  Help                  String ID for Help\r
-  @param[in]  QuestionFlags         Flags in Question Header\r
-  @param[in]  StringFlags           Flags for string opcode\r
-  @param[in]  MinSize               String minimum length\r
-  @param[in]  MaxSize               String maximum length\r
-  @param[in]  DefaultsOpCodeHandle  Handle for a buffer of DEFAULT opcodes.  This\r
+  @param[in]  OpCodeHandle          The handle to the buffer of opcodes.\r
+  @param[in]  QuestionId            The question ID.\r
+  @param[in]  VarStoreId            The storage ID.\r
+  @param[in]  VarOffset             The offset in Storage.\r
+  @param[in]  Prompt                The string ID for Prompt.\r
+  @param[in]  Help                  The string ID for Help.\r
+  @param[in]  QuestionFlags         The flags in Question Header.\r
+  @param[in]  StringFlags           The flags for a string opcode.\r
+  @param[in]  MinSize               The string minimum length.\r
+  @param[in]  MaxSize               The string maximum length.\r
+  @param[in]  DefaultsOpCodeHandle  The handle for a buffer of DEFAULT opcodes.  This\r
                                     is an optional parameter that may be NULL.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
@@ -1283,16 +804,16 @@ HiiCreateStringOpCode (
   If any reserved bits are set in QuestionFlags, then ASSERT().\r
   If any reserved bits are set in OneOfFlags, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle          Handle to the buffer of opcodes.\r
-  @param[in]  QuestionId            Question ID\r
-  @param[in]  VarStoreId            Storage ID\r
-  @param[in]  VarOffset             Offset in Storage\r
-  @param[in]  Prompt                String ID for Prompt\r
-  @param[in]  Help                  String ID for Help\r
-  @param[in]  QuestionFlags         Flags in Question Header\r
-  @param[in]  OneOfFlags            Flags for oneof opcode\r
-  @param[in]  OptionsOpCodeHandle   Handle for a buffer of ONE_OF_OPTION opcodes.\r
-  @param[in]  DefaultsOpCodeHandle  Handle for a buffer of DEFAULT opcodes.  This\r
+  @param[in]  OpCodeHandle          The handle to the buffer of opcodes.\r
+  @param[in]  QuestionId            The question ID.\r
+  @param[in]  VarStoreId            The storage ID.\r
+  @param[in]  VarOffset             The offset in Storage.\r
+  @param[in]  Prompt                The string ID for Prompt.\r
+  @param[in]  Help                  The string ID for Help.\r
+  @param[in]  QuestionFlags         The flags in Question Header.\r
+  @param[in]  OneOfFlags            The flags for a oneof opcode.\r
+  @param[in]  OptionsOpCodeHandle   The handle for a buffer of ONE_OF_OPTION opcodes.\r
+  @param[in]  DefaultsOpCodeHandle  The handle for a buffer of DEFAULT opcodes.  This\r
                                     is an optional parameter that may be NULL.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
@@ -1321,17 +842,17 @@ HiiCreateOneOfOpCode (
   If any reserved bits are set in QuestionFlags, then ASSERT().\r
   If any reserved bits are set in OrderedListFlags, then ASSERT().\r
 \r
-  @param[in]  OpCodeHandle          Handle to the buffer of opcodes.\r
-  @param[in]  QuestionId            Question ID\r
-  @param[in]  VarStoreId            Storage ID\r
-  @param[in]  VarOffset             Offset in Storage\r
-  @param[in]  Prompt                String ID for Prompt\r
-  @param[in]  Help                  String ID for Help\r
-  @param[in]  QuestionFlags         Flags in Question Header\r
-  @param[in]  OrderedListFlags      Flags for ordered list opcode\r
-  @param[in]  DataType              Type for option value\r
+  @param[in]  OpCodeHandle          The handle to the buffer of opcodes.\r
+  @param[in]  QuestionId            The question ID.\r
+  @param[in]  VarStoreId            The storage ID.\r
+  @param[in]  VarOffset             The offset in Storage.\r
+  @param[in]  Prompt                The string ID for Prompt.\r
+  @param[in]  Help                  The string ID for Help.\r
+  @param[in]  QuestionFlags         The flags in Question Header.\r
+  @param[in]  OrderedListFlags      The flags for an ordered list opcode.\r
+  @param[in]  DataType              The type for option value.\r
   @param[in]  MaxContainers         Maximum count for options in this ordered list\r
-  @param[in]  OptionsOpCodeHandle   Handle for a buffer of ONE_OF_OPTION opcodes.\r
+  @param[in]  OptionsOpCodeHandle   The handle for a buffer of ONE_OF_OPTION opcodes.\r
   @param[in]  DefaultsOpCodeHandle  Handle for a buffer of DEFAULT opcodes.  This\r
                                     is an optional parameter that may be NULL.\r
 \r
@@ -1356,6 +877,105 @@ HiiCreateOrderedListOpCode (
   IN VOID             *DefaultsOpCodeHandle  OPTIONAL\r
   );\r
 \r
+/**\r
+  Create EFI_IFR_TEXT_OP opcode.\r
+\r
+  If OpCodeHandle is NULL, then ASSERT().\r
+\r
+  @param[in]  OpCodeHandle  Handle to the buffer of opcodes.\r
+  @param[in]  Prompt        String ID for Prompt.\r
+  @param[in]  Help          String ID for Help.\r
+  @param[in]  TextTwo       String ID for TextTwo.\r
+\r
+  @retval NULL   There is not enough space left in Buffer to add the opcode.\r
+  @retval Other  A pointer to the created opcode.\r
+\r
+**/\r
+UINT8 *\r
+EFIAPI\r
+HiiCreateTextOpCode (\r
+  IN VOID           *OpCodeHandle,\r
+  IN EFI_STRING_ID  Prompt,\r
+  IN EFI_STRING_ID  Help,\r
+  IN EFI_STRING_ID  TextTwo\r
+  );\r
+\r
+/**\r
+  Create EFI_IFR_DATE_OP opcode.\r
+\r
+  If OpCodeHandle is NULL, then ASSERT().\r
+  If any reserved bits are set in QuestionFlags, then ASSERT().\r
+  If any reserved bits are set in DateFlags, then ASSERT().\r
+\r
+  @param[in]  OpCodeHandle          Handle to the buffer of opcodes.\r
+  @param[in]  QuestionId            Question ID\r
+  @param[in]  VarStoreId            Storage ID, optional. If DateFlags is not\r
+                                    QF_DATE_STORAGE_NORMAL, this parameter is ignored.\r
+  @param[in]  VarOffset             Offset in Storage, optional. If DateFlags is not\r
+                                    QF_DATE_STORAGE_NORMAL, this parameter is ignored.\r
+  @param[in]  Prompt                String ID for Prompt\r
+  @param[in]  Help                  String ID for Help\r
+  @param[in]  QuestionFlags         Flags in Question Header\r
+  @param[in]  DateFlags             Flags for date opcode\r
+  @param[in]  DefaultsOpCodeHandle  Handle for a buffer of DEFAULT opcodes.  This\r
+                                    is an optional parameter that may be NULL.\r
+\r
+  @retval NULL   There is not enough space left in Buffer to add the opcode.\r
+  @retval Other  A pointer to the created opcode.\r
+\r
+**/\r
+UINT8 *\r
+EFIAPI\r
+HiiCreateDateOpCode (\r
+  IN VOID             *OpCodeHandle,\r
+  IN EFI_QUESTION_ID  QuestionId,\r
+  IN EFI_VARSTORE_ID  VarStoreId,   OPTIONAL\r
+  IN UINT16           VarOffset,    OPTIONAL\r
+  IN EFI_STRING_ID    Prompt,\r
+  IN EFI_STRING_ID    Help,\r
+  IN UINT8            QuestionFlags,\r
+  IN UINT8            DateFlags,\r
+  IN VOID             *DefaultsOpCodeHandle  OPTIONAL\r
+  );\r
+\r
+/**\r
+  Create EFI_IFR_TIME_OP opcode.\r
+\r
+  If OpCodeHandle is NULL, then ASSERT().\r
+  If any reserved bits are set in QuestionFlags, then ASSERT().\r
+  If any reserved bits are set in TimeFlags, then ASSERT().\r
+\r
+  @param[in]  OpCodeHandle          Handle to the buffer of opcodes.\r
+  @param[in]  QuestionId            Question ID\r
+  @param[in]  VarStoreId            Storage ID, optional. If TimeFlags is not\r
+                                    QF_TIME_STORAGE_NORMAL, this parameter is ignored.\r
+  @param[in]  VarOffset             Offset in Storage, optional. If TimeFlags is not\r
+                                    QF_TIME_STORAGE_NORMAL, this parameter is ignored.\r
+  @param[in]  Prompt                String ID for Prompt\r
+  @param[in]  Help                  String ID for Help\r
+  @param[in]  QuestionFlags         Flags in Question Header\r
+  @param[in]  TimeFlags             Flags for time opcode\r
+  @param[in]  DefaultsOpCodeHandle  Handle for a buffer of DEFAULT opcodes.  This\r
+                                    is an optional parameter that may be NULL.\r
+\r
+  @retval NULL   There is not enough space left in Buffer to add the opcode.\r
+  @retval Other  A pointer to the created opcode.\r
+\r
+**/\r
+UINT8 *\r
+EFIAPI\r
+HiiCreateTimeOpCode (\r
+  IN VOID             *OpCodeHandle,\r
+  IN EFI_QUESTION_ID  QuestionId,\r
+  IN EFI_VARSTORE_ID  VarStoreId,   OPTIONAL\r
+  IN UINT16           VarOffset,    OPTIONAL\r
+  IN EFI_STRING_ID    Prompt,\r
+  IN EFI_STRING_ID    Help,\r
+  IN UINT8            QuestionFlags,\r
+  IN UINT8            TimeFlags,\r
+  IN VOID             *DefaultsOpCodeHandle  OPTIONAL\r
+  );\r
+\r
 /**\r
   This function updates a form that has previously been registered with the HII \r
   Database.  This function will perform at most one update operation.\r
@@ -1363,22 +983,22 @@ HiiCreateOrderedListOpCode (
   The form to update is specified by Handle, FormSetGuid, and FormId.  Binary \r
   comparisons of IFR opcodes are performed from the beginning of the form being \r
   updated until an IFR opcode is found that exactly matches the first IFR opcode \r
-  specifed by StartOpCodeHandle.  The following rules are used to determine if\r
-  an insert, replace, or delete operation is performed.\r
+  specified by StartOpCodeHandle.  The following rules are used to determine if\r
+  an insert, replace, or delete operation is performed:\r
   \r
   1) If no matches are found, then NULL is returned.  \r
   2) If a match is found, and EndOpCodeHandle is NULL, then all of the IFR opcodes\r
-     from StartOpcodeHandle except the first opcode are inserted immediately after \r
-     the matching IFR opcode in the form beng updated.\r
+     from StartOpCodeHandle except the first opcode are inserted immediately after \r
+     the matching IFR opcode in the form to be updated.\r
   3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made \r
-     from the matching IFR opcode until an IFR opcode exatly matches the first \r
+     from the matching IFR opcode until an IFR opcode exactly matches the first \r
      IFR opcode specified by EndOpCodeHandle.  If no match is found for the first\r
      IFR opcode specified by EndOpCodeHandle, then NULL is returned.  If a match\r
      is found, then all of the IFR opcodes between the start match and the end \r
      match are deleted from the form being updated and all of the IFR opcodes\r
-     from StartOpcodeHandle except the first opcode are inserted immediately after \r
+     from StartOpCodeHandle except the first opcode are inserted immediately after \r
      the matching start IFR opcode.  If StartOpCcodeHandle only contains one\r
-     IFR instruction, then the result of ths operation will delete all of the IFR\r
+     IFR instruction, then the result of this operation will delete all of the IFR\r
      opcodes between the start end matches.\r
 \r
   If HiiHandle is NULL, then ASSERT().\r
@@ -1397,12 +1017,12 @@ HiiCreateOrderedListOpCode (
   @param[in]  EndOpCodeHandle    An OpCcode Handle that contains the IFR opcode\r
                                  that marks the end of a replace operation in\r
                                  the form.  This is an optional parameter that\r
-                                 may be NULL.  If it is NULL, then an the IFR\r
+                                 may be NULL.  If it is NULL, then the IFR\r
                                  opcodes specified by StartOpCodeHandle are \r
                                  inserted into the form.\r
   \r
-  @retval EFI_OUT_OF_RESOURCES   No enough memory resource is allocated.\r
-  @retval EFI_NOT_FOUND          The following cases will return EFI_NOT_FOUND.\r
+  @retval EFI_OUT_OF_RESOURCES   Not enough memory resources are allocated.\r
+  @retval EFI_NOT_FOUND          The following cases will return EFI_NOT_FOUND:\r
                                  1) The form specified by HiiHandle, FormSetGuid, \r
                                  and FormId could not be found in the HII Database.\r
                                  2) No IFR opcodes in the target form match the first\r
@@ -1419,36 +1039,8 @@ HiiUpdateForm (
   IN EFI_HII_HANDLE  HiiHandle,\r
   IN EFI_GUID        *FormSetGuid,        OPTIONAL\r
   IN EFI_FORM_ID     FormId,\r
-  IN VOID            *StartOpcodeHandle,\r
-  IN VOID            *EndOpcodeHandle     OPTIONAL\r
-  );\r
-\r
-/**\r
-  Configure the buffer accrording to ConfigBody strings in the format of\r
-  <Length:4 bytes>, <Offset: 2 bytes>, <Width:2 bytes>, <Data:n bytes>.\r
-  This ConfigBody strings is generated by EDKII UEFI VfrCompiler for the default\r
-  values in a Form Set. The name of the ConfigBody strings is VfrMyIfrNVDataDefault0000\r
-  constructed following this rule: \r
-   "Vfr" + varstore.name + "Default" + defaultstore.attributes.\r
-  Check the generated C file in Output for details.\r
-\r
-  @param  Buffer                 the start address of buffer.\r
-  @param  BufferSize             the size of buffer.\r
-  @param  Number                 the number of the ConfigBody strings.\r
-  @param  ...                    the ConfigBody strings\r
-\r
-  @retval EFI_BUFFER_TOO_SMALL   the BufferSize is too small to operate.\r
-  @retval EFI_INVALID_PARAMETER  Buffer is NULL or BufferSize is 0.\r
-  @retval EFI_SUCCESS            Operation successful.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-IfrLibExtractDefault(\r
-  IN VOID                         *Buffer,\r
-  IN UINTN                        *BufferSize,\r
-  UINTN                           Number,\r
-  ...\r
+  IN VOID            *StartOpCodeHandle,\r
+  IN VOID            *EndOpCodeHandle     OPTIONAL\r
   );\r
 \r
 #endif\r