]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
1) Add type cast for better coding style.
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / EmuRuntimeDxe / Variable.h
index 3880ed55c975e9afb42f28bd47a970607d8bb569..81a45681a2316a130255f1d7473b55c78d79afe1 100644 (file)
@@ -3,8 +3,8 @@
   The internal header file includes the common header files, defines\r
   internal structure and functions used by EmuVariable module.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2011, 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
 http://opensource.org/licenses/bsd-license.php\r
@@ -31,10 +31,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/PcdLib.h>\r
-#include <VariableFormat.h>\r
+#include <Library/HobLib.h>\r
+#include <Guid/VariableFormat.h>\r
+#include <Guid/GlobalVariable.h>\r
+\r
+#include <Guid/EventGroup.h>\r
 \r
 #define GET_VARIABLE_NAME_PTR(a)  (CHAR16 *) ((UINTN) (a) + sizeof (VARIABLE_HEADER))\r
 \r
+///\r
+/// The size of a 3 character ISO639 language code.\r
+///\r
+#define ISO_639_2_ENTRY_SIZE    3\r
+\r
 typedef enum {\r
   Physical,\r
   Virtual\r
@@ -57,7 +66,12 @@ typedef struct {
   VARIABLE_GLOBAL VariableGlobal[2];\r
   UINTN           VolatileLastVariableOffset;\r
   UINTN           NonVolatileLastVariableOffset;\r
-  UINT32          FvbInstance;\r
+  UINTN           CommonVariableTotalSize;\r
+  UINTN           HwErrVariableTotalSize;\r
+  CHAR8           *PlatformLangCodes;\r
+  CHAR8           *LangCodes;\r
+  CHAR8           *PlatformLang;\r
+  CHAR8           Lang[ISO_639_2_ENTRY_SIZE + 1];\r
 } ESAL_VARIABLE_GLOBAL;\r
 \r
 ///\r
@@ -136,7 +150,6 @@ VariableClassAddressChangeEvent (
   @param  Data                   On input, the size in bytes of the return Data buffer.  \r
                                  On output, the size of data returned in Data.\r
   @param  Global                 Pointer to VARIABLE_GLOBAL structure\r
-  @param  Instance               Instance of the Firmware Volume.\r
 \r
   @retval EFI_SUCCESS            The function completed successfully. \r
   @retval EFI_NOT_FOUND          The variable was not found.\r
@@ -147,14 +160,13 @@ VariableClassAddressChangeEvent (
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-GetVariable (\r
+EmuGetVariable (\r
   IN      CHAR16            *VariableName,\r
-  IN      EFI_GUID          * VendorGuid,\r
+  IN      EFI_GUID          *VendorGuid,\r
   OUT     UINT32            *Attributes OPTIONAL,\r
   IN OUT  UINTN             *DataSize,\r
   OUT     VOID              *Data,\r
-  IN      VARIABLE_GLOBAL   * Global,\r
-  IN      UINT32            Instance\r
+  IN      VARIABLE_GLOBAL   *Global\r
   );\r
 \r
 /**\r
@@ -167,7 +179,6 @@ GetVariable (
   @param  VendorGuid             On input, supplies the last VendorGuid that was returned by GetNextVariableName().\r
                                  On output, returns the VendorGuid of the current variable.  \r
   @param  Global                 Pointer to VARIABLE_GLOBAL structure.\r
-  @param  Instance               Instance of the Firmware Volume.\r
 \r
   @retval EFI_SUCCESS            The function completed successfully. \r
   @retval EFI_NOT_FOUND          The next variable was not found.\r
@@ -178,12 +189,11 @@ GetVariable (
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-GetNextVariableName (\r
+EmuGetNextVariableName (\r
   IN OUT  UINTN             *VariableNameSize,\r
   IN OUT  CHAR16            *VariableName,\r
   IN OUT  EFI_GUID          *VendorGuid,\r
-  IN      VARIABLE_GLOBAL   *Global,\r
-  IN      UINT32            Instance\r
+  IN      VARIABLE_GLOBAL   *Global\r
   );\r
 \r
 /**\r
@@ -203,7 +213,6 @@ GetNextVariableName (
   @param  Global                 Pointer to VARIABLE_GLOBAL structure\r
   @param  VolatileOffset         The offset of last volatile variable\r
   @param  NonVolatileOffset      The offset of last non-volatile variable\r
-  @param  Instance               Instance of the Firmware Volume.\r
 \r
   @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as \r
                                  defined by the Attributes.\r
@@ -218,7 +227,7 @@ GetNextVariableName (
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-SetVariable (\r
+EmuSetVariable (\r
   IN CHAR16                  *VariableName,\r
   IN EFI_GUID                *VendorGuid,\r
   IN UINT32                  Attributes,\r
@@ -226,8 +235,7 @@ SetVariable (
   IN VOID                    *Data,\r
   IN VARIABLE_GLOBAL         *Global,\r
   IN UINTN                   *VolatileOffset,\r
-  IN UINTN                   *NonVolatileOffset,\r
-  IN UINT32                  Instance\r
+  IN UINTN                   *NonVolatileOffset\r
   );\r
 \r
 /**\r
@@ -243,7 +251,6 @@ SetVariable (
   @param  MaximumVariableSize          Returns the maximum size of an individual EFI variable \r
                                        associated with the attributes specified.\r
   @param  Global                       Pointer to VARIABLE_GLOBAL structure.\r
-  @param  Instance                     Instance of the Firmware Volume.\r
 \r
   @retval EFI_SUCCESS                  Valid answer returned.\r
   @retval EFI_INVALID_PARAMETER        An invalid combination of attribute bits was supplied\r
@@ -254,13 +261,12 @@ SetVariable (
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-QueryVariableInfo (\r
+EmuQueryVariableInfo (\r
   IN  UINT32                 Attributes,\r
   OUT UINT64                 *MaximumVariableStorageSize,\r
   OUT UINT64                 *RemainingVariableStorageSize,\r
   OUT UINT64                 *MaximumVariableSize,\r
-  IN  VARIABLE_GLOBAL        *Global,\r
-  IN  UINT32                 Instance\r
+  IN  VARIABLE_GLOBAL        *Global\r
   );\r
 \r
 #endif\r