mirror of
https://github.com/riscv/riscv-isa-manual.git
synced 2025-05-08 20:23:34 +08:00
Add note about tvec/jvt register layout/alignment (#1988)
Supersedes #1987
This commit is contained in:
parent
a7713b9f1e
commit
7b6911f56f
@ -1185,6 +1185,9 @@ read-only value. If `mtvec` is writable, the set of values the register
|
||||
may hold can vary by implementation. The value in the BASE field must
|
||||
always be aligned on a 4-byte boundary, and the MODE setting may impose
|
||||
additional alignment constraints on the value in the BASE field.
|
||||
Note that the CSR contains only bits XLEN-1 through 2 of the address BASE.
|
||||
When used as an address, the lower two bits are filled with zeroes to obtain
|
||||
an XLEN-bit address that is always aligned on a 4-byte boundary.
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
|
@ -311,6 +311,9 @@ physical address, subject to the following alignment constraints: the
|
||||
address must be 4-byte aligned, and MODE settings other than Direct
|
||||
might impose additional alignment constraints on the value in the BASE
|
||||
field.
|
||||
Note that the CSR contains only bits XLEN-1 through 2 of the address BASE.
|
||||
When used as an address, the lower two bits are filled with zeroes to obtain
|
||||
an XLEN-bit address that is always aligned on a 4-byte boundary.
|
||||
|
||||
[[stvec-mode]]
|
||||
.Encoding of `stvec` MODE field.
|
||||
|
@ -2399,6 +2399,7 @@ 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).
|
||||
|
||||
If <<Zcmt>> is implemented then _jvt_ must also be implemented, but can contain a read-only value. If _jvt_ is writable, the set of values the register may hold can vary by implementation. 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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user