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

Function last_loadable_segment

src/lib/selfboot.c:143–146  ·  view source on GitHub ↗

Note: this function is a bit dangerous so is not exported. * It assumes you're smart enough not to call it with the very * last segment, since it uses seg + 1 */

Source from the content-addressed store, hash-verified

141 * It assumes you're smart enough not to call it with the very
142 * last segment, since it uses seg + 1 */
143static int last_loadable_segment(struct cbfs_payload_segment *seg)
144{
145 return read_be32(&(seg + 1)->type) == PAYLOAD_SEGMENT_ENTRY;
146}
147
148static int check_payload_segments(struct cbfs_payload_segment *cbfssegs,
149 enum bootmem_type dest_type)

Callers 1

load_payload_segmentsFunction · 0.85

Calls 1

read_be32Function · 0.85

Tested by

no test coverage detected