qemu-e2k/hw/ppc
Daniel Henrique Barboza ed021daf2d hw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[]
We're not storing all GPIO lines we're retrieving with
qdev_get_gpio_in() in mal_irqs[]. We're storing just the last one in the
first index:

    for (i = 0; i < ARRAY_SIZE(mal_irqs); i++) {
        mal_irqs[0] = qdev_get_gpio_in(uic[2], 3 + i);
    }
    ppc4xx_mal_init(env, 4, 16, mal_irqs);

mal_irqs is used in ppc4xx_mal_init() to assign the IRQs to MAL:

    for (i = 0; i < 4; i++) {
        mal->irqs[i] = irqs[i];
    }

Since only irqs[0] has been initialized, mal->irqs[1,2,3] are being
zeroed.

This doesn´t seem to trigger any apparent issues at this moment, but
Cedric's QOMification of the MAL device [1] is executing a
sysbus_connect_irq() that will fail if we do not store all GPIO lines
properly.

[1] https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg00497.html

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: BALATON Zoltan <balaton@eik.bme.hu>
Fixes: 706e944206 ("hw/ppc/sam460ex: Drop use of ppcuic_init()")
Acked-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220803233204.2724202-1-danielhb413@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2022-08-04 15:20:14 -03:00
..
e500-ccsr.h
e500.c hw/ppc: pass random seed to fdt 2022-07-18 13:59:43 -03:00
e500.h
e500plat.c
fdt.c
fw_cfg.c
Kconfig
mac_newworld.c ppc/6xx: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
mac_oldworld.c ppc/6xx: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
mac.h
meson.build
mpc8544_guts.c
mpc8544ds.c
pef.c
pegasos2.c ppc/6xx: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
pnv_bmc.c
pnv_core.c
pnv_homer.c
pnv_lpc.c
pnv_occ.c
pnv_pnor.c block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
pnv_psi.c
pnv_xscom.c
pnv.c ppc/pnv: make pnv_chip_power8_pic_print_info() use chip8->phbs[] 2022-07-06 10:22:37 -03:00
ppc4xx_devs.c
ppc4xx_pci.c
ppc405_boards.c
ppc405_uc.c ppc/40x: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
ppc405.h
ppc440_bamboo.c ppc/40x: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
ppc440_pcix.c
ppc440_uc.c hw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map() 2022-07-28 10:31:54 -03:00
ppc440.h
ppc_booke.c
ppc.c ppc/e500: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
ppce500_spin.c
prep_systemio.c ppc/6xx: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
prep.c ppc/6xx: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
rs6000_mc.c
sam460ex.c hw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[] 2022-08-04 15:20:14 -03:00
spapr_caps.c Trivial: 3 char repeat typos 2022-06-28 11:06:02 +02:00
spapr_cpu_core.c
spapr_drc.c
spapr_events.c
spapr_hcall.c ppc: Check partition and process table alignment 2022-07-18 13:59:43 -03:00
spapr_iommu.c spapr/ddw: Reset DMA when the last non-default window is removed 2022-07-06 10:22:37 -03:00
spapr_irq.c
spapr_numa.c
spapr_nvdimm.c hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c 2022-07-28 10:31:54 -03:00
spapr_ovec.c
spapr_pci_nvlink2.c
spapr_pci_vfio.c
spapr_pci.c spapr/ddw: Implement 64bit query extension 2022-07-06 10:22:37 -03:00
spapr_rng.c
spapr_rtas_ddw.c spapr/ddw: Implement 64bit query extension 2022-07-06 10:22:37 -03:00
spapr_rtas.c
spapr_rtc.c
spapr_softmmu.c
spapr_tpm_proxy.c
spapr_vio.c
spapr_vof.c
spapr.c ppc: Check partition and process table alignment 2022-07-18 13:59:43 -03:00
trace-events
trace.h
virtex_ml507.c ppc/40x: Allocate IRQ lines with qdev_init_gpio_in() 2022-07-18 13:59:43 -03:00
vof.c