lowlevel_init.S 540 B

123456789101112131415161718192021222324252627
  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. /*
  8. * Routine: save_boot_params (called after reset from start.S)
  9. * Description: save ATAG/FDT address provided by the firmware at boot time
  10. */
  11. .global save_boot_params
  12. save_boot_params:
  13. /* The firmware provided ATAG/FDT address can be found in r2/x0 */
  14. #ifdef CONFIG_ARM64
  15. adr x8, fw_dtb_pointer
  16. str x0, [x8]
  17. #else
  18. ldr r8, =fw_dtb_pointer
  19. str r2, [r8]
  20. #endif
  21. /* Returns */
  22. b save_boot_params_ret