1 #include <linux/linkage.h>
2 #include <asm/assembler.h>
4 * Function: v7_early_abort
6 * Params : r2 = address of aborted instruction
9 * Returns : r0 = address of abort
10 * : r1 = FSR, bit 11 = write
13 * : sp = pointer to registers
15 * Purpose : obtain information about current aborted instruction.
20 * The effect of data aborts on on the exclusive access monitor are
21 * UNPREDICTABLE. Do a CLREX to clear the state
25 mrc p15, 0, r1, c5, c0, 0 @ get FSR
26 mrc p15, 0, r0, c6, c0, 0 @ get FAR
29 * V6 code adjusts the returned DFSR.
30 * New designs should not need to patch up faults.
33 #if defined(CONFIG_VERIFY_PERMISSION_FAULT)
35 * Detect erroneous permission failures and fix
37 ldr r3, =0x40d @ On permission fault
42 mcr p15, 0, r0, c7, c8, 0 @ Retranslate FAR
44 mrc p15, 0, r2, c7, c4, 0 @ Read the PAR
45 and r3, r2, #0x7b @ On translation fault
48 bic r1, r1, #0xf @ Fix up FSR FS[5:0]
50 orr r1, r1, r2, LSR #1
54 ENDPROC(v7_early_abort)