• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _UAPI_LINUX_KD_H
20 #define _UAPI_LINUX_KD_H
21 #include <linux/types.h>
22 #include <linux/compiler.h>
23 #define GIO_FONT 0x4B60
24 #define PIO_FONT 0x4B61
25 #define GIO_FONTX 0x4B6B
26 #define PIO_FONTX 0x4B6C
27 struct consolefontdesc {
28   unsigned short charcount;
29   unsigned short charheight;
30   char __user * chardata;
31 };
32 #define PIO_FONTRESET 0x4B6D
33 #define GIO_CMAP 0x4B70
34 #define PIO_CMAP 0x4B71
35 #define KIOCSOUND 0x4B2F
36 #define KDMKTONE 0x4B30
37 #define KDGETLED 0x4B31
38 #define KDSETLED 0x4B32
39 #define LED_SCR 0x01
40 #define LED_NUM 0x02
41 #define LED_CAP 0x04
42 #define KDGKBTYPE 0x4B33
43 #define KB_84 0x01
44 #define KB_101 0x02
45 #define KB_OTHER 0x03
46 #define KDADDIO 0x4B34
47 #define KDDELIO 0x4B35
48 #define KDENABIO 0x4B36
49 #define KDDISABIO 0x4B37
50 #define KDSETMODE 0x4B3A
51 #define KD_TEXT 0x00
52 #define KD_GRAPHICS 0x01
53 #define KD_TEXT0 0x02
54 #define KD_TEXT1 0x03
55 #define KDGETMODE 0x4B3B
56 #define KDMAPDISP 0x4B3C
57 #define KDUNMAPDISP 0x4B3D
58 typedef char scrnmap_t;
59 #define E_TABSZ 256
60 #define GIO_SCRNMAP 0x4B40
61 #define PIO_SCRNMAP 0x4B41
62 #define GIO_UNISCRNMAP 0x4B69
63 #define PIO_UNISCRNMAP 0x4B6A
64 #define GIO_UNIMAP 0x4B66
65 struct unipair {
66   unsigned short unicode;
67   unsigned short fontpos;
68 };
69 struct unimapdesc {
70   unsigned short entry_ct;
71   struct unipair __user * entries;
72 };
73 #define PIO_UNIMAP 0x4B67
74 #define PIO_UNIMAPCLR 0x4B68
75 struct unimapinit {
76   unsigned short advised_hashsize;
77   unsigned short advised_hashstep;
78   unsigned short advised_hashlevel;
79 };
80 #define UNI_DIRECT_BASE 0xF000
81 #define UNI_DIRECT_MASK 0x01FF
82 #define K_RAW 0x00
83 #define K_XLATE 0x01
84 #define K_MEDIUMRAW 0x02
85 #define K_UNICODE 0x03
86 #define K_OFF 0x04
87 #define KDGKBMODE 0x4B44
88 #define KDSKBMODE 0x4B45
89 #define K_METABIT 0x03
90 #define K_ESCPREFIX 0x04
91 #define KDGKBMETA 0x4B62
92 #define KDSKBMETA 0x4B63
93 #define K_SCROLLLOCK 0x01
94 #define K_NUMLOCK 0x02
95 #define K_CAPSLOCK 0x04
96 #define KDGKBLED 0x4B64
97 #define KDSKBLED 0x4B65
98 struct 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 #define KDGKBENT 0x4B46
108 #define KDSKBENT 0x4B47
109 struct kbsentry {
110   unsigned char kb_func;
111   unsigned char kb_string[512];
112 };
113 #define KDGKBSENT 0x4B48
114 #define KDSKBSENT 0x4B49
115 struct kbdiacr {
116   unsigned char diacr, base, result;
117 };
118 struct kbdiacrs {
119   unsigned int kb_cnt;
120   struct kbdiacr kbdiacr[256];
121 };
122 #define KDGKBDIACR 0x4B4A
123 #define KDSKBDIACR 0x4B4B
124 struct kbdiacruc {
125   unsigned int diacr, base, result;
126 };
127 struct kbdiacrsuc {
128   unsigned int kb_cnt;
129   struct kbdiacruc kbdiacruc[256];
130 };
131 #define KDGKBDIACRUC 0x4BFA
132 #define KDSKBDIACRUC 0x4BFB
133 struct kbkeycode {
134   unsigned int scancode, keycode;
135 };
136 #define KDGETKEYCODE 0x4B4C
137 #define KDSETKEYCODE 0x4B4D
138 #define KDSIGACCEPT 0x4B4E
139 struct kbd_repeat {
140   int delay;
141   int period;
142 };
143 #define KDKBDREP 0x4B52
144 #define KDFONTOP 0x4B72
145 struct console_font_op {
146   unsigned int op;
147   unsigned int flags;
148   unsigned int width, height;
149   unsigned int charcount;
150   unsigned char __user * data;
151 };
152 struct console_font {
153   unsigned int width, height;
154   unsigned int charcount;
155   unsigned char * data;
156 };
157 #define KD_FONT_OP_SET 0
158 #define KD_FONT_OP_GET 1
159 #define KD_FONT_OP_SET_DEFAULT 2
160 #define KD_FONT_OP_COPY 3
161 #define KD_FONT_FLAG_DONT_RECALC 1
162 #endif
163