blob: 7b595547c1c80c9a0333a58a75cc00283d3c8fb9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Ravnborge6ae7442005-09-09 21:08:59 +020020#include <asm/asm-offsets.h>
Russell King9c429542006-03-23 16:59:37 +000021#include <asm/assembler.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#include <asm/vfpmacros.h>
23
24 .globl do_vfp
25do_vfp:
Russell King5d25ac02006-03-15 12:33:43 +000026 enable_irq
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 ldr r4, .LCvfp
28 add r10, r10, #TI_VFPSTATE @ r10 = workspace
29 ldr pc, [r4] @ call VFP entry point
30
31.LCvfp:
32 .word vfp_vector
33
34@ This code is called if the VFP does not exist. It needs to flag the
35@ failure to the VFP initialisation code.
36
37 __INIT
38 .globl vfp_testing_entry
39vfp_testing_entry:
40 ldr r0, VFP_arch_address
41 str r5, [r0] @ known non-zero value
42 mov pc, r9 @ we have handled the fault
43
44VFP_arch_address:
45 .word VFP_arch
46
47 __FINIT