Efi_simple_network.nvdata(), Nvdata(), Func – Intel Extensible Firmware Interface User Manual

Page 624

Advertising
background image

Extensible Firmware Interface Specification

15-18

12/01/02

Version 1.10

EFI_SIMPLE_NETWORK.NvData()

Summary

Performs read and write operations on the NVRAM device attached to a network interface.

Prototype

EFI_STATUS

(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (

IN

EFI_SIMPLE_NETWORK

*This

IN

BOOLEAN

ReadWrite,

IN

UINTN

Offset,

IN

UINTN

BufferSize,

IN OUT VOID

*Buffer

);

Parameters

This

A pointer to the

EFI_SIMPLE_NETWORK

instance.

ReadWrite

TRUE

for read operations,

FALSE

for write operations.

Offset

Byte offset in the NVRAM device at which to start the read or
write operation. This must be a multiple of

NvRamAccessSize

and less than

NvRamSize

. (See

EFI_SIMPLE_NETWORK_MODE

)

BufferSize

The number of bytes to read or write from the NVRAM device.
This must also be a multiple of

NvramAccessSize

.

Buffer

A pointer to the data buffer.

Description

This function performs read and write operations on the NVRAM device attached to a network
interface. If

ReadWrite

is TRUE, a read operation is performed. If

ReadWrite

is FALSE, a

write operation is performed.

Offset

specifies the byte offset at which to start either operation.

Offset

must be a multiple of

NvRamAccessSize

, and it must have a value between zero and

NvRamSize

.

BufferSize

specifies the length of the read or write operation.

BufferSize

must also be a

multiple of

NvRamAccessSize

, and

Offset

+

BufferSize

must not exceed

NvRamSize

.

If any of the above conditions is not met, then

EFI_INVALID_PARAMETER

will be returned.

If all the conditions are met and the operation is “read,” the NVRAM device attached to the
network interface will be read into

Buffer

and

EFI_SUCCESS

will be returned. If this is a write

operation, the contents of

Buffer

will be used to update the contents of the NVRAM device

attached to the network interface and

EFI_SUCCESS

will be returned.

Advertising