2025-04-07 12:53:35 +01:00
2024-10-18 14:09:43 +01:00
2025-03-03 09:32:58 +00:00
2025-07-26 17:40:48 +01:00
2025-07-26 17:40:48 +01:00
2024-07-12 20:23:35 +01:00
2024-07-12 20:23:35 +01:00
2025-07-26 17:40:48 +01:00
2025-07-26 17:53:41 +01:00
2025-07-26 17:40:48 +01:00
2025-04-07 18:29:32 +01:00
2024-07-12 20:23:35 +01:00
2025-04-06 14:34:42 +01:00
2025-07-26 17:56:36 +01:00
2024-07-22 09:33:02 +01:00
2025-07-26 17:40:48 +01:00
2025-04-06 14:22:26 +01:00

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
S
Description
Learning about the miracle of boot
Readme
406 KiB
0 Stars 1 Watchers 0 Forks
Languages
Assembly 62.6%
Rust 37.4%