]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/FSVariable/FSVariable.h
ArmPkg/UncachedMemoryAllocationLib: restore mapping attributes after free
[mirror_edk2.git] / DuetPkg / FSVariable / FSVariable.h
index 2abec3eebaba7bc84a7c019f409d2b6f1cf9e180..cc39323e97d84ce5315a644a55b05b75f1b039df 100644 (file)
@@ -1,7 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Caution: This file is used for Duet platform only, do not use them in real platform.\r
+All variable code, variable metadata, and variable data used by Duet platform are on \r
+disk. They can be changed by user. BIOS is not able to protoect those.\r
+Duet trusts all meta data from disk. If variable code, variable metadata and variable\r
+data is modified in inproper way, the behavior is undefined.\r
+\r
+Copyright (c) 2006 - 2014, 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
@@ -28,6 +34,7 @@ Abstract:
 #include <Library/BaseLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiRuntimeLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -91,10 +98,10 @@ typedef struct {
   VOID               *Scratch;                      // Buffer used during reclaim\r
   UINTN              CommonVariableTotalSize;\r
   UINTN              HwErrVariableTotalSize;\r
-  CHAR8              PlatformLangCodes[256]; //Pre-allocate 256 bytes space to accommodate the PlatformlangCodes.\r
-  CHAR8              LangCodes[256];         //Pre-allocate 256 bytes space to accommodate the langCodes.\r
-  CHAR8              PlatformLang[8];        //Pre-allocate 8 bytes space to accommodate the Platformlang variable.\r
-  CHAR8              Lang[4];                //Pre-allocate 4 bytes space to accommodate the lang variable.\r
+  CHAR8              *PlatformLangCodes;\r
+  CHAR8              *LangCodes;\r
+  CHAR8              *PlatformLang;\r
+  CHAR8              Lang[ISO_639_2_ENTRY_SIZE + 1];\r
 } VARIABLE_GLOBAL;\r
 \r
 //\r
@@ -143,7 +150,6 @@ SetVariable (
   IN VOID                    *Data\r
   );\r
 \r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
 EFI_STATUS\r
 EFIAPI\r
 QueryVariableInfo (\r
@@ -152,6 +158,5 @@ QueryVariableInfo (
   OUT UINT64                 *RemainingVariableStorageSize,\r
   OUT UINT64                 *MaximumVariableSize\r
   );\r
-#endif // EFI_SPECIFICATION_VERSION >= 0x00020000\r
 \r
 #endif\r