|
libflashrom
|
Functions | |
| enum flashrom_wp_result | flashrom_wp_cfg_new (struct flashrom_wp_cfg **cfg) |
| Create a new empty WP configuration. More... | |
| void | flashrom_wp_cfg_release (struct flashrom_wp_cfg *cfg) |
| Free a WP configuration. More... | |
| void | flashrom_wp_set_mode (struct flashrom_wp_cfg *cfg, enum flashrom_wp_mode mode) |
| Set the protection mode for a WP configuration. More... | |
| enum flashrom_wp_mode | flashrom_wp_get_mode (const struct flashrom_wp_cfg *cfg) |
| Get the protection mode from a WP configuration. More... | |
| void | flashrom_wp_set_range (struct flashrom_wp_cfg *cfg, size_t start, size_t len) |
| Set the protection range for a WP configuration. More... | |
| void | flashrom_wp_get_range (size_t *start, size_t *len, const struct flashrom_wp_cfg *cfg) |
| Get the protection range from a WP configuration. More... | |
| enum flashrom_wp_result | flashrom_wp_read_cfg (struct flashrom_wp_cfg *cfg, struct flashrom_flashctx *flash) |
| Read the current WP configuration from a flash chip. More... | |
| enum flashrom_wp_result | flashrom_wp_write_cfg (struct flashrom_flashctx *flash, const struct flashrom_wp_cfg *cfg) |
| Write a WP configuration to a flash chip. More... | |
| enum flashrom_wp_result | flashrom_wp_get_available_ranges (struct flashrom_wp_ranges **ranges, struct flashrom_flashctx *flash) |
| Get a list of protection ranges supported by the flash chip. More... | |
| size_t | flashrom_wp_ranges_get_count (const struct flashrom_wp_ranges *ranges) |
| Get a number of protection ranges in a range list. More... | |
| enum flashrom_wp_result | flashrom_wp_ranges_get_range (size_t *start, size_t *len, const struct flashrom_wp_ranges *ranges, unsigned int index) |
| Get a protection range from a range list. More... | |
| void | flashrom_wp_ranges_release (struct flashrom_wp_ranges *ranges) |
| Free a WP range list. More... | |
| enum flashrom_wp_result flashrom_wp_cfg_new | ( | struct flashrom_wp_cfg ** | cfg | ) |
Create a new empty WP configuration.
| [out] | cfg | Points to a pointer of type struct flashrom_wp_cfg that will be set if creation succeeds. *cfg has to be freed by the caller with flashrom_wp_cfg_release. |
| void flashrom_wp_cfg_release | ( | struct flashrom_wp_cfg * | cfg | ) |
Free a WP configuration.
| [in] | cfg | Pointer to the flashrom_wp_cfg to free. |
| enum flashrom_wp_result flashrom_wp_get_available_ranges | ( | struct flashrom_wp_ranges ** | ranges, |
| struct flashrom_flashctx * | flash | ||
| ) |
Get a list of protection ranges supported by the flash chip.
| [out] | ranges | Points to a pointer of type struct flashrom_wp_ranges that will be set if available ranges are found. Finding available ranges may not always be possible, even if the chip's protection range can be read or modified. *ranges must be freed using flashrom_wp_ranges_release. |
| [in] | flash | The flash context used to access the chip. |
| enum flashrom_wp_mode flashrom_wp_get_mode | ( | const struct flashrom_wp_cfg * | cfg | ) |
Get the protection mode from a WP configuration.
| [in] | cfg | The WP configuration to get the protection mode from. |
| void flashrom_wp_get_range | ( | size_t * | start, |
| size_t * | len, | ||
| const struct flashrom_wp_cfg * | cfg | ||
| ) |
Get the protection range from a WP configuration.
| [out] | start | Points to a size_t to write the range start to. |
| [out] | len | Points to a size_t to write the range length to. |
| [in] | cfg | The WP configuration to get the range from. |
| size_t flashrom_wp_ranges_get_count | ( | const struct flashrom_wp_ranges * | ranges | ) |
Get a number of protection ranges in a range list.
| [in] | ranges | The range list to get the count from. |
| enum flashrom_wp_result flashrom_wp_ranges_get_range | ( | size_t * | start, |
| size_t * | len, | ||
| const struct flashrom_wp_ranges * | ranges, | ||
| unsigned int | index | ||
| ) |
Get a protection range from a range list.
| [out] | start | Points to a size_t to write the range's start to. |
| [out] | len | Points to a size_t to write the range's length to. |
| [in] | ranges | The range list to get the range from. |
| [in] | index | Index of the range to get. |
| void flashrom_wp_ranges_release | ( | struct flashrom_wp_ranges * | ranges | ) |
Free a WP range list.
| [out] | ranges | Pointer to the flashrom_wp_ranges to free. |
| enum flashrom_wp_result flashrom_wp_read_cfg | ( | struct flashrom_wp_cfg * | cfg, |
| struct flashrom_flashctx * | flash | ||
| ) |
Read the current WP configuration from a flash chip.
| [out] | cfg | Pointer to a struct flashrom_wp_cfg to store the chip's configuration in. |
| [in] | flash | The flash context used to access the chip. |
| void flashrom_wp_set_mode | ( | struct flashrom_wp_cfg * | cfg, |
| enum flashrom_wp_mode | mode | ||
| ) |
Set the protection mode for a WP configuration.
| [in] | mode | The protection mode to set. |
| [out] | cfg | Pointer to the flashrom_wp_cfg structure to modify. |
| void flashrom_wp_set_range | ( | struct flashrom_wp_cfg * | cfg, |
| size_t | start, | ||
| size_t | len | ||
| ) |
Set the protection range for a WP configuration.
| [out] | cfg | Pointer to the flashrom_wp_cfg structure to modify. |
| [in] | start | The range's start address. |
| [in] | len | The range's length. |
| enum flashrom_wp_result flashrom_wp_write_cfg | ( | struct flashrom_flashctx * | flash, |
| const struct flashrom_wp_cfg * | cfg | ||
| ) |
Write a WP configuration to a flash chip.
| [in] | flash | The flash context used to access the chip. |
| [in] | cfg | The WP configuration to write to the chip. |
1.8.10