summaryrefslogtreecommitdiffstats
path: root/hw/arm/xlnx-versal.c
diff options
context:
space:
mode:
authorEdgar E. Iglesias2022-04-06 19:43:00 +0200
committerPeter Maydell2022-04-21 12:37:03 +0200
commit8779d00c4e337a9e0d85c9abf456e3c713fad808 (patch)
treeb9311e23405425a9a292a0cd1d342afc083ca486 /hw/arm/xlnx-versal.c
parenthw/arm/xlnx-zynqmp: Connect 4 TTC timers (diff)
downloadqemu-8779d00c4e337a9e0d85c9abf456e3c713fad808.tar.gz
qemu-8779d00c4e337a9e0d85c9abf456e3c713fad808.tar.xz
qemu-8779d00c4e337a9e0d85c9abf456e3c713fad808.zip
hw/arm: versal: Create an APU CPU Cluster
Create an APU CPU Cluster. This is in preparation to add the RPU. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com> Message-id: 20220406174303.2022038-2-edgar.iglesias@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/xlnx-versal.c')
-rw-r--r--hw/arm/xlnx-versal.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c
index 2551dfc22d..4415ee413f 100644
--- a/hw/arm/xlnx-versal.c
+++ b/hw/arm/xlnx-versal.c
@@ -34,10 +34,15 @@ static void versal_create_apu_cpus(Versal *s)
{
int i;
+ object_initialize_child(OBJECT(s), "apu-cluster", &s->fpd.apu.cluster,
+ TYPE_CPU_CLUSTER);
+ qdev_prop_set_uint32(DEVICE(&s->fpd.apu.cluster), "cluster-id", 0);
+
for (i = 0; i < ARRAY_SIZE(s->fpd.apu.cpu); i++) {
Object *obj;
- object_initialize_child(OBJECT(s), "apu-cpu[*]", &s->fpd.apu.cpu[i],
+ object_initialize_child(OBJECT(&s->fpd.apu.cluster),
+ "apu-cpu[*]", &s->fpd.apu.cpu[i],
XLNX_VERSAL_ACPU_TYPE);
obj = OBJECT(&s->fpd.apu.cpu[i]);
if (i) {
@@ -52,6 +57,8 @@ static void versal_create_apu_cpus(Versal *s)
&error_abort);
qdev_realize(DEVICE(obj), NULL, &error_fatal);
}
+
+ qdev_realize(DEVICE(&s->fpd.apu.cluster), NULL, &error_fatal);
}
static void versal_create_apu_gic(Versal *s, qemu_irq *pic)