From 5aa682b2e0d66c71c6c336b5b864418aefcf2d43 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 29 May 2002 19:01:36 +0000 Subject: [PATCH] Set the FSR and FAR registers if a Data Abort is detected. --- sim/arm/ChangeLog | 5 +++++ sim/arm/armcopro.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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 + + * armcopro.c (XScale_check_memacc): Set the FSR and FAR registers + if a Data Abort is detected. + 2002-05-27 Nick Clifton * 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; -- 2.30.2