summaryrefslogtreecommitdiffstats
path: root/bsps/arm/shared/start/bsp-start-init-registers.S
blob: 961d3172bf17e08313d991450215abad0e6c339a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/**
 * @file
 *
 * @brief ARM register initialization routines.
 */

/*
 * Copyright (c) 2015 Taller Technologies.  All rights reserved.
 *
 * @author Martin Galvan <martin.galvan@tallertechnologies.com>
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

/*
 * These routines initialize the core and VFP registers of ARM CPUs.
 * This is necessary for boards that operate in a 1oo1D fashion,
 * such as the TMS570.
 */

#include <rtems/asm.h>

.section .text
.syntax unified
.cpu cortex-r4
.arm

/* Initialization of the ARM core registers. */
FUNCTION_ENTRY(bsp_start_init_registers_core)
	mov r0, #0
	mov r1, #0
	mov r2, #0
	mov r3, #0
	mov r4, #0
	mov r5, #0
	mov r6, #0
	mov r7, #0
	mov r8, #0
	mov r9, #0
	mov r10, #0
	mov r11, #0
	mov r12, #0
	mov r13, #0

	bx lr
FUNCTION_END(bsp_start_init_registers_core)

/* Initialization of the FIQ mode banked registers. */
FUNCTION_ENTRY(bsp_start_init_registers_banked_fiq)
	mov r8, #0
	mov r9, #0
	mov r10, #0
	mov r11, #0
	mov r12, #0

	bx lr
FUNCTION_END(bsp_start_init_registers_banked_fiq)

#ifdef ARM_MULTILIB_VFP

/* Initialization of the FPU registers. */
FUNCTION_ENTRY(bsp_start_init_registers_vfp)
	mov r0, #0
	vmov d0, r0, r0
	vmov d1, r0, r0
	vmov d2, r0, r0
	vmov d3, r0, r0
	vmov d4, r0, r0
	vmov d5, r0, r0
	vmov d6, r0, r0
	vmov d7, r0, r0
	vmov d8, r0, r0
	vmov d9, r0, r0
	vmov d10, r0, r0
	vmov d11, r0, r0
	vmov d12, r0, r0
	vmov d13, r0, r0
	vmov d14, r0, r0
	vmov d15, r0, r0

#ifdef ARM_MULTILIB_VFP_D32
	vmov d16, r0, r0
	vmov d17, r0, r0
	vmov d18, r0, r0
	vmov d19, r0, r0
	vmov d20, r0, r0
	vmov d21, r0, r0
	vmov d22, r0, r0
	vmov d23, r0, r0
	vmov d24, r0, r0
	vmov d25, r0, r0
	vmov d26, r0, r0
	vmov d27, r0, r0
	vmov d28, r0, r0
	vmov d29, r0, r0
	vmov d30, r0, r0
	vmov d31, r0, r0
#endif /* ARM_MULTILIB_VFP_D32 */

	bx lr
FUNCTION_END(bsp_start_init_registers_vfp)

#endif /* ARM_MULTILIB_VFP */