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