1
0

armv7.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2011-09-15 Bernard first version
  9. */
  10. #ifndef __ARMV7_H__
  11. #define __ARMV7_H__
  12. /* the exception stack without VFP registers */
  13. struct rt_hw_exp_stack
  14. {
  15. unsigned long r0;
  16. unsigned long r1;
  17. unsigned long r2;
  18. unsigned long r3;
  19. unsigned long r4;
  20. unsigned long r5;
  21. unsigned long r6;
  22. unsigned long r7;
  23. unsigned long r8;
  24. unsigned long r9;
  25. unsigned long r10;
  26. unsigned long fp;
  27. unsigned long ip;
  28. unsigned long sp;
  29. unsigned long lr;
  30. unsigned long pc;
  31. unsigned long cpsr;
  32. };
  33. struct rt_hw_stack
  34. {
  35. unsigned long cpsr;
  36. unsigned long r0;
  37. unsigned long r1;
  38. unsigned long r2;
  39. unsigned long r3;
  40. unsigned long r4;
  41. unsigned long r5;
  42. unsigned long r6;
  43. unsigned long r7;
  44. unsigned long r8;
  45. unsigned long r9;
  46. unsigned long r10;
  47. unsigned long fp;
  48. unsigned long ip;
  49. unsigned long lr;
  50. unsigned long pc;
  51. };
  52. #define USERMODE 0x10
  53. #define FIQMODE 0x11
  54. #define IRQMODE 0x12
  55. #define SVCMODE 0x13
  56. #define MONITORMODE 0x16
  57. #define ABORTMODE 0x17
  58. #define HYPMODE 0x1b
  59. #define UNDEFMODE 0x1b
  60. #define MODEMASK 0x1f
  61. #define NOINT 0xc0
  62. #define T_Bit (1<<5)
  63. #define F_Bit (1<<6)
  64. #define I_Bit (1<<7)
  65. #define A_Bit (1<<8)
  66. #define E_Bit (1<<9)
  67. #define J_Bit (1<<24)
  68. #endif