stvec
Supervisor trap handler base address
- Address
0x105- Group
- Supervisor-level CSRs
- Privilege
SRW(privileged spec CSR listing, Supervisor Trap Setup)- Access
- read/write; lowest privilege S (supervisor)
- Address range
- Standard read/write
- Name in riscv-unified-db
- Supervisor Trap Vector
Privileged spec: Supervisor trap handler base address
Description
Controls where traps jump.
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
BASE | RV32 31-2 / RV64 63-2 | RW-R | |
MODE | 1-0 | Vectoring mode for asynchronous interrupts. 0 - Direct, 1 - Vectored When Direct, all synchronous exceptions and asynchronous interrupts jump to ( When Vectored, asynchronous interrupts jump to ( |
Fields from riscv-unified-db; field types computed by IDL functions there are not shown.
Specification and related pages
- The RISC-V Instruction Set Manual, Volume II: CSR listing (src/priv/csrs.adoc)
- riscv-opcodes csrs.csv
- riscv-unified-db: spec/std/isa/csr/stvec.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)