E.4.15 nvdata, E.4.15.1 issuing the command – Intel Extensible Firmware Interface User Manual

Page 942

Advertising
background image

Extensible Firmware Interface Specification

E-76

12/01/02

Version 1.10

E.4.15 NvData

This command is used to read and write (if supported by NIC H/W) nonvolatile storage on the NIC.
Nonvolatile storage could be EEPROM, FLASH or battery backed RAM.

E.4.15.1

Issuing the Command

To issue a NvData command, create a CDB and fill it in as shown in the table below:

CDB Field

How to initialize the CDB structure for a NvData command

OpCode

PXE_OPCODE_NVDATA

OpFlags

Set as needed.

CPBsize

sizeof(PXE_CPB_NVDATA)

DBsize

sizeof(PXE_DB_NVDATA)

CPBaddr

Address of

PXE_CPB_NVDATA

structure.

Dbaddr

Address of

PXE_DB_NVDATA

structure.

StatCode

PXE_STATCODE_INITIALIZE

StatFlags

PXE_STATFLAGS_INITIALIZE

Ifnum

A valid interface number from zero to

!PXE.IFcnt

.

Control

Set as needed.

Preparing the CPB

There are two types of nonvolatile data CPBs, one for sparse updates and one for bulk updates.
Sparse updates allow updating of single nonvolatile storage items. Bulk updates always update all
nonvolatile storage items. Check the

!PXE.Implementation

flags to see which type of

nonvolatile update is supported by this UNDI and network device.

If you do not need to update the nonvolatile storage set the

CDB.CPBsize

and

CDB.CPBaddr

fields to

PXE_CPBSIZE_NOT_USED

and

PXE_CPBADDR_NOT_USED

.

Sparse NvData CPB

typedef struct s_pxe_cpb_nvdata_sparse {
// NvData item list. Only items in this list will be updated.

struct {

// Nonvolatile storage address to be changed.
PXE_UINT32

Addr;

// Data item to write into above storage address.
union {
PXE_UINT8

Byte;

PXE_UINT16

Word;

PXE_UINT32

Dword;

} Data;

} Item[n];
} PXE_CPB_NVDATA_SPARSE;

Advertising