Skip to content

Commit

Permalink
refine description of siselect
Browse files Browse the repository at this point in the history
  • Loading branch information
ybc-alkaid committed Oct 8, 2023
1 parent 5558949 commit a585efc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
Binary file modified rv-spmp-spec.pdf
Binary file not shown.
38 changes: 21 additions & 17 deletions spmp_spec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -208,34 +208,38 @@ image::SPMP_domain_switch_register_format.svg[title="SPMP domain switch register


=== Access Methods of SPMP CSRs
*Indirect CSR access*: The SPMP support indirect CSR access if the `Sscsrind` extension is implemented.
How SPMP CSRs are accessed depends on whether the the `Sscsrind` extension is implemented or not.

*Indirect CSR access*: The SPMP supports indirect CSR access if the `Sscsrind` extension is implemented.
The `Sscsrind` defines 1 select CSR (`siselect`) and 6 alias CSRs (`sireg[i]`).
The each combination of `siselect` and `sireg[i]` standards for an access of corresponding SPMP CSR.
Each combination of `siselect` and `sireg[i]` represents an access to the corresponding SPMP CSR.

[cols="^1,^2",stripes=even, options="header"]
|===
|siselect number|indirect CSR access of sireg[i]
|0x1a0|sireg[1-6] -> spmpcfg[0-5]
|0x1a1|sireg[1-6] -> spmpcfg[6-11]
|0x1a2|sireg[1-4] -> spmpcfg[12-15]
|0x1a3|sireg[1-6] -> spmpaddr[0-5]
|0x1a4|sireg[1-6] -> spmpaddr[6-11]
|0x1a5|sireg[1-6] -> spmpaddr[12-17]
|0x1a6|sireg[1-6] -> spmpaddr[18-23]
|0x1a7|sireg[1-6] -> spmpaddr[24-29]
|0x1a8|sireg[1-6] -> spmpaddr[30-35]
|0x1a9|sireg[1-6] -> spmpaddr[36-41]
|0x1aa|sireg[1-6] -> spmpaddr[42-47]
|0x1ab|sireg[1-6] -> spmpaddr[48-53]
|0x1ac|sireg[1-6] -> spmpaddr[54-59]
|0x1ad|sireg[1-4] -> spmpaddr[60-63]
|0x1ae|sireg[1-2] -> spmpswitch[0-1]
|siselect#1|sireg[1-6] -> spmpcfg[0-5]
|siselect#2|sireg[1-6] -> spmpcfg[6-11]
|siselect#3|sireg[1-4] -> spmpcfg[12-15]
|siselect#4|sireg[1-6] -> spmpaddr[0-5]
|siselect#5|sireg[1-6] -> spmpaddr[6-11]
|siselect#6|sireg[1-6] -> spmpaddr[12-17]
|siselect#7|sireg[1-6] -> spmpaddr[18-23]
|siselect#8|sireg[1-6] -> spmpaddr[24-29]
|siselect#9|sireg[1-6] -> spmpaddr[30-35]
|siselect#10|sireg[1-6] -> spmpaddr[36-41]
|siselect#11|sireg[1-6] -> spmpaddr[42-47]
|siselect#12|sireg[1-6] -> spmpaddr[48-53]
|siselect#13|sireg[1-6] -> spmpaddr[54-59]
|siselect#14|sireg[1-4] -> spmpaddr[60-63]
|siselect#15|sireg[1-2] -> spmpswitch[0-1]
|===

*Direct CSR access*: SPMP CSRs can be accessed directly with corresponding CSR numbers if the `Sscsrind` extension is not implemented.

[NOTE]
====
The specific value of `siselect#1-15` will be allocated after review by the Arch Review Committee.
Please refers to the specification of the `Sscsrind` extension for details of indirect CSR access.
https://github.com/riscv/riscv-indirect-csr-access
====

0 comments on commit a585efc

Please sign in to comment.