blob: cf9af4326a2952d82e218b02665d9747aa520e18 [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>
Simon Glassc30b7ad2019-11-14 12:57:41 -070015#include <irq_func.h>
Simon Glass25a58182020-05-10 11:40:06 -060016#include <asm/ptrace.h>
Chris Zankelc978b522016-08-10 18:36:44 +030017#include <asm/string.h>
18#include <asm/regs.h>
19
20typedef void (*handler_t)(struct pt_regs *);
21
22void unhandled_exception(struct pt_regs *regs)
23{
24 printf("Unhandled Exception: EXCCAUSE = %ld, EXCVADDR = %lx, pc = %lx\n",
25 regs->exccause, regs->excvaddr, regs->pc);
26 panic("*** PANIC\n");
27}
28
29handler_t exc_table[EXCCAUSE_LAST] = {
30 [0 ... EXCCAUSE_LAST-1] = unhandled_exception,
31};
32
33int interrupt_init(void)
34{
35 return 0;
36}
37
38void enable_interrupts(void)
39{
40}
41
42int disable_interrupts(void)
43{
44 return 0;
45}