summaryrefslogtreecommitdiff
path: root/DuetPkg/FSVariable/FSVariable.h
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-29 02:42:01 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-29 02:42:01 +0000
commita24b4043cdea93ada372dacfb18ebd4c7e4ba7f1 (patch)
tree5a1ee3a7adf34e642c12cbac8da302a8b3599eb5 /DuetPkg/FSVariable/FSVariable.h
parentb4ab47ec81525af3dbdbece561b2db431ddf3e40 (diff)
downloadedk2-platforms-a24b4043cdea93ada372dacfb18ebd4c7e4ba7f1.tar.xz
improve platformlangcodes/langcodes and platformlang/lang autoupdate mechanism.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8197 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/FSVariable/FSVariable.h')
-rw-r--r--DuetPkg/FSVariable/FSVariable.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/DuetPkg/FSVariable/FSVariable.h b/DuetPkg/FSVariable/FSVariable.h
index 5ecba32c4f..2abec3eeba 100644
--- a/DuetPkg/FSVariable/FSVariable.h
+++ b/DuetPkg/FSVariable/FSVariable.h
@@ -39,7 +39,7 @@ Abstract:
#include <Guid/HobList.h>
#include <Guid/FlashMapHob.h>
#include <Guid/VariableFormat.h>
-
+#include <Guid/GlobalVariable.h>
#include <Protocol/Variable.h>
#include <Protocol/VariableWrite.h>
#include <Protocol/SimpleFileSystem.h>
@@ -49,9 +49,13 @@ Abstract:
#include "EfiFlashMap.h"
#include "VariableStorage.h"
-#define VOLATILE_VARIABLE_STORE_SIZE (64 * 1024)
-#define VARIABLE_SCRATCH_SIZE (4 * 1024)
+#define VOLATILE_VARIABLE_STORE_SIZE FixedPcdGet32(PcdVariableStoreSize)
+#define VARIABLE_SCRATCH_SIZE MAX(FixedPcdGet32(PcdMaxVariableSize), FixedPcdGet32(PcdMaxHardwareErrorVariableSize))
#define VARIABLE_RECLAIM_THRESHOLD (1024)
+///
+/// The size of a 3 character ISO639 language code.
+///
+#define ISO_639_2_ENTRY_SIZE 3
#define GET_VARIABLE_NAME_PTR(a) (CHAR16 *) ((UINTN) (a) + sizeof (VARIABLE_HEADER))
@@ -85,6 +89,12 @@ typedef struct {
VOID *VariableBase[MaxType]; // Start address of variable storage
UINTN LastVariableOffset[MaxType]; // The position to write new variable to (index from VariableBase)
VOID *Scratch; // Buffer used during reclaim
+ UINTN CommonVariableTotalSize;
+ UINTN HwErrVariableTotalSize;
+ CHAR8 PlatformLangCodes[256]; //Pre-allocate 256 bytes space to accommodate the PlatformlangCodes.
+ CHAR8 LangCodes[256]; //Pre-allocate 256 bytes space to accommodate the langCodes.
+ CHAR8 PlatformLang[8]; //Pre-allocate 8 bytes space to accommodate the Platformlang variable.
+ CHAR8 Lang[4]; //Pre-allocate 4 bytes space to accommodate the lang variable.
} VARIABLE_GLOBAL;
//