RSSAmplifier

Blog

System log

In this blog I share my observations, thoughts and experience about computers, linguistics, philosophy and many other things that interest me.

r-tty.blogspot.comRSS feed ↗25 posts

Latest posts

gk208-videobios, part 8/8 — The Datasheet: Handing a Live Controller to an Operating System

Last in a series on building a firmware-free VideoBIOS for RISC-V. In Part 7 the card drew text I controlled — a grid of cells turned into pixels by a compute kernel on the GPU's own engines, with no firmware anywhere. That made it a video controller. This post is about the part that makes a controller worth building: letting something else drive it. The story so far. A cold GK208, brought up from…

gk208-videobios, part 7/8 — First Pixel: Content I Control, and the Character Generator

Seventh in a series on building a firmware-free VideoBIOS for RISC-V. In Part 6 a cold GK208, driven only by my own modeset, put out a live 720×400 analog signal the monitor recognized — but the picture it scanned held nothing I had put there. This post is about crossing that last gap: making the card show pixels I chose, and then making text with no text mode to lean on. The story so…

gk208-videobios, part 6/8 — First Light: the Modeset That Finally Locked the Clock

Sixth in a series on building a firmware-free VideoBIOS for RISC-V. In Part 5 a cold GK208 woke with no x86 anywhere in the machine — live chip ID, memory controller, privilege ring — and the monitor still showed black. This post is the modeset I wrote to light it, and the ordering that finally locked the pixel clock. The story so far. I abandoned the card's x86 firmware and replayed a…

gk208-videobios, part 5/8 — Burning the Boats: Abandoning x86 Entirely

Fifth in a series on building a firmware-free VideoBIOS for RISC-V. In Part 4 the card's own x86 firmware ran to a clean far return and the monitor still showed black, because that firmware was written for a warm PC my board is not. This post is about giving up on it — and the better approach that giving up made obvious. The story so far. I got a RISC-V CPU to run the GK208's x86 video BIOS:…

gk208-videobios, part 4/8 — The Wall: Why a POSTed Card Still Showed Black

Fourth in a series on building a firmware-free VideoBIOS for RISC-V. In Part 3 the card's own x86 firmware ran to a clean far return on my RISC-V machine, sign-on banner and all. This post is about what happened next: by every register I could read the card was up, and the monitor still showed nothing. The story so far. I taught a RISC-V CPU to emulate x86 well enough to run the GK208's video BIOS…

gk208-videobios, part 3/8: Teaching a RISC-V Chip to Dream in x86

Third in a series on building a firmware-free VideoBIOS for RISC-V. In Part 2 I got a decades-old x86 emulator to compile and link for RISC-V for the first time. This post is about what happened when I finally let it run — when a RISC-V processor started interpreting, one instruction at a time, the x86 firmware that my graphics card had carried in ROM since the day it was manufactured. The…

gk208-videobios, part 2/8: The Idea, and a Buried Emulator

Second in a series on building a firmware-free VideoBIOS for RISC-V. In Part 1 I explained why I wanted a RISC-V machine that greets its monitor at power-on the way an old IBM PC does. This post is about the first idea I had for how to get there — and the first-in-the-world compile that it needed. The story so far. I built a RISC-V personal computer — a SiFive HiFive Unmatched with a real NVIDIA…

gk208-videobios, part 1/8: The Personal Computer as a Product

First in a series on building a firmware-free VideoBIOS for RISC-V — teaching a cold graphics card to speak to a monitor before any operating system exists. There is a small moment I have loved my whole life, and I suspect I am not the only one. You press the power button. A fan spins up. For a second the screen is black — and then, out of that black, text appears . A memory count. A board name. A…

QRV v0.41–v0.43: The Lock-Free Era — and a Final Lesson from the Hardware

This is the last development post for QRV. The project set out to port QNX Neutrino 6.4 to RISC-V 64-bit, run it on real hardware, and explore what it would take to bring a clean microkernel architecture to a modern open ISA. Those goals are met. v0.43 is the final release. v0.41: Intermediate Ground v0.41 was never really a release — it was a tag on a working branch that happened to have the…

QRV v0.34–v0.40: Taskman Moves to User Mode

Since the project began, taskman has run in S-mode — the RISC-V supervisor mode, shared with the kernel. It was kerlinked into the kernel address space at boot, called kernel functions by name, and reached kernel data structures directly. This was inherited from QNX's procnto-as-kernel-module model and it worked, but it was architecturally wrong: there is no meaningful trust boundary between the…

QRV v0.28–v0.33: Breaking Up the Big Kernel Lock

Two ambitious project branches emerged from the v0.27 milestone. The first is removing the Big Kernel Lock. The second — lifting taskman to user mode — gets its own post. This one covers v0.28 through v0.33: the foundation work, the first measurements, and the first kercall to run without holding the BKL. v0.28 — Phase 0: Infrastructure and Baselines Before any lock can be removed, you need to…

QRV v0.27: Multi-User Login — Two Months

Exactly two months ago today, on February 27, the project restarted. v0.27 is the milestone that closes that chapter. The system boots on real RISC-V hardware, enumerates a Samsung NVMe, mounts a filesystem, runs a staged init sequence, presents a login prompt, authenticates a user against a shadow password file using SHA-512 crypt(3), drops privileges, and hands off to mksh with the correct…

QRV v0.26: mksh — A Real Shell for a Real System

