1 #include <linux/linkage.h>
2 #include <asm/assembler.h>
4 * Function: v7_early_abort
6 * Params : r2 = pt_regs
7 * : r4 = aborted context pc
8 * : r5 = aborted context psr
10 * Returns : r4 - r11, r13 preserved
12 * Purpose : obtain information about current aborted instruction.
17 * The effect of data aborts on on the exclusive access monitor are
18 * UNPREDICTABLE. Do a CLREX to clear the state
22 mrc p15, 0, r1, c5, c0, 0 @ get FSR
23 mrc p15, 0, r0, c6, c0, 0 @ get FAR
26 * V6 code adjusts the returned DFSR.
27 * New designs should not need to patch up faults.
30 #if defined(CONFIG_VERIFY_PERMISSION_FAULT)
32 * Detect erroneous permission failures and fix
34 ldr r3, =0x40d @ On permission fault
39 mcr p15, 0, r0, c7, c8, 0 @ Retranslate FAR
41 mrc p15, 0, ip, c7, c4, 0 @ Read the PAR
42 and r3, ip, #0x7b @ On translation fault
45 bic r1, r1, #0xf @ Fix up FSR FS[5:0]
47 orr r1, r1, ip, LSR #1
51 ENDPROC(v7_early_abort)