Bona Fide OS Developer
View unanswered posts | View active topics It is currently Tue Mar 19, 2024 3:51 am



Post new topic Reply to topic  [ 1 post ] 
 Using Grub2 with Multiboot2 
Author Message

Joined: Wed Sep 01, 2010 4:15 pm
Posts: 2
Post 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 .... :o ... no surprises there ....


Wed Sep 01, 2010 4:24 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.