[kernel] Split loading from scheduler
In preparation for moving things to the init process, move process loading out of the scheduler. memory_bootstrap now has a load_simple_process function for mapping an args::program into memory, and the stack setup has been simplified (though all the initv values are still being added by the kernel - this needs rework) and normalized to use the thread::add_thunk_user code path.
This commit is contained in:
@@ -12,7 +12,6 @@ extern syscall_registry
|
||||
extern syscall_invalid
|
||||
|
||||
global syscall_handler_prelude
|
||||
global syscall_handler_prelude.return
|
||||
syscall_handler_prelude:
|
||||
swapgs
|
||||
mov [gs:CPU_DATA.rsp3], rsp
|
||||
@@ -55,7 +54,8 @@ syscall_handler_prelude:
|
||||
|
||||
inc qword [rel __counter_syscall_sysret]
|
||||
|
||||
.return:
|
||||
global kernel_to_user_trampoline
|
||||
kernel_to_user_trampoline:
|
||||
pop r15
|
||||
pop r14
|
||||
pop r13
|
||||
|
||||
Reference in New Issue
Block a user