diff --git a/libcpu/risc-v/virt64/interrupt_gcc.S b/libcpu/risc-v/virt64/interrupt_gcc.S index 730fa10d61810fb1b8df860a4e0944e09d34320f..d9b7a06d98ac7118149fb35625976d2891d48387 100644 --- a/libcpu/risc-v/virt64/interrupt_gcc.S +++ b/libcpu/risc-v/virt64/interrupt_gcc.S @@ -114,8 +114,9 @@ trap_entry: /* handle interrupt */ call rt_interrupt_enter csrr a0, SRC_XCAUSE - csrr a1, SRC_XEPC - mv a2, s0 + csrr a1, SRC_XTVAL + csrr a2, SRC_XEPC + mv a3, s0 call handle_trap call rt_interrupt_leave