15.03.2015 Views

SetupDesignGuide.pdf - Firmware Encoding Index

SetupDesignGuide.pdf - Firmware Encoding Index

SetupDesignGuide.pdf - Firmware Encoding Index

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Setup Design Guide<br />

DRAFT<br />

7.3.1 EFI_FORM_CALLBACK_PROTOCOL.NvRead()<br />

Summary<br />

Returns the value of a variable.<br />

Prototype<br />

EFI_STATUS<br />

(EFIAPI *EFI_NV_READ) (<br />

IN EFI_FORM_CALLBACK_PROTOCOL *This,<br />

IN CHAR16<br />

*VariableName,<br />

IN EFI_GUID<br />

*VendorGuid,<br />

OUT UINT32<br />

*Attributes OPTIONAL,<br />

IN OUT UINTN<br />

*DataSize,<br />

OUT VOID<br />

*Buffer<br />

);<br />

Parameters<br />

This<br />

VariableName<br />

VendorGuid<br />

Attributes<br />

DataSize<br />

Buffer<br />

A pointer to the EFI_FORM_CALLBACK_PROTOCOL instance.<br />

A Null-terminated Unicode string that is the name of the vendor’s<br />

variable.<br />

A unique identifier for the vendor.<br />

If not NULL, a pointer to the memory location to return the attributes<br />

bit-mask for the variable. See “Related Definitions”.<br />

The size in bytes of the Buffer. A size of zero causes the variable<br />

to be deleted.<br />

The buffer to return the contents of the variable.<br />

Related Definitions<br />

//*********************************************************<br />

// Variable Attributes<br />

//*********************************************************<br />

#define EFI_VARIABLE_NON_VOLATILE<br />

0x0000000000000001<br />

#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002<br />

#define EFI_VARIABLE_RUNTIME_ACCESS<br />

0x0000000000000004<br />

Description<br />

Each vendor may create and manage its own variables with the risk of name conflicts by using a unique<br />

VendorGuid. When a variable is set its Attributes are supplied to indicate how the data variable<br />

should be stored and maintained by the system. Any attempts to access a variable that does not have<br />

the attribute set for runtime access will yield the EFI_NOT_FOUND error.<br />

Status Codes Returned<br />

73

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!