vga: Fix inconsistent tracking of map_addr (Jan Kiszka)
Only track video RAM mapping in map_addr and use the correct RAM size. Furthermore, make sure the reset the address in case unmapping took place via PCI reconfiguration. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7140 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6152e2ae43
commit
e7f3dcc4a7
10
hw/vga.c
10
hw/vga.c
@ -2258,12 +2258,10 @@ static void vga_map(PCIDevice *pci_dev, int region_num,
|
||||
cpu_register_physical_memory(addr, s->bios_size, s->bios_offset);
|
||||
} else {
|
||||
cpu_register_physical_memory(addr, s->vram_size, s->vram_offset);
|
||||
s->map_addr = addr;
|
||||
s->map_end = addr + s->vram_size;
|
||||
vga_dirty_log_start(s);
|
||||
}
|
||||
|
||||
s->map_addr = addr;
|
||||
s->map_end = addr + VGA_RAM_SIZE;
|
||||
|
||||
vga_dirty_log_start(s);
|
||||
}
|
||||
|
||||
void vga_common_init(VGAState *s, int vga_ram_size)
|
||||
@ -2493,6 +2491,8 @@ static void pci_vga_write_config(PCIDevice *d,
|
||||
|
||||
vga_dirty_log_stop(s);
|
||||
pci_default_write_config(d, address, val, len);
|
||||
if (s->map_addr && pvs->dev.io_regions[0].addr == -1)
|
||||
s->map_addr = 0;
|
||||
vga_dirty_log_start(s);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user