10 #include <linux/sched.h>
26 #ifdef CONFIG_VERBOSE_MCHECK
28 struct {
int type;
char *
name; } ev_packets[] = {
30 "Ambient Temperature" },
47 for (i = 0; ev_packets[
i].type != 0; i++) {
48 env = lf_subpackets->
env[ev7_lf_env_index(ev_packets[i].
type)];
52 printk(
"%s**%s event (cabinet %d, drawer %d)\n",
57 printk(
"%s Module Type: 0x%x - Unit ID 0x%x - "
76 if (lf_subpackets->
env[i])
81 marvel_print_680_frame(lf_subpackets);
86 #ifdef CONFIG_VERBOSE_MCHECK
89 marvel_print_err_cyc(
u64 err_cyc)
91 static char *packet_desc[] = {
94 "1 cycle (1 or 2 flit packet)",
95 "2 cycles (3 flit packet)",
96 "9 cycles (18 flit packet)",
97 "10 cycles (19 flit packet)",
103 #define IO7__ERR_CYC__ODD_FLT (1UL << 0)
104 #define IO7__ERR_CYC__EVN_FLT (1UL << 1)
105 #define IO7__ERR_CYC__PACKET__S (6)
106 #define IO7__ERR_CYC__PACKET__M (0x7)
107 #define IO7__ERR_CYC__LOC (1UL << 5)
108 #define IO7__ERR_CYC__CYCLE__S (2)
109 #define IO7__ERR_CYC__CYCLE__M (0x7)
111 printk(
"%s Packet In Error: %s\n"
112 "%s Error in %s, cycle %lld%s%s\n",
114 packet_desc[
EXTRACT(err_cyc, IO7__ERR_CYC__PACKET)],
116 (err_cyc & IO7__ERR_CYC__LOC) ?
"DATA" :
"HEADER",
117 EXTRACT(err_cyc, IO7__ERR_CYC__CYCLE),
118 (err_cyc & IO7__ERR_CYC__ODD_FLT) ?
" [ODD Flit]":
"",
119 (err_cyc & IO7__ERR_CYC__EVN_FLT) ?
" [Even Flit]":
"");
123 marvel_print_po7_crrct_sym(
u64 crrct_sym)
125 #define IO7__PO7_CRRCT_SYM__SYN__S (0)
126 #define IO7__PO7_CRRCT_SYM__SYN__M (0x7f)
127 #define IO7__PO7_CRRCT_SYM__ERR_CYC__S (7)
128 #define IO7__PO7_CRRCT_SYM__ERR_CYC__M (0x1ff)
131 printk(
"%s Correctable Error Symptoms:\n"
132 "%s Syndrome: 0x%llx\n",
135 marvel_print_err_cyc(
EXTRACT(crrct_sym, IO7__PO7_CRRCT_SYM__ERR_CYC));
139 marvel_print_po7_uncrr_sym(
u64 uncrr_sym,
u64 valid_mask)
141 static char *clk_names[] = {
"_h[0]",
"_h[1]",
"_n[0]",
"_n[1]" };
142 static char *clk_decode[] = {
144 "One extra rising edge",
145 "Two extra rising edges",
148 static char *port_names[] = {
"Port 0",
"Port 1",
150 "Unknown Port",
"Unknown Port",
151 "Unknown Port",
"Port 7" };
154 #define IO7__PO7_UNCRR_SYM__SYN__S (0)
155 #define IO7__PO7_UNCRR_SYM__SYN__M (0x7f)
156 #define IO7__PO7_UNCRR_SYM__ERR_CYC__S (7)
157 #define IO7__PO7_UNCRR_SYM__ERR_CYC__M (0x1ff)
158 #define IO7__PO7_UNCRR_SYM__CLK__S (16)
159 #define IO7__PO7_UNCRR_SYM__CLK__M (0xff)
160 #define IO7__PO7_UNCRR_SYM__CDT_OVF_TO__REQ (1UL << 24)
161 #define IO7__PO7_UNCRR_SYM__CDT_OVF_TO__RIO (1UL << 25)
162 #define IO7__PO7_UNCRR_SYM__CDT_OVF_TO__WIO (1UL << 26)
163 #define IO7__PO7_UNCRR_SYM__CDT_OVF_TO__BLK (1UL << 27)
164 #define IO7__PO7_UNCRR_SYM__CDT_OVF_TO__NBK (1UL << 28)
165 #define IO7__PO7_UNCRR_SYM__OVF__READIO (1UL << 29)
166 #define IO7__PO7_UNCRR_SYM__OVF__WRITEIO (1UL << 30)
167 #define IO7__PO7_UNCRR_SYM__OVF__FWD (1UL << 31)
168 #define IO7__PO7_UNCRR_SYM__VICTIM_SP__S (32)
169 #define IO7__PO7_UNCRR_SYM__VICTIM_SP__M (0xff)
170 #define IO7__PO7_UNCRR_SYM__DETECT_SP__S (40)
171 #define IO7__PO7_UNCRR_SYM__DETECT_SP__M (0xff)
172 #define IO7__PO7_UNCRR_SYM__STRV_VTR__S (48)
173 #define IO7__PO7_UNCRR_SYM__STRV_VTR__M (0x3ff)
175 #define IO7__STRV_VTR__LSI__INTX__S (0)
176 #define IO7__STRV_VTR__LSI__INTX__M (0x3)
177 #define IO7__STRV_VTR__LSI__SLOT__S (2)
178 #define IO7__STRV_VTR__LSI__SLOT__M (0x7)
179 #define IO7__STRV_VTR__LSI__BUS__S (5)
180 #define IO7__STRV_VTR__LSI__BUS__M (0x3)
181 #define IO7__STRV_VTR__MSI__INTNUM__S (0)
182 #define IO7__STRV_VTR__MSI__INTNUM__M (0x1ff)
183 #define IO7__STRV_VTR__IS_MSI (1UL << 9)
186 uncrr_sym &= valid_mask;
188 if (
EXTRACT(valid_mask, IO7__PO7_UNCRR_SYM__SYN))
189 printk(
"%s Syndrome: 0x%llx\n",
191 EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__SYN));
193 if (
EXTRACT(valid_mask, IO7__PO7_UNCRR_SYM__ERR_CYC))
194 marvel_print_err_cyc(
EXTRACT(uncrr_sym,
195 IO7__PO7_UNCRR_SYM__ERR_CYC));
197 scratch =
EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__CLK);
198 for (i = 0; i < 4; i++, scratch >>= 2) {
200 printk(
"%s Clock %s: %s\n",
202 clk_names[i], clk_decode[scratch & 0x3]);
205 if (uncrr_sym & IO7__PO7_UNCRR_SYM__CDT_OVF_TO__REQ)
206 printk(
"%s REQ Credit Timeout or Overflow\n",
208 if (uncrr_sym & IO7__PO7_UNCRR_SYM__CDT_OVF_TO__RIO)
209 printk(
"%s RIO Credit Timeout or Overflow\n",
211 if (uncrr_sym & IO7__PO7_UNCRR_SYM__CDT_OVF_TO__WIO)
212 printk(
"%s WIO Credit Timeout or Overflow\n",
214 if (uncrr_sym & IO7__PO7_UNCRR_SYM__CDT_OVF_TO__BLK)
215 printk(
"%s BLK Credit Timeout or Overflow\n",
217 if (uncrr_sym & IO7__PO7_UNCRR_SYM__CDT_OVF_TO__NBK)
218 printk(
"%s NBK Credit Timeout or Overflow\n",
221 if (uncrr_sym & IO7__PO7_UNCRR_SYM__OVF__READIO)
222 printk(
"%s Read I/O Buffer Overflow\n",
224 if (uncrr_sym & IO7__PO7_UNCRR_SYM__OVF__WRITEIO)
225 printk(
"%s Write I/O Buffer Overflow\n",
227 if (uncrr_sym & IO7__PO7_UNCRR_SYM__OVF__FWD)
228 printk(
"%s FWD Buffer Overflow\n",
231 if ((scratch =
EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__VICTIM_SP))) {
232 int lost = scratch & (1
UL << 4);
234 for (i = 0; i < 8; i++, scratch >>= 1) {
237 printk(
"%s Error Response sent to %s",
241 printk(
"%s Lost Error sent somewhere else\n",
245 if ((scratch =
EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__DETECT_SP))) {
246 for (i = 0; i < 8; i++, scratch >>= 1) {
249 printk(
"%s Error Reported by %s",
254 if (
EXTRACT(valid_mask, IO7__PO7_UNCRR_SYM__STRV_VTR)) {
255 char starvation_message[80];
257 scratch =
EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__STRV_VTR);
258 if (scratch & IO7__STRV_VTR__IS_MSI)
260 "MSI Interrupt 0x%x",
261 EXTRACT(scratch, IO7__STRV_VTR__MSI__INTNUM));
264 "LSI INT%c for Bus:Slot (%d:%d)\n",
266 IO7__STRV_VTR__LSI__INTX),
267 EXTRACT(scratch, IO7__STRV_VTR__LSI__BUS),
268 EXTRACT(scratch, IO7__STRV_VTR__LSI__SLOT));
270 printk(
"%s Starvation Int Trigger By: %s\n",
276 marvel_print_po7_ugbge_sym(
u64 ugbge_sym)
280 #define IO7__PO7_UGBGE_SYM__UPH_PKT_OFF__S (6)
281 #define IO7__PO7_UGBGE_SYM__UPH_PKT_OFF__M (0xfffffffful)
282 #define IO7__PO7_UGBGE_SYM__UPH_OPCODE__S (40)
283 #define IO7__PO7_UGBGE_SYM__UPH_OPCODE__M (0xff)
284 #define IO7__PO7_UGBGE_SYM__UPH_SRC_PORT__S (48)
285 #define IO7__PO7_UGBGE_SYM__UPH_SRC_PORT__M (0xf)
286 #define IO7__PO7_UGBGE_SYM__UPH_DEST_PID__S (52)
287 #define IO7__PO7_UGBGE_SYM__UPH_DEST_PID__M (0x7ff)
288 #define IO7__PO7_UGBGE_SYM__VALID (1UL << 63)
290 if (!(ugbge_sym & IO7__PO7_UGBGE_SYM__VALID))
293 switch(
EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE)) {
310 sprintf(opcode_str,
"0x%llx\n",
311 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE));
315 printk(
"%s Up Hose Garbage Symptom:\n"
316 "%s Source Port: %lld - Dest PID: %lld - OpCode: %s\n",
319 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_SRC_PORT),
320 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_DEST_PID),
323 if (0xC5 !=
EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE))
324 printk(
"%s Packet Offset 0x%08llx\n",
326 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_PKT_OFF));
332 u64 uncrr_sym_valid = 0;
334 #define IO7__PO7_ERRSUM__CR_SBE (1UL << 32)
335 #define IO7__PO7_ERRSUM__CR_SBE2 (1UL << 33)
336 #define IO7__PO7_ERRSUM__CR_PIO_WBYTE (1UL << 34)
337 #define IO7__PO7_ERRSUM__CR_CSR_NXM (1UL << 35)
338 #define IO7__PO7_ERRSUM__CR_RPID_ACV (1UL << 36)
339 #define IO7__PO7_ERRSUM__CR_RSP_NXM (1UL << 37)
340 #define IO7__PO7_ERRSUM__CR_ERR_RESP (1UL << 38)
341 #define IO7__PO7_ERRSUM__CR_CLK_DERR (1UL << 39)
342 #define IO7__PO7_ERRSUM__CR_DAT_DBE (1UL << 40)
343 #define IO7__PO7_ERRSUM__CR_DAT_GRBG (1UL << 41)
344 #define IO7__PO7_ERRSUM__MAF_TO (1UL << 42)
345 #define IO7__PO7_ERRSUM__UGBGE (1UL << 43)
346 #define IO7__PO7_ERRSUM__UN_MAF_LOST (1UL << 44)
347 #define IO7__PO7_ERRSUM__UN_PKT_OVF (1UL << 45)
348 #define IO7__PO7_ERRSUM__UN_CDT_OVF (1UL << 46)
349 #define IO7__PO7_ERRSUM__UN_DEALLOC (1UL << 47)
350 #define IO7__PO7_ERRSUM__BH_CDT_TO (1UL << 51)
351 #define IO7__PO7_ERRSUM__BH_CLK_HDR (1UL << 52)
352 #define IO7__PO7_ERRSUM__BH_DBE_HDR (1UL << 53)
353 #define IO7__PO7_ERRSUM__BH_GBG_HDR (1UL << 54)
354 #define IO7__PO7_ERRSUM__BH_BAD_CMD (1UL << 55)
355 #define IO7__PO7_ERRSUM__HLT_INT (1UL << 56)
356 #define IO7__PO7_ERRSUM__HP_INT (1UL << 57)
357 #define IO7__PO7_ERRSUM__CRD_INT (1UL << 58)
358 #define IO7__PO7_ERRSUM__STV_INT (1UL << 59)
359 #define IO7__PO7_ERRSUM__HRD_INT (1UL << 60)
360 #define IO7__PO7_ERRSUM__BH_SUM (1UL << 61)
361 #define IO7__PO7_ERRSUM__ERR_LST (1UL << 62)
362 #define IO7__PO7_ERRSUM__ERR_VALID (1UL << 63)
364 #define IO7__PO7_ERRSUM__ERR_MASK (IO7__PO7_ERRSUM__ERR_VALID | \
365 IO7__PO7_ERRSUM__CR_SBE)
371 printk(
"%s %sSingle Bit Error(s) detected/corrected\n",
384 printk(
"%s Hot Plug Event Interrupt posted",
386 uncrr_sym_valid |=
GEN_MASK(IO7__PO7_UNCRR_SYM__DETECT_SP);
389 printk(
"%s Correctable Error Interrupt posted",
393 uncrr_sym_valid |=
GEN_MASK(IO7__PO7_UNCRR_SYM__STRV_VTR);
397 uncrr_sym_valid |=
GEN_MASK(IO7__PO7_UNCRR_SYM__DETECT_SP);
405 goto check_uncrr_sym;
414 uncrr_sym_valid |=
GEN_MASK(IO7__PO7_UNCRR_SYM__VICTIM_SP);
416 IO7__PO7_ERRSUM__CR_CSR_NXM |
417 IO7__PO7_ERRSUM__CR_RSP_NXM |
418 IO7__PO7_ERRSUM__CR_ERR_RESP |
419 IO7__PO7_ERRSUM__MAF_TO)))
420 uncrr_sym_valid |= 0x3ffffffful;
427 printk(
"%s Bus Requester PID (Access Violation)\n",
430 printk(
"%s Received NXM response from EV7\n",
437 printk(
"%s Double Bit Error Data Error Detected\n",
440 printk(
"%s Garbage Encoding Detected on the data\n",
443 printk(
"%s Garbage Encoding sent up hose\n",
448 printk(
"%s Orphan response (unexpected response)\n",
455 printk(
"%s Unexpected or bad dealloc field\n",
462 printk(
"%s BLACK HOLE: Timeout for all responses\n",
467 printk(
"%s BLACK HOLE: Clock check on header\n",
470 printk(
"%s BLACK HOLE: Uncorrectable Error on header\n",
473 printk(
"%s BLACK HOLE: Garbage on header\n",
476 printk(
"%s BLACK HOLE: Bad EV7 command\n",
482 printk(
"%s Failing Packet:\n"
483 "%s Cycle 1: %016llx\n"
484 "%s Cycle 2: %016llx\n",
494 marvel_print_po7_uncrr_sym(io->
po7_uncrr_sym, uncrr_sym_valid);
498 marvel_print_pox_tlb_err(
u64 tlb_err)
500 static char *tlb_errors[] = {
502 "North Port Signaled Error fetching TLB entry",
503 "PTE invalid or UCC or GBG error on this entry",
504 "Address did not hit any DMA window"
507 #define IO7__POX_TLBERR__ERR_VALID (1UL << 63)
508 #define IO7__POX_TLBERR__ERRCODE__S (0)
509 #define IO7__POX_TLBERR__ERRCODE__M (0x3)
510 #define IO7__POX_TLBERR__ERR_TLB_PTR__S (3)
511 #define IO7__POX_TLBERR__ERR_TLB_PTR__M (0x7)
512 #define IO7__POX_TLBERR__FADDR__S (6)
513 #define IO7__POX_TLBERR__FADDR__M (0x3fffffffffful)
515 if (!(tlb_err & IO7__POX_TLBERR__ERR_VALID))
518 printk(
"%s TLB Error on index 0x%llx:\n"
520 "%s - Addr: 0x%016llx\n",
522 EXTRACT(tlb_err, IO7__POX_TLBERR__ERR_TLB_PTR),
524 tlb_errors[
EXTRACT(tlb_err, IO7__POX_TLBERR__ERRCODE)],
526 EXTRACT(tlb_err, IO7__POX_TLBERR__FADDR) << 6);
530 marvel_print_pox_spl_cmplt(
u64 spl_cmplt)
534 #define IO7__POX_SPLCMPLT__MESSAGE__S (0)
535 #define IO7__POX_SPLCMPLT__MESSAGE__M (0x0fffffffful)
536 #define IO7__POX_SPLCMPLT__SOURCE_BUS__S (40)
537 #define IO7__POX_SPLCMPLT__SOURCE_BUS__M (0xfful)
538 #define IO7__POX_SPLCMPLT__SOURCE_DEV__S (35)
539 #define IO7__POX_SPLCMPLT__SOURCE_DEV__M (0x1ful)
540 #define IO7__POX_SPLCMPLT__SOURCE_FUNC__S (32)
541 #define IO7__POX_SPLCMPLT__SOURCE_FUNC__M (0x07ul)
543 #define IO7__POX_SPLCMPLT__MSG_CLASS__S (28)
544 #define IO7__POX_SPLCMPLT__MSG_CLASS__M (0xf)
545 #define IO7__POX_SPLCMPLT__MSG_INDEX__S (20)
546 #define IO7__POX_SPLCMPLT__MSG_INDEX__M (0xff)
547 #define IO7__POX_SPLCMPLT__MSG_CLASSINDEX__S (20)
548 #define IO7__POX_SPLCMPLT__MSG_CLASSINDEX__M (0xfff)
549 #define IO7__POX_SPLCMPLT__REM_LOWER_ADDR__S (12)
550 #define IO7__POX_SPLCMPLT__REM_LOWER_ADDR__M (0x7f)
551 #define IO7__POX_SPLCMPLT__REM_BYTE_COUNT__S (0)
552 #define IO7__POX_SPLCMPLT__REM_BYTE_COUNT__M (0xfff)
554 printk(
"%s Split Completion Error:\n"
555 "%s Source (Bus:Dev:Func): %lld:%lld:%lld\n",
558 EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__SOURCE_BUS),
559 EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__SOURCE_DEV),
560 EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__SOURCE_FUNC));
562 switch(
EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__MSG_CLASSINDEX)) {
564 sprintf(message,
"Normal completion");
567 sprintf(message,
"Bridge - Master Abort");
570 sprintf(message,
"Bridge - Target Abort");
573 sprintf(message,
"Bridge - Uncorrectable Write Data Error");
576 sprintf(message,
"Byte Count Out of Range");
579 sprintf(message,
"Uncorrectable Split Write Data Error");
583 EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__MESSAGE));
590 marvel_print_pox_trans_sum(
u64 trans_sum)
592 static const char *
const pcix_cmd[] = {
593 "Interrupt Acknowledge",
598 "Reserved / Device ID Message",
601 "Reserved / Alias to Memory Read Block",
602 "Reserved / Alias to Memory Write Block",
603 "Configuration Read",
604 "Configuration Write",
605 "Memory Read Multiple / Split Completion",
606 "Dual Address Cycle",
607 "Memory Read Line / Memory Read Block",
608 "Memory Write and Invalidate / Memory Write Block"
611 #define IO7__POX_TRANSUM__PCI_ADDR__S (0)
612 #define IO7__POX_TRANSUM__PCI_ADDR__M (0x3fffffffffffful)
613 #define IO7__POX_TRANSUM__DAC (1UL << 50)
614 #define IO7__POX_TRANSUM__PCIX_MASTER_SLOT__S (52)
615 #define IO7__POX_TRANSUM__PCIX_MASTER_SLOT__M (0xf)
616 #define IO7__POX_TRANSUM__PCIX_CMD__S (56)
617 #define IO7__POX_TRANSUM__PCIX_CMD__M (0xf)
618 #define IO7__POX_TRANSUM__ERR_VALID (1UL << 63)
620 if (!(trans_sum & IO7__POX_TRANSUM__ERR_VALID))
623 printk(
"%s Transaction Summary:\n"
624 "%s Command: 0x%llx - %s\n"
625 "%s Address: 0x%016llx%s\n"
626 "%s PCI-X Master Slot: 0x%llx\n",
629 EXTRACT(trans_sum, IO7__POX_TRANSUM__PCIX_CMD),
630 pcix_cmd[
EXTRACT(trans_sum, IO7__POX_TRANSUM__PCIX_CMD)],
632 EXTRACT(trans_sum, IO7__POX_TRANSUM__PCI_ADDR),
633 (trans_sum & IO7__POX_TRANSUM__DAC) ?
" (DAC)" :
"",
635 EXTRACT(trans_sum, IO7__POX_TRANSUM__PCIX_MASTER_SLOT));
641 #define IO7__POX_ERRSUM__AGP_REQQ_OVFL (1UL << 4)
642 #define IO7__POX_ERRSUM__AGP_SYNC_ERR (1UL << 5)
643 #define IO7__POX_ERRSUM__MRETRY_TO (1UL << 6)
644 #define IO7__POX_ERRSUM__PCIX_UX_SPL (1UL << 7)
645 #define IO7__POX_ERRSUM__PCIX_SPLIT_TO (1UL << 8)
646 #define IO7__POX_ERRSUM__PCIX_DISCARD_SPL (1UL << 9)
647 #define IO7__POX_ERRSUM__DMA_RD_TO (1UL << 10)
648 #define IO7__POX_ERRSUM__CSR_NXM_RD (1UL << 11)
649 #define IO7__POX_ERRSUM__CSR_NXM_WR (1UL << 12)
650 #define IO7__POX_ERRSUM__DMA_TO (1UL << 13)
651 #define IO7__POX_ERRSUM__ALL_MABORTS (1UL << 14)
652 #define IO7__POX_ERRSUM__MABORT (1UL << 15)
653 #define IO7__POX_ERRSUM__MABORT_MASK (IO7__POX_ERRSUM__ALL_MABORTS|\
654 IO7__POX_ERRSUM__MABORT)
655 #define IO7__POX_ERRSUM__PT_TABORT (1UL << 16)
656 #define IO7__POX_ERRSUM__PM_TABORT (1UL << 17)
657 #define IO7__POX_ERRSUM__TABORT_MASK (IO7__POX_ERRSUM__PT_TABORT | \
658 IO7__POX_ERRSUM__PM_TABORT)
659 #define IO7__POX_ERRSUM__SERR (1UL << 18)
660 #define IO7__POX_ERRSUM__ADDRERR_STB (1UL << 19)
661 #define IO7__POX_ERRSUM__DETECTED_SERR (1UL << 20)
662 #define IO7__POX_ERRSUM__PERR (1UL << 21)
663 #define IO7__POX_ERRSUM__DATAERR_STB_NIOW (1UL << 22)
664 #define IO7__POX_ERRSUM__DETECTED_PERR (1UL << 23)
665 #define IO7__POX_ERRSUM__PM_PERR (1UL << 24)
666 #define IO7__POX_ERRSUM__PT_SCERROR (1UL << 26)
667 #define IO7__POX_ERRSUM__HUNG_BUS (1UL << 28)
668 #define IO7__POX_ERRSUM__UPE_ERROR__S (51)
669 #define IO7__POX_ERRSUM__UPE_ERROR__M (0xffUL)
670 #define IO7__POX_ERRSUM__UPE_ERROR GEN_MASK(IO7__POX_ERRSUM__UPE_ERROR)
671 #define IO7__POX_ERRSUM__TLB_ERR (1UL << 59)
672 #define IO7__POX_ERRSUM__ERR_VALID (1UL << 63)
674 #define IO7__POX_ERRSUM__TRANS_SUM__MASK (IO7__POX_ERRSUM__MRETRY_TO | \
675 IO7__POX_ERRSUM__PCIX_UX_SPL | \
676 IO7__POX_ERRSUM__PCIX_SPLIT_TO | \
677 IO7__POX_ERRSUM__DMA_TO | \
678 IO7__POX_ERRSUM__MABORT_MASK | \
679 IO7__POX_ERRSUM__TABORT_MASK | \
680 IO7__POX_ERRSUM__SERR | \
681 IO7__POX_ERRSUM__ADDRERR_STB | \
682 IO7__POX_ERRSUM__PERR | \
683 IO7__POX_ERRSUM__DATAERR_STB_NIOW |\
684 IO7__POX_ERRSUM__DETECTED_PERR | \
685 IO7__POX_ERRSUM__PM_PERR | \
686 IO7__POX_ERRSUM__PT_SCERROR | \
687 IO7__POX_ERRSUM__UPE_ERROR)
689 if (!(err_sum & IO7__POX_ERRSUM__ERR_VALID))
695 if (err_sum & IO7__POX_ERRSUM__MRETRY_TO)
696 printk(
"%s IO7 Master Retry Timeout expired\n",
698 if (err_sum & IO7__POX_ERRSUM__PCIX_UX_SPL)
699 printk(
"%s Unexpected Split Completion\n",
701 if (err_sum & IO7__POX_ERRSUM__PCIX_SPLIT_TO)
702 printk(
"%s IO7 Split Completion Timeout expired\n",
704 if (err_sum & IO7__POX_ERRSUM__DMA_TO)
705 printk(
"%s Hung bus during DMA transaction\n",
707 if (err_sum & IO7__POX_ERRSUM__MABORT_MASK)
709 if (err_sum & IO7__POX_ERRSUM__PT_TABORT)
711 if (err_sum & IO7__POX_ERRSUM__PM_TABORT)
713 if (err_sum & IO7__POX_ERRSUM__ADDRERR_STB) {
714 printk(
"%s Address or PCI-X Attribute Parity Error\n",
716 if (err_sum & IO7__POX_ERRSUM__SERR)
719 if (err_sum & IO7__POX_ERRSUM__PERR) {
720 if (err_sum & IO7__POX_ERRSUM__DATAERR_STB_NIOW)
721 printk(
"%s IO7 Detected Data Parity Error\n",
724 printk(
"%s Split Completion Response with "
727 if (err_sum & IO7__POX_ERRSUM__DETECTED_PERR)
729 if (err_sum & IO7__POX_ERRSUM__PM_PERR)
731 if (err_sum & IO7__POX_ERRSUM__PT_SCERROR) {
732 printk(
"%s IO7 Received Split Completion Error message\n",
736 if (err_sum & IO7__POX_ERRSUM__UPE_ERROR) {
737 unsigned int upe_error =
EXTRACT(err_sum,
738 IO7__POX_ERRSUM__UPE_ERROR);
740 static char *upe_errors[] = {
741 "Parity Error on MSI write data",
742 "MSI read (MSI window is write only",
743 "TLB - Invalid WR transaction",
744 "TLB - Invalid RD transaction",
745 "DMA - WR error (see north port)",
746 "DMA - RD error (see north port)",
747 "PPR - WR error (see north port)",
748 "PPR - RD error (see north port)"
752 for (i = 0; i < 8; i++) {
753 if (upe_error & (1 << i))
762 if (err_sum & IO7__POX_ERRSUM__TRANS_SUM__MASK)
768 if (err_sum & IO7__POX_ERRSUM__TLB_ERR) {
776 if (err_sum & IO7__POX_ERRSUM__AGP_REQQ_OVFL)
778 if (err_sum & IO7__POX_ERRSUM__AGP_SYNC_ERR)
780 if (err_sum & IO7__POX_ERRSUM__PCIX_DISCARD_SPL)
782 if (err_sum & IO7__POX_ERRSUM__DMA_RD_TO)
784 if (err_sum & IO7__POX_ERRSUM__CSR_NXM_RD)
786 if (err_sum & IO7__POX_ERRSUM__CSR_NXM_WR)
788 if (err_sum & IO7__POX_ERRSUM__DETECTED_SERR)
790 if (err_sum & IO7__POX_ERRSUM__HUNG_BUS)
812 memset(io, 0x55,
sizeof(*io));
815 unsigned long err_sum = 0;
817 err_sum |= io7->csrs->PO7_ERROR_SUM.csr;
818 for (i = 0; i < IO7_NUM_PORTS; i++) {
819 if (!io7->ports[i].enabled)
821 err_sum |= io7->ports[
i].csrs->POx_ERR_SUM.csr;
827 if (err_sum & (1
UL << 63))
844 io->
io7_uph = io7->csrs->IO7_UPH.csr;
845 io->
hpi_ctl = io7->csrs->HPI_CTL.csr;
846 io->
crd_ctl = io7->csrs->CRD_CTL.csr;
847 io->
hei_ctl = io7->csrs->HEI_CTL.csr;
855 for (i = 0; i < IO7_NUM_PORTS; i++) {
858 if (!io7->ports[i].enabled)
891 io7->csrs->PO7_ERROR_SUM.csr;
896 lf_subpackets->
io_pid = io7->pe;
906 #ifdef CONFIG_VERBOSE_MCHECK
911 #define MARVEL_IO_ERR_VALID(x) ((x) & (1UL << 63))
913 if (!lf_subpackets->
logout || !lf_subpackets->
io)
932 if ((lf_subpackets->
io->po7_error_sum & (1
UL << 32)) ||
933 ((lf_subpackets->
io->po7_error_sum |
934 lf_subpackets->
io->ports[0].pox_err_sum |
935 lf_subpackets->
io->ports[1].pox_err_sum |
936 lf_subpackets->
io->ports[2].pox_err_sum |
937 lf_subpackets->
io->ports[3].pox_err_sum) & (1
UL << 63))) {
943 if (!marvel_find_io7_with_error(lf_subpackets))
952 #ifdef CONFIG_VERBOSE_MCHECK
957 printk(
"%s*Error occurred on IO7 at PID %u\n",
963 if (lf_subpackets->
io->po7_error_sum & IO7__PO7_ERRSUM__ERR_MASK) {
964 marvel_print_po7_err_sum(io);
967 printk(
"%s PORT 7 ERROR:\n"
968 "%s PO7_ERROR_SUM: %016llx\n"
969 "%s PO7_UNCRR_SYM: %016llx\n"
970 "%s PO7_CRRCT_SYM: %016llx\n"
971 "%s PO7_UGBGE_SYM: %016llx\n"
972 "%s PO7_ERR_PKT0: %016llx\n"
973 "%s PO7_ERR_PKT1: %016llx\n",
987 for (i = 0; i < IO7_NUM_PORTS; i++) {
991 printk(
"%s PID %u PORT %d POx_ERR_SUM: %016llx\n",
993 lf_subpackets->
io_pid, i, io->
ports[i].pox_err_sum);
994 marvel_print_pox_err(io->
ports[i].pox_err_sum, &io->
ports[i]);
996 printk(
"%s [ POx_FIRST_ERR: %016llx ]\n",
998 marvel_print_pox_err(io->
ports[i].pox_first_err,
1017 #define EV7__RBOX_INT__IO_ERROR__MASK 0x20000400ul
1018 if (lf_subpackets->
logout &&
1019 (lf_subpackets->
logout->rbox_int & 0x20000400ul))
1020 status = marvel_process_io_error(lf_subpackets, print);
1035 if (lf_subpackets->
ev7 &&
1036 (lf_subpackets->
ev7->c_stat == 0x14) &&
1037 !(lf_subpackets->
ev7->c_sts & 0x8) &&
1038 ((lf_subpackets->
ev7->c_addr & 0x400ff000000ul)
1039 == 0x400fe000000ul))
1065 process_frame = marvel_process_680_frame;
1066 error_type =
"System Event";
1070 process_frame = marvel_process_logout_frame;
1071 error_type =
"System Uncorrectable Error";
1075 process_frame = marvel_process_logout_frame;
1076 error_type =
"System Correctable Error";
1100 &subpacket_collection);
1101 if (process_frame && lf_subpackets && lf_subpackets->
logout) {
1110 if (!lf_subpackets->
io)
1111 lf_subpackets->
io = &scratch_io_packet;
1123 disposition = process_frame(lf_subpackets, 0);
1125 switch(disposition) {
1132 printk(
"%s*%s (Vector 0x%x) reported on CPU %d\n",
1136 process_frame(lf_subpackets, 1);
1141 printk(
"%s*%s (Vector 0x%x) reported on CPU %d\n",