Lines Matching +full:0 +full:xe0
40 #define KBD_CMD_SET_LEDS 0xED /* Set keyboard leds */
41 #define KBD_CMD_ECHO 0xEE
42 #define KBD_CMD_SCANCODE 0xF0 /* Get/set scancode set */
43 #define KBD_CMD_GET_ID 0xF2 /* get keyboard ID */
44 #define KBD_CMD_SET_RATE 0xF3 /* Set typematic rate */
45 #define KBD_CMD_ENABLE 0xF4 /* Enable scanning */
46 #define KBD_CMD_RESET_DISABLE 0xF5 /* reset and disable scanning */
47 #define KBD_CMD_RESET_ENABLE 0xF6 /* reset and enable scanning */
48 #define KBD_CMD_RESET 0xFF /* Reset */
49 #define KBD_CMD_SET_MAKE_BREAK 0xFC /* Set Make and Break mode */
50 #define KBD_CMD_SET_TYPEMATIC 0xFA /* Set Typematic Make and Break mode */
53 #define KBD_REPLY_POR 0xAA /* Power on reset */
54 #define KBD_REPLY_ID 0xAB /* Keyboard ID */
55 #define KBD_REPLY_ACK 0xFA /* Command ACK */
56 #define KBD_REPLY_RESEND 0xFE /* Command NACK, send the cmd again */
59 #define AUX_SET_SCALE11 0xE6 /* Set 1:1 scaling */
60 #define AUX_SET_SCALE21 0xE7 /* Set 2:1 scaling */
61 #define AUX_SET_RES 0xE8 /* Set resolution */
62 #define AUX_GET_SCALE 0xE9 /* Get scaling factor */
63 #define AUX_SET_STREAM 0xEA /* Set stream mode */
64 #define AUX_POLL 0xEB /* Poll */
65 #define AUX_RESET_WRAP 0xEC /* Reset wrap mode */
66 #define AUX_SET_WRAP 0xEE /* Set wrap mode */
67 #define AUX_SET_REMOTE 0xF0 /* Set remote mode */
68 #define AUX_GET_TYPE 0xF2 /* Get type */
69 #define AUX_SET_SAMPLE 0xF3 /* Set sample rate */
70 #define AUX_ENABLE_DEV 0xF4 /* Enable aux device */
71 #define AUX_DISABLE_DEV 0xF5 /* Disable aux device */
72 #define AUX_SET_DEFAULT 0xF6
73 #define AUX_RESET 0xFF /* Reset aux device */
74 #define AUX_ACK 0xFA /* Command byte ACK. */
76 #define MOUSE_STATUS_REMOTE 0x40
77 #define MOUSE_STATUS_ENABLED 0x20
78 #define MOUSE_STATUS_SCALE21 0x10
84 #define MOD_CTRL_L (1 << 0)
92 0xff, 0x43, 0x41, 0x3f, 0x3d, 0x3b, 0x3c, 0x58,
93 0x64, 0x44, 0x42, 0x40, 0x3e, 0x0f, 0x29, 0x59,
94 0x65, 0x38, 0x2a, 0x70, 0x1d, 0x10, 0x02, 0x5a,
95 0x66, 0x71, 0x2c, 0x1f, 0x1e, 0x11, 0x03, 0x5b,
96 0x67, 0x2e, 0x2d, 0x20, 0x12, 0x05, 0x04, 0x5c,
97 0x68, 0x39, 0x2f, 0x21, 0x14, 0x13, 0x06, 0x5d,
98 0x69, 0x31, 0x30, 0x23, 0x22, 0x15, 0x07, 0x5e,
99 0x6a, 0x72, 0x32, 0x24, 0x16, 0x08, 0x09, 0x5f,
100 0x6b, 0x33, 0x25, 0x17, 0x18, 0x0b, 0x0a, 0x60,
101 0x6c, 0x34, 0x35, 0x26, 0x27, 0x19, 0x0c, 0x61,
102 0x6d, 0x73, 0x28, 0x74, 0x1a, 0x0d, 0x62, 0x6e,
103 0x3a, 0x36, 0x1c, 0x1b, 0x75, 0x2b, 0x63, 0x76,
104 0x55, 0x56, 0x77, 0x78, 0x79, 0x7a, 0x0e, 0x7b,
105 0x7c, 0x4f, 0x7d, 0x4b, 0x47, 0x7e, 0x7f, 0x6f,
106 0x52, 0x53, 0x50, 0x4c, 0x4d, 0x48, 0x01, 0x45,
107 0x57, 0x4e, 0x51, 0x4a, 0x37, 0x49, 0x46, 0x54,
108 0x80, 0x81, 0x82, 0x41, 0x54, 0x85, 0x86, 0x87,
109 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
110 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
111 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
112 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
113 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
114 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
115 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
116 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
117 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
118 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
119 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
120 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
121 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
122 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
123 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
142 return 0; in ps2_modifier_bit()
150 q->rptr = 0; in ps2_reset_queue()
151 q->wptr = 0; in ps2_reset_queue()
153 q->count = 0; in ps2_reset_queue()
158 return s->queue.count == 0; in ps2_queue_empty()
171 q->wptr = 0; in ps2_queue_noirq()
183 qemu_set_irq(s->irq, 0); in ps2_lower_irq()
236 q->cwptr = 0; in ps2_cqueue_data()
299 if (keycode == 0xf0) { in ps2_put_keycode()
302 ps2_queue(ps, translate_table[keycode] | 0x80); in ps2_put_keycode()
318 uint16_t keycode = 0; in ps2_keyboard_event()
343 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
344 ps2_put_keycode(s, 0x46); in ps2_keyboard_event()
345 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
346 ps2_put_keycode(s, 0xc6); in ps2_keyboard_event()
350 ps2_put_keycode(s, 0xe1); in ps2_keyboard_event()
351 ps2_put_keycode(s, 0x1d); in ps2_keyboard_event()
352 ps2_put_keycode(s, 0x45); in ps2_keyboard_event()
353 ps2_put_keycode(s, 0xe1); in ps2_keyboard_event()
354 ps2_put_keycode(s, 0x9d); in ps2_keyboard_event()
355 ps2_put_keycode(s, 0xc5); in ps2_keyboard_event()
361 ps2_put_keycode(s, 0xb8); in ps2_keyboard_event()
362 ps2_put_keycode(s, 0x38); in ps2_keyboard_event()
363 ps2_put_keycode(s, 0x54); in ps2_keyboard_event()
365 ps2_put_keycode(s, 0xd4); in ps2_keyboard_event()
366 ps2_put_keycode(s, 0xb8); in ps2_keyboard_event()
367 ps2_put_keycode(s, 0x38); in ps2_keyboard_event()
371 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
372 ps2_put_keycode(s, 0xb8); in ps2_keyboard_event()
373 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
374 ps2_put_keycode(s, 0x38); in ps2_keyboard_event()
375 ps2_put_keycode(s, 0x54); in ps2_keyboard_event()
377 ps2_put_keycode(s, 0xd4); in ps2_keyboard_event()
378 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
379 ps2_put_keycode(s, 0xb8); in ps2_keyboard_event()
380 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
381 ps2_put_keycode(s, 0x38); in ps2_keyboard_event()
386 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
387 ps2_put_keycode(s, 0x37); in ps2_keyboard_event()
389 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
390 ps2_put_keycode(s, 0xb7); in ps2_keyboard_event()
394 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
395 ps2_put_keycode(s, 0x2a); in ps2_keyboard_event()
396 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
397 ps2_put_keycode(s, 0x37); in ps2_keyboard_event()
399 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
400 ps2_put_keycode(s, 0xb7); in ps2_keyboard_event()
401 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
402 ps2_put_keycode(s, 0xaa); in ps2_keyboard_event()
413 if (keycode & 0xff00) { in ps2_keyboard_event()
417 keycode |= 0x80; in ps2_keyboard_event()
419 ps2_put_keycode(s, keycode & 0xff); in ps2_keyboard_event()
429 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
430 ps2_put_keycode(s, 0x7e); in ps2_keyboard_event()
431 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
432 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
433 ps2_put_keycode(s, 0x7e); in ps2_keyboard_event()
437 ps2_put_keycode(s, 0xe1); in ps2_keyboard_event()
438 ps2_put_keycode(s, 0x14); in ps2_keyboard_event()
439 ps2_put_keycode(s, 0x77); in ps2_keyboard_event()
440 ps2_put_keycode(s, 0xe1); in ps2_keyboard_event()
441 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
442 ps2_put_keycode(s, 0x14); in ps2_keyboard_event()
443 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
444 ps2_put_keycode(s, 0x77); in ps2_keyboard_event()
450 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
451 ps2_put_keycode(s, 0x11); in ps2_keyboard_event()
452 ps2_put_keycode(s, 0x11); in ps2_keyboard_event()
453 ps2_put_keycode(s, 0x84); in ps2_keyboard_event()
455 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
456 ps2_put_keycode(s, 0x84); in ps2_keyboard_event()
457 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
458 ps2_put_keycode(s, 0x11); in ps2_keyboard_event()
459 ps2_put_keycode(s, 0x11); in ps2_keyboard_event()
463 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
464 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
465 ps2_put_keycode(s, 0x11); in ps2_keyboard_event()
466 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
467 ps2_put_keycode(s, 0x11); in ps2_keyboard_event()
468 ps2_put_keycode(s, 0x84); in ps2_keyboard_event()
470 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
471 ps2_put_keycode(s, 0x84); in ps2_keyboard_event()
472 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
473 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
474 ps2_put_keycode(s, 0x11); in ps2_keyboard_event()
475 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
476 ps2_put_keycode(s, 0x11); in ps2_keyboard_event()
481 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
482 ps2_put_keycode(s, 0x7c); in ps2_keyboard_event()
484 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
485 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
486 ps2_put_keycode(s, 0x7c); in ps2_keyboard_event()
490 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
491 ps2_put_keycode(s, 0x12); in ps2_keyboard_event()
492 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
493 ps2_put_keycode(s, 0x7c); in ps2_keyboard_event()
495 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
496 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
497 ps2_put_keycode(s, 0x7c); in ps2_keyboard_event()
498 ps2_put_keycode(s, 0xe0); in ps2_keyboard_event()
499 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
500 ps2_put_keycode(s, 0x12); in ps2_keyboard_event()
511 if (keycode & 0xff00) { in ps2_keyboard_event()
515 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
517 ps2_put_keycode(s, keycode & 0xff); in ps2_keyboard_event()
530 ps2_put_keycode(s, 0xf0); in ps2_keyboard_event()
547 if (q->count == 0) { in ps2_read_data()
554 if (index < 0) { in ps2_read_data()
561 q->rptr = 0; in ps2_read_data()
593 ps2_set_ledstate(s, 0); in ps2_reset_keyboard()
606 case 0x00: in ps2_write_keyboard()
609 case 0x05: in ps2_write_keyboard()
615 s->translate ? 0x41 : 0x83); in ps2_write_keyboard()
633 s->scan_enabled = 0; in ps2_write_keyboard()
660 if (val == 0) { in ps2_write_keyboard()
685 * 0 = raw scancodes.
704 return 0; in ps2_mouse_send_packet()
722 b = 0x08 | ((dx1 < 0) << 4) | ((dy1 < 0) << 5) | (s->mouse_buttons & 0x07); in ps2_mouse_send_packet()
724 ps2_queue_noirq(ps2, dx1 & 0xff); in ps2_mouse_send_packet()
725 ps2_queue_noirq(ps2, dy1 & 0xff); in ps2_mouse_send_packet()
730 s->mouse_dz = 0; in ps2_mouse_send_packet()
731 s->mouse_dw = 0; in ps2_mouse_send_packet()
739 ps2_queue_noirq(ps2, dz1 & 0xff); in ps2_mouse_send_packet()
741 s->mouse_dw = 0; in ps2_mouse_send_packet()
752 if (dw1 != 0) { in ps2_mouse_send_packet()
763 b = (dw1 & 0x3f) | 0x40; in ps2_mouse_send_packet()
772 b = (dz1 & 0x0f) | ((s->mouse_buttons & 0x18) << 1); in ps2_mouse_send_packet()
862 if (s->mouse_dx == 0 && s->mouse_dy == 0 in ps2_mouse_sync()
863 && s->mouse_dz == 0 && s->mouse_dw == 0) { in ps2_mouse_sync()
888 s->mouse_wrap = 0; in ps2_write_mouse()
949 s->mouse_status = 0; in ps2_write_mouse()
955 s->mouse_status = 0; in ps2_write_mouse()
956 s->mouse_type = 0; in ps2_write_mouse()
960 0xaa, in ps2_write_mouse()
972 case 0: in ps2_write_mouse()
983 s->mouse_detect_state = 0; in ps2_write_mouse()
990 s->mouse_detect_state = 0; in ps2_write_mouse()
996 s->mouse_detect_state = 0; in ps2_write_mouse()
1028 int ccount = 0; in ps2_common_post_load()
1063 s->translate = 0; in ps2_kbd_reset_hold()
1065 s->modifiers = 0; in ps2_kbd_reset_hold()
1079 s->mouse_status = 0; in ps2_mouse_reset_hold()
1080 s->mouse_resolution = 0; in ps2_mouse_reset_hold()
1081 s->mouse_sample_rate = 0; in ps2_mouse_reset_hold()
1082 s->mouse_wrap = 0; in ps2_mouse_reset_hold()
1083 s->mouse_type = 0; in ps2_mouse_reset_hold()
1084 s->mouse_detect_state = 0; in ps2_mouse_reset_hold()
1085 s->mouse_dx = 0; in ps2_mouse_reset_hold()
1086 s->mouse_dy = 0; in ps2_mouse_reset_hold()
1087 s->mouse_dz = 0; in ps2_mouse_reset_hold()
1088 s->mouse_dw = 0; in ps2_mouse_reset_hold()
1089 s->mouse_buttons = 0; in ps2_mouse_reset_hold()
1110 return s->ledstate != 0; /* 0 is default state */ in ps2_keyboard_ledstate_needed()
1118 return 0; in ps2_kbd_ledstate_post_load()
1136 return s->need_high_bit != 0; /* 0 is the usual state */ in ps2_keyboard_need_high_bit_needed()
1178 return 0; in ps2_kbd_post_load()
1187 VMSTATE_STRUCT(parent_obj, PS2KbdState, 0, vmstate_ps2_common,
1209 return 0; in ps2_mouse_post_load()
1218 VMSTATE_STRUCT(parent_obj, PS2MouseState, 0, vmstate_ps2_common,