Hey there,
I’m trying to get Sv39 running on the Milk V Duo and I just can’t get it working.
Quick info about the setup: I used fiptool to emplace my binary into the OpenSBI slot, which means it is running completely bare metal, starts in M-mode and then I push it down to S-mode, where my minikernel runs.
I use identity mapping for the kernel (with megapages) and the user mapping uses traditional 4KiB pages (meaning the full three levels).
I know for sure the page table setup works correctly – I tested in in an emulator (MSIM) and it works there. Yes, MSIM currently only supports 32bit RV32, however, I contributed with an RV64 implementation with Sv39 support.
The problem is, when I update satp
with the ASID (starts at 0) and the root of the table, the instruction after the CSR write causes fault 12, which is Instruction page fault. I don’t know what is happening since the PTEs should be correct and the kernel is identity mapped, so it should continue execution without a problem.
Has anyone tried to get Sv39 running on the CV1800B?
Cheers!