2594 |
#define KBD_CCMD_WRITE_AUX_OBUF 0xD3 /* Write to output buffer as if |
#define KBD_CCMD_WRITE_AUX_OBUF 0xD3 /* Write to output buffer as if |
2595 |
initiated by the auxiliary device */ |
initiated by the auxiliary device */ |
2596 |
#define KBD_CCMD_WRITE_MOUSE 0xD4 /* Write the following byte to the mouse */ |
#define KBD_CCMD_WRITE_MOUSE 0xD4 /* Write the following byte to the mouse */ |
2597 |
#define KBD_CCMD_ENABLE_A20 0xDD |
#define KBD_CCMD_DISABLE_A20 0xDD /* HP vectra only ? */ |
2598 |
#define KBD_CCMD_DISABLE_A20 0xDF |
#define KBD_CCMD_ENABLE_A20 0xDF /* HP vectra only ? */ |
2599 |
#define KBD_CCMD_RESET 0xFE |
#define KBD_CCMD_RESET 0xFE |
2600 |
|
|
2601 |
/* Keyboard Commands */ |
/* Keyboard Commands */ |
2685 |
|
|
2686 |
KBDState kbd_state; |
KBDState kbd_state; |
2687 |
int reset_requested; |
int reset_requested; |
|
int a20_enabled; |
|
2688 |
|
|
2689 |
/* update irq and KBD_STAT_[MOUSE_]OBF */ |
/* update irq and KBD_STAT_[MOUSE_]OBF */ |
2690 |
static void kbd_update_irq(KBDState *s) |
static void kbd_update_irq(KBDState *s) |
2801 |
kbd_queue(s, val, 0); |
kbd_queue(s, val, 0); |
2802 |
break; |
break; |
2803 |
case KBD_CCMD_ENABLE_A20: |
case KBD_CCMD_ENABLE_A20: |
2804 |
a20_enabled = 1; |
cpu_x86_set_a20(env, 1); |
2805 |
break; |
break; |
2806 |
case KBD_CCMD_DISABLE_A20: |
case KBD_CCMD_DISABLE_A20: |
2807 |
a20_enabled = 0; |
cpu_x86_set_a20(env, 0); |
2808 |
break; |
break; |
2809 |
case KBD_CCMD_RESET: |
case KBD_CCMD_RESET: |
2810 |
reset_requested = 1; |
reset_requested = 1; |
2874 |
case KBD_CMD_SET_LEDS: |
case KBD_CMD_SET_LEDS: |
2875 |
case KBD_CMD_SET_RATE: |
case KBD_CMD_SET_RATE: |
2876 |
s->kbd_write_cmd = val; |
s->kbd_write_cmd = val; |
2877 |
|
kbd_queue(s, KBD_REPLY_ACK, 0); |
2878 |
break; |
break; |
2879 |
case KBD_CMD_RESET_DISABLE: |
case KBD_CMD_RESET_DISABLE: |
2880 |
kbd_reset_keyboard(s); |
kbd_reset_keyboard(s); |
3129 |
kbd_queue(s, val, 1); |
kbd_queue(s, val, 1); |
3130 |
break; |
break; |
3131 |
case KBD_CCMD_WRITE_OUTPORT: |
case KBD_CCMD_WRITE_OUTPORT: |
3132 |
a20_enabled = (val >> 1) & 1; |
cpu_x86_set_a20(env, (val >> 1) & 1); |
3133 |
if (!(val & 1)) { |
if (!(val & 1)) { |
3134 |
reset_requested = 1; |
reset_requested = 1; |
3135 |
cpu_x86_interrupt(global_env, CPU_INTERRUPT_EXIT); |
cpu_x86_interrupt(global_env, CPU_INTERRUPT_EXIT); |