Topicbox is having issues for me, so I'm duplicating the contents below:
I'm forwarding an update from Richard and Geoff about their work porting
Plan 9 to RISC-V. I sent a synopsis on twitter; it is included here with
• 32 and 64 bit kernels (and commands) are working under tinyemu
• 64 bit kernel is booting on hardware, still being debugged
• 32 bit kernel is untested on hardware because we don't have access to an RV32 core with MMU
• riscv compiler is available on 9p.io/sources/contrib/miller, and has been
added to the inferno distribution on bitbucket.
• tinyemu port will go onto 9p.io/sources/contrib/miller this weekend
• source is still in the experimental development stage. it will be
released when ready.
Richard recently gave a talk about his experience porting the Plan 9 C
compiler to RISC-V:
TinyEMU has been ported to Plan 9, providing a choice of RV32GC or
RV64GC in machine mode, and better diagnostics than hardware provides.
We have 9k kernels running in both modes under tinyemu, but so far
using only one CPU. They share quite a bit of non-port source. The
RV32 kernel uses Sv32 paging. The RV64 kernel so far uses Sv39
paging, but we expect it to work with Sv48 paging (and beyond) with
trivial changes. So far the RV64 kernel resides at physical and
virtual 0x80000000, which limits user process size, but we believe it
will be straightforward to switch to virtual 0xffffffc080000000.
As described below, the RV32 kernel is not usable on the Polarfire
Icicle using the stock firmware and bootloaders. The RV64 kernel is
close to working on the Icicle, and on the four main cores, we
believe. There have been some surprises with the Icicle: as
delivered, it starts OpenSBI as RV64 on all harts (CPUs) and hart 0
(the smaller E51 core) controls the others. OpenSBI on hart 1 starts
U-boot, from which we PXE boot the RV64 kernel, which runs in
supervisor mode. There is no way back to machine mode, thus no way
back to RV32, and there seems to be no way to determine which mode the
CPU is in.