diff options
author | Richard Henderson <rth@twiddle.net> | 2011-08-11 16:07:16 -0700 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-02 16:14:02 +0200 |
commit | 39186d8ab8af8937cee4743cc1956bdc28923ac9 (patch) | |
tree | 24c3d9953aa8900f96aae4086799a4795502de43 /hw/virtex_ml507.c | |
parent | 2ff0c7c3c2251e7e81e90c9556dda64261d033ec (diff) | |
download | qemu-39186d8ab8af8937cee4743cc1956bdc28923ac9.tar.gz qemu-39186d8ab8af8937cee4743cc1956bdc28923ac9.tar.bz2 qemu-39186d8ab8af8937cee4743cc1956bdc28923ac9.zip |
serial: Add MemoryRegion parameter to serial_mm_init
Remove the get_system_memory() call from serial_mm_init, pushing
it back into the callers. In many cases we already have the
system memory region available.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/virtex_ml507.c')
-rw-r--r-- | hw/virtex_ml507.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/virtex_ml507.c b/hw/virtex_ml507.c index 8c52a0684d..68bf53ae40 100644 --- a/hw/virtex_ml507.c +++ b/hw/virtex_ml507.c @@ -34,6 +34,7 @@ #include "loader.h" #include "elf.h" #include "qemu-log.h" +#include "exec-memory.h" #include "ppc.h" #include "ppc4xx.h" @@ -191,6 +192,7 @@ static void virtex_init(ram_addr_t ram_size, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { + MemoryRegion *address_space_mem = get_system_memory(); DeviceState *dev; CPUState *env; target_phys_addr_t ram_base = 0; @@ -226,8 +228,8 @@ static void virtex_init(ram_addr_t ram_size, irq[i] = qdev_get_gpio_in(dev, i); } - serial_mm_init(0x83e01003ULL, 2, irq[9], 115200, serial_hds[0], - DEVICE_LITTLE_ENDIAN); + serial_mm_init(address_space_mem, 0x83e01003ULL, 2, irq[9], 115200, + serial_hds[0], DEVICE_LITTLE_ENDIAN); /* 2 timers at irq 2 @ 62 Mhz. */ xilinx_timer_create(0x83c00000, irq[3], 2, 62 * 1000000); |