[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type
From: |
Pekka Enberg |
Subject: |
[Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type |
Date: |
Thu, 8 Feb 2018 07:50:39 +0200 |
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 <address@hidden>
---
hw/arm/raspi.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 66fe10e376..048ff23a51 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -187,3 +187,24 @@ static void raspi2_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
};
DEFINE_MACHINE("raspi2", raspi2_machine_init)
+
+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)
--
2.14.3
- [Qemu-arm] [PATCH v1 0/3] Raspberry Pi 3 support, Pekka Enberg, 2018/02/08
- [Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type,
Pekka Enberg <=
- Re: [Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type, Peter Maydell, 2018/02/15
- Re: [Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type, Philippe Mathieu-Daudé, 2018/02/15
- Re: [Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type, Philippe Mathieu-Daudé, 2018/02/15
- Re: [Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type, Peter Maydell, 2018/02/15
- Re: [Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type, Philippe Mathieu-Daudé, 2018/02/15
- Re: [Qemu-arm] [PATCH v1 3/3] raspi: Add "raspi3" machine type, Pekka Enberg, 2018/02/16
- [Qemu-arm] [PATCH v1 2/3] raspi: Raspberry Pi 3 support, Pekka Enberg, 2018/02/08
- Message not available