|
iPXE
|
Non-volatile storage. More...
#include <stdint.h>#include <string.h>#include <errno.h>#include <assert.h>#include <ipxe/nvs.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static size_t | nvs_frag_len (struct nvs_device *nvs, unsigned int address, size_t max_len) |
| Calculate length up to next block boundary. More... | |
| int | nvs_read (struct nvs_device *nvs, unsigned int address, void *data, size_t len) |
| Read from non-volatile storage device. More... | |
| static int | nvs_verify (struct nvs_device *nvs, unsigned int address, const void *data, size_t len) |
| Verify content of non-volatile storage device. More... | |
| int | nvs_write (struct nvs_device *nvs, unsigned int address, const void *data, size_t len) |
| Write to non-volatile storage device. More... | |
Non-volatile storage.
Definition in file nvs.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Calculate length up to next block boundary.
| nvs | NVS device |
| address | Starting address |
| max_len | Maximum length |
| len | Length to use, stopping at block boundaries |
Definition at line 46 of file nvs.c.
References address, nvs_device::block_size, and nvs_device::word_len_log2.
Referenced by nvs_read(), and nvs_write().
| int nvs_read | ( | struct nvs_device * | nvs, |
| unsigned int | address, | ||
| void * | data, | ||
| size_t | len | ||
| ) |
Read from non-volatile storage device.
| nvs | NVS device |
| address | Address from which to read |
| data | Data buffer |
| len | Length of data buffer |
| rc | Return status code |
Definition at line 75 of file nvs.c.
References address, assert(), data, len, nvs_frag_len(), rc, nvs_device::read, and nvs_device::word_len_log2.
Referenced by a3c90x_internal_ReadEepromContents(), falcon_probe_nvram(), icplus_probe(), ifec_pci_probe(), intel_fetch_mac_eeprom(), natsemi_hwaddr(), nvo_load(), nvs_verify(), realtek_init_eeprom(), realtek_probe(), and rtl818x_probe().
|
static |
Verify content of non-volatile storage device.
| nvs | NVS device |
| address | Address from which to read |
| data | Data to compare against |
| len | Length of data buffer |
| rc | Return status code |
Definition at line 112 of file nvs.c.
References address, data, DBG, EIO, len, memcmp(), nvs_read(), and rc.
Referenced by nvs_write().
| int nvs_write | ( | struct nvs_device * | nvs, |
| unsigned int | address, | ||
| const void * | data, | ||
| size_t | len | ||
| ) |
Write to non-volatile storage device.
| nvs | NVS device |
| address | Address to which to write |
| data | Data buffer |
| len | Length of data buffer |
| rc | Return status code |
Definition at line 140 of file nvs.c.
References address, assert(), data, len, nvs_frag_len(), nvs_verify(), rc, nvs_device::word_len_log2, and nvs_device::write.
Referenced by nvo_save().
1.8.15