pub unsafe fn initial_userspace_jump(
root_page_phys: u64,
entry: u64,
stack_top: VirtAddr,
) -> !Expand description
First transition into userspace; uses a fake stack frame and iretq to jump to userspace
for the first time
§Safety
The caller must guarantee the following:
- The process’s address space is fully and correctly mapped
entryneeds to point to valid executable code in that address spacestack_topneeds to be valid, mapped and user-accessible- The kernel higher half needs to be mapped in the address space