33 IN CHAR16 *VariableName,
46 &mVariableModuleGlobal->VariableGlobal,
49 if (EFI_ERROR (Status)) {
50 AuthVariableInfo->Data =
NULL;
51 AuthVariableInfo->DataSize = 0;
52 AuthVariableInfo->Attributes = 0;
53 AuthVariableInfo->PubKeyIndex = 0;
54 AuthVariableInfo->MonotonicCount = 0;
55 AuthVariableInfo->TimeStamp =
NULL;
59 AuthVariableInfo->DataSize =
DataSizeOfVariable (Variable.CurrPtr, mVariableModuleGlobal->VariableGlobal.AuthFormat);
60 AuthVariableInfo->Data =
GetVariableDataPtr (Variable.CurrPtr, mVariableModuleGlobal->VariableGlobal.AuthFormat);
61 AuthVariableInfo->Attributes = Variable.CurrPtr->
Attributes;
62 if (mVariableModuleGlobal->VariableGlobal.AuthFormat) {
64 AuthVariableInfo->PubKeyIndex = AuthVariable->
PubKeyIndex;
66 AuthVariableInfo->TimeStamp = &AuthVariable->
TimeStamp;
93 IN CHAR16 *VariableName,
103 VariableStoreHeader[VariableStoreTypeVolatile] = (
VARIABLE_STORE_HEADER *)(
UINTN)mVariableModuleGlobal->VariableGlobal.VolatileVariableBase;
104 VariableStoreHeader[VariableStoreTypeHob] = (
VARIABLE_STORE_HEADER *)(
UINTN)mVariableModuleGlobal->VariableGlobal.HobVariableBase;
112 mVariableModuleGlobal->VariableGlobal.AuthFormat
114 if (EFI_ERROR (Status)) {
115 AuthVariableInfo->VariableName =
NULL;
116 AuthVariableInfo->VendorGuid =
NULL;
117 AuthVariableInfo->Data =
NULL;
118 AuthVariableInfo->DataSize = 0;
119 AuthVariableInfo->Attributes = 0;
120 AuthVariableInfo->PubKeyIndex = 0;
121 AuthVariableInfo->MonotonicCount = 0;
122 AuthVariableInfo->TimeStamp =
NULL;
126 AuthVariableInfo->VariableName =
GetVariableNamePtr (VariablePtr, mVariableModuleGlobal->VariableGlobal.AuthFormat);
127 AuthVariableInfo->VendorGuid =
GetVendorGuidPtr (VariablePtr, mVariableModuleGlobal->VariableGlobal.AuthFormat);
128 AuthVariableInfo->DataSize =
DataSizeOfVariable (VariablePtr, mVariableModuleGlobal->VariableGlobal.AuthFormat);
129 AuthVariableInfo->Data =
GetVariableDataPtr (VariablePtr, mVariableModuleGlobal->VariableGlobal.AuthFormat);
130 AuthVariableInfo->Attributes = VariablePtr->
Attributes;
131 if (mVariableModuleGlobal->VariableGlobal.AuthFormat) {
133 AuthVariableInfo->PubKeyIndex = AuthVariablePtr->
PubKeyIndex;
135 AuthVariableInfo->TimeStamp = &AuthVariablePtr->
TimeStamp;
161 FindVariable (AuthVariableInfo->VariableName, AuthVariableInfo->VendorGuid, &Variable, &mVariableModuleGlobal->VariableGlobal,
FALSE);
163 AuthVariableInfo->VariableName,
164 AuthVariableInfo->VendorGuid,
165 AuthVariableInfo->Data,
166 AuthVariableInfo->DataSize,
167 AuthVariableInfo->Attributes,
168 AuthVariableInfo->PubKeyIndex,
169 AuthVariableInfo->MonotonicCount,
171 AuthVariableInfo->TimeStamp
191 OUT VOID **ScratchBuffer
196 MaxBufferSize = mVariableModuleGlobal->ScratchBufferSize;
197 if (*ScratchBufferSize > MaxBufferSize) {
198 *ScratchBufferSize = MaxBufferSize;
199 return EFI_UNSUPPORTED;
228 IN UINT32 Attributes,
UINT64 EFIAPI ReadUnaligned64(IN CONST UINT64 *Buffer)
#define VA_START(Marker, Parameter)
UINT8 * GetVariableDataPtr(IN VARIABLE_HEADER *Variable, IN VARIABLE_HEADER *VariableHeader, IN BOOLEAN AuthFlag)
CHAR16 * GetVariableNamePtr(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFlag)
EFI_STATUS FindVariable(IN CONST CHAR16 *VariableName, IN CONST EFI_GUID *VendorGuid, OUT VARIABLE_POINTER_TRACK *PtrTrack, OUT VARIABLE_STORE_INFO *StoreInfo)
VARIABLE_HEADER * GetEndPointer(IN VARIABLE_STORE_HEADER *VarStoreHeader)
UINTN DataSizeOfVariable(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFlag)
EFI_GUID * GetVendorGuidPtr(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFlag)
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 *CacheVariable, IN EFI_TIME *TimeStamp OPTIONAL)
BOOLEAN EFIAPI CheckRemainingSpaceForConsistencyInternal(IN UINT32 Attributes, IN VA_LIST Marker)
VARIABLE_STORE_HEADER * mNvVariableCache
EFI_STATUS EFIAPI VariableExLibGetScratchBuffer(IN OUT UINTN *ScratchBufferSize, OUT VOID **ScratchBuffer)
BOOLEAN EFIAPI VariableExLibAtRuntime(VOID)
BOOLEAN EFIAPI VariableExLibCheckRemainingSpaceForConsistency(IN UINT32 Attributes,...)
EFI_STATUS EFIAPI VariableExLibFindVariable(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT AUTH_VARIABLE_INFO *AuthVariableInfo)
EFI_STATUS EFIAPI VariableExLibUpdateVariable(IN AUTH_VARIABLE_INFO *AuthVariableInfo)
EFI_STATUS EFIAPI VariableExLibFindNextVariable(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT AUTH_VARIABLE_INFO *AuthVariableInfo)
EFI_STATUS EFIAPI VariableServiceGetNextVariableInternal(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN VARIABLE_STORE_HEADER **VariableStoreList, OUT VARIABLE_HEADER **VariablePtr, IN BOOLEAN AuthFormat)