X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FVariable%2FRuntimeDxe%2FVariable.h;h=ac71f0c957ad8e77687cd92ec4ef902fe1079c75;hp=b5e6edec930d4246a14d6f8478129c92305e0172;hb=9a12e5825aa338f9a81fca3d451bb032fadaad33;hpb=ff8438477f2dcea28149514de25368ac0b2c02ee diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h index b5e6edec93..ac71f0c957 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h @@ -3,7 +3,7 @@ The internal header file includes the common header files, defines internal structure and functions used by Variable modules. -Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2014, 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 @@ -39,9 +39,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include #include -#define VARIABLE_RECLAIM_THRESHOLD (1024) +#define VARIABLE_ATTRIBUTE_BS_RT (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS) +#define VARIABLE_ATTRIBUTE_NV_BS_RT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE) +#define VARIABLE_ATTRIBUTE_NV_BS_RT_AT (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) + +typedef struct { + CHAR16 *Name; + UINT32 Attributes; +} GLOBAL_VARIABLE_ENTRY; /// /// The size of a 3 character ISO639 language code. @@ -93,10 +101,8 @@ typedef struct { typedef struct { EFI_GUID *Guid; CHAR16 *Name; - UINT32 Attributes; - UINTN DataSize; - VOID *Data; -} VARIABLE_CACHE_ENTRY; + UINTN VariableSize; +} VARIABLE_ENTRY_CONSISTENCY; typedef struct { EFI_GUID Guid; @@ -125,8 +131,7 @@ FlushHobVariableToFlash ( VariableBase. Fault Tolerant Write protocol is used for writing. @param VariableBase Base address of the variable to write. - @param Buffer Point to the data buffer. - @param BufferSize The number of bytes of the data Buffer. + @param VariableBuffer Point to the variable data buffer. @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND Fail to locate Fault Tolerant Write protocol. @@ -136,8 +141,7 @@ FlushHobVariableToFlash ( EFI_STATUS FtwVariableSpace ( IN EFI_PHYSICAL_ADDRESS VariableBase, - IN UINT8 *Buffer, - IN UINTN BufferSize + IN VARIABLE_STORE_HEADER *VariableBuffer ); @@ -437,6 +441,31 @@ VariableServiceSetVariable ( IN VOID *Data ); +/** + + This code returns information about the EFI variables. + + @param Attributes Attributes bitmask to specify the type of variables + on which to return information. + @param MaximumVariableStorageSize Pointer to the maximum size of the storage space available + for the EFI variables associated with the attributes specified. + @param RemainingVariableStorageSize Pointer to the remaining size of the storage space available + for EFI variables associated with the attributes specified. + @param MaximumVariableSize Pointer to the maximum size of an individual EFI variables + associated with the attributes specified. + + @return EFI_SUCCESS Query successfully. + +**/ +EFI_STATUS +EFIAPI +VariableServiceQueryVariableInfoInternal ( + IN UINT32 Attributes, + OUT UINT64 *MaximumVariableStorageSize, + OUT UINT64 *RemainingVariableStorageSize, + OUT UINT64 *MaximumVariableSize + ); + /** This code returns information about the EFI variables.