Re: Proof of concept for rv32 svpbmt support


Guo Ren
 

On Wed, Jul 6, 2022 at 1:52 PM Greg Favor <gfavor@...> wrote:

I suspect someone could pursue standardization of this via the fast-track extension process.
Okay, I would try the fast-track extension process.


Greg

On Tue, Jul 5, 2022 at 4:55 PM Guo Ren <guoren@...> wrote:

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 [2]
- Opensbi needs to compile with FW_TEXT_START=0x40000000

[1] https://github.com/guoren83/qemu/tree/rv32svpbmt
[2] https://lore.kernel.org/linux-riscv/20220705100523.1204595-1-guoren@kernel.org/T/#mf1d7089d45d9a2501ca71f4986235241985bfc19


--
Best Regards
Guo Ren

Join tech-privileged@lists.riscv.org to automatically receive all group messages.