blob: 2385037fe256327d4994b7d54c8842ffb9b7cf90 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define GIO_FONT 0x4B60
24#define PIO_FONT 0x4B61
25#define GIO_FONTX 0x4B6B
26#define PIO_FONTX 0x4B6C
Ben Cheng655a7c02013-10-16 16:09:24 -070027struct consolefontdesc {
Tao Baod7db5942015-01-28 10:07:51 -080028 unsigned short charcount;
29 unsigned short charheight;
30 char __user * chardata;
Ben Cheng655a7c02013-10-16 16:09:24 -070031};
32#define PIO_FONTRESET 0x4B6D
33#define GIO_CMAP 0x4B70
34#define PIO_CMAP 0x4B71
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define KIOCSOUND 0x4B2F
36#define KDMKTONE 0x4B30
37#define KDGETLED 0x4B31
38#define KDSETLED 0x4B32
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define LED_SCR 0x01
40#define LED_NUM 0x02
41#define LED_CAP 0x04
42#define KDGKBTYPE 0x4B33
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define KB_84 0x01
44#define KB_101 0x02
45#define KB_OTHER 0x03
46#define KDADDIO 0x4B34
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define KDDELIO 0x4B35
48#define KDENABIO 0x4B36
49#define KDDISABIO 0x4B37
50#define KDSETMODE 0x4B3A
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define KD_TEXT 0x00
52#define KD_GRAPHICS 0x01
53#define KD_TEXT0 0x02
54#define KD_TEXT1 0x03
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define KDGETMODE 0x4B3B
56#define KDMAPDISP 0x4B3C
57#define KDUNMAPDISP 0x4B3D
58typedef char scrnmap_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define E_TABSZ 256
60#define GIO_SCRNMAP 0x4B40
61#define PIO_SCRNMAP 0x4B41
62#define GIO_UNISCRNMAP 0x4B69
Ben Cheng655a7c02013-10-16 16:09:24 -070063#define PIO_UNISCRNMAP 0x4B6A
64#define GIO_UNIMAP 0x4B66
65struct unipair {
Tao Baod7db5942015-01-28 10:07:51 -080066 unsigned short unicode;
Tao Baod7db5942015-01-28 10:07:51 -080067 unsigned short fontpos;
Ben Cheng655a7c02013-10-16 16:09:24 -070068};
69struct unimapdesc {
Tao Baod7db5942015-01-28 10:07:51 -080070 unsigned short entry_ct;
Tao Baod7db5942015-01-28 10:07:51 -080071 struct unipair __user * entries;
Ben Cheng655a7c02013-10-16 16:09:24 -070072};
73#define PIO_UNIMAP 0x4B67
74#define PIO_UNIMAPCLR 0x4B68
Ben Cheng655a7c02013-10-16 16:09:24 -070075struct unimapinit {
Tao Baod7db5942015-01-28 10:07:51 -080076 unsigned short advised_hashsize;
77 unsigned short advised_hashstep;
78 unsigned short advised_hashlevel;
Ben Cheng655a7c02013-10-16 16:09:24 -070079};
80#define UNI_DIRECT_BASE 0xF000
81#define UNI_DIRECT_MASK 0x01FF
82#define K_RAW 0x00
Ben Cheng655a7c02013-10-16 16:09:24 -070083#define K_XLATE 0x01
84#define K_MEDIUMRAW 0x02
85#define K_UNICODE 0x03
86#define K_OFF 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070087#define KDGKBMODE 0x4B44
88#define KDSKBMODE 0x4B45
89#define K_METABIT 0x03
90#define K_ESCPREFIX 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070091#define KDGKBMETA 0x4B62
92#define KDSKBMETA 0x4B63
93#define K_SCROLLLOCK 0x01
94#define K_NUMLOCK 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -070095#define K_CAPSLOCK 0x04
96#define KDGKBLED 0x4B64
97#define KDSKBLED 0x4B65
98struct kbentry {
Tao Baod7db5942015-01-28 10:07:51 -080099 unsigned char kb_table;
100 unsigned char kb_index;
101 unsigned short kb_value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700102};
Ben Cheng655a7c02013-10-16 16:09:24 -0700103#define K_NORMTAB 0x00
104#define K_SHIFTTAB 0x01
105#define K_ALTTAB 0x02
106#define K_ALTSHIFTTAB 0x03
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define KDGKBENT 0x4B46
108#define KDSKBENT 0x4B47
109struct kbsentry {
Tao Baod7db5942015-01-28 10:07:51 -0800110 unsigned char kb_func;
Tao Baod7db5942015-01-28 10:07:51 -0800111 unsigned char kb_string[512];
Ben Cheng655a7c02013-10-16 16:09:24 -0700112};
113#define KDGKBSENT 0x4B48
114#define KDSKBSENT 0x4B49
Ben Cheng655a7c02013-10-16 16:09:24 -0700115struct kbdiacr {
Tao Baod7db5942015-01-28 10:07:51 -0800116 unsigned char diacr, base, result;
Ben Cheng655a7c02013-10-16 16:09:24 -0700117};
118struct kbdiacrs {
Tao Baod7db5942015-01-28 10:07:51 -0800119 unsigned int kb_cnt;
120 struct kbdiacr kbdiacr[256];
Ben Cheng655a7c02013-10-16 16:09:24 -0700121};
122#define KDGKBDIACR 0x4B4A
Ben Cheng655a7c02013-10-16 16:09:24 -0700123#define KDSKBDIACR 0x4B4B
124struct kbdiacruc {
Tao Baod7db5942015-01-28 10:07:51 -0800125 unsigned int diacr, base, result;
Ben Cheng655a7c02013-10-16 16:09:24 -0700126};
Ben Cheng655a7c02013-10-16 16:09:24 -0700127struct kbdiacrsuc {
Tao Baod7db5942015-01-28 10:07:51 -0800128 unsigned int kb_cnt;
129 struct kbdiacruc kbdiacruc[256];
Ben Cheng655a7c02013-10-16 16:09:24 -0700130};
Ben Cheng655a7c02013-10-16 16:09:24 -0700131#define KDGKBDIACRUC 0x4BFA
132#define KDSKBDIACRUC 0x4BFB
133struct kbkeycode {
Tao Baod7db5942015-01-28 10:07:51 -0800134 unsigned int scancode, keycode;
Ben Cheng655a7c02013-10-16 16:09:24 -0700135};
136#define KDGETKEYCODE 0x4B4C
137#define KDSETKEYCODE 0x4B4D
138#define KDSIGACCEPT 0x4B4E
Ben Cheng655a7c02013-10-16 16:09:24 -0700139struct kbd_repeat {
Tao Baod7db5942015-01-28 10:07:51 -0800140 int delay;
141 int period;
Ben Cheng655a7c02013-10-16 16:09:24 -0700142};
Ben Cheng655a7c02013-10-16 16:09:24 -0700143#define KDKBDREP 0x4B52
144#define KDFONTOP 0x4B72
145struct console_font_op {
Tao Baod7db5942015-01-28 10:07:51 -0800146 unsigned int op;
Tao Baod7db5942015-01-28 10:07:51 -0800147 unsigned int flags;
148 unsigned int width, height;
149 unsigned int charcount;
150 unsigned char __user * data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700151};
152struct console_font {
Tao Baod7db5942015-01-28 10:07:51 -0800153 unsigned int width, height;
154 unsigned int charcount;
Tao Baod7db5942015-01-28 10:07:51 -0800155 unsigned char * data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700156};
157#define KD_FONT_OP_SET 0
158#define KD_FONT_OP_GET 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700159#define KD_FONT_OP_SET_DEFAULT 2
160#define KD_FONT_OP_COPY 3
161#define KD_FONT_FLAG_DONT_RECALC 1
162#endif