bl2_el3_exceptions.S 3.2 KB

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