Linux-libre 5.4.48-gnu
[librecmc/linux-libre.git] / arch / arm / plat-versatile / headsmp.S
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  *  linux/arch/arm/plat-versatile/headsmp.S
4  *
5  *  Copyright (c) 2003 ARM Limited
6  *  All Rights Reserved
7  */
8 #include <linux/linkage.h>
9 #include <linux/init.h>
10 #include <asm/assembler.h>
11
12 /*
13  * Realview/Versatile Express specific entry point for secondary CPUs.
14  * This provides a "holding pen" into which all secondary cores are held
15  * until we're ready for them to initialise.
16  */
17 ENTRY(versatile_secondary_startup)
18  ARM_BE8(setend be)
19         mrc     p15, 0, r0, c0, c0, 5
20         bic     r0, #0xff000000
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
35         .align
36 1:      .long   .
37         .long   versatile_cpu_release
38 ENDPROC(versatile_secondary_startup)