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