summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
authordzwdz2023-09-15 00:29:11 +0200
committerdzwdz2023-09-15 00:29:11 +0200
commit458978e7b8a6d50566fc8b68558f76f6b0465c52 (patch)
tree0b2decb03e5f07fa790d7add0fc16679472012de /src/kernel/proc.c
parent8757321821d05d2958160e1428250daf19c119e9 (diff)
kern: fix GDT order for 64bit sysret
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 4164874..ee99603 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -44,7 +44,9 @@ Proc *proc_seed(void *data, size_t datalen) {
void __user *init_base = (userptr_t)0x200000;
for (uintptr_t off = 0; off < datalen; off += PAGE_SIZE)
pagedir_map(proc_first->pages, init_base + off, data + off, true, true);
+
proc_first->regs.rcx = (uintptr_t)init_base; // SYSRET jumps to %rcx
+ // proc_first->regs.r11 |= 1<<9; /* enable interrupts */
return proc_first;
}