Using Grub2 with Multiboot2
Ok, so i've been tinkering with some assembly language and have successfully booted using grub2 with Multiboot and Multiboot2 specs; however, I have no clue if I am using MULTIBOOT_VIDEO_MODE flag correctly ... or the framebuffer tag for that matter. Supposedly the Multiboot2 header for an elf32 supports setting the video mode:
Code:
struct multiboot_header
{
/* Must be MULTIBOOT_MAGIC - see above. */
multiboot_uint32_t magic;
/* Feature flags. */
multiboot_uint32_t flags;
/* The above fields plus this one must equal 0 mod 2^32. */
multiboot_uint32_t checksum;
/* These are only valid if MULTIBOOT_VIDEO_MODE is set. */
multiboot_uint32_t mode_type;
multiboot_uint32_t width;
multiboot_uint32_t height;
multiboot_uint32_t depth;
};
Here is my Multiboot2 header
Code:
.set MB_FLAGS, MULTIBOOT_VIDEO_MODE
.align 8 /* Align 64 bits boundary. */
multiboot_header: /* Multiboot header. */
.long MULTIBOOT2_HEADER_MAGIC /* magic */
.long MB_FLAGS
.long -( MULTIBOOT2_HEADER_MAGIC + MB_FLAGS )
address_tag_end:
framebuffer_tag_start:
.long 1
.long 1024
.long 768
.long 16
framebuffer_tag_end:
.long 0 // To make it even
multiboot_header_end:
I didn't see any resulting video changes tho ....
... no surprises there ....