This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
arm-sim: set the FSR and FAR registers in XScale upon Data Abort
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 29 May 2002 20:00:59 +0100
- Subject: arm-sim: set the FSR and FAR registers in XScale upon Data Abort
Hi Guys,
I am applying the patch below to make the ARM simulator set the FSR
and FAR registers in the XScale if a Data Abort is detected whilst
accessing memory.
Cheers
Nick
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.
Index: sim/arm/armcopro.c
===================================================================
RCS file: /cvs/src/src/sim/arm/armcopro.c,v
retrieving revision 1.9
diff -c -3 -p -w -r1.9 armcopro.c
*** sim/arm/armcopro.c 27 May 2002 14:11:54 -0000 1.9
--- sim/arm/armcopro.c 29 May 2002 18:58:44 -0000
*************** XScale_check_memacc (ARMul_State * state
*** 479,485 ****
--- 479,492 ----
/* Check alignment fault enable/disable. */
if ((read_cp15_reg (1, 0, 0) & ARMul_CP15_R1_ALIGN) && (* address & 3))
+ {
+ /* 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;