MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / arch / arm / mm / abort-ev0.S
blob4aeb1e0c8df65ca9558b35636d9b46bd5a60e817
1 /*
2  *  linux/arch/arm/mm/abort-ev0t.S
3  *
4  *  Copyright (C) 2004 Tobias Lorenz
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10 #include <linux/linkage.h>
11 #include <asm/assembler.h>
13  * Function: v0_early_abort
14  *
15  * Params  : r2 = address of aborted instruction
16  *         : r3 = saved SPSR
17  *
18  * Returns : r0 = address of abort
19  *         : r1 = FSR, bit 11 = write
20  *         : r2-r8 = corrupted
21  *         : r9 = preserved
22  *         : sp = pointer to registers
23  *
24  * Purpose : obtain information about current aborted instruction.
25  * Note: we read user space.  This means we might cause a data
26  * abort here if the I-TLB and D-TLB aren't seeing the same
27  * picture.  Unfortunately, this does happen.  We live with it.
28  */
29         .align  5
30 ENTRY(v0_early_abort)
31         ldr     r3, [r2]                        @ read aborted ARM instruction
32         bic     r1, r1, #1 << 11 | 1 << 10      @ clear bits 11 and 10 of FSR
33         tst     r3, #1 << 20                    @ L = 1 -> write?
34         orreq   r1, r1, #1 << 11                @ yes.
35         mov     pc, lr