Experimental 64-bit x86 bare-metal kernel in C. It boots on the machine by itself, with no operating system under it.
- Round-robin scheduler, paging, heap, ring 3 task, SYSCALL/SYSRET
- AMD SVM hypervisor with nested paging; can run Linux as a guest
- SMP start-up (ACPI MADT, INIT-SIPI-SIPI)
- ATA/PIO and NVMe drivers
- AVX-512 co-processor routines
- Text HUD and a small shell
See 00_Kernel_Contents.txt for every file and what each part does.
00_Kernel_Contents.txt file-by-file description
build/kernel_image.bin prebuilt bootable image
src/make_boot.py build script + boot loader source
src/kernel.ld linker script
src/kernel.c the kernel
src/cop.c AVX-512 co-processor routines
src/font8x16.h screen font
Needs python3, gcc, as, ld.
python3 src/make_boot.py
This writes build/kernel_image.bin and a 512 MB disk/DiskImage.img.
qemu-system-x86_64 -cpu EPYC -smp 4 -m 1G -snapshot -drive file=build/kernel_image.bin,format=raw
With KVM on an AMD host, use -enable-kvm -cpu host in place of -cpu EPYC.
- Built for one specific AMD machine.
- The hypervisor needs AMD SVM. The co-processor needs AVX-512 and turns itself off without it.
- The NVMe write window in
src/kernel.c(NVME_WR_LBA_LO,NVME_WR_LBA_HI) is set for the original disk. Change it before usingnvme wrorcop wron another machine.
- Author: anonymous.
- No license. Do what you want with it.
- Provided as is. No warranty. No support.
src/font8x16.his derived from the Terminus font, which has its own license.