2 * Copyright (c) 1998 Michael Smith and Kazutaka YOKOTA
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer as
10 * the first lines of this file unmodified.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * $FreeBSD: src/sys/i386/include/pc/vesa.h,v 1.7 1999/12/29 04:33:12 peter Exp $
27 * $DragonFly: src/sys/i386/include/pc/Attic/vesa.h,v 1.2 2003/06/17 04:28:36 dillon Exp $
30 #ifndef _MACHINE_PC_VESA_H
31 #define _MACHINE_PC_VESA_H
35 /* mandatory fields */
36 u_int8_t v_sig[4] __attribute__ ((packed)); /* VESA */
37 u_int16_t v_version __attribute__ ((packed)); /* ver in BCD */
38 u_int32_t v_oemstr __attribute__ ((packed)); /* OEM string */
39 u_int32_t v_flags __attribute__ ((packed)); /* flags */
41 #define V_NONVGA (1<<1)
43 u_int32_t v_modetable __attribute__ ((packed)); /* modes */
44 u_int16_t v_memsize __attribute__ ((packed)); /* in 64K */
46 u_int16_t v_revision __attribute__ ((packed)); /* software rev */
47 u_int32_t v_venderstr __attribute__ ((packed)); /* vender */
48 u_int32_t v_prodstr __attribute__ ((packed)); /* product name */
49 u_int32_t v_revstr __attribute__ ((packed)); /* product rev */
54 /* mandatory fields */
56 #define V_MODESUPP (1<<0) /* VESA mode attributes */
57 #define V_MODEOPTINFO (1<<1)
58 #define V_MODEBIOSOUT (1<<2)
59 #define V_MODECOLOR (1<<3)
60 #define V_MODEGRAPHICS (1<<4)
61 #define V_MODENONVGA (1<<5)
62 #define V_MODENONBANK (1<<6)
63 #define V_MODELFB (1<<7)
64 #define V_MODEVESA (1<<16) /* Private attributes */
67 #define V_WATTREXIST (1<<0)
68 #define V_WATTRREAD (1<<1)
69 #define V_WATTRWRITE (1<<2)
75 u_int16_t v_bpscanline;
76 /* fields optional for 1.0/1.1 implementations */
91 #define V_MMDIRCOLOR 6
96 /* fields for 1.2+ implementations */
97 u_int8_t v_redmasksize;
98 u_int8_t v_redfieldpos;
99 u_int8_t v_greenmasksize;
100 u_int8_t v_greenfieldpos;
101 u_int8_t v_bluemasksize;
102 u_int8_t v_bluefieldpos;
103 u_int8_t v_resmasksize;
104 u_int8_t v_resfieldpos;
105 u_int8_t v_dircolormode;
106 /* 2.0 implementations */
108 u_int32_t v_offscreen;
109 u_int16_t v_offscreensize;
114 #define VESA_MODE(x) ((x) >= M_VESA_BASE)
116 int vesa_load_ioctl(void);
117 int vesa_unload_ioctl(void);
121 #endif /* !_MACHINE_PC_VESA_H */