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

Function ptr_to_offset

util/cbfstool/fit.c:115–119  ·  view source on GitHub ↗

* Get an offset from a host pointer. This function assumes the ROM is located * in the host address space at [4G - romsize -> 4G). It also assume all * pointers have values within this address range. */

Source from the content-addressed store, hash-verified

113 * pointers have values within this address range.
114 */
115static inline int ptr_to_offset(fit_offset_converter_t helper,
116 const struct buffer *region, uint32_t host_ptr)
117{
118 return helper(region, -host_ptr);
119}
120
121/*
122 * Get a pointer from an offset. This function assumes the ROM is located

Callers 3

get_fit_ptrFunction · 0.85
set_fit_pointerFunction · 0.85
fit_get_tableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected