Skip to content

Commit

Permalink
clarify writes to dinfc
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqkurd-repo committed Oct 10, 2024
1 parent 6e6ee90 commit 4e0b0da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/csv/CHERI_CSR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ direct write if address didn't change","","✔","","","{cheri_default_ext_name},
"ddc","0x416","","U","URW","<<infinite-cap>>","Apply <<section_invalid_addr_conv>>.
Always update the CSR with <<SCADDR>> even if the address didn't change.","Apply <<section_invalid_addr_conv>> and update the CSR with the result if the address changed,
direct write if address didn't change","","✔","","","{cheri_default_ext_name}","User Default Data Capability","","","","","","","","","","","","","","","","","","","","",""
"dinfc","0x7bd","","D","DRW","<<infinite-cap>>","Ignore","Ignore","","","","✔","Sdext","Source of <<infinite-cap>> capability in debug mode, writes are ignored","","","","","","","","","","","","","","","","","","","","",""
"dinfc","0x7bd","","D","DRW","<<infinite-cap>>","Ignore","Update <<m_bit>> using <<SCMODE>> semantics.","","","","✔","Sdext","Source of <<infinite-cap>> capability in debug mode, writes are ignored","","","","","","","","","","","","","","","","","","","","",""
"utidc","0x480","utid","U","Read: U, Write: U, <<asr_perm>>","tag=0, otherwise undefined","Update the CSR using <<SCADDR>>.","direct write","","","","✔","Zstid","User thread ID","","","","","","","","","","","","","","","","","","","","",""
"stidc","0x580","stid","S","Read: S, Write: S, <<asr_perm>>","tag=0, otherwise undefined","Update the CSR using <<SCADDR>>.","direct write","","","","✔","Zstid","Supervisor thread ID","","","","","","","","","","","","","","","","","","","","",""
"vstidc","0xA80","vstid","H","Read: VS, Write: VS, <<asr_perm>>","tag=0, otherwise undefined","Update the CSR using <<SCADDR>>.","direct write","","","","✔","Zstid","Virtual supervisor thread ID","","","","","","","","","","","","","","","","","","","","",""
Expand Down
8 changes: 6 additions & 2 deletions src/debug-integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,12 @@ If {cheri_default_ext_name} is implemented:
** This only needs doing once after resetting the core.
* The <<m_bit>> is used on debug mode entry to determine which CHERI execution mode to enter.

The <<m_bit>> is the only writeable field in <<dinfc>>.
Therefore if {cheri_default_ext_name} is not implemented then it is read-write with no writeable fields.
The <<m_bit>> is the only writeable field in <<dinfc>>:

* It is only updated on a <<CSRRW>> write _if_ the capability being written has a valid <<m_bit>>.
* If any other CSR instruction is used, or if the written <<m_bit>> is not valid then <<dinfc>> is not updated.

If {cheri_default_ext_name} is not implemented then <<dinfc>> is read-write with no writeable fields.

NOTE: A future version of this specification may add writeable fields to allow creation
of other capabilities, if, for example, a future extension requires multiple formats for
Expand Down

0 comments on commit 4e0b0da

Please sign in to comment.