Kernel: We can create basic userspace processes

These are still allocated on the kernel memory
This commit is contained in:
Bananymous
2023-04-12 17:51:36 +03:00
parent 34358b8471
commit 8ee63f8264
10 changed files with 121 additions and 82 deletions

View File

@@ -23,4 +23,14 @@ start_thread:
continue_thread:
movq %rdi, %rsp
movq $0, %rax
jmp *%rsi
jmp *%rsi
# void thread_jump_userspace(uint64_t rsp, uint64_t rip)
.global thread_jump_userspace
thread_jump_userspace:
pushq $0x23
pushq %rdi
pushfq
pushq $0x1B
pushq %rsi
iretq