Supervisor Trap Vector
Controls where traps jump.
| 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BASE | MODE | ||||||||||||||||||||||||||||||
| 63:56 | 55:48 | 47:40 | 39:32 | 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BASE | MODE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bits | Field | Alias | Description | Type | Reset |
|---|---|---|---|---|---|
| RV32 [31:2] RV64 [63:2] | BASE | Bits [SXLEN-1:2] of the virtual address of the exception vector for any trap taken into S-mode. If the base address is written with a non-canonical address (_i.e._, bits [SXLEN-1:] do not match bit ), the write should be ignored. When `stvec.MODE` is Vectored, the address must be aligned to `STVEC_BASE_ALIGNMENT_VECTORED` bytes. A misaligned write leaves an unspecified legal value in the field. | RW-R | UNDEFINED_LEGAL | |
| [1:0] | MODE | Vectoring mode for asynchronous interrupts. 0 - Direct, 1 - Vectored When Direct, all synchronous exceptions and asynchronous interrupts jump to (`stvec.BASE` << 2). When Vectored, asynchronous interrupts jump to (`stvec.BASE` << 2 + `scause.CODE`*4) while synchronous exceptions continue to jump to (`stvec.BASE` << 2). | return ($array_size(STVEC_MODES) == 1) ? CsrFieldType::RO : CsrFieldType::RWR; | return ($array_size(STVEC_MODES) == 1) ? STVEC_MODES[0] : UNDEFINED_LEGAL; |
Version af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.