Skip to content

Commit

Permalink
Specify behaviour for reserved permission encoding
Browse files Browse the repository at this point in the history
Fixes #47
  • Loading branch information
Timmmm committed Jan 25, 2024
1 parent 85790d4 commit d5b117c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/cap-description.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,11 @@ permission.
WARNING: #TODO: Confirm that we need a separate permissions format for 32-bit
and 64-bit.#

NOTE: Valid capabilities must not have the permissions field set to a reserved
value according to xref:cap_perms_encoding32[xrefstyle=short] when XLENMAX=32.
NOTE: When XLENMAX=32 there is a single reserved permission encoding (see
xref:cap_perms_encoding32[xrefstyle=short]). It is not possible for a tagged
capability to have this value since <<CANDPERM>> will never create it. It is
possible for untagged capabilities to have it. <<CGETPERM>> will interpret it
as if it were 0b0000 (no permissions).

[#section_cap_sdp]
==== Software-Defined Permissions (SDP)
Expand Down
8 changes: 5 additions & 3 deletions src/insns/cgetperm_32bit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ Encoding::
include::wavedrom/cgetperm.adoc[]

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

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

Expand All @@ -29,4 +32,3 @@ Operation::
--
TODO: The encoding of permissions changed.
--

0 comments on commit d5b117c

Please sign in to comment.