Low-level systems programming is the art of translating abstract logic into physical memory addresses. Quin OS utilizes specific mathematical models to manage hardware.
To render a pixel on a modern display, we must map a 2D coordinate
| Parameter | Function |
|---|---|
| Base | The physical start of the Video RAM provided by the UEFI bootloader. |
| Pitch | The total bytes in a horizontal scanline ( |
| BPP | Bits Per Pixel (Set to 32 for Quin OS RGB format). |
The kernel exists at the top of the virtual address space. To access a physical address
This allows the kernel to "see" the entire physical RAM as a continuous block starting from the HHDM offset.
Quin OS uses an
For each row
| Component | Specification |
|---|---|
| Mode | 64-bit Long Mode |
| Address Space | 48-bit Virtual / 52-bit Physical |
| Kernel Base | 0xFFFFFFFF80000000 (-2 GiB) |
| Page Size | 4 KiB (Standard) |
| Range | Content |
|---|---|
0xFFFFFFFF80000000 |
Kernel Code, Data, and Stack |
0xFFFF800000000000 |
Direct Physical Map (HHDM) |
0x0000000000000000 |
Reserved for Userland Ring 3 |
Kernel Side: Limine Side:
─────────────── ────────────
struct limine_framebuffer_request {
.id = MAGIC_NUMBER ──► [Limine recognizes request]
.revision = 0 │
.response = NULL │
} ▼
[Limine initializes framebuffer]
│
▼
[Fills response structure]
│
▼
.response ◄────────────────── struct limine_framebuffer_response {
.framebuffers[0] = {
.address = 0xFD000000
.width = 1024
.height = 768
.pitch = 4096
.bpp = 32
.memory_model = RGB
}
}
Similarly for:
- memmap_request ──► Memory map entries
- hhdm_request ──► HHDM offset
When booting successfully, you should see:
___ _ ___ ____
/ _ \ _ _(_)_ __ / _ \/ ___|
| | | | | | | | '_ \ | | | \___ \
| |_| | |_| | | | | || |_| |___) |
\__\_\\__,_|_|_| |_| \___/|____/
Quin OS - Phase 1: Boot
Version 0.1.0
Architecture: x86_64
Bootloader: Limine
=== FRAMEBUFFER INFO ===
Resolution: 1024x768
BPP: 32
Pitch: 4096
Model: RGB
========================
=== MEMORY MAP ===
[Memory regions listed here]
===============
[OK] Kernel initialized successfully
[OK] Entered long mode (x86_64)
[OK] Framebuffer initialized
[OK] Memory map parsed
Phase 1 Complete!
System halted. Press Ctrl+C in QEMU to exit.
| Phase | Milestone | Objective | Status |
|---|---|---|---|
| 1 | Boot | UEFI handoff & LFB Mathematics | ACTIVE |
| 2 | Memory | PMM/VMM & Heap Allocation | PENDING |
| 3 | Interrupts | IDT, GDT & Exception Handling | PENDING |
| 4 | Scheduling | Preemptive Multi-tasking | PENDING |
| 5 | Linux ABI | System Call Translation Layer | PENDING |
- Cross-Compiler: Clang 17+
- Linker: LLD (Script:
linker.ld) - Binary Format: ELF64 PIE
| Target | Action |
|---|---|
make all |
Compiles kernel and generates bootable ISO. |
make run |
Launches QEMU with OVMF UEFI firmware. |
make clean |
Removes object files and binaries. |
The kernel communicates via the serial port (COM1) at 115200 baud.
- Serial Output:
-serial stdio - GDB: Port
:1234
Architect: Dr Chamyoung
License: MIT
Github: Inbora Studio