libflashrom
|
Functions | |
int | flashrom_layout_include_region (struct flashrom_layout *const layout, const char *name) |
Mark given region as included. More... | |
int | flashrom_layout_read_from_ifd (struct flashrom_layout **const layout, struct flashctx *const flashctx, const void *const dump, const size_t len) |
Read a layout from the Intel ICH descriptor in the flash. More... | |
int | flashrom_layout_read_fmap_from_rom (struct flashrom_layout **const layout, struct flashctx *const flashctx, off_t offset, size_t len) |
Read a layout by searching the flash chip for fmap. More... | |
int | flashrom_layout_read_fmap_from_buffer (struct flashrom_layout **const layout, struct flashctx *const flashctx, const uint8_t *const buf, size_t size) |
Read a layout by searching buffer for fmap. More... | |
void | flashrom_layout_release (struct flashrom_layout *const layout) |
Free a layout. More... | |
void | flashrom_layout_set (struct flashrom_flashctx *const flashctx, const struct flashrom_layout *const layout) |
Set the active layout for a flash context. More... | |
int flashrom_layout_include_region | ( | struct flashrom_layout *const | layout, |
const char * | name | ||
) |
Mark given region as included.
layout | The layout to alter. |
name | The name of the region to include. |
int flashrom_layout_read_fmap_from_buffer | ( | struct flashrom_layout **const | layout, |
struct flashctx *const | flashctx, | ||
const uint8_t *const | buf, | ||
size_t | size | ||
) |
Read a layout by searching buffer for fmap.
[out] | layout | Points to a struct flashrom_layout pointer that gets set if the fmap is read and parsed successfully. |
[in] | flashctx | Flash context |
[in] | buffer | Buffer to search in |
[in] | size | Size of buffer to search |
int flashrom_layout_read_fmap_from_rom | ( | struct flashrom_layout **const | layout, |
struct flashctx *const | flashctx, | ||
off_t | offset, | ||
size_t | len | ||
) |
Read a layout by searching the flash chip for fmap.
[out] | layout | Points to a struct flashrom_layout pointer that gets set if the fmap is read and parsed successfully. |
[in] | flashctx | Flash context |
[in] | offset | Offset to begin searching for fmap. |
[in] | offset | Length of address space to search. |
int flashrom_layout_read_from_ifd | ( | struct flashrom_layout **const | layout, |
struct flashctx *const | flashctx, | ||
const void *const | dump, | ||
const size_t | len | ||
) |
Read a layout from the Intel ICH descriptor in the flash.
Optionally verify that the layout matches the one in the given descriptor dump.
[out] | layout | Points to a struct flashrom_layout pointer that gets set if the descriptor is read and parsed successfully. |
[in] | flashctx | Flash context to read the descriptor from flash. |
[in] | dump | The descriptor dump to compare to or NULL. |
[in] | len | The length of the descriptor dump. |
void flashrom_layout_release | ( | struct flashrom_layout *const | layout | ) |
Free a layout.
layout | Layout to free. |
void flashrom_layout_set | ( | struct flashrom_flashctx *const | flashctx, |
const struct flashrom_layout *const | layout | ||
) |
Set the active layout for a flash context.
Note: This just sets a pointer. The caller must not release the layout as long as he uses it through the given flash context.
flashctx | Flash context whose layout will be set. |
layout | Layout to bet set. |