i386 removal, part 11/x: Remove wrong machine/ setup in the boot Makefiles.
[dragonfly.git] / sys / platform / pc32 / include / pc / vesa.h
1 /*-
2  * Copyright (c) 1998 Michael Smith and Kazutaka YOKOTA
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
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.
14  *
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.
25  *
26  * $FreeBSD: src/sys/i386/include/pc/vesa.h,v 1.7 1999/12/29 04:33:12 peter Exp $
27  */
28
29 #ifndef _MACHINE_PC_VESA_H
30 #define _MACHINE_PC_VESA_H
31
32 struct vesa_info {
33         /* mandatory fields */
34         uint8_t         v_sig[4];       /* VESA */
35         uint16_t        v_version;      /* ver in BCD */
36         uint32_t        v_oemstr;       /* OEM string */
37         uint32_t        v_flags;        /* flags */
38 #define V_DAC8          (1<<0)
39 #define V_NONVGA        (1<<1)
40 #define V_SNOW          (1<<2)
41         uint32_t        v_modetable;    /* modes */
42         uint16_t        v_memsize;      /* in 64K */
43         /* 2.0 */
44         uint16_t        v_revision;     /* software rev */
45         uint32_t        v_vendorstr;    /* vendor */
46         uint32_t        v_prodstr;      /* product name */
47         uint32_t        v_revstr;       /* product rev */
48 } __packed;
49
50 struct vesa_mode  {
51         /* mandatory fields */
52         uint16_t        v_modeattr;
53 #define V_MODESUPP      (1<<0)  /* VESA mode attributes */
54 #define V_MODEBIOSOUT   (1<<2)
55 #define V_MODECOLOR     (1<<3)
56 #define V_MODEGRAPHICS  (1<<4)
57 #define V_MODENONVGA    (1<<5)
58 #define V_MODENONBANK   (1<<6)
59 #define V_MODELFB       (1<<7)
60 #define V_MODEVESA      (1<<16) /* Private attributes */
61         uint8_t         v_waattr;
62         uint8_t         v_wbattr;
63 #define V_WATTREXIST    (1<<0)
64 #define V_WATTRREAD     (1<<1)
65 #define V_WATTRWRITE    (1<<2)
66         uint16_t        v_wgran;
67         uint16_t        v_wsize;
68         uint16_t        v_waseg;
69         uint16_t        v_wbseg;
70         uint32_t        v_posfunc;
71         uint16_t        v_bpscanline;
72         /* fields optional for 1.0/1.1 implementations */
73         uint16_t        v_width;
74         uint16_t        v_height;
75         uint8_t         v_cwidth;
76         uint8_t         v_cheight;
77         uint8_t         v_planes;
78         uint8_t         v_bpp;
79         uint8_t         v_banks;
80         uint8_t         v_memmodel;
81 #define V_MMTEXT        0
82 #define V_MMCGA         1
83 #define V_MMHGC         2
84 #define V_MMEGA         3
85 #define V_MMPACKED      4
86 #define V_MMSEQU256     5
87 #define V_MMDIRCOLOR    6
88 #define V_MMYUV         7
89         uint8_t         v_banksize;
90         uint8_t         v_ipages;
91         uint8_t         v_reserved0;
92         /* fields for 1.2+ implementations */
93         uint8_t         v_redmasksize;
94         uint8_t         v_redfieldpos;
95         uint8_t         v_greenmasksize;
96         uint8_t         v_greenfieldpos;
97         uint8_t         v_bluemasksize;
98         uint8_t         v_bluefieldpos;
99         uint8_t         v_resmasksize;
100         uint8_t         v_resfieldpos;
101         uint8_t         v_dircolormode;
102         /* 2.0 implementations */
103         uint32_t        v_lfb;
104         uint32_t        v_offscreen;
105         uint16_t        v_offscreensize;
106 };
107
108 #ifdef _KERNEL
109
110 #define VESA_MODE(x)    ((x) >= M_VESA_BASE)
111
112 #endif
113
114 #endif /* !_MACHINE_PC_VESA_H */