headsmp.S 948 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2003 ARM Limited
  3. * Copyright (c) u-boot contributors
  4. * Copyright (c) 2012 Pavel Machek <pavel@denx.de>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/linkage.h>
  11. #include <linux/init.h>
  12. #include <asm/memory.h>
  13. #include <asm/assembler.h>
  14. .arch armv7-a
  15. .arm
  16. ENTRY(secondary_trampoline)
  17. /* CPU1 will always fetch from 0x0 when it is brought out of reset.
  18. * Thus, we can just subtract the PAGE_OFFSET to get the physical
  19. * address of &cpu1start_addr. This would not work for platforms
  20. * where the physical memory does not start at 0x0.
  21. */
  22. ARM_BE8(setend be)
  23. adr r0, 1f
  24. ldmia r0, {r1, r2}
  25. sub r2, r2, #PAGE_OFFSET
  26. ldr r3, [r2]
  27. ldr r4, [r3]
  28. ARM_BE8(rev r4, r4)
  29. bx r4
  30. .align
  31. 1: .long .
  32. .long socfpga_cpu1start_addr
  33. ENTRY(secondary_trampoline_end)