Re:RISC-V OS Using Rust: Memory Management Unit
by Taniwha on Monday November 04, 2019 @06:21PM
(#21447800)
Also missing from this tutorial - one really needs to execute a sfence.vma instruction after writing satp to sync CPU pipelines to new memory management state (otherwise code that happily runs on a simulator will fail on a real-world deeply pipelined CPU)
[ Parent
| on HN ]
Re:RISC-V OS Using Rust: Memory Management Unit
by pavehawk2007 on Monday November 04, 2019 @06:52PM
(#21448092)
Patience, my friend. We're not quite there yet with this tutorial. We don't need sfence.vma for what I've covered here. Plus, there are about four ways to use the sfence.vma instruction (whether or not rs1 is zero or not and if rs2 is zero or not). I'd like to have some context behind each one of these four cases, but I can't do that in the OS's current state.