Aurelien Jacquiot | e94e668 | 2011-10-04 11:10:02 -0400 | [diff] [blame^] | 1 | /* |
| 2 | * Port on Texas Instruments TMS320C6x architecture |
| 3 | * |
| 4 | * Copyright (C) 2004, 2009, 2011 Texas Instruments Incorporated |
| 5 | * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | #ifndef _ASM_C6X_TRAPS_H |
| 12 | #define _ASM_C6X_TRAPS_H |
| 13 | |
| 14 | #define EXCEPT_TYPE_NXF 31 /* NMI */ |
| 15 | #define EXCEPT_TYPE_EXC 30 /* external exception */ |
| 16 | #define EXCEPT_TYPE_IXF 1 /* internal exception */ |
| 17 | #define EXCEPT_TYPE_SXF 0 /* software exception */ |
| 18 | |
| 19 | #define EXCEPT_CAUSE_LBX (1 << 7) /* loop buffer exception */ |
| 20 | #define EXCEPT_CAUSE_PRX (1 << 6) /* privilege exception */ |
| 21 | #define EXCEPT_CAUSE_RAX (1 << 5) /* resource access exception */ |
| 22 | #define EXCEPT_CAUSE_RCX (1 << 4) /* resource conflict exception */ |
| 23 | #define EXCEPT_CAUSE_OPX (1 << 3) /* opcode exception */ |
| 24 | #define EXCEPT_CAUSE_EPX (1 << 2) /* execute packet exception */ |
| 25 | #define EXCEPT_CAUSE_FPX (1 << 1) /* fetch packet exception */ |
| 26 | #define EXCEPT_CAUSE_IFX (1 << 0) /* instruction fetch exception */ |
| 27 | |
| 28 | struct exception_info { |
| 29 | char *kernel_str; |
| 30 | int signo; |
| 31 | int code; |
| 32 | }; |
| 33 | |
| 34 | extern int (*c6x_nmi_handler)(struct pt_regs *regs); |
| 35 | |
| 36 | #endif /* _ASM_C6X_TRAPS_H */ |