headsmp.S 821 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2003 ARM Limited
  4. * All Rights Reserved
  5. */
  6. #include <linux/linkage.h>
  7. #include <linux/init.h>
  8. #include <asm/assembler.h>
  9. /*
  10. * Realview/Versatile Express specific entry point for secondary CPUs.
  11. * This provides a "holding pen" into which all secondary cores are held
  12. * until we're ready for them to initialise.
  13. */
  14. ENTRY(versatile_secondary_startup)
  15. ARM_BE8(setend be)
  16. mrc p15, 0, r0, c0, c0, 5
  17. bic r0, #0xff000000
  18. adr r4, 1f
  19. ldmia r4, {r5, r6}
  20. sub r4, r4, r5
  21. add r6, r6, r4
  22. pen: ldr r7, [r6]
  23. cmp r7, r0
  24. bne pen
  25. /*
  26. * we've been released from the holding pen: secondary_stack
  27. * should now contain the SVC stack for this core
  28. */
  29. b secondary_startup
  30. .align
  31. 1: .long .
  32. .long versatile_cpu_release
  33. ENDPROC(versatile_secondary_startup)