excArmLib.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* excArmLib.h - ARM exception library header file */
  2. /* Copyright 1996-1997 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01b,23jul01,scm  change XScale name to conform to coding standards...
  7. 01a,11dec00,scm  replace references to ARMSA2 with XScale
  8. 01c,16oct00,scm  reverse back I & F bits for SA2
  9. 01b,15sep00,scm  update for SA2 support...
  10. 01a,09may96,cdp  created
  11. */
  12. #ifndef __INCexcArmLibh
  13. #define __INCexcArmLibh
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifndef _ASMLANGUAGE
  18. /*
  19.  * NOTE: if this structure changes, the TCB offsets in h/private/taskLibP.h
  20.  *  must be updated. See also taskLib.h.
  21.  */
  22. typedef struct
  23.     {
  24.     UINT32 valid; /* indicators that following fields are valid */
  25.     UINT32 vecAddr; /* exception vector address */
  26.     INSTR * pc; /* PC */
  27.     UINT32 cpsr; /* CPSR */
  28.     } EXC_INFO;
  29. extern FUNCPTR excExcepHook; /* add'l rtn to call when exceptions occur */
  30. extern VOIDFUNCPTR _func_excBreakpoint; /* called to handle breakpoints */
  31. #if defined(__STDC__) || defined(__cplusplus)
  32. extern STATUS   excIntConnect (VOIDFUNCPTR *, VOIDFUNCPTR);
  33. extern void excVecSet (FUNCPTR *, FUNCPTR);
  34. extern FUNCPTR excVecGet (FUNCPTR *);
  35. #else /* __STDC__ */
  36. extern STATUS   excIntConnect ();
  37. extern void excVecSet ();
  38. extern FUNCPTR excVecGet ();
  39. #endif /* __STDC__ */
  40. #endif /* ASMLANGUAGE */
  41. /* exception information valid bits */
  42. #define EXC_INFO_VECADDR 0x01 /* vector is valid */
  43. #define EXC_INFO_PC 0x02 /* PC is valid */
  44. #define EXC_INFO_CPSR 0x04 /* CPSR is valid */
  45. /* exception vector addresses */
  46. #define EXC_OFF_RESET 0x00 /* reset */
  47. #define EXC_OFF_UNDEF 0x04 /* undefined instruction */
  48. #define EXC_OFF_SWI 0x08 /* software interrupt */
  49. #define EXC_OFF_PREFETCH 0x0c /* prefetch abort */
  50. #define EXC_OFF_DATA 0x10 /* data abort */
  51. #define EXC_OFF_IRQ             0x18    /* interrupt */
  52. #define EXC_OFF_FIQ             0x1C    /* fast interrupt */
  53. /* Exception Vector Base */
  54. #define ARM_EXC_VEC_BASE        0x00
  55. /*
  56.  * In coyanosa I80310 the default vector base is 0x00,
  57.  * can be relocated into 0xFFFF0000
  58.  *
  59.  */
  60. #if ((CPU==XSCALE) || (CPU==ARMSA110))
  61. #define ARM_EXC_VEC_BASE_RELOCATED      0xffff0000
  62. #endif
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #endif /* __INCexcArmLibh */