blob: fe2dedf3c4b17816ccb878a305d2966467efc844 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Chris Zankelc978b522016-08-10 18:36:44 +03002/*
3 * (C) Copyright 2008 - 2013 Tensilica Inc.
4 * (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
Chris Zankelc978b522016-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>
15#include <asm/string.h>
16#include <asm/regs.h>
17
18typedef void (*handler_t)(struct pt_regs *);
19
20void unhandled_exception(struct pt_regs *regs)
21{
22 printf("Unhandled Exception: EXCCAUSE = %ld, EXCVADDR = %lx, pc = %lx\n",
23 regs->exccause, regs->excvaddr, regs->pc);
24 panic("*** PANIC\n");
25}
26
27handler_t exc_table[EXCCAUSE_LAST] = {
28 [0 ... EXCCAUSE_LAST-1] = unhandled_exception,
29};
30
31int interrupt_init(void)
32{
33 return 0;
34}
35
36void enable_interrupts(void)
37{
38}
39
40int disable_interrupts(void)
41{
42 return 0;
43}