aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-03-15 20:43:06 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-03-18 11:08:59 +0000
commit654abaa783bcd668aab5e0455170af7c65f86a32 (patch)
tree0ed65bb3ff59fab0ba156716971e0a61ecaa52fa /target
parent8cc2246caa6c3eb56b250293aea212cf91c38490 (diff)
target/arm: Log fault address for M-profile faults
For M-profile, the fault address is not always exposed to the guest in a fault register (for instance the BFAR bus fault address register is only updated for bus faults on data accesses, not instruction accesses). Currently we log the address only if we're putting it into a particular guest-visible register. Since we always have it, log it generically, to make logs of i-side faults a bit clearer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20220315204306.2797684-3-peter.maydell@linaro.org
Diffstat (limited to 'target')
-rw-r--r--target/arm/m_helper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c
index 3bd16c0c46..b7a0fe0114 100644
--- a/target/arm/m_helper.c
+++ b/target/arm/m_helper.c
@@ -2272,7 +2272,13 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs)
* Note that for M profile we don't have a guest facing FSR, but
* the env->exception.fsr will be populated by the code that
* raises the fault, in the A profile short-descriptor format.
+ *
+ * Log the exception.vaddress now regardless of subtype, because
+ * logging below only logs it when it goes into a guest visible
+ * register.
*/
+ qemu_log_mask(CPU_LOG_INT, "...at fault address 0x%x\n",
+ (uint32_t)env->exception.vaddress);
switch (env->exception.fsr & 0xf) {
case M_FAKE_FSR_NSC_EXEC:
/*