Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/include Framebuffer definitions for multiboot ...



details:   https://anonhg.NetBSD.org/src/rev/925aeed8f846
branches:  trunk
changeset: 445810:925aeed8f846
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Tue Nov 13 11:01:54 2018 +0000

description:
Framebuffer definitions for multiboot protocol.

diffstat:

 sys/arch/i386/include/multiboot.h |  29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diffs (50 lines):

diff -r d6e9aa688af0 -r 925aeed8f846 sys/arch/i386/include/multiboot.h
--- a/sys/arch/i386/include/multiboot.h Tue Nov 13 11:00:55 2018 +0000
+++ b/sys/arch/i386/include/multiboot.h Tue Nov 13 11:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: multiboot.h,v 1.9 2018/04/13 01:49:47 khorben Exp $    */
+/*     $NetBSD: multiboot.h,v 1.10 2018/11/13 11:01:54 mlelstv Exp $   */
 
 /*-
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -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 {
@@ -138,6 +139,32 @@
        uint16_t        unused_mi_vbe_interface_seg;
        uint16_t        unused_mi_vbe_interface_off;
        uint16_t        unused_mi_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