summaryrefslogtreecommitdiff
path: root/sim/arm
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-05-29 19:01:36 +0000
committerNick Clifton <nickc@redhat.com>2002-05-29 19:01:36 +0000
commitffc45e7fc62bc9a56d1c7302a16ca317a10ff448 (patch)
treed78ad97cacef2b7c8a24b3b626ebb80321f84a00 /sim/arm
parent0b6a2b5d50aa52f9df12fa1392134dd22f1eaaf1 (diff)
downloadgdb-ffc45e7fc62bc9a56d1c7302a16ca317a10ff448.tar.gz
Set the FSR and FAR registers if a Data Abort is detected.
Diffstat (limited to 'sim/arm')
-rw-r--r--sim/arm/ChangeLog5
-rw-r--r--sim/arm/armcopro.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index b5b17f2f5bd..85de967d7c7 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-29 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * armcopro.c (XScale_check_memacc): Set the FSR and FAR registers
+ if a Data Abort is detected.
+
2002-05-27 Nick Clifton <nickc@cambridge.redhat.com>
* armvirt.c (GetWord): Only perform access checks if 'check'
diff --git a/sim/arm/armcopro.c b/sim/arm/armcopro.c
index 8b041862cc5..2c2ca8505a6 100644
--- a/sim/arm/armcopro.c
+++ b/sim/arm/armcopro.c
@@ -479,7 +479,14 @@ XScale_check_memacc (ARMul_State * state, ARMword * address, int store)
/* Check alignment fault enable/disable. */
if ((read_cp15_reg (1, 0, 0) & ARMul_CP15_R1_ALIGN) && (* address & 3))
- ARMul_Abort (state, ARMul_DataAbortV);
+ {
+ /* Set the FSR and FAR.
+ Do not use XScale_set_fsr_far as this checks the DCSR register. */
+ write_cp15_reg (state, 5, 0, 0, ARMul_CP15_R5_MMU_EXCPT);
+ write_cp15_reg (state, 6, 0, 0, * address);
+
+ ARMul_Abort (state, ARMul_DataAbortV);
+ }
if (XScale_debug_moe (state, -1))
return;