Commit | Line | Data |
---|---|---|
9c4566a1 DN |
1 | /* |
2 | * Copyright (c) 2003 ARM Limited | |
3 | * Copyright (c) u-boot contributors | |
4 | * Copyright (c) 2012 Pavel Machek <pavel@denx.de> | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License version 2 as | |
8 | * published by the Free Software Foundation. | |
9 | */ | |
10 | #include <linux/linkage.h> | |
11 | #include <linux/init.h> | |
3a4356c0 | 12 | #include <asm/memory.h> |
bf55e0a4 | 13 | #include <asm/assembler.h> |
9c4566a1 | 14 | |
ad208d03 | 15 | .arch armv7-a |
9c4566a1 | 16 | |
9c4566a1 | 17 | ENTRY(secondary_trampoline) |
3a4356c0 DN |
18 | /* CPU1 will always fetch from 0x0 when it is brought out of reset. |
19 | * Thus, we can just subtract the PAGE_OFFSET to get the physical | |
20 | * address of &cpu1start_addr. This would not work for platforms | |
21 | * where the physical memory does not start at 0x0. | |
bf55e0a4 BD |
22 | */ |
23 | ARM_BE8(setend be) | |
3a4356c0 DN |
24 | adr r0, 1f |
25 | ldmia r0, {r1, r2} | |
26 | sub r2, r2, #PAGE_OFFSET | |
27 | ldr r3, [r2] | |
28 | ldr r4, [r3] | |
bf55e0a4 | 29 | ARM_BE8(rev r4, r4) |
3a4356c0 | 30 | bx r4 |
9c4566a1 | 31 | |
3a4356c0 DN |
32 | .align |
33 | 1: .long . | |
34 | .long socfpga_cpu1start_addr | |
9c4566a1 | 35 | ENTRY(secondary_trampoline_end) |