Skip to content

Architecture Overview

Dr edited this page Oct 23, 2026 · 1 revision

Architecture Overview

LimonOS is a 64-bit monolithic kernel written from scratch. It targets the x86_64 architecture and operates in Long Mode (compiled with -m64 -march=x86-64).

Boot Process

The system uses the modern Limine bootloader, which provides full support for both legacy BIOS and modern UEFI systems. Limine hands over control to the kernel in 64-bit mode, along with memory maps and framebuffer information.

Low-Level Foundation

The core of the kernel is built directly on top of the hardware without relying on any existing OS code:

  • Descriptors: Custom Global Descriptor Table (GDT) and Interrupt Descriptor Table (IDT).
  • Interrupts: Programmable Interrupt Controller (PIC) remapping and handling.
  • Timers: System timer (PIT/APIC) and Real-Time Clock (RTC) drivers.
  • Peripherals: PS/2 keyboard and mouse drivers.
  • Bus: Full PCI bus initialization to discover hardware (like the Intel e1000 network card).

Memory Management

Currently, the entire system operates in a single address space in Ring 0 (kernel mode).

  • Physical Memory: A custom physical page manager is used to track available RAM.
  • Heap: A custom dynamic memory allocator providing kmalloc() and kfree() functions for the kernel.

Networking and Cryptography (Ring 0)

One of the most unique features of LimonOS is its networking capabilities built directly into the kernel space.

  • Network Stack: A custom implementation for the Intel e1000 NIC, covering Ethernet, ARP, IP, ICMP, UDP, TCP, DHCP, and DNS.
  • TLS 1.3: A hand-written implementation of the TLS 1.3 protocol. It includes custom cryptographic primitives: SHA-256, HMAC, HKDF, AES-GCM, and X25519 for key exchange.

Graphics and User Interface

LimonOS does not use a standard text-mode VGA console. Instead, it renders everything through a Framebuffer.

  • Orchard: A custom graphical windowing subsystem.
  • Zest: A custom terminal application with font rendering and Cyrillic support.
  • Applications: Basic graphical apps (like a calculator) are being developed.

Clone this wiki locally