mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
vga: simplify vga window mmio access functions
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. We have to keep vga_mem_{read,write}b() since they're used by cirrus. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
a815b16649
commit
b2a5e761c6
3 changed files with 12 additions and 52 deletions
|
@ -1966,7 +1966,7 @@ static uint64_t cirrus_vga_mem_read(void *opaque,
|
|||
uint32_t val;
|
||||
|
||||
if ((s->vga.sr[0x07] & 0x01) == 0) {
|
||||
return vga_mem_readb(s, addr);
|
||||
return vga_mem_readb(&s->vga, addr);
|
||||
}
|
||||
|
||||
if (addr < 0x10000) {
|
||||
|
@ -2011,7 +2011,7 @@ static void cirrus_vga_mem_write(void *opaque,
|
|||
unsigned mode;
|
||||
|
||||
if ((s->vga.sr[0x07] & 0x01) == 0) {
|
||||
vga_mem_writeb(s, addr, mem_value);
|
||||
vga_mem_writeb(&s->vga, addr, mem_value);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue