blob: 3b8f4a36d3ec5fac47b7fb4581be54d4fbcfa45d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Chris Zankel1387dab2016-08-10 18:36:44 +03002/*
3 * (C) Copyright 2008 - 2013 Tensilica Inc.
4 * (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
Chris Zankel1387dab2016-08-10 18:36:44 +03005 */
6
7/*
8 * Exception handling.
9 * We currently don't handle any exception and force a reset.
10 * (Note that alloca is a special case and handled in start.S)
11 */
12
13#include <common.h>
14#include <command.h>
Simon Glass9b61c7c2019-11-14 12:57:41 -070015#include <irq_func.h>
Chris Zankel1387dab2016-08-10 18:36:44 +030016#include <asm/string.h>
17#include <asm/regs.h>
18
19typedef void (*handler_t)(struct pt_regs *);
20
21void 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
28handler_t exc_table[EXCCAUSE_LAST] = {
29 [0 ... EXCCAUSE_LAST-1] = unhandled_exception,
30};
31
32int interrupt_init(void)
33{
34 return 0;
35}
36
37void enable_interrupts(void)
38{
39}
40
41int disable_interrupts(void)
42{
43 return 0;
44}