An x86-64 SMP kernel where every process owns its physical memory. Written in C++ and x86 Assembly.
A process is a body: a set of physical blocks from the buddy allocator. Its pages, page tables, thread records, and region records all live in those blocks. The kernel itself keeps only a small record and a block list per body.
- A body can only exhaust its own memory, not the kernel's
- Exiting returns whole blocks to the allocator
- Small bodies start at 64KB and grow upto 2MB
Bodies share memory only through leases: mappings with a fixed maximum lifetime in timer ticks. Leases can be renewed, but can't be revoked early.
- Each CPU flushes on its own timer tick
- A block is reused only after its last lease expires, its mappings are cleared, and every online CPU has flushed
- A crashed peer needs no special cleanup, its just dead
- Limine bootloader
- UEFI support
- SMP and AP boot
- GDT
- Per-CPU TSS and IST stacks
- IDT with exceptions and IRQ handlers
- Kernel panic and stack traces
- 4-level paging (4KB/2MB/1GB)
- Serial console output
- Framebuffer text + ANSI color output
- Keyboard driver (PS/2)
- Bitmap frame allocator
- Spinlock
- Atomic operations
- APIC, LAPIC, and IOAPIC support
- PCI/ACPI support with RSDP/RSDT/XSDT parsing
- Per-CPU data structures
- LAPIC timer interrupts and sleep functions
- Scheduler
- Virtual memory management
- Kernel threads and context switching
- Single physical memory owner (buddy allocator)
- TLB shooting and flushing
- BIOS support
- SSE/SSE2 support on all CPUs
- Bodies
- Leases
- Publish regions
- Ring 3 and SYSCALL/SYSRET stuff
- Syscall interface
- ELF loader
- VFS layer
- FAT32 filesystem driver
- Ext2 filesystem driver
- PCI enumeration and device drivers
- AHCI storage driver
- NVMe storage driver
- USB drivers
- Power management (ACPI S3 sleep, etc.)
- Audio driver (userland)
- Better terminal (scrolling, cursor, line editing, etc.)
- Framebuffer graphics primitives (2D/3D drawing, font rendering, etc.)
- Window compositor
- Mouse driver (PS/2)
- TCP/IP network stack
- Ethernet drivers (port them)
- Body-to-body event system
- SMP load balancing
- RTC/CMOS clock support
- Userland programs:
- Shell
- Text editor
- File manager
- Web browser (OBVIOUSLY port)
- Games (port)
- Package manager (port)
# On Debian/Ubuntu
$ ./limine.sh
# Manually
$ git clone --branch=v10.x https://github.com/limine-bootloader/limine.git
$ cd limine
$ ./bootstrap
$ ./configure
$ make
$ sudo make install- Clone the repository
$ git clone https://github.com/Sid110307/Mesh.git
$ cd Mesh- Build and run on QEMU
$ ./run.sh