Dev builds bare-metal PCI, NVMe, and FAT32 drivers for custom OS from scratch

A developer working on V.E.L.O.C.I.T.Y.-OS, a bare-metal operating system designed to run inside the CPU's L3 cache, has published Part 9 of a 12-part build series. After transitioning the kernel to Ring 0 in the previous installment, the developer faced the challenge of having no drivers to read from storage or load files. To solve this, they wrote a PCI configuration space scanner in Rust that queries buses, slots, and functions via legacy I/O ports to detect attached hardware. Using the scanner's output, an NVMe block storage driver was built by locating the mass storage controller, mapping its MMIO registers, and implementing the full NVMe startup and read sequence. A FAT32 parser was also developed, giving the OS the ability to locate and read files directly from disk without relying on any existing driver stack.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in