5.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #ifdef HARVEYARM
  10. /*
  11. * arm definition
  12. */
  13. #include <u.h>
  14. #include <libc.h>
  15. #include <bio.h>
  16. #include "/arm/include/ureg.h"
  17. #include <mach.h>
  18. #define REGOFF(x) (ulong) (&((struct Ureg *) 0)->x)
  19. #define SP REGOFF(r13)
  20. #define PC REGOFF(pc)
  21. #define REGSIZE sizeof(struct Ureg)
  22. Reglist armreglist[] =
  23. {
  24. {"TYPE", REGOFF(type), RINT|RRDONLY, 'X'},
  25. {"PSR", REGOFF(psr), RINT|RRDONLY, 'X'},
  26. {"PC", PC, RINT, 'X'},
  27. {"SP", SP, RINT, 'X'},
  28. {"R15", PC, RINT, 'X'},
  29. {"R14", REGOFF(r14), RINT, 'X'},
  30. {"R13", REGOFF(r13), RINT, 'X'},
  31. {"R12", REGOFF(r12), RINT, 'X'},
  32. {"R11", REGOFF(r11), RINT, 'X'},
  33. {"R10", REGOFF(r10), RINT, 'X'},
  34. {"R9", REGOFF(r9), RINT, 'X'},
  35. {"R8", REGOFF(r8), RINT, 'X'},
  36. {"R7", REGOFF(r7), RINT, 'X'},
  37. {"R6", REGOFF(r6), RINT, 'X'},
  38. {"R5", REGOFF(r5), RINT, 'X'},
  39. {"R4", REGOFF(r4), RINT, 'X'},
  40. {"R3", REGOFF(r3), RINT, 'X'},
  41. {"R2", REGOFF(r2), RINT, 'X'},
  42. {"R1", REGOFF(r1), RINT, 'X'},
  43. {"R0", REGOFF(r0), RINT, 'X'},
  44. { 0 }
  45. };
  46. /* the machine description */
  47. Mach marm =
  48. {
  49. "arm",
  50. MARM, /* machine type */
  51. armreglist, /* register set */
  52. REGSIZE, /* register set size */
  53. 0, /* fp register set size */
  54. "PC", /* name of PC */
  55. "SP", /* name of SP */
  56. "R14", /* name of link register */
  57. "setR12", /* static base register name */
  58. 0, /* static base register value */
  59. 0x1000, /* page size */
  60. 0xC0000000ULL, /* kernel base */
  61. 0xC0000000ULL, /* kernel text mask */
  62. 0x3FFFFFFFULL, /* user stack top */
  63. 4, /* quantization of pc */
  64. 4, /* szaddr */
  65. 4, /* szreg */
  66. 4, /* szfloat */
  67. 8, /* szdouble */
  68. };
  69. #endif