]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h
ShellPkg: Added function ShellDeleteByName which deletes a file by name.
[mirror_edk2.git] / SecurityPkg / VariableAuthenticated / RuntimeDxe / Variable.h
CommitLineData
0c18794e 1/** @file\r
2 The internal header file includes the common header files, defines\r
3 internal structure and functions used by Variable modules.\r
4\r
83758cdc 5Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
0c18794e 6This program and the accompanying materials \r
7are licensed and made available under the terms and conditions of the BSD License \r
8which accompanies this distribution. The full text of the license may be found at \r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef _VARIABLE_H_\r
17#define _VARIABLE_H_\r
18\r
19#include <PiDxe.h>\r
20#include <Protocol/VariableWrite.h>\r
21#include <Protocol/FaultTolerantWrite.h>\r
22#include <Protocol/FirmwareVolumeBlock.h>\r
23#include <Protocol/Variable.h>\r
24#include <Library/PcdLib.h>\r
9a000b46 25#include <Library/HobLib.h>\r
0c18794e 26#include <Library/UefiDriverEntryPoint.h>\r
27#include <Library/DxeServicesTableLib.h>\r
28#include <Library/UefiRuntimeLib.h>\r
29#include <Library/DebugLib.h>\r
30#include <Library/BaseMemoryLib.h>\r
31#include <Library/UefiBootServicesTableLib.h>\r
32#include <Library/UefiLib.h>\r
33#include <Library/BaseLib.h>\r
34#include <Library/SynchronizationLib.h>\r
35#include <Library/MemoryAllocationLib.h>\r
36#include <Library/BaseCryptLib.h>\r
37#include <Library/PlatformSecureLib.h>\r
38#include <Guid/GlobalVariable.h>\r
39#include <Guid/EventGroup.h>\r
40#include <Guid/AuthenticatedVariableFormat.h>\r
41#include <Guid/ImageAuthentication.h>\r
4d832aab 42#include <Guid/SystemNvDataGuid.h>\r
a5f15e30 43#include <Guid/HardwareErrorVariable.h>\r
0c18794e 44\r
45#define VARIABLE_RECLAIM_THRESHOLD (1024)\r
275beb2b 46#define EFI_VARIABLE_ATTRIBUTES_MASK (EFI_VARIABLE_NON_VOLATILE | \\r
47 EFI_VARIABLE_BOOTSERVICE_ACCESS | \\r
48 EFI_VARIABLE_RUNTIME_ACCESS | \\r
49 EFI_VARIABLE_HARDWARE_ERROR_RECORD | \\r
50 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \\r
51 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \\r
52 EFI_VARIABLE_APPEND_WRITE)\r
0c18794e 53\r
54///\r
55/// The size of a 3 character ISO639 language code.\r
56///\r
57#define ISO_639_2_ENTRY_SIZE 3\r
58\r
9a000b46
RN
59typedef enum {\r
60 VariableStoreTypeVolatile,\r
61 VariableStoreTypeHob,\r
62 VariableStoreTypeNv,\r
63 VariableStoreTypeMax\r
64} VARIABLE_STORE_TYPE;\r
65\r
0c18794e 66typedef struct {\r
67 VARIABLE_HEADER *CurrPtr;\r
23b06935
SZ
68 //\r
69 // If both ADDED and IN_DELETED_TRANSITION variable are present,\r
70 // InDeletedTransitionPtr will point to the IN_DELETED_TRANSITION one.\r
71 // Otherwise, CurrPtr will point to the ADDED or IN_DELETED_TRANSITION one,\r
72 // and InDeletedTransitionPtr will be NULL at the same time.\r
73 //\r
74 VARIABLE_HEADER *InDeletedTransitionPtr;\r
0c18794e 75 VARIABLE_HEADER *EndPtr;\r
76 VARIABLE_HEADER *StartPtr;\r
77 BOOLEAN Volatile;\r
78} VARIABLE_POINTER_TRACK;\r
79\r
80typedef struct {\r
9a000b46 81 EFI_PHYSICAL_ADDRESS HobVariableBase;\r
0c18794e 82 EFI_PHYSICAL_ADDRESS VolatileVariableBase;\r
83 EFI_PHYSICAL_ADDRESS NonVolatileVariableBase;\r
84 EFI_LOCK VariableServicesLock;\r
85 UINT32 ReentrantState;\r
86} VARIABLE_GLOBAL;\r
87\r
88typedef struct {\r
89 VARIABLE_GLOBAL VariableGlobal;\r
90 UINTN VolatileLastVariableOffset;\r
91 UINTN NonVolatileLastVariableOffset;\r
92 UINTN CommonVariableTotalSize;\r
93 UINTN HwErrVariableTotalSize;\r
94 CHAR8 *PlatformLangCodes;\r
95 CHAR8 *LangCodes;\r
96 CHAR8 *PlatformLang;\r
97 CHAR8 Lang[ISO_639_2_ENTRY_SIZE + 1];\r
98 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbInstance;\r
99} VARIABLE_MODULE_GLOBAL;\r
100\r
101typedef struct {\r
102 EFI_GUID *Guid;\r
103 CHAR16 *Name;\r
104 UINT32 Attributes;\r
105 UINTN DataSize;\r
106 VOID *Data;\r
107} VARIABLE_CACHE_ENTRY;\r
108\r
335e2681
SZ
109/**\r
110 Flush the HOB variable to flash.\r
111\r
112 @param[in] VariableName Name of variable has been updated or deleted.\r
113 @param[in] VendorGuid Guid of variable has been updated or deleted.\r
114\r
115**/\r
116VOID\r
117FlushHobVariableToFlash (\r
118 IN CHAR16 *VariableName,\r
119 IN EFI_GUID *VendorGuid\r
120 );\r
121\r
0c18794e 122/**\r
123 Writes a buffer to variable storage space, in the working block.\r
124\r
125 This function writes a buffer to variable storage space into a firmware\r
126 volume block device. The destination is specified by the parameter\r
127 VariableBase. Fault Tolerant Write protocol is used for writing.\r
128\r
129 @param VariableBase Base address of the variable to write.\r
130 @param Buffer Point to the data buffer.\r
131 @param BufferSize The number of bytes of the data Buffer.\r
132\r
133 @retval EFI_SUCCESS The function completed successfully.\r
134 @retval EFI_NOT_FOUND Fail to locate Fault Tolerant Write protocol.\r
135 @retval EFI_ABORTED The function could not complete successfully.\r
136\r
137**/\r
138EFI_STATUS\r
139FtwVariableSpace (\r
140 IN EFI_PHYSICAL_ADDRESS VariableBase,\r
141 IN UINT8 *Buffer,\r
142 IN UINTN BufferSize\r
143 );\r
144\r
145/**\r
146 Finds variable in storage blocks of volatile and non-volatile storage areas.\r
147\r
148 This code finds variable in storage blocks of volatile and non-volatile storage areas.\r
149 If VariableName is an empty string, then we just return the first\r
150 qualified variable without comparing VariableName and VendorGuid.\r
9622df63
SZ
151 If IgnoreRtCheck is TRUE, then we ignore the EFI_VARIABLE_RUNTIME_ACCESS attribute check\r
152 at runtime when searching existing variable, only VariableName and VendorGuid are compared.\r
153 Otherwise, variables without EFI_VARIABLE_RUNTIME_ACCESS are not visible at runtime.\r
0c18794e 154\r
ecc722ad 155 @param[in] VariableName Name of the variable to be found.\r
156 @param[in] VendorGuid Vendor GUID to be found.\r
157 @param[out] PtrTrack VARIABLE_POINTER_TRACK structure for output,\r
0c18794e 158 including the range searched and the target position.\r
ecc722ad 159 @param[in] Global Pointer to VARIABLE_GLOBAL structure, including\r
0c18794e 160 base of volatile variable storage area, base of\r
161 NV variable storage area, and a lock.\r
9622df63
SZ
162 @param[in] IgnoreRtCheck Ignore EFI_VARIABLE_RUNTIME_ACCESS attribute\r
163 check at runtime when searching variable.\r
0c18794e 164\r
165 @retval EFI_INVALID_PARAMETER If VariableName is not an empty string, while\r
166 VendorGuid is NULL.\r
167 @retval EFI_SUCCESS Variable successfully found.\r
ecc722ad 168 @retval EFI_NOT_FOUND Variable not found\r
0c18794e 169\r
170**/\r
171EFI_STATUS\r
172FindVariable (\r
173 IN CHAR16 *VariableName,\r
174 IN EFI_GUID *VendorGuid,\r
175 OUT VARIABLE_POINTER_TRACK *PtrTrack,\r
ecc722ad 176 IN VARIABLE_GLOBAL *Global,\r
9622df63 177 IN BOOLEAN IgnoreRtCheck\r
0c18794e 178 );\r
179\r
180/**\r
181\r
182 This code gets the pointer to the variable data.\r
183\r
184 @param Variable Pointer to the Variable Header.\r
185\r
186 @return Pointer to Variable Data.\r
187\r
188**/\r
189UINT8 *\r
190GetVariableDataPtr (\r
191 IN VARIABLE_HEADER *Variable\r
192 );\r
193\r
194/**\r
195\r
196 This code gets the size of variable data.\r
197\r
198 @param Variable Pointer to the Variable Header.\r
199\r
200 @return Size of variable in bytes.\r
201\r
202**/\r
203UINTN\r
204DataSizeOfVariable (\r
205 IN VARIABLE_HEADER *Variable\r
206 );\r
207\r
208/**\r
209 Update the variable region with Variable information. If EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is set,\r
210 index of associated public key is needed.\r
211\r
212 @param[in] VariableName Name of variable.\r
213 @param[in] VendorGuid Guid of variable.\r
214 @param[in] Data Variable data.\r
215 @param[in] DataSize Size of data. 0 means delete.\r
216 @param[in] Attributes Attributes of the variable.\r
217 @param[in] KeyIndex Index of associated public key.\r
218 @param[in] MonotonicCount Value of associated monotonic count.\r
23b06935 219 @param[in, out] Variable The variable information that is used to keep track of variable usage.\r
0c18794e 220\r
221 @param[in] TimeStamp Value of associated TimeStamp.\r
222\r
223 @retval EFI_SUCCESS The update operation is success.\r
224 @retval EFI_OUT_OF_RESOURCES Variable region is full, cannot write other data into this region.\r
225\r
226**/\r
227EFI_STATUS\r
228UpdateVariable (\r
229 IN CHAR16 *VariableName,\r
230 IN EFI_GUID *VendorGuid,\r
231 IN VOID *Data,\r
232 IN UINTN DataSize,\r
233 IN UINT32 Attributes OPTIONAL,\r
234 IN UINT32 KeyIndex OPTIONAL,\r
235 IN UINT64 MonotonicCount OPTIONAL,\r
23b06935 236 IN OUT VARIABLE_POINTER_TRACK *Variable,\r
0c18794e 237 IN EFI_TIME *TimeStamp OPTIONAL \r
238 );\r
239\r
240\r
241/**\r
242 Return TRUE if ExitBootServices () has been called.\r
243 \r
244 @retval TRUE If ExitBootServices () has been called.\r
245**/\r
246BOOLEAN\r
247AtRuntime (\r
248 VOID\r
249 );\r
250\r
251/**\r
252 Initializes a basic mutual exclusion lock.\r
253\r
254 This function initializes a basic mutual exclusion lock to the released state \r
255 and returns the lock. Each lock provides mutual exclusion access at its task \r
256 priority level. Since there is no preemption or multiprocessor support in EFI,\r
257 acquiring the lock only consists of raising to the locks TPL.\r
258 If Lock is NULL, then ASSERT().\r
259 If Priority is not a valid TPL value, then ASSERT().\r
260\r
261 @param Lock A pointer to the lock data structure to initialize.\r
262 @param Priority EFI TPL is associated with the lock.\r
263\r
264 @return The lock.\r
265\r
266**/\r
267EFI_LOCK *\r
268InitializeLock (\r
269 IN OUT EFI_LOCK *Lock,\r
270 IN EFI_TPL Priority\r
271 );\r
272\r
273 \r
274/**\r
275 Acquires lock only at boot time. Simply returns at runtime.\r
276\r
277 This is a temperary function that will be removed when\r
278 EfiAcquireLock() in UefiLib can handle the call in UEFI\r
279 Runtimer driver in RT phase.\r
280 It calls EfiAcquireLock() at boot time, and simply returns\r
281 at runtime.\r
282\r
283 @param Lock A pointer to the lock to acquire.\r
284\r
285**/\r
286VOID\r
287AcquireLockOnlyAtBootTime (\r
288 IN EFI_LOCK *Lock\r
289 );\r
290\r
291\r
292/**\r
293 Releases lock only at boot time. Simply returns at runtime.\r
294\r
295 This is a temperary function which will be removed when\r
296 EfiReleaseLock() in UefiLib can handle the call in UEFI\r
297 Runtimer driver in RT phase.\r
298 It calls EfiReleaseLock() at boot time and simply returns\r
299 at runtime.\r
300\r
301 @param Lock A pointer to the lock to release.\r
302\r
303**/\r
304VOID\r
305ReleaseLockOnlyAtBootTime (\r
306 IN EFI_LOCK *Lock\r
307 ); \r
308\r
309/**\r
310 Retrive the FVB protocol interface by HANDLE.\r
311\r
312 @param[in] FvBlockHandle The handle of FVB protocol that provides services for\r
313 reading, writing, and erasing the target block.\r
314 @param[out] FvBlock The interface of FVB protocol\r
315\r
316 @retval EFI_SUCCESS The interface information for the specified protocol was returned.\r
317 @retval EFI_UNSUPPORTED The device does not support the FVB protocol.\r
318 @retval EFI_INVALID_PARAMETER FvBlockHandle is not a valid EFI_HANDLE or FvBlock is NULL.\r
319 \r
320**/\r
321EFI_STATUS\r
322GetFvbByHandle (\r
323 IN EFI_HANDLE FvBlockHandle,\r
324 OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL **FvBlock\r
325 );\r
326\r
327\r
328/**\r
329 Retrive the Swap Address Range protocol interface.\r
330\r
331 @param[out] SarProtocol The interface of SAR protocol\r
332\r
333 @retval EFI_SUCCESS The SAR protocol instance was found and returned in SarProtocol.\r
334 @retval EFI_NOT_FOUND The SAR protocol instance was not found.\r
335 @retval EFI_INVALID_PARAMETER SarProtocol is NULL.\r
336\r
337**/\r
338EFI_STATUS\r
339GetSarProtocol (\r
340 OUT VOID **SarProtocol\r
341 );\r
342\r
343/**\r
344 Function returns an array of handles that support the FVB protocol\r
345 in a buffer allocated from pool. \r
346\r
347 @param[out] NumberHandles The number of handles returned in Buffer.\r
348 @param[out] Buffer A pointer to the buffer to return the requested\r
349 array of handles that support FVB protocol.\r
350\r
351 @retval EFI_SUCCESS The array of handles was returned in Buffer, and the number of\r
352 handles in Buffer was returned in NumberHandles.\r
353 @retval EFI_NOT_FOUND No FVB handle was found.\r
354 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the matching results.\r
355 @retval EFI_INVALID_PARAMETER NumberHandles is NULL or Buffer is NULL.\r
356 \r
357**/\r
358EFI_STATUS\r
359GetFvbCountAndBuffer (\r
360 OUT UINTN *NumberHandles,\r
361 OUT EFI_HANDLE **Buffer\r
362 );\r
363\r
364/**\r
365 Initializes variable store area for non-volatile and volatile variable.\r
366\r
367 @retval EFI_SUCCESS Function successfully executed.\r
368 @retval EFI_OUT_OF_RESOURCES Fail to allocate enough memory resource.\r
369\r
370**/\r
371EFI_STATUS\r
372VariableCommonInitialize (\r
373 VOID\r
374 );\r
375\r
83758cdc 376/**\r
377\r
378 Variable store garbage collection and reclaim operation.\r
379\r
380 If ReclaimPubKeyStore is FALSE, reclaim variable space by deleting the obsoleted varaibles.\r
381 If ReclaimPubKeyStore is TRUE, reclaim invalid key in public key database and update the PubKeyIndex\r
382 for all the count-based authenticate variable in NV storage.\r
383\r
384 @param[in] VariableBase Base address of variable store.\r
385 @param[out] LastVariableOffset Offset of last variable.\r
386 @param[in] IsVolatile The variable store is volatile or not;\r
387 if it is non-volatile, need FTW.\r
23b06935 388 @param[in, out] UpdatingPtrTrack Pointer to updating variable pointer track structure.\r
83758cdc 389 @param[in] ReclaimPubKeyStore Reclaim for public key database or not.\r
390 @param[in] ReclaimAnyway If TRUE, do reclaim anyway.\r
391 \r
392 @return EFI_OUT_OF_RESOURCES No enough memory resources.\r
393 @return EFI_SUCCESS Reclaim operation has finished successfully.\r
394 @return Others Unexpect error happened during reclaim operation.\r
395\r
396**/\r
397EFI_STATUS\r
398Reclaim (\r
399 IN EFI_PHYSICAL_ADDRESS VariableBase,\r
400 OUT UINTN *LastVariableOffset,\r
401 IN BOOLEAN IsVolatile,\r
23b06935 402 IN OUT VARIABLE_POINTER_TRACK *UpdatingPtrTrack,\r
83758cdc 403 IN BOOLEAN ReclaimPubKeyStore,\r
404 IN BOOLEAN ReclaimAnyway\r
405 );\r
406\r
0c18794e 407/**\r
408 This function reclaims variable storage if free size is below the threshold.\r
409 \r
410**/\r
411VOID\r
412ReclaimForOS(\r
413 VOID\r
414 ); \r
415\r
416\r
417/**\r
418 Initializes variable write service after FVB was ready.\r
419\r
420 @retval EFI_SUCCESS Function successfully executed.\r
421 @retval Others Fail to initialize the variable service.\r
422\r
423**/\r
424EFI_STATUS\r
425VariableWriteServiceInitialize (\r
426 VOID\r
427 );\r
428 \r
429/**\r
430 Retrive the SMM Fault Tolerent Write protocol interface.\r
431\r
432 @param[out] FtwProtocol The interface of SMM Ftw protocol\r
433\r
434 @retval EFI_SUCCESS The SMM SAR protocol instance was found and returned in SarProtocol.\r
435 @retval EFI_NOT_FOUND The SMM SAR protocol instance was not found.\r
436 @retval EFI_INVALID_PARAMETER SarProtocol is NULL.\r
437\r
438**/\r
439EFI_STATUS\r
440GetFtwProtocol (\r
441 OUT VOID **FtwProtocol\r
442 );\r
443\r
444/**\r
445 Get the proper fvb handle and/or fvb protocol by the given Flash address.\r
446\r
447 @param[in] Address The Flash address.\r
448 @param[out] FvbHandle In output, if it is not NULL, it points to the proper FVB handle.\r
449 @param[out] FvbProtocol In output, if it is not NULL, it points to the proper FVB protocol.\r
450\r
451**/\r
452EFI_STATUS\r
453GetFvbInfoByAddress (\r
454 IN EFI_PHYSICAL_ADDRESS Address,\r
455 OUT EFI_HANDLE *FvbHandle OPTIONAL,\r
456 OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL **FvbProtocol OPTIONAL\r
457 );\r
458\r
459/**\r
460\r
461 This code finds variable in storage blocks (Volatile or Non-Volatile).\r
462\r
dc204d5a
JY
463 Caution: This function may receive untrusted input.\r
464 This function may be invoked in SMM mode, and datasize and data are external input.\r
465 This function will do basic validation, before parse the data.\r
466\r
0c18794e 467 @param VariableName Name of Variable to be found.\r
468 @param VendorGuid Variable vendor GUID.\r
469 @param Attributes Attribute value of the variable found.\r
470 @param DataSize Size of Data found. If size is less than the\r
471 data, this value contains the required size.\r
472 @param Data Data pointer.\r
473 \r
474 @return EFI_INVALID_PARAMETER Invalid parameter.\r
475 @return EFI_SUCCESS Find the specified variable.\r
476 @return EFI_NOT_FOUND Not found.\r
477 @return EFI_BUFFER_TO_SMALL DataSize is too small for the result.\r
478\r
479**/\r
480EFI_STATUS\r
481EFIAPI\r
482VariableServiceGetVariable (\r
483 IN CHAR16 *VariableName,\r
484 IN EFI_GUID *VendorGuid,\r
485 OUT UINT32 *Attributes OPTIONAL,\r
486 IN OUT UINTN *DataSize,\r
487 OUT VOID *Data\r
488 );\r
489\r
490/**\r
491\r
492 This code Finds the Next available variable.\r
493\r
dc204d5a
JY
494 Caution: This function may receive untrusted input.\r
495 This function may be invoked in SMM mode. This function will do basic validation, before parse the data.\r
496\r
0c18794e 497 @param VariableNameSize Size of the variable name.\r
498 @param VariableName Pointer to variable name.\r
499 @param VendorGuid Variable Vendor Guid.\r
500\r
501 @return EFI_INVALID_PARAMETER Invalid parameter.\r
502 @return EFI_SUCCESS Find the specified variable.\r
503 @return EFI_NOT_FOUND Not found.\r
504 @return EFI_BUFFER_TO_SMALL DataSize is too small for the result.\r
505\r
506**/\r
507EFI_STATUS\r
508EFIAPI\r
509VariableServiceGetNextVariableName (\r
510 IN OUT UINTN *VariableNameSize,\r
511 IN OUT CHAR16 *VariableName,\r
512 IN OUT EFI_GUID *VendorGuid\r
513 );\r
514\r
515/**\r
516\r
517 This code sets variable in storage blocks (Volatile or Non-Volatile).\r
518\r
dc204d5a
JY
519 Caution: This function may receive untrusted input.\r
520 This function may be invoked in SMM mode, and datasize and data are external input.\r
521 This function will do basic validation, before parse the data.\r
522 This function will parse the authentication carefully to avoid security issues, like\r
523 buffer overflow, integer overflow.\r
524 This function will check attribute carefully to avoid authentication bypass.\r
525\r
0c18794e 526 @param VariableName Name of Variable to be found.\r
527 @param VendorGuid Variable vendor GUID.\r
528 @param Attributes Attribute value of the variable found\r
529 @param DataSize Size of Data found. If size is less than the\r
530 data, this value contains the required size.\r
531 @param Data Data pointer.\r
532\r
533 @return EFI_INVALID_PARAMETER Invalid parameter.\r
534 @return EFI_SUCCESS Set successfully.\r
535 @return EFI_OUT_OF_RESOURCES Resource not enough to set variable.\r
536 @return EFI_NOT_FOUND Not found.\r
537 @return EFI_WRITE_PROTECTED Variable is read-only.\r
538\r
539**/\r
540EFI_STATUS\r
541EFIAPI\r
542VariableServiceSetVariable (\r
543 IN CHAR16 *VariableName,\r
544 IN EFI_GUID *VendorGuid,\r
545 IN UINT32 Attributes,\r
546 IN UINTN DataSize,\r
547 IN VOID *Data\r
548 );\r
549\r
550/**\r
551\r
552 This code returns information about the EFI variables.\r
553\r
dc204d5a
JY
554 Caution: This function may receive untrusted input.\r
555 This function may be invoked in SMM mode. This function will do basic validation, before parse the data.\r
556\r
0c18794e 557 @param Attributes Attributes bitmask to specify the type of variables\r
558 on which to return information.\r
559 @param MaximumVariableStorageSize Pointer to the maximum size of the storage space available\r
560 for the EFI variables associated with the attributes specified.\r
561 @param RemainingVariableStorageSize Pointer to the remaining size of the storage space available\r
562 for EFI variables associated with the attributes specified.\r
563 @param MaximumVariableSize Pointer to the maximum size of an individual EFI variables\r
564 associated with the attributes specified.\r
565\r
566 @return EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied.\r
567 @return EFI_SUCCESS Query successfully.\r
568 @return EFI_UNSUPPORTED The attribute is not supported on this platform.\r
569\r
570**/\r
571EFI_STATUS\r
572EFIAPI\r
573VariableServiceQueryVariableInfo (\r
574 IN UINT32 Attributes,\r
575 OUT UINT64 *MaximumVariableStorageSize,\r
576 OUT UINT64 *RemainingVariableStorageSize,\r
577 OUT UINT64 *MaximumVariableSize\r
578 ); \r
579 \r
580extern VARIABLE_MODULE_GLOBAL *mVariableModuleGlobal;\r
581\r
582#endif\r