Webcentive RISC-V Reference

jvt

Table jump base vector and control register

Address
0x017
Group
Unprivileged and user-level CSRs
Privilege
URW (privileged spec CSR listing, Unprivileged Zcmt Extension CSR)
Access
read/write; lowest privilege U (user/unprivileged)
Address range
Standard read/write
Name in riscv-unified-db
Table Jump Base Vector and Control Register

Privileged spec: Table jump base vector and control register

Description

The jvt register is an XLEN-bit WARL read/write register that holds the jump table configuration, consisting of the jump table base address (BASE) and the jump table mode (MODE).

jvt CSR adds architectural state to the system software context (such as an OS process), therefore must be saved/restored on context switches.

From riscv-unified-db, reformatted.

Fields

FieldBitsTypeDescription
BASERV32 31-6 / RV64 63-6

The value in the BASE field must always be aligned on a 64-byte boundary. Note that the CSR contains only bits XLEN-1 through 6 of the address base. When computing jump-table accesses, the lower six bits of base are filled with zeroes to obtain an XLEN-bit jump-table base address jvt.base that is always aligned on a 64-byte boundary.

jvt.base is a virtual address, whenever virtual memory is enabled.

The memory pointed to by jvt.base is treated as instruction memory for the purpose of executing table jump instructions, implying execute access permission.

MODE5-0

jvt.mode is a WARL field, so can only be programmed to modes which are implemented. Therefore the discovery mechanism is to attempt to program different modes and read back the values to see which are available. Jump table mode must be implemented.

Fields from riscv-unified-db; field types computed by IDL functions there are not shown.

Specification and related pages