Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the M-bit from AP #268

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/cap-description.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ Therefore, it is only possible to encode a subset of all combinations.
[#perms_bit_width,options=header,align="center",width="80%",cols="^13%,^27%,<60%"]
|==============================================================================
^| MXLEN | Permissions width | Comment
^| 32 | {cap_rv32_perms_width} | Encodes some combinations of 5 permission bits and the <<m_bit>>
^| 64 | {cap_rv64_perms_width} | Separate bits for each permission and the <<m_bit>>
^| 32 | {cap_rv32_perms_width} | Encodes some combinations of 5 permission bits and _includes_ the <<m_bit>> in quadrant 1 (see <<cap_perms_encoding32>>)
^| 64 | {cap_rv32_perms_width} | Separate bits for each permission, _excluding_ the <<m_bit>>
|==============================================================================

For MXLEN=32, the permissions encoding is split into four quadrants.
Expand Down Expand Up @@ -206,12 +206,14 @@ permission.
| 2 | <<r_perm>>
| 3 | <<x_perm>>
| 4 | <<asr_perm>>
| 5 | <<m_bit>>
//| 5 | <<m_bit>>
|==============================================================================

For both MXLEN=32 and MXLEN=64, the <<m_bit>> is only assigned meaning when the
implementation supports {cheri_default_ext_name}, otherwise the bit is reserved
and must be 0 in valid capabilities.
The <<m_bit>> is only assigned meaning when the
implementation supports {cheri_default_ext_name} _and_ <<x_perm>> is set.

. For MXLEN=64, the bit assigned to the <<m_bit>> must be zero if <<x_perm>> isn't set.
. For MXLEN=32, the <<m_bit>> is only encoded in quadrant 1 and does _not_ exist in the other quadrants.

===== Permission Transitions

Expand Down
2 changes: 1 addition & 1 deletion src/img/cap-encoding-xlen32.edn
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(draw-column-headers {:height 50 :font-size 26 :labels (reverse ["0" "1" "2" "" "" "" "" "" "" "9" "10" "11" "12" "" "" "" "" "17" "18" "19" "20" "21" "" "" "24" "25" "" "" "" "29" "30" "31"])})

(draw-box "SDP" {:span 2})
(draw-box "AP" {:span 5})
(draw-box "AP, M" {:span 5})
(draw-box "Reserved" {:span 4})
(draw-box "S" {:span 1})
(draw-box "EF" {:span 1})
Expand Down
7 changes: 4 additions & 3 deletions src/img/cap-encoding-xlen64.edn
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
(def left-margin 100)
(def right-margin 100)
(def boxes-per-row 32)
(draw-column-headers {:height 50 :font-size 26 :labels (reverse ["0" "2" "3" "" "" "" "13" "14" "16" "17" "" "" "25" "26" "27" "28" "" "" "" "" "" "" "" "46" "47" "52" "53" "56" "57" "" "" "63"])})
(draw-column-headers {:height 50 :font-size 26 :labels (reverse ["0" "2" "3" "" "" "" "13" "14" "16" "17" "" "" "25" "26" "27" "28" "" "" "" "" "" "46" "" "47" "51" "52" "53" "56" "57" "" "" "63"])})

(draw-box "Reserved" {:span 4})
(draw-box "SDP" {:span 2})
(draw-box "AP" {:span 2})
(draw-box "Reserved" {:span 9})
(draw-box "M" {:span 1})
(draw-box "AP" {:span 3})
(draw-box "Reserved" {:span 7})
(draw-box "S" {:span 1})
(draw-box "EF" {:span 1})
(draw-box "T[11:3]" {:span 4})
Expand Down
Loading