MCPcopy Create free account
hub / github.com/coreboot/coreboot / convert_address

Function convert_address

util/cbfstool/cbfstool.c:491–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491static unsigned int convert_address(const struct region *to, const struct region *from,
492 unsigned int addr)
493{
494 /*
495 * Calculate the offset in the "from" region and use that offset to calculate
496 * corresponding address in the "to" region.
497 */
498 size_t offset = addr - region_offset(from);
499 return region_offset(to) + offset;
500}
501
502enum mmap_addr_type {
503 HOST_SPACE_ADDR,

Callers 2

convert_host_to_flashFunction · 0.85
convert_flash_to_hostFunction · 0.85

Calls 1

region_offsetFunction · 0.85

Tested by

no test coverage detected