-
Release v0.0.1 Stable
released this
2026-08-31 18:56:53 +02:00 | 5 commits to main since this releaseFeatures
- booting via the underyling SBI implementation OpenSBI, running as M-mode firmware
-> the Supervisor Binary Interface (SBI) is a standardized RISC-V firmware binary interface for supervisor mode software such as kernels - logging layer
- custom
std.logbackend using serial I/O provided by the M-mode firmware
- custom
- sketched out version of a scalable driver subsystem, inspired by Linux:
BusType: identifies a single bus; every bus has independent discovery mechanismsDriver: a registered driver, belonging to a bus-typeDevice: identifies a hardware device unit discovered on a bus-type
- scan and initialize device tree (initial hardware info provided
- first driver for the NS16550A UART, enabling serial I/O independent of the underlying M-mode firmware (
OpenSBI) - first userspace code execution:
- embedded the hello world program
- uses two syscalls:
writefor printing andexitwhen finished - uses my
libsyslibrary that exposes a clean interface - uses the
libsys-startlibrary as an entry point beforemain(), acting as my equivalent of thecrt0(initial C runtime found in pretty much every C toolchain)
Demo Video
You can check out a demo of this running with a few explanations at https://youtu.be/5B-B0HPyghI
Running It
Requirements: QEMU base desktop installation with
qemu-system-riscv64in addition, to emulate the RISC-V 64-bit ISA.Note
This expects the
kernel.elffile to be in the current working directoryqemu-system-riscv64 \ -kernel zig-out/kernel.elf \ -m 2G \ -M virt \ -nographicDownloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- booting via the underyling SBI implementation OpenSBI, running as M-mode firmware