xref: /rk3399_ARM-atf/bl31/aarch64/crash_reporting.S (revision 626ed510f179c905a699f4663ee933c10892b4c3)
1a43d431bSSoby Mathew/*
2a43d431bSSoby Mathew * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved.
3a43d431bSSoby Mathew *
4a43d431bSSoby Mathew * Redistribution and use in source and binary forms, with or without
5a43d431bSSoby Mathew * modification, are permitted provided that the following conditions are met:
6a43d431bSSoby Mathew *
7a43d431bSSoby Mathew * Redistributions of source code must retain the above copyright notice, this
8a43d431bSSoby Mathew * list of conditions and the following disclaimer.
9a43d431bSSoby Mathew *
10a43d431bSSoby Mathew * Redistributions in binary form must reproduce the above copyright notice,
11a43d431bSSoby Mathew * this list of conditions and the following disclaimer in the documentation
12a43d431bSSoby Mathew * and/or other materials provided with the distribution.
13a43d431bSSoby Mathew *
14a43d431bSSoby Mathew * Neither the name of ARM nor the names of its contributors may be used
15a43d431bSSoby Mathew * to endorse or promote products derived from this software without specific
16a43d431bSSoby Mathew * prior written permission.
17a43d431bSSoby Mathew *
18a43d431bSSoby Mathew * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19a43d431bSSoby Mathew * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20a43d431bSSoby Mathew * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21a43d431bSSoby Mathew * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22a43d431bSSoby Mathew * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23a43d431bSSoby Mathew * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24a43d431bSSoby Mathew * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25a43d431bSSoby Mathew * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26a43d431bSSoby Mathew * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27a43d431bSSoby Mathew * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28a43d431bSSoby Mathew * POSSIBILITY OF SUCH DAMAGE.
29a43d431bSSoby Mathew */
30a43d431bSSoby Mathew#include <arch.h>
31a43d431bSSoby Mathew#include <asm_macros.S>
32a43d431bSSoby Mathew#include <context.h>
335e910074SAndrew Thoelke#include <cpu_data.h>
34a43d431bSSoby Mathew#include <plat_macros.S>
35e4d13389SSandrine Bailleux#include <platform_def.h>
36a43d431bSSoby Mathew
37*626ed510SSoby Mathew	.globl	report_unhandled_exception
38*626ed510SSoby Mathew	.globl	report_unhandled_interrupt
39*626ed510SSoby Mathew	.globl	el3_panic
40a43d431bSSoby Mathew
419c22b323SAndrew Thoelke#if CRASH_REPORTING
42*626ed510SSoby Mathew#define REG_SIZE	0x8
43*626ed510SSoby Mathew
44a43d431bSSoby Mathew	/* ------------------------------------------------------
45a43d431bSSoby Mathew	 * The below section deals with dumping the system state
46a43d431bSSoby Mathew	 * when an unhandled exception is taken in EL3.
47a43d431bSSoby Mathew	 * The layout and the names of the registers which will
48a43d431bSSoby Mathew	 * be dumped during a unhandled exception is given below.
49a43d431bSSoby Mathew	 * ------------------------------------------------------
50a43d431bSSoby Mathew	 */
51*626ed510SSoby Mathew.section .rodata.crash_prints, "aS"
52*626ed510SSoby Mathewprint_spacer:
53*626ed510SSoby Mathew	.asciz	" =\t\t0x"
54a43d431bSSoby Mathew
55*626ed510SSoby Mathewgp_regs:
56*626ed510SSoby Mathew	.asciz	"x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7",\
57*626ed510SSoby Mathew		"x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15",\
58*626ed510SSoby Mathew		"x16", "x17", "x18", "x19", "x20", "x21", "x22",\
59*626ed510SSoby Mathew		"x23", "x24", "x25", "x26", "x27", "x28", "x29", ""
60*626ed510SSoby Mathewel3_sys_regs:
61*626ed510SSoby Mathew	.asciz	"scr_el3", "sctlr_el3", "cptr_el3", "tcr_el3",\
62*626ed510SSoby Mathew		"daif", "mair_el3", "spsr_el3", "elr_el3", "ttbr0_el3",\
63*626ed510SSoby Mathew		"esr_el3", "far_el3", ""
64a43d431bSSoby Mathew
65*626ed510SSoby Mathewnon_el3_sys_regs:
66*626ed510SSoby Mathew	.asciz	"spsr_el1", "elr_el1", "spsr_abt", "spsr_und",\
67a43d431bSSoby Mathew		"spsr_irq", "spsr_fiq", "sctlr_el1", "actlr_el1", "cpacr_el1",\
68a43d431bSSoby Mathew		"csselr_el1", "sp_el1", "esr_el1", "ttbr0_el1", "ttbr1_el1",\
69*626ed510SSoby Mathew		"mair_el1", "amair_el1", "tcr_el1", "tpidr_el1", "tpidr_el0",\
70*626ed510SSoby Mathew		"tpidrro_el0", "dacr32_el2", "ifsr32_el2", "par_el1",\
71*626ed510SSoby Mathew		"mpidr_el1", "afsr0_el1", "afsr1_el1", "contextidr_el1",\
72*626ed510SSoby Mathew		"vbar_el1", "cntp_ctl_el0", "cntp_cval_el0", "cntv_ctl_el0",\
73*626ed510SSoby Mathew		"cntv_cval_el0", "cntkctl_el1", "fpexc32_el2", "sp_el0", ""
74a43d431bSSoby Mathew
75*626ed510SSoby Mathewpanic_msg:
76*626ed510SSoby Mathew	.asciz "PANIC in EL3 at x30 = 0x"
77*626ed510SSoby Mathewexcpt_msg:
78*626ed510SSoby Mathew	.asciz "Unhandled Exception in EL3.\nx30 =\t\t0x"
79*626ed510SSoby Mathewintr_excpt_msg:
80*626ed510SSoby Mathew	.asciz "Unhandled Interrupt Exception in EL3.\nx30 =\t\t0x"
81*626ed510SSoby Mathew
82*626ed510SSoby Mathew	/*
83*626ed510SSoby Mathew	 * Helper function to print newline to console.
84*626ed510SSoby Mathew	 */
85*626ed510SSoby Mathewfunc print_newline
86*626ed510SSoby Mathew	mov	x0, '\n'
87*626ed510SSoby Mathew	b	plat_crash_console_putc
88*626ed510SSoby Mathew
89*626ed510SSoby Mathew	/*
90*626ed510SSoby Mathew	 * Helper function to print from crash buf.
91*626ed510SSoby Mathew	 * The print loop is controlled by the buf size and
92*626ed510SSoby Mathew	 * ascii reg name list which is passed in x6. The
93*626ed510SSoby Mathew	 * function returns the crash buf address in x0.
94*626ed510SSoby Mathew	 * Clobbers : x0 - x7, sp
95*626ed510SSoby Mathew	 */
96*626ed510SSoby Mathewfunc size_controlled_print
97*626ed510SSoby Mathew	/* Save the lr */
98*626ed510SSoby Mathew	mov	sp, x30
99*626ed510SSoby Mathew	/* load the crash buf address */
100*626ed510SSoby Mathew	mrs	x7, tpidr_el3
101*626ed510SSoby Mathewtest_size_list:
102*626ed510SSoby Mathew	/* Calculate x5 always as it will be clobbered by asm_print_hex */
103*626ed510SSoby Mathew	mrs	x5, tpidr_el3
104*626ed510SSoby Mathew	add	x5, x5, #CPU_DATA_CRASH_BUF_SIZE
105*626ed510SSoby Mathew	/* Test whether we have reached end of crash buf */
106*626ed510SSoby Mathew	cmp	x7, x5
107*626ed510SSoby Mathew	b.eq	exit_size_print
108*626ed510SSoby Mathew	ldrb	w4, [x6]
109*626ed510SSoby Mathew	/* Test whether we are at end of list */
110*626ed510SSoby Mathew	cbz	w4, exit_size_print
111*626ed510SSoby Mathew	mov	x4, x6
112*626ed510SSoby Mathew	/* asm_print_str updates x4 to point to next entry in list */
113*626ed510SSoby Mathew	bl	asm_print_str
114*626ed510SSoby Mathew	/* update x6 with the updated list pointer */
115*626ed510SSoby Mathew	mov	x6, x4
116*626ed510SSoby Mathew	adr	x4, print_spacer
117*626ed510SSoby Mathew	bl	asm_print_str
118*626ed510SSoby Mathew	ldr	x4, [x7], #REG_SIZE
119*626ed510SSoby Mathew	bl	asm_print_hex
120*626ed510SSoby Mathew	bl	print_newline
121*626ed510SSoby Mathew	b	test_size_list
122*626ed510SSoby Mathewexit_size_print:
123*626ed510SSoby Mathew	mov	x30, sp
124*626ed510SSoby Mathew	ret
125*626ed510SSoby Mathew
126*626ed510SSoby Mathew	/*
127*626ed510SSoby Mathew	 * Helper function to store x8 - x15 registers to
128*626ed510SSoby Mathew	 * the crash buf. The system registers values are
129*626ed510SSoby Mathew	 * copied to x8 to x15 by the caller which are then
130*626ed510SSoby Mathew	 * copied to the crash buf by this function.
131*626ed510SSoby Mathew	 * x0 points to the crash buf. It then calls
132*626ed510SSoby Mathew	 * size_controlled_print to print to console.
133*626ed510SSoby Mathew	 * Clobbers : x0 - x7, sp
134*626ed510SSoby Mathew	 */
135*626ed510SSoby Mathewfunc str_in_crash_buf_print
136*626ed510SSoby Mathew	/* restore the crash buf address in x0 */
137*626ed510SSoby Mathew	mrs	x0, tpidr_el3
138*626ed510SSoby Mathew	stp	x8, x9, [x0]
139*626ed510SSoby Mathew	stp	x10, x11, [x0, #REG_SIZE * 2]
140*626ed510SSoby Mathew	stp	x12, x13, [x0, #REG_SIZE * 4]
141*626ed510SSoby Mathew	stp	x14, x15, [x0, #REG_SIZE * 6]
142*626ed510SSoby Mathew	b	size_controlled_print
143*626ed510SSoby Mathew
144*626ed510SSoby Mathew	/* ------------------------------------------------------
145*626ed510SSoby Mathew	 * This macro calculates the offset to crash buf from
146*626ed510SSoby Mathew	 * cpu_data and stores it in tpidr_el3. It also saves x0
147*626ed510SSoby Mathew	 * and x1 in the crash buf by using sp as a temporary
148*626ed510SSoby Mathew	 * register.
149*626ed510SSoby Mathew	 * ------------------------------------------------------
150*626ed510SSoby Mathew	 */
151*626ed510SSoby Mathew	.macro prepare_crash_buf_save_x0_x1
152*626ed510SSoby Mathew	/* we can corrupt this reg to free up x0 */
153*626ed510SSoby Mathew	mov	sp, x0
154*626ed510SSoby Mathew	/* tpidr_el3 contains the address to cpu_data structure */
155*626ed510SSoby Mathew	mrs	x0, tpidr_el3
156*626ed510SSoby Mathew	/* Calculate the Crash buffer offset in cpu_data */
157*626ed510SSoby Mathew	add	x0, x0, #CPU_DATA_CRASH_BUF_OFFSET
158*626ed510SSoby Mathew	/* Store crash buffer address in tpidr_el3 */
159*626ed510SSoby Mathew	msr	tpidr_el3, x0
160*626ed510SSoby Mathew	str	x1, [x0, #REG_SIZE]
161*626ed510SSoby Mathew	mov	x1, sp
162*626ed510SSoby Mathew	str	x1, [x0]
163*626ed510SSoby Mathew	.endm
164a43d431bSSoby Mathew
165a43d431bSSoby Mathew	/* -----------------------------------------------------
166*626ed510SSoby Mathew	 * This function allows to report a crash (if crash
167*626ed510SSoby Mathew	 * reporting is enabled) when an unhandled exception
168*626ed510SSoby Mathew	 * occurs. It prints the CPU state via the crash console
169*626ed510SSoby Mathew	 * making use of the crash buf. This function will
170*626ed510SSoby Mathew	 * not return.
171a43d431bSSoby Mathew	 * -----------------------------------------------------
172a43d431bSSoby Mathew	 */
173*626ed510SSoby Mathewfunc report_unhandled_exception
174*626ed510SSoby Mathew	prepare_crash_buf_save_x0_x1
175*626ed510SSoby Mathew	adr	x0, excpt_msg
176*626ed510SSoby Mathew	mov	sp, x0
177*626ed510SSoby Mathew	/* This call will not return */
178*626ed510SSoby Mathew	b	do_crash_reporting
179a43d431bSSoby Mathew
180a43d431bSSoby Mathew
181*626ed510SSoby Mathew	/* -----------------------------------------------------
182*626ed510SSoby Mathew	 * This function allows to report a crash (if crash
183*626ed510SSoby Mathew	 * reporting is enabled) when an unhandled interrupt
184*626ed510SSoby Mathew	 * occurs. It prints the CPU state via the crash console
185*626ed510SSoby Mathew	 * making use of the crash buf. This function will
186*626ed510SSoby Mathew	 * not return.
187*626ed510SSoby Mathew	 * -----------------------------------------------------
188*626ed510SSoby Mathew	 */
189*626ed510SSoby Mathewfunc report_unhandled_interrupt
190*626ed510SSoby Mathew	prepare_crash_buf_save_x0_x1
191*626ed510SSoby Mathew	adr	x0, intr_excpt_msg
192*626ed510SSoby Mathew	mov	sp, x0
193*626ed510SSoby Mathew	/* This call will not return */
194*626ed510SSoby Mathew	b	do_crash_reporting
195a43d431bSSoby Mathew
196*626ed510SSoby Mathew	/* -----------------------------------------------------
197*626ed510SSoby Mathew	 * This function allows to report a crash (if crash
198*626ed510SSoby Mathew	 * reporting is enabled) when panic() is invoked from
199*626ed510SSoby Mathew	 * C Runtime. It prints the CPU state via the crash
200*626ed510SSoby Mathew	 * console making use of the crash buf. This function
201*626ed510SSoby Mathew	 * will not return.
202*626ed510SSoby Mathew	 * -----------------------------------------------------
203*626ed510SSoby Mathew	 */
204*626ed510SSoby Mathewfunc el3_panic
205*626ed510SSoby Mathew	msr	spsel, #1
206*626ed510SSoby Mathew	prepare_crash_buf_save_x0_x1
207*626ed510SSoby Mathew	adr	x0, panic_msg
208*626ed510SSoby Mathew	mov	sp, x0
209*626ed510SSoby Mathew	/* This call will not return */
210*626ed510SSoby Mathew	b	do_crash_reporting
211a43d431bSSoby Mathew
212*626ed510SSoby Mathew	/* ------------------------------------------------------------
213*626ed510SSoby Mathew	 * The common crash reporting functionality. It requires x0
214*626ed510SSoby Mathew	 * and x1 has already been stored in crash buf, sp points to
215*626ed510SSoby Mathew	 * crash message and tpidr_el3 contains the crash buf address.
216*626ed510SSoby Mathew	 * The function does the following:
217*626ed510SSoby Mathew	 *   - Retrieve the crash buffer from tpidr_el3
218*626ed510SSoby Mathew	 *   - Store x2 to x6 in the crash buffer
219*626ed510SSoby Mathew	 *   - Initialise the crash console.
220*626ed510SSoby Mathew	 *   - Print the crash message by using the address in sp.
221*626ed510SSoby Mathew	 *   - Print x30 value to the crash console.
222*626ed510SSoby Mathew	 *   - Print x0 - x7 from the crash buf to the crash console.
223*626ed510SSoby Mathew	 *   - Print x8 - x29 (in groups of 8 registers) using the
224*626ed510SSoby Mathew	 *     crash buf to the crash console.
225*626ed510SSoby Mathew	 *   - Print el3 sys regs (in groups of 8 registers) using the
226*626ed510SSoby Mathew	 *     crash buf to the crash console.
227*626ed510SSoby Mathew	 *   - Print non el3 sys regs (in groups of 8 registers) using
228*626ed510SSoby Mathew	 *     the crash buf to the crash console.
229*626ed510SSoby Mathew	 * ------------------------------------------------------------
230*626ed510SSoby Mathew	 */
231*626ed510SSoby Mathewfunc do_crash_reporting
232*626ed510SSoby Mathew	/* Retrieve the crash buf from tpidr_el3 */
233*626ed510SSoby Mathew	mrs	x0, tpidr_el3
234*626ed510SSoby Mathew	/* Store x2 - x6, x30 in the crash buffer */
235*626ed510SSoby Mathew	stp	x2, x3, [x0, #REG_SIZE * 2]
236*626ed510SSoby Mathew	stp	x4, x5, [x0, #REG_SIZE * 4]
237*626ed510SSoby Mathew	stp	x6, x30, [x0, #REG_SIZE * 6]
238*626ed510SSoby Mathew	/* Initialize the crash console */
239*626ed510SSoby Mathew	bl	plat_crash_console_init
240*626ed510SSoby Mathew	/* Verify the console is initialized */
241*626ed510SSoby Mathew	cbz	x0, crash_panic
242*626ed510SSoby Mathew	/* Print the crash message. sp points to the crash message */
243*626ed510SSoby Mathew	mov	x4, sp
244*626ed510SSoby Mathew	bl	asm_print_str
245*626ed510SSoby Mathew	/* load the crash buf address */
246*626ed510SSoby Mathew	mrs	x0, tpidr_el3
247*626ed510SSoby Mathew	/* report x30 first from the crash buf */
248*626ed510SSoby Mathew	ldr	x4, [x0, #REG_SIZE * 7]
249*626ed510SSoby Mathew	bl	asm_print_hex
250*626ed510SSoby Mathew	bl	print_newline
251*626ed510SSoby Mathew	/* Load the crash buf address */
252*626ed510SSoby Mathew	mrs	x0, tpidr_el3
253*626ed510SSoby Mathew	/* Now mov x7 into crash buf */
254*626ed510SSoby Mathew	str	x7, [x0, #REG_SIZE * 7]
255a43d431bSSoby Mathew
256*626ed510SSoby Mathew	/* Report x0 - x29 values stored in crash buf*/
257*626ed510SSoby Mathew	/* Store the ascii list pointer in x6 */
258*626ed510SSoby Mathew	adr	x6, gp_regs
259*626ed510SSoby Mathew	/* Print x0 to x7 from the crash buf */
260*626ed510SSoby Mathew	bl	size_controlled_print
261*626ed510SSoby Mathew	/* Store x8 - x15 in crash buf and print */
262*626ed510SSoby Mathew	bl	str_in_crash_buf_print
263*626ed510SSoby Mathew	/* Load the crash buf address */
264*626ed510SSoby Mathew	mrs	x0, tpidr_el3
265*626ed510SSoby Mathew	/* Store the rest of gp regs and print */
266*626ed510SSoby Mathew	stp	x16, x17, [x0]
267*626ed510SSoby Mathew	stp	x18, x19, [x0, #REG_SIZE * 2]
268*626ed510SSoby Mathew	stp	x20, x21, [x0, #REG_SIZE * 4]
269*626ed510SSoby Mathew	stp	x22, x23, [x0, #REG_SIZE * 6]
270*626ed510SSoby Mathew	bl	size_controlled_print
271*626ed510SSoby Mathew	/* Load the crash buf address */
272*626ed510SSoby Mathew	mrs	x0, tpidr_el3
273*626ed510SSoby Mathew	stp	x24, x25, [x0]
274*626ed510SSoby Mathew	stp	x26, x27, [x0, #REG_SIZE * 2]
275*626ed510SSoby Mathew	stp	x28, x29, [x0, #REG_SIZE * 4]
276*626ed510SSoby Mathew	bl	size_controlled_print
277a43d431bSSoby Mathew
278*626ed510SSoby Mathew	/* Print the el3 sys registers */
279*626ed510SSoby Mathew	adr	x6, el3_sys_regs
280*626ed510SSoby Mathew	mrs	x8, scr_el3
281*626ed510SSoby Mathew	mrs	x9, sctlr_el3
282*626ed510SSoby Mathew	mrs	x10, cptr_el3
283*626ed510SSoby Mathew	mrs	x11, tcr_el3
284*626ed510SSoby Mathew	mrs	x12, daif
285*626ed510SSoby Mathew	mrs	x13, mair_el3
286*626ed510SSoby Mathew	mrs	x14, spsr_el3
287*626ed510SSoby Mathew	mrs	x15, elr_el3
288*626ed510SSoby Mathew	bl	str_in_crash_buf_print
289*626ed510SSoby Mathew	mrs	x8, ttbr0_el3
290*626ed510SSoby Mathew	mrs	x9, esr_el3
291*626ed510SSoby Mathew	mrs	x10, far_el3
292*626ed510SSoby Mathew	bl	str_in_crash_buf_print
293a43d431bSSoby Mathew
294*626ed510SSoby Mathew	/* Print the non el3 sys registers */
295*626ed510SSoby Mathew	adr	x6, non_el3_sys_regs
296*626ed510SSoby Mathew	mrs	x8, spsr_el1
297*626ed510SSoby Mathew	mrs	x9, elr_el1
298*626ed510SSoby Mathew	mrs	x10, spsr_abt
299*626ed510SSoby Mathew	mrs	x11, spsr_und
300*626ed510SSoby Mathew	mrs	x12, spsr_irq
301*626ed510SSoby Mathew	mrs	x13, spsr_fiq
302*626ed510SSoby Mathew	mrs	x14, sctlr_el1
303*626ed510SSoby Mathew	mrs	x15, actlr_el1
304*626ed510SSoby Mathew	bl	str_in_crash_buf_print
305*626ed510SSoby Mathew	mrs	x8, cpacr_el1
306*626ed510SSoby Mathew	mrs	x9, csselr_el1
307a43d431bSSoby Mathew	mrs	x10, sp_el1
308a43d431bSSoby Mathew	mrs	x11, esr_el1
309a43d431bSSoby Mathew	mrs	x12, ttbr0_el1
310a43d431bSSoby Mathew	mrs	x13, ttbr1_el1
311a43d431bSSoby Mathew	mrs	x14, mair_el1
312a43d431bSSoby Mathew	mrs	x15, amair_el1
313*626ed510SSoby Mathew	bl	str_in_crash_buf_print
314*626ed510SSoby Mathew	mrs	x8, tcr_el1
315*626ed510SSoby Mathew	mrs	x9, tpidr_el1
316*626ed510SSoby Mathew	mrs	x10, tpidr_el0
317*626ed510SSoby Mathew	mrs	x11, tpidrro_el0
318*626ed510SSoby Mathew	mrs	x12, dacr32_el2
319*626ed510SSoby Mathew	mrs	x13, ifsr32_el2
320*626ed510SSoby Mathew	mrs	x14, par_el1
321*626ed510SSoby Mathew	mrs	x15, mpidr_el1
322*626ed510SSoby Mathew	bl	str_in_crash_buf_print
323*626ed510SSoby Mathew	mrs	x8, afsr0_el1
324*626ed510SSoby Mathew	mrs	x9, afsr1_el1
325*626ed510SSoby Mathew	mrs	x10, contextidr_el1
326*626ed510SSoby Mathew	mrs	x11, vbar_el1
327*626ed510SSoby Mathew	mrs	x12, cntp_ctl_el0
328*626ed510SSoby Mathew	mrs	x13, cntp_cval_el0
329*626ed510SSoby Mathew	mrs	x14, cntv_ctl_el0
330*626ed510SSoby Mathew	mrs	x15, cntv_cval_el0
331*626ed510SSoby Mathew	bl	str_in_crash_buf_print
332*626ed510SSoby Mathew	mrs	x8, cntkctl_el1
333*626ed510SSoby Mathew	mrs	x9, fpexc32_el2
334*626ed510SSoby Mathew	mrs	x10, sp_el0
335*626ed510SSoby Mathew	bl	str_in_crash_buf_print
336a43d431bSSoby Mathew
337*626ed510SSoby Mathew	/* Print the gic registers */
338*626ed510SSoby Mathew	plat_print_gic_regs
339a43d431bSSoby Mathew
340*626ed510SSoby Mathew	/* Done reporting */
341*626ed510SSoby Mathew	b	crash_panic
342a43d431bSSoby Mathew
343*626ed510SSoby Mathew#else	/* CRASH_REPORTING */
344*626ed510SSoby Mathewfunc report_unhandled_exception
345*626ed510SSoby Mathewreport_unhandled_interrupt:
346*626ed510SSoby Mathew	b	crash_panic
3479c22b323SAndrew Thoelke#endif	/* CRASH_REPORING */
3489c22b323SAndrew Thoelke
349a43d431bSSoby Mathew
350*626ed510SSoby Mathewfunc crash_panic
351*626ed510SSoby Mathew	b	crash_panic
352