err_ev7.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. #ifndef __ALPHA_ERR_EV7_H
  2. #define __ALPHA_ERR_EV7_H 1
  3. /*
  4. * Data for el packet class PAL (14), type LOGOUT_FRAME (1)
  5. */
  6. struct ev7_pal_logout_subpacket {
  7. u32 mchk_code;
  8. u32 subpacket_count;
  9. u64 whami;
  10. u64 rbox_whami;
  11. u64 rbox_int;
  12. u64 exc_addr;
  13. union el_timestamp timestamp;
  14. u64 halt_code;
  15. u64 reserved;
  16. };
  17. /*
  18. * Data for el packet class PAL (14), type EV7_PROCESSOR (4)
  19. */
  20. struct ev7_pal_processor_subpacket {
  21. u64 i_stat;
  22. u64 dc_stat;
  23. u64 c_addr;
  24. u64 c_syndrome_1;
  25. u64 c_syndrome_0;
  26. u64 c_stat;
  27. u64 c_sts;
  28. u64 mm_stat;
  29. u64 exc_addr;
  30. u64 ier_cm;
  31. u64 isum;
  32. u64 pal_base;
  33. u64 i_ctl;
  34. u64 process_context;
  35. u64 cbox_ctl;
  36. u64 cbox_stp_ctl;
  37. u64 cbox_acc_ctl;
  38. u64 cbox_lcl_set;
  39. u64 cbox_gbl_set;
  40. u64 bbox_ctl;
  41. u64 bbox_err_sts;
  42. u64 bbox_err_idx;
  43. u64 cbox_ddp_err_sts;
  44. u64 bbox_dat_rmp;
  45. u64 reserved[2];
  46. };
  47. /*
  48. * Data for el packet class PAL (14), type EV7_ZBOX (5)
  49. */
  50. struct ev7_pal_zbox_subpacket {
  51. u32 zbox0_dram_err_status_1;
  52. u32 zbox0_dram_err_status_2;
  53. u32 zbox0_dram_err_status_3;
  54. u32 zbox0_dram_err_ctl;
  55. u32 zbox0_dram_err_adr;
  56. u32 zbox0_dift_timeout;
  57. u32 zbox0_dram_mapper_ctl;
  58. u32 zbox0_frc_err_adr;
  59. u32 zbox0_dift_err_status;
  60. u32 reserved1;
  61. u32 zbox1_dram_err_status_1;
  62. u32 zbox1_dram_err_status_2;
  63. u32 zbox1_dram_err_status_3;
  64. u32 zbox1_dram_err_ctl;
  65. u32 zbox1_dram_err_adr;
  66. u32 zbox1_dift_timeout;
  67. u32 zbox1_dram_mapper_ctl;
  68. u32 zbox1_frc_err_adr;
  69. u32 zbox1_dift_err_status;
  70. u32 reserved2;
  71. u64 cbox_ctl;
  72. u64 cbox_stp_ctl;
  73. u64 zbox0_error_pa;
  74. u64 zbox1_error_pa;
  75. u64 zbox0_ored_syndrome;
  76. u64 zbox1_ored_syndrome;
  77. u64 reserved3[2];
  78. };
  79. /*
  80. * Data for el packet class PAL (14), type EV7_RBOX (6)
  81. */
  82. struct ev7_pal_rbox_subpacket {
  83. u64 rbox_cfg;
  84. u64 rbox_n_cfg;
  85. u64 rbox_s_cfg;
  86. u64 rbox_e_cfg;
  87. u64 rbox_w_cfg;
  88. u64 rbox_n_err;
  89. u64 rbox_s_err;
  90. u64 rbox_e_err;
  91. u64 rbox_w_err;
  92. u64 rbox_io_cfg;
  93. u64 rbox_io_err;
  94. u64 rbox_l_err;
  95. u64 rbox_whoami;
  96. u64 rbox_imask;
  97. u64 rbox_intq;
  98. u64 rbox_int;
  99. u64 reserved[2];
  100. };
  101. /*
  102. * Data for el packet class PAL (14), type EV7_IO (7)
  103. */
  104. struct ev7_pal_io_one_port {
  105. u64 pox_err_sum;
  106. u64 pox_tlb_err;
  107. u64 pox_spl_cmplt;
  108. u64 pox_trans_sum;
  109. u64 pox_first_err;
  110. u64 pox_mult_err;
  111. u64 pox_dm_source;
  112. u64 pox_dm_dest;
  113. u64 pox_dm_size;
  114. u64 pox_dm_ctrl;
  115. u64 reserved;
  116. };
  117. struct ev7_pal_io_subpacket {
  118. u64 io_asic_rev;
  119. u64 io_sys_rev;
  120. u64 io7_uph;
  121. u64 hpi_ctl;
  122. u64 crd_ctl;
  123. u64 hei_ctl;
  124. u64 po7_error_sum;
  125. u64 po7_uncrr_sym;
  126. u64 po7_crrct_sym;
  127. u64 po7_ugbge_sym;
  128. u64 po7_err_pkt0;
  129. u64 po7_err_pkt1;
  130. u64 reserved[2];
  131. struct ev7_pal_io_one_port ports[4];
  132. };
  133. /*
  134. * Environmental subpacket. Data used for el packets:
  135. * class PAL (14), type AMBIENT_TEMPERATURE (10)
  136. * class PAL (14), type AIRMOVER_FAN (11)
  137. * class PAL (14), type VOLTAGE (12)
  138. * class PAL (14), type INTRUSION (13)
  139. * class PAL (14), type POWER_SUPPLY (14)
  140. * class PAL (14), type LAN (15)
  141. * class PAL (14), type HOT_PLUG (16)
  142. */
  143. struct ev7_pal_environmental_subpacket {
  144. u16 cabinet;
  145. u16 drawer;
  146. u16 reserved1[2];
  147. u8 module_type;
  148. u8 unit_id; /* unit reporting condition */
  149. u8 reserved2;
  150. u8 condition; /* condition reported */
  151. };
  152. /*
  153. * Convert environmental type to index
  154. */
  155. static inline int ev7_lf_env_index(int type)
  156. {
  157. BUG_ON((type < EL_TYPE__PAL__ENV__AMBIENT_TEMPERATURE)
  158. || (type > EL_TYPE__PAL__ENV__HOT_PLUG));
  159. return type - EL_TYPE__PAL__ENV__AMBIENT_TEMPERATURE;
  160. }
  161. /*
  162. * Data for generic el packet class PAL.
  163. */
  164. struct ev7_pal_subpacket {
  165. union {
  166. struct ev7_pal_logout_subpacket logout; /* Type 1 */
  167. struct ev7_pal_processor_subpacket ev7; /* Type 4 */
  168. struct ev7_pal_zbox_subpacket zbox; /* Type 5 */
  169. struct ev7_pal_rbox_subpacket rbox; /* Type 6 */
  170. struct ev7_pal_io_subpacket io; /* Type 7 */
  171. struct ev7_pal_environmental_subpacket env; /* Type 10-16 */
  172. u64 as_quad[1]; /* Raw u64 */
  173. } by_type;
  174. };
  175. /*
  176. * Struct to contain collected logout from subpackets.
  177. */
  178. struct ev7_lf_subpackets {
  179. struct ev7_pal_logout_subpacket *logout; /* Type 1 */
  180. struct ev7_pal_processor_subpacket *ev7; /* Type 4 */
  181. struct ev7_pal_zbox_subpacket *zbox; /* Type 5 */
  182. struct ev7_pal_rbox_subpacket *rbox; /* Type 6 */
  183. struct ev7_pal_io_subpacket *io; /* Type 7 */
  184. struct ev7_pal_environmental_subpacket *env[7]; /* Type 10-16 */
  185. unsigned int io_pid;
  186. };
  187. #endif /* __ALPHA_ERR_EV7_H */