-
Notifications
You must be signed in to change notification settings - Fork 30
Boot Process
Mohamed Anwar edited this page Apr 4, 2018
·
4 revisions
All files relevant for booting should be fully contained in kernel/arch/{ARCH}/boot/
The following are the supported architectures and platforms:
_start
is defined in boot/multiboot.S
, which is set as the entry point and gets executed by GrUB or any other multiboot compatible bootloader.
movl %eax, (multiboot_signature)
movl %ebx, (multiboot_info)
and $-16, %esp /* Align Stack Pointer */
cli /* Clear Interrupts */
call early_init
early_init
is a generic bootstrap function that kickstarts kernel boot up.
Here is how early_init
is defined, it just maps the kernel to VMA (=0xC0000000)
void early_init(void)
{
/* Set up a basic paging structure so kernel is mapped to VMA */
switch_to_higher_half();
/* Fix esp by adding VMA to it */
asm volatile ("addl %0, %%esp"::"g"(VMA((uintptr_t) 0)):"esp");
cpu_init();
}
From here Boot Process is done and CPU initialization is started.
- Build Instructions
- Boot Process
- CPU Initialization
- Memory Management
- Processes
- Threads
- Scheduler
- System Calls
- Devices Manager
- Virtual Filesystem