~ecs/k

k/BOOT.md -rw-r--r-- 684 bytes
354b6b99 — Eyal Sawady Initial commit 9 months ago

#Boot Process for k

#Stage-1 bootloader

Initialize the CPU in an architecture-dependent manner, load a temporary page table, and read the stage-2 bootloader from the disk.

The stage-1 bootloader is written in assembly, and is not portable.

#amd64 initialization

Put the CPU in 64-bit mode

#Stage-2 bootloader

Parse the root filesystem and read the full kernel into memory.

The stage-2 bootloader is mostly written in portable C, with a few parts written in assembly.

#Kernel

Initialize hardware, initialize userspace, load entry points, load a better page table, and start init.

The kernel is mostly written in portable C, with a few parts written in assembly.