[RFC PATCH 1/5] riscv: Add Smsdid and Smmpt hart extensions
Ranbir Singh
ranbir.singh at oss.qualcomm.com
Thu Jul 23 21:31:26 PDT 2026
On Wed, Jul 22, 2026 at 9:06 AM Rahul Pathak
<rahul.pathak at oss.qualcomm.com> wrote:
>
> Add hart extension identifiers for the RISC-V Smsdid (supervisor
> domain ID) and Smmpt (supervisor domain memory protection) extensions.
>
> Signed-off-by: Rahul Pathak <rahul.pathak at oss.qualcomm.com>
> ---
> include/sbi/sbi_hart.h | 5 ++++-
> lib/sbi/sbi_hart.c | 2 ++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
> index 543393bb..38aacd70 100644
> --- a/include/sbi/sbi_hart.h
> +++ b/include/sbi/sbi_hart.h
> @@ -95,8 +95,11 @@ enum sbi_hart_extensions {
> SBI_HART_EXT_F,
> /** Hart has D extension */
> SBI_HART_EXT_D,
> + /** Hart has SMMTT - SMSDID extension */
> + SBI_HART_EXT_SMSDID,
> + /** Hart has SMMTT - SMMPT extension */
> + SBI_HART_EXT_SMMPT,
>
> - /** Maximum index of Hart extension */
This seems an undesired removal and should be retained.
> SBI_HART_EXT_MAX,
> };
>
> diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
> index bee88557..4261fea8 100644
> --- a/lib/sbi/sbi_hart.c
> +++ b/lib/sbi/sbi_hart.c
> @@ -360,6 +360,8 @@ const struct sbi_hart_ext_data sbi_hart_ext[] = {
> __SBI_HART_EXT_DATA(v, SBI_HART_EXT_V),
> __SBI_HART_EXT_DATA(f, SBI_HART_EXT_F),
> __SBI_HART_EXT_DATA(d, SBI_HART_EXT_D),
> + __SBI_HART_EXT_DATA(smsdid, SBI_HART_EXT_SMSDID),
> + __SBI_HART_EXT_DATA(smmpt, SBI_HART_EXT_SMMPT),
> };
>
> _Static_assert(SBI_HART_EXT_MAX == array_size(sbi_hart_ext),
> --
> 2.51.0
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
Otherwise, LGTM
Reviewed-by: ranbir.singh at oss.qualcomm.com
More information about the opensbi
mailing list