pub fn switch_to_kernel(
    page_tables: PageTables,
    mappings: Mappings,
    boot_info: &'static mut BootInfo,
    two_frames: TwoFrames,
) -> ! {
    let PageTables {
        kernel_level_4_frame,
        kernel: kernel_page_table,
        ..
    } = page_tables;
    let addresses = Addresses {
        page_table: kernel_level_4_frame,
        stack_top: mappings.stack_end.start_address(),
        entry_point: mappings.entry_point,
        boot_info,
    };

    log::info!(
        "Jumping to kernel entry point at {:?}",
        addresses.entry_point
    );

    unsafe {
        context_switch(addresses, kernel_page_table, two_frames);
    }
}
/// Switches to the kernel address space and jumps to the kernel entry point.
Switches to the kernel address space and jumps to the kernel entry point.
Switches to the kernel address space and jumps to the kernel entry point .
pub fn switch_to_kernel(
    page_tables: PageTables,
    mappings: Mappings,
    boot_info: &'static mut BootInfo,
    two_frames: TwoFrames,
) -> ! {
    let PageTables {
        kernel_level_4_frame,
        kernel: kernel_page_table,
        ..
    } = page_tables;
    let addresses = Addresses {
        page_table: kernel_level_4_frame,
        stack_top: mappings.stack_end.start_address(),
        entry_point: mappings.entry_point,
        boot_info,
    };
    log::info!(
        "Jumping to kernel entry point at {:?}",
        addresses.entry_point
    );
    unsafe {
        context_switch(addresses, kernel_page_table, two_frames);
    }
}
pub fn switch_to_kernel ( page_tables : PageTables , mappings : Mappings , boot_info : & ' static mut BootInfo , two_frames : TwoFrames , ) -> ! { let PageTables { kernel_level_4_frame , kernel : kernel_page_table , .. } = page_tables ; let addresses = Addresses { page_table : kernel_level_4_frame , stack_top : mappings . stack_end . start_address ( ) , entry_point : mappings . entry_point , boot_info , } ; log :: info ! ( " " addresses entry_point ) ; unsafe { context_switch ( addresses , kernel_page_table , two_frames ) ; } }
Switches to the kernel address space and jumps to the kernel entry point.
Switches to the kernel address space and jumps to the kernel entry point .
page_tables
PageTables
mappings
Mappings
boot_info
&'static mut BootInfo
two_frames
TwoFrames
page_tables
PageTables
mappings
Mappings
boot_info
&'static mut BootInfo
two_frames
TwoFrames