aboutsummaryrefslogtreecommitdiff
path: root/hw/vga-isa-mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/vga-isa-mm.c')
-rw-r--r--hw/vga-isa-mm.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/hw/vga-isa-mm.c b/hw/vga-isa-mm.c
index b93497803c..f8984c62cb 100644
--- a/hw/vga-isa-mm.c
+++ b/hw/vga-isa-mm.c
@@ -27,7 +27,6 @@
#include "vga_int.h"
#include "pixel_ops.h"
#include "qemu-timer.h"
-#include "exec-memory.h"
typedef struct ISAVGAMMState {
VGACommonState vga;
@@ -97,7 +96,8 @@ static const MemoryRegionOps vga_mm_ctrl_ops = {
};
static void vga_mm_init(ISAVGAMMState *s, target_phys_addr_t vram_base,
- target_phys_addr_t ctrl_base, int it_shift)
+ target_phys_addr_t ctrl_base, int it_shift,
+ MemoryRegion *address_space)
{
MemoryRegion *s_ioport_ctrl, *vga_io_memory;
@@ -113,26 +113,27 @@ static void vga_mm_init(ISAVGAMMState *s, target_phys_addr_t vram_base,
vmstate_register(NULL, 0, &vmstate_vga_common, s);
- memory_region_add_subregion(get_system_memory(), ctrl_base, s_ioport_ctrl);
+ memory_region_add_subregion(address_space, ctrl_base, s_ioport_ctrl);
s->vga.bank_offset = 0;
- memory_region_add_subregion(get_system_memory(),
+ memory_region_add_subregion(address_space,
vram_base + 0x000a0000, vga_io_memory);
memory_region_set_coalescing(vga_io_memory);
}
int isa_vga_mm_init(target_phys_addr_t vram_base,
- target_phys_addr_t ctrl_base, int it_shift)
+ target_phys_addr_t ctrl_base, int it_shift,
+ MemoryRegion *address_space)
{
ISAVGAMMState *s;
s = g_malloc0(sizeof(*s));
vga_common_init(&s->vga, VGA_RAM_SIZE);
- vga_mm_init(s, vram_base, ctrl_base, it_shift);
+ vga_mm_init(s, vram_base, ctrl_base, it_shift, address_space);
s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
s->vga.screen_dump, s->vga.text_update, s);
- vga_init_vbe(&s->vga);
+ vga_init_vbe(&s->vga, address_space);
return 0;
}