lowlevel_init.S 630 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2016
  4. * Cédric Schieli <cschieli@gmail.com>
  5. */
  6. #include <config.h>
  7. .align 8
  8. .global fw_dtb_pointer
  9. fw_dtb_pointer:
  10. #ifdef CONFIG_ARM64
  11. .dword 0x0
  12. #else
  13. .word 0x0
  14. #endif
  15. /*
  16. * Routine: save_boot_params (called after reset from start.S)
  17. * Description: save ATAG/FDT address provided by the firmware at boot time
  18. */
  19. .global save_boot_params
  20. save_boot_params:
  21. /* The firmware provided ATAG/FDT address can be found in r2/x0 */
  22. #ifdef CONFIG_ARM64
  23. adr x8, fw_dtb_pointer
  24. str x0, [x8]
  25. #else
  26. str r2, fw_dtb_pointer
  27. #endif
  28. /* Returns */
  29. b save_boot_params_ret