We implemented page fault handling for user pages while in the kernel so that we can initalize the memory context used by the init program. We also changed the mapping required by the text segment (initially read-only) to be writable, and the remove this permission later. The execution gets to jump_to_user which will be implemented in a future patch.
Summary
change stack pointer to user SP_EL1 instead of SP_EL0
create a synchronous exception handler
service page faults to user pages while in the kernel
modify permissions on the text segment of the init program
This PR implements some of the arch-specific functionality described by https://github.com/twizzler-operating-system/twizzler/blob/328649966ea6d907b72c5238321ca32fd6cbe418/src/kernel/src/thread.rs#L568
We implemented page fault handling for user pages while in the kernel so that we can initalize the memory context used by the init program. We also changed the mapping required by the text segment (initially read-only) to be writable, and the remove this permission later. The execution gets to
jump_to_user
which will be implemented in a future patch.Summary
SP_EL1
instead ofSP_EL0
PageNumber
arch-dep