pub fn load_kernel(
kernel: Kernel<'_>,
page_table: &mut (impl MapperAllSizes + Translate),
frame_allocator: &mut impl FrameAllocator<Size4KiB>,
used_entries: &mut UsedLevel4Entries,
) -> Result<(VirtAddr, VirtAddr, Option<TlsTemplate>), &'static str>
Expand description
Loads the kernel ELF file given in bytes
in the given page_table
.
Returns the kernel entry point address, it’s thread local storage template (if any), and a structure describing which level 4 page table entries are in use.