Overview

uniOS Wiki

uniOS is a freestanding x86-64 operating system written in C++20. It boots through the in-tree Meridian UEFI bootloader, starts a preemptive multi-core kernel, and launches a native desktop userspace session with a window manager, dock, menubar, and applications.

No libc in the kernel, no exceptions, no RTTI. Memory management, PCI, ACPI, USB, networking, audio, and display code are all written from scratch.

System at a Glance

Area Summary
Boot Meridian UEFI loader, repo-owned BootInfo ABI, GOP framebuffer with EDID-driven mode selection
Kernel Higher-half C++20 kernel, preemptive O(1)-style scheduler, SMP up to 8 cores, syscalls via syscall instruction
Memory Bitmap PMM with frame refcounts, 4-level paging, HHDM direct map, bucketed kernel heap
Filesystems VFS with page cache, read-only uniFS root with volatile RAM overlay, FAT32 for persistent /data
Drivers PCI (ECAM + legacy), ACPI/APIC, ATA, AHCI, USB xHCI/HID/MSC, PS/2, e1000, RTL8139, AC97, HDA
Networking Polling IPv4 stack: ARP, ICMP, UDP, TCP (RFC 5681-style congestion control), DHCP, DNS
Userspace Native ELF programs, libc subset, immediate-mode GUI library, shell with scripting, desktop apps
Display Firmware framebuffer backend, double buffering, dirty regions, KMS-style present/compose syscalls

Reading Guide

Getting started

  • Building and running — toolchain requirements, build targets, QEMU run targets, test suites.
  • Boot images — what efi.img, boot.img, and uniOS.iso contain, and how they are assembled.

Kernel

  • Boot path — Meridian, the BootInfo ABI, and kernel startup order.
  • Memory management — PMM, VMM, kernel heap, TLB shootdowns.
  • Scheduling — runqueues, priorities, sleep/wakeup, timers.
  • SMP — AP bring-up, per-core state, shutdown protocol.
  • Processes — fork/exec/exit lifecycle and signals.
  • System calls — the syscall ABI and the complete call table.
  • VFS — vnodes, mounts, page cache, pipes, memfd.
  • Filesystems — uniFS, FAT32, and the /data volume.
  • Drivers — PCI, ACPI, APIC, and the driver binding model.
  • Storage drivers — ATA, AHCI, USB mass storage, partitions.
  • USB — xHCI host controller, enumeration, HID.
  • Input — PS/2 and USB input, event delivery.
  • Display — framebuffer, present/compose API.
  • Audio — AC97 and HDA playback.
  • Networking — stack layout, DHCP, DNS, socket API.
  • TCP — connection state machine, congestion control, limits.

Userspace

Reference

Repository Layout

Path Contents
src/bootloader/ Meridian UEFI bootloader
src/kernel/, src/mm/, src/fs/, src/net/, src/drivers/ Kernel and subsystem code
src/usr/ Userspace runtime, libc subset, GUI library, shell, window manager, desktop services, apps
include/ Kernel, driver, boot, and UAPI headers
rootfs/ Authored runtime files staged into unifs.img
appicons/, assets/, cursors/ Sources for generated runtime assets
tools/ Image, filesystem, rootfs staging, asset conversion, and QEMU helper scripts
toolchains/ Meson cross-file configuration
docs/ Project site and this reference documentation

Quick Start

meson setup build/debug --cross-file toolchains/llvm.ini --buildtype debug
meson compile -C build/debug boot-disk iso
meson test -C build/debug --suite smoke --print-errorlogs