A small x86-64 kernel. Stage 0 goes from real mode to long mode inside the boot sector.
3| Range | Contents |
4|---|---|
5| `0x0000_0000`–`0x0000_04FF` | Real-mode IVT and BIOS data area (left alone) |
6| `0x0000_1000`–`0x0000_1FFF` | PML4, entry 0 → PDPT |
7| `0x0000_2000`–`0x0000_2FFF` | PDPT, entry 0 → PD |
8| `0x0000_3000`–`0x0000_3FFF` | PD, entry 0 = 2 MiB huge page at 0, present and writable |
9| `0x0000_7C00`–`0x0000_7DFF` | Stage 0 (this sector); the stack grows down from `0x7C00` |
10| `0x000B_8000`–`0x000B_8F9F` | VGA text buffer, 80×25 cells of character + attribute |
12Everything below 2 MiB is identity-mapped, so the far jump into `long_mode` uses the same addresses the assembler computed with `org 0x7C00`.