summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
authordzwdz2022-07-16 22:50:34 +0200
committerdzwdz2022-07-16 22:50:34 +0200
commita251c14f1a745f3388ce73a5a45ebc73cd1782b5 (patch)
tree2eab140ce2bcc729d8836e97a61bd0d731bb44d6 /src/kernel/proc.c
parentc8ed6aa7476b7f506366d9fe56ed6f2e7a12b40d (diff)
amd64: back at the shell!
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 4719a93..cfc4b5e 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -36,7 +36,9 @@ struct process *process_seed(struct kmain_info *info) {
for (uintptr_t off = 0; off < info->init.size; off += PAGE_SIZE)
pagedir_map(process_first->pages, init_base + off, info->init.at + off,
true, true);
- process_first->regs.rcx = init_base; // SYSRET jumps to %rcx
+ process_first->regs.rcx = (uintptr_t)init_base; // SYSRET jumps to %rcx
+
+ process_first->pages = pagedir_copy(process_first->pages); // TODO remove this
return process_first;
}