RISC-V Topic Guide

Exception Handling

RISC-V exception handling focuses on synchronous traps: mcause/scause cause codes, mtvec/stvec entries, mepc/sepc exception PCs, mtval/stval auxiliary information, medeleg delegation, and typical exceptions such as illegal instruction, breakpoint, ECALL, and page faults.

mcausescausemtvecstvecmepcsepcmtvalstvalMRETSRETmedelegECALLEBREAKpage fault