From: Nicholas Piggin <npiggin@gmail.com>
To: opensbi@lists.infradead.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH 0/7] Make PMP encoding usable for non-hart PMPs
Date: Thu, 30 Apr 2026 14:55:17 +1000 [thread overview]
Message-ID: <20260430045528.420437-1-npiggin@gmail.com> (raw)
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/20260310005000.3837512-4-npiggin@gmail.com/
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
--
2.53.0
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
next reply other threads:[~2026-04-30 4:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 4:55 Nicholas Piggin [this message]
2026-04-30 4:55 ` [PATCH 1/7] lib: sbi: Introduce pmp_t type Nicholas Piggin
2026-04-30 4:55 ` [PATCH 2/7] lib: sbi: split PMP encoding and CSR access Nicholas Piggin
2026-04-30 4:55 ` [PATCH 3/7] lib: sbi: Move RISC-V PMP encoding functions to sbi_pmp.c Nicholas Piggin
2026-04-30 4:55 ` [PATCH 3/7] lib: sbi: Move non-HART PMP " Nicholas Piggin
2026-04-30 4:55 ` [PATCH 4/7] lib: sbi: Add PMP CSR read and write accessors Nicholas Piggin
2026-04-30 4:55 ` [PATCH 5/7] lib: sbi: Add pmp_is_enabled() helper Nicholas Piggin
2026-04-30 4:55 ` [PATCH 6/7] lib: sbi: Add hart_ prefix to PMP functions Nicholas Piggin
2026-04-30 4:55 ` [PATCH 7/7] lib: sbi: Move hart PMP functions to sbi_hart_pmp.c Nicholas Piggin
2026-06-10 12:35 ` [PATCH 0/7] Make PMP encoding usable for non-hart PMPs Anup Patel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260430045528.420437-1-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=opensbi@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox