Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Chris Zankel | 1387dab | 2016-08-10 18:36:44 +0300 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2008 - 2013 Tensilica Inc. |
| 4 | * (C) Copyright 2014 - 2016 Cadence Design Systems Inc. |
Chris Zankel | 1387dab | 2016-08-10 18:36:44 +0300 | [diff] [blame] | 5 | */ |
| 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 | |
Chris Zankel | 1387dab | 2016-08-10 18:36:44 +0300 | [diff] [blame] | 13 | #include <command.h> |
Simon Glass | 9b61c7c | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 14 | #include <irq_func.h> |
Simon Glass | 6b9f010 | 2020-05-10 11:40:06 -0600 | [diff] [blame] | 15 | #include <asm/ptrace.h> |
Chris Zankel | 1387dab | 2016-08-10 18:36:44 +0300 | [diff] [blame] | 16 | #include <asm/string.h> |
| 17 | #include <asm/regs.h> |
Tom Rini | dec7ea0 | 2024-05-20 13:35:03 -0600 | [diff] [blame] | 18 | #include <vsprintf.h> |
Chris Zankel | 1387dab | 2016-08-10 18:36:44 +0300 | [diff] [blame] | 19 | |
| 20 | typedef void (*handler_t)(struct pt_regs *); |
| 21 | |
| 22 | void 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 | |
| 29 | handler_t exc_table[EXCCAUSE_LAST] = { |
| 30 | [0 ... EXCCAUSE_LAST-1] = unhandled_exception, |
| 31 | }; |
| 32 | |
| 33 | int interrupt_init(void) |
| 34 | { |
| 35 | return 0; |
| 36 | } |
| 37 | |
| 38 | void enable_interrupts(void) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | int disable_interrupts(void) |
| 43 | { |
| 44 | return 0; |
| 45 | } |