How re-fa/os works
Milestone OS is a freestanding x86 kernel. Its documented user workflow is keyboard or serial input to the interactive shell, which dispatches commands to memory, timer, and VFS services and prints results. The runtime also initializes CPU/platform support, memory management, USB and storage drivers, and filesystems. The README describes an older 32-bit/PIC/PIT configuration, while the tree includes x86_64 and newer device modules; unsampled implementation details and their connections are therefore omitted unless documented or shown by the excerpts.
Main entry points: entry.c Kernel entry · shell.c Interactive shell · vfs.c Virtual filesystem · ahci.c AHCI driver
Components 25
Kernel startup
- Kernel entry
kernel/entry.c - Descriptor tables
kernel/descriptor_tables.c - IDT setup
arch/x86_64/idt.c
Platform drivers
- ACPI discovery
acpi/acpi.c - APIC control
drivers/apic/apic.c - MMIO mapping
arch/x86_64/mmio.c - Timer service
kernel/timer.c - xHCI controller
drivers/usb/xhci/xhci.c - USB HID keyboard
drivers/usb/hid/keyboard.c - PS/2 keyboard
drivers/ps2/keyboard.c
Memory management
- Physical memory
mm/pmm.c - Kernel heap
mm/kheap.c
Storage and filesystems
- AHCI driver
drivers/storage/ahci/ahci.c - Block device layer
drivers/storage/block.c - GPT partitions
fs/gpt.c - Virtual filesystem
fs/vfs.c - RAM filesystem
fs/ramfs.c - FAT32 filesystem
fs/fat32.c
Input and console
- Keyboard input
kernel/keyboard.c - Interactive shell
shell/shell.c - VGA console
kernel/vga.c - Framebuffer output
drivers/framebuffer/framebuffer.c - Serial console
drivers/serial/serial.c
Other components
- Multiboot loader
- User
Connections 31
- Multiboot loader → Kernel entry: loads kernel
README.md - Kernel entry → Framebuffer output: initializes
kernel/entry.c - Kernel entry → ACPI discovery: discovers
kernel/entry.c - Kernel entry → MMIO mapping: initializes
kernel/entry.c - Kernel entry → APIC control: initializes
kernel/entry.c - Kernel entry → IDT setup: configures
- Kernel entry → Timer service: initializes
kernel/entry.c - Kernel entry → Physical memory: initializes
kernel/entry.c - Kernel entry → Kernel heap: initializes
kernel/entry.c - Kernel entry → xHCI controller: polls
kernel/entry.c - Kernel entry → PS/2 keyboard: polls
kernel/entry.c - Kernel entry → Virtual filesystem: initializes
kernel/entry.c - Kernel entry → AHCI driver: initializes
- AHCI driver → MMIO mapping: maps registers
drivers/storage/ahci/ahci.c - AHCI driver → Block device layer: registers device
drivers/storage/ahci/ahci.c - GPT partitions → Block device layer: reads sectors
- Virtual filesystem → RAM filesystem: uses backend
fs/vfs.c - Virtual filesystem → FAT32 filesystem: uses backend
fs/vfs.c - FAT32 filesystem → Block device layer: reads and writes
fs/fat32.c - User → Interactive shell: enters commands
README.md - Interactive shell → Virtual filesystem: runs file commands
shell/shell.c - Interactive shell → Physical memory: queries memory
shell/shell.c - Interactive shell → Timer service: queries uptime
shell/shell.c - Interactive shell → VGA console: prints output
shell/shell.c - Interactive shell → Keyboard input: receives input
- PS/2 keyboard → Keyboard input: submits key events
- xHCI controller → USB HID keyboard: dispatches reports
- USB HID keyboard → Keyboard input: submits key events
- Kernel entry → Serial console: initializes
kernel/entry.c - User → Serial console: types commands
README.md - VGA console → Serial console: mirrors output
README.md