[PATCH v6 1/7] lib: sbi_hart_pmp: make sbi_hart_pmp_fence public
Anup Patel
anup at brainfault.org
Thu Dec 18 06:35:51 PST 2025
On Thu, Dec 18, 2025 at 4:14 PM Bo Gan <ganboing at gmail.com> wrote:
>
> sbi_hart_pmp_fence can now be utilized by other hart-protection
> implementation.
>
> Signed-off-by: Bo Gan <ganboing at gmail.com>
LGTM.
Reviewed-by: Anup Patel <anup at brainfault.org>
Regards,
Anup
> ---
> include/sbi/sbi_hart_pmp.h | 1 +
> lib/sbi/sbi_hart_pmp.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/sbi/sbi_hart_pmp.h b/include/sbi/sbi_hart_pmp.h
> index f54e8b2a..a7765d17 100644
> --- a/include/sbi/sbi_hart_pmp.h
> +++ b/include/sbi/sbi_hart_pmp.h
> @@ -15,6 +15,7 @@ unsigned int sbi_hart_pmp_count(struct sbi_scratch *scratch);
> unsigned int sbi_hart_pmp_log2gran(struct sbi_scratch *scratch);
> unsigned int sbi_hart_pmp_addrbits(struct sbi_scratch *scratch);
> bool sbi_hart_smepmp_is_fw_region(unsigned int pmp_idx);
> +void sbi_hart_pmp_fence(void);
> int sbi_hart_pmp_init(struct sbi_scratch *scratch);
>
> #endif
> diff --git a/lib/sbi/sbi_hart_pmp.c b/lib/sbi/sbi_hart_pmp.c
> index 62bc859a..7f970ca3 100644
> --- a/lib/sbi/sbi_hart_pmp.c
> +++ b/lib/sbi/sbi_hart_pmp.c
> @@ -62,7 +62,7 @@ bool sbi_hart_smepmp_is_fw_region(unsigned int pmp_idx)
> return bitmap_test(fw_smepmp_ids, pmp_idx) ? true : false;
> }
>
> -static void sbi_hart_pmp_fence(void)
> +void sbi_hart_pmp_fence(void)
> {
> /*
> * As per section 3.7.2 of privileged specification v1.12,
> --
> 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