headsmp.S 1011 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. .arch armv7-a
  14. ENTRY(secondary_trampoline)
  15. /* CPU1 will always fetch from 0x0 when it is brought out of reset.
  16. * Thus, we can just subtract the PAGE_OFFSET to get the physical
  17. * address of &cpu1start_addr. This would not work for platforms
  18. * where the physical memory does not start at 0x0.
  19. */
  20. adr r0, 1f
  21. ldmia r0, {r1, r2}
  22. sub r2, r2, #PAGE_OFFSET
  23. ldr r3, [r2]
  24. ldr r4, [r3]
  25. bx r4
  26. .align
  27. 1: .long .
  28. .long socfpga_cpu1start_addr
  29. ENTRY(secondary_trampoline_end)
  30. ENTRY(socfpga_secondary_startup)
  31. bl v7_invalidate_l1
  32. b secondary_startup
  33. ENDPROC(socfpga_secondary_startup)