Lines Matching refs:trap_frame
35 unsafe extern "C" fn riscv64_do_irq(trap_frame: &mut TrapFrame) { in riscv64_do_irq()
36 if trap_frame.cause.is_interrupt() { in riscv64_do_irq()
37 riscv64_do_interrupt(trap_frame); in riscv64_do_irq()
38 } else if trap_frame.cause.is_exception() { in riscv64_do_irq()
39 riscv64_do_exception(trap_frame); in riscv64_do_irq()
44 fn riscv64_do_interrupt(trap_frame: &mut TrapFrame) { in riscv64_do_interrupt()
45 riscv_intc_irq(trap_frame); in riscv64_do_interrupt()
49 fn riscv64_do_exception(trap_frame: &mut TrapFrame) { in riscv64_do_exception()
50 let code = trap_frame.cause.code(); in riscv64_do_exception()
54 handler(trap_frame).ok(); in riscv64_do_exception()
96 fn do_trap_break(trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_break()
99 EBreak::handle(trap_frame) in do_trap_break()
135 fn do_trap_user_env_call(trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_user_env_call()
136 if trap_frame.is_from_user() { in do_trap_user_env_call()
137 let syscall_num = trap_frame.a7; in do_trap_user_env_call()
138 trap_frame.epc += 4; in do_trap_user_env_call()
139 trap_frame.origin_a0 = trap_frame.a0; in do_trap_user_env_call()
140 syscall_handler(syscall_num, trap_frame); in do_trap_user_env_call()
150 fn do_trap_insn_page_fault(trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_insn_page_fault()
151 let vaddr = trap_frame.badaddr; in do_trap_insn_page_fault()
152 let cause = trap_frame.cause; in do_trap_insn_page_fault()
153 let epc = trap_frame.epc; in do_trap_insn_page_fault()
164 fn do_trap_load_page_fault(trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_load_page_fault()
165 let vaddr = trap_frame.badaddr; in do_trap_load_page_fault()
166 let cause = trap_frame.cause; in do_trap_load_page_fault()
167 let epc = trap_frame.epc; in do_trap_load_page_fault()
181 fn do_trap_store_page_fault(trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_store_page_fault()
184 trap_frame.epc, trap_frame.badaddr, trap_frame.cause in do_trap_store_page_fault()