Skip to content

Commit f61d3b0

Browse files
Clarify behaviour of vstid/vstidc registers. (#446)
The specification is not completly clear on the behaviour of the vstid/c registers. Propose it should follow the behaviour of other virtual supervisor registers. --------- Co-authored-by: Tariq Kurd <tariq.kurd@codasip.com>
1 parent 56a09e1 commit f61d3b0

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

src/tid-ext.adoc

+16-5
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,15 @@ include::img/stidreg.edn[]
7474
[#vstid,reftext="vstid"]
7575
==== Virtual Supervisor Thread Identifier (vstid)
7676

77-
The <<vstid>> register is a VSLEN-bit read-write register. It is used to
78-
identify the current thread in virtual supervisor mode. The reset value of this
79-
register is UNSPECIFIED.
77+
The <<vstid>> register is a VSLEN-bit read-write register. It is VS-mode's
78+
version of supervisor register <<stid>> used to identify the current
79+
thread in virtual supervisor mode. As other Virtual Supervisor registers
80+
when V=1, <<vstid>> substitutes for the usual <<stid>>, so that
81+
instructions that normally read or modify <<stid>> actually access
82+
<<vstid>> instead. When V=0, <<vstid>> does not directly affect the
83+
behaviour of the machine.
84+
85+
The reset value of this register is UNSPECIFIED.
8086

8187
.Virtual supervisor thread identifier register
8288
include::img/vstidreg.edn[]
@@ -122,8 +128,13 @@ include::img/stidcreg.edn[]
122128
==== Virtual Supervisor Thread Identifier Capability (vstidc)
123129

124130
The <<vstidc>> register is a CLEN-bit read-write capability register.
125-
It is the capability extension of the <<vstid>> register.
126-
It is used to identify the current thread in virtual supervisor mode.
131+
It is the capability extension of the <<stidc>> register used to
132+
identify the current thread in virtual supervisor mode.
133+
As other Virtual Supervisor registers when V=1, <<vstidc>> substitutes
134+
for the usual <<stidc>>, so that instructions that normally read or modify
135+
<<stidc>> actually access <<vstidc>> instead.
136+
When V=0, <<vstidc>> does not directly affect the
137+
behaviour of the machine.
127138
On reset the tag of <<vstidc>> will be set to 0 and the remainder
128139
of the data is UNSPECIFIED.
129140

0 commit comments

Comments
 (0)