summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-11-04 23:35:20 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-11-04 23:35:20 +0000
commit1f5476fcce8f76fe0d53ae8c51e1c50e8f13e1ed (patch)
tree8f11ca7f62288f7fc8d0b683a223b5ad384fc1ec
parent461c0471af05cf29ac416afdbc9480e4732e4252 (diff)
downloadqemu-1f5476fcce8f76fe0d53ae8c51e1c50e8f13e1ed.tar.gz
a20 support - keyboard led fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@441 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--vl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vl.c b/vl.c
index a356dbf183..a3b49ab135 100644
--- a/vl.c
+++ b/vl.c
@@ -2594,8 +2594,8 @@ void ide_init(void)
#define KBD_CCMD_WRITE_AUX_OBUF 0xD3 /* Write to output buffer as if
initiated by the auxiliary device */
#define KBD_CCMD_WRITE_MOUSE 0xD4 /* Write the following byte to the mouse */
-#define KBD_CCMD_ENABLE_A20 0xDD
-#define KBD_CCMD_DISABLE_A20 0xDF
+#define KBD_CCMD_DISABLE_A20 0xDD /* HP vectra only ? */
+#define KBD_CCMD_ENABLE_A20 0xDF /* HP vectra only ? */
#define KBD_CCMD_RESET 0xFE
/* Keyboard Commands */
@@ -2685,7 +2685,6 @@ typedef struct KBDState {
KBDState kbd_state;
int reset_requested;
-int a20_enabled;
/* update irq and KBD_STAT_[MOUSE_]OBF */
static void kbd_update_irq(KBDState *s)
@@ -2802,10 +2801,10 @@ void kbd_write_command(CPUX86State *env, uint32_t addr, uint32_t val)
kbd_queue(s, val, 0);
break;
case KBD_CCMD_ENABLE_A20:
- a20_enabled = 1;
+ cpu_x86_set_a20(env, 1);
break;
case KBD_CCMD_DISABLE_A20:
- a20_enabled = 0;
+ cpu_x86_set_a20(env, 0);
break;
case KBD_CCMD_RESET:
reset_requested = 1;
@@ -2875,6 +2874,7 @@ static void kbd_write_keyboard(KBDState *s, int val)
case KBD_CMD_SET_LEDS:
case KBD_CMD_SET_RATE:
s->kbd_write_cmd = val;
+ kbd_queue(s, KBD_REPLY_ACK, 0);
break;
case KBD_CMD_RESET_DISABLE:
kbd_reset_keyboard(s);
@@ -3129,7 +3129,7 @@ void kbd_write_data(CPUX86State *env, uint32_t addr, uint32_t val)
kbd_queue(s, val, 1);
break;
case KBD_CCMD_WRITE_OUTPORT:
- a20_enabled = (val >> 1) & 1;
+ cpu_x86_set_a20(env, (val >> 1) & 1);
if (!(val & 1)) {
reset_requested = 1;
cpu_x86_interrupt(global_env, CPU_INTERRUPT_EXIT);