Get the latest tech news
Writing an operating system kernel from scratch
Exploring a minimal implementation of a time-sharing kernel on RISC-V, implemented in Zig, on top of OpenSBI.
The SBI method should theoretically be more portable, as it delegates output management details to the M-level layer (essentially what we do with MMIO), freeing us from concerns about exact memory space addresses. In theory, this should also work on a real machine, provided an SBI layer is present when the kernel starts, and the linker script, I/O “drivers,” and other machine-specific constants are adapted. Many educational OS kernels exist, but this experiment combines RISC-V, OpenSBI, and Zig, offering a fresh perspective compared to traditional C implementations.
Or read this on Hacker News