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