summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h')
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h223
1 files changed, 110 insertions, 113 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
index 0b2bb6ae66..31e408976a 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
@@ -40,12 +40,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "PrivilegePolymorphic.h"
-#define NV_STORAGE_VARIABLE_BASE (EFI_PHYSICAL_ADDRESS) \
+#define NV_STORAGE_VARIABLE_BASE (EFI_PHYSICAL_ADDRESS)\
(PcdGet64 (PcdFlashNvStorageVariableBase64) != 0 ? \
PcdGet64 (PcdFlashNvStorageVariableBase64) : \
PcdGet32 (PcdFlashNvStorageVariableBase))
-#define EFI_VARIABLE_ATTRIBUTES_MASK (EFI_VARIABLE_NON_VOLATILE | \
+#define EFI_VARIABLE_ATTRIBUTES_MASK (EFI_VARIABLE_NON_VOLATILE |\
EFI_VARIABLE_BOOTSERVICE_ACCESS | \
EFI_VARIABLE_RUNTIME_ACCESS | \
EFI_VARIABLE_HARDWARE_ERROR_RECORD | \
@@ -55,7 +55,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// The size of a 3 character ISO639 language code.
///
-#define ISO_639_2_ENTRY_SIZE 3
+#define ISO_639_2_ENTRY_SIZE 3
typedef enum {
VariableStoreTypeVolatile,
@@ -65,65 +65,65 @@ typedef enum {
} VARIABLE_STORE_TYPE;
typedef struct {
- UINT32 PendingUpdateOffset;
- UINT32 PendingUpdateLength;
- VARIABLE_STORE_HEADER *Store;
+ UINT32 PendingUpdateOffset;
+ UINT32 PendingUpdateLength;
+ VARIABLE_STORE_HEADER *Store;
} VARIABLE_RUNTIME_CACHE;
typedef struct {
- BOOLEAN *ReadLock;
- BOOLEAN *PendingUpdate;
- BOOLEAN *HobFlushComplete;
- VARIABLE_RUNTIME_CACHE VariableRuntimeHobCache;
- VARIABLE_RUNTIME_CACHE VariableRuntimeNvCache;
- VARIABLE_RUNTIME_CACHE VariableRuntimeVolatileCache;
+ BOOLEAN *ReadLock;
+ BOOLEAN *PendingUpdate;
+ BOOLEAN *HobFlushComplete;
+ VARIABLE_RUNTIME_CACHE VariableRuntimeHobCache;
+ VARIABLE_RUNTIME_CACHE VariableRuntimeNvCache;
+ VARIABLE_RUNTIME_CACHE VariableRuntimeVolatileCache;
} VARIABLE_RUNTIME_CACHE_CONTEXT;
typedef struct {
- VARIABLE_HEADER *CurrPtr;
+ VARIABLE_HEADER *CurrPtr;
//
// If both ADDED and IN_DELETED_TRANSITION variable are present,
// InDeletedTransitionPtr will point to the IN_DELETED_TRANSITION one.
// Otherwise, CurrPtr will point to the ADDED or IN_DELETED_TRANSITION one,
// and InDeletedTransitionPtr will be NULL at the same time.
//
- VARIABLE_HEADER *InDeletedTransitionPtr;
- VARIABLE_HEADER *EndPtr;
- VARIABLE_HEADER *StartPtr;
- BOOLEAN Volatile;
+ VARIABLE_HEADER *InDeletedTransitionPtr;
+ VARIABLE_HEADER *EndPtr;
+ VARIABLE_HEADER *StartPtr;
+ BOOLEAN Volatile;
} VARIABLE_POINTER_TRACK;
typedef struct {
- EFI_PHYSICAL_ADDRESS HobVariableBase;
- EFI_PHYSICAL_ADDRESS VolatileVariableBase;
- EFI_PHYSICAL_ADDRESS NonVolatileVariableBase;
- VARIABLE_RUNTIME_CACHE_CONTEXT VariableRuntimeCacheContext;
- EFI_LOCK VariableServicesLock;
- UINT32 ReentrantState;
- BOOLEAN AuthFormat;
- BOOLEAN AuthSupport;
- BOOLEAN EmuNvMode;
+ EFI_PHYSICAL_ADDRESS HobVariableBase;
+ EFI_PHYSICAL_ADDRESS VolatileVariableBase;
+ EFI_PHYSICAL_ADDRESS NonVolatileVariableBase;
+ VARIABLE_RUNTIME_CACHE_CONTEXT VariableRuntimeCacheContext;
+ EFI_LOCK VariableServicesLock;
+ UINT32 ReentrantState;
+ BOOLEAN AuthFormat;
+ BOOLEAN AuthSupport;
+ BOOLEAN EmuNvMode;
} VARIABLE_GLOBAL;
typedef struct {
- VARIABLE_GLOBAL VariableGlobal;
- UINTN VolatileLastVariableOffset;
- UINTN NonVolatileLastVariableOffset;
- UINTN CommonVariableSpace;
- UINTN CommonMaxUserVariableSpace;
- UINTN CommonRuntimeVariableSpace;
- UINTN CommonVariableTotalSize;
- UINTN CommonUserVariableTotalSize;
- UINTN HwErrVariableTotalSize;
- UINTN MaxVariableSize;
- UINTN MaxAuthVariableSize;
- UINTN MaxVolatileVariableSize;
- UINTN ScratchBufferSize;
- CHAR8 *PlatformLangCodes;
- CHAR8 *LangCodes;
- CHAR8 *PlatformLang;
- CHAR8 Lang[ISO_639_2_ENTRY_SIZE + 1];
- EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbInstance;
+ VARIABLE_GLOBAL VariableGlobal;
+ UINTN VolatileLastVariableOffset;
+ UINTN NonVolatileLastVariableOffset;
+ UINTN CommonVariableSpace;
+ UINTN CommonMaxUserVariableSpace;
+ UINTN CommonRuntimeVariableSpace;
+ UINTN CommonVariableTotalSize;
+ UINTN CommonUserVariableTotalSize;
+ UINTN HwErrVariableTotalSize;
+ UINTN MaxVariableSize;
+ UINTN MaxAuthVariableSize;
+ UINTN MaxVolatileVariableSize;
+ UINTN ScratchBufferSize;
+ CHAR8 *PlatformLangCodes;
+ CHAR8 *LangCodes;
+ CHAR8 *PlatformLang;
+ CHAR8 Lang[ISO_639_2_ENTRY_SIZE + 1];
+ EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbInstance;
} VARIABLE_MODULE_GLOBAL;
/**
@@ -135,8 +135,8 @@ typedef struct {
**/
VOID
FlushHobVariableToFlash (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid
);
/**
@@ -218,8 +218,8 @@ FindVariable (
BOOLEAN
EFIAPI
CheckRemainingSpaceForConsistencyInternal (
- IN UINT32 Attributes,
- IN VA_LIST Marker
+ IN UINT32 Attributes,
+ IN VA_LIST Marker
);
/**
@@ -243,18 +243,17 @@ CheckRemainingSpaceForConsistencyInternal (
**/
EFI_STATUS
UpdateVariable (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- IN VOID *Data,
- IN UINTN DataSize,
- IN UINT32 Attributes OPTIONAL,
- IN UINT32 KeyIndex OPTIONAL,
- IN UINT64 MonotonicCount OPTIONAL,
- IN OUT VARIABLE_POINTER_TRACK *Variable,
- IN EFI_TIME *TimeStamp OPTIONAL
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid,
+ IN VOID *Data,
+ IN UINTN DataSize,
+ IN UINT32 Attributes OPTIONAL,
+ IN UINT32 KeyIndex OPTIONAL,
+ IN UINT64 MonotonicCount OPTIONAL,
+ IN OUT VARIABLE_POINTER_TRACK *Variable,
+ IN EFI_TIME *TimeStamp OPTIONAL
);
-
/**
Return TRUE if ExitBootServices () has been called.
@@ -284,10 +283,9 @@ AtRuntime (
EFI_LOCK *
InitializeLock (
IN OUT EFI_LOCK *Lock,
- IN EFI_TPL Priority
+ IN EFI_TPL Priority
);
-
/**
Acquires lock only at boot time. Simply returns at runtime.
@@ -305,7 +303,6 @@ AcquireLockOnlyAtBootTime (
IN EFI_LOCK *Lock
);
-
/**
Releases lock only at boot time. Simply returns at runtime.
@@ -358,8 +355,8 @@ GetFvbByHandle (
**/
EFI_STATUS
GetFvbCountAndBuffer (
- OUT UINTN *NumberHandles,
- OUT EFI_HANDLE **Buffer
+ OUT UINTN *NumberHandles,
+ OUT EFI_HANDLE **Buffer
);
/**
@@ -379,7 +376,7 @@ VariableCommonInitialize (
**/
VOID
-ReclaimForOS(
+ReclaimForOS (
VOID
);
@@ -418,7 +415,7 @@ VariableWriteServiceInitialize (
**/
EFI_STATUS
GetFtwProtocol (
- OUT VOID **FtwProtocol
+ OUT VOID **FtwProtocol
);
/**
@@ -461,11 +458,11 @@ GetFvbInfoByAddress (
EFI_STATUS
EFIAPI
VariableServiceGetVariable (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- OUT UINT32 *Attributes OPTIONAL,
- IN OUT UINTN *DataSize,
- OUT VOID *Data OPTIONAL
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid,
+ OUT UINT32 *Attributes OPTIONAL,
+ IN OUT UINTN *DataSize,
+ OUT VOID *Data OPTIONAL
);
/**
@@ -496,9 +493,9 @@ VariableServiceGetVariable (
EFI_STATUS
EFIAPI
VariableServiceGetNextVariableName (
- IN OUT UINTN *VariableNameSize,
- IN OUT CHAR16 *VariableName,
- IN OUT EFI_GUID *VendorGuid
+ IN OUT UINTN *VariableNameSize,
+ IN OUT CHAR16 *VariableName,
+ IN OUT EFI_GUID *VendorGuid
);
/**
@@ -529,11 +526,11 @@ VariableServiceGetNextVariableName (
EFI_STATUS
EFIAPI
VariableServiceSetVariable (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- IN UINT32 Attributes,
- IN UINTN DataSize,
- IN VOID *Data
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid,
+ IN UINT32 Attributes,
+ IN UINTN DataSize,
+ IN VOID *Data
);
/**
@@ -558,10 +555,10 @@ VariableServiceSetVariable (
EFI_STATUS
EFIAPI
VariableServiceQueryVariableInfoInternal (
- IN UINT32 Attributes,
- OUT UINT64 *MaximumVariableStorageSize,
- OUT UINT64 *RemainingVariableStorageSize,
- OUT UINT64 *MaximumVariableSize
+ IN UINT32 Attributes,
+ OUT UINT64 *MaximumVariableStorageSize,
+ OUT UINT64 *RemainingVariableStorageSize,
+ OUT UINT64 *MaximumVariableSize
);
/**
@@ -588,10 +585,10 @@ VariableServiceQueryVariableInfoInternal (
EFI_STATUS
EFIAPI
VariableServiceQueryVariableInfo (
- IN UINT32 Attributes,
- OUT UINT64 *MaximumVariableStorageSize,
- OUT UINT64 *RemainingVariableStorageSize,
- OUT UINT64 *MaximumVariableSize
+ IN UINT32 Attributes,
+ OUT UINT64 *MaximumVariableStorageSize,
+ OUT UINT64 *RemainingVariableStorageSize,
+ OUT UINT64 *MaximumVariableSize
);
/**
@@ -612,9 +609,9 @@ VariableServiceQueryVariableInfo (
EFI_STATUS
EFIAPI
VariableLockRequestToLock (
- IN CONST EDKII_VARIABLE_LOCK_PROTOCOL *This,
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid
+ IN CONST EDKII_VARIABLE_LOCK_PROTOCOL *This,
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid
);
/**
@@ -634,7 +631,7 @@ VariableLockRequestToLock (
EFI_STATUS
EFIAPI
VarCheckRegisterSetVariableCheckHandler (
- IN VAR_CHECK_SET_VARIABLE_CHECK_HANDLER Handler
+ IN VAR_CHECK_SET_VARIABLE_CHECK_HANDLER Handler
);
/**
@@ -655,9 +652,9 @@ VarCheckRegisterSetVariableCheckHandler (
EFI_STATUS
EFIAPI
VarCheckVariablePropertySet (
- IN CHAR16 *Name,
- IN EFI_GUID *Guid,
- IN VAR_CHECK_VARIABLE_PROPERTY *VariableProperty
+ IN CHAR16 *Name,
+ IN EFI_GUID *Guid,
+ IN VAR_CHECK_VARIABLE_PROPERTY *VariableProperty
);
/**
@@ -675,9 +672,9 @@ VarCheckVariablePropertySet (
EFI_STATUS
EFIAPI
VarCheckVariablePropertyGet (
- IN CHAR16 *Name,
- IN EFI_GUID *Guid,
- OUT VAR_CHECK_VARIABLE_PROPERTY *VariableProperty
+ IN CHAR16 *Name,
+ IN EFI_GUID *Guid,
+ OUT VAR_CHECK_VARIABLE_PROPERTY *VariableProperty
);
/**
@@ -689,14 +686,14 @@ InitializeVariableQuota (
VOID
);
-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 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.
@@ -719,9 +716,9 @@ extern AUTH_VAR_LIB_CONTEXT_OUT mAuthContextOut;
EFI_STATUS
EFIAPI
VariableExLibFindVariable (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- OUT AUTH_VARIABLE_INFO *AuthVariableInfo
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid,
+ OUT AUTH_VARIABLE_INFO *AuthVariableInfo
);
/**
@@ -745,9 +742,9 @@ VariableExLibFindVariable (
EFI_STATUS
EFIAPI
VariableExLibFindNextVariable (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- OUT AUTH_VARIABLE_INFO *AuthVariableInfo
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid,
+ OUT AUTH_VARIABLE_INFO *AuthVariableInfo
);
/**
@@ -765,7 +762,7 @@ VariableExLibFindNextVariable (
EFI_STATUS
EFIAPI
VariableExLibUpdateVariable (
- IN AUTH_VARIABLE_INFO *AuthVariableInfo
+ IN AUTH_VARIABLE_INFO *AuthVariableInfo
);
/**
@@ -783,8 +780,8 @@ VariableExLibUpdateVariable (
EFI_STATUS
EFIAPI
VariableExLibGetScratchBuffer (
- IN OUT UINTN *ScratchBufferSize,
- OUT VOID **ScratchBuffer
+ IN OUT UINTN *ScratchBufferSize,
+ OUT VOID **ScratchBuffer
);
/**
@@ -809,7 +806,7 @@ VariableExLibGetScratchBuffer (
BOOLEAN
EFIAPI
VariableExLibCheckRemainingSpaceForConsistency (
- IN UINT32 Attributes,
+ IN UINT32 Attributes,
...
);