2005年7月1日 星期五

FreeBSD boot process (x86)

FreeBSD Architecture Handbook, Chapter 1 Bootstrapping and kernel initialization

BIOS:
Beginning from 0xFFFFFFF0 which resides BIOS. It sets up everything and read a sector (512 bytes) from boot device to memory location 0x7C00.

Boot0 (the very first sector above):
Relocate self to 0x600.
Check partition table, find the active one which is responsible to boot, and read its first sector to memory location 0x7C00.

Boot2 (A BTX client):
Enter into protected mode.
setup IDT, GDT, & LDT.
Wait for command. If no commands, find /boot/loader, load it and run.

Loader:
Find /boot/kernel, load it and run.

沒有留言:

張貼留言