2 * (C) Copyright 2011, Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
4 * SPDX-License-Identifier: GPL-2.0+
7 #ifndef _OPENRISC_EXC_H_
8 #define _OPENRISC_EXC_H_
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
25 void exception_install_handler(int exception, void (*handler)(void));
26 void exception_free_handler(int exception);