hwrpb.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. #ifndef __ALPHA_HWRPB_H
  2. #define __ALPHA_HWRPB_H
  3. #define INIT_HWRPB ((struct hwrpb_struct *) 0x10000000)
  4. /*
  5. * DEC processor types for Alpha systems. Found in HWRPB.
  6. * These values are architected.
  7. */
  8. #define EV3_CPU 1 /* EV3 */
  9. #define EV4_CPU 2 /* EV4 (21064) */
  10. #define LCA4_CPU 4 /* LCA4 (21066/21068) */
  11. #define EV5_CPU 5 /* EV5 (21164) */
  12. #define EV45_CPU 6 /* EV4.5 (21064/xxx) */
  13. #define EV56_CPU 7 /* EV5.6 (21164) */
  14. #define EV6_CPU 8 /* EV6 (21264) */
  15. #define PCA56_CPU 9 /* PCA56 (21164PC) */
  16. #define PCA57_CPU 10 /* PCA57 (notyet) */
  17. #define EV67_CPU 11 /* EV67 (21264A) */
  18. #define EV68CB_CPU 12 /* EV68CB (21264C) */
  19. #define EV68AL_CPU 13 /* EV68AL (21264B) */
  20. #define EV68CX_CPU 14 /* EV68CX (21264D) */
  21. #define EV7_CPU 15 /* EV7 (21364) */
  22. #define EV79_CPU 16 /* EV79 (21364??) */
  23. #define EV69_CPU 17 /* EV69 (21264/EV69A) */
  24. /*
  25. * DEC system types for Alpha systems. Found in HWRPB.
  26. * These values are architected.
  27. */
  28. #define ST_ADU 1 /* Alpha ADU systype */
  29. #define ST_DEC_4000 2 /* Cobra systype */
  30. #define ST_DEC_7000 3 /* Ruby systype */
  31. #define ST_DEC_3000_500 4 /* Flamingo systype */
  32. #define ST_DEC_2000_300 6 /* Jensen systype */
  33. #define ST_DEC_3000_300 7 /* Pelican systype */
  34. #define ST_DEC_2100_A500 9 /* Sable systype */
  35. #define ST_DEC_AXPVME_64 10 /* AXPvme system type */
  36. #define ST_DEC_AXPPCI_33 11 /* NoName system type */
  37. #define ST_DEC_TLASER 12 /* Turbolaser systype */
  38. #define ST_DEC_2100_A50 13 /* Avanti systype */
  39. #define ST_DEC_MUSTANG 14 /* Mustang systype */
  40. #define ST_DEC_ALCOR 15 /* Alcor (EV5) systype */
  41. #define ST_DEC_1000 17 /* Mikasa systype */
  42. #define ST_DEC_EB64 18 /* EB64 systype */
  43. #define ST_DEC_EB66 19 /* EB66 systype */
  44. #define ST_DEC_EB64P 20 /* EB64+ systype */
  45. #define ST_DEC_BURNS 21 /* laptop systype */
  46. #define ST_DEC_RAWHIDE 22 /* Rawhide systype */
  47. #define ST_DEC_K2 23 /* K2 systype */
  48. #define ST_DEC_LYNX 24 /* Lynx systype */
  49. #define ST_DEC_XL 25 /* Alpha XL systype */
  50. #define ST_DEC_EB164 26 /* EB164 systype */
  51. #define ST_DEC_NORITAKE 27 /* Noritake systype */
  52. #define ST_DEC_CORTEX 28 /* Cortex systype */
  53. #define ST_DEC_MIATA 30 /* Miata systype */
  54. #define ST_DEC_XXM 31 /* XXM systype */
  55. #define ST_DEC_TAKARA 32 /* Takara systype */
  56. #define ST_DEC_YUKON 33 /* Yukon systype */
  57. #define ST_DEC_TSUNAMI 34 /* Tsunami systype */
  58. #define ST_DEC_WILDFIRE 35 /* Wildfire systype */
  59. #define ST_DEC_CUSCO 36 /* CUSCO systype */
  60. #define ST_DEC_EIGER 37 /* Eiger systype */
  61. #define ST_DEC_TITAN 38 /* Titan systype */
  62. #define ST_DEC_MARVEL 39 /* Marvel systype */
  63. /* UNOFFICIAL!!! */
  64. #define ST_UNOFFICIAL_BIAS 100
  65. #define ST_DTI_RUFFIAN 101 /* RUFFIAN systype */
  66. /* Alpha Processor, Inc. systems */
  67. #define ST_API_BIAS 200
  68. #define ST_API_NAUTILUS 201 /* UP1000 systype */
  69. struct pcb_struct {
  70. unsigned long ksp;
  71. unsigned long usp;
  72. unsigned long ptbr;
  73. unsigned int pcc;
  74. unsigned int asn;
  75. unsigned long unique;
  76. unsigned long flags;
  77. unsigned long res1, res2;
  78. };
  79. struct percpu_struct {
  80. unsigned long hwpcb[16];
  81. unsigned long flags;
  82. unsigned long pal_mem_size;
  83. unsigned long pal_scratch_size;
  84. unsigned long pal_mem_pa;
  85. unsigned long pal_scratch_pa;
  86. unsigned long pal_revision;
  87. unsigned long type;
  88. unsigned long variation;
  89. unsigned long revision;
  90. unsigned long serial_no[2];
  91. unsigned long logout_area_pa;
  92. unsigned long logout_area_len;
  93. unsigned long halt_PCBB;
  94. unsigned long halt_PC;
  95. unsigned long halt_PS;
  96. unsigned long halt_arg;
  97. unsigned long halt_ra;
  98. unsigned long halt_pv;
  99. unsigned long halt_reason;
  100. unsigned long res;
  101. unsigned long ipc_buffer[21];
  102. unsigned long palcode_avail[16];
  103. unsigned long compatibility;
  104. unsigned long console_data_log_pa;
  105. unsigned long console_data_log_length;
  106. unsigned long bcache_info;
  107. };
  108. struct procdesc_struct {
  109. unsigned long weird_vms_stuff;
  110. unsigned long address;
  111. };
  112. struct vf_map_struct {
  113. unsigned long va;
  114. unsigned long pa;
  115. unsigned long count;
  116. };
  117. struct crb_struct {
  118. struct procdesc_struct * dispatch_va;
  119. struct procdesc_struct * dispatch_pa;
  120. struct procdesc_struct * fixup_va;
  121. struct procdesc_struct * fixup_pa;
  122. /* virtual->physical map */
  123. unsigned long map_entries;
  124. unsigned long map_pages;
  125. struct vf_map_struct map[1];
  126. };
  127. struct memclust_struct {
  128. unsigned long start_pfn;
  129. unsigned long numpages;
  130. unsigned long numtested;
  131. unsigned long bitmap_va;
  132. unsigned long bitmap_pa;
  133. unsigned long bitmap_chksum;
  134. unsigned long usage;
  135. };
  136. struct memdesc_struct {
  137. unsigned long chksum;
  138. unsigned long optional_pa;
  139. unsigned long numclusters;
  140. struct memclust_struct cluster[0];
  141. };
  142. struct dsr_struct {
  143. long smm; /* SMM nubber used by LMF */
  144. unsigned long lurt_off; /* offset to LURT table */
  145. unsigned long sysname_off; /* offset to sysname char count */
  146. };
  147. struct hwrpb_struct {
  148. unsigned long phys_addr; /* check: physical address of the hwrpb */
  149. unsigned long id; /* check: "HWRPB\0\0\0" */
  150. unsigned long revision;
  151. unsigned long size; /* size of hwrpb */
  152. unsigned long cpuid;
  153. unsigned long pagesize; /* 8192, I hope */
  154. unsigned long pa_bits; /* number of physical address bits */
  155. unsigned long max_asn;
  156. unsigned char ssn[16]; /* system serial number: big bother is watching */
  157. unsigned long sys_type;
  158. unsigned long sys_variation;
  159. unsigned long sys_revision;
  160. unsigned long intr_freq; /* interval clock frequency * 4096 */
  161. unsigned long cycle_freq; /* cycle counter frequency */
  162. unsigned long vptb; /* Virtual Page Table Base address */
  163. unsigned long res1;
  164. unsigned long tbhb_offset; /* Translation Buffer Hint Block */
  165. unsigned long nr_processors;
  166. unsigned long processor_size;
  167. unsigned long processor_offset;
  168. unsigned long ctb_nr;
  169. unsigned long ctb_size; /* console terminal block size */
  170. unsigned long ctbt_offset; /* console terminal block table offset */
  171. unsigned long crb_offset; /* console callback routine block */
  172. unsigned long mddt_offset; /* memory data descriptor table */
  173. unsigned long cdb_offset; /* configuration data block (or NULL) */
  174. unsigned long frut_offset; /* FRU table (or NULL) */
  175. void (*save_terminal)(unsigned long);
  176. unsigned long save_terminal_data;
  177. void (*restore_terminal)(unsigned long);
  178. unsigned long restore_terminal_data;
  179. void (*CPU_restart)(unsigned long);
  180. unsigned long CPU_restart_data;
  181. unsigned long res2;
  182. unsigned long res3;
  183. unsigned long chksum;
  184. unsigned long rxrdy;
  185. unsigned long txrdy;
  186. unsigned long dsr_offset; /* "Dynamic System Recognition Data Block Table" */
  187. };
  188. #ifdef __KERNEL__
  189. extern struct hwrpb_struct *hwrpb;
  190. static inline void
  191. hwrpb_update_checksum(struct hwrpb_struct *h)
  192. {
  193. unsigned long sum = 0, *l;
  194. for (l = (unsigned long *) h; l < (unsigned long *) &h->chksum; ++l)
  195. sum += *l;
  196. h->chksum = sum;
  197. }
  198. #endif /* __KERNEL__ */
  199. #endif /* __ALPHA_HWRPB_H */