summary refs log tree commit diff stats
path: root/hw/vga.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-08-15 17:17:37 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-22 10:47:49 -0500
commitbe20f9e902ca47ea84e1b1c1e89b0a55d59b4c11 (patch)
tree11fd0270b2f59ae1bcc68481fd2156bdcf841d36 /hw/vga.c
parentf5e6fed879ae10b9f6494a6eed21c1979391d7cb (diff)
downloadfocaccia-qemu-be20f9e902ca47ea84e1b1c1e89b0a55d59b4c11.tar.gz
focaccia-qemu-be20f9e902ca47ea84e1b1c1e89b0a55d59b4c11.zip
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/vga.c')
-rw-r--r--hw/vga.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/vga.c b/hw/vga.c
index a190105b1d..b0371d5107 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -28,7 +28,6 @@
 #include "vga_int.h"
 #include "pixel_ops.h"
 #include "qemu-timer.h"
-#include "exec-memory.h"
 
 //#define DEBUG_VGA
 //#define DEBUG_VGA_MEM
@@ -2241,7 +2240,7 @@ MemoryRegion *vga_init_io(VGACommonState *s)
     return vga_mem;
 }
 
-void vga_init(VGACommonState *s)
+void vga_init(VGACommonState *s, MemoryRegion *address_space)
 {
     MemoryRegion *vga_io_memory;
 
@@ -2250,18 +2249,18 @@ void vga_init(VGACommonState *s)
     s->bank_offset = 0;
 
     vga_io_memory = vga_init_io(s);
-    memory_region_add_subregion_overlap(get_system_memory(),
+    memory_region_add_subregion_overlap(address_space,
                                         isa_mem_base + 0x000a0000,
                                         vga_io_memory,
                                         1);
     memory_region_set_coalescing(vga_io_memory);
 }
 
-void vga_init_vbe(VGACommonState *s)
+void vga_init_vbe(VGACommonState *s, MemoryRegion *system_memory)
 {
 #ifdef CONFIG_BOCHS_VBE
     /* XXX: use optimized standard vga accesses */
-    memory_region_add_subregion(get_system_memory(),
+    memory_region_add_subregion(system_memory,
                                 VBE_DISPI_LFB_PHYSICAL_ADDRESS,
                                 &s->vram);
     s->vbe_mapped = 1;