On Mon, Aug 17, 2009 at 9:22 PM, Vladimir 'phcoder' Serbinenko<phco...@gmail.com> wrote: > On Sun, Aug 16, 2009 at 12:03 PM, Bean<bean12...@gmail.com> wrote: >> Hi, >> >> This patch adds fb device for i386-ieee1275 platform, the usage is >> quite similar to efi fb. >> >> BTW, openfirmware platforms reserve too little memory so that gfxterm >> can't start, I increase the heap size to 8m for now. >> > >>static grub_uint32_t fb_addr; >>static grub_uint32_t fb_width; >>static grub_uint32_t fb_height; >>static grub_uint32_t fb_pitch; > These values are a duplicate of values found in framebuffer variable
Hi, These are the global settings detected in check_device, the variables in framebuffer get zero out in init function. > >>static grub_err_t >>grub_video_ofw_init (void) >>{ >> check_device (); > check_device is already called on module init >>static grub_err_t >>grub_video_ofw_fini (void) >>{ >> return grub_video_fb_fini (); >>} > You can just set .fini = grub_video_fb_fini, > Ok. >> if (((! width) || (width == fb_width)) && >> ((! height) || (height == fb_height)) && >> ((! depth) || (depth == 16))) >> { > Does OLPC support only one resolution? Is it the same for qemu with > ofw? Or coreboot+ofw? I suppose it supports other modes, as there are suspicious words like 640x480 in the display device. But as I don't find docs on accessing them, it's basically guess work and may not be portable. >> framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_RGB; >> framebuffer.mode_info.bpp = 16; >> framebuffer.mode_info.bytes_per_pixel = 2; >> framebuffer.mode_info.number_of_colors = 256; /* TODO: fix me. */ >> framebuffer.mode_info.red_mask_size = 5; >> framebuffer.mode_info.red_field_pos = 11; >> framebuffer.mode_info.green_mask_size = 6; >> framebuffer.mode_info.green_field_pos = 5; >> framebuffer.mode_info.blue_mask_size = 5; >> framebuffer.mode_info.blue_field_pos = 0; > Can this info be retrieved from OFW instead of being hardcoded? There seems to be explicit information on this, but there are huge number of words in the display device, it may be be hidden somewhere. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/ _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel