diff options
Diffstat (limited to 'arch/arm/mach-socfpga/headsmp.S')
-rw-r--r-- | arch/arm/mach-socfpga/headsmp.S | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/arm/mach-socfpga/headsmp.S b/arch/arm/mach-socfpga/headsmp.S index 95c115d8b5ee..f65ea0af4af3 100644 --- a/arch/arm/mach-socfpga/headsmp.S +++ b/arch/arm/mach-socfpga/headsmp.S | |||
@@ -9,21 +9,26 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <asm/memory.h> | ||
12 | 13 | ||
13 | .arch armv7-a | 14 | .arch armv7-a |
14 | 15 | ||
15 | ENTRY(secondary_trampoline) | 16 | ENTRY(secondary_trampoline) |
16 | movw r2, #:lower16:cpu1start_addr | 17 | /* CPU1 will always fetch from 0x0 when it is brought out of reset. |
17 | movt r2, #:upper16:cpu1start_addr | 18 | * Thus, we can just subtract the PAGE_OFFSET to get the physical |
18 | 19 | * address of &cpu1start_addr. This would not work for platforms | |
19 | /* The socfpga VT cannot handle a 0xC0000000 page offset when loading | 20 | * where the physical memory does not start at 0x0. |
20 | the cpu1start_addr, we bit clear it. Tested on HW and VT. */ | 21 | */ |
21 | bic r2, r2, #0x40000000 | 22 | adr r0, 1f |
22 | 23 | ldmia r0, {r1, r2} | |
23 | ldr r0, [r2] | 24 | sub r2, r2, #PAGE_OFFSET |
24 | ldr r1, [r0] | 25 | ldr r3, [r2] |
25 | bx r1 | 26 | ldr r4, [r3] |
27 | bx r4 | ||
26 | 28 | ||
29 | .align | ||
30 | 1: .long . | ||
31 | .long socfpga_cpu1start_addr | ||
27 | ENTRY(secondary_trampoline_end) | 32 | ENTRY(secondary_trampoline_end) |
28 | 33 | ||
29 | ENTRY(socfpga_secondary_startup) | 34 | ENTRY(socfpga_secondary_startup) |