traps.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #define EXCEPT_TYPE_NXF 31 /* NMI */
  14. #define EXCEPT_TYPE_EXC 30 /* external exception */
  15. #define EXCEPT_TYPE_IXF 1 /* internal exception */
  16. #define EXCEPT_TYPE_SXF 0 /* software exception */
  17. #define EXCEPT_CAUSE_LBX (1 << 7) /* loop buffer exception */
  18. #define EXCEPT_CAUSE_PRX (1 << 6) /* privilege exception */
  19. #define EXCEPT_CAUSE_RAX (1 << 5) /* resource access exception */
  20. #define EXCEPT_CAUSE_RCX (1 << 4) /* resource conflict exception */
  21. #define EXCEPT_CAUSE_OPX (1 << 3) /* opcode exception */
  22. #define EXCEPT_CAUSE_EPX (1 << 2) /* execute packet exception */
  23. #define EXCEPT_CAUSE_FPX (1 << 1) /* fetch packet exception */
  24. #define EXCEPT_CAUSE_IFX (1 << 0) /* instruction fetch exception */
  25. struct exception_info {
  26. char *kernel_str;
  27. int signo;
  28. int code;
  29. };
  30. extern int (*c6x_nmi_handler)(struct pt_regs *regs);
  31. #endif /* _ASM_C6X_TRAPS_H */