1 #ifndef _LINUX_KD_H
2 #define _LINUX_KD_H
3
4
5
6 #define SWAPMONO 0x4B00
7 #define SWAPCGA 0x4B01
8 #define SWAPEGA 0x4B02
9 #define SWAPVGA 0x4B03
10 #define CONS_CURRENT 0x4B04
11 #define MONO 0x01
12 #define CGA 0x02
13 #define EGA 0x03
14
15 #define SW_B40x25 0x4B05
16 #define SW_C40x25 0x4B06
17 #define SW_B80x25 0x4B07
18 #define SW_C80x25 0x4B08
19 #define SW_BG320 0x4B09
20 #define SW_CG320 0x4B0A
21 #define SW_BG640 0x4B0B
22 #define SW_CG320_D 0x4B0C
23 #define SW_CG640_E 0x4B0D
24 #define SW_EGAMONOAPA 0x4B0E
25 #define SW_ENH_MONOAPA2 0x4B0F
26 #define SW_CG640x350 0x4B10
27 #define SW_ENH_CG640 0x4B11
28 #define SW_EGAMONO80x25 0x4B12
29 #define SW_ENHB40x25 0x4B13
30 #define SW_ENHC40x25 0x4B14
31 #define SW_ENHB80x25 0x4B15
32 #define SW_ENHC80x25 0x4B16
33 #define SW_ENHB80x43 0x4B17
34 #define SW_ENHC80x43 0x4B18
35 #define SW_MCAMODE 0x4B19
36 #define SW_ATT640 0x4B1A
37
38
39 #define CONS_GET 0x4B1B
40 #define M_B40x25 0
41 #define M_C40x25 1
42 #define M_B80x25 2
43 #define M_C80x25 3
44 #define M_BG320 4
45 #define M_CG320 5
46 #define M_BG640 6
47 #define M_EGAMONO80x25 7
48 #define M_CG320_D 13
49 #define M_CG640_E 14
50 #define M_EFAMONOAPA 15
51 #define M_CG640x350 16
52 #define M_ENHMONOAPA2 17
53 #define M_ENH_CG640 18
54 #define M_ENH_B40x25 19
55 #define M_ENH_C40x25 20
56 #define M_ENH_B80x25 21
57 #define M_ENH_C80x25 22
58 #define M_ENH_B80x43 0x70
59 #define M_ENH_C80x43 0x71
60 #define M_MCA_MODE 0xff
61 #define MCA_GET 0x4B1C
62 #define CGA_GET 0x4B1D
63 #define EGA_GET 0x4B1E
64
65 #define MAPCONS 0x4B1F
66 #define MAPMONO 0x4B20
67 #define MAPCGA 0x4B21
68 #define MAPEGA 0x4B22
69 #define MAPVGA 0x4B23
70
71 struct port_io_struc {
72 char dir;
73 unsigned short port;
74 char data;
75 };
76 #define IN_ON_PORT 0x00
77 #define OUT_ON_PORT 0x01
78 struct port_io_arg {
79 struct port_io_struc args[4];
80 };
81 #define MCAIO 0x4B24
82 #define CGAIO 0x4B25
83 #define EGAIO 0x4B26
84 #define VGAIO 0x4B27
85
86 #define GIO_FONT8x8 0x4B28
87 #define PIO_FONT8x8 0x4B29
88 #define GIO_FONT8x14 0x4B2A
89 #define PIO_FONT8x14 0x4B2B
90 #define GIO_FONT8x16 0x4B2C
91 #define PIO_FONT8x16 0x4B2D
92
93 #define GIO_FONT 0x4B60
94 #define PIO_FONT 0x4B61
95
96 #define MKDIOADDR 32
97 struct kd_disparam {
98 long type;
99 char *addr;
100 ushort ioaddr[MKDIOADDR];
101 };
102 #define KDDISPTYPE 0x4B2E
103 #define KD_MONO 0x01
104 #define KD_HERCULES 0x02
105 #define KD_CGA 0x03
106 #define KD_EGA 0x04
107
108 #define KIOCSOUND 0x4B2F
109 #define KDMKTONE 0x4B30
110
111 #define KDGETLED 0x4B31
112 #define KDSETLED 0x4B32
113 #define LED_SCR 0x01
114 #define LED_CAP 0x04
115 #define LED_NUM 0x02
116
117 #define KDGKBTYPE 0x4B33
118 #define KB_84 0x01
119 #define KB_101 0x02
120 #define KB_OTHER 0x03
121
122 #define KDADDIO 0x4B34
123 #define KDDELIO 0x4B35
124 #define KDENABIO 0x4B36
125 #define KDDISABIO 0x4B37
126
127 struct kd_quemode {
128 int qsize;
129 int signo;
130 char *qaddr;
131 };
132 #define KDQUEMODE 0x4B38
133
134 #define KDSBORDER 0x4B39
135
136 #define KDSETMODE 0x4B3A
137 #define KD_TEXT 0x00
138 #define KD_GRAPHICS 0x01
139 #define KD_TEXT0 0x02
140 #define KD_TEXT1 0x03
141 #define KDGETMODE 0x4B3B
142
143 struct kd_memloc {
144 char *vaddr;
145 char *physaddr;
146 long length;
147 long ioflg;
148 };
149 #define KDMAPDISP 0x4B3C
150 #define KDUNMAPDISP 0x4B3D
151
152 #define KDVDCTYPE 0x4B3E
153
154 #define KIOCINFO 0x4B3F
155
156 typedef char scrnmap_t;
157 #define E_TABSZ 256
158 #define GIO_SCRNMAP 0x4B40
159 #define PIO_SCRNMAP 0x4B41
160
161 #define GIO_ATTR 0x4B42
162 #define GIO_COLOR 0x4B43
163
164 #define K_RAW 0x00
165 #define K_XLATE 0x01
166 #define K_MEDIUMRAW 0x02
167 #define KDGKBMODE 0x4B44
168 #define KDSKBMODE 0x4B45
169
170
171 #define K_METABIT 0x03
172 #define K_ESCPREFIX 0x04
173 #define KDGKBMETA 0x4B62
174 #define KDSKBMETA 0x4B63
175
176 struct kbentry {
177 u_char kb_table;
178 u_char kb_index;
179 u_short kb_value;
180 };
181 #define K_NORMTAB 0x00
182 #define K_SHIFTTAB 0x01
183 #define K_ALTTAB 0x02
184 #define K_ALTSHIFTTAB 0x03
185 #define K_SRQTAB 0x04
186 #define KDGKBENT 0x4B46
187 #define KDSKBENT 0x4B47
188
189 struct kbsentry {
190 u_char kb_func;
191 u_char kb_string[512];
192 };
193 #define KDGKBSENT 0x4B48
194 #define KDSKBSENT 0x4B49
195
196 struct kbdiacr {
197 u_char diacr, base, result;
198 };
199 struct kbdiacrs {
200 unsigned int kb_cnt;
201 struct kbdiacr kbdiacr[256];
202 };
203 #define KDGKBDIACR 0x4B4A
204 #define KDSKBDIACR 0x4B4B
205
206
207
208
209 #endif