hw/arm/armsse: Fix miswiring of expansion IRQs
PATCH 1/1 hw/arm/armsse: Fix miswiring of expansion IRQs
In commit 91c1e9fcbd7548db368 where we added dual-CPU support to the ARMSSE, we set up the wiring of the expansion IRQs via nested
loops: the outer loop on 'i' loops for each CPU, and the inner loop on 'j' loops for each interrupt. Fix a typo which meant we were wiring every expansion IRQ line to external IRQ 0 on CPU 0 and to external IRQ 1 on CPU 1.
---
It turns out that the ARM-TFM image I was using to test that I hadn't broken the mps2-an505 doesn't actually rely on any interrupts from the external devices...
hw/arm/armsse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/armsse.c +1 -1
@@ -565,7 +565,7 @@ static void armsse_realize(DeviceState *dev, Error **errp)/* Connect EXP_IRQ/EXP_CPUn_IRQ GPIOs to the NVIC's lines 32 and up */ s->exp_irqs[i] =g_new (qemu_irq, s->exp_numirq);for (j =0 ; j < s->exp_numirq; j++) { - s->exp_irqs[i][j] =qdev_get_gpio_in (cpudev, i +32 ); + s->exp_irqs[i][j] =qdev_get_gpio_in (cpudev, j +32 ); }if (i ==0 ) { gpioname =g_strdup ("EXP_IRQ" );
Signature · 1 line
2.20.1
Quoted 10 lines · Peter Maydell
In commit
91c1e9fcbd7548db368where we added dual-CPU support to the ARMSSE, we set up the wiring of the expansion IRQs via nested
loops: the outer loop on 'i' loops for each CPU, and the inner loop on 'j' loops for each interrupt. Fix a typo which meant we were wiring every expansion IRQ line to external IRQ 0 on CPU 0 and to external IRQ 1 on CPU 1.Fixes 91c1e9fcbd7548db368 ("hw/arm/armsse: Support dual-CPU configuration")Signed-off-by Peter Maydell <[email protected]>
Quoted 4 lines
---
It turns out that the ARM-TFM image I was using to test that I hadn't broken the mps2-an505 doesn't actually rely on any interrupts from the external devices...
How did you notice that, simply reviewing? Via 'info qtree'?
Quoted 18 lines
hw/arm/armsse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/arm/armsse.c +1
-1@@ -565,7 +565,7 @@ static void armsse_realize(DeviceState *dev, Error **errp)/* Connect EXP_IRQ/EXP_CPUn_IRQ GPIOs to the NVIC's lines 32 and up */ s->exp_irqs[i] =g_new (qemu_irq, s->exp_numirq);for (j =0 ; j < s->exp_numirq; j++) { - s->exp_irqs[i][j] =qdev_get_gpio_in (cpudev, i +32 ); + s->exp_irqs[i][j] =qdev_get_gpio_in (cpudev, j +32 ); }if (i ==0 ) { gpioname =g_strdup ("EXP_IRQ" );
Quoted 13 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Peter Maydell
In commit
91c1e9fcbd7548db368where we added dual-CPU support to the ARMSSE, we set up the wiring of the expansion IRQs via nested
loops: the outer loop on 'i' loops for each CPU, and the inner loop on 'j' loops for each interrupt. Fix a typo which meant we were wiring every expansion IRQ line to external IRQ 0 on CPU 0 and to external IRQ 1 on CPU 1.Fixes 91c1e9fcbd7548db368 ("hw/arm/armsse: Support dual-CPU configuration")Signed-off-by Peter Maydell <[email protected]>
Quoted 8 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Quoted 4 lines
---
It turns out that the ARM-TFM image I was using to test that I hadn't broken the mps2-an505 doesn't actually rely on any interrupts from the external devices...How did you notice that, simply reviewing? Via 'info qtree'?
I'm working on a model of a different board (Musca) which also uses the SSE-200, and the test code I had for that does happen to care about the interrupts.
thanks
-- PMM
Quoted 20 lines · Peter Maydell
Quoted 19 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Peter Maydell
In commit
91c1e9fcbd7548db368where we added dual-CPU support to the ARMSSE, we set up the wiring of the expansion IRQs via nested
loops: the outer loop on 'i' loops for each CPU, and the inner loop on 'j' loops for each interrupt. Fix a typo which meant we were wiring every expansion IRQ line to external IRQ 0 on CPU 0 and to external IRQ 1 on CPU 1.Fixes 91c1e9fcbd7548db368 ("hw/arm/armsse: Support dual-CPU configuration")Signed-off-by Peter Maydell <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Quoted 4 lines
---
It turns out that the ARM-TFM image I was using to test that I hadn't broken the mps2-an505 doesn't actually rely on any interrupts from the external devices...
Quoted 5 lines
Quoted 1 line
How did you notice that, simply reviewing? Via 'info qtree'?
I'm working on a model of a different board (Musca) which also uses the SSE-200, and the test code I had for that does happen to care about the interrupts.
OK, welcome Musca!
If you are testing Open Source code, please add a few notes on the wiki or in a mail (or the cover when you introduce the Musca), so we can add an acceptance test.
Thanks,
Phil.