[PATCH] lib: sbi: Add missing sscrind and sscfg extensions in sbi_hart_ext[]

Anup Patel anup at brainfault.org
Tue Apr 9 22:18:57 PDT 2024


On Wed, Mar 20, 2024 at 8:21 PM Clément Léger <cleger at rivosinc.com> wrote:
>
> The sbi_hart_ext[] array is missing these two extensions ids. It is
> expected that this array contains all the extensions declaration at the
> same index of the SBI_HART_EXT_* define. Without this, when adding a new
> extension, there is a mismatch between ids and extension names and it
> can even display corrupted extension names.
>
> Signed-off-by: Clément Léger <cleger at rivosinc.com>

I have taken _Static_assert() and Fixes tag from Heinrich's patch.

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

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup


>
> ---
>  lib/sbi/sbi_hart.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
> index 3d13694..d68e2a0 100644
> --- a/lib/sbi/sbi_hart.c
> +++ b/lib/sbi/sbi_hart.c
> @@ -666,6 +666,8 @@ const struct sbi_hart_ext_data sbi_hart_ext[] = {
>         __SBI_HART_EXT_DATA(sdtrig, SBI_HART_EXT_SDTRIG),
>         __SBI_HART_EXT_DATA(smcsrind, SBI_HART_EXT_SMCSRIND),
>         __SBI_HART_EXT_DATA(smcdeleg, SBI_HART_EXT_SMCDELEG),
> +       __SBI_HART_EXT_DATA(sscsrind, SBI_HART_EXT_SSCSRIND),
> +       __SBI_HART_EXT_DATA(ssccfg, SBI_HART_EXT_SSCCFG),
>  };
>
>  /**
> --
> 2.43.0
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list