qemu-patch-raspberry4/target/arm
Peter Maydell 81621d9ab8 target/arm: Factor out code to calculate FSR for debug exceptions
When a debug exception is taken to AArch32, it appears as a Prefetch
Abort, and the Instruction Fault Status Register (IFSR) must be set.
The IFSR has two possible formats, depending on whether LPAE is in
use. Factor out the code in arm_debug_excp_handler() which picks
an FSR value into its own utility function, update it to use
arm_fi_to_lfsc() and arm_fi_to_sfsc() rather than hard-coded constants,
and use the correct condition to select long or short format.

In particular this fixes a bug where we could select the short
format because we're at EL0 and the EL1 translation regime is
not using LPAE, but then route the debug exception to EL2 because
of MDCR_EL2.TDE and hand EL2 the wrong format FSR.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180320134114.30418-3-peter.maydell@linaro.org
2018-03-23 18:26:46 +00:00
..
arch_dump.c target/arm: Add aa{32, 64}_vfp_{dreg, qreg} helpers 2018-01-25 11:45:29 +00:00
arm-powerctl.c target-arm/powerctl: defer cpu reset work to CPU context 2017-02-24 10:32:46 +00: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
arm_ldst.h Fix Thumb-1 BE32 execution and disassembly. 2017-02-07 18:29:59 +00:00
cpu-qom.h target/arm: Add "-cpu max" support 2018-03-09 17:09:44 +00:00
cpu.c target/arm: Make 'any' CPU just an alias for 'max' 2018-03-09 17:09:44 +00:00
cpu.h cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
cpu64.c target/arm: Make 'any' CPU just an alias for 'max' 2018-03-09 17:09:44 +00:00
crypto_helper.c target/arm: implement SM4 instructions 2018-02-09 10:40:28 +00:00
gdbstub.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
gdbstub64.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
helper-a64.c arm/translate-a64: add FP16 FSQRT to simd_two_reg_misc_fp16 2018-03-01 11:13:59 +00:00
helper-a64.h arm/translate-a64: add FP16 FSQRT to simd_two_reg_misc_fp16 2018-03-01 11:13:59 +00:00
helper.c target/arm: Define an IDAU interface 2018-03-02 11:03:45 +00:00
helper.h target/arm: Honour MDCR_EL2.TDE when routing exceptions due to BKPT/BRK 2018-03-23 18:26:46 +00:00
idau.h target/arm: Define an IDAU interface 2018-03-02 11:03:45 +00:00
internals.h target/arm: Factor out code to calculate FSR for debug exceptions 2018-03-23 18:26:46 +00:00
iwmmxt_helper.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01: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 target/arm: Move definition of 'host' cpu type into cpu.c 2018-03-09 17:09:44 +00: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
machine.c target/arm: Implement v8M MSPLIM and PSPLIM registers 2018-02-15 18:29:49 +00:00
Makefile.objs target/arm: Decode aa64 armv8.1 scalar three same extra 2018-03-02 11:03:45 +00:00
monitor.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
neon_helper.c target/*/cpu.h: remove softfloat.h 2018-02-21 10:20:24 +00: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: Factor out code to calculate FSR for debug exceptions 2018-03-23 18:26:46 +00:00
psci.c fix WFI/WFE length in syndrome register 2017-10-31 11:50:50 +00:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
translate-a64.c target/arm: Honour MDCR_EL2.TDE when routing exceptions due to BKPT/BRK 2018-03-23 18:26:46 +00:00
translate.c target/arm: Honour MDCR_EL2.TDE when routing exceptions due to BKPT/BRK 2018-03-23 18:26:46 +00:00
translate.h target/arm: Add SVE state to TB->FLAGS 2018-02-09 10:55:27 +00:00
vec_helper.c target/arm: Decode aa64 armv8.3 fcmla 2018-03-02 11:03:45 +00:00