1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef _PARISC_PDC_CHASSIS_H
15 #define _PARISC_PDC_CHASSIS_H
16
17
18
19
20
21
22
23 int pdc_chassis_send_status(int message);
24 void parisc_pdc_chassis_init(void);
25
26
27
28
29
30
31
32
33
34 #define PDC_CHASSIS_DIRECT_BSTART 0
35 #define PDC_CHASSIS_DIRECT_BCOMPLETE 1
36 #define PDC_CHASSIS_DIRECT_SHUTDOWN 2
37 #define PDC_CHASSIS_DIRECT_PANIC 3
38 #define PDC_CHASSIS_DIRECT_HPMC 4
39 #define PDC_CHASSIS_DIRECT_LPMC 5
40 #define PDC_CHASSIS_DIRECT_DUMP 6
41 #define PDC_CHASSIS_DIRECT_OOPS 7
42
43
44
45
46
47
48
49
50
51
52 #define PDC_CHASSIS_DISP_DATA(v) ((unsigned long)(v) << 17)
53
54
55
56
57
58 #define PDC_CHASSIS_LED_RUN_OFF (0ULL << 4)
59 #define PDC_CHASSIS_LED_RUN_FLASH (1ULL << 4)
60 #define PDC_CHASSIS_LED_RUN_ON (2ULL << 4)
61 #define PDC_CHASSIS_LED_RUN_NC (3ULL << 4)
62 #define PDC_CHASSIS_LED_ATTN_OFF (0ULL << 6)
63 #define PDC_CHASSIS_LED_ATTN_FLASH (1ULL << 6)
64 #define PDC_CHASSIS_LED_ATTN_NC (3ULL << 6)
65 #define PDC_CHASSIS_LED_FAULT_OFF (0ULL << 8)
66 #define PDC_CHASSIS_LED_FAULT_FLASH (1ULL << 8)
67 #define PDC_CHASSIS_LED_FAULT_ON (2ULL << 8)
68 #define PDC_CHASSIS_LED_FAULT_NC (3ULL << 8)
69 #define PDC_CHASSIS_LED_VALID (1ULL << 10)
70
71
72
73
74
75
76 #define PDC_CHASSIS_LSTATE_RUN_NORMAL (PDC_CHASSIS_LED_RUN_ON | \
77 PDC_CHASSIS_LED_ATTN_OFF | \
78 PDC_CHASSIS_LED_FAULT_OFF | \
79 PDC_CHASSIS_LED_VALID )
80
81 #define PDC_CHASSIS_LSTATE_RUN_CRASHREC (PDC_CHASSIS_LED_RUN_ON | \
82 PDC_CHASSIS_LED_ATTN_OFF | \
83 PDC_CHASSIS_LED_FAULT_FLASH | \
84 PDC_CHASSIS_LED_VALID )
85
86 #define PDC_CHASSIS_LSTATE_RUN_SYSINT (PDC_CHASSIS_LED_RUN_ON | \
87 PDC_CHASSIS_LED_ATTN_FLASH | \
88 PDC_CHASSIS_LED_FAULT_OFF | \
89 PDC_CHASSIS_LED_VALID )
90
91 #define PDC_CHASSIS_LSTATE_RUN_NCRIT (PDC_CHASSIS_LED_RUN_ON | \
92 PDC_CHASSIS_LED_ATTN_FLASH | \
93 PDC_CHASSIS_LED_FAULT_FLASH | \
94 PDC_CHASSIS_LED_VALID )
95
96 #define PDC_CHASSIS_LSTATE_NONOS (PDC_CHASSIS_LED_RUN_FLASH | \
97 PDC_CHASSIS_LED_ATTN_OFF | \
98 PDC_CHASSIS_LED_FAULT_OFF | \
99 PDC_CHASSIS_LED_VALID )
100
101 #define PDC_CHASSIS_LSTATE_NONOS_BFAIL (PDC_CHASSIS_LED_RUN_FLASH | \
102 PDC_CHASSIS_LED_ATTN_OFF | \
103 PDC_CHASSIS_LED_FAULT_ON | \
104 PDC_CHASSIS_LED_VALID )
105
106 #define PDC_CHASSIS_LSTATE_NONOS_UNEXP (PDC_CHASSIS_LED_RUN_FLASH | \
107 PDC_CHASSIS_LED_ATTN_OFF | \
108 PDC_CHASSIS_LED_FAULT_FLASH | \
109 PDC_CHASSIS_LED_VALID )
110
111 #define PDC_CHASSIS_LSTATE_NONOS_NCRIT (PDC_CHASSIS_LED_RUN_FLASH | \
112 PDC_CHASSIS_LED_ATTN_FLASH | \
113 PDC_CHASSIS_LED_FAULT_OFF | \
114 PDC_CHASSIS_LED_VALID )
115
116 #define PDC_CHASSIS_LSTATE_BFAIL_NCRIT (PDC_CHASSIS_LED_RUN_FLASH | \
117 PDC_CHASSIS_LED_ATTN_FLASH | \
118 PDC_CHASSIS_LED_FAULT_ON | \
119 PDC_CHASSIS_LED_VALID )
120
121 #define PDC_CHASSIS_LSTATE_UNEXP_NCRIT (PDC_CHASSIS_LED_RUN_FLASH | \
122 PDC_CHASSIS_LED_ATTN_FLASH | \
123 PDC_CHASSIS_LED_FAULT_FLASH | \
124 PDC_CHASSIS_LED_VALID )
125
126 #define PDC_CHASSIS_LSTATE_CANNOT_PDC (PDC_CHASSIS_LED_RUN_OFF | \
127 PDC_CHASSIS_LED_ATTN_OFF | \
128 PDC_CHASSIS_LED_FAULT_OFF | \
129 PDC_CHASSIS_LED_VALID )
130
131 #define PDC_CHASSIS_LSTATE_FATAL_BFAIL (PDC_CHASSIS_LED_RUN_OFF | \
132 PDC_CHASSIS_LED_ATTN_OFF | \
133 PDC_CHASSIS_LED_FAULT_ON | \
134 PDC_CHASSIS_LED_VALID )
135
136 #define PDC_CHASSIS_LSTATE_NOCODE_NCRIT (PDC_CHASSIS_LED_RUN_OFF | \
137 PDC_CHASSIS_LED_ATTN_FLASH | \
138 PDC_CHASSIS_LED_FAULT_OFF | \
139 PDC_CHASSIS_LED_VALID )
140
141 #define PDC_CHASSIS_LSTATE_FATAL_NCRIT (PDC_CHASSIS_LED_RUN_OFF | \
142 PDC_CHASSIS_LED_ATTN_FLASH | \
143 PDC_CHASSIS_LED_FAULT_ON | \
144 PDC_CHASSIS_LED_VALID )
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160 #define PDC_CHASSIS_ALERT_FORWARD (0ULL << 36)
161 #define PDC_CHASSIS_ALERT_SERPROC (1ULL << 36)
162 #define PDC_CHASSIS_ALERT_NURGENT (2ULL << 36)
163 #define PDC_CHASSIS_ALERT_BLOCKED (3ULL << 36)
164 #define PDC_CHASSIS_ALERT_CONF_CHG (4ULL << 36)
165 #define PDC_CHASSIS_ALERT_ENV_PB (5ULL << 36)
166 #define PDC_CHASSIS_ALERT_PENDING (6ULL << 36)
167 #define PDC_CHASSIS_ALERT_PERF_IMP (8ULL << 36)
168 #define PDC_CHASSIS_ALERT_FUNC_IMP (10ULL << 36)
169 #define PDC_CHASSIS_ALERT_SOFT_FAIL (12ULL << 36)
170 #define PDC_CHASSIS_ALERT_HANG (13ULL << 36)
171 #define PDC_CHASSIS_ALERT_ENV_FATAL (14ULL << 36)
172 #define PDC_CHASSIS_ALERT_HW_FATAL (15ULL << 36)
173
174
175 #define PDC_CHASSIS_SRC_NONE (0ULL << 28)
176 #define PDC_CHASSIS_SRC_PROC (1ULL << 28)
177
178 #define PDC_CHASSIS_SRC_PROC_CACHE (2ULL << 28)
179 #define PDC_CHASSIS_SRC_PDH (3ULL << 28)
180 #define PDC_CHASSIS_SRC_PWR (4ULL << 28)
181 #define PDC_CHASSIS_SRC_FAB (5ULL << 28)
182 #define PDC_CHASSIS_SRC_PLATi (6ULL << 28)
183 #define PDC_CHASSIS_SRC_MEM (7ULL << 28)
184 #define PDC_CHASSIS_SRC_IO (8ULL << 28)
185 #define PDC_CHASSIS_SRC_CELL (9ULL << 28)
186 #define PDC_CHASSIS_SRC_PD (10ULL << 28)
187
188
189 #define PDC_CHASSIS_SRC_D_PROC (1ULL << 24)
190
191
192 #define PDC_CHASSIS_SRC_ID_UNSPEC (0ULL << 16)
193
194
195 #define PDC_CHASSIS_PB_D_PROC_NONE (0ULL << 32)
196 #define PDC_CHASSIS_PB_D_PROC_TIMEOUT (4ULL << 32)
197
198
199 #define PDC_CHASSIS_CALL_ACT_HPUX_BL (7ULL << 12)
200 #define PDC_CHASSIS_CALL_ACT_HPUX_PD (8ULL << 12)
201 #define PDC_CHASSIS_CALL_ACT_HPUX_EVENT (9ULL << 12)
202 #define PDC_CHASSIS_CALL_ACT_HPUX_IO (10ULL << 12)
203 #define PDC_CHASSIS_CALL_ACT_HPUX_PANIC (11ULL << 12)
204 #define PDC_CHASSIS_CALL_ACT_HPUX_INIT (12ULL << 12)
205 #define PDC_CHASSIS_CALL_ACT_HPUX_SHUT (13ULL << 12)
206 #define PDC_CHASSIS_CALL_ACT_HPUX_WARN (14ULL << 12)
207 #define PDC_CHASSIS_CALL_ACT_HPUX_DU (15ULL << 12)
208
209
210 #define PDC_CHASSIS_ACT_STATUS_UNSPEC (0ULL << 0)
211
212
213
214 #define PDC_CHASSIS_CALL_SACT_UNSPEC (0ULL << 4)
215
216
217 #define PDC_CHASSIS_RET_GENERICOS (12ULL << 52)
218 #define PDC_CHASSIS_RET_IA64_NT (13ULL << 52)
219 #define PDC_CHASSIS_RET_HPUX (14ULL << 52)
220 #define PDC_CHASSIS_RET_DIAG (15ULL << 52)
221
222
223 #define PDC_CHASSIS_REID_UNSPEC (0ULL << 44)
224
225
226 #define PDC_CHASSIS_DT_NONE (0ULL << 59)
227
228 #define PDC_CHASSIS_DT_PHYS_ADDR (1ULL << 59)
229 #define PDC_CHASSIS_DT_DATA_EXPECT (2ULL << 59)
230 #define PDC_CHASSIS_DT_ACTUAL (3ULL << 59)
231 #define PDC_CHASSIS_DT_PHYS_LOC (4ULL << 59)
232 #define PDC_CHASSIS_DT_PHYS_LOC_EXT (5ULL << 59)
233 #define PDC_CHASSIS_DT_TAG (6ULL << 59)
234 #define PDC_CHASSIS_DT_SYNDROME (7ULL << 59)
235 #define PDC_CHASSIS_DT_CODE_ADDR (8ULL << 59)
236 #define PDC_CHASSIS_DT_ASCII_MSG (9ULL << 59)
237 #define PDC_CHASSIS_DT_POST (10ULL << 59)
238 #define PDC_CHASSIS_DT_TIMESTAMP (11ULL << 59)
239 #define PDC_CHASSIS_DT_DEV_STAT (12ULL << 59)
240 #define PDC_CHASSIS_DT_DEV_TYPE (13ULL << 59)
241 #define PDC_CHASSIS_DT_PB_DET (14ULL << 59)
242 #define PDC_CHASSIS_DT_ACT_LEV (15ULL << 59)
243 #define PDC_CHASSIS_DT_SER_NUM (16ULL << 59)
244 #define PDC_CHASSIS_DT_REV_NUM (17ULL << 59)
245 #define PDC_CHASSIS_DT_INTERRUPT (18ULL << 59)
246 #define PDC_CHASSIS_DT_TEST_NUM (19ULL << 59)
247 #define PDC_CHASSIS_DT_STATE_CHG (20ULL << 59)
248 #define PDC_CHASSIS_DT_PROC_DEALLOC (21ULL << 59)
249 #define PDC_CHASSIS_DT_RESET (30ULL << 59)
250 #define PDC_CHASSIS_DT_PA_LEGACY (31ULL << 59)
251
252
253 #define PDC_CHASSIS_SYSTATE_BSTART (0ULL << 0)
254 #define PDC_CHASSIS_SYSTATE_BCOMP (1ULL << 0)
255 #define PDC_CHASSIS_SYSTATE_CHANGE (2ULL << 0)
256 #define PDC_CHASSIS_SYSTATE_LED (3ULL << 0)
257 #define PDC_CHASSIS_SYSTATE_PANIC (9ULL << 0)
258 #define PDC_CHASSIS_SYSTATE_DUMP (10ULL << 0)
259 #define PDC_CHASSIS_SYSTATE_HPMC (11ULL << 0)
260 #define PDC_CHASSIS_SYSTATE_HALT (15ULL << 0)
261
262
263 #define PDC_CHASSIS_MSG_ID (0ULL << 40)
264
265
266 #define PDC_CHASSIS_EOM_CLEAR (0ULL << 43)
267 #define PDC_CHASSIS_EOM_SET (1ULL << 43)
268
269
270
271
272
273
274 #define PDC_CHASSIS_PMSG_BSTART (PDC_CHASSIS_ALERT_SERPROC | \
275 PDC_CHASSIS_SRC_PROC | \
276 PDC_CHASSIS_SRC_D_PROC | \
277 PDC_CHASSIS_SRC_ID_UNSPEC | \
278 PDC_CHASSIS_PB_D_PROC_NONE | \
279 PDC_CHASSIS_CALL_ACT_HPUX_INIT | \
280 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
281 PDC_CHASSIS_CALL_SACT_UNSPEC | \
282 PDC_CHASSIS_RET_HPUX | \
283 PDC_CHASSIS_REID_UNSPEC | \
284 PDC_CHASSIS_DT_STATE_CHG | \
285 PDC_CHASSIS_SYSTATE_BSTART | \
286 PDC_CHASSIS_MSG_ID | \
287 PDC_CHASSIS_EOM_SET )
288
289
290 #define PDC_CHASSIS_PMSG_BCOMPLETE (PDC_CHASSIS_ALERT_SERPROC | \
291 PDC_CHASSIS_SRC_PROC | \
292 PDC_CHASSIS_SRC_D_PROC | \
293 PDC_CHASSIS_SRC_ID_UNSPEC | \
294 PDC_CHASSIS_PB_D_PROC_NONE | \
295 PDC_CHASSIS_CALL_ACT_HPUX_INIT | \
296 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
297 PDC_CHASSIS_CALL_SACT_UNSPEC | \
298 PDC_CHASSIS_RET_HPUX | \
299 PDC_CHASSIS_REID_UNSPEC | \
300 PDC_CHASSIS_DT_STATE_CHG | \
301 PDC_CHASSIS_SYSTATE_BCOMP | \
302 PDC_CHASSIS_MSG_ID | \
303 PDC_CHASSIS_EOM_SET )
304
305
306 #define PDC_CHASSIS_PMSG_SHUTDOWN (PDC_CHASSIS_ALERT_SERPROC | \
307 PDC_CHASSIS_SRC_PROC | \
308 PDC_CHASSIS_SRC_D_PROC | \
309 PDC_CHASSIS_SRC_ID_UNSPEC | \
310 PDC_CHASSIS_PB_D_PROC_NONE | \
311 PDC_CHASSIS_CALL_ACT_HPUX_SHUT | \
312 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
313 PDC_CHASSIS_CALL_SACT_UNSPEC | \
314 PDC_CHASSIS_RET_HPUX | \
315 PDC_CHASSIS_REID_UNSPEC | \
316 PDC_CHASSIS_DT_STATE_CHG | \
317 PDC_CHASSIS_SYSTATE_HALT | \
318 PDC_CHASSIS_MSG_ID | \
319 PDC_CHASSIS_EOM_SET )
320
321
322 #define PDC_CHASSIS_PMSG_PANIC (PDC_CHASSIS_ALERT_SOFT_FAIL | \
323 PDC_CHASSIS_SRC_PROC | \
324 PDC_CHASSIS_SRC_D_PROC | \
325 PDC_CHASSIS_SRC_ID_UNSPEC | \
326 PDC_CHASSIS_PB_D_PROC_NONE | \
327 PDC_CHASSIS_CALL_ACT_HPUX_PANIC| \
328 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
329 PDC_CHASSIS_CALL_SACT_UNSPEC | \
330 PDC_CHASSIS_RET_HPUX | \
331 PDC_CHASSIS_REID_UNSPEC | \
332 PDC_CHASSIS_DT_STATE_CHG | \
333 PDC_CHASSIS_SYSTATE_PANIC | \
334 PDC_CHASSIS_MSG_ID | \
335 PDC_CHASSIS_EOM_SET )
336
337
338
339 #define PDC_CHASSIS_PMSG_HPMC (PDC_CHASSIS_ALERT_CONF_CHG | \
340 PDC_CHASSIS_SRC_PROC | \
341 PDC_CHASSIS_SRC_D_PROC | \
342 PDC_CHASSIS_SRC_ID_UNSPEC | \
343 PDC_CHASSIS_PB_D_PROC_NONE | \
344 PDC_CHASSIS_CALL_ACT_HPUX_WARN | \
345 PDC_CHASSIS_RET_HPUX | \
346 PDC_CHASSIS_DT_STATE_CHG | \
347 PDC_CHASSIS_SYSTATE_HPMC | \
348 PDC_CHASSIS_MSG_ID | \
349 PDC_CHASSIS_EOM_SET )
350
351
352 #define PDC_CHASSIS_PMSG_LPMC (PDC_CHASSIS_ALERT_BLOCKED | \
353 PDC_CHASSIS_SRC_PROC | \
354 PDC_CHASSIS_SRC_D_PROC | \
355 PDC_CHASSIS_SRC_ID_UNSPEC | \
356 PDC_CHASSIS_PB_D_PROC_NONE | \
357 PDC_CHASSIS_CALL_ACT_HPUX_WARN | \
358 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
359 PDC_CHASSIS_CALL_SACT_UNSPEC | \
360 PDC_CHASSIS_RET_HPUX | \
361 PDC_CHASSIS_REID_UNSPEC | \
362 PDC_CHASSIS_DT_STATE_CHG | \
363 PDC_CHASSIS_SYSTATE_CHANGE | \
364 PDC_CHASSIS_MSG_ID | \
365 PDC_CHASSIS_EOM_SET )
366
367 #endif
368