Hacker News new | ask | show | jobs
by Gladdyu 2355 days ago
The issue was that there wasn't a cheap riscv board that supported the privileged section of the ISA (so you can run an OS on it). This, being a microcontroller, doesn't either.
1 comments

The Reference Manual claims "Machine (M) and User (U) Privilege levels support" on page 22.

Probably not the kind of privileges discussed yesterday.

yup, for linux you want M/S/U modes at least (kernel runs in S) and page table table support of course
I was under the impression you could get away with using Machine mode for both the SBI and the Kernel?

Sv39 paging is the major requirement as you point out.

Machine mode runs without the MMU, linux really needs an MMU to do kernel stuff too (including stuff like copyin/copyout)
There is actually quite a bit of work going on in Linux without MMU. Check Linux Plummers conference RISC-V track for example.
Yeah that's why I said "really needs", there are cut down versions that will run without an MMU, it's not really the mainline Linux though - I've worked with MMUless kernels in the past, it's not a lot of fun (and I started porting V6/V7 for base and bounds swapping machines)
Ah, I didn't actually know this, thanks for pointing it out :)