early_exceptions.S 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <asm_macros.S>
  7. #include <common/bl_common.h>
  8. /* -----------------------------------------------------------------------------
  9. * Very simple stackless exception handlers used by BL2 and BL31 stages.
  10. * BL31 uses them before stacks are setup. BL2 uses them throughout.
  11. * -----------------------------------------------------------------------------
  12. */
  13. .globl early_exceptions
  14. vector_base early_exceptions
  15. /* -----------------------------------------------------
  16. * Current EL with SP0 : 0x0 - 0x200
  17. * -----------------------------------------------------
  18. */
  19. vector_entry SynchronousExceptionSP0
  20. mov x0, #SYNC_EXCEPTION_SP_EL0
  21. bl plat_report_exception
  22. no_ret plat_panic_handler
  23. end_vector_entry SynchronousExceptionSP0
  24. vector_entry IrqSP0
  25. mov x0, #IRQ_SP_EL0
  26. bl plat_report_exception
  27. no_ret plat_panic_handler
  28. end_vector_entry IrqSP0
  29. vector_entry FiqSP0
  30. mov x0, #FIQ_SP_EL0
  31. bl plat_report_exception
  32. no_ret plat_panic_handler
  33. end_vector_entry FiqSP0
  34. vector_entry SErrorSP0
  35. mov x0, #SERROR_SP_EL0
  36. bl plat_report_exception
  37. no_ret plat_panic_handler
  38. end_vector_entry SErrorSP0
  39. /* -----------------------------------------------------
  40. * Current EL with SPx: 0x200 - 0x400
  41. * -----------------------------------------------------
  42. */
  43. vector_entry SynchronousExceptionSPx
  44. mov x0, #SYNC_EXCEPTION_SP_ELX
  45. bl plat_report_exception
  46. no_ret plat_panic_handler
  47. end_vector_entry SynchronousExceptionSPx
  48. vector_entry IrqSPx
  49. mov x0, #IRQ_SP_ELX
  50. bl plat_report_exception
  51. no_ret plat_panic_handler
  52. end_vector_entry IrqSPx
  53. vector_entry FiqSPx
  54. mov x0, #FIQ_SP_ELX
  55. bl plat_report_exception
  56. no_ret plat_panic_handler
  57. end_vector_entry FiqSPx
  58. vector_entry SErrorSPx
  59. mov x0, #SERROR_SP_ELX
  60. bl plat_report_exception
  61. no_ret plat_panic_handler
  62. end_vector_entry SErrorSPx
  63. /* -----------------------------------------------------
  64. * Lower EL using AArch64 : 0x400 - 0x600
  65. * -----------------------------------------------------
  66. */
  67. vector_entry SynchronousExceptionA64
  68. mov x0, #SYNC_EXCEPTION_AARCH64
  69. bl plat_report_exception
  70. no_ret plat_panic_handler
  71. end_vector_entry SynchronousExceptionA64
  72. vector_entry IrqA64
  73. mov x0, #IRQ_AARCH64
  74. bl plat_report_exception
  75. no_ret plat_panic_handler
  76. end_vector_entry IrqA64
  77. vector_entry FiqA64
  78. mov x0, #FIQ_AARCH64
  79. bl plat_report_exception
  80. no_ret plat_panic_handler
  81. end_vector_entry FiqA64
  82. vector_entry SErrorA64
  83. mov x0, #SERROR_AARCH64
  84. bl plat_report_exception
  85. no_ret plat_panic_handler
  86. end_vector_entry SErrorA64
  87. /* -----------------------------------------------------
  88. * Lower EL using AArch32 : 0x600 - 0x800
  89. * -----------------------------------------------------
  90. */
  91. vector_entry SynchronousExceptionA32
  92. mov x0, #SYNC_EXCEPTION_AARCH32
  93. bl plat_report_exception
  94. no_ret plat_panic_handler
  95. end_vector_entry SynchronousExceptionA32
  96. vector_entry IrqA32
  97. mov x0, #IRQ_AARCH32
  98. bl plat_report_exception
  99. no_ret plat_panic_handler
  100. end_vector_entry IrqA32
  101. vector_entry FiqA32
  102. mov x0, #FIQ_AARCH32
  103. bl plat_report_exception
  104. no_ret plat_panic_handler
  105. end_vector_entry FiqA32
  106. vector_entry SErrorA32
  107. mov x0, #SERROR_AARCH32
  108. bl plat_report_exception
  109. no_ret plat_panic_handler
  110. end_vector_entry SErrorA32