[PATCH v3 04/10] lib: sbi: Add smepmp in hart extensions

Anup Patel anup at brainfault.org
Tue Jul 11 23:16:37 PDT 2023


On Wed, Jul 12, 2023 at 10:05 AM 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>

Please carry Rb tags from the previous version.

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

Thanks,
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 b97f78c..8b0e896 100644
> --- a/include/sbi/sbi_hart.h
> +++ b/include/sbi/sbi_hart.h
> @@ -28,6 +28,8 @@ enum sbi_hart_priv_versions {
>  enum sbi_hart_extensions {
>         /** HART has AIA M-mode CSRs */
>         SBI_HART_EXT_SMAIA = 0,
> +       /** HART has Smepmp */
> +       SBI_HART_EXT_SMEPMP,
>         /** HART has Smstateen CSR **/
>         SBI_HART_EXT_SMSTATEEN,
>         /** Hart has Sscofpmt extension */
> diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
> index 0c27fd7..4dfa170 100644
> --- a/lib/sbi/sbi_hart.c
> +++ b/lib/sbi/sbi_hart.c
> @@ -456,6 +456,9 @@ static inline char *sbi_hart_extension_id2string(int ext)
>         case SBI_HART_EXT_ZIHPM:
>                 estr = "zihpm";
>                 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