From 69d9353252ada946d22be24ca6bfdc27d2534b10 Mon Sep 17 00:00:00 2001 From: Tim Hutt Date: Thu, 25 Jan 2024 10:59:32 +0000 Subject: [PATCH] Make permission bit order consistent Use the same ordering for permission bits in CAndPerms as in the RV64 encoding. Fixes #25 --- src/cap-description.adoc | 2 +- src/img/candperms_bit_field.edn | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cap-description.adoc b/src/cap-description.adoc index 8cc0fff0..b3fde32e 100644 --- a/src/cap-description.adoc +++ b/src/cap-description.adoc @@ -121,8 +121,8 @@ permissions are granted as follows: * <>: bit 0 is set * <>: bit 1 is set -* <>: bit 3 is set * <>: bits 3 or 2 are set +* <>: bit 3 is set * <>: bits 3 and 2 are set A {cap_rv64_perms_width}-bit vector encodes the permissions when XLENMAX=64. In diff --git a/src/img/candperms_bit_field.edn b/src/img/candperms_bit_field.edn index 3c57c40e..934f44aa 100644 --- a/src/img/candperms_bit_field.edn +++ b/src/img/candperms_bit_field.edn @@ -13,9 +13,9 @@ (draw-box "Reserved" {:span 11}) (draw-box "ASR" {:span 1}) (draw-box "X" {:span 1}) -(draw-box "C" {:span 1}) -(draw-box "W" {:span 1}) (draw-box "R" {:span 1}) +(draw-box "W" {:span 1}) +(draw-box "C" {:span 1}) (draw-box "XLEN-SDPLEN-16" {:span 12 :borders {}}) (draw-box "SDPLEN" {:span 4 :borders {}})