Why does mboot.c32 not allocate a framebuffer during boot?

76 views Asked by At

When booting with the multiboot standard you can request the multiboot-compliant boot loader to allocate a framebuffer to write to using the second bit in the multiboot header.

However, when I do this and try to boot via cdrom with mboot.c32 using QEMU, QEMU switches into the graphics mode as if the frame buffer was there, but when I check the flags on the returned multiboot struct the 13th bit is not set, and no framebuffer info was returned.

I've tried setting different values for width, height, bit depth to see if that changes anything, but that didn't help.

Here's my multiboot header (this is put at the very front in the loader script):

".section .multiboot\n"
".code32\n"

/* Multiboot 1 header */
".align 4\n"
".long 0x1badb002\n"
/* Aligned on 4KiB pages + information on memory + graphics mode*/
".long 7\n"
".long -0x1badb002-7\n"
/* Flags */
".long 0\n"
".long 0\n"
".long 0\n"
".long 0\n"
".long 0\n"
/* Graphics mode enabled */
".long 0\n"
/* Width, height, bit depth */
".long 0\n"
".long 0\n"
".long 0\n"

I then check for the 0x2badb002 value in eax, save the multiboot struct pointer in a variable and call a function that checks the validity of the framebuffer. This is where I realize that the framebuffer info flag bit is not set. Am I missing something from the specification? Or does mboot.c32 work different?

0

There are 0 answers