]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * linux/arch/arm/vfp/entry.S | |
3 | * | |
4 | * Copyright (C) 2004 ARM Limited. | |
5 | * Written by Deep Blue Solutions Limited. | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License version 2 as | |
9 | * published by the Free Software Foundation. | |
1da177e4 | 10 | */ |
39ad04cc CM |
11 | #include <linux/init.h> |
12 | #include <linux/linkage.h> | |
f2255be8 | 13 | #include <asm/thread_info.h> |
1da177e4 | 14 | #include <asm/vfpmacros.h> |
39ad04cc CM |
15 | #include <asm/assembler.h> |
16 | #include <asm/asm-offsets.h> | |
1da177e4 | 17 | |
15ac49b6 RK |
18 | @ VFP entry point. |
19 | @ | |
20 | @ r0 = instruction opcode (32-bit ARM or two 16-bit Thumb) | |
21 | @ r2 = PC value to resume execution after successful emulation | |
22 | @ r9 = normal "successful" return address | |
23 | @ r10 = this threads thread_info structure | |
24 | @ lr = unrecognised instruction return address | |
1417a6b8 | 25 | @ IRQs enabled. |
15ac49b6 | 26 | @ |
93ed3970 | 27 | ENTRY(do_vfp) |
0b1f68e8 | 28 | inc_preempt_count r10, r4 |
1da177e4 | 29 | ldr r4, .LCvfp |
c6428464 | 30 | ldr r11, [r10, #TI_CPU] @ CPU number |
1da177e4 LT |
31 | add r10, r10, #TI_VFPSTATE @ r10 = workspace |
32 | ldr pc, [r4] @ call VFP entry point | |
93ed3970 | 33 | ENDPROC(do_vfp) |
1da177e4 | 34 | |
5d4cae5f | 35 | ENTRY(vfp_null_entry) |
0b1f68e8 | 36 | dec_preempt_count_ti r10, r4 |
6ebbf2ce | 37 | ret lr |
5d4cae5f RK |
38 | ENDPROC(vfp_null_entry) |
39 | ||
88987ef9 | 40 | .align 2 |
1da177e4 LT |
41 | .LCvfp: |
42 | .word vfp_vector | |
43 | ||
44 | @ This code is called if the VFP does not exist. It needs to flag the | |
45 | @ failure to the VFP initialisation code. | |
46 | ||
47 | __INIT | |
93ed3970 | 48 | ENTRY(vfp_testing_entry) |
0b1f68e8 | 49 | dec_preempt_count_ti r10, r4 |
1da177e4 | 50 | ldr r0, VFP_arch_address |
f27d6e17 | 51 | str r0, [r0] @ set to non-zero value |
6ebbf2ce | 52 | ret r9 @ we have handled the fault |
93ed3970 | 53 | ENDPROC(vfp_testing_entry) |
1da177e4 | 54 | |
88987ef9 | 55 | .align 2 |
1da177e4 LT |
56 | VFP_arch_address: |
57 | .word VFP_arch | |
58 | ||
59 | __FINIT |