generated from riscv/docs-spec-template
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce GCTYPE to obtain the capability type
While the base CHERI specification only has unsealed capabilities and one type of sentry capability, other extensions (e.g. CherIoT) that will build upon the base CHERI-RISC-V standard have additional types of capabilities. Defining the specification in terms of object types instead of just having unsealed and sentry is one important step towards allowing CherIoT to be a RV32E extension on top of the base standard. See https://lists.riscv.org/g/tech-tg-cheri/message/6
- Loading branch information
1 parent
bbd2d16
commit 5acf436
Showing
8 changed files
with
74 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<<< | ||
|
||
[#GCTYPE,reftext="GCTYPE"] | ||
==== GCTYPE | ||
|
||
include::new_encoding_note.adoc[] | ||
|
||
ifdef::cheri_v9_annotations[] | ||
NOTE: *CHERI v9 Note:* this instruction was called CGETTYPE. | ||
endif::[] | ||
|
||
Synopsis:: | ||
Capability get type | ||
|
||
Mnemonic:: | ||
`gctype rd, cs1` | ||
|
||
Encoding:: | ||
include::wavedrom/gctype.adoc[] | ||
|
||
Description:: | ||
Decode the architectural capability type from `cs1` and write the result to `rd`. | ||
It is not required that the input capability `cs1` has its tag set to 1. | ||
|
||
NOTE: While the architectural capability type maps directly to the value of the `CT` capability bit in {cheri_base_ext_name}, future extensions may define an alternate mapping. | ||
Therefore, software should always use <<GCTYPE>> to obtain the capability type rather than directly reading the high bits of the capability using <<GCHI>>. | ||
|
||
|
||
.Capability types in {cheri_base_ext_name} | ||
|=== | ||
|Type |Hardware interpretation | ||
|
||
|0 | Unsealed capability | ||
|1 | <<#section_cap_sealed,Sentry capability>> | ||
|=== | ||
|
||
Exceptions:: | ||
include::require_cre.adoc[] | ||
|
||
Prerequisites:: | ||
{cheri_base_ext_name} | ||
|
||
Operation:: | ||
+ | ||
-- | ||
TODO | ||
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
[wavedrom, ,svg] | ||
.... | ||
{reg: [ | ||
{bits: 7, name: 'opcode', attr: ['7', 'OP=0110011'], type: 8}, | ||
{bits: 5, name: 'rd', attr: ['5', 'dest'], type: 2}, | ||
{bits: 3, name: 'funct3', attr: ['3', 'GCTYPE=000'], type: 8}, | ||
{bits: 5, name: 'cs1', attr: ['5', 'src'], type: 4}, | ||
{bits: 5, name: 'funct5', attr: ['5', 'GCTYPE=00010'], type: 3}, | ||
{bits: 7, name: 'funct7', attr: ['7', 'GCTYPE=0001000'], type: 3}, | ||
]} | ||
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters