[PATCH v2 4/8] lib: sbi: Add smepmp in hart extensions

Anup Patel anup at brainfault.org
Thu Jul 6 04:58:48 PDT 2023


On Thu, Jul 6, 2023 at 4:19 PM Himanshu Chauhan
<hchauhan at ventanamicro.com> wrote:
>
> - Add Smepmp as extension in sbi_hart_extensions enum
> - Return "smepmp" string for Smepmp extension from sbi_hart_extension_id2string
>
> Signed-off-by: Himanshu Chauhan <hchauhan at ventanamicro.com>

Looks good to me.

Reviewed-by: Anup Patel <anup at brainfault.org>

Regards,
Anup

> ---
>  include/sbi/sbi_hart.h | 2 ++
>  lib/sbi/sbi_hart.c     | 3 +++
>  2 files changed, 5 insertions(+)
>
> diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
> index 95b40e7..9957565 100644
> --- a/include/sbi/sbi_hart.h
> +++ b/include/sbi/sbi_hart.h
> @@ -36,6 +36,8 @@ enum sbi_hart_extensions {
>         SBI_HART_EXT_SMSTATEEN,
>         /** HART has Sstc extension */
>         SBI_HART_EXT_SSTC,
> +       /** HART has Smepmp */
> +       SBI_HART_EXT_SMEPMP,
>
>         /** Maximum index of Hart extension */
>         SBI_HART_EXT_MAX,
> diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
> index 6e52cbd..7b9d5dc 100644
> --- a/lib/sbi/sbi_hart.c
> +++ b/lib/sbi/sbi_hart.c
> @@ -453,6 +453,9 @@ static inline char *sbi_hart_extension_id2string(int ext)
>         case SBI_HART_EXT_SMSTATEEN:
>                 estr = "smstateen";
>                 break;
> +       case SBI_HART_EXT_SMEPMP:
> +               estr = "smepmp";
> +               break;
>         default:
>                 break;
>         }
> --
> 2.34.1
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list