Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 2 | /* |
Russell King | 0462b44 | 2011-01-19 10:24:56 +0000 | [diff] [blame] | 3 | * linux/arch/arm/plat-versatile/headsmp.S |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 4 | * |
| 5 | * Copyright (c) 2003 ARM Limited |
| 6 | * All Rights Reserved |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 7 | */ |
| 8 | #include <linux/linkage.h> |
| 9 | #include <linux/init.h> |
Ben Dooks | 98dec91 | 2013-05-28 21:34:50 +0100 | [diff] [blame] | 10 | #include <asm/assembler.h> |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 11 | |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 12 | /* |
Russell King | 0462b44 | 2011-01-19 10:24:56 +0000 | [diff] [blame] | 13 | * Realview/Versatile Express specific entry point for secondary CPUs. |
| 14 | * This provides a "holding pen" into which all secondary cores are held |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 15 | * until we're ready for them to initialise. |
| 16 | */ |
Russell King | 0462b44 | 2011-01-19 10:24:56 +0000 | [diff] [blame] | 17 | ENTRY(versatile_secondary_startup) |
Ben Dooks | 98dec91 | 2013-05-28 21:34:50 +0100 | [diff] [blame] | 18 | ARM_BE8(setend be) |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 19 | mrc p15, 0, r0, c0, c0, 5 |
Lorenzo Pieralisi | 1585defb | 2013-01-22 10:56:40 +0000 | [diff] [blame] | 20 | bic r0, #0xff000000 |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 21 | adr r4, 1f |
| 22 | ldmia r4, {r5, r6} |
| 23 | sub r4, r4, r5 |
| 24 | add r6, r6, r4 |
| 25 | pen: ldr r7, [r6] |
| 26 | cmp r7, r0 |
| 27 | bne pen |
| 28 | |
| 29 | /* |
| 30 | * we've been released from the holding pen: secondary_stack |
| 31 | * should now contain the SVC stack for this core |
| 32 | */ |
| 33 | b secondary_startup |
| 34 | |
Dave Martin | 618d9c8 | 2010-11-30 13:05:10 +0100 | [diff] [blame] | 35 | .align |
Russell King | 59ac59f | 2010-02-11 21:56:07 +0000 | [diff] [blame] | 36 | 1: .long . |
Russell King | d9b778e | 2018-12-13 12:54:26 +0000 | [diff] [blame] | 37 | .long versatile_cpu_release |
Pawel Moll | 764a579 | 2011-12-15 14:02:33 +0000 | [diff] [blame] | 38 | ENDPROC(versatile_secondary_startup) |