bl2_el3_entrypoint.S 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (c) 2017-2021, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <arch.h>
  7. #include <asm_macros.S>
  8. #include <common/bl_common.h>
  9. #include <el3_common_macros.S>
  10. .globl bl2_entrypoint
  11. func bl2_entrypoint
  12. /* Save arguments x0-x3 from previous Boot loader */
  13. mov r9, r0
  14. mov r10, r1
  15. mov r11, r2
  16. mov r12, r3
  17. el3_entrypoint_common \
  18. _init_sctlr=1 \
  19. _warm_boot_mailbox=!PROGRAMMABLE_RESET_ADDRESS \
  20. _secondary_cold_boot=!COLD_BOOT_SINGLE_CPU \
  21. _init_memory=1 \
  22. _init_c_runtime=1 \
  23. _exception_vectors=bl2_vector_table \
  24. _pie_fixup_size=0
  25. /*
  26. * Restore parameters of boot rom
  27. */
  28. mov r0, r9
  29. mov r1, r10
  30. mov r2, r11
  31. mov r3, r12
  32. /* ---------------------------------------------
  33. * Perform BL2 setup
  34. * ---------------------------------------------
  35. */
  36. bl bl2_el3_setup
  37. /* ---------------------------------------------
  38. * Jump to main function.
  39. * ---------------------------------------------
  40. */
  41. bl bl2_main
  42. /* ---------------------------------------------
  43. * Should never reach this point.
  44. * ---------------------------------------------
  45. */
  46. no_ret plat_panic_handler
  47. endfunc bl2_entrypoint