FontaineOS is an advanced, bare-metal x86 micro-kernel operating system built entirely from scratch using Freestanding C++20 and x86 Assembly. Operating with absolutely zero external runtime dependencies and completely divorced from the standard library (libstdc++/glibc), it manages raw x86 CPU systems, configures physical registers, routes asynchronous hardware lines, and orchestrates an interactive block-storage terminal workstation [x].
- Pure Freestanding Architecture: Zero runtime abstraction layers. Built with strict
-ffreestandingparameters, managing all low-level system attributes manually [x]. - Hardware Register Layer Translation: Directly manipulates hardware lines through inline assembly port interactions (
inb,outb,insw,outsw) [x]. - Atomic Protection & Synchronization: Shields volatile memory tracking arrays using strict hardware interrupt constraints (
cli/sti) [x].
- [x] Bootloader Entry Assembly: Leverages Multiboot-compliant headers to hand execution safely over from GRUB straight to C++ code [x].
- [x] GDT Realignment: Reconfigures the Global Descriptor Table to implement a flat memory space layout, defining Ring 0 supervisor and Ring 3 user code/data spaces [x].
- [x] IDT Exception Handlers: Configures the Interrupt Descriptor Table to hook all 32 core CPU faults alongside critical hardware IRQs [x].
- [x] PIT Timing Loops: Re-programs the Programmable Interval Timer (Channel 0, Port
0x40) to generate precise 100Hz hardware clock ticks [x]. - [x] Keyboard Driver Engineering: Hooks IRQ 1 (Port
0x60) to catch raw scan keys asynchronously, deploying a strict Break-Code scancode gate (scancode & 0x80) to isolate valid keypresses [x].
- [x] Physical Memory Bitmap Allocation: Tracks every individual 4KB physical page across 64MB of RAM using a continuous bit-array allocation mapping grid [x].
- [x] Virtual Memory Page Translation: Mounts a Page Directory and secondary Page Tables to enable x86 CR3 hardware paging, identity-mapping the first 4MB of memory [x].
- [x] Bare-Metal Heap Framework: Deploys a First-Fit linked-list block tracker to drive working, byte-aligned
kmalloc()andkfree()allocators [x].
- [x] Thread Control Block (TCB) Layer: Spawns parallel runtime threads with completely isolated, heap-allocated 4KB task execution stacks to prevent IRQ frame overflow [x].
- [x] Assembly-Backed Context Switcher: Implements a dedicated x86 assembly context-switching routine (
context_switch) insideboot.sto guarantee register state backup safety and bypass-O2function-prologue stack fragmentation [x]. - [x] Concurrent Thread Bootstrapping: Deploys a thread bootstrap wrapper (
thread_bootstrap) that cleanly re-enables hardware interrupts upon task entry, driving active execution loops [x].
- [x] Atomic Interrupt-Level Parser Shell: Pulls the interactive prompt processing out of loose user loops and mounts it entirely inside the hardware interrupt ring [x].
- [x] Dynamic System Diagnostics Commands: Built an active
uptimetracker reporting whole seconds plus raw hardware ticks, alongside ameminfocommand that walks the PMM bitmap to expose physical page utilisation and scheduler thread pools live [x]. - [x] ATA/IDE Hard Drive Block Driver: Communicates directly with motherboard disk ports (
0x1F0–0x1F7) using 28-bit Logical Block Addressing (LBA) [x]. - [x] Isolated Hardware Read/Write Waits: Separates hardware polling loops into
ata_wait_read()(polling BSY + DRQ) andata_wait_write()(polling BSY exclusively) to eliminate x86 deadlock grids [x]. - [x] Native Device Interrupt Gating: Intercepts port
0x3F6(Device Control Register) to cleanly mask out unhandled IRQ 14 controller completion interrupts, avoiding silent triple-fault reboots [x]. - [x] Flat Global I/O Landing Pads: Completely eliminates stack alignment drift under high-level compiler optimizations by routing block bursts into static, 4-byte aligned global memory arrays (
ata_io_buffer,disk_test_pad) [x]. - [x] Universal Terminal Scrolling Engine: Manages video buffer layouts dynamically by checking rows (
cursor_position >= 4000), executing memory block copies to shift rows upward, and blanking out the bottom line cleanly [x].
- Compiler:
g++(Using flags:-m32 -ffreestanding -O2 -Wall -Wextra -fno-exceptions -fno-rtti -std=c++20) [x] - Linker:
ld(Targeting architecture map:-m elf_i386 -T linker.ld) [x] - Assembler:
nasm(Targeting system layout format:-f elf32) [x] - Virtualizer emulation core:
qemu-system-i386(With explicitly configured format boundaries:-drive file=bin/disk.img,format=raw,index=0,media=disk) [x]
FontaineOS utilizes a custom, production-grade deployment tool script that completely handles the development lifecycle [x]:
- Scrubs Workspace Assets: Erases dead cached intermediate object models (
make clean) [x]. - Initializes Master Block Drive Media: Uses
ddto generate a 10MB raw disk space image and injects a real MBR structural signature placeholder (\x55\xAA) into sector block 0 to unlock emulator status pins [x]. - Validates Module Constraints: Compiles the files, checking for code layout bugs [x].
- Historical State Backups: Saves a timestamped backup point copy inside your build directory for permanent tracking safety [x].
- Syncs Remote Logs: Pushes your progress straight to your master branch workspace repository on GitHub [x].
- Hardware Emulation Execution: Launches QEMU, mounting your kernel and raw block storage drives safely [x].