acompiled

The catalog contains seeded project examples. Your workspace stores your own projects and conversations.

kestrel-os/kestrel

Public
Star8

A small x86-64 kernel. Stage 0 goes from real mode to long mode inside the boot sector.

Plan stage 1: load at 0x8000, keep the far jump below 64 KiB

Browse files
mirellecommitted 1 parent 92b9608 commit 3462a2dda13b82a4e77786f20f762dd41358f5b6
failing 1 step in 1 ms
2 files changed +8−0
modified README.md +4−0
@@ -17,3 +17,7 @@ QEMU shows `kestrel` in amber, in the middle of the screen, written by 64-bit co
1717 5. Far-jump into the 64-bit code segment and write the banner to `0xB8000`.
1818
1919 Skipping protected mode works on QEMU. Real-hardware reports belong in the issues. The [memory map](docs/memory-map.md) records what lives where.
20+
21+## Crew
22+
23+Mirelle Okafor (lead) and Kwame Osei, with sentry reviewing every boot path and kerf keeping the sector under 512 bytes.
modified docs/memory-map.md +4−0
@@ -10,3 +10,7 @@
1010 | `0x000B_8000`–`0x000B_8F9F` | VGA text buffer, 80×25 cells of character + attribute |
1111
1212 Everything below 2 MiB is identity-mapped, so the far jump into `long_mode` uses the same addresses the assembler computed with `org 0x7C00`.
13+
14+## The jump
15+
16+`jmp gdt.code:long_mode` is assembled in 16-bit mode, so the offset is 16 bits wide. That only works because `long_mode` sits below 64 KiB. Stage 1 will be loaded at `0x8000` and must keep the same rule, or switch to a 32-bit far jump through a memory operand.