fn jump_to_entry(bootinfo: *const BootInfo) -> ! {
    // HACK: why this way causes wrong argument?
    //
    // let entry: KernelEntry = unsafe { core::mem::transmute(ENTRY) };
    // entry(bootinfo);
    unsafe {
        // TODO: Setup stack pointer safely
        //       Now rsp is pointing to physical mapping area without guard page.
        asm!("add rsp, $0; jmp $1"
            :: "m"(PHYSICAL_MEMORY_OFFSET), "r"(ENTRY), "{rdi}"(bootinfo)
            :: "intel");
    }
    unreachable!()
}
/// Jump to ELF entry according to global variable `ENTRY`
Jump to ELF entry according to global variable `ENTRY`
Jump to ELF entry according to global variable ` ENTRY `
fn jump_to_entry(bootinfo: *const BootInfo) -> ! {
    // HACK: why this way causes wrong argument?
    //
    // let entry: KernelEntry = unsafe { core::mem::transmute(ENTRY) };
    // entry(bootinfo);
    unsafe {
        // TODO: Setup stack pointer safely
        //       Now rsp is pointing to physical mapping area without guard page.
        asm!("add rsp, $0; jmp $1"
            :: "m"(PHYSICAL_MEMORY_OFFSET), "r"(ENTRY), "{rdi}"(bootinfo)
            :: "intel");
    }
    unreachable!()
}
fn jump_to_entry ( bootinfo : * const BootInfo ) -> ! { // HACK: why this way causes wrong argument? // // let entry: KernelEntry = unsafe { core::mem::transmute(ENTRY) }; // entry(bootinfo); unsafe { // TODO: Setup stack pointer safely //       Now rsp is pointing to physical mapping area without guard page. asm ! ( " " " " ( PHYSICAL_MEMORY_OFFSET ) " " ( ENTRY ) " " ( bootinfo ) " " ) ; } unreachable ! ( ) }
Jump to ELF entry according to global variable `ENTRY`
Jump to ELF entry according to global variable ` ENTRY `
bootinfo
*const BootInfo
bootinfo
*const BootInfo