@@ -87,7 +87,7 @@ static void an5206_init(ram_addr_t ram_size,
env->pc = entry;
}
-static QEMUMachine an5206_machine = {
+static const QEMUMachine an5206_machine = {
.name = "an5206",
.desc = "Arnewsh 5206",
.init = an5206_init,
@@ -343,7 +343,7 @@ void axisdev88_init (ram_addr_t ram_size,
cris_load_image(env, &li);
}
-static QEMUMachine axisdev88_machine = {
+static const QEMUMachine axisdev88_machine = {
.name = "axis-dev88",
.desc = "AXIS devboard 88",
.init = axisdev88_init,
@@ -66,7 +66,7 @@ static void dummy_m68k_init(ram_addr_t ram_size,
env->pc = entry;
}
-static QEMUMachine dummy_m68k_machine = {
+static const QEMUMachine dummy_m68k_machine = {
.name = "dummy",
.desc = "Dummy board",
.init = dummy_m68k_init,
@@ -145,7 +145,7 @@ void bareetraxfs_init (ram_addr_t ram_size,
}
}
-static QEMUMachine bareetraxfs_machine = {
+static const QEMUMachine bareetraxfs_machine = {
.name = "bareetraxfs",
.desc = "Bare ETRAX FS board",
.init = bareetraxfs_init,
@@ -120,13 +120,13 @@ static void verdex_init(ram_addr_t ram_size,
qdev_get_gpio_in(cpu->gpio, 99));
}
-static QEMUMachine connex_machine = {
+static const QEMUMachine connex_machine = {
.name = "connex",
.desc = "Gumstix Connex (PXA255)",
.init = connex_init,
};
-static QEMUMachine verdex_machine = {
+static const QEMUMachine verdex_machine = {
.name = "verdex",
.desc = "Gumstix Verdex (PXA270)",
.init = verdex_init,
@@ -512,7 +512,7 @@ static void integratorcp_init(ram_addr_t ram_size,
arm_load_kernel(env, &integrator_binfo);
}
-static QEMUMachine integratorcp_machine = {
+static const QEMUMachine integratorcp_machine = {
.name = "integratorcp",
.desc = "ARM Integrator/CP (ARM926EJ-S)",
.init = integratorcp_init,
@@ -202,7 +202,7 @@ static void leon3_generic_hw_init(ram_addr_t ram_size,
}
}
-QEMUMachine leon3_generic_machine = {
+static const QEMUMachine leon3_generic_machine = {
.name = "leon3_generic",
.desc = "Leon-3 generic",
.init = leon3_generic_hw_init,
@@ -282,14 +282,14 @@ static void lm32_uclinux_init(ram_addr_t ram_size_not_used,
qemu_register_reset(main_cpu_reset, reset_info);
}
-static QEMUMachine lm32_evr_machine = {
+static const QEMUMachine lm32_evr_machine = {
.name = "lm32-evr",
.desc = "LatticeMico32 EVR32 eval system",
.init = lm32_evr_init,
.is_default = 1
};
-static QEMUMachine lm32_uclinux_machine = {
+static const QEMUMachine lm32_uclinux_machine = {
.name = "lm32-uclinux",
.desc = "lm32 platform for uClinux and u-boot by Theobroma Systems",
.init = lm32_uclinux_init,
@@ -175,7 +175,7 @@ static void mainstone_init(ram_addr_t ram_size,
kernel_cmdline, initrd_filename, cpu_model, mainstone, 0x196);
}
-static QEMUMachine mainstone2_machine = {
+static const QEMUMachine mainstone2_machine = {
.name = "mainstone",
.desc = "Mainstone II (PXA27x)",
.init = mainstone_init,
@@ -291,7 +291,7 @@ static void mcf5208evb_init(ram_addr_t ram_size,
env->pc = entry;
}
-static QEMUMachine mcf5208evb_machine = {
+static const QEMUMachine mcf5208evb_machine = {
.name = "mcf5208evb",
.desc = "MCF5206EVB",
.init = mcf5208evb_init,
@@ -394,7 +394,7 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
network_init();
}
-QEMUMachine mips_fulong2e_machine = {
+static const QEMUMachine mips_fulong2e_machine = {
.name = "fulong2e",
.desc = "Fulong 2e mini pc",
.init = mips_fulong2e_init,
@@ -291,14 +291,14 @@ void mips_pica61_init (ram_addr_t ram_size,
mips_jazz_init(ram_size, cpu_model, JAZZ_PICA61);
}
-static QEMUMachine mips_magnum_machine = {
+static const QEMUMachine mips_magnum_machine = {
.name = "magnum",
.desc = "MIPS Magnum",
.init = mips_magnum_init,
.use_scsi = 1,
};
-static QEMUMachine mips_pica61_machine = {
+static const QEMUMachine mips_pica61_machine = {
.name = "pica61",
.desc = "Acer Pica 61",
.init = mips_pica61_init,
@@ -967,7 +967,7 @@ void mips_malta_init (ram_addr_t ram_size,
}
}
-static QEMUMachine mips_malta_machine = {
+static const QEMUMachine mips_malta_machine = {
.name = "malta",
.desc = "MIPS Malta Core LV",
.init = mips_malta_init,
@@ -198,7 +198,7 @@ mips_mipssim_init (ram_addr_t ram_size,
mipsnet_init(0x4200, env->irq[2], &nd_table[0]);
}
-static QEMUMachine mips_mipssim_machine = {
+static const QEMUMachine mips_mipssim_machine = {
.name = "mipssim",
.desc = "MIPS MIPSsim platform",
.init = mips_mipssim_init,
@@ -304,7 +304,7 @@ void mips_r4k_init (ram_addr_t ram_size,
isa_create_simple("i8042");
}
-static QEMUMachine mips_machine = {
+static const QEMUMachine mips_machine = {
.name = "mips",
.desc = "mips r4k platform",
.init = mips_r4k_init,
@@ -1636,7 +1636,7 @@ static void musicpal_init(ram_addr_t ram_size,
arm_load_kernel(env, &musicpal_binfo);
}
-static QEMUMachine musicpal_machine = {
+static const QEMUMachine musicpal_machine = {
.name = "musicpal",
.desc = "Marvell 88w8618 / MusicPal (ARM926EJ-S)",
.init = musicpal_init,
@@ -1396,13 +1396,13 @@ static void n810_init(ram_addr_t ram_size,
cpu_model, &n810_binfo, 810);
}
-static QEMUMachine n800_machine = {
+static const QEMUMachine n800_machine = {
.name = "n800",
.desc = "Nokia N800 tablet aka. RX-34 (OMAP2420)",
.init = n800_init,
};
-static QEMUMachine n810_machine = {
+static const QEMUMachine n810_machine = {
.name = "n810",
.desc = "Nokia N810 tablet aka. RX-44 (OMAP2420)",
.init = n810_init,
@@ -233,13 +233,13 @@ static void sx1_init_v2(ram_addr_t ram_size,
kernel_cmdline, initrd_filename, cpu_model, 2);
}
-static QEMUMachine sx1_machine_v2 = {
+static const QEMUMachine sx1_machine_v2 = {
.name = "sx1",
.desc = "Siemens SX1 (OMAP310) V2",
.init = sx1_init_v2,
};
-static QEMUMachine sx1_machine_v1 = {
+static const QEMUMachine sx1_machine_v1 = {
.name = "sx1-v1",
.desc = "Siemens SX1 (OMAP310) V1",
.init = sx1_init_v1,
@@ -275,7 +275,7 @@ static void palmte_init(ram_addr_t ram_size,
dpy_resize(ds);
}
-static QEMUMachine palmte_machine = {
+static const QEMUMachine palmte_machine = {
.name = "cheetah",
.desc = "Palm Tungsten|E aka. Cheetah PDA (OMAP310)",
.init = palmte_init,
@@ -227,7 +227,7 @@ static void pc_init_isa(ram_addr_t ram_size,
initrd_filename, cpu_model, 0, 1);
}
-static QEMUMachine pc_machine = {
+static const QEMUMachine pc_machine = {
.name = "pc-0.14",
.alias = "pc",
.desc = "Standard PC",
@@ -236,7 +236,7 @@ static QEMUMachine pc_machine = {
.is_default = 1,
};
-static QEMUMachine pc_machine_v0_13 = {
+static const QEMUMachine pc_machine_v0_13 = {
.name = "pc-0.13",
.desc = "Standard PC",
.init = pc_init_pci_no_kvmclock,
@@ -263,7 +263,7 @@ static QEMUMachine pc_machine_v0_13 = {
},
};
-static QEMUMachine pc_machine_v0_12 = {
+static const QEMUMachine pc_machine_v0_12 = {
.name = "pc-0.12",
.desc = "Standard PC",
.init = pc_init_pci_no_kvmclock,
@@ -294,7 +294,7 @@ static QEMUMachine pc_machine_v0_12 = {
}
};
-static QEMUMachine pc_machine_v0_11 = {
+static const QEMUMachine pc_machine_v0_11 = {
.name = "pc-0.11",
.desc = "Standard PC, qemu 0.11",
.init = pc_init_pci_no_kvmclock,
@@ -333,7 +333,7 @@ static QEMUMachine pc_machine_v0_11 = {
}
};
-static QEMUMachine pc_machine_v0_10 = {
+static const QEMUMachine pc_machine_v0_10 = {
.name = "pc-0.10",
.desc = "Standard PC, qemu 0.10",
.init = pc_init_pci_no_kvmclock,
@@ -384,7 +384,7 @@ static QEMUMachine pc_machine_v0_10 = {
},
};
-static QEMUMachine isapc_machine = {
+static const QEMUMachine isapc_machine = {
.name = "isapc",
.desc = "ISA-only PC",
.init = pc_init_isa,
@@ -251,7 +251,7 @@ petalogix_ml605_init(ram_addr_t ram_size,
}
}
-static QEMUMachine petalogix_ml605_machine = {
+static const QEMUMachine petalogix_ml605_machine = {
.name = "petalogix-ml605",
.desc = "PetaLogix linux refdesign for xilinx ml605 little endian",
.init = petalogix_ml605_init,
@@ -215,7 +215,7 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size,
}
}
-static QEMUMachine petalogix_s3adsp1800_machine = {
+static const QEMUMachine petalogix_s3adsp1800_machine = {
.name = "petalogix-s3adsp1800",
.desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800",
.init = petalogix_s3adsp1800_init,
@@ -353,7 +353,7 @@ static void ref405ep_init (ram_addr_t ram_size,
printf("bdloc %016lx\n", (unsigned long)bdloc);
}
-static QEMUMachine ref405ep_machine = {
+static const QEMUMachine ref405ep_machine = {
.name = "ref405ep",
.desc = "ref405ep",
.init = ref405ep_init,
@@ -639,7 +639,7 @@ static void taihu_405ep_init(ram_addr_t ram_size,
#endif
}
-static QEMUMachine taihu_machine = {
+static const QEMUMachine taihu_machine = {
.name = "taihu",
.desc = "taihu",
.init = taihu_405ep_init,
@@ -169,14 +169,14 @@ static void bamboo_init(ram_addr_t ram_size,
kvmppc_init();
}
-static QEMUMachine bamboo_machine = {
+static const QEMUMachine bamboo_machine = {
.name = "bamboo-0.13",
.alias = "bamboo",
.desc = "bamboo",
.init = bamboo_init,
};
-static QEMUMachine bamboo_machine_v0_12 = {
+static const QEMUMachine bamboo_machine_v0_12 = {
.name = "bamboo-0.12",
.desc = "bamboo",
.init = bamboo_init,
@@ -411,7 +411,7 @@ static void ppc_core99_init (ram_addr_t ram_size,
qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
}
-static QEMUMachine core99_machine = {
+static const QEMUMachine core99_machine = {
.name = "mac99",
.desc = "Mac99 based PowerMAC",
.init = ppc_core99_init,
@@ -314,7 +314,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
}
-static QEMUMachine heathrow_machine = {
+static const QEMUMachine heathrow_machine = {
.name = "g3beige",
.desc = "Heathrow based PowerMAC",
.init = ppc_heathrow_init,
@@ -756,7 +756,7 @@ static void ppc_prep_init (ram_addr_t ram_size,
register_ioport_write(0x0F00, 4, 1, &PPC_debug_write, NULL);
}
-static QEMUMachine prep_machine = {
+static const QEMUMachine prep_machine = {
.name = "prep",
.desc = "PowerPC PREP platform",
.init = ppc_prep_init,
@@ -283,7 +283,7 @@ static void mpc8544ds_init(ram_addr_t ram_size,
return;
}
-static QEMUMachine mpc8544ds_machine = {
+static const QEMUMachine mpc8544ds_machine = {
.name = "mpc8544ds",
.desc = "mpc8544ds",
.init = mpc8544ds_init,
@@ -327,7 +327,7 @@ static void r2d_init(ram_addr_t ram_size,
SDRAM_BASE + BOOT_PARAMS_OFFSET);
}
-static QEMUMachine r2d_machine = {
+static const QEMUMachine r2d_machine = {
.name = "r2d",
.desc = "r2d-plus board",
.init = r2d_init,
@@ -427,7 +427,7 @@ static void realview_pbx_a9_init(ram_addr_t ram_size,
initrd_filename, cpu_model, BOARD_PBX_A9);
}
-static QEMUMachine realview_eb_machine = {
+static const QEMUMachine realview_eb_machine = {
.name = "realview-eb",
.desc = "ARM RealView Emulation Baseboard (ARM926EJ-S)",
.init = realview_eb_init,
@@ -435,7 +435,7 @@ static QEMUMachine realview_eb_machine = {
.max_ram = 256 * 1024 * 1024,
};
-static QEMUMachine realview_eb_mpcore_machine = {
+static const QEMUMachine realview_eb_mpcore_machine = {
.name = "realview-eb-mpcore",
.desc = "ARM RealView Emulation Baseboard (ARM11MPCore)",
.init = realview_eb_mpcore_init,
@@ -444,7 +444,7 @@ static QEMUMachine realview_eb_mpcore_machine = {
.max_ram = 256 * 1024 * 1024,
};
-static QEMUMachine realview_pb_a8_machine = {
+static const QEMUMachine realview_pb_a8_machine = {
.name = "realview-pb-a8",
.desc = "ARM RealView Platform Baseboard for Cortex-A8",
.init = realview_pb_a8_init,
@@ -455,7 +455,7 @@ static QEMUMachine realview_pb_a8_machine = {
.max_ram = 1024 * 1024 * 1024,
};
-static QEMUMachine realview_pbx_a9_machine = {
+static const QEMUMachine realview_pbx_a9_machine = {
.name = "realview-pbx-a9",
.desc = "ARM RealView Platform Baseboard Explore for Cortex-A9",
.init = realview_pbx_a9_init,
@@ -269,7 +269,7 @@ static void s390_init(ram_addr_t ram_size,
}
}
-static QEMUMachine s390_machine = {
+static const QEMUMachine s390_machine = {
.name = "s390-virtio",
.alias = "s390",
.desc = "VirtIO based S390 machine",
@@ -89,7 +89,7 @@ static void shix_init(ram_addr_t ram_size,
fprintf(stderr, "initialization terminated\n");
}
-static QEMUMachine shix_machine = {
+static const QEMUMachine shix_machine = {
.name = "shix",
.desc = "shix card",
.init = shix_init,
@@ -980,25 +980,25 @@ static void terrier_init(ram_addr_t ram_size,
kernel_cmdline, initrd_filename, cpu_model, terrier, 0x33f);
}
-static QEMUMachine akitapda_machine = {
+static const QEMUMachine akitapda_machine = {
.name = "akita",
.desc = "Akita PDA (PXA270)",
.init = akita_init,
};
-static QEMUMachine spitzpda_machine = {
+static const QEMUMachine spitzpda_machine = {
.name = "spitz",
.desc = "Spitz PDA (PXA270)",
.init = spitz_init,
};
-static QEMUMachine borzoipda_machine = {
+static const QEMUMachine borzoipda_machine = {
.name = "borzoi",
.desc = "Borzoi PDA (PXA270)",
.init = borzoi_init,
};
-static QEMUMachine terrierpda_machine = {
+static const QEMUMachine terrierpda_machine = {
.name = "terrier",
.desc = "Terrier PDA (PXA270)",
.init = terrier_init,
@@ -1433,13 +1433,13 @@ static void lm3s6965evb_init(ram_addr_t ram_size,
stellaris_init(kernel_filename, cpu_model, &stellaris_boards[1]);
}
-static QEMUMachine lm3s811evb_machine = {
+static const QEMUMachine lm3s811evb_machine = {
.name = "lm3s811evb",
.desc = "Stellaris LM3S811EVB",
.init = lm3s811evb_init,
};
-static QEMUMachine lm3s6965evb_machine = {
+static const QEMUMachine lm3s6965evb_machine = {
.name = "lm3s6965evb",
.desc = "Stellaris LM3S6965EVB",
.init = lm3s6965evb_init,
@@ -910,7 +910,7 @@ static void niagara_init(ram_addr_t RAM_size,
kernel_cmdline, initrd_filename, cpu_model, &hwdefs[2]);
}
-static QEMUMachine sun4u_machine = {
+static const QEMUMachine sun4u_machine = {
.name = "sun4u",
.desc = "Sun4u platform",
.init = sun4u_init,
@@ -918,14 +918,14 @@ static QEMUMachine sun4u_machine = {
.is_default = 1,
};
-static QEMUMachine sun4v_machine = {
+static const QEMUMachine sun4v_machine = {
.name = "sun4v",
.desc = "Sun4v platform",
.init = sun4v_init,
.max_cpus = 1, // XXX for now
};
-static QEMUMachine niagara_machine = {
+static const QEMUMachine niagara_machine = {
.name = "Niagara",
.desc = "Sun4v platform, Niagara",
.init = niagara_init,
@@ -98,7 +98,7 @@ static void syborg_init(ram_addr_t ram_size,
arm_load_kernel(env, &syborg_binfo);
}
-static QEMUMachine syborg_machine = {
+static const QEMUMachine syborg_machine = {
.name = "syborg",
.desc = "Syborg (Symbian Virtual Platform)",
.init = syborg_init,
@@ -243,7 +243,7 @@ static void tosa_init(ram_addr_t ram_size,
sl_bootparam_write(SL_PXA_PARAM_BASE);
}
-static QEMUMachine tosapda_machine = {
+static const QEMUMachine tosapda_machine = {
.name = "tosa",
.desc = "Tosa PDA (PXA255)",
.init = tosa_init,
@@ -324,7 +324,7 @@ static void vab_init(ram_addr_t ram_size,
initrd_filename, cpu_model, 0x25e);
}
-static QEMUMachine versatilepb_machine = {
+static const QEMUMachine versatilepb_machine = {
.name = "versatilepb",
.desc = "ARM Versatile/PB (ARM926EJ-S)",
.init = vpb_init,
@@ -335,7 +335,7 @@ static QEMUMachine versatilepb_machine = {
.max_ram = 256 * 1024 * 1024,
};
-static QEMUMachine versatileab_machine = {
+static const QEMUMachine versatileab_machine = {
.name = "versatileab",
.desc = "ARM Versatile/AB (ARM926EJ-S)",
.init = vab_init,
@@ -262,7 +262,7 @@ static void virtex_init(ram_addr_t ram_size,
env->load_info = &boot_info;
}
-static QEMUMachine virtex_machine = {
+static const QEMUMachine virtex_machine = {
.name = "virtex-ml507",
.desc = "Xilinx Virtex ML507 reference design",
.init = virtex_init,
@@ -109,7 +109,7 @@ static void xen_init_pv(ram_addr_t ram_size,
xen_init_display(xen_domid);
}
-static QEMUMachine xenpv_machine = {
+static const QEMUMachine xenpv_machine = {
.name = "xenpv",
.desc = "Xen Para-virtualized PC",
.init = xen_init_pv,
Now that qemu_register_machine() accepts a const QEMUMachine *, we can mark all the static QEMUMachine structure definitions for boards as being const. This patch was mostly automatically generated via: sed -i -e 's/^static QEMUMachine /static const QEMUMachine /' hw/*.c and then checked for completeness with a grep for QEMUMachine, which showed up the mips_fulong2e and leon3 machines which were missing a 'static' (which has been added here). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- hw/an5206.c | 2 +- hw/axis_dev88.c | 2 +- hw/dummy_m68k.c | 2 +- hw/etraxfs.c | 2 +- hw/gumstix.c | 4 ++-- hw/integratorcp.c | 2 +- hw/leon3.c | 2 +- hw/lm32_boards.c | 4 ++-- hw/mainstone.c | 2 +- hw/mcf5208.c | 2 +- hw/mips_fulong2e.c | 2 +- hw/mips_jazz.c | 4 ++-- hw/mips_malta.c | 2 +- hw/mips_mipssim.c | 2 +- hw/mips_r4k.c | 2 +- hw/musicpal.c | 2 +- hw/nseries.c | 4 ++-- hw/omap_sx1.c | 4 ++-- hw/palm.c | 2 +- hw/pc_piix.c | 12 ++++++------ hw/petalogix_ml605_mmu.c | 2 +- hw/petalogix_s3adsp1800_mmu.c | 2 +- hw/ppc405_boards.c | 4 ++-- hw/ppc440_bamboo.c | 4 ++-- hw/ppc_newworld.c | 2 +- hw/ppc_oldworld.c | 2 +- hw/ppc_prep.c | 2 +- hw/ppce500_mpc8544ds.c | 2 +- hw/r2d.c | 2 +- hw/realview.c | 8 ++++---- hw/s390-virtio.c | 2 +- hw/shix.c | 2 +- hw/spitz.c | 8 ++++---- hw/stellaris.c | 4 ++-- hw/sun4u.c | 6 +++--- hw/syborg.c | 2 +- hw/tosa.c | 2 +- hw/versatilepb.c | 4 ++-- hw/virtex_ml507.c | 2 +- hw/xen_machine_pv.c | 2 +- 40 files changed, 62 insertions(+), 62 deletions(-)