[PATCH] include: correct the definition of MSTATUS_VS
Anup Patel
anup at brainfault.org
Sun Apr 17 02:04:39 PDT 2022
On Tue, Apr 12, 2022 at 6:47 AM Vincent Chen <vincent.chen at sifive.com> wrote:
>
> 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 <i-cheng.cheng at sifive.com>
> Signed-off-by: Vincent Chen <vincent.chen at sifive.com>
Looks good to me.
Reviewed-by: Anup Patel <anup at brainfault.org>
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
> ---
> include/sbi/riscv_encoding.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h
> index 04d5621..a9772a6 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)
> --
> 2.17.1
>
More information about the opensbi
mailing list