From 53fbda5873ec5ffdfd7dd62cd5961fe99c6299a2 Mon Sep 17 00:00:00 2001 From: Scott Johnson Date: Tue, 2 Nov 2021 12:03:54 -0700 Subject: Add new hypervisor bits to mstatush In Spike, I added these by hand in https://github.com/riscv-software-src/riscv-isa-sim/commit/4730be82e63ec8bf4a30aa59afee5e5b58a0fbe4 --- encoding.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/encoding.h b/encoding.h index 6d49450..63f1a78 100644 --- a/encoding.h +++ b/encoding.h @@ -33,6 +33,8 @@ #define MSTATUSH_SBE 0x00000010 #define MSTATUSH_MBE 0x00000020 +#define MSTATUSH_GVA 0x00000040 +#define MSTATUSH_MPV 0x00000080 #define SSTATUS_UIE 0x00000001 #define SSTATUS_SIE 0x00000002 -- cgit v1.1 From cabefd9b4f41c3211f8163c0a333a14ce4e24397 Mon Sep 17 00:00:00 2001 From: Scott Johnson Date: Tue, 2 Nov 2021 12:00:47 -0700 Subject: Remove no-longer-used SSTATUS_VS_MASK Spike removed this in https://github.com/riscv-software-src/riscv-isa-sim/commit/60243a3bf9f86de5b8b58807ae218f1e3aedc31c I checked other uses of encoding.h (riscv-pk, riscv-test-env, riscv-openocd), and confirmed that none of them use this value. --- encoding.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/encoding.h b/encoding.h index 63f1a78..edccf00 100644 --- a/encoding.h +++ b/encoding.h @@ -51,10 +51,6 @@ #define SSTATUS_UXL 0x0000000300000000 #define SSTATUS64_SD 0x8000000000000000 -#define SSTATUS_VS_MASK (SSTATUS_SIE | SSTATUS_SPIE | \ - SSTATUS_SPP | SSTATUS_FS | SSTATUS_SUM | \ - SSTATUS_MXR | SSTATUS_UXL) - #define HSTATUS_VSXL 0x300000000 #define HSTATUS_VTSR 0x00400000 #define HSTATUS_VTW 0x00200000 -- cgit v1.1 From 70c120b5464d0a77491f07e5d66c4523d63a86a4 Mon Sep 17 00:00:00 2001 From: Scott Johnson Date: Tue, 2 Nov 2021 13:12:04 -0700 Subject: Update Krypto to match what Spike has Goal is to most closely match the hand-made changes to Spike's copy of encoding.h, before we again start generating it from this repo. This best matches Spike as of https://github.com/riscv-software-src/riscv-isa-sim/commit/47aa83c2dda373bc266de2cb5fc85544cb7bdea8 --- opcodes-rvk | 4 ---- parse_opcodes | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/opcodes-rvk b/opcodes-rvk index 744c807..956a97d 100644 --- a/opcodes-rvk +++ b/opcodes-rvk @@ -5,10 +5,6 @@ # These instructions appear in _both_ RV32 and RV64. # ------------------------------------------------------------ -# Poll Entropy / Get Noise Pseudo Instructions -@pollentropy rd 19..15=0 31..20=0xF15 14..12=0 6..0=0b1110011 -@getnoise rd 19..15=0 31..20=0x7A9 14..12=0 6..0=0b1110011 - # Scalar SM4 - RV32, RV64 sm4ed rd rs1 rs2 bs 29..25=0b11000 14..12=0 6..0=0x33 sm4ks rd rs1 rs2 bs 29..25=0b11010 14..12=0 6..0=0x33 diff --git a/parse_opcodes b/parse_opcodes index b8059e5..d40155f 100755 --- a/parse_opcodes +++ b/parse_opcodes @@ -298,8 +298,7 @@ csrs = [ (0xF12, 'marchid'), (0xF13, 'mimpid'), (0xF14, 'mhartid'), - (0xF15, 'mentropy'), # crypto ext - (0x7A9, 'mnoise'), + (0x546, 'sentropy'), # crypto ext ] csrs32 = [ -- cgit v1.1