]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
MdeModulePkg: Make HII configuration settings available to OS runtime
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / HiiDatabase.h
index 783fc7ecc132e3b9d31172be9960628c12142798..d90bc0290dba5d7e6077bffce09d41b9a5e77c23 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private structures definitions in HiiDatabase.\r
 \r
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -24,6 +24,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/HiiDatabase.h>\r
 #include <Protocol/HiiConfigRouting.h>\r
 #include <Protocol/HiiConfigAccess.h>\r
+#include <Protocol/HiiConfigKeyword.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 \r
 #include <Guid/HiiKeyBoardLayout.h>\r
@@ -65,8 +66,8 @@ typedef struct {
   LIST_ENTRY          Entry;             // Link to VarStorage\r
   EFI_GUID            Guid;\r
   CHAR16              *Name;\r
-  EFI_VARSTORE_ID     VarStoreId;\r
   UINT16              Size;\r
+  UINT8               Type;\r
   LIST_ENTRY          BlockEntry;        // Link to its Block array\r
 } IFR_VARSTORAGE_DATA;\r
 \r
@@ -78,21 +79,48 @@ typedef struct {
   UINT8               OpCode;\r
   UINT8               Scope;\r
   LIST_ENTRY          DefaultValueEntry; // Link to its default value array\r
+  CHAR16              *Name;\r
 } IFR_BLOCK_DATA;\r
 \r
+//\r
+// Get default value from IFR data.\r
+//\r
+typedef enum {\r
+  DefaultValueFromDefault = 0,     // Get from the minimum or first one when not set default value.\r
+  DefaultValueFromFlag,            // Get default value from the defalut flag.\r
+  DefaultValueFromOpcode           // Get default value from default opcode, highest priority.\r
+} DEFAULT_VALUE_TYPE;\r
+\r
 typedef struct {\r
   LIST_ENTRY          Entry;\r
-  UINT8               OpCode;\r
+  DEFAULT_VALUE_TYPE  Type;\r
+  BOOLEAN             Cleaned;       // Whether this value is cleaned\r
+                                     // TRUE  Cleaned, the value can't be used\r
+                                     // FALSE Not cleaned, the value can  be used.\r
   UINT16              DefaultId;\r
-  UINT64              Value;\r
+  EFI_IFR_TYPE_VALUE  Value;\r
 } IFR_DEFAULT_DATA;\r
 \r
 //\r
 // Storage types\r
 //\r
