Stefan Kristiansson | 6e560bb | 2011-11-26 19:04:49 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2011, Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> |
| 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Stefan Kristiansson | 6e560bb | 2011-11-26 19:04:49 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _OPENRISC_EXC_H_ |
| 8 | #define _OPENRISC_EXC_H_ |
| 9 | |
| 10 | #define EXC_RESET 0x01 |
| 11 | #define EXC_BUS_ERROR 0x02 |
| 12 | #define EXC_DATA_PAGE_FAULT 0x03 |
| 13 | #define EXC_INSTR_PAGE_FAULT 0x04 |
| 14 | #define EXC_TIMER 0x05 |
| 15 | #define EXC_ALIGNMENT 0x06 |
| 16 | #define EXC_ILLEGAL_INSTR 0x07 |
| 17 | #define EXC_EXT_IRQ 0x08 |
| 18 | #define EXC_DTLB_MISS 0x09 |
| 19 | #define EXC_ITLB_MISS 0x0a |
| 20 | #define EXC_RANGE 0x0b |
| 21 | #define EXC_SYSCALL 0x0c |
| 22 | #define EXC_FLOAT_POINT 0x0d |
| 23 | #define EXC_TRAP 0x0e |
| 24 | |
| 25 | void exception_install_handler(int exception, void (*handler)(void)); |
| 26 | void exception_free_handler(int exception); |
| 27 | |
| 28 | #endif |