qemu-e2k/hw/intc
Peter Maydell 95f875654a arm: Don't crash if user tries to use a Cortex-M CPU without an NVIC
The Cortex-M CPU and its NVIC are two intimately intertwined parts of
the same hardware; it is not possible to use one without the other.
Unfortunately a lot of our board models don't do any sanity checking
on the CPU type the user asks for, so a command line like
    qemu-system-arm -M versatilepb -cpu cortex-m3
will create an M3 without an NVIC, and coredump immediately.
In the other direction, trying a non-M-profile CPU in an M-profile
board won't blow up, but doesn't do anything useful either:
    qemu-system-arm -M lm3s6965evb -cpu arm926

Add some checking in the NVIC and CPU realize functions that the
user isn't trying to use an NVIC without an M-profile CPU or
an M-profile CPU without an NVIC, so we can produce a helpful
error message rather than a core dump.

Fixes: https://bugs.launchpad.net/qemu/+bug/1766896
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180601160355.15393-1-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
..
allwinner-a10-pic.c
apic_common.c
apic.c
arm_gic_common.c
arm_gic_kvm.c KVM: GIC: Fix memory leak due to calling kvm_init_irq_routing twice 2018-05-31 16:32:35 +01:00
arm_gic.c
arm_gicv2m.c
arm_gicv3_common.c arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR 2018-06-08 13:15:32 +01:00
arm_gicv3_cpuif.c hw/intc/arm_gicv3: Fix APxR<n> register dispatching 2018-05-31 14:50:51 +01:00
arm_gicv3_dist.c
arm_gicv3_its_common.c
arm_gicv3_its_kvm.c
arm_gicv3_kvm.c arm_gicv3_kvm: kvm_dist_get/put_priority: skip the registers banked by GICR_IPRIORITYR 2018-06-15 14:57:13 +01:00
arm_gicv3_redist.c
arm_gicv3.c
armv7m_nvic.c arm: Don't crash if user tries to use a Cortex-M CPU without an NVIC 2018-06-15 15:23:34 +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 heathrow: remove obsolete heathow_init() function 2018-04-27 18:05:22 +10:00
i8259_common.c
i8259.c
imx_avic.c
imx_gpcv2.c
intc.c
ioapic_common.c
ioapic.c ioapic: fix up includes 2018-06-01 19:20:37 +03:00
lm32_pic.c
Makefile.objs
mips_gic.c
nios2_iic.c
omap_intc.c
ompic.c
openpic_kvm.c openpic_kvm: drop address_space_to_flatview call 2018-03-06 14:01:27 +01:00
openpic.c openpic: move OpenPIC state and related definitions to openpic.h 2018-03-06 13:16:29 +11:00
pl190.c
puv3_intc.c
realview_gic.c
s390_flic_kvm.c
s390_flic.c
sh_intc.c
slavio_intctl.c
trace-events heathrow: convert to trace-events 2018-03-06 13:16:29 +11:00
vgic_common.h
xics_kvm.c xics_kvm: use KVM helpers 2018-06-12 10:44:36 +10:00
xics_pnv.c
xics_spapr.c
xics.c
xilinx_intc.c
xlnx-pmu-iomod-intc.c
xlnx-zynqmp-ipi.c