| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define GIO_FONT 0x4B60 | 
 | 24 | #define PIO_FONT 0x4B61 | 
 | 25 | #define GIO_FONTX 0x4B6B | 
 | 26 | #define PIO_FONTX 0x4B6C | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | struct consolefontdesc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 |   unsigned short charcount; | 
 | 29 |   unsigned short charheight; | 
 | 30 |   char __user * chardata; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | }; | 
 | 32 | #define PIO_FONTRESET 0x4B6D | 
 | 33 | #define GIO_CMAP 0x4B70 | 
 | 34 | #define PIO_CMAP 0x4B71 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define KIOCSOUND 0x4B2F | 
 | 36 | #define KDMKTONE 0x4B30 | 
 | 37 | #define KDGETLED 0x4B31 | 
 | 38 | #define KDSETLED 0x4B32 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define LED_SCR 0x01 | 
 | 40 | #define LED_NUM 0x02 | 
 | 41 | #define LED_CAP 0x04 | 
 | 42 | #define KDGKBTYPE 0x4B33 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define KB_84 0x01 | 
 | 44 | #define KB_101 0x02 | 
 | 45 | #define KB_OTHER 0x03 | 
 | 46 | #define KDADDIO 0x4B34 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define KDDELIO 0x4B35 | 
 | 48 | #define KDENABIO 0x4B36 | 
 | 49 | #define KDDISABIO 0x4B37 | 
 | 50 | #define KDSETMODE 0x4B3A | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define KD_TEXT 0x00 | 
 | 52 | #define KD_GRAPHICS 0x01 | 
 | 53 | #define KD_TEXT0 0x02 | 
 | 54 | #define KD_TEXT1 0x03 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #define KDGETMODE 0x4B3B | 
 | 56 | #define KDMAPDISP 0x4B3C | 
 | 57 | #define KDUNMAPDISP 0x4B3D | 
 | 58 | typedef char scrnmap_t; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define E_TABSZ 256 | 
 | 60 | #define GIO_SCRNMAP 0x4B40 | 
 | 61 | #define PIO_SCRNMAP 0x4B41 | 
 | 62 | #define GIO_UNISCRNMAP 0x4B69 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define PIO_UNISCRNMAP 0x4B6A | 
 | 64 | #define GIO_UNIMAP 0x4B66 | 
 | 65 | struct unipair { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 66 |   unsigned short unicode; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 |   unsigned short fontpos; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | }; | 
 | 69 | struct unimapdesc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 70 |   unsigned short entry_ct; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 |   struct unipair __user * entries; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 72 | }; | 
 | 73 | #define PIO_UNIMAP 0x4B67 | 
 | 74 | #define PIO_UNIMAPCLR 0x4B68 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | struct unimapinit { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 |   unsigned short advised_hashsize; | 
 | 77 |   unsigned short advised_hashstep; | 
 | 78 |   unsigned short advised_hashlevel; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 79 | }; | 
 | 80 | #define UNI_DIRECT_BASE 0xF000 | 
 | 81 | #define UNI_DIRECT_MASK 0x01FF | 
 | 82 | #define K_RAW 0x00 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | #define K_XLATE 0x01 | 
 | 84 | #define K_MEDIUMRAW 0x02 | 
 | 85 | #define K_UNICODE 0x03 | 
 | 86 | #define K_OFF 0x04 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | #define KDGKBMODE 0x4B44 | 
 | 88 | #define KDSKBMODE 0x4B45 | 
 | 89 | #define K_METABIT 0x03 | 
 | 90 | #define K_ESCPREFIX 0x04 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | #define KDGKBMETA 0x4B62 | 
 | 92 | #define KDSKBMETA 0x4B63 | 
 | 93 | #define K_SCROLLLOCK 0x01 | 
 | 94 | #define K_NUMLOCK 0x02 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 95 | #define K_CAPSLOCK 0x04 | 
 | 96 | #define KDGKBLED 0x4B64 | 
 | 97 | #define KDSKBLED 0x4B65 | 
 | 98 | struct kbentry { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 |   unsigned char kb_table; | 
 | 100 |   unsigned char kb_index; | 
 | 101 |   unsigned short kb_value; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 102 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | #define K_NORMTAB 0x00 | 
 | 104 | #define K_SHIFTTAB 0x01 | 
 | 105 | #define K_ALTTAB 0x02 | 
 | 106 | #define K_ALTSHIFTTAB 0x03 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | #define KDGKBENT 0x4B46 | 
 | 108 | #define KDSKBENT 0x4B47 | 
 | 109 | struct kbsentry { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 110 |   unsigned char kb_func; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 111 |   unsigned char kb_string[512]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | }; | 
 | 113 | #define KDGKBSENT 0x4B48 | 
 | 114 | #define KDSKBSENT 0x4B49 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 115 | struct kbdiacr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 116 |   unsigned char diacr, base, result; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 117 | }; | 
 | 118 | struct kbdiacrs { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 119 |   unsigned int kb_cnt; | 
 | 120 |   struct kbdiacr kbdiacr[256]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 121 | }; | 
 | 122 | #define KDGKBDIACR 0x4B4A | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 123 | #define KDSKBDIACR 0x4B4B | 
 | 124 | struct kbdiacruc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 125 |   unsigned int diacr, base, result; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 126 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 127 | struct kbdiacrsuc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 128 |   unsigned int kb_cnt; | 
 | 129 |   struct kbdiacruc kbdiacruc[256]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 130 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | #define KDGKBDIACRUC 0x4BFA | 
 | 132 | #define KDSKBDIACRUC 0x4BFB | 
 | 133 | struct kbkeycode { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 134 |   unsigned int scancode, keycode; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 135 | }; | 
 | 136 | #define KDGETKEYCODE 0x4B4C | 
 | 137 | #define KDSETKEYCODE 0x4B4D | 
 | 138 | #define KDSIGACCEPT 0x4B4E | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 139 | struct kbd_repeat { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 140 |   int delay; | 
 | 141 |   int period; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 142 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 143 | #define KDKBDREP 0x4B52 | 
 | 144 | #define KDFONTOP 0x4B72 | 
 | 145 | struct console_font_op { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 146 |   unsigned int op; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 147 |   unsigned int flags; | 
 | 148 |   unsigned int width, height; | 
 | 149 |   unsigned int charcount; | 
 | 150 |   unsigned char __user * data; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 151 | }; | 
 | 152 | struct console_font { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 153 |   unsigned int width, height; | 
 | 154 |   unsigned int charcount; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 155 |   unsigned char * data; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 156 | }; | 
 | 157 | #define KD_FONT_OP_SET 0 | 
 | 158 | #define KD_FONT_OP_GET 1 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |