]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/FSVariable/FSVariable.h
1. update bat file to generate right bootia32.efi/bootx64.efi file according to comma...
[mirror_edk2.git] / DuetPkg / FSVariable / FSVariable.h
index 9fdd0a77fdb889414d85b98c4b3250ff70f82c3a..2abec3eebaba7bc84a7c019f409d2b6f1cf9e180 100644 (file)
@@ -38,7 +38,8 @@ Abstract:
 \r
 #include <Guid/HobList.h>\r
 #include <Guid/FlashMapHob.h>\r
-\r
+#include <Guid/VariableFormat.h>\r
+#include <Guid/GlobalVariable.h>\r
 #include <Protocol/Variable.h>\r
 #include <Protocol/VariableWrite.h>\r
 #include <Protocol/SimpleFileSystem.h>\r
@@ -46,12 +47,15 @@ Abstract:
 \r
 \r
 #include "EfiFlashMap.h"\r
-#include "VariableFormat.h"\r
 #include "VariableStorage.h"\r
 \r
-#define VOLATILE_VARIABLE_STORE_SIZE  (64 * 1024)\r
-#define VARIABLE_SCRATCH_SIZE         (4 * 1024)\r
+#define VOLATILE_VARIABLE_STORE_SIZE  FixedPcdGet32(PcdVariableStoreSize)\r
+#define VARIABLE_SCRATCH_SIZE         MAX(FixedPcdGet32(PcdMaxVariableSize), FixedPcdGet32(PcdMaxHardwareErrorVariableSize))\r
 #define VARIABLE_RECLAIM_THRESHOLD    (1024)\r
+///\r
+/// The size of a 3 character ISO639 language code.\r
+///\r
+#define ISO_639_2_ENTRY_SIZE    3\r
 \r
 #define GET_VARIABLE_NAME_PTR(a)  (CHAR16 *) ((UINTN) (a) + sizeof (VARIABLE_HEADER))\r
 \r
@@ -85,6 +89,12 @@ typedef struct {
   VOID               *VariableBase[MaxType];        // Start address of variable storage\r
   UINTN              LastVariableOffset[MaxType];   // The position to write new variable to (index from VariableBase)\r
   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
 } VARIABLE_GLOBAL;\r
 \r
 //\r
@@ -107,7 +117,7 @@ VariableClassAddressChangeEvent (
 \r
 EFI_STATUS\r
 EFIAPI\r
-GetVariable (\r
+DuetGetVariable (\r
   IN      CHAR16            *VariableName,\r
   IN      EFI_GUID          *VendorGuid,\r
   OUT     UINT32            *Attributes OPTIONAL,\r