Linux Audio

Check our new training course

Loading...
v3.15
 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#include <linux/init.h>
12#include <linux/linkage.h>
13#include <asm/thread_info.h>
14#include <asm/vfpmacros.h>
15#include <asm/assembler.h>
16#include <asm/asm-offsets.h>
17
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
25@  IRQs disabled.
26@
27ENTRY(do_vfp)
28	inc_preempt_count r10, r4
 
 
 
 
29	enable_irq
30 	ldr	r4, .LCvfp
31	ldr	r11, [r10, #TI_CPU]	@ CPU number
32	add	r10, r10, #TI_VFPSTATE	@ r10 = workspace
33	ldr	pc, [r4]		@ call VFP entry point
34ENDPROC(do_vfp)
35
36ENTRY(vfp_null_entry)
37	dec_preempt_count_ti r10, r4
 
 
 
 
 
38	mov	pc, lr
39ENDPROC(vfp_null_entry)
40
41	.align	2
42.LCvfp:
43	.word	vfp_vector
44
45@ This code is called if the VFP does not exist. It needs to flag the
46@ failure to the VFP initialisation code.
47
48	__INIT
49ENTRY(vfp_testing_entry)
50	dec_preempt_count_ti r10, r4
 
 
 
 
 
51	ldr	r0, VFP_arch_address
52	str	r0, [r0]		@ set to non-zero value
53	mov	pc, r9			@ we have handled the fault
54ENDPROC(vfp_testing_entry)
55
56	.align	2
57VFP_arch_address:
58	.word	VFP_arch
59
60	__FINIT
v3.1
 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 <asm/thread_info.h>
19#include <asm/vfpmacros.h>
20#include "../kernel/entry-header.S"
 
21
 
 
 
 
 
 
 
 
 
22ENTRY(do_vfp)
23#ifdef CONFIG_PREEMPT
24	ldr	r4, [r10, #TI_PREEMPT]	@ get preempt count
25	add	r11, r4, #1		@ increment it
26	str	r11, [r10, #TI_PREEMPT]
27#endif
28	enable_irq
29 	ldr	r4, .LCvfp
30	ldr	r11, [r10, #TI_CPU]	@ CPU number
31	add	r10, r10, #TI_VFPSTATE	@ r10 = workspace
32	ldr	pc, [r4]		@ call VFP entry point
33ENDPROC(do_vfp)
34
35ENTRY(vfp_null_entry)
36#ifdef CONFIG_PREEMPT
37	get_thread_info	r10
38	ldr	r4, [r10, #TI_PREEMPT]	@ get preempt count
39	sub	r11, r4, #1		@ decrement it
40	str	r11, [r10, #TI_PREEMPT]
41#endif
42	mov	pc, lr
43ENDPROC(vfp_null_entry)
44
45	.align	2
46.LCvfp:
47	.word	vfp_vector
48
49@ This code is called if the VFP does not exist. It needs to flag the
50@ failure to the VFP initialisation code.
51
52	__INIT
53ENTRY(vfp_testing_entry)
54#ifdef CONFIG_PREEMPT
55	get_thread_info	r10
56	ldr	r4, [r10, #TI_PREEMPT]	@ get preempt count
57	sub	r11, r4, #1		@ decrement it
58	str	r11, [r10, #TI_PREEMPT]
59#endif
60	ldr	r0, VFP_arch_address
61	str	r5, [r0]		@ known non-zero value
62	mov	pc, r9			@ we have handled the fault
63ENDPROC(vfp_testing_entry)
64
65	.align	2
66VFP_arch_address:
67	.word	VFP_arch
68
69	__FINIT