qemu-irix/hw/intc
Peter Maydell cf5f7937b0 nvic: Fix miscalculation of offsets into ITNS array
This calculation of the first exception vector in
the ITNS<n> register being accessed:
        int startvec = 32 * (offset - 0x380) + NVIC_FIRST_IRQ;

is incorrect, because offset is in bytes, so we only want
to multiply by 8.

Spotted by Coverity (CID 1381484, CID 1381488), though it is
not correct that it actually overflows the buffer, because
we have a 'startvec + i < s->num_irq' guard.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1507650856-11718-1-git-send-email-peter.maydell@linaro.org
2017-10-12 16:33:16 +01:00
..
Makefile.objs
allwinner-a10-pic.c
apic.c
apic_common.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
arm_gic.c
arm_gic_common.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
arm_gic_kvm.c
arm_gicv2m.c
arm_gicv3.c
arm_gicv3_common.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
arm_gicv3_cpuif.c
arm_gicv3_dist.c
arm_gicv3_its_common.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
arm_gicv3_its_kvm.c
arm_gicv3_kvm.c
arm_gicv3_redist.c
armv7m_nvic.c nvic: Fix miscalculation of offsets into ITNS array 2017-10-12 16:33:16 +01:00
aspeed_vic.c
bcm2835_ic.c
bcm2836_control.c
etraxfs_pic.c
exynos4210_combiner.c
exynos4210_gic.c
gic_internal.h
gicv3_internal.h
grlib_irqmp.c
heathrow_pic.c
i8259.c
i8259_common.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
imx_avic.c
intc.c
ioapic.c
ioapic_common.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
lm32_pic.c
mips_gic.c
nios2_iic.c
omap_intc.c
openpic.c ppc: Fix OpenPIC model 2017-09-27 13:05:41 +10:00
openpic_kvm.c memory: Switch memory from using AddressSpace to FlatView 2017-09-21 23:19:37 +02:00
pl190.c
puv3_intc.c
realview_gic.c
s390_flic.c
s390_flic_kvm.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
sh_intc.c
slavio_intctl.c
trace-events nvic: Support banked exceptions in acknowledge and complete 2017-09-21 16:31:09 +01:00
vgic_common.h
xics.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
xics_kvm.c
xics_pnv.c
xics_spapr.c
xilinx_intc.c