Skip to content

Commit

Permalink
Reword the ASR description to clarify Zstid register behaviour. (risc…
Browse files Browse the repository at this point in the history
…v#335)

The thread id registers introduced in Zstid differ in behaviour with
other registers in that they have different behaviour for reads than
writes, and the utidc register is treated as privileged for the purposes
of ASR checking. Try and clarify this more.

---------

Co-authored-by: Andrés Amaya Garcia <andres.amaya@codasip.com>
  • Loading branch information
2 people authored and tariqkurd-repo committed Oct 9, 2024
1 parent 18aeee3 commit 5c9abf9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/cap-description.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ Execute Permission (X):: Allow instruction execution.

[#asr_perm,reftext="ASR-permission"]
Access System Registers Permission (ASR):: Allow read and write access to all
privileged (M-mode and S-mode) CSRs with the following exceptions:
. <<utid>>, <<utidc>>, <<stid>>, <<stidc>>, <<mtid>>, <<mtidc>> all require ASR
access for writing and not for reading, as well as having a suitable privileged
execution mode.
privileged (M-mode and S-mode) CSRs.
If {tid_ext_name} is supported the <<utid>>, <<utidc>>, <<stid>>, <<stidc>>, <<mtid>>,
<<mtidc>> registers are all considered privileged for the purposes of writing
and unprivileged for reading, and thus require ASR-permission for writes but not reads.
In all cases a suitable privilege mode is required for access.

[#cap_permissions_encoding]
===== Permission Encoding
Expand Down

0 comments on commit 5c9abf9

Please sign in to comment.