mirror of https://github.com/acidanthera/audk.git
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:
parent
b4ab47ec81
commit
a24b4043cd
File diff suppressed because it is too large
Load Diff
|
@ -39,7 +39,7 @@ Abstract:
|
||||||
#include <Guid/HobList.h>
|
#include <Guid/HobList.h>
|
||||||
#include <Guid/FlashMapHob.h>
|
#include <Guid/FlashMapHob.h>
|
||||||
#include <Guid/VariableFormat.h>
|
#include <Guid/VariableFormat.h>
|
||||||
|
#include <Guid/GlobalVariable.h>
|
||||||
#include <Protocol/Variable.h>
|
#include <Protocol/Variable.h>
|
||||||
#include <Protocol/VariableWrite.h>
|
#include <Protocol/VariableWrite.h>
|
||||||
#include <Protocol/SimpleFileSystem.h>
|
#include <Protocol/SimpleFileSystem.h>
|
||||||
|
@ -49,9 +49,13 @@ Abstract:
|
||||||
#include "EfiFlashMap.h"
|
#include "EfiFlashMap.h"
|
||||||
#include "VariableStorage.h"
|
#include "VariableStorage.h"
|
||||||
|
|
||||||
#define VOLATILE_VARIABLE_STORE_SIZE (64 * 1024)
|
#define VOLATILE_VARIABLE_STORE_SIZE FixedPcdGet32(PcdVariableStoreSize)
|
||||||
#define VARIABLE_SCRATCH_SIZE (4 * 1024)
|
#define VARIABLE_SCRATCH_SIZE MAX(FixedPcdGet32(PcdMaxVariableSize), FixedPcdGet32(PcdMaxHardwareErrorVariableSize))
|
||||||
#define VARIABLE_RECLAIM_THRESHOLD (1024)
|
#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))
|
#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
|
VOID *VariableBase[MaxType]; // Start address of variable storage
|
||||||
UINTN LastVariableOffset[MaxType]; // The position to write new variable to (index from VariableBase)
|
UINTN LastVariableOffset[MaxType]; // The position to write new variable to (index from VariableBase)
|
||||||
VOID *Scratch; // Buffer used during reclaim
|
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;
|
} VARIABLE_GLOBAL;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
gEfiHobListGuid
|
gEfiHobListGuid
|
||||||
gEfiFlashMapHobGuid
|
gEfiFlashMapHobGuid
|
||||||
gEfiVariableGuid
|
gEfiVariableGuid
|
||||||
|
gEfiGlobalVariableGuid ## PRODUCES ## Variable Guid
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiVariableArchProtocolGuid
|
gEfiVariableArchProtocolGuid
|
||||||
gEfiVariableWriteArchProtocolGuid
|
gEfiVariableWriteArchProtocolGuid
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
||||||
|
|
Loading…
Reference in New Issue