forked from riscv/riscv-cheri
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathattributes.adoc
99 lines (88 loc) · 3.15 KB
/
attributes.adoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
:docgroup: CHERI Task Group
:description: RISC-V specification for CHERI extensions
:company: RISC-V.org
:revdate: 1/2023
:revnumber: 1.0
:revremark: This document is under development. Expect potential changes. Visit http://riscv.org/spec-state for further details.
:revinfo:
:url-riscv: http://riscv.org
:doctype: book
:preface-title: Preamble
:colophon:
:appendix-caption: Appendix
:imagesdir: {imagesdir}
:title-logo-image: image:risc-v_logo.png["RISC-V International Logo",pdfwidth=3.25in,align=center]
// Settings:
:experimental:
:reproducible:
:imagesoutdir: {imagesoutdir}
:bibtex-file: {srcdir}/riscv-cheri.bib
:bibtex-order: alphabetical
:bibtex-style: apa
:icons: font
:lang: en
:listing-caption: Listing
:sectnums:
:toc: left
:toclevels: 4
:source-highlighter: pygments
ifdef::backend-pdf[]
:source-highlighter: coderay
endif::[]
:data-uri:
:hide-uri-scheme:
:stem: latexmath
:footnote:
:xrefstyle: short
:attribute-missing: warn
///////////////////////////////////////////////////////////////////////////////
// Top-level CHERI definitions
///////////////////////////////////////////////////////////////////////////////
// Base CHERI extension (without the mode bit in capability format)
:cheri_base_ext_name: Zcheripurecap
// CHERI extension adding support for integer pointer mode (and mode bit)
:cheri_default_ext_name: Zcherihybrid
// Extension for CHERI PTE bits
:cheri_pte_ext_name: Zcheripte
// Extension for capability levels (flow control)
:cheri_levels_ext_name: Zcherilevels
// Extension for thread identification
:tid_ext_name: Zstid
:cheri_int_mode_name: pass:quotes[_Integer Pointer Mode_]
:cheri_cap_mode_name: pass:quotes[_Capability Pointer Mode_]
// Extension for supporting lr/sc.[bh]
:lr_sc_bh_ext_name: Zabhlrsc
:sh4add_ext_name: Zish4add
:c_cheri_base_ext_names: C or Zca, {cheri_base_ext_name}
:c_cheri_default_ext_names: C or Zca, {cheri_default_ext_name}
:non-csrrw-or: <<CSRRWI>>, <<CSRRS>>, <<CSRRSI>>, <<CSRRC>> or <<CSRRCI>>
:non-csrrw-and: <<CSRRWI>>, <<CSRRS>>, <<CSRRSI>>, <<CSRRC>> and <<CSRRCI>>
:TAG_RESET_CSR: The tag of the CSR must be reset to zero. The reset values of the metadata and address fields are UNSPECIFIED.
:REQUIRE_CRE_CSR: Access to this CSR is illegal if <<section_cheri_disable,CHERI register access is disabled>> for the current privilege.
:CAP_MODE_VALUE: 0
:INT_MODE_VALUE: 1
///////////////////////////////////////////////////////////////////////////////
// Cap definitions
///////////////////////////////////////////////////////////////////////////////
:cap_rv32_sdp_width: 2
:cap_rv64_sdp_width: 4
:cap_rv32_mw_width: 10
:cap_rv64_mw_width: 14
:cap_rv32_perms_width: 5
//including Zcherilevels, 6 without
:cap_rv64_perms_width: 6
//CL is not a permission, so 8 not 9
:cap_rv64_perms_levels_width: 8
:cap_rv32_addr_width: 32
:cap_rv64_addr_width: 64
:cap_rv32_exp_width: 5
:cap_rv64_exp_width: 6
:cheri_excep_mcause: 28
:cheri_excep_type_pcc: 0
:cheri_excep_type_data: 1
:cheri_excep_type_jump: 2
:cheri_excep_cause_tag: 0
:cheri_excep_cause_seal: 1
:cheri_excep_cause_perm: 2
:cheri_excep_cause_inv_addr: 3
:cheri_excep_cause_bounds: 4