From 004399c122d4f47f374f36423cec4696b00611e5 Mon Sep 17 00:00:00 2001 From: Tom-on64 Date: Sun, 22 Mar 2026 15:25:33 +0100 Subject: [PATCH] Major TODO rewrite and minor README changes :) --- README | 27 +++++++++++++----- TODO | 90 ++++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 80 insertions(+), 37 deletions(-) diff --git a/README b/README index fa89f68..25931d2 100644 --- a/README +++ b/README @@ -4,23 +4,36 @@ kern. Idk why i called it that it was 3am and i needed sleep. !! WARNING !! -Kern is being rewritten at the moment. To see the last version before the rewrite, see commit 11feab5 on master. -(https://github.com/Tom-on64/kern/tree/11feab5) +Kern is being rewritten at the moment. To see the last version before the +rewrite, see commit 11feab5 on master. (https://github.com/Tom-on64/kern/tree/11feab5) About ----- -Kern is a 32-bit OS based on the x86 architecture written in NASM Assembly and C. -It attempts to be a µ-kernel, although i have no clue what i'm doing. +Kern is a 64-bit OS based on the x86_64 architecture written in C & NASM +Assembly. It attempts to be a µ-kernel, although i have no clue what i'm doing. Dependencies ------------ -* binutils that can target i386-elf -* sfdisk -* GCC that can target i386-elf +* binutils that can target x86_64-elf +* GCC that can target x86_64-elf * Limine * make * Mtools * NASM +* OpenSSL +* sfdisk +* QEMU (for emulation) + +Building +-------- +Building should be as easy as running: + $ make +If it says that a command was not found, check that the utilities are correctly +defined in config.mk. + +If you want to emulate it with QEMU, you can run: + $ make qemu + Old Version: https://github.com/Tom-on64/old-kern diff --git a/TODO b/TODO index f65783e..cad5285 100644 --- a/TODO +++ b/TODO @@ -1,35 +1,65 @@ TODO ==== -[x] Boot -[x] Multiboot 1 +Architectural Milestones +[-] 64-bit rewrite +[x] Limine (Bootloader) +[ ] Decent build system (Makefile/CMake with cross-compiler) +[ ] kernel.h rewrite & header cleanup +[ ] debugf() cleanup & kprintf() (Standardized logging levels) + +Low-Level Hardware & Interrupts +[x] GDT [x] IDT -[x] ISRs -[x] GDT -[x] Physical MM -[x] Virtual MM -[x] Paging -[x] Serial monitor -[x] kmalloc() -[x] Make dedicated asm functions like lidt(), sti(), ... -[ ] Add something like in the kernel -[ ] Improve kmalloc() to reduce fragmentation -[ ] Improve kmalloc() for better alignment -[x] PIT -[ ] RTC -[ ] HPET -[x] System calls -[ ] Separate syscall sources into individual files -[ ] Userspace -[x] Processes/Tasks -[x] Scheduler -[ ] Priority scheduler -[x] Task switching -[ ] Interprocess communication -[ ] ALL the message types -[ ] Graphics -[ ] Multicore support -[ ] Networking :) -[ ] Finish all the TODOs -[ ] Run DOOM +[x] Basic IRQs (Internal/Legacy) +[ ] Proper fault handling (Exceptions, Page Faults, #GP) +[ ] Check for features with CPUID (NX-bit, SSE, AVX) +[ ] APIC driver (Local APIC & I/O APIC) +[ ] ACPI driver (Parsing RSDP/MADT for multi-core/APIC) +[ ] HPET driver (High precision timing) + +Memory Management +[x] Physical memory manager (Bitmap or Buddy) +[x] Paging (Recursive or Offset mapping) +[ ] Kernel heap (kmalloc/kfree - Linked list or Slab) +[ ] Memory mapped I/O (MMIO) API for drivers +[ ] VMM: Shared memory regions (For IPC/Framebuffers) +[ ] VMM: Copy-on-Write (COW) support (Optional but good) + +Multitasking & User Space +[ ] System calls (SYSCALL/SYSRET implementation) +[ ] Context switching (Saving/Restoring CPU state) +[ ] Tasking (Thread/Process control blocks) +[ ] Scheduler (Round Robin or Priority-based) +[ ] User-space stacks & privilege isolation (Ring 3) +[x] Stack Smash Protector + +Interprocess Communication +[ ] Interprocess Communication (Sync/Async messaging) +[ ] Capability-based security (Optional: basic handle system) +[ ] Signal/Event system (Interrupt forwarding to user space) + +Bootstrapping & Filesystem +[ ] USTAR parser (Read initrd.tar) +[ ] Initrd integration (Loading modules via Limine) +[ ] ELF parser (Loading PT_LOAD segments) +[ ] /init (The first user-space process) +[ ] VFS Server (Abstracting file requests via IPC) + +Drivers & IO +[x] Serial driver (For kernel debugging) +[-] Framebuffer driver (Basic LFB/GOP) +[ ] PS/2 Keyboard driver (As a user-space server) +[ ] PCI Bus Enumerator (The "parent" of hardware drivers) +[ ] Storage driver (SATA/AHCI or VirtIO) + +The Final TODOs +[ ] Run DOOM (Requires: VFS, Input, Timer, LibC, and Graphics) +[-] Finish all the TODOs + +Legend +------ +[ ] Not finished +[-] In progress +[x] Finished