1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
2 | /* |
3 | * Copyright (c) 2003 ARM Limited |
4 | * Copyright (c) u-boot contributors |
5 | * Copyright (c) 2012 Pavel Machek <pavel@denx.de> |
6 | */ |
7 | #include <linux/linkage.h> |
8 | #include <linux/init.h> |
9 | #include <asm/page.h> |
10 | #include <asm/assembler.h> |
11 | |
12 | .arch armv7-a |
13 | .arm |
14 | |
15 | ENTRY(secondary_trampoline) |
16 | /* CPU1 will always fetch from 0x0 when it is brought out of reset. |
17 | * Thus, we can just subtract the PAGE_OFFSET to get the physical |
18 | * address of &cpu1start_addr. This would not work for platforms |
19 | * where the physical memory does not start at 0x0. |
20 | */ |
21 | ARM_BE8(setend be) |
22 | adr r0, 1f |
23 | ldmia r0, {r1, r2} |
24 | sub r2, r2, #PAGE_OFFSET |
25 | ldr r3, [r2] |
26 | ldr r4, [r3] |
27 | ARM_BE8(rev r4, r4) |
28 | bx r4 |
29 | |
30 | .align |
31 | 1: .long . |
32 | .long socfpga_cpu1start_addr |
33 | ENTRY(secondary_trampoline_end) |
34 | |