TianoCore EDK2 master
Loading...
Searching...
No Matches
VariableParsing.c
Go to the documentation of this file.
1
10#include "VariableParsing.h"
11
23BOOLEAN
25 IN VARIABLE_HEADER *Variable,
26 IN VARIABLE_HEADER *VariableStoreEnd
27 )
28{
29 if ((Variable == NULL) || (Variable >= VariableStoreEnd) || (Variable->StartId != VARIABLE_DATA)) {
30 //
31 // Variable is NULL or has reached the end of variable store,
32 // or the StartId is not correct.
33 //
34 return FALSE;
35 }
36
37 return TRUE;
38}
39
53 IN VARIABLE_STORE_HEADER *VarStoreHeader
54 )
55{
56 if ((CompareGuid (&VarStoreHeader->Signature, &gEfiAuthenticatedVariableGuid) ||
57 CompareGuid (&VarStoreHeader->Signature, &gEfiVariableGuid)) &&
58 (VarStoreHeader->Format == VARIABLE_STORE_FORMATTED) &&
59 (VarStoreHeader->State == VARIABLE_STORE_HEALTHY)
60 )
61 {
62 return EfiValid;
63 } else if ((((UINT32 *)(&VarStoreHeader->Signature))[0] == 0xffffffff) &&
64 (((UINT32 *)(&VarStoreHeader->Signature))[1] == 0xffffffff) &&
65 (((UINT32 *)(&VarStoreHeader->Signature))[2] == 0xffffffff) &&
66 (((UINT32 *)(&VarStoreHeader->Signature))[3] == 0xffffffff) &&
67 (VarStoreHeader->Size == 0xffffffff) &&
68 (VarStoreHeader->Format == 0xff) &&
69 (VarStoreHeader->State == 0xff)
70 )
71 {
72 return EfiRaw;
73 } else {
74 return EfiInvalid;
75 }
76}
77
89 IN BOOLEAN AuthFormat
90 )
91{
92 UINTN Value;
93
94 if (AuthFormat) {
95 Value = sizeof (AUTHENTICATED_VARIABLE_HEADER);
96 } else {
97 Value = sizeof (VARIABLE_HEADER);
98 }
99
100 return Value;
101}
102
114UINTN
116 IN VARIABLE_HEADER *Variable,
117 IN BOOLEAN AuthFormat
118 )
119{
120 AUTHENTICATED_VARIABLE_HEADER *AuthVariable;
121
122 AuthVariable = (AUTHENTICATED_VARIABLE_HEADER *)Variable;
123 if (AuthFormat) {
124 if ((AuthVariable->State == (UINT8)(-1)) ||
125 (AuthVariable->DataSize == (UINT32)(-1)) ||
126 (AuthVariable->NameSize == (UINT32)(-1)) ||
127 (AuthVariable->Attributes == (UINT32)(-1)))
128 {
129 return 0;
130 }
131
132 return (UINTN)AuthVariable->NameSize;
133 } else {
134 if ((Variable->State == (UINT8)(-1)) ||
135 (Variable->DataSize == (UINT32)(-1)) ||
136 (Variable->NameSize == (UINT32)(-1)) ||
137 (Variable->Attributes == (UINT32)(-1)))
138 {
139 return 0;
140 }
141
142 return (UINTN)Variable->NameSize;
143 }
144}
145
155VOID
157 IN VARIABLE_HEADER *Variable,
158 IN UINTN NameSize,
159 IN BOOLEAN AuthFormat
160 )
161{
162 AUTHENTICATED_VARIABLE_HEADER *AuthVariable;
163
164 AuthVariable = (AUTHENTICATED_VARIABLE_HEADER *)Variable;
165 if (AuthFormat) {
166 AuthVariable->NameSize = (UINT32)NameSize;
167 } else {
168 Variable->NameSize = (UINT32)NameSize;
169 }
170}
171
183UINTN
185 IN VARIABLE_HEADER *Variable,
186 IN BOOLEAN AuthFormat
187 )
188{
189 AUTHENTICATED_VARIABLE_HEADER *AuthVariable;
190
191 AuthVariable = (AUTHENTICATED_VARIABLE_HEADER *)Variable;
192 if (AuthFormat) {
193 if ((AuthVariable->State == (UINT8)(-1)) ||
194 (AuthVariable->DataSize == (UINT32)(-1)) ||
195 (AuthVariable->NameSize == (UINT32)(-1)) ||
196 (AuthVariable->Attributes == (UINT32)(-1)))
197 {
198 return 0;
199 }
200
201 return (UINTN)AuthVariable->DataSize;
202 } else {
203 if ((Variable->State == (UINT8)(-1)) ||
204 (Variable->DataSize == (UINT32)(-1)) ||
205 (Variable->NameSize == (UINT32)(-1)) ||
206 (Variable->Attributes == (UINT32)(-1)))
207 {
208 return 0;
209 }
210
211 return (UINTN)Variable->DataSize;
212 }
213}
214
224VOID
226 IN VARIABLE_HEADER *Variable,
227 IN UINTN DataSize,
228 IN BOOLEAN AuthFormat
229 )
230{
231 AUTHENTICATED_VARIABLE_HEADER *AuthVariable;
232
233 AuthVariable = (AUTHENTICATED_VARIABLE_HEADER *)Variable;
234 if (AuthFormat) {
235 AuthVariable->DataSize = (UINT32)DataSize;
236 } else {
237 Variable->DataSize = (UINT32)DataSize;
238 }
239}
240
252CHAR16 *
254 IN VARIABLE_HEADER *Variable,
255 IN BOOLEAN AuthFormat
256 )
257{
258 return (CHAR16 *)((UINTN)Variable + GetVariableHeaderSize (AuthFormat));
259}
260
271EFI_GUID *
273 IN VARIABLE_HEADER *Variable,
274 IN BOOLEAN AuthFormat
275 )
276{
277 AUTHENTICATED_VARIABLE_HEADER *AuthVariable;
278
279 AuthVariable = (AUTHENTICATED_VARIABLE_HEADER *)Variable;
280 if (AuthFormat) {
281 return &AuthVariable->VendorGuid;
282 } else {
283 return &Variable->VendorGuid;
284 }
285}
286
298UINT8 *
300 IN VARIABLE_HEADER *Variable,
301 IN BOOLEAN AuthFormat
302 )
303{
304 UINTN Value;
305
306 //
307 // Be careful about pad size for alignment.
308 //
309 Value = (UINTN)GetVariableNamePtr (Variable, AuthFormat);
310 Value += NameSizeOfVariable (Variable, AuthFormat);
311 Value += GET_PAD_SIZE (NameSizeOfVariable (Variable, AuthFormat));
312
313 return (UINT8 *)Value;
314}
315
326UINTN
328 IN VARIABLE_HEADER *Variable,
329 IN BOOLEAN AuthFormat
330 )
331{
332 UINTN Value;
333
334 //
335 // Be careful about pad size for alignment
336 //
337 Value = GetVariableHeaderSize (AuthFormat);
338 Value += NameSizeOfVariable (Variable, AuthFormat);
339 Value += GET_PAD_SIZE (NameSizeOfVariable (Variable, AuthFormat));
340
341 return Value;
342}
343
357 IN VARIABLE_HEADER *Variable,
358 IN BOOLEAN AuthFormat
359 )
360{
361 UINTN Value;
362
363 Value = (UINTN)GetVariableDataPtr (Variable, AuthFormat);
364 Value += DataSizeOfVariable (Variable, AuthFormat);
365 Value += GET_PAD_SIZE (DataSizeOfVariable (Variable, AuthFormat));
366
367 //
368 // Be careful about pad size for alignment.
369 //
370 return (VARIABLE_HEADER *)HEADER_ALIGN (Value);
371}
372
384 IN VARIABLE_STORE_HEADER *VarStoreHeader
385 )
386{
387 //
388 // The start of variable store.
389 //
390 return (VARIABLE_HEADER *)HEADER_ALIGN (VarStoreHeader + 1);
391}
392
407 IN VARIABLE_STORE_HEADER *VarStoreHeader
408 )
409{
410 //
411 // The end of variable store
412 //
413 return (VARIABLE_HEADER *)HEADER_ALIGN ((UINTN)VarStoreHeader + VarStoreHeader->Size);
414}
415
427BOOLEAN
429 IN EFI_TIME *FirstTime,
430 IN EFI_TIME *SecondTime
431 )
432{
433 if (FirstTime->Year != SecondTime->Year) {
434 return (BOOLEAN)(FirstTime->Year < SecondTime->Year);
435 } else if (FirstTime->Month != SecondTime->Month) {
436 return (BOOLEAN)(FirstTime->Month < SecondTime->Month);
437 } else if (FirstTime->Day != SecondTime->Day) {
438 return (BOOLEAN)(FirstTime->Day < SecondTime->Day);
439 } else if (FirstTime->Hour != SecondTime->Hour) {
440 return (BOOLEAN)(FirstTime->Hour < SecondTime->Hour);
441 } else if (FirstTime->Minute != SecondTime->Minute) {
442 return (BOOLEAN)(FirstTime->Minute < SecondTime->Minute);
443 }
444
445 return (BOOLEAN)(FirstTime->Second <= SecondTime->Second);
446}
447
464 IN CHAR16 *VariableName,
465 IN EFI_GUID *VendorGuid,
466 IN BOOLEAN IgnoreRtCheck,
467 IN OUT VARIABLE_POINTER_TRACK *PtrTrack,
468 IN BOOLEAN AuthFormat
469 )
470{
471 VARIABLE_HEADER *InDeletedVariable;
472 VOID *Point;
473
474 PtrTrack->InDeletedTransitionPtr = NULL;
475
476 //
477 // Find the variable by walk through HOB, volatile and non-volatile variable store.
478 //
479 InDeletedVariable = NULL;
480
481 for ( PtrTrack->CurrPtr = PtrTrack->StartPtr
482 ; IsValidVariableHeader (PtrTrack->CurrPtr, PtrTrack->EndPtr)
483 ; PtrTrack->CurrPtr = GetNextVariablePtr (PtrTrack->CurrPtr, AuthFormat)
484 )
485 {
486 if ((PtrTrack->CurrPtr->State == VAR_ADDED) ||
487 (PtrTrack->CurrPtr->State == (VAR_IN_DELETED_TRANSITION & VAR_ADDED))
488 )
489 {
490 if (IgnoreRtCheck || !AtRuntime () || ((PtrTrack->CurrPtr->Attributes & EFI_VARIABLE_RUNTIME_ACCESS) != 0)) {
491 if (VariableName[0] == 0) {
492 if (PtrTrack->CurrPtr->State == (VAR_IN_DELETED_TRANSITION & VAR_ADDED)) {
493 InDeletedVariable = PtrTrack->CurrPtr;
494 } else {
495 PtrTrack->InDeletedTransitionPtr = InDeletedVariable;
496 return EFI_SUCCESS;
497 }
498 } else {
499 if (CompareGuid (VendorGuid, GetVendorGuidPtr (PtrTrack->CurrPtr, AuthFormat))) {
500 Point = (VOID *)GetVariableNamePtr (PtrTrack->CurrPtr, AuthFormat);
501
502 ASSERT (NameSizeOfVariable (PtrTrack->CurrPtr, AuthFormat) != 0);
503 if (CompareMem (VariableName, Point, NameSizeOfVariable (PtrTrack->CurrPtr, AuthFormat)) == 0) {
504 if (PtrTrack->CurrPtr->State == (VAR_IN_DELETED_TRANSITION & VAR_ADDED)) {
505 InDeletedVariable = PtrTrack->CurrPtr;
506 } else {
507 PtrTrack->InDeletedTransitionPtr = InDeletedVariable;
508 return EFI_SUCCESS;
509 }
510 }
511 }
512 }
513 }
514 }
515 }
516
517 PtrTrack->CurrPtr = InDeletedVariable;
518 return (PtrTrack->CurrPtr == NULL) ? EFI_NOT_FOUND : EFI_SUCCESS;
519}
520
543EFIAPI
545 IN CHAR16 *VariableName,
546 IN EFI_GUID *VendorGuid,
547 IN VARIABLE_STORE_HEADER **VariableStoreList,
548 OUT VARIABLE_HEADER **VariablePtr,
549 IN BOOLEAN AuthFormat
550 )
551{
552 EFI_STATUS Status;
553 VARIABLE_STORE_TYPE StoreType;
554 VARIABLE_POINTER_TRACK Variable;
555 VARIABLE_POINTER_TRACK VariableInHob;
556 VARIABLE_POINTER_TRACK VariablePtrTrack;
557
558 Status = EFI_NOT_FOUND;
559
560 if (VariableStoreList == NULL) {
561 return EFI_INVALID_PARAMETER;
562 }
563
564 ZeroMem (&Variable, sizeof (Variable));
565
566 // Check if the variable exists in the given variable store list
567 for (StoreType = (VARIABLE_STORE_TYPE)0; StoreType < VariableStoreTypeMax; StoreType++) {
568 if (VariableStoreList[StoreType] == NULL) {
569 continue;
570 }
571
572 Variable.StartPtr = GetStartPointer (VariableStoreList[StoreType]);
573 Variable.EndPtr = GetEndPointer (VariableStoreList[StoreType]);
574 Variable.Volatile = (BOOLEAN)(StoreType == VariableStoreTypeVolatile);
575
576 Status = FindVariableEx (VariableName, VendorGuid, FALSE, &Variable, AuthFormat);
577 if (!EFI_ERROR (Status)) {
578 break;
579 }
580 }
581
582 if ((Variable.CurrPtr == NULL) || EFI_ERROR (Status)) {
583 //
584 // For VariableName is an empty string, FindVariableEx() will try to find and return
585 // the first qualified variable, and if FindVariableEx() returns error (EFI_NOT_FOUND)
586 // as no any variable is found, still go to return the error (EFI_NOT_FOUND).
587 //
588 if (VariableName[0] != 0) {
589 //
590 // For VariableName is not an empty string, and FindVariableEx() returns error as
591 // VariableName and VendorGuid are not a name and GUID of an existing variable,
592 // there is no way to get next variable, follow spec to return EFI_INVALID_PARAMETER.
593 //
594 Status = EFI_INVALID_PARAMETER;
595 }
596
597 goto Done;
598 }
599
600 if (VariableName[0] != 0) {
601 //
602 // If variable name is not empty, get next variable.
603 //
604 Variable.CurrPtr = GetNextVariablePtr (Variable.CurrPtr, AuthFormat);
605 }
606
607 while (TRUE) {
608 //
609 // Switch to the next variable store if needed
610 //
611 while (!IsValidVariableHeader (Variable.CurrPtr, Variable.EndPtr)) {
612 //
613 // Find current storage index
614 //
615 for (StoreType = (VARIABLE_STORE_TYPE)0; StoreType < VariableStoreTypeMax; StoreType++) {
616 if ((VariableStoreList[StoreType] != NULL) && (Variable.StartPtr == GetStartPointer (VariableStoreList[StoreType]))) {
617 break;
618 }
619 }
620
621 ASSERT (StoreType < VariableStoreTypeMax);
622 //
623 // Switch to next storage
624 //
625 for (StoreType++; StoreType < VariableStoreTypeMax; StoreType++) {
626 if (VariableStoreList[StoreType] != NULL) {
627 break;
628 }
629 }
630
631 //
632 // Capture the case that
633 // 1. current storage is the last one, or
634 // 2. no further storage
635 //
636 if (StoreType == VariableStoreTypeMax) {
637 Status = EFI_NOT_FOUND;
638 goto Done;
639 }
640
641 Variable.StartPtr = GetStartPointer (VariableStoreList[StoreType]);
642 Variable.EndPtr = GetEndPointer (VariableStoreList[StoreType]);
643 Variable.CurrPtr = Variable.StartPtr;
644 }
645
646 //
647 // Variable is found
648 //
649 if ((Variable.CurrPtr->State == VAR_ADDED) || (Variable.CurrPtr->State == (VAR_IN_DELETED_TRANSITION & VAR_ADDED))) {
650 if (!AtRuntime () || ((Variable.CurrPtr->Attributes & EFI_VARIABLE_RUNTIME_ACCESS) != 0)) {
651 if (Variable.CurrPtr->State == (VAR_IN_DELETED_TRANSITION & VAR_ADDED)) {
652 //
653 // If it is a IN_DELETED_TRANSITION variable,
654 // and there is also a same ADDED one at the same time,
655 // don't return it.
656 //
657 VariablePtrTrack.StartPtr = Variable.StartPtr;
658 VariablePtrTrack.EndPtr = Variable.EndPtr;
659 Status = FindVariableEx (
660 GetVariableNamePtr (Variable.CurrPtr, AuthFormat),
661 GetVendorGuidPtr (Variable.CurrPtr, AuthFormat),
662 FALSE,
663 &VariablePtrTrack,
664 AuthFormat
665 );
666 if (!EFI_ERROR (Status) && (VariablePtrTrack.CurrPtr->State == VAR_ADDED)) {
667 Variable.CurrPtr = GetNextVariablePtr (Variable.CurrPtr, AuthFormat);
668 continue;
669 }
670 }
671
672 //
673 // Don't return NV variable when HOB overrides it
674 //
675 if ((VariableStoreList[VariableStoreTypeHob] != NULL) && (VariableStoreList[VariableStoreTypeNv] != NULL) &&
676 (Variable.StartPtr == GetStartPointer (VariableStoreList[VariableStoreTypeNv]))
677 )
678 {
679 VariableInHob.StartPtr = GetStartPointer (VariableStoreList[VariableStoreTypeHob]);
680 VariableInHob.EndPtr = GetEndPointer (VariableStoreList[VariableStoreTypeHob]);
681 Status = FindVariableEx (
682 GetVariableNamePtr (Variable.CurrPtr, AuthFormat),
683 GetVendorGuidPtr (Variable.CurrPtr, AuthFormat),
684 FALSE,
685 &VariableInHob,
686 AuthFormat
687 );
688 if (!EFI_ERROR (Status)) {
689 Variable.CurrPtr = GetNextVariablePtr (Variable.CurrPtr, AuthFormat);
690 continue;
691 }
692 }
693
694 *VariablePtr = Variable.CurrPtr;
695 Status = EFI_SUCCESS;
696 goto Done;
697 }
698 }
699
700 Variable.CurrPtr = GetNextVariablePtr (Variable.CurrPtr, AuthFormat);
701 }
702
703Done:
704 return Status;
705}
706
728VOID
730 IN CHAR16 *VariableName,
731 IN EFI_GUID *VendorGuid,
732 IN BOOLEAN Volatile,
733 IN BOOLEAN Read,
734 IN BOOLEAN Write,
735 IN BOOLEAN Delete,
736 IN BOOLEAN Cache,
737 IN OUT VARIABLE_INFO_ENTRY **VariableInfo
738 )
739{
740 VARIABLE_INFO_ENTRY *Entry;
741
742 if (FeaturePcdGet (PcdVariableCollectStatistics)) {
743 if ((VariableName == NULL) || (VendorGuid == NULL) || (VariableInfo == NULL)) {
744 return;
745 }
746
747 if (AtRuntime ()) {
748 // Don't collect statistics at runtime.
749 return;
750 }
751
752 if (*VariableInfo == NULL) {
753 //
754 // On the first call allocate a entry and place a pointer to it in
755 // the EFI System Table.
756 //
757 *VariableInfo = AllocateZeroPool (sizeof (VARIABLE_INFO_ENTRY));
758 ASSERT (*VariableInfo != NULL);
759
760 CopyGuid (&(*VariableInfo)->VendorGuid, VendorGuid);
761 (*VariableInfo)->Name = AllocateZeroPool (StrSize (VariableName));
762 ASSERT ((*VariableInfo)->Name != NULL);
763 StrCpyS ((*VariableInfo)->Name, StrSize (VariableName)/sizeof (CHAR16), VariableName);
764 (*VariableInfo)->Volatile = Volatile;
765 }
766
767 for (Entry = (*VariableInfo); Entry != NULL; Entry = Entry->Next) {
768 if (CompareGuid (VendorGuid, &Entry->VendorGuid)) {
769 if (StrCmp (VariableName, Entry->Name) == 0) {
770 if (Read) {
771 Entry->ReadCount++;
772 }
773
774 if (Write) {
775 Entry->WriteCount++;
776 }
777
778 if (Delete) {
779 Entry->DeleteCount++;
780 }
781
782 if (Cache) {
783 Entry->CacheCount++;
784 }
785
786 return;
787 }
788 }
789
790 if (Entry->Next == NULL) {
791 //
792 // If the entry is not in the table add it.
793 // Next iteration of the loop will fill in the data.
794 //
795 Entry->Next = AllocateZeroPool (sizeof (VARIABLE_INFO_ENTRY));
796 ASSERT (Entry->Next != NULL);
797
798 CopyGuid (&Entry->Next->VendorGuid, VendorGuid);
799 Entry->Next->Name = AllocateZeroPool (StrSize (VariableName));
800 ASSERT (Entry->Next->Name != NULL);
801 StrCpyS (Entry->Next->Name, StrSize (VariableName)/sizeof (CHAR16), VariableName);
802 Entry->Next->Volatile = Volatile;
803 }
804 }
805 }
806}
UINT64 UINTN
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
Definition: String.c:72
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
Definition: SafeString.c:226
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
Definition: String.c:109
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
Definition: MemLibGuid.c:39
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
BOOLEAN AtRuntime(VOID)
Definition: VariableDxe.c:63
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define FeaturePcdGet(TokenName)
Definition: PcdLib.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
VARIABLE_STORE_STATUS
#define VAR_IN_DELETED_TRANSITION
Variable is in obsolete transition.
#define VARIABLE_DATA
#define VARIABLE_STORE_FORMATTED
#define VAR_ADDED
Variable has been completely added.
EFI_GUID * GetVendorGuidPtr(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFormat)
VOID SetDataSizeOfVariable(IN VARIABLE_HEADER *Variable, IN UINTN DataSize, IN BOOLEAN AuthFormat)
VARIABLE_HEADER * GetNextVariablePtr(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFormat)
VARIABLE_HEADER * GetStartPointer(IN VARIABLE_STORE_HEADER *VarStoreHeader)
UINT8 * GetVariableDataPtr(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFormat)
EFI_STATUS EFIAPI VariableServiceGetNextVariableInternal(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN VARIABLE_STORE_HEADER **VariableStoreList, OUT VARIABLE_HEADER **VariablePtr, IN BOOLEAN AuthFormat)
VARIABLE_STORE_STATUS GetVariableStoreStatus(IN VARIABLE_STORE_HEADER *VarStoreHeader)
EFI_STATUS FindVariableEx(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN BOOLEAN IgnoreRtCheck, IN OUT VARIABLE_POINTER_TRACK *PtrTrack, IN BOOLEAN AuthFormat)
UINTN GetVariableDataOffset(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFormat)
BOOLEAN IsValidVariableHeader(IN VARIABLE_HEADER *Variable, IN VARIABLE_HEADER *VariableStoreEnd)
UINTN NameSizeOfVariable(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFormat)
VARIABLE_HEADER * GetEndPointer(IN VARIABLE_STORE_HEADER *VarStoreHeader)
VOID SetNameSizeOfVariable(IN VARIABLE_HEADER *Variable, IN UINTN NameSize, IN BOOLEAN AuthFormat)
VOID UpdateVariableInfo(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN BOOLEAN Volatile, IN BOOLEAN Read, IN BOOLEAN Write, IN BOOLEAN Delete, IN BOOLEAN Cache, IN OUT VARIABLE_INFO_ENTRY **VariableInfo)
BOOLEAN VariableCompareTimeStampInternal(IN EFI_TIME *FirstTime, IN EFI_TIME *SecondTime)
UINTN DataSizeOfVariable(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFormat)
CHAR16 * GetVariableNamePtr(IN VARIABLE_HEADER *Variable, IN BOOLEAN AuthFormat)
UINTN GetVariableHeaderSize(IN BOOLEAN AuthFormat)
Definition: Base.h:213