blob: 33f64538f820f0cc8925c0ef91d1f34231275f21 [file] [log] [blame]
Stefan Kristianssonca9d3ab2011-11-26 19:04:49 +00001/*
2 * (C) Copyright 2011, Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17 * MA 02111-1307 USA
18 */
19
20#ifndef _OPENRISC_EXC_H_
21#define _OPENRISC_EXC_H_
22
23#define EXC_RESET 0x01
24#define EXC_BUS_ERROR 0x02
25#define EXC_DATA_PAGE_FAULT 0x03
26#define EXC_INSTR_PAGE_FAULT 0x04
27#define EXC_TIMER 0x05
28#define EXC_ALIGNMENT 0x06
29#define EXC_ILLEGAL_INSTR 0x07
30#define EXC_EXT_IRQ 0x08
31#define EXC_DTLB_MISS 0x09
32#define EXC_ITLB_MISS 0x0a
33#define EXC_RANGE 0x0b
34#define EXC_SYSCALL 0x0c
35#define EXC_FLOAT_POINT 0x0d
36#define EXC_TRAP 0x0e
37
38void exception_install_handler(int exception, void (*handler)(void));
39void exception_free_handler(int exception);
40
41#endif