You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
9 months ago | |
|---|---|---|
| boot1 | 1 year ago | |
| buildtools | 9 months ago | |
| elf | 1 year ago | |
| include | 1 year ago | |
| memregion_merge | 12 months ago | |
| patches | 1 year ago | |
| seabios@e5f2e4c696 | 1 year ago | |
| .gitignore | 1 year ago | |
| .gitmodules | 1 year ago | |
| boot0.s | 1 year ago | |
| boot1.s | 1 year ago | |
| justfile | 1 year ago | |
| readme.md | 1 year ago | |
| resources.md | 1 year ago | |
readme.md
Overview
Currently we boot from BIOS on a GPT-partitioned disk.
boot0.s is the first-stage bootloader. It lives in the MBR bootstrap field, and must therefore
fit into 440 bytes. Its tasks are:
- Set up a stack etc.
- Get the boot drive geometry
- Load and parse the GPT
- Find the partition of the second stage
- Load and jump to the first sector of the second stage
boot1.s is the second-stage bootloader. Its tasks are:
- Load its own sectors not loaded by the first stage
- Enable A20
- Detect available memory
- Enter unreal mode
- Read the kernel ELF from disk (don't have to parse the ELF just yet)
- Get all the useful information we can from the BIOS before we leave unreal mode
- Enter long mode (possibly via protected mode?)
- Load the kernel ELF
- Initialise stack etc. for the kernel
- Jump to kernel