summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Chen <[email protected]>2022-04-12 09:16:53 +0800
committerAnup Patel <[email protected]>2022-04-17 14:30:19 +0530
commitc1e47d0c3f9274553df27e2d69c96c30029912b2 (patch)
treecc5461445e7e1285195404d9f3c42b204c87eb6f
parent5c5cbb53a4fd2f7d2a7038b584f8ee01266cef04 (diff)
include: correct the definition of MSTATUS_VS
Accordind to the RISC-V privileged specification, the VS filed is mstatus[10:9] instead of mstatus[24:23]. Modify the MSTATUS_VS to the correct value. Reported-by: I-Cheng Cheng <[email protected]> Signed-off-by: Vincent Chen <[email protected]> Reviewed-by: Xiang W <[email protected]> Reviewed-by: Anup Patel <[email protected]>
-rw-r--r--include/sbi/riscv_encoding.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h
index 04d56215..a9772a67 100644
--- a/include/sbi/riscv_encoding.h
+++ b/include/sbi/riscv_encoding.h
@@ -25,7 +25,7 @@
#define MSTATUS_MPP (_UL(3) << MSTATUS_MPP_SHIFT)
#define MSTATUS_FS _UL(0x00006000)
#define MSTATUS_XS _UL(0x00018000)
-#define MSTATUS_VS _UL(0x01800000)
+#define MSTATUS_VS _UL(0x00000600)
#define MSTATUS_MPRV _UL(0x00020000)
#define MSTATUS_SUM _UL(0x00040000)
#define MSTATUS_MXR _UL(0x00080000)