On Tue, Feb 25, 2014 at 6:24 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > Set the reset-cbar property on CPUs used by the virt board, > if they have it. This isn't necessary for correct functioning > under Linux (since the A9 isn't a valid CPU for the virt board), > but it is the correct behaviour. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > hw/arm/virt.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 517f2fe..b418b77 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -379,6 +379,7 @@ static void machvirt_init(QEMUMachineInitArgs *args) > for (n = 0; n < smp_cpus; n++) { > ObjectClass *oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model); > Object *cpuobj; > + Error *err = NULL; > > if (!oc) { > fprintf(stderr, "Unable to find CPU definition\n"); > @@ -390,6 +391,16 @@ static void machvirt_init(QEMUMachineInitArgs *args) > if (n > 0) { > object_property_set_bool(cpuobj, true, "start-powered-off", > NULL); > } > + > + if (object_property_find(cpuobj, "reset-cbar", NULL)) { > + object_property_set_int(cpuobj, > vbi->memmap[VIRT_CPUPERIPHS].base, > + "reset-cbar", &err); > + if (err) { > + error_report("%s", error_get_pretty(err)); > + exit(1); > + }
If the property exists (as enforced by the if), and you cant set it, its probably a fatal and candidate for error_abort. Regards, Peter > + } > + > object_property_set_bool(cpuobj, true, "realized", NULL); > } > fdt_add_cpu_nodes(vbi); > -- > 1.8.5 > >