mtvec
The register that tells a RISC-V core where to jump when something goes wrong or an interrupt arrives — RISC-V's answer to the interrupt vector table.
The upper bits hold a base address, the lowest two a mode. In direct mode every trap, whatever the cause, lands at the same address, and the handler reads mcause and branches on its own. In vectored mode asynchronous interrupts go to base + 4 × cause instead, giving each interrupt its own entry point — usually a single jump to the real routine. Synchronous exceptions still go to the base.
Unlike Arm's vector table, then, the table holds instructions rather than addresses. Forgetting to set mtvec in the startup code is a classic way to build a core that, on its first fault, jumps to address zero and quietly starts over.