| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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. | 
|  | 10 | * | 
|  | 11 | * Basic entry code, called from the kernel's undefined instruction trap. | 
|  | 12 | *  r0  = faulted instruction | 
|  | 13 | *  r5  = faulted PC+4 | 
|  | 14 | *  r9  = successful return | 
|  | 15 | *  r10 = thread_info structure | 
|  | 16 | *  lr  = failure return | 
|  | 17 | */ | 
|  | 18 | #include <linux/linkage.h> | 
|  | 19 | #include <linux/init.h> | 
| Sam Ravnborg | e6ae744 | 2005-09-09 21:08:59 +0200 | [diff] [blame] | 20 | #include <asm/asm-offsets.h> | 
| Russell King | 9c42954 | 2006-03-23 16:59:37 +0000 | [diff] [blame] | 21 | #include <asm/assembler.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #include <asm/vfpmacros.h> | 
|  | 23 |  | 
|  | 24 | .globl	do_vfp | 
|  | 25 | do_vfp: | 
| Russell King | 5d25ac0 | 2006-03-15 12:33:43 +0000 | [diff] [blame] | 26 | enable_irq | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | ldr	r4, .LCvfp | 
| Catalin Marinas | c642846 | 2007-01-24 18:47:08 +0100 | [diff] [blame] | 28 | ldr	r11, [r10, #TI_CPU]	@ CPU number | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | add	r10, r10, #TI_VFPSTATE	@ r10 = workspace | 
|  | 30 | ldr	pc, [r4]		@ call VFP entry point | 
|  | 31 |  | 
|  | 32 | .LCvfp: | 
|  | 33 | .word	vfp_vector | 
|  | 34 |  | 
|  | 35 | @ This code is called if the VFP does not exist. It needs to flag the | 
|  | 36 | @ failure to the VFP initialisation code. | 
|  | 37 |  | 
|  | 38 | __INIT | 
|  | 39 | .globl	vfp_testing_entry | 
|  | 40 | vfp_testing_entry: | 
|  | 41 | ldr	r0, VFP_arch_address | 
|  | 42 | str	r5, [r0]		@ known non-zero value | 
|  | 43 | mov	pc, r9			@ we have handled the fault | 
|  | 44 |  | 
|  | 45 | VFP_arch_address: | 
|  | 46 | .word	VFP_arch | 
|  | 47 |  | 
|  | 48 | __FINIT |