err_ev7.h 4.4 KB

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