headsmp.S 802 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2003 ARM Limited
  4. * Copyright (c) u-boot contributors
  5. * Copyright (c) 2012 Pavel Machek <[email protected]>
  6. */
  7. #include <linux/linkage.h>
  8. #include <linux/init.h>
  9. #include <asm/memory.h>
  10. #include <asm/assembler.h>
  11. .arch armv7-a
  12. .arm
  13. ENTRY(secondary_trampoline)
  14. /* CPU1 will always fetch from 0x0 when it is brought out of reset.
  15. * Thus, we can just subtract the PAGE_OFFSET to get the physical
  16. * address of &cpu1start_addr. This would not work for platforms
  17. * where the physical memory does not start at 0x0.
  18. */
  19. ARM_BE8(setend be)
  20. adr r0, 1f
  21. ldmia r0, {r1, r2}
  22. sub r2, r2, #PAGE_OFFSET
  23. ldr r3, [r2]
  24. ldr r4, [r3]
  25. ARM_BE8(rev r4, r4)
  26. bx r4
  27. .align
  28. 1: .long .
  29. .long socfpga_cpu1start_addr
  30. ENTRY(secondary_trampoline_end)