last year, post IWP9, i started a 9front port to risc-v, beginning with code I got from moody and keegan, and improving it with the excellent work from geoff, richard miller, and I assume others.
That port is pretty far along, although it has a ways to go. Part of the reason for the long timeline is (1) not a full time job of course, (2) I'm doing a lot of rethinking of assumptions, and (3) I've made some pretty big changes to how the kernel maps virtual address space. Specifically, and for all kinds of risc-v reasons, the kernel virtual goes from 0 to 1<<37, and user virtual is above that. Before you jump on me about 4 and 5 level page tables and changes in addressing, I'm aware of that, and it will be dealt with. The big change, however, is that you no longer need to know if you have 3, 4, or 5-level page tables when compiling the kernel. How many levels of page table you need can be determined at boot time -- for example, on a machine that has 5 level page tables, if it only has 256 GiB, you can run with 3 level page tables and save page table walking. There are other changes, with the goal of being able to compile just one kernel, not a set of kernels, and have it run on any board. For example, I'm planning to unparse ALL the fdt to flattened C structs, and pick the one I need at boot time, based on the 192-byte triple of of vendor-version-implementation provided by the architecture. I can eliminate buggy fdt parsing and one-board-only kernels at once. SBI won't run in M mode, only the very small bits of SBI that need to get/put registers. SBI functions can run in single-digit nanoseconds on some chips, if SBI is redone. Enough said for now, but I wanted to mention something interesting: I'm able to kexec this kernel on linux. That's handy, because it means any board running riscv linux is a testbed. Now, riscv kexec has been broken for some time, and was only recently fixed, https://yhbt.net/lore/linux-patches/[email protected]/ . I don't have that version of linux on many boards. But for those of you who know kexec, you can use kexec_load, and instead of using the standard purgatory, you can use the plan 9 kernel as the purgatory. It's only 4m. Works fine. Why this note? If you've been wanting to dig into the down and dirty of a new port, and want to fix bits and pieces (PLIC is broken in my port!) this is one place to start. I've got a paper, which describes a part of the work. If the paper makes sense to you, even if you don't agree, and you feel like trying it out, lmk. If the paper makes no sense to you, this may not be the place to start with this port just yet. No need to copy this list, just get in touch with me. Thanks ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T1b355128b181d2a0-M8ac688c9bae8d9b2eafbbb08 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
