pub fn load_kernel(
    bytes: &[u8],
    page_table: &mut impl MapperAllSizes,
    frame_allocator: &mut impl FrameAllocator<Size4KiB>,
) -> Result<(VirtAddr, Option<TlsTemplate>, UsedLevel4Entries), &'static str> {
    let mut loader = Loader::new(bytes, page_table, frame_allocator)?;
    let tls_template = loader.load_segments()?;
    let used_entries = loader.used_level_4_entries();

    Ok((loader.entry_point(), tls_template, used_entries))
}
/// 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.  
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.
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 .
pub fn load_kernel(
    bytes: &[u8],
    page_table: &mut impl MapperAllSizes,
    frame_allocator: &mut impl FrameAllocator<Size4KiB>,
) -> Result<(VirtAddr, Option<TlsTemplate>, UsedLevel4Entries), &'static str> {
    let mut loader = Loader::new(bytes, page_table, frame_allocator)?;
    let tls_template = loader.load_segments()?;
    let used_entries = loader.used_level_4_entries();
    Ok((loader.entry_point(), tls_template, used_entries))
}
pub fn load_kernel ( bytes : & [ u8 ] , page_table : & mut impl MapperAllSizes , frame_allocator : & mut impl FrameAllocator < Size4KiB > , ) -> Result < ( VirtAddr , Option < TlsTemplate > , UsedLevel4Entries ) , & ' static str > { let mut loader = Loader :: new ( bytes , page_table , frame_allocator ) ? ; let tls_template = loader . load_segments ( ) ? ; let used_entries = loader . used_level_4_entries ( ) ; Ok ( ( loader . entry_point ( ) , tls_template , used_entries ) ) }
Loads the kernel ELF file given in `bytes` in the given `page_table`.
Loads the kernel ELF file given in ` bytes ` in the given ` page_table ` .
bytes
&[u8]
page_table
&mut impl MapperAllSizes
frame_allocator
&mut impl FrameAllocator<Size4KiB>
bytes
&[u8]
page_table
&mut impl MapperAllSizes
frame_allocator
&mut impl FrameAllocator<Size4KiB>