added mmu support for k210
added mmu support for k210(Sv39 Mode,0x00000000~0xffffffff are directly mapped to physical address) and set boot address to 0x80030000
@damien-lemoal wow, would this help linux be able to use virtual memory?
The patch title should be "Add ..." instead of "Added ...". It would also be nice if you could git send-email the patch to opensbi mailing list ([email protected]). That makes commenting easier for some... github web interface is not the preferred comment interface for many :)
@pdp7 Yes, this would definitely allow running the regular MMU kernel. Sean is working on U-Boot improvements for the K210, and now that the kernel has SD card support for all K210 boards, swap could even be used :) So all the pieces are here for MMU kernel on K210.
However, we are talking about a non-standard MMU here. So Anup (opensbi) and Palmer (kernel) will need some convincing to take patches to enable such non-standard HW support. My opinion is that if there is a valid use case for it, we should make an effort to take that support. In the case of the K210, it certainly would make things easier (c.f. my ongoing fight with elf2flt and flatbin support for NOMMU userspace...). But I am not entirely convinced that "it is easier" is a valid argument enough as a justification for the non-standard HW support. If we start opening that door, things could start getting ugly very quickly. C.f. Palmer comments recently on the kernel list about support for non-frozen ISA extensions. We (the risc-v dev community) need to carefully consider this and come up with a reasonable policy.
The patch title should be "Add ..." instead of "Added ...". It would also be nice if you could git send-email the patch to opensbi mailing list ([email protected]). That makes commenting easier for some... github web interface is not the preferred comment interface for many :)
OK,I will do this next time.
If i understand correctly, the K210 quirks because of K210 being based on riscv-privileged-v1.9.1 specification are not tackled here, correct? This has been outlined by @wangrunji0408 in rcore-os/rCore.
If i understand correctly, the K210 quirks because of K210 being based on riscv-privileged-v1.9.1 specification are not tackled here, correct? This has been outlined by @wangrunji0408 in rcore-os/rCore.
Yes, correct. The ISA v1.9 specifications are not the ratified version so generally not supported anywhere. Both OpenSBI and the kernel do not support this draft version. As a result, Linux support for the K210 is NOMMU only as the v1.9 mmu specifications are not compatible with the ratified version 2.0.
I can compile with these changes and get MMU support on Linux?
This never got accepted - so I guess there is no way to have MMU Linux on Sipeed Maixduino?
This never got accepted - so I guess there is no way to have MMU Linux on Sipeed Maixduino?
In theory, that can be implemented, just it's a non-standard implementation.
If you have code to enable mmu in opensbi and Linux, try submitting it and see what happens... The non-standard mmu may be a blocker, or not. In the past, it was.
If you have code to enable mmu in opensbi and Linux, try submitting it and see what happens... The non-standard mmu may be a blocker, or not. In the past, it was.
I just have an implementation with RT-Thread Smart
@lizhirui did you ever send your patch to the e-mail list?
There is a recent discussion on HN that I started, with some additional K210 context