xref: /openbmc/u-boot/arch/xtensa/cpu/exceptions.c (revision 9d466f2f)
1 /*
2  * (C) Copyright 2008 - 2013 Tensilica Inc.
3  * (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 /*
9  * Exception handling.
10  *  We currently don't handle any exception and force a reset.
11  *  (Note that alloca is a special case and handled in start.S)
12  */
13 
14 #include <common.h>
15 #include <command.h>
16 #include <asm/string.h>
17 #include <asm/regs.h>
18 
19 typedef void (*handler_t)(struct pt_regs *);
20 
21 void unhandled_exception(struct pt_regs *regs)
22 {
23 	printf("Unhandled Exception: EXCCAUSE = %ld, EXCVADDR = %lx, pc = %lx\n",
24 	       regs->exccause, regs->excvaddr, regs->pc);
25 	panic("*** PANIC\n");
26 }
27 
28 handler_t exc_table[EXCCAUSE_LAST] = {
29 	[0 ... EXCCAUSE_LAST-1]			= unhandled_exception,
30 };
31 
32 int interrupt_init(void)
33 {
34 	return 0;
35 }
36 
37 void enable_interrupts(void)
38 {
39 }
40 
41 int disable_interrupts(void)
42 {
43 	return 0;
44 }
45