NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/52366: adding framebuffer info to multiboot.h



>Number:         52366
>Category:       misc
>Synopsis:       adding framebuffer info to multiboot.h
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 04 08:40:00 +0000 2017
>Originator:     rlfnb
>Release:        7-1 and earlier
>Organization:
appliedappliance
>Environment:
each architecture using the multiboot.h 
>Description:
Multiboot added video information for VBE and framebuffer (http://git.savannah.gnu.org/cgit/grub.git/tree/doc/multiboot.h?h=multiboot). Grub is filling these values but I cannot get them in netbsd as the multiboot_info struct was not updated to reflect the change.

Maybe, it would be an idea to import the whole multiboot.h header and remove the netbsd specific file, too?
>How-To-Repeat:
n/a
>Fix:
$ cvs diff -u ./sys/arch/i386/include/multiboot.h
Index: ./sys/arch/i386/include/multiboot.h
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/include/multiboot.h,v
retrieving revision 1.8
diff -u -r1.8 multiboot.h
--- ./sys/arch/i386/include/multiboot.h 22 Feb 2009 18:05:42 -0000  1.8
+++ ./sys/arch/i386/include/multiboot.h 4 Jul 2017 07:58:01 -0000
@@ -86,6 +86,7 @@
 #define MULTIBOOT_INFO_HAS_LOADER_NAME 0x00000200
 #define MULTIBOOT_INFO_HAS_APM_TABLE   0x00000400
 #define MULTIBOOT_INFO_HAS_VBE     0x00000800
+#define MULTIBOOT_INFO_HAS_FRAMEBUFFER 0x00001000
 
 #if !defined(_LOCORE)
 struct multiboot_info {
@@ -132,11 +133,40 @@
    void *      unused_mi_apm_table;
 
    /* Valid if mi_flags sets MULTIBOOT_INFO_HAS_VBE. */
-   void *      unused_mi_vbe_control_info;
-   void *      unused_mi_vbe_mode_info;
-   paddr_t     unused_mi_vbe_interface_seg;
-   paddr_t     unused_mi_vbe_interface_off;
-   uint32_t    unused_mi_vbe_interface_len;
+   uint32_t    vbe_control_info;
+   uint32_t    vbe_mode_info;
+   uint16_t    vbe_mode;
+   uint16_t    vbe_interface_seg;
+   uint16_t    vbe_interface_off;
+   uint16_t    vbe_interface_len;
+
+   /* Valid if mi_flags sets MULTIBOOT_INFO_HAS_FRAMEBUFFER. */
+   uint64_t    framebuffer_addr;
+   uint32_t    framebuffer_pitch;
+   uint32_t    framebuffer_width;
+   uint32_t    framebuffer_height;
+   uint8_t     framebuffer_bpp;
+#define MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED 0
+#define MULTIBOOT_FRAMEBUFFER_TYPE_RGB     1
+#define MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT    2
+   uint8_t     framebuffer_type;
+   union
+   {
+       struct
+       {
+           uint32_t framebuffer_palette_addr;
+           uint16_t framebuffer_palette_num_colors;
+       };
+       struct
+       {
+           uint8_t framebuffer_red_field_position;
+           uint8_t framebuffer_red_mask_size;
+           uint8_t framebuffer_green_field_position;
+           uint8_t framebuffer_green_mask_size;
+           uint8_t framebuffer_blue_field_position;
+           uint8_t framebuffer_blue_mask_size;
+       };
+   };
 };
 
 /* --------------------------------------------------------------------- */



Home | Main Index | Thread Index | Old Index