mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
vga: fix mmio vga register mapping
This commit is contained in:
parent
df9ffb726f
commit
c96c53b5f1
1 changed files with 4 additions and 3 deletions
|
@ -84,9 +84,10 @@ static void pci_vga_ioport_write(void *ptr, hwaddr addr,
|
||||||
uint64_t val, unsigned size)
|
uint64_t val, unsigned size)
|
||||||
{
|
{
|
||||||
PCIVGAState *d = ptr;
|
PCIVGAState *d = ptr;
|
||||||
|
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 1:
|
case 1:
|
||||||
vga_ioport_write(&d->vga, addr, val);
|
vga_ioport_write(&d->vga, addr + 0x3c0, val);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
/*
|
/*
|
||||||
|
@ -94,8 +95,8 @@ static void pci_vga_ioport_write(void *ptr, hwaddr addr,
|
||||||
* indexed registers with a single word write because the
|
* indexed registers with a single word write because the
|
||||||
* index byte is updated first.
|
* index byte is updated first.
|
||||||
*/
|
*/
|
||||||
vga_ioport_write(&d->vga, addr, val & 0xff);
|
vga_ioport_write(&d->vga, addr + 0x3c0, val & 0xff);
|
||||||
vga_ioport_write(&d->vga, addr+1, (val >> 8) & 0xff);
|
vga_ioport_write(&d->vga, addr + 0x3c1, (val >> 8) & 0xff);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue