blob: 6b9767c84ad47eae5bfa93aed9505cf238a476ad [file] [log] [blame]
Soby Mathew5e5c2072014-04-07 15:28:55 +01001/*
Govindraj Rajaabf9fb92023-01-16 15:11:47 +00002 * Copyright (c) 2014-2023, Arm Limited and Contributors. All rights reserved.
Soby Mathew5e5c2072014-04-07 15:28:55 +01003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Soby Mathew5e5c2072014-04-07 15:28:55 +01005 */
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00006
7#include <plat_macros.S>
8#include <platform_def.h>
9
Soby Mathew5e5c2072014-04-07 15:28:55 +010010#include <arch.h>
11#include <asm_macros.S>
12#include <context.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000013#include <lib/el3_runtime/cpu_data.h>
14#include <lib/utils_def.h>
Soby Mathew5e5c2072014-04-07 15:28:55 +010015
Soby Mathewc1adbbc2014-06-25 10:07:40 +010016 .globl report_unhandled_exception
17 .globl report_unhandled_interrupt
18 .globl el3_panic
Govindraj Rajaabf9fb92023-01-16 15:11:47 +000019 .globl report_elx_panic
Soby Mathew5e5c2072014-04-07 15:28:55 +010020
Andrew Thoelke385f4d42014-06-03 11:50:53 +010021#if CRASH_REPORTING
Soby Mathewc1adbbc2014-06-25 10:07:40 +010022
Soby Mathew5e5c2072014-04-07 15:28:55 +010023 /* ------------------------------------------------------
24 * The below section deals with dumping the system state
25 * when an unhandled exception is taken in EL3.
26 * The layout and the names of the registers which will
27 * be dumped during a unhandled exception is given below.
28 * ------------------------------------------------------
29 */
Soby Mathewc1adbbc2014-06-25 10:07:40 +010030.section .rodata.crash_prints, "aS"
31print_spacer:
Alexei Fedorovc4dfb3b2019-07-29 13:34:07 +010032 .asciz " = 0x"
Soby Mathew5e5c2072014-04-07 15:28:55 +010033
Soby Mathewc1adbbc2014-06-25 10:07:40 +010034gp_regs:
35 .asciz "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7",\
36 "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15",\
37 "x16", "x17", "x18", "x19", "x20", "x21", "x22",\
38 "x23", "x24", "x25", "x26", "x27", "x28", "x29", ""
39el3_sys_regs:
40 .asciz "scr_el3", "sctlr_el3", "cptr_el3", "tcr_el3",\
41 "daif", "mair_el3", "spsr_el3", "elr_el3", "ttbr0_el3",\
42 "esr_el3", "far_el3", ""
Soby Mathew5e5c2072014-04-07 15:28:55 +010043
Soby Mathewc1adbbc2014-06-25 10:07:40 +010044non_el3_sys_regs:
45 .asciz "spsr_el1", "elr_el1", "spsr_abt", "spsr_und",\
46 "spsr_irq", "spsr_fiq", "sctlr_el1", "actlr_el1", "cpacr_el1",\
47 "csselr_el1", "sp_el1", "esr_el1", "ttbr0_el1", "ttbr1_el1",\
48 "mair_el1", "amair_el1", "tcr_el1", "tpidr_el1", "tpidr_el0",\
Imre Kisb5b903c2019-07-22 11:56:45 +020049 "tpidrro_el0", "par_el1", "mpidr_el1", "afsr0_el1", "afsr1_el1",\
50 "contextidr_el1", "vbar_el1", "cntp_ctl_el0", "cntp_cval_el0",\
51 "cntv_ctl_el0", "cntv_cval_el0", "cntkctl_el1", "sp_el0", "isr_el1", ""
52
53#if CTX_INCLUDE_AARCH32_REGS
54aarch32_regs:
55 .asciz "dacr32_el2", "ifsr32_el2", ""
56#endif /* CTX_INCLUDE_AARCH32_REGS */
Soby Mathew5e5c2072014-04-07 15:28:55 +010057
Soby Mathewc1adbbc2014-06-25 10:07:40 +010058panic_msg:
Alexei Fedorovc4dfb3b2019-07-29 13:34:07 +010059 .asciz "PANIC in EL3.\nx30"
Soby Mathewc1adbbc2014-06-25 10:07:40 +010060excpt_msg:
Alexei Fedorovc4dfb3b2019-07-29 13:34:07 +010061 .asciz "Unhandled Exception in EL3.\nx30"
Soby Mathewc1adbbc2014-06-25 10:07:40 +010062intr_excpt_msg:
Alexei Fedorov813c9f92020-03-03 13:31:58 +000063 .ascii "Unhandled Interrupt Exception in EL3.\n"
64x30_msg:
65 .asciz "x30"
66excpt_msg_el:
Govindraj Rajaabf9fb92023-01-16 15:11:47 +000067 .asciz "Unhandled Exception from lower EL.\n"
Soby Mathew5e5c2072014-04-07 15:28:55 +010068
Soby Mathewc1adbbc2014-06-25 10:07:40 +010069 /*
Soby Mathewc1adbbc2014-06-25 10:07:40 +010070 * Helper function to print from crash buf.
71 * The print loop is controlled by the buf size and
72 * ascii reg name list which is passed in x6. The
73 * function returns the crash buf address in x0.
74 * Clobbers : x0 - x7, sp
75 */
76func size_controlled_print
77 /* Save the lr */
78 mov sp, x30
79 /* load the crash buf address */
80 mrs x7, tpidr_el3
81test_size_list:
82 /* Calculate x5 always as it will be clobbered by asm_print_hex */
83 mrs x5, tpidr_el3
84 add x5, x5, #CPU_DATA_CRASH_BUF_SIZE
85 /* Test whether we have reached end of crash buf */
86 cmp x7, x5
87 b.eq exit_size_print
88 ldrb w4, [x6]
89 /* Test whether we are at end of list */
90 cbz w4, exit_size_print
91 mov x4, x6
92 /* asm_print_str updates x4 to point to next entry in list */
93 bl asm_print_str
Alexei Fedorovc4dfb3b2019-07-29 13:34:07 +010094 /* x0 = number of symbols printed + 1 */
95 sub x0, x4, x6
Soby Mathewc1adbbc2014-06-25 10:07:40 +010096 /* update x6 with the updated list pointer */
97 mov x6, x4
Alexei Fedorovc4dfb3b2019-07-29 13:34:07 +010098 bl print_alignment
Julius Werner02eb7272017-12-12 14:23:26 -080099 ldr x4, [x7], #REGSZ
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100100 bl asm_print_hex
Justin Chadwell76903822019-08-20 10:58:49 +0100101 bl asm_print_newline
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100102 b test_size_list
103exit_size_print:
104 mov x30, sp
105 ret
Kévin Petita877c252015-03-24 14:03:57 +0000106endfunc size_controlled_print
Soby Mathew5e5c2072014-04-07 15:28:55 +0100107
Alexei Fedorovc4dfb3b2019-07-29 13:34:07 +0100108 /* -----------------------------------------------------
109 * This function calculates and prints required number
110 * of space characters followed by "= 0x", based on the
111 * length of ascii register name.
112 * x0: length of ascii register name + 1
113 * ------------------------------------------------------
114 */
115func print_alignment
116 /* The minimum ascii length is 3, e.g. for "x0" */
117 adr x4, print_spacer - 3
118 add x4, x4, x0
119 b asm_print_str
120endfunc print_alignment
121
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100122 /*
123 * Helper function to store x8 - x15 registers to
124 * the crash buf. The system registers values are
125 * copied to x8 to x15 by the caller which are then
126 * copied to the crash buf by this function.
127 * x0 points to the crash buf. It then calls
128 * size_controlled_print to print to console.
129 * Clobbers : x0 - x7, sp
130 */
131func str_in_crash_buf_print
132 /* restore the crash buf address in x0 */
133 mrs x0, tpidr_el3
134 stp x8, x9, [x0]
Julius Werner02eb7272017-12-12 14:23:26 -0800135 stp x10, x11, [x0, #REGSZ * 2]
136 stp x12, x13, [x0, #REGSZ * 4]
137 stp x14, x15, [x0, #REGSZ * 6]
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100138 b size_controlled_print
Kévin Petita877c252015-03-24 14:03:57 +0000139endfunc str_in_crash_buf_print
Soby Mathew5e5c2072014-04-07 15:28:55 +0100140
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100141 /* ------------------------------------------------------
142 * This macro calculates the offset to crash buf from
143 * cpu_data and stores it in tpidr_el3. It also saves x0
144 * and x1 in the crash buf by using sp as a temporary
145 * register.
146 * ------------------------------------------------------
147 */
148 .macro prepare_crash_buf_save_x0_x1
149 /* we can corrupt this reg to free up x0 */
150 mov sp, x0
151 /* tpidr_el3 contains the address to cpu_data structure */
152 mrs x0, tpidr_el3
153 /* Calculate the Crash buffer offset in cpu_data */
154 add x0, x0, #CPU_DATA_CRASH_BUF_OFFSET
155 /* Store crash buffer address in tpidr_el3 */
156 msr tpidr_el3, x0
Julius Werner02eb7272017-12-12 14:23:26 -0800157 str x1, [x0, #REGSZ]
Soby Mathew5e5c2072014-04-07 15:28:55 +0100158 mov x1, sp
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100159 str x1, [x0]
Soby Mathew5e5c2072014-04-07 15:28:55 +0100160 .endm
161
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100162 /* -----------------------------------------------------
163 * This function allows to report a crash (if crash
164 * reporting is enabled) when an unhandled exception
165 * occurs. It prints the CPU state via the crash console
166 * making use of the crash buf. This function will
167 * not return.
168 * -----------------------------------------------------
169 */
170func report_unhandled_exception
171 prepare_crash_buf_save_x0_x1
172 adr x0, excpt_msg
173 mov sp, x0
174 /* This call will not return */
175 b do_crash_reporting
Kévin Petita877c252015-03-24 14:03:57 +0000176endfunc report_unhandled_exception
Soby Mathew5e5c2072014-04-07 15:28:55 +0100177
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100178 /* -----------------------------------------------------
179 * This function allows to report a crash (if crash
180 * reporting is enabled) when an unhandled interrupt
181 * occurs. It prints the CPU state via the crash console
182 * making use of the crash buf. This function will
183 * not return.
184 * -----------------------------------------------------
185 */
186func report_unhandled_interrupt
187 prepare_crash_buf_save_x0_x1
188 adr x0, intr_excpt_msg
189 mov sp, x0
190 /* This call will not return */
191 b do_crash_reporting
Kévin Petita877c252015-03-24 14:03:57 +0000192endfunc report_unhandled_interrupt
Soby Mathew5e5c2072014-04-07 15:28:55 +0100193
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100194 /* -----------------------------------------------------
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000195 * This function allows to report a crash from the lower
196 * exception level (if crash reporting is enabled) when
Govindraj Rajaabf9fb92023-01-16 15:11:47 +0000197 * lower_el_panic() is invoked from C Runtime.
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000198 * It prints the CPU state via the crash console making
199 * use of 'cpu_context' structure where general purpose
200 * registers are saved and the crash buf.
201 * This function will not return.
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000202 * -----------------------------------------------------
203 */
Govindraj Rajaabf9fb92023-01-16 15:11:47 +0000204func report_elx_panic
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000205 msr spsel, #MODE_SP_ELX
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000206
207 /* Print the crash message */
208 adr x4, excpt_msg_el
209 bl asm_print_str
210
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000211 /* Report x0 - x29 values stored in 'gpregs_ctx' structure */
212 /* Store the ascii list pointer in x6 */
213 adr x6, gp_regs
214 add x7, sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X0
215
216print_next:
217 ldrb w4, [x6]
218 /* Test whether we are at end of list */
219 cbz w4, print_x30
220 mov x4, x6
221 /* asm_print_str updates x4 to point to next entry in list */
222 bl asm_print_str
223 /* x0 = number of symbols printed + 1 */
224 sub x0, x4, x6
225 /* Update x6 with the updated list pointer */
226 mov x6, x4
227 bl print_alignment
228 ldr x4, [x7], #REGSZ
229 bl asm_print_hex
230 bl asm_print_newline
231 b print_next
232
233print_x30:
234 adr x4, x30_msg
235 bl asm_print_str
236
237 /* Print spaces to align "x30" string */
238 mov x0, #4
239 bl print_alignment
240
241 /* Report x30 */
242 ldr x4, [x7]
243
244 /* ----------------------------------------------------------------
245 * Different virtual address space size can be defined for each EL.
246 * Ensure that we use the proper one by reading the corresponding
247 * TCR_ELx register.
248 * ----------------------------------------------------------------
249 */
250 cmp x8, #MODE_EL2
251 b.lt from_el1 /* EL1 */
252 mrs x2, sctlr_el2
253 mrs x1, tcr_el2
254
255 /* ----------------------------------------------------------------
256 * Check if pointer authentication is enabled at the specified EL.
257 * If it isn't, we can then skip stripping a PAC code.
258 * ----------------------------------------------------------------
259 */
260test_pauth:
261 tst x2, #(SCTLR_EnIA_BIT | SCTLR_EnIB_BIT)
262 b.eq no_pauth
263
264 /* Demangle address */
265 and x1, x1, #0x3F /* T0SZ = TCR_ELx[5:0] */
266 sub x1, x1, #64
267 neg x1, x1 /* bottom_pac_bit = 64 - T0SZ */
268 mov x2, #-1
269 lsl x2, x2, x1
270 bic x4, x4, x2
271
272no_pauth:
273 bl asm_print_hex
274 bl asm_print_newline
275
276 /* tpidr_el3 contains the address to cpu_data structure */
277 mrs x0, tpidr_el3
278 /* Calculate the Crash buffer offset in cpu_data */
279 add x0, x0, #CPU_DATA_CRASH_BUF_OFFSET
280 /* Store crash buffer address in tpidr_el3 */
281 msr tpidr_el3, x0
282
283 /* Print the rest of crash dump */
284 b print_el3_sys_regs
285
286from_el1:
287 mrs x2, sctlr_el1
288 mrs x1, tcr_el1
289 b test_pauth
Govindraj Rajaabf9fb92023-01-16 15:11:47 +0000290endfunc report_elx_panic
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000291
292 /* -----------------------------------------------------
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100293 * This function allows to report a crash (if crash
294 * reporting is enabled) when panic() is invoked from
295 * C Runtime. It prints the CPU state via the crash
296 * console making use of the crash buf. This function
297 * will not return.
298 * -----------------------------------------------------
299 */
300func el3_panic
Alexei Fedorovc4dfb3b2019-07-29 13:34:07 +0100301 msr spsel, #MODE_SP_ELX
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100302 prepare_crash_buf_save_x0_x1
303 adr x0, panic_msg
304 mov sp, x0
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000305 /* Fall through to 'do_crash_reporting' */
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100306
307 /* ------------------------------------------------------------
308 * The common crash reporting functionality. It requires x0
309 * and x1 has already been stored in crash buf, sp points to
310 * crash message and tpidr_el3 contains the crash buf address.
311 * The function does the following:
312 * - Retrieve the crash buffer from tpidr_el3
313 * - Store x2 to x6 in the crash buffer
314 * - Initialise the crash console.
315 * - Print the crash message by using the address in sp.
316 * - Print x30 value to the crash console.
317 * - Print x0 - x7 from the crash buf to the crash console.
318 * - Print x8 - x29 (in groups of 8 registers) using the
319 * crash buf to the crash console.
320 * - Print el3 sys regs (in groups of 8 registers) using the
321 * crash buf to the crash console.
322 * - Print non el3 sys regs (in groups of 8 registers) using
323 * the crash buf to the crash console.
324 * ------------------------------------------------------------
325 */
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000326do_crash_reporting:
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100327 /* Retrieve the crash buf from tpidr_el3 */
328 mrs x0, tpidr_el3
329 /* Store x2 - x6, x30 in the crash buffer */
Julius Werner02eb7272017-12-12 14:23:26 -0800330 stp x2, x3, [x0, #REGSZ * 2]
331 stp x4, x5, [x0, #REGSZ * 4]
332 stp x6, x30, [x0, #REGSZ * 6]
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100333 /* Initialize the crash console */
334 bl plat_crash_console_init
335 /* Verify the console is initialized */
336 cbz x0, crash_panic
337 /* Print the crash message. sp points to the crash message */
338 mov x4, sp
339 bl asm_print_str
Alexei Fedorovc4dfb3b2019-07-29 13:34:07 +0100340 /* Print spaces to align "x30" string */
341 mov x0, #4
342 bl print_alignment
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000343 /* Load the crash buf address */
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100344 mrs x0, tpidr_el3
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000345 /* Report x30 first from the crash buf */
Julius Werner02eb7272017-12-12 14:23:26 -0800346 ldr x4, [x0, #REGSZ * 7]
Alexei Fedorovb8f26e92020-02-06 17:11:03 +0000347
348#if ENABLE_PAUTH
349 /* Demangle address */
350 xpaci x4
351#endif
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100352 bl asm_print_hex
Justin Chadwell76903822019-08-20 10:58:49 +0100353 bl asm_print_newline
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100354 /* Load the crash buf address */
355 mrs x0, tpidr_el3
356 /* Now mov x7 into crash buf */
Julius Werner02eb7272017-12-12 14:23:26 -0800357 str x7, [x0, #REGSZ * 7]
Soby Mathew5e5c2072014-04-07 15:28:55 +0100358
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000359 /* Report x0 - x29 values stored in crash buf */
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100360 /* Store the ascii list pointer in x6 */
361 adr x6, gp_regs
362 /* Print x0 to x7 from the crash buf */
363 bl size_controlled_print
364 /* Store x8 - x15 in crash buf and print */
365 bl str_in_crash_buf_print
366 /* Load the crash buf address */
367 mrs x0, tpidr_el3
368 /* Store the rest of gp regs and print */
369 stp x16, x17, [x0]
Julius Werner02eb7272017-12-12 14:23:26 -0800370 stp x18, x19, [x0, #REGSZ * 2]
371 stp x20, x21, [x0, #REGSZ * 4]
372 stp x22, x23, [x0, #REGSZ * 6]
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100373 bl size_controlled_print
374 /* Load the crash buf address */
375 mrs x0, tpidr_el3
376 stp x24, x25, [x0]
Julius Werner02eb7272017-12-12 14:23:26 -0800377 stp x26, x27, [x0, #REGSZ * 2]
378 stp x28, x29, [x0, #REGSZ * 4]
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100379 bl size_controlled_print
Soby Mathew5e5c2072014-04-07 15:28:55 +0100380
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100381 /* Print the el3 sys registers */
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000382print_el3_sys_regs:
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100383 adr x6, el3_sys_regs
384 mrs x8, scr_el3
385 mrs x9, sctlr_el3
386 mrs x10, cptr_el3
387 mrs x11, tcr_el3
388 mrs x12, daif
389 mrs x13, mair_el3
390 mrs x14, spsr_el3
391 mrs x15, elr_el3
392 bl str_in_crash_buf_print
393 mrs x8, ttbr0_el3
394 mrs x9, esr_el3
395 mrs x10, far_el3
396 bl str_in_crash_buf_print
Soby Mathew5e5c2072014-04-07 15:28:55 +0100397
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100398 /* Print the non el3 sys registers */
399 adr x6, non_el3_sys_regs
400 mrs x8, spsr_el1
401 mrs x9, elr_el1
402 mrs x10, spsr_abt
403 mrs x11, spsr_und
404 mrs x12, spsr_irq
405 mrs x13, spsr_fiq
406 mrs x14, sctlr_el1
407 mrs x15, actlr_el1
408 bl str_in_crash_buf_print
409 mrs x8, cpacr_el1
410 mrs x9, csselr_el1
Soby Mathew5e5c2072014-04-07 15:28:55 +0100411 mrs x10, sp_el1
412 mrs x11, esr_el1
413 mrs x12, ttbr0_el1
414 mrs x13, ttbr1_el1
415 mrs x14, mair_el1
416 mrs x15, amair_el1
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100417 bl str_in_crash_buf_print
418 mrs x8, tcr_el1
419 mrs x9, tpidr_el1
420 mrs x10, tpidr_el0
421 mrs x11, tpidrro_el0
Imre Kisb5b903c2019-07-22 11:56:45 +0200422 mrs x12, par_el1
423 mrs x13, mpidr_el1
424 mrs x14, afsr0_el1
425 mrs x15, afsr1_el1
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100426 bl str_in_crash_buf_print
Imre Kisb5b903c2019-07-22 11:56:45 +0200427 mrs x8, contextidr_el1
428 mrs x9, vbar_el1
429 mrs x10, cntp_ctl_el0
430 mrs x11, cntp_cval_el0
431 mrs x12, cntv_ctl_el0
432 mrs x13, cntv_cval_el0
433 mrs x14, cntkctl_el1
434 mrs x15, sp_el0
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100435 bl str_in_crash_buf_print
Imre Kisb5b903c2019-07-22 11:56:45 +0200436 mrs x8, isr_el1
437 bl str_in_crash_buf_print
438
439#if CTX_INCLUDE_AARCH32_REGS
440 /* Print the AArch32 registers */
441 adr x6, aarch32_regs
442 mrs x8, dacr32_el2
443 mrs x9, ifsr32_el2
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100444 bl str_in_crash_buf_print
Imre Kisb5b903c2019-07-22 11:56:45 +0200445#endif /* CTX_INCLUDE_AARCH32_REGS */
Soby Mathew5e5c2072014-04-07 15:28:55 +0100446
Soby Mathew38b4bc92014-08-14 13:36:41 +0100447 /* Get the cpu specific registers to report */
448 bl do_cpu_reg_dump
449 bl str_in_crash_buf_print
Soby Mathew0da95932014-07-16 09:23:52 +0100450
Gerald Lejeune2c7ed5b2015-11-26 15:47:53 +0100451 /* Print some platform registers */
452 plat_crash_print_regs
Soby Mathew0da95932014-07-16 09:23:52 +0100453
Antonio Nino Diazd3ec5432017-02-17 17:11:27 +0000454 bl plat_crash_console_flush
455
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100456 /* Done reporting */
Jeenu Viswambharan68aef102016-11-30 15:21:11 +0000457 no_ret plat_panic_handler
Alexei Fedorov813c9f92020-03-03 13:31:58 +0000458endfunc el3_panic
Soby Mathew5e5c2072014-04-07 15:28:55 +0100459
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100460#else /* CRASH_REPORTING */
461func report_unhandled_exception
462report_unhandled_interrupt:
Jeenu Viswambharan68aef102016-11-30 15:21:11 +0000463 no_ret plat_panic_handler
Kévin Petita877c252015-03-24 14:03:57 +0000464endfunc report_unhandled_exception
Sandrine Bailleuxf4119ec2015-12-17 13:58:58 +0000465#endif /* CRASH_REPORTING */
Soby Mathew5e5c2072014-04-07 15:28:55 +0100466
Soby Mathewc1adbbc2014-06-25 10:07:40 +0100467func crash_panic
Jeenu Viswambharan68aef102016-11-30 15:21:11 +0000468 no_ret plat_panic_handler
Antonio Nino Diaz1f21bcf2016-02-01 13:57:25 +0000469endfunc crash_panic