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

Function selfload_mapped

src/lib/selfboot.c:250–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250bool selfload_mapped(struct prog *payload, void *mapping,
251 enum bootmem_type dest_type)
252{
253 uintptr_t entry = 0;
254 struct cbfs_payload_segment *cbfssegs;
255
256 cbfssegs = &((struct cbfs_payload *)mapping)->segments;
257
258 if (check_payload_segments(cbfssegs, dest_type))
259 return false;
260
261 if (load_payload_segments(cbfssegs, &entry))
262 return false;
263
264 printk(BIOS_SPEW, "Loaded segments\n");
265
266 /* Pass cbtables to payload if architecture desires it. */
267 prog_set_entry(payload, (void *)entry, cbmem_find(CBMEM_ID_CBTABLE));
268
269 return true;
270}
271
272bool selfload_check(struct prog *payload, enum bootmem_type dest_type)
273{

Callers 2

payload_loadFunction · 0.85
selfload_checkFunction · 0.85

Calls 5

check_payload_segmentsFunction · 0.85
load_payload_segmentsFunction · 0.85
prog_set_entryFunction · 0.85
cbmem_findFunction · 0.70
printkFunction · 0.50

Tested by

no test coverage detected