summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-28 05:28:32 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-28 05:28:32 +0000
commitb8d6d5584f1691e66f7361a39724647ed4047912 (patch)
tree0688c81f04a1de0eee6c2b64fb33237b4ea6a73b /MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
parentfaa49b4f53708ccb85e8a7df20f760596cd1fce6 (diff)
downloadedk2-b8d6d5584f1691e66f7361a39724647ed4047912.tar.gz
edk2-b8d6d5584f1691e66f7361a39724647ed4047912.tar.bz2
edk2-b8d6d5584f1691e66f7361a39724647ed4047912.zip
sync patch r11075, r11087, r11088, r11091, r11092, r11119 from main trunk.UDK2008
Fix AutoUpdateLangVariable() logic to handle the case PlatformLang/Lang is set before PlatformLangCodes/LangCodes. Pre-allocate pool for runtime phase. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2008@13050 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h')
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
index cc5803dde9..c235679292 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
@@ -3,7 +3,7 @@
The internal header file includes the common header files, defines
internal structure and functions used by EmuVariable module.
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2012, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -38,6 +38,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define GET_VARIABLE_NAME_PTR(a) (CHAR16 *) ((UINTN) (a) + sizeof (VARIABLE_HEADER))
+///
+/// The size of a 3 character ISO639 language code.
+///
+#define ISO_639_2_ENTRY_SIZE 3
+
typedef enum {
Physical,
Virtual
@@ -62,10 +67,10 @@ typedef struct {
UINTN NonVolatileLastVariableOffset;
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.
+ CHAR8 *PlatformLangCodes;
+ CHAR8 *LangCodes;
+ CHAR8 *PlatformLang;
+ CHAR8 Lang[ISO_639_2_ENTRY_SIZE + 1];
} ESAL_VARIABLE_GLOBAL;
///