@@ -63,24 +63,6 @@ static void xlnx_zynqmp_pmu_soc_init(Object *obj)
object_initialize_child(obj, "pmu-cpu", &s->cpu, sizeof(s->cpu),
TYPE_MICROBLAZE_CPU, &error_abort, NULL);
-
- sysbus_init_child_obj(obj, "intc", &s->intc, sizeof(s->intc),
- TYPE_XLNX_PMU_IO_INTC);
-
- /* Create the IPI device */
- for (int i = 0; i < XLNX_ZYNQMP_PMU_NUM_IPIS; i++) {
- char *name = g_strdup_printf("ipi%d", i);
- sysbus_init_child_obj(obj, name, &s->ipi[i],
- sizeof(XlnxZynqMPIPI), TYPE_XLNX_ZYNQMP_IPI);
- g_free(name);
- }
-}
-
-static void xlnx_zynqmp_pmu_soc_realize(DeviceState *dev, Error **errp)
-{
- XlnxZynqMPPMUSoCState *s = XLNX_ZYNQMP_PMU_SOC(dev);
- Error *err = NULL;
-
object_property_set_uint(OBJECT(&s->cpu), XLNX_ZYNQMP_PMU_ROM_ADDR,
"base-vectors", &error_abort);
object_property_set_bool(OBJECT(&s->cpu), true, "use-stack-protection",
@@ -99,18 +81,36 @@ static void xlnx_zynqmp_pmu_soc_realize(DeviceState *dev, Error **errp)
object_property_set_str(OBJECT(&s->cpu), "8.40.b", "version",
&error_abort);
object_property_set_uint(OBJECT(&s->cpu), 0, "pvr", &error_abort);
- object_property_set_bool(OBJECT(&s->cpu), true, "realized", &err);
- if (err) {
- error_propagate(errp, err);
- return;
- }
+ sysbus_init_child_obj(obj, "intc", &s->intc, sizeof(s->intc),
+ TYPE_XLNX_PMU_IO_INTC);
object_property_set_uint(OBJECT(&s->intc), 0x10, "intc-intr-size",
&error_abort);
object_property_set_uint(OBJECT(&s->intc), 0x0, "intc-level-edge",
&error_abort);
object_property_set_uint(OBJECT(&s->intc), 0xffff, "intc-positive",
&error_abort);
+
+ /* Create the IPI device */
+ for (int i = 0; i < XLNX_ZYNQMP_PMU_NUM_IPIS; i++) {
+ char *name = g_strdup_printf("ipi%d", i);
+ sysbus_init_child_obj(obj, name, &s->ipi[i],
+ sizeof(XlnxZynqMPIPI), TYPE_XLNX_ZYNQMP_IPI);
+ g_free(name);
+ }
+}
+
+static void xlnx_zynqmp_pmu_soc_realize(DeviceState *dev, Error **errp)
+{
+ XlnxZynqMPPMUSoCState *s = XLNX_ZYNQMP_PMU_SOC(dev);
+ Error *err = NULL;
+
+ object_property_set_bool(OBJECT(&s->cpu), true, "realized", &err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
+ }
+
object_property_set_bool(OBJECT(&s->intc), true, "realized", &err);
if (err) {
error_propagate(errp, err);