diff --git a/src/debug-integration.adoc b/src/debug-integration.adoc index fa2b85f7..e4b4f0db 100644 --- a/src/debug-integration.adoc +++ b/src/debug-integration.adoc @@ -97,8 +97,7 @@ include::img/dpcreg.edn[] [#dpcc,reftext="dpcc"] ==== Debug Program Counter Capability (dpcc) -The <> register is a renamed extension to <> that is able to hold a -capability. +The <> register extends <> to hold a capability. {TAG_RESET_CSR} @@ -140,8 +139,7 @@ include::img/dscratch0reg.edn[] [#dscratch0c,reftext="dscratch0c"] ==== Debug Scratch Register 0 Capability (dscratch0c) -The <> register is a CLEN-bit plus tag bit renamed extension to -<> that is able to hold a capability. +The <> register extends <> to hold a capability. {TAG_RESET_CSR} @@ -161,8 +159,7 @@ include::img/dscratch1reg.edn[] [#dscratch1c,reftext="dscratch1c"] ==== Debug Scratch Register 1 Capability (dscratch1c) -The <> register is a CLEN-bit plus tag bit renamed extension to -<> that is able to hold a capability. +The <> register extends <> to hold a capability. {TAG_RESET_CSR} diff --git a/src/hypervisor-integration.adoc b/src/hypervisor-integration.adoc index 60ee8cc4..f6f8aad1 100644 --- a/src/hypervisor-integration.adoc +++ b/src/hypervisor-integration.adoc @@ -83,8 +83,8 @@ include::img/vstvecreg.edn[] [#vstvecc,reftext="vstvecc"] === Virtual Supervisor Trap Vector Base Address Capability Register (vstvecc) -The <> register is a renamed extension of <> that is able to -hold a capability. Its reset value is the <> capability. +The <> register extends <> to hold a capability. +Its reset value is the <> capability. .Virtual supervisor trap vector base address capability register include::img/vstveccreg.edn[] @@ -105,8 +105,7 @@ include::img/vsscratchreg.edn[] [#vsscratchc,reftext="vsscratchc"] === Virtual Supervisor Scratch Register (vsscratchc) -The <> register is a renamed version of <> that is able -to hold a capability. +The <> register extends <> to hold a capability. {TAG_RESET_CSR} @@ -127,8 +126,8 @@ include::img/vsepcreg.edn[] [#vsepcc,reftext="vsepcc"] === Virtual Supervisor Exception Program Counter Capability (vsepcc) -The <> register is a renamed extension of <> that is able to -hold a capability. Its reset value is the <> capability. +The <> register extends <> to hold a capability. +Its reset value is the <> capability. As shown in xref:CSR_exevectors[xrefstyle=short], <> is a code capability, so it does not need to be able to hold all possible invalid addresses (see <>). Additionally, the capability in <> is unsealed when it is installed in diff --git a/src/riscv-hybrid-integration.adoc b/src/riscv-hybrid-integration.adoc index 78841c9d..3a22a8cf 100644 --- a/src/riscv-hybrid-integration.adoc +++ b/src/riscv-hybrid-integration.adoc @@ -12,7 +12,7 @@ CSRs enabling CHERI features. The remainder of this section describes these features in detail as well as their integration with the primary base integer variants of the RISC-V ISA (RV32I and RV64I). -[#section-cheri-execution-mode] +[#section-cheri-execution-mode,reftext="CHERI Execution Mode"] === CHERI Execution Mode {cheri_default_ext_name} adds CHERI execution modes to ensure backwards diff --git a/src/riscv-integration.adoc b/src/riscv-integration.adoc index ca255bbe..e4d9ce19 100644 --- a/src/riscv-integration.adoc +++ b/src/riscv-integration.adoc @@ -329,8 +329,8 @@ two tag bits in memory. === Zicsr, Control and Status Register (CSR) Instructions {cheri_base_ext_name} requires that RISC-V CSRs intended to hold addresses, -like <>, are now able to hold capabilities. Therefore, such registers are -renamed and extended to CLEN-bit in {cheri_base_ext_name}. +are now able to hold capabilities. Therefore, such registers are +extended to CLEN+1 bits in {cheri_base_ext_name} and a `c` suffix is added (e.g. <> is extended to <>). Reading or writing any part of a CLEN-bit CSR may cause side effects. For example, the CSR's tag bit may be cleared if a new address @@ -388,6 +388,9 @@ xref:vscsrnames-renamed[xrefstyle=short] and xref:ucsrnames-renamed[xrefstyle=short] from the base RISC-V ISA and its extensions. The CSRs are renamed to reflect the fact that they are extended to CLEN+1 bits wide, as the *x* registers are renamed to *c* registers. +Even though the CSR is extended, the CSR index remains identical. + +NOTE: If {cheri_default_ext_name} is supported then the <> determines whether CLEN+1 or XLEN bits are returned (see <>). [[dcsrnames-renamed]] .Renamed debug-mode CSRs in {cheri_base_ext_name} @@ -486,9 +489,8 @@ include::img/mtvecreg.edn[] [#mtvecc,reftext="mtvecc"] ==== Machine Trap Vector Base Address Capability Register (mtvecc) -The <> register is a renamed extension of <> that holds a -capability. Its reset value is the <> capability. The capability -represents a code pointer. +The <> register extends <> to hold a code capability. +Its reset value is the <> capability. .Machine-mode trap-vector base-capability register include::img/mtveccreg.edn[] @@ -528,6 +530,8 @@ are followed which may require the tag to be cleared. In particular, if any part of the range is in the invalid address space then clearing the tag is strongly recommended. +As shown in xref:CSR_exevectors[xrefstyle=short], <> is a code capability, so it does not need to be able to hold all possible invalid addresses (see <>). + [#mscratch, reftext="mscratch"] ==== Machine Scratch Register (mscratch) @@ -543,8 +547,7 @@ include::img/mscratchreg.edn[] [#mscratchc, reftext="mscratchc"] ==== Machine Scratch Capability Register (mscratchc) -The <> register is a renamed extension of <> that is able to -hold a capability. +The <> register extends <> to hold a capability. {TAG_RESET_CSR} @@ -565,8 +568,8 @@ include::img/mepcreg.edn[] [#mepcc,reftext="mepcc"] ==== Machine Exception Program Counter Capability (mepcc) -The <> register is a renamed extension of <> that is able to hold a -capability. Its reset value is the <> capability. +The <> register extends <> to hold a capability. +Its reset value is the <> capability. .Machine exception program counter capability register include::img/mepccreg.edn[] @@ -913,11 +916,8 @@ include::img/stvecreg.edn[] [#stvecc,reftext="stvecc"] ==== Supervisor Trap Vector Base Address Capability Register (stvecc) -The <> register is an SXLEN-bit WARL read/write register that holds the -trap vector configuration, consisting of a vector base address (BASE) and a -vector mode (MODE). The <> register is a renamed extension of <> -that is able to hold a capability. Its reset value is the <> -capability. +The <> register extends <> that is able to hold a capability. +Its reset value is the <> capability. .Supervisor trap-vector base-capability register include::img/stveccreg.edn[] @@ -940,8 +940,7 @@ include::img/sscratchreg.edn[] [#sscratchc, reftext="sscratchc"] ==== Supervisor Scratch Capability Register (sscratchc) -The <> register is a renamed extension of <> that is able to -hold a capability. +The <> register extends <> to hold a capability. {TAG_RESET_CSR} @@ -962,8 +961,8 @@ include::img/sepcreg.edn[] [#sepcc,reftext="sepcc"] ==== Supervisor Exception Program Counter Capability (sepcc) -The <> register is a renamed extension of <> that is able to hold a -capability. Its reset value is the <> capability. +The <> register extends <> to hold a capability. +Its reset value is the <> capability. As shown in xref:CSR_exevectors[xrefstyle=short], <> is a code capability, so it does not need to be able to hold all possible invalid addresses (see <>). Additionally, the capability in <> is unsealed when it is installed in diff --git a/src/tables.adoc b/src/tables.adoc index e213a6db..2df9123a 100644 --- a/src/tables.adoc +++ b/src/tables.adoc @@ -139,7 +139,7 @@ include::generated/csr_permission_table_body.adoc[] xref:cap_mode_insns[xrefstyle=short], xref:legacy_mode_insns[xrefstyle=short] and xref:both_mode_insns[xrefstyle=short] summarize on which -<> each instruction may be +<> each instruction may be executed in. .Instructions valid for execution in {cheri_cap_mode_name} only @@ -193,10 +193,10 @@ include::generated/illegal_insns_table_body.adoc[] xref:cheri_behavior_cre_mode[xrefstyle=short] summarizes the behavior of a hart supporting both {cheri_base_ext_name} and {cheri_default_ext_name} in connection with the <> and the -<> while in a privilege +<> while in a privilege other than debug mode. -.Hart's behavior depending on the effective <> and <> +.Hart's behavior depending on the effective <> and <> [#cheri_behavior_cre_mode,width=100%,options=header,align=center,%autowidth,cols="8,8,15,12,12,15,15,15"] |============================================================================== // Header diff --git a/src/tid-ext.adoc b/src/tid-ext.adoc index d9b1b7b0..6c7e3d3d 100644 --- a/src/tid-ext.adoc +++ b/src/tid-ext.adoc @@ -103,8 +103,7 @@ extended as follows: [#mtidc,reftext="mtidc"] ==== Machine Thread Identifier Capability (mtidc) -The <> register is an CLEN-bit read-write capability register. -It is the capability extension of the <> register. +The <> register extends <> to hold a capability. It is used to identify the current software thread in machine mode. On reset the tag of <> will be set to 0 and the remainder of the data is UNSPECIFIED. @@ -115,8 +114,7 @@ include::img/mtidcreg.edn[] [#stidc,reftext="stidc"] ==== Supervisor Thread Identifier Capability (stidc) -The <> register is an CLEN-bit read-write capability register. -It is the capability extension of the <> register. +The <> register extends <> to hold a capability. It is used to identify the current software thread in supervisor mode. On reset the tag of <> will be set to 0 and the remainder of the data is UNSPECIFIED. @@ -127,9 +125,8 @@ include::img/stidcreg.edn[] [#vstidc,reftext="vstidc"] ==== Virtual Supervisor Thread Identifier Capability (vstidc) -The <> register is a CLEN-bit read-write capability register. -It is the capability extension of the <> register used to -identify the current software thread in virtual supervisor mode. +The <> register extends <> to hold a capability. +It is used to identify the current software thread in virtual supervisor mode. As other Virtual Supervisor registers when V=1, <> substitutes for <>, so that instructions that normally read or modify <> actually access <> instead. @@ -144,8 +141,7 @@ include::img/vstidcreg.edn[] [#utidc,reftext="utidc"] ==== User Thread Identifier Capability (utidc) -The <> register is an CLEN-bit read-write capability register. -It is the capability extension of the <> register. +The <> register extends <> to hold a capability. It is used to identify the current software thread in user mode. On reset the tag of <> will be set to 0 and the remainder of the data is UNSPECIFIED.