[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/14] jazz: do not explode QEMUMachineInitArgs struc
From: |
Leon Alrae |
Subject: |
[Qemu-devel] [PULL 02/14] jazz: do not explode QEMUMachineInitArgs structure |
Date: |
Fri, 13 Feb 2015 10:02:00 +0000 |
From: Hervé Poussineau <address@hidden>
Also remove address_space and address_space_io parameters, which
where always get_system_memory() and get_system_io().
Signed-off-by: Hervé Poussineau <address@hidden>
Signed-off-by: Leon Alrae <address@hidden>
---
hw/mips/mips_jazz.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
index de35299..738e9c7 100644
--- a/hw/mips/mips_jazz.c
+++ b/hw/mips/mips_jazz.c
@@ -120,12 +120,12 @@ static void mips_jazz_do_unassigned_access(CPUState *cpu,
hwaddr addr,
(*real_do_unassigned_access)(cpu, addr, is_write, is_exec, opaque, size);
}
-static void mips_jazz_init(MemoryRegion *address_space,
- MemoryRegion *address_space_io,
- ram_addr_t ram_size,
- const char *cpu_model,
+static void mips_jazz_init(MachineState *machine,
enum jazz_model_e jazz_model)
{
+ MemoryRegion *address_space = get_system_memory();
+ MemoryRegion *address_space_io = get_system_io();
+ const char *cpu_model = machine->cpu_model;
char *filename;
int bios_size, n;
MIPSCPU *cpu;
@@ -179,7 +179,8 @@ static void mips_jazz_init(MemoryRegion *address_space,
cc->do_unassigned_access = mips_jazz_do_unassigned_access;
/* allocate RAM */
- memory_region_init_ram(ram, NULL, "mips_jazz.ram", ram_size, &error_abort);
+ memory_region_init_ram(ram, NULL, "mips_jazz.ram", machine->ram_size,
+ &error_abort);
vmstate_register_ram_global(ram);
memory_region_add_subregion(address_space, 0, ram);
@@ -333,19 +334,13 @@ static void mips_jazz_init(MemoryRegion *address_space,
static
void mips_magnum_init(MachineState *machine)
{
- ram_addr_t ram_size = machine->ram_size;
- const char *cpu_model = machine->cpu_model;
- mips_jazz_init(get_system_memory(), get_system_io(),
- ram_size, cpu_model, JAZZ_MAGNUM);
+ mips_jazz_init(machine, JAZZ_MAGNUM);
}
static
void mips_pica61_init(MachineState *machine)
{
- ram_addr_t ram_size = machine->ram_size;
- const char *cpu_model = machine->cpu_model;
- mips_jazz_init(get_system_memory(), get_system_io(),
- ram_size, cpu_model, JAZZ_PICA61);
+ mips_jazz_init(machine, JAZZ_PICA61);
}
static QEMUMachine mips_magnum_machine = {
--
2.1.0
- [Qemu-devel] [PULL 00/14] target-mips queue, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 04/14] mips: remove isa_mem_base usage, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 05/14] piix4: use PCI address space instead of system memory, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 03/14] jazz: remove usage of isa_mem_base, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 13/14] target-mips: pass 0 instead of -1 as rs in microMIPS LUI instruction, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 07/14] isa: remove isa_mem_base variable, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 02/14] jazz: do not explode QEMUMachineInitArgs structure,
Leon Alrae <=
- [Qemu-devel] [PULL 06/14] gt64xxx: remove isa_mem_base usage, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 01/14] isa: add memory space parameter to isa_bus_new, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 11/14] target-mips: use CP0EnLo_XI instead of magic number, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 12/14] target-mips: fix broken snapshotting, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 08/14] target-mips: Make CP0.Status.CU1 read-only for the 5Kc and 5KEc processors, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 10/14] target-mips: ll and lld cause AdEL exception for unaligned address, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 14/14] linux-user: correct stat structure in MIPS N32, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 09/14] target-mips: fix detection of the end of the page during translation, Leon Alrae, 2015/02/13
- Re: [Qemu-devel] [PULL 00/14] target-mips queue, Peter Maydell, 2015/02/13