iPXE
|
A non-volatile storage device. More...
#include <nvs.h>
Data Fields | |
unsigned int | word_len_log2 |
Word length. More... | |
unsigned int | size |
Device size (in words) More... | |
unsigned int | block_size |
Data block size (in words) More... | |
int(* | read )(struct nvs_device *nvs, unsigned int address, void *data, size_t len) |
Read data from device. More... | |
int(* | write )(struct nvs_device *nvs, unsigned int address, const void *data, size_t len) |
Write data to device. More... | |
unsigned int nvs_device::word_len_log2 |
Word length.
This is expressed as the base-2 logarithm of the word length in bytes. A value of 0 therefore translates as 8-bit words, and a value of 1 translates as 16-bit words.
Definition at line 22 of file nvs.h.
Referenced by a3c90x_probe(), icplus_init_eeprom(), intel_init_eeprom(), nvs_frag_len(), nvs_read(), nvs_write(), and threewire_detect_address_len().
unsigned int nvs_device::size |
Device size (in words)
Definition at line 24 of file nvs.h.
Referenced by a3c90x_probe(), icplus_init_eeprom(), and intel_init_eeprom().
unsigned int nvs_device::block_size |
Data block size (in words)
This is the block size used by the device. It must be a power of two. Data reads and writes must not cross a block boundary.
Many devices allow reads to cross a block boundary, and restrict only writes. For the sake of simplicity, we assume that the same restriction applies to both reads and writes.
Definition at line 36 of file nvs.h.
Referenced by a3c90x_probe(), falcon_init_spi_device(), icplus_init_eeprom(), intel_init_eeprom(), and nvs_frag_len().
int( * nvs_device::read) (struct nvs_device *nvs, unsigned int address, void *data, size_t len) |
Read data from device.
nvs | NVS device |
address | Address from which to read |
data | Data buffer |
len | Length of data buffer |
rc | Return status code |
Reads may not cross a block boundary.
Definition at line 47 of file nvs.h.
Referenced by a3c90x_probe(), icplus_init_eeprom(), intel_init_eeprom(), nvs_read(), and nvs_vpd_init().
int( * nvs_device::write) (struct nvs_device *nvs, unsigned int address, const void *data, size_t len) |
Write data to device.
nvs | NVS device |
address | Address to which to write |
data | Data buffer |
len | Length of data buffer |
rc | Return status code |
Writes may not cross a block boundary.
Definition at line 59 of file nvs.h.
Referenced by a3c90x_probe(), icplus_init_eeprom(), intel_init_eeprom(), nvs_vpd_init(), and nvs_write().