Skip to content

Commit

Permalink
Clarify behaviour of vstid/vstidc registers. (#446)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
buxtonpaul and tariqkurd-repo authored Nov 8, 2024
1 parent 56a09e1 commit f61d3b0
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/tid-ext.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,15 @@ include::img/stidreg.edn[]
[#vstid,reftext="vstid"]
==== Virtual Supervisor Thread Identifier (vstid)

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

The reset value of this register is UNSPECIFIED.

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

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

Expand Down

0 comments on commit f61d3b0

Please sign in to comment.