aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPekka Enberg <penberg@iki.fi>2018-02-22 15:12:51 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-22 15:12:51 +0000
commit1c3db49d39d66646ff546ec26f36e3b9040f3504 (patch)
tree45f5916d5ab5fd036fcb53c8c31d375f99e5720c /hw
parent36476562d57a3b64bbe86db26e63677dd21907c5 (diff)
downloadqemu-1c3db49d39d66646ff546ec26f36e3b9040f3504.zip
qemu-1c3db49d39d66646ff546ec26f36e3b9040f3504.tar.gz
qemu-1c3db49d39d66646ff546ec26f36e3b9040f3504.tar.bz2
raspi: Add "raspi3" machine type
This patch adds a "raspi3" machine type, which can now be selected as the machine to run on by users via the "-M" command line option to QEMU. The machine type does *not* ignore memory transaction failures so we likely need to add some dummy devices later when people run something more complicated than what I'm using for testing. Signed-off-by: Pekka Enberg <penberg@iki.fi> [PMM: added #ifdef TARGET_AARCH64 so we don't provide the 64-bit board in the 32-bit only arm-softmmu build.] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/arm/raspi.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 93121c5..a378814 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -187,3 +187,26 @@ static void raspi2_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
};
DEFINE_MACHINE("raspi2", raspi2_machine_init)
+
+#ifdef TARGET_AARCH64
+static void raspi3_init(MachineState *machine)
+{
+ raspi_init(machine, 3);
+}
+
+static void raspi3_machine_init(MachineClass *mc)
+{
+ mc->desc = "Raspberry Pi 3";
+ mc->init = raspi3_init;
+ mc->block_default_type = IF_SD;
+ mc->no_parallel = 1;
+ mc->no_floppy = 1;
+ mc->no_cdrom = 1;
+ mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a53");
+ mc->max_cpus = BCM2836_NCPUS;
+ mc->min_cpus = BCM2836_NCPUS;
+ mc->default_cpus = BCM2836_NCPUS;
+ mc->default_ram_size = 1024 * 1024 * 1024;
+}
+DEFINE_MACHINE("raspi3", raspi3_machine_init)
+#endif