aboutsummaryrefslogtreecommitdiff
path: root/hw/pckbd.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-21 23:33:12 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-21 23:33:12 +0000
commitc68ea7043f2ed4c631d1e3a4f35afe247d5ca063 (patch)
tree64b42bfd3fe62caf019e384cee26e80b98da831d /hw/pckbd.c
parent173d6cfe5129301a3a8f2570223aaa47a815f343 (diff)
cpu_single_env usage fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1644 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pckbd.c')
-rw-r--r--hw/pckbd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/pckbd.c b/hw/pckbd.c
index be559eb4f6..1be1560eff 100644
--- a/hw/pckbd.c
+++ b/hw/pckbd.c
@@ -254,7 +254,7 @@ static void kbd_write_command(void *opaque, uint32_t addr, uint32_t val)
case KBD_CCMD_READ_OUTPORT:
/* XXX: check that */
#ifdef TARGET_I386
- val = 0x01 | (((cpu_single_env->a20_mask >> 20) & 1) << 1);
+ val = 0x01 | (ioport_get_a20() << 1);
#else
val = 0x01;
#endif
@@ -266,10 +266,10 @@ static void kbd_write_command(void *opaque, uint32_t addr, uint32_t val)
break;
#ifdef TARGET_I386
case KBD_CCMD_ENABLE_A20:
- cpu_x86_set_a20(cpu_single_env, 1);
+ ioport_set_a20(1);
break;
case KBD_CCMD_DISABLE_A20:
- cpu_x86_set_a20(cpu_single_env, 0);
+ ioport_set_a20(0);
break;
#endif
case KBD_CCMD_RESET:
@@ -611,7 +611,7 @@ void kbd_write_data(void *opaque, uint32_t addr, uint32_t val)
break;
case KBD_CCMD_WRITE_OUTPORT:
#ifdef TARGET_I386
- cpu_x86_set_a20(cpu_single_env, (val >> 1) & 1);
+ ioport_set_a20((val >> 1) & 1);
#endif
if (!(val & 1)) {
qemu_system_reset_request();