@@ -285,7 +285,7 @@ struct MachineClass {
no_cdrom:1,
pci_allow_0_address:1,
legacy_fw_cfg_order:1;
- OnOffAuto no_sdcard;
+ bool create_default_sdcard_drive;
bool is_default;
const char *default_machine_opts;
const char *default_boot_order;
@@ -213,7 +213,7 @@ static void clipper_machine_init(MachineClass *mc)
mc->default_cpu_type = ALPHA_CPU_TYPE_NAME("ev67");
mc->default_ram_id = "ram";
mc->default_nic = "e1000";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("clipper", clipper_machine_init)
@@ -1193,7 +1193,7 @@ static void aspeed_machine_class_init_cpus_defaults(MachineClass *mc)
mc->min_cpus = sc->num_cpus;
mc->max_cpus = sc->num_cpus;
mc->valid_cpu_types = sc->valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static bool aspeed_machine_ast2600_get_boot_from_emmc(Object *obj, Error **errp)
@@ -1233,7 +1233,7 @@ static void aspeed_machine_class_init(ObjectClass *oc, void *data)
mc->no_floppy = 1;
mc->no_cdrom = 1;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->default_ram_id = "ram";
amc->macs_mask = ASPEED_MAC0_ON;
amc->uart_default = ASPEED_DEV_UART5;
@@ -120,7 +120,7 @@ static void bl475e_machine_init(ObjectClass *oc, void *data)
mc->desc = "B-L475E-IOT01A Discovery Kit (Cortex-M4)";
mc->init = bl475e_init;
mc->valid_cpu_types = machine_valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
/* SRAM pre-allocated as part of the SoC instantiation */
mc->default_ram_size = 0;
@@ -141,7 +141,7 @@ static void bpim2u_machine_init(MachineClass *mc)
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "bpim2u.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("bpim2u", bpim2u_machine_init)
@@ -79,7 +79,7 @@ static void collie_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("sa1110");
mc->default_ram_size = RAM_SIZE;
mc->default_ram_id = "strongarm.sdram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo collie_machine_typeinfo = {
@@ -122,7 +122,7 @@ static void cubieboard_machine_init(MachineClass *mc)
mc->units_per_default_bus = 1;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "cubieboard.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("cubieboard", cubieboard_machine_init)
@@ -143,7 +143,7 @@ static void canon_a1100_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
mc->default_ram_size = 64 * MiB;
mc->default_ram_id = "ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("canon-a1100", canon_a1100_machine_init)
@@ -165,7 +165,7 @@ static void nuri_class_init(ObjectClass *oc, void *data)
mc->min_cpus = EXYNOS4210_NCPUS;
mc->default_cpus = EXYNOS4210_NCPUS;
mc->ignore_memory_transaction_failures = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo nuri_type = {
@@ -185,7 +185,7 @@ static void smdkc210_class_init(ObjectClass *oc, void *data)
mc->min_cpus = EXYNOS4210_NCPUS;
mc->default_cpus = EXYNOS4210_NCPUS;
mc->ignore_memory_transaction_failures = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo smdkc210_type = {
@@ -170,7 +170,7 @@ static void fby35_class_init(ObjectClass *oc, void *data)
mc->init = fby35_init;
mc->no_floppy = 1;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->min_cpus = mc->max_cpus = mc->default_cpus = 3;
object_class_property_add_bool(oc, "execute-in-place",
@@ -357,7 +357,7 @@ static void highbank_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "highbank.dram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo highbank_type = {
@@ -382,7 +382,7 @@ static void midway_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "highbank.dram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo midway_type = {
@@ -147,7 +147,7 @@ static void imx25_pdk_machine_init(MachineClass *mc)
mc->init = imx25_pdk_init;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "imx25.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("imx25-pdk", imx25_pdk_machine_init)
@@ -688,7 +688,7 @@ static void integratorcp_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "integrator.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -137,7 +137,7 @@ static void kzm_machine_init(MachineClass *mc)
mc->init = kzm_init;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "kzm.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("kzm", kzm_machine_init)
@@ -74,6 +74,6 @@ static void mcimx6ul_evk_machine_init(MachineClass *mc)
mc->init = mcimx6ul_evk_init;
mc->max_cpus = FSL_IMX6UL_NUM_CPUS;
mc->default_ram_id = "mcimx6ul-evk.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("mcimx6ul-evk", mcimx6ul_evk_machine_init)
@@ -74,6 +74,6 @@ static void mcimx7d_sabre_machine_init(MachineClass *mc)
mc->init = mcimx7d_sabre_init;
mc->max_cpus = FSL_IMX7_NUM_CPUS;
mc->default_ram_id = "mcimx7d-sabre.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("mcimx7d-sabre", mcimx7d_sabre_machine_init)
@@ -67,7 +67,7 @@ static void microbit_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "BBC micro:bit (Cortex-M0)";
mc->init = microbit_init;
mc->max_cpus = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo microbit_info = {
@@ -1273,7 +1273,7 @@ static void mps2tz_class_init(ObjectClass *oc, void *data)
IDAUInterfaceClass *iic = IDAU_INTERFACE_CLASS(oc);
MPS2TZMachineClass *mmc = MPS2TZ_MACHINE_CLASS(oc);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->init = mps2tz_common_init;
mc->reset = mps2_machine_reset;
iic->check = mps2_tz_idau_check;
@@ -472,7 +472,7 @@ static void mps2_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->default_ram_size = 16 * MiB;
mc->default_ram_id = "mps.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static void mps2_an385_class_init(ObjectClass *oc, void *data)
@@ -588,7 +588,7 @@ static void mps3r_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
mc->init = mps3r_common_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static void mps3r_an536_class_init(ObjectClass *oc, void *data)
@@ -106,7 +106,7 @@ static void emcraft_sf2_machine_init(MachineClass *mc)
mc->desc = "SmartFusion2 SOM kit from Emcraft (M2S010)";
mc->init = emcraft_sf2_s2s010_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("emcraft-sf2", emcraft_sf2_machine_init)
@@ -607,7 +607,7 @@ static void musca_class_init(ObjectClass *oc, void *data)
mc->max_cpus = mc->default_cpus;
mc->valid_cpu_types = valid_cpu_types;
mc->init = musca_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static void musca_a_class_init(ObjectClass *oc, void *data)
@@ -1342,7 +1342,7 @@ static void musicpal_machine_init(MachineClass *mc)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_size = MP_RAM_DEFAULT_SIZE;
mc->default_ram_id = "musicpal.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -63,7 +63,7 @@ static void netduino2_machine_init(MachineClass *mc)
mc->init = netduino2_init;
mc->valid_cpu_types = valid_cpu_types;
mc->ignore_memory_transaction_failures = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("netduino2", netduino2_machine_init)
@@ -63,7 +63,7 @@ static void netduinoplus2_machine_init(MachineClass *mc)
mc->desc = "Netduino Plus 2 Machine (Cortex-M4)";
mc->init = netduinoplus2_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("netduinoplus2", netduinoplus2_machine_init)
@@ -464,7 +464,7 @@ static void npcm7xx_machine_class_init(ObjectClass *oc, void *data)
mc->no_floppy = 1;
mc->no_cdrom = 1;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->default_ram_id = "ram";
mc->valid_cpu_types = valid_cpu_types;
}
@@ -66,7 +66,7 @@ static void olimex_stm32_h405_machine_init(MachineClass *mc)
mc->desc = "Olimex STM32-H405 (Cortex-M4)";
mc->init = olimex_stm32_h405_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
/* SRAM pre-allocated as part of the SoC instantiation */
mc->default_ram_size = 0;
@@ -216,7 +216,7 @@ static void sx1_machine_v2_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("ti925t");
mc->default_ram_size = SDRAM_SIZE;
mc->default_ram_id = "omap1.dram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo sx1_machine_v2_type = {
@@ -235,7 +235,7 @@ static void sx1_machine_v1_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("ti925t");
mc->default_ram_size = SDRAM_SIZE;
mc->default_ram_id = "omap1.dram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo sx1_machine_v1_type = {
@@ -121,7 +121,7 @@ static void orangepi_machine_init(MachineClass *mc)
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "orangepi.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("orangepi-pc", orangepi_machine_init)
@@ -325,7 +325,7 @@ void raspi_machine_class_common_init(MachineClass *mc,
mc->no_parallel = 1;
mc->no_floppy = 1;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->default_cpus = mc->min_cpus = mc->max_cpus = cores_count(board_rev);
mc->default_ram_size = board_ram_size(board_rev);
mc->default_ram_id = "ram";
@@ -415,7 +415,7 @@ static void realview_eb_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -436,7 +436,7 @@ static void realview_eb_mpcore_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm11mpcore");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -455,7 +455,7 @@ static void realview_pb_a8_class_init(ObjectClass *oc, void *data)
mc->init = realview_pb_a8_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a8");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -475,7 +475,7 @@ static void realview_pbx_a9_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -110,7 +110,7 @@ static void sabrelite_machine_init(MachineClass *mc)
mc->max_cpus = FSL_IMX6_NUM_CPUS;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "sabrelite.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("sabrelite", sabrelite_machine_init)
@@ -900,7 +900,7 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
mc->minimum_page_bits = 12;
mc->block_default_type = IF_IDE;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->default_nic = "e1000e";
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "sbsa-ref.ram";
@@ -1388,7 +1388,7 @@ static void lm3s811evb_class_init(ObjectClass *oc, void *data)
mc->init = lm3s811evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo lm3s811evb_type = {
@@ -1405,7 +1405,7 @@ static void lm3s6965evb_class_init(ObjectClass *oc, void *data)
mc->init = lm3s6965evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo lm3s6965evb_type = {
@@ -66,7 +66,7 @@ static void stm32vldiscovery_machine_init(MachineClass *mc)
mc->desc = "ST STM32VLDISCOVERY (Cortex-M3)";
mc->init = stm32vldiscovery_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("stm32vldiscovery", stm32vldiscovery_machine_init)
@@ -419,7 +419,7 @@ static void versatilepb_class_init(ObjectClass *oc, void *data)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "versatile.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -440,7 +440,7 @@ static void versatileab_class_init(ObjectClass *oc, void *data)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "versatile.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -783,7 +783,7 @@ static void vexpress_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "vexpress.highmem";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
object_class_property_add_bool(oc, "secure", vexpress_get_secure,
@@ -3124,7 +3124,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
#endif
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->pci_allow_0_address = true;
/* We know we will never create a pre-ARMv7 CPU which needs 1K pages */
mc->minimum_page_bits = 12;
@@ -75,7 +75,7 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
* mc->max_cpus, QEMU will bail out with an error message.
*/
mc->max_cpus = GUEST_MAX_VCPUS;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
/* Xen/ARM does not use buffered IOREQs. */
xpc->handle_bufioreq = HVM_IOREQSRV_BUFIOREQ_OFF;
@@ -463,11 +463,11 @@ static void zynq_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Xilinx Zynq Platform Baseboard for Cortex-A9";
mc->init = zynq_init;
mc->max_cpus = ZYNQ_MAX_CPUS;
- mc->no_sdcard = ON_OFF_AUTO_ON;
+ mc->create_default_sdcard_drive = false;
mc->ignore_memory_transaction_failures = true;
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_id = "zynq.ext_ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
prop = object_class_property_add_str(oc, "boot-mode", NULL,
zynq_set_boot_mode);
object_class_property_set_description(oc, "boot-mode",
@@ -818,7 +818,7 @@ static void versal_virt_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = XLNX_VERSAL_NR_ACPUS + XLNX_VERSAL_NR_RCPUS;
mc->default_cpus = XLNX_VERSAL_NR_ACPUS + XLNX_VERSAL_NR_RCPUS;
mc->no_cdrom = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->default_ram_id = "ddr";
object_class_property_add_str(oc, "ospi-flash", versal_get_ospi_model,
versal_set_ospi_model);
@@ -280,7 +280,7 @@ static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = XLNX_ZYNQMP_NUM_APU_CPUS + XLNX_ZYNQMP_NUM_RPU_CPUS;
mc->default_cpus = XLNX_ZYNQMP_NUM_APU_CPUS;
mc->default_ram_id = "ddr-ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
object_class_property_add_bool(oc, "secure", zcu102_get_secure,
@@ -67,7 +67,7 @@ static void arduino_machine_class_init(ObjectClass *oc, void *data)
mc->no_floppy = 1;
mc->no_cdrom = 1;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static void arduino_duemilanove_class_init(ObjectClass *oc, void *data)
@@ -53,7 +53,7 @@ static void machine_none_machine_init(MachineClass *mc)
mc->no_parallel = 1;
mc->no_floppy = 1;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_ON;
+ mc->create_default_sdcard_drive = false;
}
DEFINE_MACHINE("none", machine_none_machine_init)
@@ -708,7 +708,7 @@ static void HP_B160L_machine_init_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_ram_id = "ram";
mc->default_nic = "tulip";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
nc->nmi_monitor_handler = hppa_nmi;
}
@@ -745,7 +745,7 @@ static void HP_C3700_machine_init_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_ram_id = "ram";
mc->default_nic = "tulip";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
nc->nmi_monitor_handler = hppa_nmi;
}
@@ -1794,7 +1794,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
mc->smp_props.dies_supported = true;
mc->smp_props.modules_supported = true;
mc->default_ram_id = "pc.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_AUTO;
object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size",
@@ -382,7 +382,7 @@ static void x86_machine_class_init(ObjectClass *oc, void *data)
mc->get_default_cpu_node_id = x86_get_default_cpu_node_id;
mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids;
mc->kvm_type = x86_kvm_type;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
x86mc->save_tsc_khz = true;
x86mc->fwcfg_dma_enabled = true;
nc->nmi_monitor_handler = x86_nmi;
@@ -82,7 +82,7 @@ static void xen_pvh_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Xen PVH x86 machine";
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
/* mc->max_cpus holds the MAX value allowed in the -smp cmd-line opts. */
mc->max_cpus = HVM_MAX_VCPUS;
@@ -1449,7 +1449,7 @@ static void virt_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_VIRTIO;
mc->default_boot_order = "c";
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = virt_cpu_index_to_props;
mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
@@ -99,7 +99,7 @@ static void an5206_machine_init(MachineClass *mc)
mc->init = an5206_init;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5206");
mc->default_ram_id = "an5206.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("an5206", an5206_machine_init)
@@ -398,7 +398,7 @@ static void mcf5208evb_machine_init(MachineClass *mc)
mc->is_default = true;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5208");
mc->default_ram_id = "mcf5208.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("mcf5208evb", mcf5208evb_machine_init)
@@ -1068,7 +1068,7 @@ static void next_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = RAM_SIZE;
mc->default_ram_id = "next.ram";
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m68040");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo next_typeinfo = {
@@ -743,7 +743,7 @@ static void q800_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->block_default_type = IF_SCSI;
mc->default_ram_id = "m68k_mac.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
compat_props_add(mc->compat_props, hw_compat_q800, hw_compat_q800_len);
@@ -318,7 +318,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->no_floppy = 1;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->default_ram_id = "m68k_virt.ram";
}
@@ -220,7 +220,7 @@ static void petalogix_ml605_machine_init(MachineClass *mc)
mc->desc = "PetaLogix linux refdesign for xilinx ml605 (little endian)";
#endif
mc->init = petalogix_ml605_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("petalogix-ml605", petalogix_ml605_machine_init)
@@ -142,7 +142,7 @@ static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800";
mc->init = petalogix_s3adsp1800_init;
mc->is_default = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo petalogix_s3adsp1800_machine_types[] = {
@@ -188,7 +188,7 @@ static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc)
mc->desc = "Xilinx ZynqMP PMU machine (little endian)";
#endif
mc->init = xlnx_zynqmp_pmu_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("xlnx-zynqmp-pmu", xlnx_zynqmp_pmu_machine_init)
@@ -842,7 +842,7 @@ static void boston_mach_class_init(MachineClass *mc)
mc->default_ram_id = "boston.ddr";
mc->max_cpus = 16;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("I6400");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("boston", boston_mach_class_init)
@@ -334,7 +334,7 @@ static void mips_fuloong2e_machine_init(MachineClass *mc)
mc->default_ram_size = 256 * MiB;
mc->default_ram_id = "fuloong2e.ram";
mc->minimum_page_bits = 14;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -424,7 +424,7 @@ static void mips_magnum_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
mc->default_ram_id = "mips_jazz.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo mips_magnum_type = {
@@ -442,7 +442,7 @@ static void mips_pica61_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
mc->default_ram_id = "mips_jazz.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo mips_pica61_type = {
@@ -672,7 +672,7 @@ static void loongson3v_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 1600 * MiB;
mc->minimum_page_bits = 14;
mc->default_nic = "virtio-net-pci";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo loongson3_machine_types[] = {
@@ -1304,7 +1304,7 @@ static void mips_malta_machine_init(MachineClass *mc)
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
#endif
mc->default_ram_id = "mips_malta.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
compat_props_add(mc->compat_props, malta_compat, malta_compat_len);
}
@@ -246,7 +246,7 @@ static void mips_mipssim_machine_init(MachineClass *mc)
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
#endif
mc->default_ram_id = "mips_mipssim.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("mipssim", mips_mipssim_machine_init)
@@ -354,7 +354,7 @@ static void openrisc_sim_machine_init(ObjectClass *oc, void *data)
mc->max_cpus = OR1KSIM_CPUS_MAX;
mc->is_default = true;
mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo or1ksim_machine_typeinfo = {
@@ -554,7 +554,7 @@ static void openrisc_virt_machine_init(ObjectClass *oc, void *data)
mc->max_cpus = VIRT_CPUS_MAX;
mc->is_default = false;
mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo or1ksim_machine_typeinfo = {
@@ -173,7 +173,7 @@ static void amigaone_machine_init(MachineClass *mc)
mc->default_display = "std";
mc->default_ram_id = "ram";
mc->default_ram_size = 512 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("amigaone", amigaone_machine_init)
@@ -1289,7 +1289,7 @@ static void ppce500_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo e500_ccsr_info = {
@@ -100,7 +100,7 @@ static void e500plat_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_ETSEC_COMMON);
}
@@ -579,7 +579,7 @@ static void core99_machine_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_display = "std";
mc->default_nic = "sungem";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->kvm_type = core99_kvm_type;
#ifdef TARGET_PPC64
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("970fx_v3.1");
@@ -427,7 +427,7 @@ static void heathrow_class_init(ObjectClass *oc, void *data)
mc->default_nic = "ne2k_pci";
mc->ignore_boot_device_suffixes = true;
mc->default_ram_id = "ppc_heathrow.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
fwc->get_dev_path = heathrow_fw_dev_path;
}
@@ -62,7 +62,7 @@ static void mpc8544ds_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
#define TYPE_MPC8544DS_MACHINE MACHINE_TYPE_NAME("mpc8544ds")
@@ -576,7 +576,7 @@ static void pegasos2_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("7457_v1.2");
mc->default_ram_id = "pegasos2.ram";
mc->default_ram_size = 512 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
vhc->cpu_in_nested = pegasos2_cpu_in_nested;
@@ -2879,7 +2879,7 @@ static void pnv_machine_class_init(ObjectClass *oc, void *data)
/* Pnv provides a AHCI device for storage */
mc->block_default_type = IF_IDE;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->default_boot_order = NULL;
/*
* RAM defaults to less than 2048 for 32-bit hosts, and large
@@ -351,7 +351,7 @@ static void ppc405_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 128 * MiB;
mc->default_ram_id = "ppc405.ram";
mc->deprecation_reason = "machine is old and unmaintained";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo ppc405_machine_type = {
@@ -267,7 +267,7 @@ static void bamboo_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440epb");
mc->default_ram_id = "ppc4xx.sdram";
mc->default_nic = "e1000";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("bamboo", bamboo_machine_init)
@@ -428,7 +428,7 @@ static void ibm_40p_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("604");
mc->default_display = "std";
mc->default_nic = "pcnet";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
machine_add_audiodev_property(mc);
}
@@ -524,7 +524,7 @@ static void sam460ex_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("460exb");
mc->default_ram_size = 512 * MiB;
mc->default_ram_id = "ppc4xx.sdram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("sam460ex", sam460ex_machine_init)
@@ -4594,7 +4594,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = SPAPR_IRQ_NR_IPIS;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->default_boot_order = "";
mc->default_ram_size = 512 * MiB;
mc->default_ram_id = "ppc_spapr.ram";
@@ -288,7 +288,7 @@ static void virtex_machine_init(MachineClass *mc)
mc->init = virtex_init;
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440-xilinx");
mc->default_ram_id = "ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("virtex-ml507", virtex_machine_init)
@@ -128,7 +128,7 @@ static void remote_machine_class_init(ObjectClass *oc, void *data)
mc->init = remote_machine_init;
mc->desc = "Experimental remote machine";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
hc->unplug = remote_machine_dev_unplug_cb;
@@ -647,7 +647,7 @@ static void microchip_icicle_kit_machine_class_init(ObjectClass *oc, void *data)
mc->min_cpus = MICROCHIP_PFSOC_MANAGEMENT_CPU_COUNT + 1;
mc->default_cpus = mc->min_cpus;
mc->default_ram_id = "microchip.icicle.kit.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
/*
* Map 513 MiB high memory, the minimum required high memory size, because
@@ -119,7 +119,7 @@ static void opentitan_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_IBEX;
mc->default_ram_id = "riscv.lowrisc.ibex.ram";
mc->default_ram_size = ibex_memmap[IBEX_DEV_RAM].size;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static void lowrisc_ibex_soc_init(Object *obj)
@@ -84,7 +84,7 @@ static void shakti_c_machine_class_init(ObjectClass *klass, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_SHAKTI_C;
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_id = "riscv.shakti.c.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo shakti_c_machine_type_info = {
@@ -151,7 +151,7 @@ static void sifive_e_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = SIFIVE_E_CPU;
mc->default_ram_id = "riscv.sifive.e.ram";
mc->default_ram_size = sifive_e_memmap[SIFIVE_E_DEV_DTIM].size;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
object_class_property_add_bool(oc, "revb", sifive_e_machine_get_revb,
sifive_e_machine_set_revb);
@@ -720,7 +720,7 @@ static void sifive_u_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = SIFIVE_U_CPU;
mc->default_cpus = mc->min_cpus;
mc->default_ram_id = "riscv.sifive.u.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
object_class_property_add_bool(oc, "start-in-flash",
sifive_u_machine_get_start_in_flash,
@@ -356,7 +356,7 @@ static void spike_machine_class_init(ObjectClass *oc, void *data)
/* platform instead of architectural choice */
mc->cpu_cluster_has_numa_boundary = true;
mc->default_ram_id = "riscv.spike.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
object_class_property_add_str(oc, "signature", NULL, spike_set_signature);
object_class_property_set_description(oc, "signature",
"File to write ACT test signature");
@@ -1805,7 +1805,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_BASE;
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
mc->pci_allow_0_address = true;
mc->possible_cpu_arch_ids = riscv_numa_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;
@@ -166,7 +166,7 @@ static void rx_gdbsim_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RX62N_CPU;
mc->default_ram_size = 16 * MiB;
mc->default_ram_id = "ext-sdram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static void rx62n7_class_init(ObjectClass *oc, void *data)
@@ -747,7 +747,7 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
mc->no_cdrom = 1;
mc->no_floppy = 1;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_ON;
+ mc->create_default_sdcard_drive = false;
mc->max_cpus = S390_MAX_CPUS;
mc->has_hotpluggable_cpus = true;
mc->smp_props.books_supported = true;
@@ -378,7 +378,7 @@ static void r2d_machine_init(MachineClass *mc)
mc->block_default_type = IF_IDE;
mc->default_cpu_type = TYPE_SH7751R_CPU;
mc->default_nic = "rtl8139";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("r2d", r2d_machine_init)
@@ -440,7 +440,7 @@ static void leon3_generic_machine_init(MachineClass *mc)
mc->default_cpu_type = SPARC_CPU_TYPE_NAME("LEON3");
mc->default_ram_id = "leon3.ram";
mc->max_cpus = MAX_CPUS;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("leon3_generic", leon3_generic_machine_init)
@@ -1117,7 +1117,7 @@ static void sun4m_machine_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "c";
mc->default_display = "tcx";
mc->default_ram_id = "sun4m.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static void ss5_class_init(ObjectClass *oc, void *data)
@@ -167,7 +167,7 @@ static void niagara_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "c";
mc->default_cpu_type = SPARC_CPU_TYPE_NAME("Sun-UltraSparc-T1");
mc->default_ram_id = "sun4v-partition.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo niagara_type = {
@@ -816,7 +816,7 @@ static void sun4u_class_init(ObjectClass *oc, void *data)
mc->default_display = "std";
mc->default_nic = "sunhme";
mc->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
fwc->get_dev_path = sun4u_fw_dev_path;
compat_props_add(mc->compat_props, hw_compat_sparc64, hw_compat_sparc64_len);
}
@@ -844,7 +844,7 @@ static void sun4v_class_init(ObjectClass *oc, void *data)
mc->default_display = "std";
mc->default_nic = "sunhme";
mc->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo sun4v_type = {
@@ -75,7 +75,7 @@ static void triboard_machine_tc277d_class_init(ObjectClass *oc,
mc->init = triboard_machine_init;
mc->desc = "Infineon AURIX TriBoard TC277 (D-Step)";
mc->max_cpus = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
amc->soc_name = "tc277d-soc";
};
@@ -111,7 +111,7 @@ static void ttb_machine_init(MachineClass *mc)
mc->desc = "a minimal TriCore board";
mc->init = tricoreboard_init;
mc->default_cpu_type = TRICORE_CPU_TYPE_NAME("tc1796");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("tricore_testboard", ttb_machine_init)
@@ -381,7 +381,7 @@ static void xen_pvh_class_init(ObjectClass *oc, void *data)
mc->default_machine_opts = "accel=xen";
/* Set to zero to make sure that the real ram size is passed. */
mc->default_ram_size = 0;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xen_pvh_info = {
@@ -67,7 +67,7 @@ static void xenpv_machine_init(MachineClass *mc)
mc->init = xen_init_pv;
mc->max_cpus = 1;
mc->default_machine_opts = "accel=xen";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("xenpv", xenpv_machine_init)
@@ -124,7 +124,7 @@ static void xtensa_sim_machine_init(MachineClass *mc)
mc->max_cpus = 4;
mc->no_serial = 1;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("sim", xtensa_sim_machine_init)
@@ -122,7 +122,7 @@ static void xtensa_virt_machine_init(MachineClass *mc)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_nic = "virtio-net-pci";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
DEFINE_MACHINE("virt", xtensa_virt_machine_init)
@@ -592,7 +592,7 @@ static void xtfpga_lx60_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 64 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xtfpga_lx60_type = {
@@ -610,7 +610,7 @@ static void xtfpga_lx60_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 64 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xtfpga_lx60_nommu_type = {
@@ -628,7 +628,7 @@ static void xtfpga_lx200_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 96 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xtfpga_lx200_type = {
@@ -646,7 +646,7 @@ static void xtfpga_lx200_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 96 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xtfpga_lx200_nommu_type = {
@@ -664,7 +664,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 512 * MiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xtfpga_ml605_type = {
@@ -682,7 +682,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 256 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xtfpga_ml605_nommu_type = {
@@ -700,7 +700,7 @@ static void xtfpga_kc705_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 1 * GiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xtfpga_kc705_type = {
@@ -718,7 +718,7 @@ static void xtfpga_kc705_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 256 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->create_default_sdcard_drive = true;
}
static const TypeInfo xtfpga_kc705_nommu_type = {
@@ -1350,8 +1350,7 @@ static void qemu_disable_default_devices(void)
if (!has_defaults || machine_class->no_cdrom) {
default_cdrom = 0;
}
- assert(machine_class->no_sdcard != ON_OFF_AUTO_AUTO);
- if (!has_defaults || machine_class->no_sdcard == ON_OFF_AUTO_ON) {
+ if (!has_defaults || !machine_class->create_default_sdcard_drive) {
default_sdcard = 0;
}
if (!has_defaults) {
Invert the 'no_sdcard' logic, renaming it as the more explicit "create_default_sdcard_drive". Machines are supposed to create a SD Card drive when this flag is set. In many cases it doesn't make much sense (as boards don't expose SD Card host controller), but this is patch only aims to expose that nonsense; so no logical change intended (mechanical patch using gsed). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/boards.h | 2 +- hw/alpha/dp264.c | 2 +- hw/arm/aspeed.c | 4 ++-- hw/arm/b-l475e-iot01a.c | 2 +- hw/arm/bananapi_m2u.c | 2 +- hw/arm/collie.c | 2 +- hw/arm/cubieboard.c | 2 +- hw/arm/digic_boards.c | 2 +- hw/arm/exynos4_boards.c | 4 ++-- hw/arm/fby35.c | 2 +- hw/arm/highbank.c | 4 ++-- hw/arm/imx25_pdk.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/kzm.c | 2 +- hw/arm/mcimx6ul-evk.c | 2 +- hw/arm/mcimx7d-sabre.c | 2 +- hw/arm/microbit.c | 2 +- hw/arm/mps2-tz.c | 2 +- hw/arm/mps2.c | 2 +- hw/arm/mps3r.c | 2 +- hw/arm/msf2-som.c | 2 +- hw/arm/musca.c | 2 +- hw/arm/musicpal.c | 2 +- hw/arm/netduino2.c | 2 +- hw/arm/netduinoplus2.c | 2 +- hw/arm/npcm7xx_boards.c | 2 +- hw/arm/olimex-stm32-h405.c | 2 +- hw/arm/omap_sx1.c | 4 ++-- hw/arm/orangepi.c | 2 +- hw/arm/raspi.c | 2 +- hw/arm/realview.c | 8 ++++---- hw/arm/sabrelite.c | 2 +- hw/arm/sbsa-ref.c | 2 +- hw/arm/stellaris.c | 4 ++-- hw/arm/stm32vldiscovery.c | 2 +- hw/arm/versatilepb.c | 4 ++-- hw/arm/vexpress.c | 2 +- hw/arm/virt.c | 2 +- hw/arm/xen-pvh.c | 2 +- hw/arm/xilinx_zynq.c | 4 ++-- hw/arm/xlnx-versal-virt.c | 2 +- hw/arm/xlnx-zcu102.c | 2 +- hw/avr/arduino.c | 2 +- hw/core/null-machine.c | 2 +- hw/hppa/machine.c | 4 ++-- hw/i386/pc.c | 2 +- hw/i386/x86.c | 2 +- hw/i386/xen/xen-pvh.c | 2 +- hw/loongarch/virt.c | 2 +- hw/m68k/an5206.c | 2 +- hw/m68k/mcf5208.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/m68k/q800.c | 2 +- hw/m68k/virt.c | 2 +- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- hw/mips/boston.c | 2 +- hw/mips/fuloong2e.c | 2 +- hw/mips/jazz.c | 4 ++-- hw/mips/loongson3_virt.c | 2 +- hw/mips/malta.c | 2 +- hw/mips/mipssim.c | 2 +- hw/openrisc/openrisc_sim.c | 2 +- hw/openrisc/virt.c | 2 +- hw/ppc/amigaone.c | 2 +- hw/ppc/e500.c | 2 +- hw/ppc/e500plat.c | 2 +- hw/ppc/mac_newworld.c | 2 +- hw/ppc/mac_oldworld.c | 2 +- hw/ppc/mpc8544ds.c | 2 +- hw/ppc/pegasos2.c | 2 +- hw/ppc/pnv.c | 2 +- hw/ppc/ppc405_boards.c | 2 +- hw/ppc/ppc440_bamboo.c | 2 +- hw/ppc/prep.c | 2 +- hw/ppc/sam460ex.c | 2 +- hw/ppc/spapr.c | 2 +- hw/ppc/virtex_ml507.c | 2 +- hw/remote/machine.c | 2 +- hw/riscv/microchip_pfsoc.c | 2 +- hw/riscv/opentitan.c | 2 +- hw/riscv/shakti_c.c | 2 +- hw/riscv/sifive_e.c | 2 +- hw/riscv/sifive_u.c | 2 +- hw/riscv/spike.c | 2 +- hw/riscv/virt.c | 2 +- hw/rx/rx-gdbsim.c | 2 +- hw/s390x/s390-virtio-ccw.c | 2 +- hw/sh4/r2d.c | 2 +- hw/sparc/leon3.c | 2 +- hw/sparc/sun4m.c | 2 +- hw/sparc64/niagara.c | 2 +- hw/sparc64/sun4u.c | 4 ++-- hw/tricore/triboard.c | 2 +- hw/tricore/tricore_testboard.c | 2 +- hw/xen/xen-pvh-common.c | 2 +- hw/xenpv/xen_machine_pv.c | 2 +- hw/xtensa/sim.c | 2 +- hw/xtensa/virt.c | 2 +- hw/xtensa/xtfpga.c | 16 ++++++++-------- system/vl.c | 3 +-- 102 files changed, 122 insertions(+), 123 deletions(-)