From d98ec57128628b81fcd32269a92742a037b7f713 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 26 Dec 2021 17:50:11 +0200 Subject: First useful jump to userspace! --- arch/riscv/kernel/proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/riscv/kernel/proc.c') diff --git a/arch/riscv/kernel/proc.c b/arch/riscv/kernel/proc.c index 3a39dd3..6d351bc 100644 --- a/arch/riscv/kernel/proc.c +++ b/arch/riscv/kernel/proc.c @@ -2,9 +2,9 @@ #include #include -void jump_to_userspace(struct tcb *t, char **argv, int argc) +void jump_to_userspace(struct tcb *t, vm_t bin, int argc, char **argv) { - csr_write(CSR_SEPC, bin_entry(t->bin)); + csr_write(CSR_SEPC, prepare_proc(t, bin)); __asm__("mv sp, %0\n" : "=r" (t->stack) :: "memory"); __asm__("sret\n" ::: "memory"); } -- cgit v1.3