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
This commit is contained in:
eric_tian 2009-04-29 02:42:01 +00:00
parent b4ab47ec81
commit a24b4043cd
3 changed files with 663 additions and 255 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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;
//

View File

@ -58,7 +58,7 @@
gEfiHobListGuid
gEfiFlashMapHobGuid
gEfiVariableGuid
gEfiGlobalVariableGuid ## PRODUCES ## Variable Guid
[Protocols]
gEfiVariableArchProtocolGuid
gEfiVariableWriteArchProtocolGuid
@ -68,6 +68,7 @@
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize
gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize
[Depex]
TRUE