aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/versatilepb.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2014-05-07 17:42:57 +0300
committerAndreas Färber <afaerber@suse.de>2014-05-28 17:35:01 +0200
commit3ef9622182e598392855931e7a0437d3855cef5e (patch)
tree87765046f480836eb65ecbcd293cade13518c62f /hw/arm/versatilepb.c
parent0380aef323154205a7d838fb9953423621290d41 (diff)
machine: Conversion of QEMUMachineInitArgs to MachineState
Total removal of QEMUMachineInitArgs struct. QEMUMachineInitArgs's fields are copied into MachineState. Removed duplicated fields from MachineState. All the other changes are only mechanical refactoring, no semantic changes. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (s390) Reviewed-by: Michael S. Tsirkin <mst@redhat.com> (PC) [AF: Renamed ms -> machine, use MACHINE_GET_CLASS()] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/arm/versatilepb.c')
-rw-r--r--hw/arm/versatilepb.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index e5493b428f..dea5fc7a95 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -173,7 +173,7 @@ static int vpb_sic_init(SysBusDevice *sbd)
static struct arm_boot_info versatile_binfo;
-static void versatile_init(QEMUMachineInitArgs *args, int board_id)
+static void versatile_init(MachineState *machine, int board_id)
{
ARMCPU *cpu;
MemoryRegion *sysmem = get_system_memory();
@@ -190,15 +190,15 @@ static void versatile_init(QEMUMachineInitArgs *args, int board_id)
int done_smc = 0;
DriveInfo *dinfo;
- if (!args->cpu_model) {
- args->cpu_model = "arm926";
+ if (!machine->cpu_model) {
+ machine->cpu_model = "arm926";
}
- cpu = cpu_arm_init(args->cpu_model);
+ cpu = cpu_arm_init(machine->cpu_model);
if (!cpu) {
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
- memory_region_init_ram(ram, NULL, "versatile.ram", args->ram_size);
+ memory_region_init_ram(ram, NULL, "versatile.ram", machine->ram_size);
vmstate_register_ram_global(ram);
/* ??? RAM should repeat to fill physical memory space. */
/* SDRAM at address zero. */
@@ -344,22 +344,22 @@ static void versatile_init(QEMUMachineInitArgs *args, int board_id)
fprintf(stderr, "qemu: Error registering flash memory.\n");
}
- versatile_binfo.ram_size = args->ram_size;
- versatile_binfo.kernel_filename = args->kernel_filename;
- versatile_binfo.kernel_cmdline = args->kernel_cmdline;
- versatile_binfo.initrd_filename = args->initrd_filename;
+ versatile_binfo.ram_size = machine->ram_size;
+ versatile_binfo.kernel_filename = machine->kernel_filename;
+ versatile_binfo.kernel_cmdline = machine->kernel_cmdline;
+ versatile_binfo.initrd_filename = machine->initrd_filename;
versatile_binfo.board_id = board_id;
arm_load_kernel(cpu, &versatile_binfo);
}
-static void vpb_init(QEMUMachineInitArgs *args)
+static void vpb_init(MachineState *machine)
{
- versatile_init(args, 0x183);
+ versatile_init(machine, 0x183);
}
-static void vab_init(QEMUMachineInitArgs *args)
+static void vab_init(MachineState *machine)
{
- versatile_init(args, 0x25e);
+ versatile_init(machine, 0x25e);
}
static QEMUMachine versatilepb_machine = {