aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-07-22 15:16:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-07-22 15:16:48 +0100
commit23da9e297b4120ca9702cabec91599a44255fe96 (patch)
tree8eb09f5aa4898bbf40883f34a1be0a65e55d0036 /hw
parent9d2e1fcd14c2bae5be1992214a03c0ddff714c80 (diff)
parentddb45afbfbc639365d6c934e4e29f6de5e5e2a0e (diff)
downloadqemu-23da9e297b4120ca9702cabec91599a44255fe96.zip
qemu-23da9e297b4120ca9702cabec91599a44255fe96.tar.gz
qemu-23da9e297b4120ca9702cabec91599a44255fe96.tar.bz2
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190722' into staging
target-arm queue: * target/arm: Add missing break statement for Hypervisor Trap Exception (fixes handling of SMC insn taken to AArch32 Hyp mode via HCR.TSC) * hw/arm/fsl-imx6ul.c: Remove dead SMP-related code * target/arm: Limit ID register assertions to TCG * configure: Clarify URL to source downloads * contrib/elf2dmp: Build download.o with CURL_CFLAGS # gpg: Signature made Mon 22 Jul 2019 14:13:31 BST # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20190722: contrib/elf2dmp: Build download.o with CURL_CFLAGS configure: Clarify URL to source downloads target/arm: Limit ID register assertions to TCG hw/arm/fsl-imx6ul.c: Remove dead SMP-related code target/arm: Add missing break statement for Hypervisor Trap Exception Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/arm/fsl-imx6ul.c64
-rw-r--r--hw/arm/mcimx6ul-evk.c2
2 files changed, 20 insertions, 46 deletions
diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c
index f860165..b074177 100644
--- a/hw/arm/fsl-imx6ul.c
+++ b/hw/arm/fsl-imx6ul.c
@@ -29,16 +29,12 @@
static void fsl_imx6ul_init(Object *obj)
{
- MachineState *ms = MACHINE(qdev_get_machine());
FslIMX6ULState *s = FSL_IMX6UL(obj);
char name[NAME_SIZE];
int i;
- for (i = 0; i < MIN(ms->smp.cpus, FSL_IMX6UL_NUM_CPUS); i++) {
- snprintf(name, NAME_SIZE, "cpu%d", i);
- object_initialize_child(obj, name, &s->cpu[i], sizeof(s->cpu[i]),
- "cortex-a7-" TYPE_ARM_CPU, &error_abort, NULL);
- }
+ object_initialize_child(obj, "cpu0", &s->cpu, sizeof(s->cpu),
+ "cortex-a7-" TYPE_ARM_CPU, &error_abort, NULL);
/*
* A7MPCORE
@@ -161,42 +157,25 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp)
MachineState *ms = MACHINE(qdev_get_machine());
FslIMX6ULState *s = FSL_IMX6UL(dev);
int i;
- qemu_irq irq;
char name[NAME_SIZE];
- unsigned int smp_cpus = ms->smp.cpus;
+ SysBusDevice *sbd;
+ DeviceState *d;
- if (smp_cpus > FSL_IMX6UL_NUM_CPUS) {
- error_setg(errp, "%s: Only %d CPUs are supported (%d requested)",
- TYPE_FSL_IMX6UL, FSL_IMX6UL_NUM_CPUS, smp_cpus);
+ if (ms->smp.cpus > 1) {
+ error_setg(errp, "%s: Only a single CPU is supported (%d requested)",
+ TYPE_FSL_IMX6UL, ms->smp.cpus);
return;
}
- for (i = 0; i < smp_cpus; i++) {
- Object *o = OBJECT(&s->cpu[i]);
-
- object_property_set_int(o, QEMU_PSCI_CONDUIT_SMC,
- "psci-conduit", &error_abort);
-
- /* On uniprocessor, the CBAR is set to 0 */
- if (smp_cpus > 1) {
- object_property_set_int(o, FSL_IMX6UL_A7MPCORE_ADDR,
- "reset-cbar", &error_abort);
- }
-
- if (i) {
- /* Secondary CPUs start in PSCI powered-down state */
- object_property_set_bool(o, true,
- "start-powered-off", &error_abort);
- }
-
- object_property_set_bool(o, true, "realized", &error_abort);
- }
+ object_property_set_int(OBJECT(&s->cpu), QEMU_PSCI_CONDUIT_SMC,
+ "psci-conduit", &error_abort);
+ object_property_set_bool(OBJECT(&s->cpu), true,
+ "realized", &error_abort);
/*
* A7MPCORE
*/
- object_property_set_int(OBJECT(&s->a7mpcore), smp_cpus, "num-cpu",
- &error_abort);
+ object_property_set_int(OBJECT(&s->a7mpcore), 1, "num-cpu", &error_abort);
object_property_set_int(OBJECT(&s->a7mpcore),
FSL_IMX6UL_MAX_IRQ + GIC_INTERNAL,
"num-irq", &error_abort);
@@ -204,18 +183,13 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp)
&error_abort);
sysbus_mmio_map(SYS_BUS_DEVICE(&s->a7mpcore), 0, FSL_IMX6UL_A7MPCORE_ADDR);
- for (i = 0; i < smp_cpus; i++) {
- SysBusDevice *sbd = SYS_BUS_DEVICE(&s->a7mpcore);
- DeviceState *d = DEVICE(qemu_get_cpu(i));
-
- irq = qdev_get_gpio_in(d, ARM_CPU_IRQ);
- sysbus_connect_irq(sbd, i, irq);
- sysbus_connect_irq(sbd, i + smp_cpus, qdev_get_gpio_in(d, ARM_CPU_FIQ));
- sysbus_connect_irq(sbd, i + 2 * smp_cpus,
- qdev_get_gpio_in(d, ARM_CPU_VIRQ));
- sysbus_connect_irq(sbd, i + 3 * smp_cpus,
- qdev_get_gpio_in(d, ARM_CPU_VFIQ));
- }
+ sbd = SYS_BUS_DEVICE(&s->a7mpcore);
+ d = DEVICE(&s->cpu);
+
+ sysbus_connect_irq(sbd, 0, qdev_get_gpio_in(d, ARM_CPU_IRQ));
+ sysbus_connect_irq(sbd, 1, qdev_get_gpio_in(d, ARM_CPU_FIQ));
+ sysbus_connect_irq(sbd, 2, qdev_get_gpio_in(d, ARM_CPU_VIRQ));
+ sysbus_connect_irq(sbd, 3, qdev_get_gpio_in(d, ARM_CPU_VFIQ));
/*
* A7MPCORE DAP
diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c
index bbffb11..1f6f4ae 100644
--- a/hw/arm/mcimx6ul-evk.c
+++ b/hw/arm/mcimx6ul-evk.c
@@ -71,7 +71,7 @@ static void mcimx6ul_evk_init(MachineState *machine)
}
if (!qtest_enabled()) {
- arm_load_kernel(&s->soc.cpu[0], &boot_info);
+ arm_load_kernel(&s->soc.cpu, &boot_info);
}
}