KernOS
KernOS Documentation

How to use

The source code is written with the aim that it can be read like a book. Start from kernel_main

extern "C" void kernel_main()
{
INIT::ctors(); // initialize global constructors
INIT::VGA(); // display kernel banner
INIT::KMALLOC(); // initialize kernel malloc, i.e. kmalloc use supported after this point
INIT::SSE(); // enable SSE instruction set
INIT::gdt(); // prepare global descriptor table for x86 protected mode
INIT::idt(); // install exceptions, interrupts, e.g. page fault handler for paging use later
INIT::PAGE(); // initialize page directory, page table
INIT::PIT(); // initialize timer
sti(); // enable interrupt
kprintf("reach");
}

and follow function call links