diff options
Diffstat (limited to 'src/arch/riscv/trap_util.S')
-rw-r--r-- | src/arch/riscv/trap_util.S | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/arch/riscv/trap_util.S b/src/arch/riscv/trap_util.S index 5582a0770c..98db85c4cb 100644 --- a/src/arch/riscv/trap_util.S +++ b/src/arch/riscv/trap_util.S @@ -140,15 +140,10 @@ trap_entry: save_tf move a0,sp jal trap_handler - .global supervisor_call_return -supervisor_call_return: - csrr a0, mscratch - restore_regs - # go back into supervisor call - mret - .global machine_call_return -machine_call_return: - csrr a0, mscratch - restore_regs - # go back into machine call - mret + + .global trap_return +trap_return: + csrr a0, mscratch + restore_regs + # go back to the previous mode + mret |