From f61d3b01c519550f548024ceb515189f38776481 Mon Sep 17 00:00:00 2001 From: Paul Buxton Date: Fri, 8 Nov 2024 19:13:54 +0000 Subject: [PATCH] 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 --- src/tid-ext.adoc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/tid-ext.adoc b/src/tid-ext.adoc index c9eec355..5a9980cc 100644 --- a/src/tid-ext.adoc +++ b/src/tid-ext.adoc @@ -74,9 +74,15 @@ include::img/stidreg.edn[] [#vstid,reftext="vstid"] ==== Virtual Supervisor Thread Identifier (vstid) -The <> 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 <> register is a VSLEN-bit read-write register. It is VS-mode's +version of supervisor register <> used to identify the current +thread in virtual supervisor mode. As other Virtual Supervisor registers +when V=1, <> substitutes for the usual <>, so that +instructions that normally read or modify <> actually access +<> instead. When V=0, <> 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[] @@ -122,8 +128,13 @@ include::img/stidcreg.edn[] ==== Virtual Supervisor Thread Identifier Capability (vstidc) The <> register is a CLEN-bit read-write capability register. -It is the capability extension of the <> register. -It is used to identify the current thread in virtual supervisor mode. +It is the capability extension of the <> register used to +identify the current thread in virtual supervisor mode. +As other Virtual Supervisor registers when V=1, <> substitutes +for the usual <>, so that instructions that normally read or modify +<> actually access <> instead. +When V=0, <> does not directly affect the +behaviour of the machine. On reset the tag of <> will be set to 0 and the remainder of the data is UNSPECIFIED.