mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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>
This commit is contained in:
parent
0380aef323
commit
3ef9622182
65 changed files with 545 additions and 549 deletions
|
@ -199,13 +199,13 @@ enum cxmachines {
|
|||
* 32-bit host, set the reg value of memory to 0xf7ff00000 in the
|
||||
* device tree and pass -m 2047 to QEMU.
|
||||
*/
|
||||
static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine)
|
||||
static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
|
||||
{
|
||||
ram_addr_t ram_size = args->ram_size;
|
||||
const char *cpu_model = args->cpu_model;
|
||||
const char *kernel_filename = args->kernel_filename;
|
||||
const char *kernel_cmdline = args->kernel_cmdline;
|
||||
const char *initrd_filename = args->initrd_filename;
|
||||
ram_addr_t ram_size = machine->ram_size;
|
||||
const char *cpu_model = machine->cpu_model;
|
||||
const char *kernel_filename = machine->kernel_filename;
|
||||
const char *kernel_cmdline = machine->kernel_cmdline;
|
||||
const char *initrd_filename = machine->initrd_filename;
|
||||
DeviceState *dev = NULL;
|
||||
SysBusDevice *busdev;
|
||||
qemu_irq pic[128];
|
||||
|
@ -217,7 +217,7 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine)
|
|||
char *sysboot_filename;
|
||||
|
||||
if (!cpu_model) {
|
||||
switch (machine) {
|
||||
switch (machine_id) {
|
||||
case CALXEDA_HIGHBANK:
|
||||
cpu_model = "cortex-a9";
|
||||
break;
|
||||
|
@ -274,7 +274,7 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine)
|
|||
}
|
||||
}
|
||||
|
||||
switch (machine) {
|
||||
switch (machine_id) {
|
||||
case CALXEDA_HIGHBANK:
|
||||
dev = qdev_create(NULL, "l2x0");
|
||||
qdev_init_nofail(dev);
|
||||
|
@ -359,14 +359,14 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine)
|
|||
arm_load_kernel(ARM_CPU(first_cpu), &highbank_binfo);
|
||||
}
|
||||
|
||||
static void highbank_init(QEMUMachineInitArgs *args)
|
||||
static void highbank_init(MachineState *machine)
|
||||
{
|
||||
calxeda_init(args, CALXEDA_HIGHBANK);
|
||||
calxeda_init(machine, CALXEDA_HIGHBANK);
|
||||
}
|
||||
|
||||
static void midway_init(QEMUMachineInitArgs *args)
|
||||
static void midway_init(MachineState *machine)
|
||||
{
|
||||
calxeda_init(args, CALXEDA_MIDWAY);
|
||||
calxeda_init(machine, CALXEDA_MIDWAY);
|
||||
}
|
||||
|
||||
static QEMUMachine highbank_machine = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue