[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:
Justin C. Miller
2021-01-28 01:30:17 -08:00
parent 35d8d2ab2d
commit 3aa909b917
12 changed files with 163 additions and 179 deletions

View File

@@ -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