Skip to content

Make PMP encoding usable for non-hart PMPs

Nicholas Piggin opensbi 1 version Applied

Status from this message: Applied this series to the riscv/opensbi repo.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/7lib: sbi: Introduce pmp_t typelib/sbi/riscv_asm.c+26 -150 replies
2/7lib: sbi: split PMP encoding and CSR accesslib/sbi/riscv_asm.c+73 -460 replies
3/7lib: sbi: Move RISC-V PMP encoding functions to sbi_pmp.cinclude/sbi/sbi_pmp.h lib/sbi/objects.mk lib/sbi/riscv_asm.c +1 more+120 -880 replies
3/7lib: sbi: Move non-HART PMP functions to sbi_pmp.cinclude/sbi/sbi_pmp.h lib/sbi/objects.mk lib/sbi/riscv_asm.c +1 more+120 -880 replies
4/7lib: sbi: Add PMP CSR read and write accessorslib/sbi/riscv_asm.c+58 -560 replies
5/7lib: sbi: Add pmp_is_enabled() helperinclude/sbi/sbi_pmp.h lib/sbi/riscv_asm.c lib/sbi/sbi_pmp.c+11 -50 replies
6/7lib: sbi: Add hart_ prefix to PMP functionsinclude/sbi/riscv_asm.h lib/sbi/riscv_asm.c lib/sbi/sbi_hart_pmp.c +1 more+38 -360 replies
7/7lib: sbi: Move hart PMP functions to sbi_hart_pmp.cinclude/sbi/riscv_asm.h include/sbi/sbi_hart_pmp.h lib/sbi/riscv_asm.c +1 more+122 -1230 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAnup Patel
SeriesR-b
1/7
2/7
3/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] Make PMP encoding usable for non-hart PMPs

The Tenstorrent RISC-V IOMMU implements PMPs with MMRs in the same format as specified in the RISC-V ISA for the hart CSRs. This series splits out the PMP encoding functions so it can be shared by both users.

I moved this series out of the Tenstorrent Atlantis platform series that included IOMMU support, tried to do better at splitting it up, tidied and improved code.

The new user of the API can be seen here for reference (will not quite compile with this new series):

https://lore.kernel.org/opensbi/[email protected]/

I will post that one out again after the base Atlantis platform and this series is merged.

Thanks,
Nick

Nicholas Piggin (7):
lib: sbi: Introduce pmp_t type
lib: sbi: split PMP encoding and CSR access
lib: sbi: Move RISC-V PMP encoding functions to sbi_pmp.c
lib: sbi: Add PMP CSR read and write accessors
lib: sbi: Add pmp_is_enabled() helper
lib: sbi: Add hart_ prefix to PMP functions
lib: sbi: Move hart PMP functions to sbi_hart_pmp.c

 include/sbi/riscv_asm.h          |  12 ---
 include/sbi/sbi_hart_pmp.h       |  12 +++
 include/sbi/sbi_pmp.h            |  23 +++++
 lib/sbi/objects.mk               |   1 +
 lib/sbi/riscv_asm.c              | 162 +------------------------------
 lib/sbi/sbi_hart_pmp.c           | 128 ++++++++++++++++++++++--
 lib/sbi/sbi_pmp.c                | 105 ++++++++++++++++++++
 platform/generic/eswin/eic770x.c |  36 +++----
 8 files changed, 279 insertions(+), 200 deletions(-)
 create mode 100644 include/sbi/sbi_pmp.h
 create mode 100644 lib/sbi/sbi_pmp.c
Signature · 7 lines
2.53.0


-- 
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi