pub fn load_and_switch_to_kernel<I, D>(
    kernel_bytes: &[u8],
    mut frame_allocator: LegacyFrameAllocator<I, D>,
    mut page_tables: PageTables,
    system_info: SystemInfo,
) -> !
where
    I: ExactSizeIterator<Item = D> + Clone,
    D: LegacyMemoryRegion,
{
    let mut mappings = set_up_mappings(
        kernel_bytes,
        &mut frame_allocator,
        &mut page_tables,
        system_info.framebuffer_addr,
        system_info.framebuffer_info.byte_len,
    );
    let (boot_info, two_frames) = create_boot_info(
        frame_allocator,
        &mut page_tables,
        &mut mappings,
        system_info,
    );
    switch_to_kernel(page_tables, mappings, boot_info, two_frames);
}
/// Loads the kernel ELF executable into memory and switches to it.
///
/// This function is a convenience function that first calls [`set_up_mappings`], then
/// [`create_boot_info`], and finally [`switch_to_kernel`]. The given arguments are passed
/// directly to these functions, so see their docs for more info.
Loads the kernel ELF executable into memory and switches to it.
Loads the kernel ELF executable into memory and switches to it .
pub fn load_and_switch_to_kernel<I, D>(
    kernel_bytes: &[u8],
    mut frame_allocator: LegacyFrameAllocator<I, D>,
    mut page_tables: PageTables,
    system_info: SystemInfo,
) -> !
where
    I: ExactSizeIterator<Item = D> + Clone,
    D: LegacyMemoryRegion,
{
    let mut mappings = set_up_mappings(
        kernel_bytes,
        &mut frame_allocator,
        &mut page_tables,
        system_info.framebuffer_addr,
        system_info.framebuffer_info.byte_len,
    );
    let (boot_info, two_frames) = create_boot_info(
        frame_allocator,
        &mut page_tables,
        &mut mappings,
        system_info,
    );
    switch_to_kernel(page_tables, mappings, boot_info, two_frames);
}
pub fn load_and_switch_to_kernel < I , D > ( kernel_bytes : & [ u8 ] , mut frame_allocator : LegacyFrameAllocator < I , D > , mut page_tables : PageTables , system_info : SystemInfo , ) -> ! where I : ExactSizeIterator < Item = D > + Clone , D : LegacyMemoryRegion , { let mut mappings = set_up_mappings ( kernel_bytes , & mut frame_allocator , & mut page_tables , system_info . framebuffer_addr , system_info . framebuffer_info . byte_len , ) ; let ( boot_info , two_frames ) = create_boot_info ( frame_allocator , & mut page_tables , & mut mappings , system_info , ) ; switch_to_kernel ( page_tables , mappings , boot_info , two_frames ) ; }
Loads the kernel ELF executable into memory and switches to it.
Loads the kernel ELF executable into memory and switches to it .
kernel_bytes
&[u8]
frame_allocator
LegacyFrameAllocator<I, D>
page_tables
PageTables
system_info
SystemInfo
kernel_bytes
&[u8]
frame_allocator
LegacyFrameAllocator<I, D>
page_tables
PageTables
system_info
SystemInfo