qemu/target/arm
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
..
arch_dump.c target/arm: Add aa{32, 64}_vfp_{dreg, qreg} helpers 2018-01-25 11:45:29 +00:00
arm_ldst.h target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
arm-powerctl.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
arm-powerctl.h target-arm/powerctl: defer cpu reset work to CPU context 2017-02-24 10:32:46 +00:00
arm-semi.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
cpu64.c target/arm: Enable ARM_FEATURE_V8_ATOMICS for user-only 2018-05-10 18:10:57 +01:00
cpu-qom.h target/arm: Add "-cpu max" support 2018-03-09 17:09:44 +00:00
cpu.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
cpu.h target/arm: Implement SVE Predicate Misc Group 2018-05-18 17:48:08 +01:00
crypto_helper.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
gdbstub64.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
gdbstub.c arm: fix malloc type mismatch 2018-05-31 14:50:52 +01:00
helper-a64.c tcg: Fix helper function vs host abi for float16 2018-05-31 14:50:51 +01:00
helper-a64.h target/arm: Implement FCMP for fp16 2018-05-15 14:58:43 +01:00
helper-sve.h target/arm: Implement SVE Permute - Extract Group 2018-05-18 17:48:09 +01:00
helper.c target/arm: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
helper.h target/arm: Implement SVE predicate test 2018-05-18 17:48:08 +01:00
idau.h target/arm: Define an IDAU interface 2018-03-02 11:03:45 +00:00
internals.h target/arm: Add pre-EL change hooks 2018-04-26 11:04:39 +01:00
iwmmxt_helper.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
kvm32.c target/arm: Query host CPU features on-demand at instance init 2018-03-09 17:09:44 +00:00
kvm64.c target/arm: Query host CPU features on-demand at instance init 2018-03-09 17:09:44 +00:00
kvm_arm.h target/arm: Query host CPU features on-demand at instance init 2018-03-09 17:09:44 +00:00
kvm-consts.h arm: add trailing ; after MISMATCH_CHECK 2017-02-01 03:37:18 +02:00
kvm-stub.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
kvm.c Make address_space_translate{, _cached}() take a MemTxAttrs argument 2018-05-31 14:50:52 +01:00
machine.c target/arm: Implement v8M MSPLIM and PSPLIM registers 2018-02-15 18:29:49 +00:00
Makefile.objs target/arm: Implement SVE predicate test 2018-05-18 17:48:08 +01:00
monitor.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
neon_helper.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
op_addsub.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
op_helper.c target/arm: Add pre-EL change hooks 2018-04-26 11:04:39 +01:00
psci.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
sve_helper.c target/arm: Implement SVE Permute - Extract Group 2018-05-18 17:48:09 +01:00
sve.decode target/arm: Implement SVE Permute - Extract Group 2018-05-18 17:48:09 +01:00
trace-events target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route 2018-05-04 18:52:58 +01:00
translate-a64.c tcg: Pass tb and index to tcg_gen_exit_tb separately 2018-06-01 15:15:27 -07:00
translate-a64.h target/arm: Introduce translate-a64.h 2018-05-18 17:48:07 +01:00
translate-sve.c target/arm: Implement SVE Permute - Extract Group 2018-05-18 17:48:09 +01:00
translate.c tcg: Pass tb and index to tcg_gen_exit_tb separately 2018-06-01 15:15:27 -07:00
translate.h target/arm: convert conversion helpers to fpst/ahp_flag 2018-05-17 15:27:09 -07:00
vec_helper.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00