[RFC PATCH 0/7] Extend the reserved PMP entries

Anup Patel anup at brainfault.org
Sun Oct 5 22:21:55 PDT 2025


On Fri, Aug 15, 2025 at 6:44 PM Yu-Chien Peter Lin <peter.lin at sifive.com> wrote:
>
> This series extends the number of reserved PMP entry.
> The capabilities of the reserved PMP entries include:
> - Highest priority
> - Allow TOR mode for platform-specific use cases
> - Can be consistent across domain context switches
> - Allow runtime PMP allocation
>
> A potential use case for reserved PMP entries is parsing gaps in
> memory ports marked as PMA_UNSAFE [1] in device-tree. These gaps
> may not be able to exactly covered by 1 or 2 NAPOT entries, so TOR
> mode PMP can be allocated to save PMP usage. Besides, they don't
> need reconfiguration across domains.
>
> This series depends on:
> 1) https://lore.kernel.org/all/20250815024434.14303-1-peter.lin@sifive.com/
> 2) https://lore.kernel.org/all/20250814110522.18809-1-peter.lin@sifive.com/
>
> [1] https://patchwork.kernel.org/project/linux-riscv/patch/20241102000843.1301099-2-samuel.holland@sifive.com/
>
> Yu-Chien Peter Lin (7):
>   lib: utils: fdt_helper: add fdt_has_isa_extension() helper
>   include: sbi: sbi_platform: add reserved_pmp_count field
>   platform: generic: platform: introduce
>     fw_platform_get_reserved_pmp_count()
>   lib: sbi_init: print total and reserved PMP counts
>   lib: sbi: riscv_asm: add reserved_pmp_alloc() to allocate a reserved
>     PMP
>   lib: sbi: sbi_hart: extend PMP handling to support multiple reserved
>     entries
>   docs: opensbi_config: add description for reserved-pmp-count

Same issue as the other series, it is not showing up in OpenSBI
patchwork (https://patchwork.ozlabs.org/project/opensbi/list/).

Can you please rebase and resend this series ?

Regards,
Anup

>
>  docs/opensbi_config.md             |  4 +++
>  include/sbi/riscv_asm.h            |  2 ++
>  include/sbi/sbi_hart.h             | 15 --------
>  include/sbi/sbi_platform.h         | 15 +++++---
>  include/sbi_utils/fdt/fdt_helper.h |  2 ++
>  lib/sbi/riscv_asm.c                | 25 +++++++++++++
>  lib/sbi/sbi_domain_context.c       |  6 +++-
>  lib/sbi/sbi_hart.c                 | 56 ++++++++++++++++++++++--------
>  lib/sbi/sbi_init.c                 |  6 ++--
>  lib/utils/fdt/fdt_helper.c         | 35 +++++++++++++++++++
>  platform/generic/platform.c        | 34 ++++++++++++++++++
>  11 files changed, 163 insertions(+), 37 deletions(-)
>
> --
> 2.48.0
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list