Posts

HFI BIOS: from idea to K3 support

On the 2nd of July I made the first commit in a repository called fu740-bios . Its README opened with a single sentence that never changed, even after the project outgrew the board in its name: A RISC-V machine that powers on and greets you like a classic PC. Not a boot loader with a menu. A BIOS : the rainbow banner, the memory count, the hardware summary, and the immortal Press DEL to run Set-Up — on a real monitor, through a real graphics card, driven by a real USB keyboard. I had been turning that idea over for something like twenty-five years. On the 14th of August it does that on two entirely different machines, and today I am tagging 1.3. This is the story of the six weeks in between. The dead end that shaped everything The project actually starts in June, in a directory called gk208-vbios-runner , and with the obvious idea: a graphics card carries its own initialisation code in its option ROM, so let the card initialise itself. Run the NVIDIA GK208's x86 VBIO...

qjmcc: the Portable C Compiler on RISC-V 64

For a few months there has been a compiler in my tree that I have said nothing about, and it has now done the one thing that made me want to write about it at last: it compiles the whole of QSOE/N — the Skimmer microkernel, taskman, the C library, the dynamic loader, the shell, and every driver and userspace program — and the operating system it produces boots on real hardware and logs in as root, with no GCC anywhere in the toolchain that built it. The compiler is qjmcc , and it is the Portable C Compiler. If that name means nothing to you, the next part matters more than any of the engineering that follows; and if it does mean something to you, then you already understand why I have wanted to write this for months. What pcc is, and what Anders Magnusson did to it The Portable C Compiler — pcc — was written by Stephen C. Johnson at Bell Labs in the mid-1970s, the same Johnson who gave us yacc and lint, and it was one of the first compilers built deliberately to be moved from one ...

QSOE/N v0.18: a second board, and a second compiler

Two things happen in this release, and they turn out to be the same thing seen from opposite ends. QSOE/N boots to an interactive shell on the SpacemiT K3 — the second piece of silicon it has ever run on, after the SiFive Unmatched. And the entire operating system — kernel, taskman, libc.so , the runtime linker, every program under /bin and /sbin — now builds with a second compiler, jmcc, and boots on it too. Neither was on the roadmap as "portability work". Both were the same lesson delivered twice: stop assuming the thing you were tuned for. The K3 broke every assumption baked into the hardware — one machine, one DRAM base, one interrupt geometry. jmcc broke every assumption baked into the toolchain — position-independent code, hard-float, GCC's particular generosity about relocations. Each found bugs the other never would have, and by the end the system is more honestly portable than it was before either one started. The K3 does not resemble the machine we wer...

Series about bringing up my NVidia video card on the RISC-V board (SiFive Unmatched)

The project of bringing up my GK-208 video card at the early boot stages turned out to be much bigger than originally envisioned — and the approach for accomplishing the goal had to change completely mid-course. I want to document that journey in detail, and since it is not directly related to QSOE, I will be posting an 8-part series, which I'm calling gk208-videobios , to my "legacy" blog at r-tty.blogspot.com . After those posts I will continue documenting here the exciting new things that are directly related to QSOE and mr-bml: how these two talk to the text-mode video controller, how the console (video + keyboard!) is organized, what the devc-vidcon resource manager will look like, how HDMI audio on the GK-208 depends on the active video mode of the controller, and other interesting things!

What I'm working on right now

Since 2024 I've wanted one specific thing: a RISC-V board that feels like a real personal computer. Not a serial console scrolling kernel logs over a USB cable — an actual screen that lights up at power-on, a boot menu, an operating system coming up on it. Power button, video BIOS, mr-bml's menu, QSOE booting on the display. That's the picture I've carried around for two years, and with Claude Code I've finally started attacking it for real. The board is my SiFive HiFive Unmatched (FU740). The display comes from an NVIDIA GK208, a "Kepler" (nv50) card, sitting in its PCIe slot. The catch is that the card's brain is an x86 Video BIOS: 16-bit real-mode code that expects an x86 host to POST it. The Unmatched is RISC-V. So the runner I'm building, gk208-vbios-runner , executes that x86 VBIOS inside an emulator on the RISC-V host — the SciTech/U-Boot bios_emulator engine — and bridges its register and memory accesses out to the real card. The goal i...

A free QNX-like operating system (2003)

I came across an old post of mine on the comp.os.qnx newsgroup, dated August 7, 2003. The subject line was "A free QNX-like operating system," and under it I announced RadiOS — a hobby effort to build a free, QNX-compatible microkernel OS for x86, with the microkernel and task manager written entirely in NASM assembly. About 70% of the required system calls were in place by then, along with parts of libc, a console resource manager, and an ATA/IDE driver; there was no filesystem manager yet. The post asked whether anyone wanted to help hack on it, and signed off with "73!". The thread is here: https://groups.google.com/g/comp.os.qnx/c/srdvVoik37M The fuller picture survives on the old SourceForge page, still up at radios.sf.net . RadiOS targeted system-call compatibility with QNX Neutrino 6.1; its Task Manager mirrored the QNX process-manager message format, and its libc was derived from QNX 6.1 code. By mid-2004 it ran to roughly 45,000 lines, almost all NASM, w...

QSOE project v0.1 released

The first QSOE release, v0.1, is out. It bundles both kernel variants, the boot loader, the userspace, and libc into a single numbered drop, and consists of the following components: QSOE/N v0.17 , with the custom "Skimmer" kernel. QSOE/L v0.14 , which works together with seL4 version 15. mr-bml v0.5.1 , a GRUB-derived boot loader with support for Multiboot 3, RISC-V Linux-style kernels, and kernels with an EFI stub. quser v0.5 , offering an mksh-based shell (qsh). libc v0.6 . The two variants share the same userspace above the seam: quser, qsh, and libc are identical, with only taskman and libc.so differing per kernel. That shared userspace is the whole point — one QNX-compatible environment over two very different microkernels. The milestone behind this release is on the QSOE/L side: it now boots from NVMe storage to an interactive login shell on the SiFive Unmatched (FU740). Spawning the first program off a mounted disk had exposed a pair of deadlocks — taskman blocked ...