X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=DuetPkg%2FFSVariable%2FFSVariable.h;h=cb37c29cc2a5819c5cd16010f7f8ad44bb5c2d37;hb=76c09700edc67686b29662e81a3ca7d947594ce5;hp=6da525cbf6c2f48925a0f4ac09374b6ca6afb629;hpb=3709c4cd5bc3956fee59f31bdd1b7dc5b61a039a;p=mirror_edk2.git diff --git a/DuetPkg/FSVariable/FSVariable.h b/DuetPkg/FSVariable/FSVariable.h index 6da525cbf6..cb37c29cc2 100644 --- a/DuetPkg/FSVariable/FSVariable.h +++ b/DuetPkg/FSVariable/FSVariable.h @@ -1,7 +1,13 @@ /*++ -Copyright (c) 2006 - 2007, Intel Corporation -All rights reserved. This program and the accompanying materials +Caution: This file is used for Duet platform only, do not use them in real platform. +All variable code, variable metadata, and variable data used by Duet platform are on +disk. They can be changed by user. BIOS is not able to protoect those. +Duet trusts all meta data from disk. If variable code, variable metadata and variable +data is modified in inproper way, the behavior is undefined. + +Copyright (c) 2006 - 2017, 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 http://opensource.org/licenses/bsd-license.php @@ -28,6 +34,7 @@ Abstract: #include #include #include +#include #include #include #include @@ -39,7 +46,7 @@ Abstract: #include #include #include - +#include #include #include #include @@ -49,9 +56,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 +96,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; + CHAR8 *LangCodes; + CHAR8 *PlatformLang; + CHAR8 Lang[ISO_639_2_ENTRY_SIZE + 1]; } VARIABLE_GLOBAL; // @@ -107,12 +124,12 @@ VariableClassAddressChangeEvent ( EFI_STATUS EFIAPI -GetVariable ( +DuetGetVariable ( IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT UINT32 *Attributes OPTIONAL, IN OUT UINTN *DataSize, - OUT VOID *Data + OUT VOID *Data OPTIONAL ); EFI_STATUS @@ -133,7 +150,6 @@ SetVariable ( IN VOID *Data ); -#if (EFI_SPECIFICATION_VERSION >= 0x00020000) EFI_STATUS EFIAPI QueryVariableInfo ( @@ -142,6 +158,5 @@ QueryVariableInfo ( OUT UINT64 *RemainingVariableStorageSize, OUT UINT64 *MaximumVariableSize ); -#endif // EFI_SPECIFICATION_VERSION >= 0x00020000 #endif