diff options
author | Marvin Borner | 2021-04-10 00:26:39 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-10 00:26:39 +0200 |
commit | 9655593d80e23d2ea3c091e3187e8e47b278bc3d (patch) | |
tree | f618723fd9d457147f4663d2d4990f69fabb2d48 /kernel/features/proc.c | |
parent | eeb88df1d501ccec4737c18dddb7ca0a1176304f (diff) |
Gave procs own kernel stack (TSS)
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r-- | kernel/features/proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c index 479427c..d5bf2e6 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -54,6 +54,7 @@ HOT FLATTEN void scheduler(struct regs *regs) current = idle_proc; } + tss_set_stack(0x10, PROC(current)->kernel_stack); memory_switch_dir(PROC(current)->page_dir); memcpy(regs, &PROC(current)->regs, sizeof(*regs)); @@ -581,6 +582,7 @@ NORETURN void proc_init(void) // We'll shortly jump to usermode. Clear and protect every secret! memory_user_hook(); + tss_set_stack(0x10, init->kernel_stack); memory_switch_dir(init->page_dir); printf("Jumping to userspace!\n"); |