I'm trying to read a memory map from the Multiboot structure. I took the multiboot.h, boot.S, and kernel.c sample files from the Multiboot 0.6.96 spec, and I took the linker script from the Bare Bones tutorial. I then did
Code: Select all
gcc -o boot.o -c boot.S
gcc -o kernel.o -c -nostdlib -nostartfiles -nodefaultlibs kernel.c
ld -T linker.ld -o kernel.bin boot.o kernel.o
qemu -kernel kernel.bin
Code: Select all
flags = 0x4f
mem_lower = 640KB, mem_upper = 392192KB
boot_device = 0x8001ffff
cmdline = kernel.bin
mods_count = 0, mods_addr = 0x106000
mmap_addr = 0x9000, mmap_length = 0x78
size = 0x14, base_addr = 0x00, length = 0x00, type = 0x0
size = 0x14, base_addr = 0x00, length = 0x9f4000, type = 0x0
size = 0x14, base_addr = 0x00, length = 0xf00000, type = 0x0
size = 0x14, base_addr = 0x00, length = 0x1000000, type = 0x0
size = 0x14, base_addr = 0x00, length = 0x17ffd0000, type = 0x0
Halted.
I suspect that it's an issue with different versions of Multiboot, but I'm confused about this and haven't been able to find much information online. What versions of multiboot are there, and which versions are incompatible? What version does GRUB 0.97 implement? What version does QEMU's built-in bootloader use? Where can I get the multiboot.h header, or at least the spec, for versions other than 0.6.96?
Or perhaps I have made a mistake of some other sort?
Thanks,
Daniel