Support for system calls is implemented in this PR. We have defined the syscall calling convention based on our understanding of the 64-bit ARM PCS in the twizzler-abi crate, and the receiving end in the kernel. We are able to successfully jump to and from user space. The kernel can now run code in user space and that code can execute syscalls (like writing to the kernel console). Support for full-fledged user programs (i.e. ELF files) will be implemented in the future.
Summary
user context initialization for jumping to user space
implement syscall ABI in twizzler-abi and kernel
make stack pointer switch use assembly
save SP_EL0 when handling exception from user space
Support for system calls is implemented in this PR. We have defined the syscall calling convention based on our understanding of the 64-bit ARM PCS in the twizzler-abi crate, and the receiving end in the kernel. We are able to successfully jump to and from user space. The kernel can now run code in user space and that code can execute syscalls (like writing to the kernel console). Support for full-fledged user programs (i.e. ELF files) will be implemented in the future.
Summary