From 6c7922e23b85bef624ef84a8b05ed89495e1eb20 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Thu, 16 Apr 2020 18:56:30 -0700 Subject: lib: Support vector extension Enable vector context in mstatus by updating the corresponding bits in mstatus if vector extension is supported by the hart. Signed-off-by: Atish Patra Reviewed-by: Bin Meng Reviewed-by: Anup Patel --- include/sbi/riscv_encoding.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h index 1cf624bf..8c3e6f16 100644 --- a/include/sbi/riscv_encoding.h +++ b/include/sbi/riscv_encoding.h @@ -25,6 +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_MPRV _UL(0x00020000) #define MSTATUS_SUM _UL(0x00040000) #define MSTATUS_MXR _UL(0x00080000) @@ -53,6 +54,7 @@ #define SSTATUS_SPP MSTATUS_SPP #define SSTATUS_FS MSTATUS_FS #define SSTATUS_XS MSTATUS_XS +#define SSTATUS_VS MSTATUS_VS #define SSTATUS_SUM MSTATUS_SUM #define SSTATUS_MXR MSTATUS_MXR #define SSTATUS32_SD MSTATUS32_SD -- cgit v1.3.1