How krisbutiamanosdev/nyonos works
nyonOS is a minimal x86_64 kernel booted through Limine. Its principal workflow is firmware/bootloader handoff into kernel initialization, followed by memory and interrupt setup and runtime services for multitasking, syscalls, storage, input, and display. The graph preserves the README’s documented capabilities and the substantial runtime modules in the source index. Several initialization and service links are dashed because the available excerpts do not show the relevant call sites.
Main entry points: kernel.c Kernel entry · task.c Tasks and scheduling · syscall.c Syscall handling · vmm.c Virtual memory
Components 26
Boot and entry
- Limine protocol
src/boot/limine/limine.h - Kernel entry
src/kernel.c
x86 architecture
- GDT and TSS
src/arch/x86_64/gdt/gdt.c - IDT and IRQ dispatch
src/arch/x86_64/idt/idt.c - PIC controller
src/arch/x86_64/pic/pic.c - PIT timer
src/arch/x86_64/pit/pit.c - Local APIC
src/arch/x86_64/lapic/lapic.c - Syscall handling
src/arch/x86_64/syscall/syscall.c - Syscall MSRs
src/arch/x86_64/syscall/syscall_msr.c
Memory management
- Physical memory
src/kernel/mm/pmm/pmm.c - Virtual memory
src/kernel/mm/vmm/vmm.c - Kernel heap
src/kernel/mm/heap/heap.c
Kernel runtime
- Tasks and scheduling
src/kernel/multitask/task.c - Locks and preemption
src/kernel/sync/sync.c - Preemption state
src/kernel/sync/preempt.c - File descriptors
src/kernel/fd/fd.c - FAT16 filesystem
src/kernel/fs/fs.c - Block layer
src/kernel/block/block.c - Panic handling
src/kernel/panic/panic.c
Devices and display
- ATA driver
src/drivers/ata/ata.c - PS/2 keyboard
src/drivers/keyboard/keyboard.c - Serial output
src/drivers/serial/serial.c - Framebuffer video
src/graphics/video/video.c - Font data
src/graphics/font/font_data.h - Kernel printing
src/kernel/kprintf/kprintf.c
Other components
- BIOS / UEFI
Connections 31
- BIOS / UEFI → Limine protocol: boots through
- Limine protocol → Kernel entry: hands off
src/kernel.c - Kernel entry → GDT and TSS: initializes
- Kernel entry → IDT and IRQ dispatch: initializes
- Kernel entry → Physical memory: initializes
- Kernel entry → Virtual memory: initializes
- Kernel entry → Tasks and scheduling: initializes
- Kernel entry → PIT timer: configures
- Kernel entry → Syscall handling: initializes
- Physical memory → Virtual memory: provides pages
src/kernel/mm/vmm/vmm.c - Virtual memory → Kernel heap: maps memory
src/kernel/mm/heap/heap.c - PIT timer → IDT and IRQ dispatch: installs handler
src/arch/x86_64/pit/pit.c - PIT timer → Tasks and scheduling: ticks scheduling
- IDT and IRQ dispatch → PIC controller: acknowledges IRQs
src/arch/x86_64/idt/idt.c - Tasks and scheduling → Virtual memory: manages address spaces
src/kernel/multitask/task.c - Tasks and scheduling → GDT and TSS: uses TSS
src/kernel/multitask/task.c - Tasks and scheduling → Syscall handling: sets up user tasks
src/kernel/multitask/task.c - Syscall handling → File descriptors: uses descriptors
src/arch/x86_64/syscall/syscall.c - Syscall handling → FAT16 filesystem: uses filesystem
src/arch/x86_64/syscall/syscall.c - FAT16 filesystem → Block layer: reads blocks
src/kernel/fs/fs.c - Block layer → ATA driver: delegates I/O
src/kernel/block/block.c - File descriptors → PS/2 keyboard: uses input
- Kernel entry → PS/2 keyboard: initializes
- Kernel entry → Local APIC: may initialize
- Kernel entry → Syscall MSRs: configures
- Kernel printing → Serial output: writes output
src/kernel/kprintf/kprintf.c - Kernel printing → Framebuffer video: renders output
src/kernel/kprintf/kprintf.c - Framebuffer video → Font data: uses glyphs
- Panic handling → Serial output: logs failure
src/kernel/panic/panic.c - Panic handling → Kernel printing: prints diagnostics
src/kernel/panic/panic.c - Locks and preemption → Preemption state: controls preemption