[PATCH 3/9] lib: sbi: Add permissions for the firmware start till end

Anup Patel anup at brainfault.org
Fri Jan 6 09:44:27 PST 2023


On Tue, Dec 20, 2022 at 4:17 PM Himanshu Chauhan
<hchauhan at ventanamicro.com> wrote:
>
> Change the zero flag to M-mode R/W/X flag for the firmware
> region.
>
> Signed-off-by: Himanshu Chauhan <hchauhan at ventanamicro.com>

Looks good to me.

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

Regards,
Anup

> ---
>  lib/sbi/sbi_domain.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c
> index 8f9306c..01eff18 100644
> --- a/lib/sbi/sbi_domain.c
> +++ b/lib/sbi/sbi_domain.c
> @@ -628,7 +628,8 @@ int sbi_domain_init(struct sbi_scratch *scratch, u32 cold_hartid)
>         const struct sbi_platform *plat = sbi_platform_ptr(scratch);
>
>         /* Root domain firmware memory region */
> -       sbi_domain_memregion_init(scratch->fw_start, scratch->fw_size, 0,
> +       sbi_domain_memregion_init(scratch->fw_start, scratch->fw_size,
> +                                 SBI_DOMAIN_MEMREGION_M_RWX,
>                                   &root_fw_region);
>         domain_memregion_initfw(&root_memregs[root_memregs_count++]);
>
> --
> 2.39.0
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list