lowlevel_init.S 630 B

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