On 13 February 2014 14:26, Peter Maydell <peter.mayd...@linaro.org> wrote: > +static void init_cpus(const char *cpu_model, const char *privdev, > + hwaddr periphbase, qemu_irq *pic) > +{ > + ObjectClass *cpu_oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model); > + DeviceState *dev; > + SysBusDevice *busdev; > + int n; > + > + if (!cpu_oc) { > + fprintf(stderr, "Unable to find CPU definition\n"); > + exit(1); > + } > + > + /* Create the private peripheral devices (including the GIC) */ > + dev = qdev_create(NULL, privdev); > + qdev_prop_set_uint32(dev, "num-cpu", smp_cpus); > + qdev_init_nofail(dev); > + busdev = SYS_BUS_DEVICE(dev); > + sysbus_mmio_map(busdev, 0, periphbase);
This makes vexpress-a15 segfault on startup, because it creates the a15mpcore_priv device first and the CPUs afterwards. That's a problem because a15mpcore_priv's realize function iterates through all the CPUs to connect their generic timer output GPIO lines to the appropriate input lines on the GIC. So the CPU has to be created first. I'll do a respin that moves the "create and realize CPUs" bit of the loop to the top of this function. thanks -- PMM