Table Jump Base Vector and Control Register
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.
| 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:6] RV64 [63:6] | BASE | 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. | if (JVT_READ_ONLY) {
return CsrFieldType::RO;
}
else {
return CsrFieldType::RW;
} | UNDEFINED_LEGAL | |
| [5:0] | MODE | `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. | if (JVT_READ_ONLY) {
return CsrFieldType::RO;
}
else {
return CsrFieldType::RW;
} | 0 |
check_zcmt_enabled($encoding); return $bits(CSR[jvt]);
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.