Message ID | c0164e7d61c33ce560936803c9d2ecc86f312748.1427108387.git.peter.crosthwaite@xilinx.com |
---|---|
State | New |
Headers | show |
On 23 March 2015 at 11:05, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote: > Use SMC PSCI, with the standard policy of secondaries starting in > power-off. > > Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> > Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> > --- > changed since v1: > Add &error_abort to property setter calls > > hw/arm/xlnx-zynqmp.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c > index e015025..0265fba 100644 > --- a/hw/arm/xlnx-zynqmp.c > +++ b/hw/arm/xlnx-zynqmp.c > @@ -97,6 +97,14 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) > for (i = 0; i < XLNX_ZYNQMP_NUM_CPUS; i++) { > qemu_irq irq; > > + object_property_set_int(OBJECT(&s->cpu[i]), QEMU_PSCI_CONDUIT_SMC, > + "psci-conduit", &error_abort); > + if (i > 0) { > + /* Secondary CPUs start in PSCI powered-down state */ > + object_property_set_bool(OBJECT(&s->cpu[i]), true, > + "start-powered-off", &error_abort); > + } ...oh, here's the PSCI config. I think you might as well have rolled this into the initial "create the CPUs" patch. -- PMM
On Thu, Apr 23, 2015 at 11:16 AM, Peter Maydell <peter.maydell@linaro.org> wrote: > On 23 March 2015 at 11:05, Peter Crosthwaite > <peter.crosthwaite@xilinx.com> wrote: >> Use SMC PSCI, with the standard policy of secondaries starting in >> power-off. >> >> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> >> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> >> --- >> changed since v1: >> Add &error_abort to property setter calls >> >> hw/arm/xlnx-zynqmp.c | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c >> index e015025..0265fba 100644 >> --- a/hw/arm/xlnx-zynqmp.c >> +++ b/hw/arm/xlnx-zynqmp.c >> @@ -97,6 +97,14 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) >> for (i = 0; i < XLNX_ZYNQMP_NUM_CPUS; i++) { >> qemu_irq irq; >> >> + object_property_set_int(OBJECT(&s->cpu[i]), QEMU_PSCI_CONDUIT_SMC, >> + "psci-conduit", &error_abort); >> + if (i > 0) { >> + /* Secondary CPUs start in PSCI powered-down state */ >> + object_property_set_bool(OBJECT(&s->cpu[i]), true, >> + "start-powered-off", &error_abort); >> + } > > ...oh, here's the PSCI config. I think you might as well have > rolled this into the initial "create the CPUs" patch. > Squashed. Regards, Peter > -- PMM >
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index e015025..0265fba 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -97,6 +97,14 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) for (i = 0; i < XLNX_ZYNQMP_NUM_CPUS; i++) { qemu_irq irq; + object_property_set_int(OBJECT(&s->cpu[i]), QEMU_PSCI_CONDUIT_SMC, + "psci-conduit", &error_abort); + if (i > 0) { + /* Secondary CPUs start in PSCI powered-down state */ + object_property_set_bool(OBJECT(&s->cpu[i]), true, + "start-powered-off", &error_abort); + } + object_property_set_bool(OBJECT(&s->cpu[i]), true, "realized", &err); ERR_PROP_CHECK_RETURN(err, errp);