]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
MdeModulePkg HiiDataBase: Enable Firmware to retrieve the default setting
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / HiiDatabase.h
index ee4936466adf5aaa9c28120c8149d801b1e3b522..8336dd0f4fed7c9eece1908829adb98202cafb6a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private structures definitions in HiiDatabase.\r
 \r
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2017, 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
@@ -31,7 +31,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Guid/HiiKeyBoardLayout.h>\r
 #include <Guid/GlobalVariable.h>\r
-\r
+#include <Guid/MdeModuleHii.h>\r
+#include <Guid/VariableFormat.h>\r
+#include <Guid/PcdDataBaseSignatureGuid.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
@@ -64,6 +66,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.\r
 \r
+typedef struct {\r
+  LIST_ENTRY            Entry;             // Link to VarStorage Default Data\r
+  UINT16                DefaultId;\r
+  VARIABLE_STORE_HEADER *VariableStorage;\r
+} VARSTORAGE_DEFAULT_DATA;\r
+\r
 typedef struct {\r
   LIST_ENTRY          Entry;             // Link to VarStorage\r
   EFI_GUID            Guid;\r
@@ -77,11 +85,14 @@ typedef struct {
   LIST_ENTRY          Entry;             // Link to Block array\r
   UINT16              Offset;\r
   UINT16              Width;\r
+  UINT16              BitOffset;\r
+  UINT16              BitWidth;\r
   EFI_QUESTION_ID     QuestionId;\r
   UINT8               OpCode;\r
   UINT8               Scope;\r
   LIST_ENTRY          DefaultValueEntry; // Link to its default value array\r
   CHAR16              *Name;\r
+  BOOLEAN             IsBitVar;\r
 } IFR_BLOCK_DATA;\r
 \r
 //\r
@@ -91,7 +102,7 @@ typedef enum {
   DefaultValueFromDefault = 0,     // Get from the minimum or first one when not set default value.\r
   DefaultValueFromOtherDefault,    // Get default vale from other default when no default(When other\r
                                    // defaults are more than one, use the default with smallest default id).\r
-  DefaultValueFromFlag,            // Get default value from the defalut flag.\r
+  DefaultValueFromFlag,            // Get default value from the default flag.\r
   DefaultValueFromOpcode           // Get default value from default opcode, highest priority.\r
 } DEFAULT_VALUE_TYPE;\r
 \r
@@ -230,7 +241,7 @@ typedef struct _HII_IMAGE_PACKAGE_INSTANCE {
 } HII_IMAGE_PACKAGE_INSTANCE;\r
 \r
 //\r
-// Keyboard Layout Pacakge definitions\r
+// Keyboard Layout Package definitions\r
 //\r
 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')\r
 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE {\r
@@ -430,7 +441,7 @@ IsHiiHandleValid (
   @param  FontHandle              On entry, Points to the font handle returned by a\r
                                   previous  call to GetFontInfo() or NULL to start\r
                                   with the first font.\r
-  @param  GlobalFontInfo          If not NULL, output the corresponding globa font\r
+  @param  GlobalFontInfo          If not NULL, output the corresponding global font\r
                                   info.\r
 \r
   @retval TRUE                    Existed\r
@@ -542,7 +553,7 @@ FindStringBlock (
   @param  CharValue               Unicode character value, which identifies a glyph\r
                                   block.\r
   @param  GlyphBuffer             Output the corresponding bitmap data of the found\r
-                                  block. It is the caller's responsiblity to free\r
+                                  block. It is the caller's responsibility to free\r
                                   this buffer.\r
   @param  Cell                    Output cell information of the encoded bitmap.\r
   @param  GlyphBufferLen          If not NULL, output the length of GlyphBuffer.\r
@@ -1591,7 +1602,7 @@ HiiUpdatePackageList (
                                   buffer that is required for the handles found.\r
   @param  Handle                  An array of EFI_HII_HANDLE instances returned.\r
 \r
-  @retval EFI_SUCCESS             The matching handles are outputed successfully.\r
+  @retval EFI_SUCCESS             The matching handles are outputted successfully.\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
@@ -1640,7 +1651,7 @@ HiiListPackageLists (
                                   Handle is too small to support the number of\r
                                   handles.      HandleBufferLength is updated with\r
                                   a value that will enable the data to fit.\r
-  @retval EFI_NOT_FOUND           The specifiecd Handle could not be found in the\r
+  @retval EFI_NOT_FOUND           The specified Handle could not be found in the\r
                                   current database.\r
   @retval EFI_INVALID_PARAMETER   BufferSize was NULL.\r
   @retval EFI_INVALID_PARAMETER   The value referenced by BufferSize was not zero \r
@@ -2236,7 +2247,7 @@ EfiConfigKeywordHandlerSetData (
   @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
+                                  1.Progress, ProgressErr, or Results is NULL.\r
                                   2.Parsing of the KeywordString resulted in an error. See\r
                                     Progress and ProgressErr for more data.\r
   \r
@@ -2286,7 +2297,7 @@ HiiCompareLanguage (
 ;\r
 \r
 /**\r
-  Retrieves a pointer to the a Null-terminated ASCII string containing the list \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
@@ -2297,9 +2308,9 @@ HiiCompareLanguage (
   @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
+  @retval NULL   There are not enough resources available to retrieve the supported\r
                  languages.\r
-  @retval NULL   The list of suported languages could not be retrieved.\r
+  @retval NULL   The list of supported languages could not be retrieved.\r
   @retval Other  A pointer to the Null-terminated ASCII string of supported languages.\r
 \r
 **/\r