Function riscv_rt::start_trap_rust

source ·
#[link_section = ".trap.rust"]
#[export_name = "_start_trap_rust"]
pub unsafe extern "C" fn start_trap_rust(trap_frame: *const TrapFrame)
Expand description

Trap entry point rust (_start_trap_rust)

scause/mcause is read to determine the cause of the trap. XLEN-1 bit indicates if it’s an interrupt or an exception. The result is examined and ExceptionHandler or one of the core interrupt handlers is called.

§Safety

This function must be called only from assembly _start_trap function. Do NOT call this function directly.