meowix
Unix-like OS. x86-64, C++20 and assembly.
C++ / x86-64 / asmGitLab
Example address: 0xffff800000001000
- PML4bits 47—39
100000000 - PML3bits 38—30
000000000 - PML2bits 29—21
000000000 - PML1bits 20—12
000000001
Page offset 09-bit indices; 12-bit page offset.
Inside meowix
Boot & execution
Limine boot context and command-line parsing. The kernel initializes memory, descriptor tables, interrupts and devices before spawning a program from its initrd.
kernel/entry.ccMemory & paging
Physical and virtual memory managers, four-level page tables, mapping and unmapping, and TLB flushing. Page-table entries include present, write, user and NX flags.
kernel/memory/paging.ccTasks & syscalls
Task contexts store general-purpose registers and SSE state. The user interface defines test-write, suicide, kill and getpid syscalls.
user/include/syscalls.hInterrupts & devices
GDT, TSS, IDT, ACPI, APIC and IOAPIC code. Driver sources include PS/2 input, UART serial and a virtual terminal.
kernel/arch/Source excerpt
kernel/entry.cc · excerpt
Memory::PMM::init();
Memory::Paging::init();
Memory::VMM::init();
Arch::GDT::init();
Arch::IDT::init();
Sys::Multitasking::Man::start();Read full source