lowlevel_init.S 1014 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2019 NXP
  4. */
  5. #include <config.h>
  6. .align 8
  7. .global boot_pointer
  8. boot_pointer:
  9. .space 32
  10. /*
  11. * Routine: save_boot_params (called after reset from start.S)
  12. */
  13. .global save_boot_params
  14. save_boot_params:
  15. /* The firmware provided ATAG/FDT address can be found in r2/x0 */
  16. adr x0, boot_pointer
  17. stp x1, x2, [x0], #16
  18. stp x3, x4, [x0], #16
  19. /*
  20. * We use absolute address not PC relative address for return.
  21. * When running SPL on iMX8, the A core starts at address 0,
  22. * an alias to OCRAM 0x100000, our linker address for SPL is
  23. * from 0x100000. So using absolute address can jump to the OCRAM
  24. * address from the alias. The alias only map first 96KB of OCRAM,
  25. * so this require the SPL size can't beyond 96KB.
  26. * But when using SPL DM, the size increase significantly and
  27. * always beyonds 96KB. That's why we have to jump to OCRAM.
  28. * Normal u-boot also runs into this codes, but there is no impact.
  29. */
  30. ldr x1, =save_boot_params_ret
  31. br x1