22 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
23 &gEfiPeiReadOnlyVariable2PpiGuid,
47 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
48 &gEfiPeiMemoryDiscoveredPpiGuid,
183 if ((AuthVariable->
State == (UINT8)(-1)) ||
184 (AuthVariable->
DataSize == (UINT32)(-1)) ||
185 (AuthVariable->
NameSize == (UINT32)(-1)) ||
193 if ((Variable->State == (UINT8)(-1)) ||
194 (Variable->DataSize == (UINT32)(-1)) ||
195 (Variable->NameSize == (UINT32)(-1)) ||
196 (Variable->Attributes == (UINT32)(-1)))
201 return (
UINTN)Variable->NameSize;
224 if ((AuthVariable->
State == (UINT8)(-1)) ||
225 (AuthVariable->
DataSize == (UINT32)(-1)) ||
226 (AuthVariable->
NameSize == (UINT32)(-1)) ||
234 if ((Variable->State == (UINT8)(-1)) ||
235 (Variable->DataSize == (UINT32)(-1)) ||
236 (Variable->NameSize == (UINT32)(-1)) ||
237 (Variable->Attributes == (UINT32)(-1)))
242 return (
UINTN)Variable->DataSize;
285 return &Variable->VendorGuid;
315 return (UINT8 *)Value;
345 Value = HEADER_ALIGN (Value);
347 if (StoreInfo->FtwLastWriteData !=
NULL) {
348 TargetAddress = StoreInfo->FtwLastWriteData->TargetAddress;
349 SpareAddress = StoreInfo->FtwLastWriteData->SpareAddress;
350 if (((
UINTN)Variable < (
UINTN)TargetAddress) && (Value >= (
UINTN)TargetAddress)) {
354 Value = (
UINTN)SpareAddress + (Value - (
UINTN)TargetAddress);
376 if ((
CompareGuid (&VarStoreHeader->Signature, &gEfiAuthenticatedVariableGuid) ||
377 CompareGuid (&VarStoreHeader->Signature, &gEfiVariableGuid)) &&
379 (VarStoreHeader->State == VARIABLE_STORE_HEALTHY)
385 if ((((UINT32 *)(&VarStoreHeader->Signature))[0] == 0xffffffff) &&
386 (((UINT32 *)(&VarStoreHeader->Signature))[1] == 0xffffffff) &&
387 (((UINT32 *)(&VarStoreHeader->Signature))[2] == 0xffffffff) &&
388 (((UINT32 *)(&VarStoreHeader->Signature))[3] == 0xffffffff) &&
389 (VarStoreHeader->Size == 0xffffffff) &&
390 (VarStoreHeader->Format == 0xff) &&
391 (VarStoreHeader->State == 0xff)
422 UINTN PartialNameSize;
424 if (StoreInfo->FtwLastWriteData !=
NULL) {
425 TargetAddress = StoreInfo->FtwLastWriteData->TargetAddress;
426 SpareAddress = StoreInfo->FtwLastWriteData->SpareAddress;
427 if (((
UINTN)Name1 < (
UINTN)TargetAddress) && (((
UINTN)Name1 + NameSize) > (
UINTN)TargetAddress)) {
431 PartialNameSize = (
UINTN)TargetAddress - (
UINTN)Name1;
435 if (
CompareMem ((UINT8 *)Name1, (UINT8 *)Name2, PartialNameSize) == 0) {
439 if (
CompareMem ((UINT8 *)(
UINTN)SpareAddress, (UINT8 *)Name2 + PartialNameSize, NameSize - PartialNameSize) == 0) {
445 }
else if (((
UINTN)Name2 < (
UINTN)TargetAddress) && (((
UINTN)Name2 + NameSize) > (
UINTN)TargetAddress)) {
449 PartialNameSize = (
UINTN)TargetAddress - (
UINTN)Name2;
453 if (
CompareMem ((UINT8 *)Name2, (UINT8 *)Name1, PartialNameSize) == 0) {
457 if (
CompareMem ((UINT8 *)(
UINTN)SpareAddress, (UINT8 *)Name1 + PartialNameSize, NameSize - PartialNameSize) == 0) {
469 if (
CompareMem ((UINT8 *)Name1, (UINT8 *)Name2, NameSize) == 0) {
505 if (VariableName[0] == 0) {
506 PtrTrack->CurrPtr = Variable;
514 if ((((INT32 *)VendorGuid)[0] == ((INT32 *)TempVendorGuid)[0]) &&
515 (((INT32 *)VendorGuid)[1] == ((INT32 *)TempVendorGuid)[1]) &&
516 (((INT32 *)VendorGuid)[2] == ((INT32 *)TempVendorGuid)[2]) &&
517 (((INT32 *)VendorGuid)[3] == ((INT32 *)TempVendorGuid)[3])
523 PtrTrack->CurrPtr = Variable;
529 return EFI_NOT_FOUND;
552 if (GuidHob !=
NULL) {
553 if ((
GetNextGuidHob (&gEfiAuthenticatedVariableGuid, GET_NEXT_HOB (GuidHob)) !=
NULL)) {
554 DEBUG ((DEBUG_ERROR,
"ERROR: Found two Auth Variable HOBs\n"));
557 DEBUG ((DEBUG_ERROR,
"ERROR: Found one Auth + one Normal Variable HOBs\n"));
562 if (GuidHob !=
NULL) {
564 DEBUG ((DEBUG_ERROR,
"ERROR: Found two Normal Variable HOBs\n"));
573 if (GuidHob !=
NULL) {
575 StoreInfo->AuthFlag =
TRUE;
578 if (GuidHob !=
NULL) {
580 StoreInfo->AuthFlag =
FALSE;
595 IN VARIABLE_STORE_TYPE Type,
604 UINT32 NvStorageSize;
605 UINT64 NvStorageSize64;
609 StoreInfo->IndexTable =
NULL;
610 StoreInfo->FtwLastWriteData =
NULL;
611 StoreInfo->AuthFlag =
FALSE;
612 VariableStoreHeader =
NULL;
614 case VariableStoreTypeHob:
619 case VariableStoreTypeNv:
620 if (!
PcdGetBool (PcdEmuVariableNvModeEnable)) {
632 ASSERT (NvStorageBase != 0);
644 if (GuidHob !=
NULL) {
651 DEBUG ((DEBUG_INFO,
"PeiVariable: NV storage is backed up in spare block: 0x%x\n", (
UINTN)FtwLastWriteData->
SpareAddress));
652 }
else if ((FtwLastWriteData->
TargetAddress > NvStorageBase) && (FtwLastWriteData->
TargetAddress < (NvStorageBase + NvStorageSize))) {
653 StoreInfo->FtwLastWriteData = FtwLastWriteData;
657 BackUpOffset = (UINT32)(FtwLastWriteData->
TargetAddress - NvStorageBase);
658 DEBUG ((DEBUG_INFO,
"PeiVariable: High partial NV storage from offset: %x is backed up in spare block: 0x%x\n", BackUpOffset, (
UINTN)FtwLastWriteData->
SpareAddress));
669 DEBUG ((DEBUG_ERROR,
"Firmware Volume for Variable Store is corrupted\n"));
675 StoreInfo->AuthFlag = (BOOLEAN)(
CompareGuid (&VariableStoreHeader->
Signature, &gEfiAuthenticatedVariableGuid));
678 if (GuidHob !=
NULL) {
679 StoreInfo->IndexTable = GET_GUID_HOB_DATA (GuidHob);
688 StoreInfo->IndexTable->Length = 0;
689 StoreInfo->IndexTable->StartPtr =
GetStartPointer (VariableStoreHeader);
690 StoreInfo->IndexTable->EndPtr =
GetEndPointer (VariableStoreHeader);
691 StoreInfo->IndexTable->GoneThrough = 0;
702 StoreInfo->VariableStoreHeader = VariableStoreHeader;
703 return VariableStoreHeader;
727 UINTN PartialHeaderSize;
729 if (Variable ==
NULL) {
736 *VariableHeader = Variable;
738 if (StoreInfo->FtwLastWriteData !=
NULL) {
739 TargetAddress = StoreInfo->FtwLastWriteData->TargetAddress;
740 SpareAddress = StoreInfo->FtwLastWriteData->SpareAddress;
741 if (((
UINTN)Variable > (
UINTN)SpareAddress) &&
756 if (GuidHob !=
NULL) {
760 PartialHeaderSize = (
UINTN)TargetAddress - (
UINTN)Variable;
764 CopyMem ((UINT8 *)*VariableHeader, (UINT8 *)Variable, PartialHeaderSize);
772 if (Variable >=
GetEndPointer (StoreInfo->VariableStoreHeader)) {
795 IN UINT8 *NameOrData,
804 if (StoreInfo->FtwLastWriteData !=
NULL) {
805 TargetAddress = StoreInfo->FtwLastWriteData->TargetAddress;
806 SpareAddress = StoreInfo->FtwLastWriteData->SpareAddress;
807 if (((
UINTN)NameOrData < (
UINTN)TargetAddress) && (((
UINTN)NameOrData + Size) > (
UINTN)TargetAddress)) {
811 PartialSize = (
UINTN)TargetAddress - (
UINTN)NameOrData;
815 CopyMem (Buffer, NameOrData, PartialSize);
819 CopyMem (Buffer + PartialSize, (UINT8 *)(
UINTN)SpareAddress, Size - PartialSize);
827 CopyMem (Buffer, NameOrData, Size);
862 VariableStoreHeader = StoreInfo->VariableStoreHeader;
864 if (VariableStoreHeader ==
NULL) {
865 return EFI_INVALID_PARAMETER;
869 return EFI_UNSUPPORTED;
872 if (~VariableStoreHeader->
Size == 0) {
873 return EFI_NOT_FOUND;
876 IndexTable = StoreInfo->IndexTable;
880 InDeletedVariable =
NULL;
886 VariableHeader =
NULL;
888 if (IndexTable !=
NULL) {
893 for (Offset = 0, Index = 0; Index < IndexTable->Length; Index++) {
894 ASSERT (Index <
sizeof (IndexTable->
Index) / sizeof (IndexTable->
Index[0]));
895 Offset += IndexTable->
Index[Index];
896 MaxIndex = (
VARIABLE_HEADER *)((UINT8 *)IndexTable->StartPtr + Offset);
900 InDeletedVariable = PtrTrack->CurrPtr;
907 if (IndexTable->GoneThrough != 0) {
911 PtrTrack->CurrPtr = InDeletedVariable;
916 if (MaxIndex !=
NULL) {
922 LastVariable = MaxIndex;
928 Variable = PtrTrack->StartPtr;
929 LastVariable = PtrTrack->StartPtr;
941 if ((IndexTable !=
NULL) && !StopRecord) {
942 Offset = (
UINTN)Variable - (
UINTN)LastVariable;
943 if ((Offset > 0x0FFFF) || (IndexTable->Length >=
sizeof (IndexTable->
Index) /
sizeof (IndexTable->
Index[0]))) {
950 IndexTable->
Index[IndexTable->Length++] = (UINT16)Offset;
951 LastVariable = Variable;
957 InDeletedVariable = PtrTrack->CurrPtr;
970 if ((IndexTable !=
NULL) && !StopRecord) {
971 IndexTable->GoneThrough = 1;
974 PtrTrack->CurrPtr = InDeletedVariable;
1000 VARIABLE_STORE_TYPE Type;
1002 if ((VariableName[0] != 0) && (VendorGuid ==
NULL)) {
1003 return EFI_INVALID_PARAMETER;
1006 for (Type = (VARIABLE_STORE_TYPE)0; Type < VariableStoreTypeMax; Type++) {
1014 if (!EFI_ERROR (Status)) {
1019 return EFI_NOT_FOUND;
1053 IN CONST CHAR16 *VariableName,
1055 OUT UINT32 *Attributes,
1057 OUT VOID *Data OPTIONAL
1066 if ((VariableName ==
NULL) || (VariableGuid ==
NULL) || (DataSize ==
NULL)) {
1067 return EFI_INVALID_PARAMETER;
1070 if (VariableName[0] == 0) {
1071 return EFI_NOT_FOUND;
1074 VariableHeader =
NULL;
1079 Status =
FindVariable (VariableName, VariableGuid, &Variable, &StoreInfo);
1080 if (EFI_ERROR (Status)) {
1090 if (*DataSize >= VarDataSize) {
1092 return EFI_INVALID_PARAMETER;
1098 Status = EFI_BUFFER_TOO_SMALL;
1101 if (Attributes !=
NULL) {
1105 *DataSize = VarDataSize;
1144 IN OUT CHAR16 *VariableName,
1148 VARIABLE_STORE_TYPE Type;
1160 if ((VariableName ==
NULL) || (VariableGuid ==
NULL) || (VariableNameSize ==
NULL)) {
1161 return EFI_INVALID_PARAMETER;
1164 VariableHeader =
NULL;
1166 Status =
FindVariable (VariableName, VariableGuid, &Variable, &StoreInfo);
1171 if (VariableName[0] != 0) {
1176 Variable.CurrPtr =
GetNextVariablePtr (&StoreInfo, Variable.CurrPtr, VariableHeader);
1179 VariableStoreHeader[VariableStoreTypeHob] =
GetVariableStore (VariableStoreTypeHob, &StoreInfoForHob);
1180 VariableStoreHeader[VariableStoreTypeNv] =
GetVariableStore (VariableStoreTypeNv, &StoreInfoForNv);
1190 for (Type = (VARIABLE_STORE_TYPE)0; Type < VariableStoreTypeMax; Type++) {
1191 if ((VariableStoreHeader[Type] !=
NULL) && (Variable.StartPtr ==
GetStartPointer (VariableStoreHeader[Type]))) {
1196 ASSERT (Type < VariableStoreTypeMax);
1200 for (Type++; Type < VariableStoreTypeMax; Type++) {
1201 if (VariableStoreHeader[Type] !=
NULL) {
1211 if (Type == VariableStoreTypeMax) {
1212 return EFI_NOT_FOUND;
1216 Variable.EndPtr =
GetEndPointer (VariableStoreHeader[Type]);
1217 Variable.CurrPtr = Variable.StartPtr;
1234 if (!EFI_ERROR (Status) && (VariablePtrTrack.CurrPtr != Variable.CurrPtr)) {
1235 Variable.CurrPtr =
GetNextVariablePtr (&StoreInfo, Variable.CurrPtr, VariableHeader);
1243 if ((VariableStoreHeader[VariableStoreTypeHob] !=
NULL) && (VariableStoreHeader[VariableStoreTypeNv] !=
NULL) &&
1244 (Variable.StartPtr ==
GetStartPointer (VariableStoreHeader[VariableStoreTypeNv]))
1253 if (!EFI_ERROR (Status)) {
1254 Variable.CurrPtr =
GetNextVariablePtr (&StoreInfo, Variable.CurrPtr, VariableHeader);
1260 ASSERT (VarNameSize != 0);
1262 if (VarNameSize <= *VariableNameSize) {
1269 Status = EFI_BUFFER_TOO_SMALL;
1272 *VariableNameSize = VarNameSize;
1278 Variable.CurrPtr =
GetNextVariablePtr (&StoreInfo, Variable.CurrPtr, VariableHeader);
1299 UINTN AuthVarStroageSize;
1308 while (StartPtr < EndPtr) {
1310 AuthVarStroageSize = HEADER_ALIGN (AuthVarStroageSize);
1312 AuthVarStroageSize += StartPtr->
NameSize + GET_PAD_SIZE (StartPtr->
NameSize);
1313 AuthVarStroageSize += StartPtr->
DataSize + GET_PAD_SIZE (StartPtr->
DataSize);
1319 return AuthVarStroageSize;
1332 IN BOOLEAN NvAuthFlag
1338 VariableStoreHeader =
NULL;
1342 if (VariableStoreHeader ==
NULL) {
1346 if (NvAuthFlag == StoreInfo.AuthFlag) {
1347 return VariableStoreHeader->
Size;
1352 ASSERT (NvAuthFlag && (!StoreInfo.AuthFlag));
1371 OUT BOOLEAN *NvAuthFlag
1379 UINT32 NvStorageSize;
1380 UINT64 NvStorageSize64;
1383 if (
PcdGetBool (PcdEmuVariableNvModeEnable)) {
1384 return PcdGet32 (PcdVariableStoreSize);
1392 ASSERT (NvStorageBase != 0);
1399 if (GuidHob !=
NULL) {
1410 *NvAuthFlag = (BOOLEAN)(
CompareGuid (&VariableStoreHeader->
Signature, &gEfiAuthenticatedVariableGuid));
1449 ASSERT (Buffer !=
NULL);
1454 if ((Status != EFI_UNSUPPORTED) && EFI_ERROR (Status)) {
1458 TempHobBuffer.CacheInfoFlagBuffer = (
UINTN)Buffer;
1461 "PeiVariable: CACHE_INFO_FLAG Buffer is: 0x%lx, number of pages is: 0x%x\n",
1462 TempHobBuffer.CacheInfoFlagBuffer,
1469 BufferSize =
PcdGet32 (PcdVariableStoreSize);
1470 if (BufferSize > 0) {
1473 ASSERT (Buffer !=
NULL);
1478 if ((Status != EFI_UNSUPPORTED) && EFI_ERROR (Status)) {
1483 TempHobBuffer.RuntimeVolatileCachePages = Pages;
1488 "PeiVariable: Volatile cache Buffer is: 0x%lx, number of pages is: 0x%lx\n",
1490 TempHobBuffer.RuntimeVolatileCachePages
1497 if (BufferSize > 0) {
1500 ASSERT (Buffer !=
NULL);
1505 if ((Status != EFI_UNSUPPORTED) && EFI_ERROR (Status)) {
1510 TempHobBuffer.RuntimeNvCachePages = Pages;
1515 "PeiVariable: NV cache Buffer is: 0x%lx, number of pages is: 0x%lx\n",
1517 TempHobBuffer.RuntimeNvCachePages
1524 if (BufferSize > 0) {
1527 ASSERT (Buffer !=
NULL);
1532 if ((Status != EFI_UNSUPPORTED) && EFI_ERROR (Status)) {
1537 TempHobBuffer.RuntimeHobCachePages = Pages;
1542 "PeiVariable: HOB cache Buffer is: 0x%lx, number of pages is: 0x%lx\n",
1544 TempHobBuffer.RuntimeHobCachePages
1548 ASSERT (VariableRuntimeCacheInfo !=
NULL);
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
VOID *EFIAPI BuildGuidHob(IN CONST EFI_GUID *Guid, IN UINTN DataLength)
VOID *EFIAPI GetNextGuidHob(IN CONST EFI_GUID *Guid, IN CONST VOID *HobStart)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS EFIAPI PeiServicesNotifyPpi(IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
EFI_STATUS EFIAPI PeiServicesInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG_CODE_BEGIN()
#define DEBUG(Expression)
RETURN_STATUS EFIAPI MmUnblockMemoryRequest(IN PHYSICAL_ADDRESS UnblockAddress, IN UINT64 NumberOfPages)
#define PcdGet32(TokenName)
#define PcdGetBool(TokenName)
#define FeaturePcdGet(TokenName)
VOID * EFI_PEI_FILE_HANDLE
VOID *EFIAPI AllocateRuntimePages(IN UINTN Pages)
RETURN_STATUS EFIAPI SafeUint64ToUint32(IN UINT64 Operand, OUT UINT32 *Result)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_SIZE_TO_PAGES(Size)
EFI_STATUS EFIAPI PeimInitializeVariableServices(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
UINTN NameSizeOfVariable(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFlag)
VARIABLE_STORE_HEADER * GetVariableStore(IN VARIABLE_STORE_TYPE Type, OUT VARIABLE_STORE_INFO *StoreInfo)
EFI_STATUS CompareWithValidVariable(IN VARIABLE_STORE_INFO *StoreInfo, IN VARIABLE_HEADER *Variable, IN VARIABLE_HEADER *VariableHeader, IN CONST CHAR16 *VariableName, IN CONST EFI_GUID *VendorGuid, OUT VARIABLE_POINTER_TRACK *PtrTrack)
UINTN CalculateNvVariableCacheSize(OUT BOOLEAN *NvAuthFlag)
BOOLEAN GetVariableHeader(IN VARIABLE_STORE_INFO *StoreInfo, IN VARIABLE_HEADER *Variable, OUT VARIABLE_HEADER **VariableHeader)
VARIABLE_HEADER * GetStartPointer(IN VARIABLE_STORE_HEADER *VarStoreHeader)
VARIABLE_STORE_STATUS GetVariableStoreStatus(IN VARIABLE_STORE_HEADER *VarStoreHeader)
UINT8 * GetVariableDataPtr(IN VARIABLE_HEADER *Variable, IN VARIABLE_HEADER *VariableHeader, IN BOOLEAN AuthFlag)
EFI_STATUS EFIAPI PeiGetVariable(IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This, IN CONST CHAR16 *VariableName, IN CONST EFI_GUID *VariableGuid, OUT UINT32 *Attributes, IN OUT UINTN *DataSize, OUT VOID *Data OPTIONAL)
VOID GetHobVariableStore(OUT VARIABLE_STORE_INFO *StoreInfo, OUT VARIABLE_STORE_HEADER **VariableStoreHeader)
EFI_STATUS EFIAPI BuildVariableRuntimeCacheInfoHob(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
VOID GetVariableNameOrData(IN VARIABLE_STORE_INFO *StoreInfo, IN UINT8 *NameOrData, IN UINTN Size, OUT UINT8 *Buffer)
CHAR16 * GetVariableNamePtr(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFlag)
EFI_STATUS EFIAPI PeiGetNextVariableName(IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This, IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, IN OUT EFI_GUID *VariableGuid)
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)
BOOLEAN IsValidVariableHeader(IN VARIABLE_HEADER *Variable)
UINTN DataSizeOfVariable(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFlag)
BOOLEAN CompareVariableName(IN VARIABLE_STORE_INFO *StoreInfo, IN CONST CHAR16 *Name1, IN CONST CHAR16 *Name2, IN UINTN NameSize)
UINTN CalculateHobVariableCacheSize(IN BOOLEAN NvAuthFlag)
EFI_STATUS FindVariableEx(IN VARIABLE_STORE_INFO *StoreInfo, IN CONST CHAR16 *VariableName, IN CONST EFI_GUID *VendorGuid, OUT VARIABLE_POINTER_TRACK *PtrTrack)
UINTN GetVariableHeaderSize(IN BOOLEAN AuthFlag)
VARIABLE_HEADER * GetNextVariablePtr(IN VARIABLE_STORE_INFO *StoreInfo, IN VARIABLE_HEADER *Variable, IN VARIABLE_HEADER *VariableHeader)
UINTN CalculateAuthVarStorageSize(IN VARIABLE_STORE_INFO *StoreInfo, IN VARIABLE_STORE_HEADER *NormalHobVarStorage)
EFI_GUID * GetVendorGuidPtr(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFlag)
EFI_STATUS EFIAPI GetVariableFlashNvStorageInfo(OUT EFI_PHYSICAL_ADDRESS *BaseAddress, OUT UINT64 *Length)
EFI_PHYSICAL_ADDRESS SpareAddress
EFI_PHYSICAL_ADDRESS TargetAddress
UINT16 Index[VARIABLE_INDEX_TABLE_VOLUME]
EFI_PHYSICAL_ADDRESS RuntimeHobCacheBuffer
EFI_PHYSICAL_ADDRESS RuntimeNvCacheBuffer
EFI_PHYSICAL_ADDRESS RuntimeVolatileCacheBuffer