On 08/13/2012 10:31 AM, Peter Maydell wrote:

> Fix an incorrect default value for the num-irqs property (we were
> attempting to override it from the default set by the parent class
> but not succeeding, which meant that the lm3s6965evb model would
> assert on startup attempting to wire up nonexistent irq lines).
> Instead of trying to override the parent's Property array, we
> define an instance_init function which runs after default setup
> but before user property setting and can just fix up the default
> value in the gic_state struct.
> 
> Reported-by: Peter Crosthwaite <peter.crosthwa...@petalogix.com>
> Tested-by: Peter Crosthwaite <peter.crosthwa...@petalogix.com>
> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>

I noticed this assertion recently as well while hacking on some Cortex-M3 stuff:

qemu-system-arm: /home/meadori/Code/src/qemu/hw/qdev.c:310: qdev_get_gpio_in:
Assertion `n >= 0 && n < dev->num_gpio_in' failed.
Aborted (core dumped)

I just tried out your patch and it fixes the issue I was seeing.

Tested-by: Meador Inge <mead...@codesoucery.com>

-- 
Meador Inge
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software

Reply via email to