Skip to content

RFC Proof of concept for rv32 svpbmt support

[email protected] linux-riscv 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest4 patches 0 repliesNew
  2. v1 RFC4 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- Fixup ALT_SVPBMT_SHIFT definition
- Optimize commit log

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4riscv: Optimize satp_mode data typearch/riscv/include/asm/pgtable.h arch/riscv/mm/init.c+3 -30 replies
2/4riscv: Cleanup ERRATA_THEAD_PBMT for rv32 svpbmt compilearch/riscv/include/asm/errata_list.h+10 -10 replies
3/4riscv: pgtable: Move svpbmt into the common pgtable-bits.harch/riscv/include/asm/errata_list.h arch/riscv/include/asm/pgtable-32.h arch/riscv/include/asm/pgtable-64.h +2 more+63 -720 replies
4/4riscv: Change rv32p34 to rv32p31 for svpbmtarch/riscv/Kconfig arch/riscv/include/asm/pgtable-32.h arch/riscv/include/asm/sparsemem.h+4 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH V2 0/4] Proof of concept for rv32 svpbmt support

From: Guo Ren <[email protected]>

Make rv32 support svpbmt & napot by reducing the PPN witdth (sv32p34 -> sv32p31).

RISC-V 32bit also requires svpbmt in cost-down chip embedded scenarios, and their RAM is limited (No more than 1GB). It is worth mentioning that rv32-Linux currently only supports 1GB of DRAM, and there is no plan for high-memory. So, there seems to be no obstacle to shrinking the physical address space of the rv32 from 16GB to 2GB. We recommend that ISA consider sv32p31 as the recommended configuration for the software ecosystem instead of sv32p34. Then we could merge rv64 & rv32 into one PTE format:

| XLEN-1 | XLEN-2 XLEN-3 | XLEN-4 10 | 9             8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
  N        MT[2]           RSV & PFN   reserved for SW   D   A   G   U   X   W   R   V

We've finished the Linux Proof of concept of the proposal, which contains three parts:
- Qemu rv32 svpbmt & napot support & hw/virt memory layout of 1GB IO range [1]
- Linux rv32 sv32p31 & svpbmt support
- Opensbi needs to compile with FW_TEXT_START=0x40000000

[1] https://github.com/guoren83/qemu/tree/rv32svpbmt

Changes in V2:
- Fixup ALT_SVPBMT_SHIFT definition
- Optimize commit log

Guo Ren (4):
riscv: Optimize satp_mode data type
riscv: Cleanup ERRATA_THEAD_PBMT for rv32 svpbmt compile
riscv: pgtable: Move svpbmt into the common pgtable-bits.h
riscv: Change rv32p34 to rv32p31 for svpbmt

 arch/riscv/Kconfig                    |  2 +-
 arch/riscv/include/asm/errata_list.h  | 17 ++++++++-
 arch/riscv/include/asm/pgtable-32.h   | 20 +---------
 arch/riscv/include/asm/pgtable-64.h   | 55 ---------------------------
 arch/riscv/include/asm/pgtable-bits.h | 53 ++++++++++++++++++++++++++
 arch/riscv/include/asm/pgtable.h      |  7 +++-
 arch/riscv/include/asm/sparsemem.h    |  2 +-
 arch/riscv/mm/init.c                  |  4 +-
 8 files changed, 80 insertions(+), 80 deletions(-)
Signature · 7 lines
2.36.1


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