X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FVariable%2FRuntimeDxe%2FVariable.h;h=7a3a5f34deab49838121ba2d0d159c763c75325c;hb=7cd69959463ac9c761163ed8e8a93907b68e70da;hp=b35e8ab912733114cfbe3d7f9e1a1bc4ad0ac0e0;hpb=4073f85d4a09e41ccdbb5efef10835d42db237e3;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h index b35e8ab912..7a3a5f34de 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h @@ -2,7 +2,7 @@ The internal header file includes the common header files, defines internal structure and functions used by Variable modules. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, 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 @@ -46,6 +46,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "PrivilegePolymorphic.h" +#define NV_STORAGE_VARIABLE_BASE (EFI_PHYSICAL_ADDRESS) \ + (PcdGet64 (PcdFlashNvStorageVariableBase64) != 0 ? \ + PcdGet64 (PcdFlashNvStorageVariableBase64) : \ + PcdGet32 (PcdFlashNvStorageVariableBase)) + #define EFI_VARIABLE_ATTRIBUTES_MASK (EFI_VARIABLE_NON_VOLATILE | \ EFI_VARIABLE_BOOTSERVICE_ACCESS | \ EFI_VARIABLE_RUNTIME_ACCESS | \ @@ -87,6 +92,7 @@ typedef struct { UINT32 ReentrantState; BOOLEAN AuthFormat; BOOLEAN AuthSupport; + BOOLEAN EmuNvMode; } VARIABLE_GLOBAL; typedef struct { @@ -101,6 +107,7 @@ typedef struct { UINTN HwErrVariableTotalSize; UINTN MaxVariableSize; UINTN MaxAuthVariableSize; + UINTN MaxVolatileVariableSize; UINTN ScratchBufferSize; CHAR8 *PlatformLangCodes; CHAR8 *LangCodes; @@ -461,7 +468,18 @@ GetNonVolatileMaxVariableSize ( ); /** - Initializes variable write service after FVB was ready. + Get maximum variable size, covering both non-volatile and volatile variables. + + @return Maximum variable size. + +**/ +UINTN +GetMaxVariableSize ( + VOID + ); + +/** + Initializes variable write service. @retval EFI_SUCCESS Function successfully executed. @retval Others Fail to initialize the variable service. @@ -780,9 +798,14 @@ InitializeVariableQuota ( VOID ); -extern VARIABLE_MODULE_GLOBAL *mVariableModuleGlobal; +extern VARIABLE_MODULE_GLOBAL *mVariableModuleGlobal; +extern EFI_FIRMWARE_VOLUME_HEADER *mNvFvHeaderCache; +extern VARIABLE_STORE_HEADER *mNvVariableCache; +extern VARIABLE_INFO_ENTRY *gVariableInfo; +extern BOOLEAN mEndOfDxe; +extern VAR_CHECK_REQUEST_SOURCE mRequestSource; -extern AUTH_VAR_LIB_CONTEXT_OUT mAuthContextOut; +extern AUTH_VAR_LIB_CONTEXT_OUT mAuthContextOut; /** Finds variable in storage blocks of volatile and non-volatile storage areas.