18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Port on Texas Instruments TMS320C6x architecture 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2004, 2009, 2011 Texas Instruments Incorporated 68c2ecf20Sopenharmony_ci * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#ifndef _ASM_C6X_TRAPS_H 98c2ecf20Sopenharmony_ci#define _ASM_C6X_TRAPS_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define EXCEPT_TYPE_NXF 31 /* NMI */ 128c2ecf20Sopenharmony_ci#define EXCEPT_TYPE_EXC 30 /* external exception */ 138c2ecf20Sopenharmony_ci#define EXCEPT_TYPE_IXF 1 /* internal exception */ 148c2ecf20Sopenharmony_ci#define EXCEPT_TYPE_SXF 0 /* software exception */ 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#define EXCEPT_CAUSE_LBX (1 << 7) /* loop buffer exception */ 178c2ecf20Sopenharmony_ci#define EXCEPT_CAUSE_PRX (1 << 6) /* privilege exception */ 188c2ecf20Sopenharmony_ci#define EXCEPT_CAUSE_RAX (1 << 5) /* resource access exception */ 198c2ecf20Sopenharmony_ci#define EXCEPT_CAUSE_RCX (1 << 4) /* resource conflict exception */ 208c2ecf20Sopenharmony_ci#define EXCEPT_CAUSE_OPX (1 << 3) /* opcode exception */ 218c2ecf20Sopenharmony_ci#define EXCEPT_CAUSE_EPX (1 << 2) /* execute packet exception */ 228c2ecf20Sopenharmony_ci#define EXCEPT_CAUSE_FPX (1 << 1) /* fetch packet exception */ 238c2ecf20Sopenharmony_ci#define EXCEPT_CAUSE_IFX (1 << 0) /* instruction fetch exception */ 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cistruct exception_info { 268c2ecf20Sopenharmony_ci char *kernel_str; 278c2ecf20Sopenharmony_ci int signo; 288c2ecf20Sopenharmony_ci int code; 298c2ecf20Sopenharmony_ci}; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciextern int (*c6x_nmi_handler)(struct pt_regs *regs); 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#endif /* _ASM_C6X_TRAPS_H */ 34