1#ifndef _LINUX_KD_H
2#define _LINUX_KD_H
3#include <linux/types.h>
4#include <linux/compiler.h>
5
6
7
8#define GIO_FONT 0x4B60
9#define PIO_FONT 0x4B61
10
11#define GIO_FONTX 0x4B6B
12#define PIO_FONTX 0x4B6C
13struct consolefontdesc {
14 unsigned short charcount;
15 unsigned short charheight;
16 char __user *chardata;
17};
18
19#define PIO_FONTRESET 0x4B6D
20
21#define GIO_CMAP 0x4B70
22#define PIO_CMAP 0x4B71
23
24#define KIOCSOUND 0x4B2F
25#define KDMKTONE 0x4B30
26
27#define KDGETLED 0x4B31
28#define KDSETLED 0x4B32
29#define LED_SCR 0x01
30#define LED_NUM 0x02
31#define LED_CAP 0x04
32
33#define KDGKBTYPE 0x4B33
34#define KB_84 0x01
35#define KB_101 0x02
36#define KB_OTHER 0x03
37
38#define KDADDIO 0x4B34
39#define KDDELIO 0x4B35
40#define KDENABIO 0x4B36
41#define KDDISABIO 0x4B37
42
43#define KDSETMODE 0x4B3A
44#define KD_TEXT 0x00
45#define KD_GRAPHICS 0x01
46#define KD_TEXT0 0x02
47#define KD_TEXT1 0x03
48#define KDGETMODE 0x4B3B
49
50#define KDMAPDISP 0x4B3C
51#define KDUNMAPDISP 0x4B3D
52
53typedef char scrnmap_t;
54#define E_TABSZ 256
55#define GIO_SCRNMAP 0x4B40
56#define PIO_SCRNMAP 0x4B41
57#define GIO_UNISCRNMAP 0x4B69
58#define PIO_UNISCRNMAP 0x4B6A
59
60#define GIO_UNIMAP 0x4B66
61struct unipair {
62 unsigned short unicode;
63 unsigned short fontpos;
64};
65struct unimapdesc {
66 unsigned short entry_ct;
67 struct unipair __user *entries;
68};
69#define PIO_UNIMAP 0x4B67
70#define PIO_UNIMAPCLR 0x4B68
71struct unimapinit {
72 unsigned short advised_hashsize;
73 unsigned short advised_hashstep;
74 unsigned short advised_hashlevel;
75};
76
77#define UNI_DIRECT_BASE 0xF000
78#define UNI_DIRECT_MASK 0x01FF
79
80#define K_RAW 0x00
81#define K_XLATE 0x01
82#define K_MEDIUMRAW 0x02
83#define K_UNICODE 0x03
84#define KDGKBMODE 0x4B44
85#define KDSKBMODE 0x4B45
86
87#define K_METABIT 0x03
88#define K_ESCPREFIX 0x04
89#define KDGKBMETA 0x4B62
90#define KDSKBMETA 0x4B63
91
92#define K_SCROLLLOCK 0x01
93#define K_NUMLOCK 0x02
94#define K_CAPSLOCK 0x04
95#define KDGKBLED 0x4B64
96#define KDSKBLED 0x4B65
97
98struct kbentry {
99 unsigned char kb_table;
100 unsigned char kb_index;
101 unsigned short kb_value;
102};
103#define K_NORMTAB 0x00
104#define K_SHIFTTAB 0x01
105#define K_ALTTAB 0x02
106#define K_ALTSHIFTTAB 0x03
107
108#define KDGKBENT 0x4B46
109#define KDSKBENT 0x4B47
110
111struct kbsentry {
112 unsigned char kb_func;
113 unsigned char kb_string[512];
114};
115#define KDGKBSENT 0x4B48
116#define KDSKBSENT 0x4B49
117
118struct kbdiacr {
119 unsigned char diacr, base, result;
120};
121struct kbdiacrs {
122 unsigned int kb_cnt;
123 struct kbdiacr kbdiacr[256];
124};
125#define KDGKBDIACR 0x4B4A
126#define KDSKBDIACR 0x4B4B
127
128struct kbkeycode {
129 unsigned int scancode, keycode;
130};
131#define KDGETKEYCODE 0x4B4C
132#define KDSETKEYCODE 0x4B4D
133
134#define KDSIGACCEPT 0x4B4E
135
136struct kbd_repeat {
137 int delay;
138 int period;
139
140};
141
142#define KDKBDREP 0x4B52
143
144
145#define KDFONTOP 0x4B72
146
147struct console_font_op {
148 unsigned int op;
149 unsigned int flags;
150 unsigned int width, height;
151 unsigned int charcount;
152 unsigned char __user *data;
153};
154
155struct console_font {
156 unsigned int width, height;
157 unsigned int charcount;
158 unsigned char *data;
159};
160
161#define KD_FONT_OP_SET 0
162#define KD_FONT_OP_GET 1
163#define KD_FONT_OP_SET_DEFAULT 2
164#define KD_FONT_OP_COPY 3
165
166#define KD_FONT_FLAG_DONT_RECALC 1
167#ifdef __KERNEL__
168#define KD_FONT_FLAG_OLD 0x80000000
169#endif
170
171
172
173
174
175#endif
176