Commit 1f5476fcce8f76fe0d53ae8c51e1c50e8f13e1ed
1 parent
461c0471
a20 support - keyboard led fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@441 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
6 deletions
vl.c
@@ -2594,8 +2594,8 @@ void ide_init(void) | @@ -2594,8 +2594,8 @@ void ide_init(void) | ||
2594 | #define KBD_CCMD_WRITE_AUX_OBUF 0xD3 /* Write to output buffer as if | 2594 | #define KBD_CCMD_WRITE_AUX_OBUF 0xD3 /* Write to output buffer as if |
2595 | initiated by the auxiliary device */ | 2595 | initiated by the auxiliary device */ |
2596 | #define KBD_CCMD_WRITE_MOUSE 0xD4 /* Write the following byte to the mouse */ | 2596 | #define KBD_CCMD_WRITE_MOUSE 0xD4 /* Write the following byte to the mouse */ |
2597 | -#define KBD_CCMD_ENABLE_A20 0xDD | ||
2598 | -#define KBD_CCMD_DISABLE_A20 0xDF | 2597 | +#define KBD_CCMD_DISABLE_A20 0xDD /* HP vectra only ? */ |
2598 | +#define KBD_CCMD_ENABLE_A20 0xDF /* HP vectra only ? */ | ||
2599 | #define KBD_CCMD_RESET 0xFE | 2599 | #define KBD_CCMD_RESET 0xFE |
2600 | 2600 | ||
2601 | /* Keyboard Commands */ | 2601 | /* Keyboard Commands */ |
@@ -2685,7 +2685,6 @@ typedef struct KBDState { | @@ -2685,7 +2685,6 @@ typedef struct KBDState { | ||
2685 | 2685 | ||
2686 | KBDState kbd_state; | 2686 | KBDState kbd_state; |
2687 | int reset_requested; | 2687 | int reset_requested; |
2688 | -int a20_enabled; | ||
2689 | 2688 | ||
2690 | /* update irq and KBD_STAT_[MOUSE_]OBF */ | 2689 | /* update irq and KBD_STAT_[MOUSE_]OBF */ |
2691 | static void kbd_update_irq(KBDState *s) | 2690 | static void kbd_update_irq(KBDState *s) |
@@ -2802,10 +2801,10 @@ void kbd_write_command(CPUX86State *env, uint32_t addr, uint32_t val) | @@ -2802,10 +2801,10 @@ void kbd_write_command(CPUX86State *env, uint32_t addr, uint32_t val) | ||
2802 | kbd_queue(s, val, 0); | 2801 | kbd_queue(s, val, 0); |
2803 | break; | 2802 | break; |
2804 | case KBD_CCMD_ENABLE_A20: | 2803 | case KBD_CCMD_ENABLE_A20: |
2805 | - a20_enabled = 1; | 2804 | + cpu_x86_set_a20(env, 1); |
2806 | break; | 2805 | break; |
2807 | case KBD_CCMD_DISABLE_A20: | 2806 | case KBD_CCMD_DISABLE_A20: |
2808 | - a20_enabled = 0; | 2807 | + cpu_x86_set_a20(env, 0); |
2809 | break; | 2808 | break; |
2810 | case KBD_CCMD_RESET: | 2809 | case KBD_CCMD_RESET: |
2811 | reset_requested = 1; | 2810 | reset_requested = 1; |
@@ -2875,6 +2874,7 @@ static void kbd_write_keyboard(KBDState *s, int val) | @@ -2875,6 +2874,7 @@ static void kbd_write_keyboard(KBDState *s, int val) | ||
2875 | case KBD_CMD_SET_LEDS: | 2874 | case KBD_CMD_SET_LEDS: |
2876 | case KBD_CMD_SET_RATE: | 2875 | case KBD_CMD_SET_RATE: |
2877 | s->kbd_write_cmd = val; | 2876 | s->kbd_write_cmd = val; |
2877 | + kbd_queue(s, KBD_REPLY_ACK, 0); | ||
2878 | break; | 2878 | break; |
2879 | case KBD_CMD_RESET_DISABLE: | 2879 | case KBD_CMD_RESET_DISABLE: |
2880 | kbd_reset_keyboard(s); | 2880 | kbd_reset_keyboard(s); |
@@ -3129,7 +3129,7 @@ void kbd_write_data(CPUX86State *env, uint32_t addr, uint32_t val) | @@ -3129,7 +3129,7 @@ void kbd_write_data(CPUX86State *env, uint32_t addr, uint32_t val) | ||
3129 | kbd_queue(s, val, 1); | 3129 | kbd_queue(s, val, 1); |
3130 | break; | 3130 | break; |
3131 | case KBD_CCMD_WRITE_OUTPORT: | 3131 | case KBD_CCMD_WRITE_OUTPORT: |
3132 | - a20_enabled = (val >> 1) & 1; | 3132 | + cpu_x86_set_a20(env, (val >> 1) & 1); |
3133 | if (!(val & 1)) { | 3133 | if (!(val & 1)) { |
3134 | reset_requested = 1; | 3134 | reset_requested = 1; |
3135 | cpu_x86_interrupt(global_env, CPU_INTERRUPT_EXIT); | 3135 | cpu_x86_interrupt(global_env, CPU_INTERRUPT_EXIT); |