kboot: aarch64 bi_loadsmap
Since aarch64 is different, it needs a different smap. We first see if we have the PA of the table from the FDT info. If so, we copy that and quit. Otherwise, we do the best we can in translating the /proc/iomap into EFI Memory Table format. We also send the system table to the kernel. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38255
This commit is contained in:
parent
b6755eabcc
commit
e49773296c
@ -152,3 +152,22 @@ kboot_get_phys_load_segment(void)
|
|||||||
printf("Falling back to crazy address %#lx\n", s);
|
printf("Falling back to crazy address %#lx\n", s);
|
||||||
return (s);
|
return (s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
bi_loadsmap(struct preloaded_file *kfp)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (efi_systbl_phys)
|
||||||
|
file_addmetadata(kfp, MODINFOMD_FW_HANDLE, sizeof(efi_systbl_phys), &efi_systbl_phys);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we have efi_map_hdr, then it's a pointer to the PA where this
|
||||||
|
* memory map lives. The trampoline code will copy it over. If we don't
|
||||||
|
* have it, we use whatever we found in /proc/iomap.
|
||||||
|
*/
|
||||||
|
if (efi_map_hdr != NULL) {
|
||||||
|
file_addmetadata(kfp, MODINFOMD_EFI_MAP, efi_map_size, efi_map_hdr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
panic("Can't get UEFI memory map, nor a pointer to it, can't proceed.\n");
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user