NetBSD Problem Report #52366

From www@NetBSD.org  Tue Jul  4 08:37:34 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 00FEC7A1FA
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  4 Jul 2017 08:37:34 +0000 (UTC)
Message-Id: <20170704083732.E35A67A28A@mollari.NetBSD.org>
Date: Tue,  4 Jul 2017 08:37:32 +0000 (UTC)
From: rlfnb@rlfnb.de
Reply-To: rlfnb@rlfnb.de
To: gnats-bugs@NetBSD.org
Subject: adding framebuffer info to multiboot.h
X-Send-Pr-Version: www-1.0

>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;
+       };
+   };
 };

 /* --------------------------------------------------------------------- */

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.