[PATCH v2 2/4] lib: sbi: fwft: Return SBI_ERR_DENIED_LOCKED when setting a locked feature

Anup Patel anup at brainfault.org
Wed Feb 19 08:46:20 PST 2025


On Fri, Jan 24, 2025 at 10:23 PM Clément Léger <cleger at rivosinc.com> wrote:
>
> Latest modifications to the spec mandates that a set on a lock feature
> returns SBI_ERR_DENIED_LOCKED.
>
> Signed-off-by: Clément Léger <cleger at rivosinc.com>

LGTM.

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

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

> ---
>  lib/sbi/sbi_fwft.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/sbi/sbi_fwft.c b/lib/sbi/sbi_fwft.c
> index 0cb165b4..c46006d4 100644
> --- a/lib/sbi/sbi_fwft.c
> +++ b/lib/sbi/sbi_fwft.c
> @@ -337,7 +337,7 @@ int sbi_fwft_set(enum sbi_fwft_feature_t feature, unsigned long value,
>                 return SBI_EINVAL;
>
>         if (conf->flags & SBI_FWFT_SET_FLAG_LOCK)
> -               return SBI_EDENIED;
> +               return SBI_EDENIED_LOCKED;
>
>         ret = conf->feature->set(conf, value);
>         if (ret)
> --
> 2.47.1
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list