Problems with grub setting the video mode
Posted: Wed Mar 13, 2013 5:10 pm
I am transitioning to using GRUB 2 as my boot loader. When I use the following header everything works fine. Grub loads my kernel with the video mode set to text mode, provides a memory map, and provides vbe info.
When I request a graphical mode, things go awry. I use the following header:
Grub puts the multiboot magic value in eax but sets flags to 0 and doesn't provide a memory map or vbe info. It does set a graphical video mode though. In bochs it sets 1024x768x32 and in qemu it sets 1280x1024x16.
I thought it was weird that it set the video mode but didn't provide mode info or even a memory map. I can't find anything in the multiboot spec that would explain it. Does anyone know why it would do this?
Thanks.
Code: Select all
MBOOT_HEADER_MAGIC equ 0x1BADB002
MBOOT_HEADER_FLAGS equ (1<<0) | (1<<1) | (1<<2) | (1<<16)
MBOOT_CHECKSUM equ -(MBOOT_HEADER_MAGIC + MBOOT_HEADER_FLAGS)
global mboot
extern code
extern bss
extern end
ALIGN 4
mboot:
dd MBOOT_HEADER_MAGIC
dd MBOOT_HEADER_FLAGS
dd MBOOT_CHECKSUM
dd mboot
dd code
dd bss
dd end
dd start
dd 1
dd 0
dd 0
dd 0
Code: Select all
mboot:
dd MBOOT_HEADER_MAGIC
dd MBOOT_HEADER_FLAGS
dd MBOOT_CHECKSUM
dd mboot
dd code
dd bss
dd end
dd start
dd 0
dd 0
dd 0
dd 0
I thought it was weird that it set the video mode but didn't provide mode info or even a memory map. I can't find anything in the multiboot spec that would explain it. Does anyone know why it would do this?
Thanks.