浏览代码

[libcpu/risc-v/virt64]: fix parameter for call handle_trap (#6042)

rewine 2 年之前
父节点
当前提交
825b9ffbc3
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      libcpu/risc-v/virt64/interrupt_gcc.S

+ 3 - 2
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