Getvariable() – Intel Extensible Firmware Interface User Manual
Page 195

Services
— Runtime Services
Version 1.10
12/01/02
6-3
GetVariable()
Summary
Returns the value of a variable.
Prototype
EFI_STATUS
GetVariable (
IN
CHAR16
*VariableName,
IN
EFI_GUID
*VendorGuid,
OUT UINT32
*Attributes OPTIONAL,
IN OUT UINTN
*DataSize,
OUT
VOID
*Data
);
Parameters
VariableName
A Null-terminated Unicode string that is the name of the
vendor’s variable.
VendorGuid
A unique identifier for the vendor. Type
EFI_GUID
is defined
in the
function
description.
Attributes
If not
NULL
, a pointer to the memory location to return the
attributes bitmask for the variable. See “Related Definitions.”
DataSize
On input, the size in bytes of the return
Data
buffer.
On output the size of data returned in
Data
.
Data
The buffer to return the contents of the variable.
Related Definitions
//*******************************************************
// Variable Attributes
//*******************************************************
#define EFI_VARIABLE_NON_VOLATILE
0x0000000000000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS
0x0000000000000002
#define EFI_VARIABLE_RUNTIME_ACCESS
0x0000000000000004