Skip to content

Commit a52f243

Browse files
authored
Merge pull request #1344 from ved-rivos/jvt
Use lower case for jvt CSR name
2 parents 382fd8b + c89c8e1 commit a52f243

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/smstateen.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ floating-point instructions cause an illegal instruction trap (or virtual
247247
instruction trap, if relevant), as though they all access `fcsr`, regardless of
248248
whether they really do.
249249

250-
The JVT bit controls access to the `JVT` CSR provided by the Zcmt extension.
250+
The JVT bit controls access to the `jvt` CSR provided by the Zcmt extension.
251251

252252
The SE0 bit in `mstateen0` controls access to the `hstateen0`, `hstateen0h`,
253253
and the `sstateen0` CSRs. The SE0 bit in `hstateen0` controls access to the

src/zc.adoc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ The PUSH/POP assembly syntax uses several variables, the meaning of which are:
272272
[#Zcmt]
273273
=== Zcmt
274274

275-
Zcmt adds the table jump instructions and also adds the JVT CSR. The JVT CSR requires a
275+
Zcmt adds the table jump instructions and also adds the jvt CSR. The jvt CSR requires a
276276
state enable if Smstateen is implemented. See <<csrs-jvt>> for details.
277277

278278
This extension reuses some encodings from _c.fsdsp_. Therefore it is _incompatible_ with <<Zcd>>,
@@ -2356,9 +2356,9 @@ Table jump allows the linker to replace the following instruction sequences with
23562356

23572357
If a return address stack is implemented, then as _cm.jalt_ is equivalent to _jal ra_, it pushes to the stack.
23582358

2359-
==== JVT
2359+
==== jvt
23602360

2361-
The base of the table is in the JVT CSR (see <<csrs-jvt>>), each table entry is XLEN bits.
2361+
The base of the table is in the jvt CSR (see <<csrs-jvt>>), each table entry is XLEN bits.
23622362

23632363
If the same function is called with and without linking then it must have two entries in the table.
23642364
This is typically caused by the same function being called with and without tail calling.
@@ -2379,8 +2379,8 @@ if the tables have not been updated in memory since the last _fence.i_.
23792379
If an exception occurs on either instruction fetch, xEPC is set to the PC of the table jump instruction, xCAUSE is set as expected for the type of fault and xTVAL (if not set to zero) contains the fetch address which caused the fault.
23802380

23812381
<<<
2382-
[#csrs-jvt,reftext="JVT CSR, table jump base vector and control register"]
2383-
==== JVT CSR
2382+
[#csrs-jvt,reftext="jvt CSR, table jump base vector and control register"]
2383+
==== jvt CSR
23842384

23852385
Synopsis:
23862386

@@ -2416,24 +2416,24 @@ Format (RV64):
24162416

24172417
Description:
24182418

2419-
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).
2419+
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).
24202420

2421-
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.
2421+
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.
24222422

2423-
_JVT.base_ is a virtual address, whenever virtual memory is enabled.
2423+
_jvt.base_ is a virtual address, whenever virtual memory is enabled.
24242424

2425-
The memory pointed to by _JVT.base_ is treated as instruction memory for the purpose of executing table jump instructions, implying execute access permission.
2425+
The memory pointed to by _jvt.base_ is treated as instruction memory for the purpose of executing table jump instructions, implying execute access permission.
24262426

24272427
[#JVT-config-table]
2428-
._JVT.mode_ definition
2428+
._jvt.mode_ definition
24292429
[width="60%",options=header]
24302430
|=============================================================================================
2431-
| JVT.mode | Comment
2431+
| jvt.mode | Comment
24322432
| 000000 | Jump table mode
24332433
| others | *reserved for future standard use*
24342434
|=============================================================================================
24352435

2436-
_JVT.mode_ is a *WARL* field, so can only be programmed to modes which are implemented. Therefore the discovery mechanism is to
2436+
_jvt.mode_ is a *WARL* field, so can only be programmed to modes which are implemented. Therefore the discovery mechanism is to
24372437
attempt to program different modes and read back the values to see which are available. Jump table mode _must_ be implemented.
24382438

24392439
[NOTE]
@@ -2443,11 +2443,11 @@ in future the RISC-V Unified Discovery method will report the available modes.
24432443

24442444
Architectural State:
24452445

2446-
_JVT_ adds architectural state to the system software context (such as an OS process), therefore must be saved/restored on context switches.
2446+
_jvt_ CSR adds architectural state to the system software context (such as an OS process), therefore must be saved/restored on context switches.
24472447

24482448
State Enable:
24492449

2450-
If the Smstateen extension is implemented, then bit 2 in _mstateen0_, _sstateen0_, and _hstateen0_ is implemented. If bit 2 of a controlling _stateen0_ CSR is zero, then access to the _JVT_ CSR and execution of a _cm.jalt_ or _cm.jt_ instruction by a lower privilege level results in an Illegal Instruction trap (or, if appropriate, a Virtual Instruction trap).
2450+
If the Smstateen extension is implemented, then bit 2 in _mstateen0_, _sstateen0_, and _hstateen0_ is implemented. If bit 2 of a controlling _stateen0_ CSR is zero, then access to the _jvt_ CSR and execution of a _cm.jalt_ or _cm.jt_ instruction by a lower privilege level results in an Illegal Instruction trap (or, if appropriate, a Virtual Instruction trap).
24512451

24522452
<<<
24532453
[#insns-cm_jt,reftext="Jump via table"]
@@ -2480,7 +2480,7 @@ For this encoding to decode as _cm.jt_, _index<32_, otherwise it decodes as _cm.
24802480

24812481
[NOTE]
24822482
====
2483-
If JVT.mode = 0 (Jump Table Mode) then _cm.jt_ behaves as specified here. If JVT.mode is a reserved value, then _cm.jt_ is also reserved. In the future other defined values of JVT.mode may change the behaviour of _cm.jt_.
2483+
If jvt.mode = 0 (Jump Table Mode) then _cm.jt_ behaves as specified here. If jvt.mode is a reserved value, then _cm.jt_ is also reserved. In the future other defined values of jvt.mode may change the behaviour of _cm.jt_.
24842484
====
24852485

24862486
Assembly Syntax:
@@ -2517,8 +2517,8 @@ Operation:
25172517
# InstMemory is byte indexed
25182518
25192519
switch(XLEN) {
2520-
32: table_address[XLEN-1:0] = JVT.base + (index<<2);
2521-
64: table_address[XLEN-1:0] = JVT.base + (index<<3);
2520+
32: table_address[XLEN-1:0] = jvt.base + (index<<2);
2521+
64: table_address[XLEN-1:0] = jvt.base + (index<<3);
25222522
}
25232523
25242524
//fetch from the jump table
@@ -2559,7 +2559,7 @@ For this encoding to decode as _cm.jalt_, _index>=32_, otherwise it decodes as _
25592559

25602560
[NOTE]
25612561
====
2562-
If JVT.mode = 0 (Jump Table Mode) then _cm.jalt_ behaves as specified here. If JVT.mode is a reserved value, then _cm.jalt_ is also reserved. In the future other defined values of JVT.mode may change the behaviour of _cm.jalt_.
2562+
If jvt.mode = 0 (Jump Table Mode) then _cm.jalt_ behaves as specified here. If jvt.mode is a reserved value, then _cm.jalt_ is also reserved. In the future other defined values of jvt.mode may change the behaviour of _cm.jalt_.
25632563
====
25642564

25652565
Assembly Syntax:
@@ -2596,8 +2596,8 @@ Operation:
25962596
# InstMemory is byte indexed
25972597
25982598
switch(XLEN) {
2599-
32: table_address[XLEN-1:0] = JVT.base + (index<<2);
2600-
64: table_address[XLEN-1:0] = JVT.base + (index<<3);
2599+
32: table_address[XLEN-1:0] = jvt.base + (index<<2);
2600+
64: table_address[XLEN-1:0] = jvt.base + (index<<3);
26012601
}
26022602
26032603
//fetch from the jump table

0 commit comments

Comments
 (0)