aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/include/asm/err_ev7.h
blob: 87f99777c2e4bccc216fea1ef49ccb4fb34500b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#ifndef __ALPHA_ERR_EV7_H
#define __ALPHA_ERR_EV7_H 1

/*
 * Data for el packet class PAL (14), type LOGOUT_FRAME (1)
 */
struct ev7_pal_logout_subpacket {
	u32 mchk_code;
	u32 subpacket_count;
	u64 whami;
	u64 rbox_whami;
	u64 rbox_int;
	u64 exc_addr;
	union el_timestamp timestamp;
	u64 halt_code;
	u64 reserved;
};

/*
 * Data for el packet class PAL (14), type EV7_PROCESSOR (4)
 */
struct ev7_pal_processor_subpacket {
	u64 i_stat;
	u64 dc_stat;
	u64 c_addr;
	u64 c_syndrome_1;
	u64 c_syndrome_0;
	u64 c_stat;
	u64 c_sts;
	u64 mm_stat;
	u64 exc_addr;
	u64 ier_cm;
	u64 isum;
	u64 pal_base;
	u64 i_ctl;
	u64 process_context;
	u64 cbox_ctl;
	u64 cbox_stp_ctl;
	u64 cbox_acc_ctl;
	u64 cbox_lcl_set;
	u64 cbox_gbl_set;
	u64 bbox_ctl;
	u64 bbox_err_sts;
	u64 bbox_err_idx;
	u64 cbox_ddp_err_sts;
	u64 bbox_dat_rmp;
	u64 reserved[2];
};

/*
 * Data for el packet class PAL (14), type EV7_ZBOX (5)
 */
struct ev7_pal_zbox_subpacket {
	u32 zbox0_dram_err_status_1;
	u32 zbox0_dram_err_status_2;
	u32 zbox0_dram_err_status_3;
	u32 zbox0_dram_err_ctl;
	u32 zbox0_dram_err_adr;
	u32 zbox0_dift_timeout;
	u32 zbox0_dram_mapper_ctl;
	u32 zbox0_frc_err_adr;
	u32 zbox0_dift_err_status;
	u32 reserved1;
	u32 zbox1_dram_err_status_1;
	u32 zbox1_dram_err_status_2;
	u32 zbox1_dram_err_status_3;
	u32 zbox1_dram_err_ctl;
	u32 zbox1_dram_err_adr;
	u32 zbox1_dift_timeout;
	u32 zbox1_dram_mapper_ctl;
	u32 zbox1_frc_err_adr;
	u32 zbox1_dift_err_status;
	u32 reserved2;
	u64 cbox_ctl;
	u64 cbox_stp_ctl;
	u64 zbox0_error_pa;
	u64 zbox1_error_pa;
	u64 zbox0_ored_syndrome;
	u64 zbox1_ored_syndrome;
	u64 reserved3[2];
};

/*
 * Data for el packet class PAL (14), type EV7_RBOX (6)
 */
struct ev7_pal_rbox_subpacket {
	u64 rbox_cfg;
	u64 rbox_n_cfg;
	u64 rbox_s_cfg;
	u64 rbox_e_cfg;
	u64 rbox_w_cfg;
	u64 rbox_n_err;
	u64 rbox_s_err;
	u64 rbox_e_err;
	u64 rbox_w_err;
	u64 rbox_io_cfg;
	u64 rbox_io_err;
	u64 rbox_l_err;
	u64 rbox_whoami;
	u64 rbox_imask;
	u64 rbox_intq;
	u64 rbox_int;
	u64 reserved[2];
};

/*
 * Data for el packet class PAL (14), type EV7_IO (7)
 */
struct ev7_pal_io_one_port {
	u64 pox_err_sum;
	u64 pox_tlb_err;
	u64 pox_spl_cmplt;
	u64 pox_trans_sum;
	u64 pox_first_err;
	u64 pox_mult_err;
	u64 pox_dm_source;
	u64 pox_dm_dest;
	u64 pox_dm_size;
	u64 pox_dm_ctrl;
	u64 reserved;
};

struct ev7_pal_io_subpacket {
	u64 io_asic_rev;
	u64 io_sys_rev;
	u64 io7_uph;
	u64 hpi_ctl;
	u64 crd_ctl;
	u64 hei_ctl;
	u64 po7_error_sum;
	u64 po7_uncrr_sym;
	u64 po7_crrct_sym;
	u64 po7_ugbge_sym;
	u64 po7_err_pkt0;
	u64 po7_err_pkt1;
	u64 reserved[2];
	struct ev7_pal_io_one_port ports[4];
};

/*
 * Environmental subpacket. Data used for el packets:
 * 	   class PAL (14), type AMBIENT_TEMPERATURE (10)
 * 	   class PAL (14), type AIRMOVER_FAN (11)
 * 	   class PAL (14), type VOLTAGE (12)
 * 	   class PAL (14), type INTRUSION (13)
 *	   class PAL (14), type POWER_SUPPLY (14)
 *	   class PAL (14), type LAN (15)
 *	   class PAL (14), type HOT_PLUG (16)
 */
struct ev7_pal_environmental_subpacket {
	u16 cabinet;
	u16 drawer;
	u16 reserved1[2];
	u8 module_type;
	u8 unit_id;		/* unit reporting condition */
	u8 reserved2;
	u8 condition;		/* condition reported       */
};

/*
 * Convert environmental type to index
 */
static inline int ev7_lf_env_index(int type)
{
	BUG_ON((type < EL_TYPE__PAL__ENV__AMBIENT_TEMPERATURE) 
	       || (type > EL_TYPE__PAL__ENV__HOT_PLUG));

	return type - EL_TYPE__PAL__ENV__AMBIENT_TEMPERATURE;
}

/*
 * Data for generic el packet class PAL.
 */
struct ev7_pal_subpacket {
	union {
		struct ev7_pal_logout_subpacket logout;	     /* Type     1 */
		struct ev7_pal_processor_subpacket ev7;	     /* Type     4 */
		struct ev7_pal_zbox_subpacket zbox;	     /* Type     5 */
		struct ev7_pal_rbox_subpacket rbox;	     /* Type     6 */
		struct ev7_pal_io_subpacket io;		     /* Type     7 */
		struct ev7_pal_environmental_subpacket env;  /* Type 10-16 */
		u64 as_quad[1];				     /* Raw u64    */
	} by_type;
};

/*
 * Struct to contain collected logout from subpackets.
 */
struct ev7_lf_subpackets {
	struct ev7_pal_logout_subpacket *logout;		/* Type  1 */
	struct ev7_pal_processor_subpacket *ev7;		/* Type  4 */
	struct ev7_pal_zbox_subpacket *zbox;			/* Type  5 */
	struct ev7_pal_rbox_subpacket *rbox;			/* Type  6 */
	struct ev7_pal_io_subpacket *io;			/* Type  7 */
	struct ev7_pal_environmental_subpacket *env[7];	     /* Type 10-16 */

	unsigned int io_pid;
};

#endif /* __ALPHA_ERR_EV7_H */