diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-26 17:50:11 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-26 17:50:11 +0200 |
| commit | d98ec57128628b81fcd32269a92742a037b7f713 (patch) | |
| tree | 0e3f8d78d8347ef0a6e69d41b9d9be20c822b642 /arch/riscv/kernel/proc.c | |
| parent | a64f3588ff5da7f148659ccb0eff844ccfb57088 (diff) | |
| download | kmi-d98ec57128628b81fcd32269a92742a037b7f713.tar.gz kmi-d98ec57128628b81fcd32269a92742a037b7f713.zip | |
First useful jump to userspace!
Diffstat (limited to 'arch/riscv/kernel/proc.c')
| -rw-r--r-- | arch/riscv/kernel/proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <apos/elf.h> #include <csr.h> -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"); } |
