From d5b117c8f723b6c1d66840f2141e1fa98e1d5dc7 Mon Sep 17 00:00:00 2001 From: Tim Hutt Date: Thu, 25 Jan 2024 17:47:28 +0000 Subject: [PATCH] Specify behaviour for reserved permission encoding Fixes #47 --- src/cap-description.adoc | 7 +++++-- src/insns/cgetperm_32bit.adoc | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/cap-description.adoc b/src/cap-description.adoc index b3fde32e..f0e8862c 100644 --- a/src/cap-description.adoc +++ b/src/cap-description.adoc @@ -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 <> will never create it. It is +possible for untagged capabilities to have it. <> will interpret it +as if it were 0b0000 (no permissions). [#section_cap_sdp] ==== Software-Defined Permissions (SDP) diff --git a/src/insns/cgetperm_32bit.adoc b/src/insns/cgetperm_32bit.adoc index cddbf7c5..2185bf81 100644 --- a/src/insns/cgetperm_32bit.adoc +++ b/src/insns/cgetperm_32bit.adoc @@ -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[] @@ -29,4 +32,3 @@ Operation:: -- TODO: The encoding of permissions changed. -- -