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/trunk/edk2@11088 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu
2010-11-24 03:23:30 +00:00
parent 1623ce4aad
commit d7f791184b
3 changed files with 313 additions and 91 deletions

View File

@@ -28,6 +28,7 @@ Abstract:
#include <Library/BaseLib.h>
#include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeLib.h>
#include <Library/DebugLib.h>
@@ -91,10 +92,10 @@ typedef struct {
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.
CHAR8 *PlatformLangCodes;
CHAR8 *LangCodes;
CHAR8 *PlatformLang;
CHAR8 Lang[ISO_639_2_ENTRY_SIZE + 1];
} VARIABLE_GLOBAL;
//