2 * Copyright (c) 1998 Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
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.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. The name of the author may not be used to endorse or promote
14 * products derived from this software without specific prior written
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * from: i386/include/pc vesa.h,v 1.1
33 #ifndef _MACHINE_PC_VESA_H
34 #define _MACHINE_PC_VESA_H
38 /* mandatory fields */
39 u_int8_t v_sig[4] __attribute__ ((packed)); /* VESA */
40 u_int16_t v_version __attribute__ ((packed)); /* ver in BCD */
41 u_int32_t v_oemstr __attribute__ ((packed)); /* OEM string */
42 u_int32_t v_flags __attribute__ ((packed)); /* flags */
44 #define V_NONVGA (1<<1)
46 u_int32_t v_modetable __attribute__ ((packed)); /* modes */
47 u_int16_t v_memsize __attribute__ ((packed)); /* in 64K */
49 u_int16_t v_revision __attribute__ ((packed)); /* software rev */
50 u_int32_t v_venderstr __attribute__ ((packed)); /* vender */
51 u_int32_t v_prodstr __attribute__ ((packed)); /* product name */
52 u_int32_t v_revstr __attribute__ ((packed)); /* product rev */
57 /* mandatory fields */
59 #define V_MODESUPP (1<<0) /* VESA mode attributes */
60 #define V_MODEOPTINFO (1<<1)
61 #define V_MODEBIOSOUT (1<<2)
62 #define V_MODECOLOR (1<<3)
63 #define V_MODEGRAPHICS (1<<4)
64 #define V_MODENONVGA (1<<5)
65 #define V_MODENONBANK (1<<6)
66 #define V_MODELFB (1<<7)
67 #define V_MODEVESA (1<<16) /* Private attributes */
70 #define V_WATTREXIST (1<<0)
71 #define V_WATTRREAD (1<<1)
72 #define V_WATTRWRITE (1<<2)
78 u_int16_t v_bpscanline;
79 /* fields optional for 1.0/1.1 implementations */
94 #define V_MMDIRCOLOR 6
99 /* fields for 1.2+ implementations */
100 u_int8_t v_redmasksize;
101 u_int8_t v_redfieldpos;
102 u_int8_t v_greenmasksize;
103 u_int8_t v_greenfieldpos;
104 u_int8_t v_bluemasksize;
105 u_int8_t v_bluefieldpos;
106 u_int8_t v_resmasksize;
107 u_int8_t v_resfieldpos;
108 u_int8_t v_dircolormode;
109 /* 2.0 implementations */
111 u_int32_t v_offscreen;
112 u_int8_t v_offscreensize;
117 #define VESA_MODE(x) ((x) >= M_VESA_BASE)
119 int vesa_load_ioctl(void);
120 int vesa_unload_ioctl(void);
128 #endif /* !_MACHINE_PC_VESA_H */