Skip to content

Commit fb474bf

Browse files
committed
Specify behaviour for reserved permission encoding
Fixes #47
1 parent 4b839b9 commit fb474bf

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/cap-description.adoc

+7-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,13 @@ permission.
144144
WARNING: #TODO: Confirm that we need a separate permissions format for 32-bit
145145
and 64-bit.#
146146

147-
NOTE: Valid capabilities must not have the permissions field set to a reserved
148-
value according to xref:cap_perms_encoding32[xrefstyle=short] when XLENMAX=32.
147+
NOTE: When XLENMAX=32 there is a single reserved permission encoding (see
148+
xref:cap_perms_encoding32[xrefstyle=short]). It is not possible for a tagged
149+
capability to have this value since <<CANDPERM>> will never create it. It is
150+
possible for untagged capabilities to have it. <<CGETPERM>> will interpret it
151+
as if it were 0b0000 (no permissions). Future extensions may assign meaning to
152+
the reserved bit pattern, in which case <<CGETPERM>> is allowed to report a
153+
non-zero value.
149154

150155
[#section_cap_sdp]
151156
==== Software-Defined Permissions (SDP)

src/insns/cgetperm_32bit.adoc

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ Encoding::
1515
include::wavedrom/cgetperm.adoc[]
1616

1717
Description::
18-
Converts the AP and SDP fields of capability `cs1` into a bit field; one bit
18+
Converts the AP and SDP fields of capability `cs1` into a bit field; one bit
1919
per permission, as shown below, and write the result to `rd`. A bit set to 1
20-
in the bit field indicates that `cs1` grants the corresponding permission.
20+
in the bit field indicates that `cs1` grants the corresponding permission.
21+
+
22+
If the AP field is a reserved value then all architectural permission bits in
23+
`rd` are set to 0.
2124

2225
include::../img/candperms_bit_field.edn[]
2326

0 commit comments

Comments
 (0)