aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r--kernel/features/proc.c2
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");