Commit e1a237441dbe31873d6d9c7d9eee2f1653b5f9e8

Authored by bellard
1 parent 57c30724

port 92 access


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@708 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 14 additions and 0 deletions
... ... @@ -177,6 +177,17 @@ static uint32_t speaker_ioport_read(void *opaque, uint32_t addr)
177 177 (dummy_refresh_clock << 4);
178 178 }
179 179  
  180 +static void ioport92_write(void *opaque, uint32_t addr, uint32_t val)
  181 +{
  182 + cpu_x86_set_a20(cpu_single_env, (val >> 1) & 1);
  183 + /* XXX: bit 0 is fast reset */
  184 +}
  185 +
  186 +static uint32_t ioport92_read(void *opaque, uint32_t addr)
  187 +{
  188 + return ((cpu_single_env->a20_mask >> 20) & 1) << 1;
  189 +}
  190 +
180 191 /***********************************************************/
181 192 /* Bochs BIOS debug ports */
182 193  
... ... @@ -355,6 +366,9 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device,
355 366 register_ioport_read(0x61, 1, 1, speaker_ioport_read, NULL);
356 367 register_ioport_write(0x61, 1, 1, speaker_ioport_write, NULL);
357 368  
  369 + register_ioport_read(0x92, 1, 1, ioport92_read, NULL);
  370 + register_ioport_write(0x92, 1, 1, ioport92_write, NULL);
  371 +
358 372 pic_init();
359 373 pit_init(0x40, 0);
360 374  
... ...