My x86-64 hobby operating system. Cooperative multitasking system with no user-mode support, everything runs on ring 0 (for now). Packed with a really simple libc (not compliant with standards at all), uses my own filesystem design, and has very basic support for programs.
There's nothing more to explain that the source code does a thousand times better. It's a fairly simple read.
All the bootloader does is:
- use BIOS Extensions to load itself at 0x7E00 (as 0x7C00-0x7CFF is already loaded by the bios)
- get memory information and store it at 0x7000
- enter long mode
- map the complete physical memory to 0xFFFFFFC000000000
- load the file '/boot/kernel.elf' and map it to 0xFFFFFF8000000000
- creates a bitmap that contains information about which memory frames (units of 4096 KB of physical RAM) are being used at 0x100000
- jumps to the kernel's entry point
Lower Memory Map
This is the state of the physical memory under 0x100000.
|0x03000||0x04FFF||8 KB||TSS Stack|
|0x05000||0x06FFF||8 KB||Kernel Stack|
|0x07000||0x07BFF||3 KB||Boot info|
|0x07C00||0x7FFFF||481 KB||Boot code|