]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
Use SmmMemLib to check communication buffer.
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / RuntimeDxe / Variable.h
1 /** @file
2
3 The internal header file includes the common header files, defines
4 internal structure and functions used by Variable modules.
5
6 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #ifndef _VARIABLE_H_
18 #define _VARIABLE_H_
19
20 #include <PiDxe.h>
21 #include <Protocol/VariableWrite.h>
22 #include <Protocol/FaultTolerantWrite.h>
23 #include <Protocol/FirmwareVolumeBlock.h>
24 #include <Protocol/Variable.h>
25 #include <Protocol/VariableLock.h>
26 #include <Protocol/VarCheck.h>
27 #include <Library/PcdLib.h>
28 #include <Library/HobLib.h>
29 #include <Library/UefiDriverEntryPoint.h>
30 #include <Library/DxeServicesTableLib.h>
31 #include <Library/UefiRuntimeLib.h>
32 #include <Library/DebugLib.h>
33 #include <Library/BaseMemoryLib.h>
34 #include <Library/UefiBootServicesTableLib.h>
35 #include <Library/UefiLib.h>
36 #include <Library/BaseLib.h>
37 #include <Library/SynchronizationLib.h>
38 #include <Library/MemoryAllocationLib.h>
39 #include <Guid/GlobalVariable.h>
40 #include <Guid/EventGroup.h>
41 #include <Guid/VariableFormat.h>
42 #include <Guid/SystemNvDataGuid.h>
43 #include <Guid/FaultTolerantWrite.h>
44 #include <Guid/HardwareErrorVariable.h>
45 #include <Guid/VarErrorFlag.h>
46
47 #define VARIABLE_ATTRIBUTE_BS_RT (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)
48 #define VARIABLE_ATTRIBUTE_NV_BS_RT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE)
49 #define VARIABLE_ATTRIBUTE_NV_BS_RT_AT (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)
50
51 ///
52 /// The size of a 3 character ISO639 language code.
53 ///
54 #define ISO_639_2_ENTRY_SIZE 3
55
56 typedef enum {
57 VariableStoreTypeVolatile,
58 VariableStoreTypeHob,
59 VariableStoreTypeNv,
60 VariableStoreTypeMax
61 } VARIABLE_STORE_TYPE;
62
63 typedef struct {
64 VARIABLE_HEADER *CurrPtr;
65 //
66 // If both ADDED and IN_DELETED_TRANSITION variable are present,
67 // InDeletedTransitionPtr will point to the IN_DELETED_TRANSITION one.
68 // Otherwise, CurrPtr will point to the ADDED or IN_DELETED_TRANSITION one,
69 // and InDeletedTransitionPtr will be NULL at the same time.
70 //
71 VARIABLE_HEADER *InDeletedTransitionPtr;
72 VARIABLE_HEADER *EndPtr;
73 VARIABLE_HEADER *StartPtr;
74 BOOLEAN Volatile;
75 } VARIABLE_POINTER_TRACK;
76
77 typedef struct {
78 EFI_PHYSICAL_ADDRESS HobVariableBase;
79 EFI_PHYSICAL_ADDRESS VolatileVariableBase;
80 EFI_PHYSICAL_ADDRESS NonVolatileVariableBase;
81 EFI_LOCK VariableServicesLock;
82 UINT32 ReentrantState;
83 } VARIABLE_GLOBAL;
84
85 typedef struct {
86 VARIABLE_GLOBAL VariableGlobal;
87 UINTN VolatileLastVariableOffset;
88 UINTN NonVolatileLastVariableOffset;
89 UINTN CommonVariableSpace;
90 UINTN CommonMaxUserVariableSpace;
91 UINTN CommonRuntimeVariableSpace;
92 UINTN CommonVariableTotalSize;
93 UINTN CommonUserVariableTotalSize;
94 UINTN HwErrVariableTotalSize;
95 CHAR8 *PlatformLangCodes;
96 CHAR8 *LangCodes;
97 CHAR8 *PlatformLang;
98 CHAR8 Lang[ISO_639_2_ENTRY_SIZE + 1];
99 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbInstance;
100 } VARIABLE_MODULE_GLOBAL;
101
102 typedef struct {
103 EFI_GUID *Guid;
104 CHAR16 *Name;
105 UINTN VariableSize;
106 } VARIABLE_ENTRY_CONSISTENCY;
107
108 typedef struct {
109 LIST_ENTRY Link;
110 EFI_GUID Guid;
111 //CHAR16 *Name;
112 } VARIABLE_ENTRY;
113
114 /**
115 Flush the HOB variable to flash.
116
117 @param[in] VariableName Name of variable has been updated or deleted.
118 @param[in] VendorGuid Guid of variable has been updated or deleted.
119
120 **/
121 VOID
122 FlushHobVariableToFlash (
123 IN CHAR16 *VariableName,
124 IN EFI_GUID *VendorGuid
125 );
126
127 /**
128 Writes a buffer to variable storage space, in the working block.
129
130 This function writes a buffer to variable storage space into a firmware
131 volume block device. The destination is specified by the parameter
132 VariableBase. Fault Tolerant Write protocol is used for writing.
133
134 @param VariableBase Base address of the variable to write.
135 @param VariableBuffer Point to the variable data buffer.
136
137 @retval EFI_SUCCESS The function completed successfully.
138 @retval EFI_NOT_FOUND Fail to locate Fault Tolerant Write protocol.
139 @retval EFI_ABORTED The function could not complete successfully.
140
141 **/
142 EFI_STATUS
143 FtwVariableSpace (
144 IN EFI_PHYSICAL_ADDRESS VariableBase,
145 IN VARIABLE_STORE_HEADER *VariableBuffer
146 );
147
148
149 /**
150 Update the variable region with Variable information. These are the same
151 arguments as the EFI Variable services.
152
153 @param[in] VariableName Name of variable.
154
155 @param[in] VendorGuid Guid of variable.
156
157 @param[in] Data Variable data.
158
159 @param[in] DataSize Size of data. 0 means delete.
160
161 @param[in] Attributes Attribues of the variable.
162
163 @param[in, out] Variable The variable information that is used to keep track of variable usage.
164
165 @retval EFI_SUCCESS The update operation is success.
166
167 @retval EFI_OUT_OF_RESOURCES Variable region is full, cannot write other data into this region.
168
169 **/
170 EFI_STATUS
171 UpdateVariable (
172 IN CHAR16 *VariableName,
173 IN EFI_GUID *VendorGuid,
174 IN VOID *Data,
175 IN UINTN DataSize,
176 IN UINT32 Attributes OPTIONAL,
177 IN OUT VARIABLE_POINTER_TRACK *Variable
178 );
179
180
181 /**
182 Return TRUE if ExitBootServices () has been called.
183
184 @retval TRUE If ExitBootServices () has been called.
185 **/
186 BOOLEAN
187 AtRuntime (
188 VOID
189 );
190
191 /**
192 Initializes a basic mutual exclusion lock.
193
194 This function initializes a basic mutual exclusion lock to the released state
195 and returns the lock. Each lock provides mutual exclusion access at its task
196 priority level. Since there is no preemption or multiprocessor support in EFI,
197 acquiring the lock only consists of raising to the locks TPL.
198 If Lock is NULL, then ASSERT().
199 If Priority is not a valid TPL value, then ASSERT().
200
201 @param Lock A pointer to the lock data structure to initialize.
202 @param Priority EFI TPL is associated with the lock.
203
204 @return The lock.
205
206 **/
207 EFI_LOCK *
208 InitializeLock (
209 IN OUT EFI_LOCK *Lock,
210 IN EFI_TPL Priority
211 );
212
213
214 /**
215 Acquires lock only at boot time. Simply returns at runtime.
216
217 This is a temperary function that will be removed when
218 EfiAcquireLock() in UefiLib can handle the call in UEFI
219 Runtimer driver in RT phase.
220 It calls EfiAcquireLock() at boot time, and simply returns
221 at runtime.
222
223 @param Lock A pointer to the lock to acquire.
224
225 **/
226 VOID
227 AcquireLockOnlyAtBootTime (
228 IN EFI_LOCK *Lock
229 );
230
231
232 /**
233 Releases lock only at boot time. Simply returns at runtime.
234
235 This is a temperary function which will be removed when
236 EfiReleaseLock() in UefiLib can handle the call in UEFI
237 Runtimer driver in RT phase.
238 It calls EfiReleaseLock() at boot time and simply returns
239 at runtime.
240
241 @param Lock A pointer to the lock to release.
242
243 **/
244 VOID
245 ReleaseLockOnlyAtBootTime (
246 IN EFI_LOCK *Lock
247 );
248
249 /**
250 Retrive the FVB protocol interface by HANDLE.
251
252 @param[in] FvBlockHandle The handle of FVB protocol that provides services for
253 reading, writing, and erasing the target block.
254 @param[out] FvBlock The interface of FVB protocol
255
256 @retval EFI_SUCCESS The interface information for the specified protocol was returned.
257 @retval EFI_UNSUPPORTED The device does not support the FVB protocol.
258 @retval EFI_INVALID_PARAMETER FvBlockHandle is not a valid EFI_HANDLE or FvBlock is NULL.
259
260 **/
261 EFI_STATUS
262 GetFvbByHandle (
263 IN EFI_HANDLE FvBlockHandle,
264 OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL **FvBlock
265 );
266
267
268 /**
269 Retrive the Swap Address Range protocol interface.
270
271 @param[out] SarProtocol The interface of SAR protocol
272
273 @retval EFI_SUCCESS The SAR protocol instance was found and returned in SarProtocol.
274 @retval EFI_NOT_FOUND The SAR protocol instance was not found.
275 @retval EFI_INVALID_PARAMETER SarProtocol is NULL.
276
277 **/
278 EFI_STATUS
279 GetSarProtocol (
280 OUT VOID **SarProtocol
281 );
282
283 /**
284 Function returns an array of handles that support the FVB protocol
285 in a buffer allocated from pool.
286
287 @param[out] NumberHandles The number of handles returned in Buffer.
288 @param[out] Buffer A pointer to the buffer to return the requested
289 array of handles that support FVB protocol.
290
291 @retval EFI_SUCCESS The array of handles was returned in Buffer, and the number of
292 handles in Buffer was returned in NumberHandles.
293 @retval EFI_NOT_FOUND No FVB handle was found.
294 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the matching results.
295 @retval EFI_INVALID_PARAMETER NumberHandles is NULL or Buffer is NULL.
296
297 **/
298 EFI_STATUS
299 GetFvbCountAndBuffer (
300 OUT UINTN *NumberHandles,
301 OUT EFI_HANDLE **Buffer
302 );
303
304 /**
305 Initializes variable store area for non-volatile and volatile variable.
306
307 @retval EFI_SUCCESS Function successfully executed.
308 @retval EFI_OUT_OF_RESOURCES Fail to allocate enough memory resource.
309
310 **/
311 EFI_STATUS
312 VariableCommonInitialize (
313 VOID
314 );
315
316 /**
317 This function reclaims variable storage if free size is below the threshold.
318
319 **/
320 VOID
321 ReclaimForOS(
322 VOID
323 );
324
325
326 /**
327 Initializes variable write service after FVB was ready.
328
329 @retval EFI_SUCCESS Function successfully executed.
330 @retval Others Fail to initialize the variable service.
331
332 **/
333 EFI_STATUS
334 VariableWriteServiceInitialize (
335 VOID
336 );
337
338 /**
339 Retrive the SMM Fault Tolerent Write protocol interface.
340
341 @param[out] FtwProtocol The interface of SMM Ftw protocol
342
343 @retval EFI_SUCCESS The SMM SAR protocol instance was found and returned in SarProtocol.
344 @retval EFI_NOT_FOUND The SMM SAR protocol instance was not found.
345 @retval EFI_INVALID_PARAMETER SarProtocol is NULL.
346
347 **/
348 EFI_STATUS
349 GetFtwProtocol (
350 OUT VOID **FtwProtocol
351 );
352
353 /**
354 Get the proper fvb handle and/or fvb protocol by the given Flash address.
355
356 @param[in] Address The Flash address.
357 @param[out] FvbHandle In output, if it is not NULL, it points to the proper FVB handle.
358 @param[out] FvbProtocol In output, if it is not NULL, it points to the proper FVB protocol.
359
360 **/
361 EFI_STATUS
362 GetFvbInfoByAddress (
363 IN EFI_PHYSICAL_ADDRESS Address,
364 OUT EFI_HANDLE *FvbHandle OPTIONAL,
365 OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL **FvbProtocol OPTIONAL
366 );
367
368 /**
369 Finds variable in storage blocks of volatile and non-volatile storage areas.
370
371 This code finds variable in storage blocks of volatile and non-volatile storage areas.
372 If VariableName is an empty string, then we just return the first
373 qualified variable without comparing VariableName and VendorGuid.
374 If IgnoreRtCheck is TRUE, then we ignore the EFI_VARIABLE_RUNTIME_ACCESS attribute check
375 at runtime when searching existing variable, only VariableName and VendorGuid are compared.
376 Otherwise, variables without EFI_VARIABLE_RUNTIME_ACCESS are not visible at runtime.
377
378 @param VariableName Name of the variable to be found.
379 @param VendorGuid Vendor GUID to be found.
380 @param PtrTrack VARIABLE_POINTER_TRACK structure for output,
381 including the range searched and the target position.
382 @param Global Pointer to VARIABLE_GLOBAL structure, including
383 base of volatile variable storage area, base of
384 NV variable storage area, and a lock.
385 @param IgnoreRtCheck Ignore EFI_VARIABLE_RUNTIME_ACCESS attribute
386 check at runtime when searching variable.
387
388 @retval EFI_INVALID_PARAMETER If VariableName is not an empty string, while
389 VendorGuid is NULL.
390 @retval EFI_SUCCESS Variable successfully found.
391 @retval EFI_NOT_FOUND Variable not found
392
393 **/
394 EFI_STATUS
395 FindVariable (
396 IN CHAR16 *VariableName,
397 IN EFI_GUID *VendorGuid,
398 OUT VARIABLE_POINTER_TRACK *PtrTrack,
399 IN VARIABLE_GLOBAL *Global,
400 IN BOOLEAN IgnoreRtCheck
401 );
402
403 /**
404
405 This code finds variable in storage blocks (Volatile or Non-Volatile).
406
407 @param VariableName Name of Variable to be found.
408 @param VendorGuid Variable vendor GUID.
409 @param Attributes Attribute value of the variable found.
410 @param DataSize Size of Data found. If size is less than the
411 data, this value contains the required size.
412 @param Data Data pointer.
413
414 @return EFI_INVALID_PARAMETER Invalid parameter.
415 @return EFI_SUCCESS Find the specified variable.
416 @return EFI_NOT_FOUND Not found.
417 @return EFI_BUFFER_TO_SMALL DataSize is too small for the result.
418
419 **/
420 EFI_STATUS
421 EFIAPI
422 VariableServiceGetVariable (
423 IN CHAR16 *VariableName,
424 IN EFI_GUID *VendorGuid,
425 OUT UINT32 *Attributes OPTIONAL,
426 IN OUT UINTN *DataSize,
427 OUT VOID *Data
428 );
429
430 /**
431
432 This code Finds the Next available variable.
433
434 Caution: This function may receive untrusted input.
435 This function may be invoked in SMM mode. This function will do basic validation, before parse the data.
436
437 @param VariableNameSize Size of the variable name.
438 @param VariableName Pointer to variable name.
439 @param VendorGuid Variable Vendor Guid.
440
441 @return EFI_INVALID_PARAMETER Invalid parameter.
442 @return EFI_SUCCESS Find the specified variable.
443 @return EFI_NOT_FOUND Not found.
444 @return EFI_BUFFER_TO_SMALL DataSize is too small for the result.
445
446 **/
447 EFI_STATUS
448 EFIAPI
449 VariableServiceGetNextVariableName (
450 IN OUT UINTN *VariableNameSize,
451 IN OUT CHAR16 *VariableName,
452 IN OUT EFI_GUID *VendorGuid
453 );
454
455 /**
456
457 This code sets variable in storage blocks (Volatile or Non-Volatile).
458
459 Caution: This function may receive untrusted input.
460 This function may be invoked in SMM mode, and datasize and data are external input.
461 This function will do basic validation, before parse the data.
462
463 @param VariableName Name of Variable to be found.
464 @param VendorGuid Variable vendor GUID.
465 @param Attributes Attribute value of the variable found
466 @param DataSize Size of Data found. If size is less than the
467 data, this value contains the required size.
468 @param Data Data pointer.
469
470 @return EFI_INVALID_PARAMETER Invalid parameter.
471 @return EFI_SUCCESS Set successfully.
472 @return EFI_OUT_OF_RESOURCES Resource not enough to set variable.
473 @return EFI_NOT_FOUND Not found.
474 @return EFI_WRITE_PROTECTED Variable is read-only.
475
476 **/
477 EFI_STATUS
478 EFIAPI
479 VariableServiceSetVariable (
480 IN CHAR16 *VariableName,
481 IN EFI_GUID *VendorGuid,
482 IN UINT32 Attributes,
483 IN UINTN DataSize,
484 IN VOID *Data
485 );
486
487 /**
488
489 This code returns information about the EFI variables.
490
491 Caution: This function may receive untrusted input.
492 This function may be invoked in SMM mode. This function will do basic validation, before parse the data.
493
494 @param Attributes Attributes bitmask to specify the type of variables
495 on which to return information.
496 @param MaximumVariableStorageSize Pointer to the maximum size of the storage space available
497 for the EFI variables associated with the attributes specified.
498 @param RemainingVariableStorageSize Pointer to the remaining size of the storage space available
499 for EFI variables associated with the attributes specified.
500 @param MaximumVariableSize Pointer to the maximum size of an individual EFI variables
501 associated with the attributes specified.
502
503 @return EFI_SUCCESS Query successfully.
504
505 **/
506 EFI_STATUS
507 EFIAPI
508 VariableServiceQueryVariableInfoInternal (
509 IN UINT32 Attributes,
510 OUT UINT64 *MaximumVariableStorageSize,
511 OUT UINT64 *RemainingVariableStorageSize,
512 OUT UINT64 *MaximumVariableSize
513 );
514
515 /**
516
517 This code returns information about the EFI variables.
518
519 Caution: This function may receive untrusted input.
520 This function may be invoked in SMM mode. This function will do basic validation, before parse the data.
521
522 @param Attributes Attributes bitmask to specify the type of variables
523 on which to return information.
524 @param MaximumVariableStorageSize Pointer to the maximum size of the storage space available
525 for the EFI variables associated with the attributes specified.
526 @param RemainingVariableStorageSize Pointer to the remaining size of the storage space available
527 for EFI variables associated with the attributes specified.
528 @param MaximumVariableSize Pointer to the maximum size of an individual EFI variables
529 associated with the attributes specified.
530
531 @return EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied.
532 @return EFI_SUCCESS Query successfully.
533 @return EFI_UNSUPPORTED The attribute is not supported on this platform.
534
535 **/
536 EFI_STATUS
537 EFIAPI
538 VariableServiceQueryVariableInfo (
539 IN UINT32 Attributes,
540 OUT UINT64 *MaximumVariableStorageSize,
541 OUT UINT64 *RemainingVariableStorageSize,
542 OUT UINT64 *MaximumVariableSize
543 );
544
545 /**
546 Mark a variable that will become read-only after leaving the DXE phase of execution.
547
548 @param[in] This The VARIABLE_LOCK_PROTOCOL instance.
549 @param[in] VariableName A pointer to the variable name that will be made read-only subsequently.
550 @param[in] VendorGuid A pointer to the vendor GUID that will be made read-only subsequently.
551
552 @retval EFI_SUCCESS The variable specified by the VariableName and the VendorGuid was marked
553 as pending to be read-only.
554 @retval EFI_INVALID_PARAMETER VariableName or VendorGuid is NULL.
555 Or VariableName is an empty string.
556 @retval EFI_ACCESS_DENIED EFI_END_OF_DXE_EVENT_GROUP_GUID or EFI_EVENT_GROUP_READY_TO_BOOT has
557 already been signaled.
558 @retval EFI_OUT_OF_RESOURCES There is not enough resource to hold the lock request.
559 **/
560 EFI_STATUS
561 EFIAPI
562 VariableLockRequestToLock (
563 IN CONST EDKII_VARIABLE_LOCK_PROTOCOL *This,
564 IN CHAR16 *VariableName,
565 IN EFI_GUID *VendorGuid
566 );
567
568 /**
569 Check if a Unicode character is a hexadecimal character.
570
571 This function checks if a Unicode character is a
572 hexadecimal character. The valid hexadecimal character is
573 L'0' to L'9', L'a' to L'f', or L'A' to L'F'.
574
575
576 @param Char The character to check against.
577
578 @retval TRUE If the Char is a hexadecmial character.
579 @retval FALSE If the Char is not a hexadecmial character.
580
581 **/
582 BOOLEAN
583 EFIAPI
584 IsHexaDecimalDigitCharacter (
585 IN CHAR16 Char
586 );
587
588 /**
589 Internal SetVariable check.
590
591 @param[in] VariableName Name of Variable to set.
592 @param[in] VendorGuid Variable vendor GUID.
593 @param[in] Attributes Attribute value of the variable.
594 @param[in] DataSize Size of Data to set.
595 @param[in] Data Data pointer.
596
597 @retval EFI_SUCCESS The SetVariable check result was success.
598 @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits, name, and GUID were supplied,
599 or the DataSize exceeds the minimum or maximum allowed,
600 or the Data value is not following UEFI spec for UEFI defined variables.
601 @retval EFI_WRITE_PROTECTED The variable in question is read-only.
602 @retval Others The return status from check handler.
603
604 **/
605 EFI_STATUS
606 EFIAPI
607 InternalVarCheckSetVariableCheck (
608 IN CHAR16 *VariableName,
609 IN EFI_GUID *VendorGuid,
610 IN UINT32 Attributes,
611 IN UINTN DataSize,
612 IN VOID *Data
613 );
614
615 /**
616 Register SetVariable check handler.
617
618 @param[in] Handler Pointer to check handler.
619
620 @retval EFI_SUCCESS The SetVariable check handler was registered successfully.
621 @retval EFI_INVALID_PARAMETER Handler is NULL.
622 @retval EFI_ACCESS_DENIED EFI_END_OF_DXE_EVENT_GROUP_GUID or EFI_EVENT_GROUP_READY_TO_BOOT has
623 already been signaled.
624 @retval EFI_OUT_OF_RESOURCES There is not enough resource for the SetVariable check handler register request.
625 @retval EFI_UNSUPPORTED This interface is not implemented.
626 For example, it is unsupported in VarCheck protocol if both VarCheck and SmmVarCheck protocols are present.
627
628 **/
629 EFI_STATUS
630 EFIAPI
631 VarCheckRegisterSetVariableCheckHandler (
632 IN VAR_CHECK_SET_VARIABLE_CHECK_HANDLER Handler
633 );
634
635 /**
636 Variable property set.
637
638 @param[in] Name Pointer to the variable name.
639 @param[in] Guid Pointer to the vendor GUID.
640 @param[in] VariableProperty Pointer to the input variable property.
641
642 @retval EFI_SUCCESS The property of variable specified by the Name and Guid was set successfully.
643 @retval EFI_INVALID_PARAMETER Name, Guid or VariableProperty is NULL, or Name is an empty string,
644 or the fields of VariableProperty are not valid.
645 @retval EFI_ACCESS_DENIED EFI_END_OF_DXE_EVENT_GROUP_GUID or EFI_EVENT_GROUP_READY_TO_BOOT has
646 already been signaled.
647 @retval EFI_OUT_OF_RESOURCES There is not enough resource for the variable property set request.
648
649 **/
650 EFI_STATUS
651 EFIAPI
652 VarCheckVariablePropertySet (
653 IN CHAR16 *Name,
654 IN EFI_GUID *Guid,
655 IN VAR_CHECK_VARIABLE_PROPERTY *VariableProperty
656 );
657
658 /**
659 Internal variable property get.
660
661 @param[in] Name Pointer to the variable name.
662 @param[in] Guid Pointer to the vendor GUID.
663 @param[out] VariableProperty Pointer to the output variable property.
664
665 @retval EFI_SUCCESS The property of variable specified by the Name and Guid was got successfully.
666 @retval EFI_NOT_FOUND The property of variable specified by the Name and Guid was not found.
667
668 **/
669 EFI_STATUS
670 EFIAPI
671 InternalVarCheckVariablePropertyGet (
672 IN CHAR16 *Name,
673 IN EFI_GUID *Guid,
674 OUT VAR_CHECK_VARIABLE_PROPERTY *VariableProperty
675 );
676
677 /**
678 Variable property get.
679
680 @param[in] Name Pointer to the variable name.
681 @param[in] Guid Pointer to the vendor GUID.
682 @param[out] VariableProperty Pointer to the output variable property.
683
684 @retval EFI_SUCCESS The property of variable specified by the Name and Guid was got successfully.
685 @retval EFI_INVALID_PARAMETER Name, Guid or VariableProperty is NULL, or Name is an empty string.
686 @retval EFI_NOT_FOUND The property of variable specified by the Name and Guid was not found.
687
688 **/
689 EFI_STATUS
690 EFIAPI
691 VarCheckVariablePropertyGet (
692 IN CHAR16 *Name,
693 IN EFI_GUID *Guid,
694 OUT VAR_CHECK_VARIABLE_PROPERTY *VariableProperty
695 );
696
697 /**
698 Initialize variable quota.
699
700 **/
701 VOID
702 InitializeVariableQuota (
703 VOID
704 );
705
706 extern VARIABLE_MODULE_GLOBAL *mVariableModuleGlobal;
707
708 #endif