5.c 1.5 KB

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