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@xxxxxxxxxxxxxxxxxxxx>
* 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;
|