1#ifndef _UAPI_LINUX_KD_H
2#define _UAPI_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 K_OFF 0x04
85#define KDGKBMODE 0x4B44
86#define KDSKBMODE 0x4B45
87
88#define K_METABIT 0x03
89#define K_ESCPREFIX 0x04
90#define KDGKBMETA 0x4B62
91#define KDSKBMETA 0x4B63
92
93#define K_SCROLLLOCK 0x01
94#define K_NUMLOCK 0x02
95#define K_CAPSLOCK 0x04
96#define KDGKBLED 0x4B64
97#define KDSKBLED 0x4B65
98
99struct kbentry {
100 unsigned char kb_table;
101 unsigned char kb_index;
102 unsigned short kb_value;
103};
104#define K_NORMTAB 0x00
105#define K_SHIFTTAB 0x01
106#define K_ALTTAB 0x02
107#define K_ALTSHIFTTAB 0x03
108
109#define KDGKBENT 0x4B46
110#define KDSKBENT 0x4B47
111
112struct kbsentry {
113 unsigned char kb_func;
114 unsigned char kb_string[512];
115};
116#define KDGKBSENT 0x4B48
117#define KDSKBSENT 0x4B49
118
119struct kbdiacr {
120 unsigned char diacr, base, result;
121};
122struct kbdiacrs {
123 unsigned int kb_cnt;
124 struct kbdiacr kbdiacr[256];
125};
126#define KDGKBDIACR 0x4B4A
127#define KDSKBDIACR 0x4B4B
128
129struct kbdiacruc {
130 unsigned int diacr, base, result;
131};
132struct kbdiacrsuc {
133 unsigned int kb_cnt;
134 struct kbdiacruc kbdiacruc[256];
135};
136#define KDGKBDIACRUC 0x4BFA
137#define KDSKBDIACRUC 0x4BFB
138
139struct kbkeycode {
140 unsigned int scancode, keycode;
141};
142#define KDGETKEYCODE 0x4B4C
143#define KDSETKEYCODE 0x4B4D
144
145#define KDSIGACCEPT 0x4B4E
146
147struct kbd_repeat {
148 int delay;
149 int period;
150
151};
152
153#define KDKBDREP 0x4B52
154
155
156#define KDFONTOP 0x4B72
157
158struct console_font_op {
159 unsigned int op;
160 unsigned int flags;
161 unsigned int width, height;
162 unsigned int charcount;
163 unsigned char __user *data;
164};
165
166struct console_font {
167 unsigned int width, height;
168 unsigned int charcount;
169 unsigned char *data;
170};
171
172#define KD_FONT_OP_SET 0
173#define KD_FONT_OP_GET 1
174#define KD_FONT_OP_SET_DEFAULT 2
175#define KD_FONT_OP_COPY 3
176
177#define KD_FONT_FLAG_DONT_RECALC 1
178
179
180
181
182
183#endif
184