diff options
author | Avi Kivity <avi@redhat.com> | 2011-08-15 17:17:37 +0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-22 10:47:49 -0500 |
commit | be20f9e902ca47ea84e1b1c1e89b0a55d59b4c11 (patch) | |
tree | 11fd0270b2f59ae1bcc68481fd2156bdcf841d36 /hw/cirrus_vga.c | |
parent | f5e6fed879ae10b9f6494a6eed21c1979391d7cb (diff) | |
download | qemu-be20f9e902ca47ea84e1b1c1e89b0a55d59b4c11.zip qemu-be20f9e902ca47ea84e1b1c1e89b0a55d59b4c11.tar.gz qemu-be20f9e902ca47ea84e1b1c1e89b0a55d59b4c11.tar.bz2 |
vga: drop get_system_memory() from vga devices and derivatives
Instead, use the bus accessors, or get the address space directly
from the board constructor.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/cirrus_vga.c')
-rw-r--r-- | hw/cirrus_vga.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 0f91112..4d0ef0d 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -32,7 +32,6 @@ #include "console.h" #include "vga_int.h" #include "loader.h" -#include "exec-memory.h" /* * TODO: @@ -2801,7 +2800,8 @@ static const MemoryRegionOps cirrus_linear_io_ops = { }, }; -static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) +static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci, + MemoryRegion *system_memory) { int i; static int inited; @@ -2854,7 +2854,7 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) memory_region_init_io(&s->low_mem, &cirrus_vga_mem_ops, s, "cirrus-low-memory", 0x20000); memory_region_add_subregion(&s->low_mem_container, 0, &s->low_mem); - memory_region_add_subregion_overlap(get_system_memory(), + memory_region_add_subregion_overlap(system_memory, isa_mem_base + 0x000a0000, &s->low_mem_container, 1); @@ -2897,14 +2897,14 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) * ***************************************/ -void isa_cirrus_vga_init(void) +void isa_cirrus_vga_init(MemoryRegion *system_memory) { CirrusVGAState *s; s = g_malloc0(sizeof(CirrusVGAState)); vga_common_init(&s->vga, VGA_RAM_SIZE); - cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0); + cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0, system_memory); s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate, s->vga.screen_dump, s->vga.text_update, &s->vga); @@ -2928,7 +2928,7 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev) /* setup VGA */ vga_common_init(&s->vga, VGA_RAM_SIZE); - cirrus_init_common(s, device_id, 1); + cirrus_init_common(s, device_id, 1, pci_address_space(dev)); s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate, s->vga.screen_dump, s->vga.text_update, &s->vga); |