esh served its purpose. It got QRV to a shell prompt, proved the IPC stack, and ran through two months of bring-up. But it has no variables, no conditionals, no scripting. What QRV has needed for a while — and now has — is a real shell. v0.26 lands mksh, the MirBSD Korn Shell (R59, 2025-04-26), ported from scratch in a single day. It runs interactively, handles history with cursor keys, shows the…

QRV v0.25: Booting from Real NVMe on Real Hardware

This is the follow-up to the earlier v0.25 post. Everything described there — the sync_hash fix, the DesignWare iATU, the INTx wiring, the mount command — was validated on QEMU. This post is about what happened when the same build ran on real silicon. The short version: it works. How QRV Now Boots on the Unmatched U-Boot loads the QRV kernel binary and modpkg.cpio directly from the Debian ext4…

QRV v0.25: mount -t qrv /dev/nvme0n1p8 /disk2

That mount command works. On QEMU virt, a qrvfs filesystem written by the host mkfs-qrv tool to NVMe partition 8 is mounted at /disk2 , browsable with ls , readable with cat , with all four resource managers — devb-nvme , fs-qrv on /dev/nvme0n1p8 , devb-virtio , fs-qrv on /dev/vblk0 — running simultaneously in user space. On the SiFive HiFive Unmatched, the DesignWare PCIe controller enumerates…

QRV v0.24: NVMe Driver, GPT Partitions, and libpci

QRV v0.24 is the NVMe release. From zero to a working block device driver with GPT partition support, developed in one day across four phases. The driver lives entirely in user space, built on top of the QNX resource manager framework and the PCI server that has been accumulating infrastructure since v0.22. The boot sequence now includes: devb-nvme: GPT OK, 2 partition(s) p1: LBA 34..32801 (16…

QRV v0.23: The Stale SATP Bug, SiFive UART, and PLIC on Real Silicon

QRV v0.23 closes a ~10% daemon-spawn hang that had survived v0.22, brings a native UART driver to the SiFive Unmatched, and fixes the PLIC interrupt delivery path for the FU740's heterogeneous hart layout. After v0.22 the system booted reliably but still hung with measurable frequency during the init script's driver startup sequence. That hang is gone. The Stale SATP What was happening The hang…

QRV v0.22: 50/50 Clean Boots, PCI, and the L2 Page Table Hunt

50/50 clean boots on QEMU. Eight CPUs, 10 kHz timer tick, CONFIG_DEBUG_PRIL and CONFIG_DEBUG_VECTOR both enabled. This number was 27/50 at the start of this release cycle. The other 23 were the "fs-qrv hang" — a silent lockup at 100% host CPU, no crash banner, no diagnostic output, just the system sitting there. Finding and fixing it was the main event of v0.22, and the story of how it was found…

QRV v0.21: Interactive Shell on Real Hardware

It boots. On a real RISC-V board, pressing a real reset button, with a real serial cable connected to a real terminal. The shell prompt appears. pidin runs and shows 15 GB free out of 16. shutdown works. This is v0.21 on a SiFive HiFive Unmatched . The full console capture: U-Boot 2025.10-0ubuntu0.24.04.1 (Nov 19 2025 - 17:26:40 +0000) CPU: sifive,bullet0 Model: SiFive HiFive Unmatched A00 DRAM:…

QRV on Real Hardware: First Boot on SiFive Unmatched

Two evening sessions, about four to five hours each. At the end of the second one, QRV was booting on a real RISC-V board — a SiFive HiFive Unmatched with the U740 SoC, 16 GiB of RAM — getting through the full startup sequence, loading taskman, resolving 5,717 symbols, and running deep into process manager initialization before hitting a crash. The Gap Between QEMU and Real Hardware QEMU is a…

QRV progress: Interrupt-Driven Console, Fault Handling, kill()

We're progressing towards v0.21 steadily. Today's commits are about three things worth writing up properly because each one marks a qualitative step in how the system behaves. Interrupt-Driven Console This is the headline. Up to now, the shell's console I/O ran through devtext — a simple in-kernel device that bypassed the full driver infrastructure. v0.20.1 is the first version where the shell…

QRV v0.20: SMP Stable, Drivers Work, Process Lifecycle Complete

v0.20 is the release where SMP stopped being a liability. The system now runs 20/20 clean SMP boot sequences — four CPUs, full IPC stack, drivers loading, shell responding — without crashes. That number, 20/20, took a while to reach and required fixing several genuinely interesting bugs in the kernel's trap entry, context switching, and timer handling. This post is mostly about those bugs, because…

What I'm working on now for QRV 0.18?

Three primary features of this release will be: devc-serial devb-virtio fs-unix (the latter one is for the same file system type as used in xv6) Also some new utilities and resource managers will be added: pipe pidin slay Stay tuned! ;)

QRV Operating System: First Publication

QRV v0.16: Working Shell, Working IPC v0.16 boots to a working shell prompt on QEMU. pwd prints the working directory, echo works, ls lists the root filesystem, and non-existent commands report "No such file or directory". The first dynamically-linked user-space program spawns, runs, and exits through the full QNX-style IPC stack. The patches (and the build script) for v0.16 are available at…

GMS 2950: A Cryptographic Coprocessor Joins the Mainframe

Today marks a significant milestone for the GMS/359 project: the successful integration and verification of the GMS 2950 Cryptographic Processor — a modular exponentiation accelerator connected to our Multiplexor Channel. The Achievement GMS 2950 Crypto Test ==================== Test: 3^5 mod 7 = ? Computing... SUCCESS! Z = 0x05 That humble 0x05 represents something remarkable: our little FPGA…