diff options
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r-- | src/kernel/proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c index 6cc1679..a22f632 100644 --- a/src/kernel/proc.c +++ b/src/kernel/proc.c @@ -40,7 +40,7 @@ Proc *proc_seed(void *data, size_t datalen) { 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.rip = (uintptr_t)init_base; // proc_first->regs.r11 |= 1<<9; /* enable interrupts */ return proc_first; @@ -372,12 +372,12 @@ void proc_intr(Proc *p, const char *buf, size_t len) { /* save old rsp,rip */ struct intr_data d; void __user *sp = p->regs.rsp - 128 - sizeof(d); - d.ip = (void __user *)p->regs.rcx; + d.ip = (void __user *)p->regs.rip; d.sp = p->regs.rsp; pcpy_to(p, sp, &d, sizeof(d)); /* switch to intr handler */ - p->regs.rcx = (uint64_t)p->intr_fn; + p->regs.rip = (uint64_t)p->intr_fn; p->regs.rsp = sp; } |