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

Function fsp_component_relocate

src/commonlib/fsp_relocate.c:668–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668ssize_t fsp_component_relocate(uintptr_t new_addr, void *fsp, size_t size)
669{
670 size_t offset;
671 size_t fih_offset;
672
673 offset = 0;
674 fih_offset = 0;
675 while (offset < size) {
676 ssize_t nparsed;
677
678 /* Relocate each FV within the FSP region. */
679 nparsed = relocate_fvh(new_addr, fsp, size, offset, &fih_offset);
680
681 /* FV should be larger than 0 or failed to parse. */
682 if (nparsed <= 0) {
683 printk(BIOS_ERR, "FV @ offset %zx relocation failed\n",
684 offset);
685 return -1;
686 }
687
688 offset += nparsed;
689 }
690
691 return relocate_remaining_items(fsp, size, new_addr, fih_offset);
692}
693
694ssize_t fsp1_1_relocate(uintptr_t new_addr, void *fsp, size_t size)
695{

Callers 3

fsp_load_componentFunction · 0.85
fsp1_1_relocateFunction · 0.85
cbfstool_convert_fspFunction · 0.85

Calls 3

relocate_fvhFunction · 0.85
relocate_remaining_itemsFunction · 0.85
printkFunction · 0.50

Tested by

no test coverage detected