5.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * arm definition
  3. */
  4. #include <u.h>
  5. #include <bio.h>
  6. #include "/arm/include/ureg.h"
  7. #include <mach.h>
  8. #define REGOFF(x) (ulong) (&((struct Ureg *) 0)->x)
  9. #define SP REGOFF(r13)
  10. #define PC REGOFF(pc)
  11. #define REGSIZE sizeof(struct Ureg)
  12. Reglist armreglist[] =
  13. {
  14. {"TYPE", REGOFF(type), RINT|RRDONLY, 'X'},
  15. {"PSR", REGOFF(psr), RINT|RRDONLY, 'X'},
  16. {"PC", PC, RINT, 'X'},
  17. {"SP", SP, RINT, 'X'},
  18. {"R15", PC, RINT, 'X'},
  19. {"R14", REGOFF(r14), RINT, 'X'},
  20. {"R13", REGOFF(r13), RINT, 'X'},
  21. {"R12", REGOFF(r12), RINT, 'X'},
  22. {"R11", REGOFF(r11), RINT, 'X'},
  23. {"R10", REGOFF(r10), RINT, 'X'},
  24. {"R9", REGOFF(r9), RINT, 'X'},
  25. {"R8", REGOFF(r8), RINT, 'X'},
  26. {"R7", REGOFF(r7), RINT, 'X'},
  27. {"R6", REGOFF(r6), RINT, 'X'},
  28. {"R5", REGOFF(r5), RINT, 'X'},
  29. {"R4", REGOFF(r4), RINT, 'X'},
  30. {"R3", REGOFF(r3), RINT, 'X'},
  31. {"R2", REGOFF(r2), RINT, 'X'},
  32. {"R1", REGOFF(r1), RINT, 'X'},
  33. {"R0", REGOFF(r0), RINT, 'X'},
  34. { 0 }
  35. };
  36. /* the machine description */
  37. Mach marm =
  38. {
  39. "arm",
  40. MARM, /* machine type */
  41. armreglist, /* register set */
  42. REGSIZE, /* register set size */
  43. 0, /* fp register set size */
  44. "PC", /* name of PC */
  45. "SP", /* name of SP */
  46. "R14", /* name of link register */
  47. "setR12", /* static base register name */
  48. 0, /* static base register value */
  49. 0x1000, /* page size */
  50. 0xC0000000ULL, /* kernel base */
  51. 0xC0000000ULL, /* kernel text mask */
  52. 0x3FFFFFFFULL, /* user stack top */
  53. 4, /* quantization of pc */
  54. 4, /* szaddr */
  55. 4, /* szreg */
  56. 4, /* szfloat */
  57. 8, /* szdouble */
  58. };