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
|
/*
*
* Copyright (c) 2012 Christoffer Dall <c.dall@virtualopensystems.com>
* <cdall@cs.columbia.edu>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <config.h>
__smp_pen:
wfe
ldr r1, [r0]
mov pc, r1
.globl enter_smp_pen
enter_smp_pen:
adr r1, __smp_pen
ldmia r1, {r4, r5, r6}
ldr r2, =CONFIG_SPL_SMP_PEN
stmia r2, {r4, r5, r6}
/*
* Store SMP pen into SYSFLAGS so the processor stays in the loop if
* it gets a spurious interrupt
*/
ldr r0, =CONFIG_SYSFLAGS_ADDR
str r2, [r0]
/*
* Make instruction copy coherent
*/
mcr p15, 0, r2, c7, c11, 1 /* Clean the data cache by MVA*/
mov r10, #0
mcr p15, 0, r10, c7, c5, 0 /* Invalidate the I-cache */
isb /* Make sure the invalidate ops are complete */
dsb
mov pc, r2
.globl smp_kick_secondary
smp_kick_secondary:
/* Bring up the secondary CPU */
ldr r0, =CONFIG_SYSFLAGS_ADDR
ldr r1, =CONFIG_SPL_TEXT_BASE
str r1, [r0]
dsb
ldr r0, =(EXYNOS5_GIC_DIST_BASE + 0xf00) /* GICD_SGIR */
ldr r1, =(2 << 16) /* Bring up CPU 1*/
str r1, [r0]
dsb
mov pc, lr
|