-#define EFI_HII_VARSTORE_BUFFER            0\r
-#define EFI_HII_VARSTORE_NAME_VALUE        1\r
-#define EFI_HII_VARSTORE_EFI_VARIABLE      2\r
+#define EFI_HII_VARSTORE_BUFFER              0\r
+#define EFI_HII_VARSTORE_NAME_VALUE          1\r
+#define EFI_HII_VARSTORE_EFI_VARIABLE        2\r
+#define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3\r
+\r
+//\r
+// Keyword handler protocol filter type.\r
+//\r
+#define EFI_KEYWORD_FILTER_READONY           0x01\r
+#define EFI_KEYWORD_FILTER_REAWRITE          0x02\r
+#define EFI_KEYWORD_FILTER_BUFFER            0x10\r
+#define EFI_KEYWORD_FILTER_NUMERIC           0x20\r
+#define EFI_KEYWORD_FILTER_NUMERIC_1         0x30\r
+#define EFI_KEYWORD_FILTER_NUMERIC_2         0x40\r
+#define EFI_KEYWORD_FILTER_NUMERIC_4         0x50\r
+#define EFI_KEYWORD_FILTER_NUMERIC_8         0x60\r
+\r
 \r
 #define HII_FORMSET_STORAGE_SIGNATURE           SIGNATURE_32 ('H', 'S', 'T', 'G')\r
 typedef struct {\r
@@ -274,6 +302,7 @@ typedef struct _HII_DATABASE_PRIVATE_DATA {
   EFI_HII_STRING_PROTOCOL               HiiString;\r
   EFI_HII_DATABASE_PROTOCOL             HiiDatabase;\r
   EFI_HII_CONFIG_ROUTING_PROTOCOL       ConfigRouting;\r
+  EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL   ConfigKeywordHandler;\r
   LIST_ENTRY                            HiiHandleList;\r
   INTN                                  HiiHandleCount;\r
   LIST_ENTRY                            FontInfoList;  // global font info list\r
@@ -317,10 +346,48 @@ typedef struct _HII_DATABASE_PRIVATE_DATA {
       HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r
       )\r
 \r
+#define CONFIG_KEYWORD_HANDLER_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r
+  CR (a, \\r
+      HII_DATABASE_PRIVATE_DATA, \\r
+      ConfigKeywordHandler, \\r
+      HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r
+      )\r
+\r
 //\r
 // Internal function prototypes.\r
 //\r
 \r
+/**\r
+  Generate a sub string then output it.\r
+\r
+  This is a internal function.\r
+\r
+  @param  String                 A constant string which is the prefix of the to be\r
+                                 generated string, e.g. GUID=\r
+\r
+  @param  BufferLen              The length of the Buffer in bytes.\r
+\r
+  @param  Buffer                 Points to a buffer which will be converted to be the \r
+                                 content of the generated string.\r
+\r
+  @param  Flag                   If 1, the buffer contains data for the value of GUID or PATH stored in \r
+                                 UINT8 *; if 2, the buffer contains unicode string for the value of NAME;\r
+                                 if 3, the buffer contains other data.\r
+\r
+  @param  SubStr                 Points to the output string. It's caller's\r
+                                 responsibility to free this buffer.\r
+\r
+\r
+**/\r
+VOID\r
+GenerateSubStr (\r
+  IN CONST EFI_STRING              String,\r
+  IN  UINTN                        BufferLen,\r
+  IN  VOID                         *Buffer,\r
+  IN  UINT8                        Flag,\r
+  OUT EFI_STRING                   *SubStr\r
+  );\r
+\r
 /**\r
   This function checks whether a handle is a valid EFI_HII_HANDLE.\r
 \r
@@ -710,13 +777,15 @@ HiiGetGlyph (
                                   with the  first font. On return, points to the\r
                                   returned font handle or points to NULL if there\r
                                   are no more matching fonts.\r
-  @param  StringInfoIn            Upon entry, points to the font to return\r
-                                  information about. If NULL, then the information about the system default \r
-                                  font will be returned.\r
-  @param  StringInfoOut           Upon return, contains the matching font's\r
-                                  information.  If NULL, then no information is\r
-                                  returned. It's caller's responsibility to free\r
-                                  this buffer.\r
+  @param  StringInfoIn            Upon entry, points to the font to return information\r
+                                  about. If NULL, then the information about the system\r
+                                  default font will be returned.\r
+  @param  StringInfoOut           Upon return, contains the matching font's information.\r
+                                  If NULL, then no information is returned. This buffer\r
+                                  is allocated with a call to the Boot Service AllocatePool().\r
+                                  It is the caller's responsibility to call the Boot \r
+                                  Service FreePool() when the caller no longer requires\r
+                                  the contents of StringInfoOut.\r
   @param  String                  Points to the string which will be tested to\r
                                   determine  if all characters are available. If\r
                                   NULL, then any font  is acceptable.\r
@@ -724,7 +793,7 @@ HiiGetGlyph (
   @retval EFI_SUCCESS             Matching font returned successfully.\r
   @retval EFI_NOT_FOUND           No matching font was found.\r
   @retval EFI_INVALID_PARAMETER   StringInfoIn is NULL.\r
-  @retval EFI_INVALID_PARAMETER  StringInfoIn->FontInfoMask is an invalid combination.\r
+  @retval EFI_INVALID_PARAMETER   StringInfoIn->FontInfoMask is an invalid combination.\r
   @retval EFI_OUT_OF_RESOURCES    There were insufficient resources to complete the\r
                                   request.\r
 **/\r
@@ -989,13 +1058,14 @@ HiiNewString (
   @retval EFI_SUCCESS             The string was returned successfully.\r
   @retval EFI_NOT_FOUND           The string specified by StringId is not\r
                                   available.\r
-  @retval EFI_NOT_FOUND           The string specified by StringId is available but\r
-                                                not in the specified language.\r
-                                                The specified PackageList is not in the database.\r
-  @retval EFI_INVALID_LANGUAGE   - The string specified by StringId is available but\r
+                                  The specified PackageList is not in the database.\r
+  @retval EFI_INVALID_LANGUAGE    The string specified by StringId is available but\r
+                                  not in the specified language.\r
   @retval EFI_BUFFER_TOO_SMALL    The buffer specified by StringSize is too small\r
                                   to  hold the string.\r
-  @retval EFI_INVALID_PARAMETER   The String or Language or StringSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   The Language or StringSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   The value referenced by StringSize was not zero\r
+                                  and String was NULL.\r
   @retval EFI_OUT_OF_RESOURCES    There were insufficient resources to complete the\r
                                    request.\r
 \r
@@ -1061,7 +1131,8 @@ HiiSetString (
                                   points to the length of Languages, in bytes.\r
 \r
   @retval EFI_SUCCESS             The languages were returned successfully.\r
-  @retval EFI_INVALID_PARAMETER   The Languages or LanguagesSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   The LanguagesSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   The value referenced by LanguagesSize is not zero and Languages is NULL.\r
   @retval EFI_BUFFER_TOO_SMALL    The LanguagesSize is too small to hold the list\r
                                   of  supported languages. LanguageSize is updated\r
                                   to contain the required size.\r
@@ -1102,15 +1173,16 @@ HiiGetLanguages (
                                   in bytes.\r
 \r
   @retval EFI_SUCCESS             Secondary languages were correctly returned.\r
-  @retval EFI_INVALID_PARAMETER   PrimaryLanguage or SecondaryLanguages or\r
-                                  SecondaryLanguagesSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   PrimaryLanguage or SecondaryLanguagesSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   The value referenced by SecondaryLanguagesSize is not\r
+                                  zero and SecondaryLanguages is NULL.\r
   @retval EFI_BUFFER_TOO_SMALL    The buffer specified by SecondaryLanguagesSize is\r
                                   too small to hold the returned information.\r
                                   SecondaryLanguageSize is updated to hold the size of\r
                                   the buffer required.\r
   @retval EFI_INVALID_LANGUAGE    The language specified by PrimaryLanguage is not\r
                                   present in the specified package list.\r
-  @retval EFI_NOT_FOUND          The specified PackageList is not in the Database.                                \r
+  @retval EFI_NOT_FOUND           The specified PackageList is not in the Database.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1229,18 +1301,19 @@ HiiUpdatePackageList (
   @param  Handle                  An array of EFI_HII_HANDLE instances returned.\r
 \r
   @retval EFI_SUCCESS             The matching handles are outputed successfully.\r
-                                                HandleBufferLength is updated with the actual length.\r
+                                  HandleBufferLength is updated with the actual length.\r
   @retval EFI_BUFFER_TO_SMALL     The HandleBufferLength parameter indicates that\r
                                   Handle is too small to support the number of\r
                                   handles. HandleBufferLength is updated with a\r
                                   value that will  enable the data to fit.\r
   @retval EFI_NOT_FOUND           No matching handle could not be found in\r
                                   database.\r
-  @retval EFI_INVALID_PARAMETER   Handle or HandleBufferLength was NULL.\r
-  @retval EFI_INVALID_PARAMETER  PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but\r
-                         PackageGuid is not NULL, PackageType is a EFI_HII_\r
-                         PACKAGE_TYPE_GUID but PackageGuid is NULL.\r
-  \r
+  @retval EFI_INVALID_PARAMETER   HandleBufferLength was NULL.\r
+  @retval EFI_INVALID_PARAMETER   The value referenced by HandleBufferLength was not\r
+                                  zero and Handle was NULL.\r
+  @retval EFI_INVALID_PARAMETER   PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but\r
+                                  PackageGuid is not NULL, PackageType is a EFI_HII_\r
+                                  PACKAGE_TYPE_GUID but PackageGuid is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1278,7 +1351,9 @@ HiiListPackageLists (
                                   a value that will enable the data to fit.\r
   @retval EFI_NOT_FOUND           The specifiecd Handle could not be found in the\r
                                   current database.\r
-  @retval EFI_INVALID_PARAMETER   Handle or Buffer or BufferSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   BufferSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   The value referenced by BufferSize was not zero \r
+                                  and Buffer was NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1378,8 +1453,9 @@ HiiUnregisterPackageNotify (
                                   number of GUIDs. KeyGuidBufferLength is\r
                                   updated with a value that will enable the data to\r
                                   fit.\r
-  @retval EFI_INVALID_PARAMETER   The KeyGuidBuffer or KeyGuidBufferLength was\r
-                                  NULL.\r
+  @retval EFI_INVALID_PARAMETER   The KeyGuidBufferLength is NULL.\r
+  @retval EFI_INVALID_PARAMETER   The value referenced by KeyGuidBufferLength is not\r
+                                  zero and KeyGuidBuffer is NULL.\r
   @retval EFI_NOT_FOUND           There was no keyboard layout.\r
 \r
 **/\r
@@ -1534,9 +1610,9 @@ HiiConfigRoutingExtractConfig (
                                   instance.\r
   @param  Results                 Null-terminated Unicode string in\r
                                   <MultiConfigAltResp> format which has all values\r
-                                  filled in for the names in the Request string.\r
-                                  String to be allocated by the  called function.\r
-                                  De-allocation is up to the caller.\r
+                                  filled in for the entirety of the current HII \r
+                                  database. String to be allocated by the  called \r
+                                  function. De-allocation is up to the caller.\r
 \r
   @retval EFI_SUCCESS             The Results string is filled with the values\r
                                   corresponding to all requested names.\r
@@ -1659,8 +1735,9 @@ HiiBlockToConfig (
                                   (see below)  is returned.\r
   @param  BlockSize               The length of the Block in units of UINT8.  On\r
                                   input, this is the size of the Block. On output,\r
-                                  if successful, contains the index of the  last\r
-                                  modified byte in the Block.\r
+                                  if successful, contains the largest index of the\r
+                                  modified byte in the Block, or the required buffer\r
+                                  size if the Block is not large enough.\r
   @param  Progress                On return, points to an element of the ConfigResp\r
                                    string filled in with the offset of the most\r
                                   recent '&' before the first failing name / value\r
@@ -1685,6 +1762,8 @@ HiiBlockToConfig (
                                   value pair. Block is left updated and\r
                                   Progress points at the '&' preceding the first\r
                                   non-<BlockName>.\r
+  @retval EFI_BUFFER_TOO_SMALL    Block not large enough. Progress undefined. \r
+                                  BlockSize is updated with the required buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1750,6 +1829,153 @@ HiiGetAltCfg (
   OUT EFI_STRING                               *AltCfgResp\r
   );\r
 \r
+/**\r
+\r
+  This function accepts a <MultiKeywordResp> formatted string, finds the associated\r
+  keyword owners, creates a <MultiConfigResp> string from it and forwards it to the\r
+  EFI_HII_ROUTING_PROTOCOL.RouteConfig function.\r
+  \r
+  If there is an issue in resolving the contents of the KeywordString, then the \r
+  function returns an error and also sets the Progress and ProgressErr with the \r
+  appropriate information about where the issue occurred and additional data about\r
+  the nature of the issue. \r
+  \r
+  In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND\r
+  error is generated during processing the second or later keyword element, the system\r
+  storage associated with earlier keywords is not modified. All elements of the \r
+  KeywordString must successfully pass all tests for format and access prior to making\r
+  any modifications to storage.\r
+  \r
+  In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString\r
+  containing multiple keywords, the state of storage associated with earlier keywords\r
+  is undefined.\r
+\r
+\r
+  @param This             Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.\r
+\r
+  @param KeywordString    A null-terminated string in <MultiKeywordResp> format. \r
+\r
+  @param Progress         On return, points to a character in the KeywordString. \r
+                          Points to the string's NULL terminator if the request \r
+                          was successful. Points to the most recent '&' before \r
+                          the first failing name / value pair (or the beginning\r
+                          of the string if the failure is in the first name / value\r
+                          pair) if the request was not successful.\r
+\r
+  @param ProgressErr      If during the processing of the KeywordString there was\r
+                          a failure, this parameter gives additional information \r
+                          about the possible source of the problem. The various \r
+                          errors are defined in "Related Definitions" below.\r
+\r
+\r
+  @retval EFI_SUCCESS             The specified action was completed successfully.\r
+\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following are TRUE:\r
+                                  1. KeywordString is NULL.\r
+                                  2. Parsing of the KeywordString resulted in an \r
+                                     error. See Progress and ProgressErr for more data.\r
+\r
+  @retval EFI_NOT_FOUND           An element of the KeywordString was not found. \r
+                                  See ProgressErr for more data.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.  \r
+                                  See ProgressErr for more data.\r
+                                  \r
+  @retval EFI_ACCESS_DENIED       The action violated system policy. See ProgressErr \r
+                                  for more data.\r
+\r
+  @retval EFI_DEVICE_ERROR        An unexpected system error occurred. See ProgressErr\r
+                                  for more data.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI \r
+EfiConfigKeywordHandlerSetData (\r
+  IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,\r
+  IN CONST EFI_STRING                    KeywordString,\r
+  OUT EFI_STRING                         *Progress,\r
+  OUT UINT32                             *ProgressErr\r
+  );\r
+\r
+/**\r
+\r
+  This function accepts a <MultiKeywordRequest> formatted string, finds the underlying \r
+  keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the\r
+  EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.\r
+  \r
+  If there is an issue in resolving the contents of the KeywordString, then the function\r
+  returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the\r
+  appropriate information about where the issue occurred and additional data about the\r
+  nature of the issue.\r
+  \r
+  In the case when KeywordString is NULL, or contains multiple keywords, or when\r
+  EFI_NOT_FOUND is generated while processing the keyword elements, the Results string\r
+  contains values returned for all keywords processed prior to the keyword generating the \r
+  error but no values for the keyword with error or any following keywords.\r
+\r
+  \r
+  @param This           Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.\r
+  \r
+  @param NameSpaceId    A null-terminated string containing the platform configuration\r
+                        language to search through in the system. If a NULL is passed\r
+                        in, then it is assumed that any platform configuration language\r
+                        with the prefix of "x-UEFI-" are searched.\r
+                        \r
+  @param KeywordString  A null-terminated string in <MultiKeywordRequest> format. If a\r
+                        NULL is passed in the KeywordString field, all of the known \r
+                        keywords in the system for the NameSpaceId specified are \r
+                        returned in the Results field.\r
+  \r
+  @param Progress       On return, points to a character in the KeywordString. Points\r
+                        to the string's NULL terminator if the request was successful. \r
+                        Points to the most recent '&' before the first failing name / value\r
+                        pair (or the beginning of the string if the failure is in the first\r
+                        name / value pair) if the request was not successful.\r
+                        \r
+  @param ProgressErr    If during the processing of the KeywordString there was a\r
+                        failure, this parameter gives additional information about the \r
+                        possible source of the problem. See the definitions in SetData()\r
+                        for valid value definitions.\r
+  \r
+  @param Results        A null-terminated string in <MultiKeywordResp> format is returned\r
+                        which has all the values filled in for the keywords in the \r
+                        KeywordString. This is a callee-allocated field, and must be freed\r
+                        by the caller after being used. \r
+\r
+  @retval EFI_SUCCESS             The specified action was completed successfully.\r
+  \r
+  @retval EFI_INVALID_PARAMETER   One or more of the following are TRUE:\r
+                                  1.Progress, ProgressErr, or Resuts is NULL.\r
+                                  2.Parsing of the KeywordString resulted in an error. See\r
+                                    Progress and ProgressErr for more data.\r
+  \r
+\r
+  @retval EFI_NOT_FOUND           An element of the KeywordString was not found. See\r
+                                  ProgressErr for more data.\r
+\r
+  @retval EFI_NOT_FOUND           The NamespaceId specified was not found.  See ProgressErr\r
+                                  for more data.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.  See\r
+                                  ProgressErr for more data.\r
+                                  \r
+  @retval EFI_ACCESS_DENIED       The action violated system policy.  See ProgressErr for\r
+                                  more data.\r
+\r
+  @retval EFI_DEVICE_ERROR        An unexpected system error occurred.  See ProgressErr\r
+                                  for more data.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI \r
+EfiConfigKeywordHandlerGetData (\r
+  IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL  *This,\r
+  IN CONST EFI_STRING                     NameSpaceId, OPTIONAL\r
+  IN CONST EFI_STRING                     KeywordString, OPTIONAL\r
+  OUT EFI_STRING                          *Progress, \r
+  OUT UINT32                              *ProgressErr,\r
+  OUT EFI_STRING                          *Results\r
+  );\r
 \r
 /**\r
   Compare whether two names of languages are identical.\r
@@ -1768,8 +1994,61 @@ HiiCompareLanguage (
   )\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
+  If HiiHandle is NULL, then ASSERT().\r
+\r
+  @param[in]  HiiHandle  A handle that was previously registered 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
+\r
+**/\r
+CHAR8 *\r
+GetSupportedLanguages (\r
+  IN EFI_HII_HANDLE           HiiHandle\r
+  );\r
+\r
+/**\r
+This function mainly use to get HiiDatabase information.\r
+\r
+@param  This                   A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r
+\r
+@retval EFI_SUCCESS            Get the information successfully.\r
+@retval EFI_OUT_OF_RESOURCES   Not enough memory to store the Hiidatabase data.\r
+\r
+**/\r
+EFI_STATUS\r
+HiiGetDatabaseInfo(\r
+  IN CONST EFI_HII_DATABASE_PROTOCOL        *This\r
+  );\r
+\r
+/**\r
+This is an internal function,mainly use to get and update configuration settings information.\r
+\r
+@param  This                   A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r
+\r
+@retval EFI_SUCCESS            Get the information successfully.\r
+@retval EFI_OUT_OF_RESOURCES   Not enough memory to store the Configuration Setting data.\r
+\r
+**/\r
+EFI_STATUS\r
+HiiGetConfigurationSetting(\r
+  IN CONST EFI_HII_DATABASE_PROTOCOL        *This\r
+  );\r
+\r
 //\r
 // Global variables\r
 //\r
 extern EFI_EVENT gHiiKeyboardLayoutChanged;\r
+extern BOOLEAN   gExportAfterReadyToBoot;\r
+\r
 #endif\r