10 #include <linux/pci.h>
11 #include <linux/sched.h>
19 #include <asm/irq_regs.h>
26 titan_parse_c_misc(
u64 c_misc,
int print)
28 #ifdef CONFIG_VERBOSE_MCHECK
34 #define TITAN__CCHIP_MISC__NXM (1UL << 28)
35 #define TITAN__CCHIP_MISC__NXS__S (29)
36 #define TITAN__CCHIP_MISC__NXS__M (0x7)
38 if (!(c_misc & TITAN__CCHIP_MISC__NXM))
41 #ifdef CONFIG_VERBOSE_MCHECK
45 nxs =
EXTRACT(c_misc, TITAN__CCHIP_MISC__NXS);
60 src =
"Unknown, NXS =";
65 printk(
"%s Non-existent memory access from: %s %d\n",
73 titan_parse_p_serror(
int which,
u64 serror,
int print)
77 #ifdef CONFIG_VERBOSE_MCHECK
78 static const char *
const serror_src[] = {
79 "GPCI",
"APCI",
"AGP HP",
"AGP LP"
81 static const char *
const serror_cmd[] = {
82 "DMA Read",
"DMA RMW",
"SGTE Read",
"Reserved"
86 #define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0)
87 #define TITAN__PCHIP_SERROR__UECC (1UL << 1)
88 #define TITAN__PCHIP_SERROR__CRE (1UL << 2)
89 #define TITAN__PCHIP_SERROR__NXIO (1UL << 3)
90 #define TITAN__PCHIP_SERROR__LOST_CRE (1UL << 4)
91 #define TITAN__PCHIP_SERROR__ECCMASK (TITAN__PCHIP_SERROR__UECC | \
92 TITAN__PCHIP_SERROR__CRE)
93 #define TITAN__PCHIP_SERROR__ERRMASK (TITAN__PCHIP_SERROR__LOST_UECC | \
94 TITAN__PCHIP_SERROR__UECC | \
95 TITAN__PCHIP_SERROR__CRE | \
96 TITAN__PCHIP_SERROR__NXIO | \
97 TITAN__PCHIP_SERROR__LOST_CRE)
98 #define TITAN__PCHIP_SERROR__SRC__S (52)
99 #define TITAN__PCHIP_SERROR__SRC__M (0x3)
100 #define TITAN__PCHIP_SERROR__CMD__S (54)
101 #define TITAN__PCHIP_SERROR__CMD__M (0x3)
102 #define TITAN__PCHIP_SERROR__SYN__S (56)
103 #define TITAN__PCHIP_SERROR__SYN__M (0xff)
104 #define TITAN__PCHIP_SERROR__ADDR__S (15)
105 #define TITAN__PCHIP_SERROR__ADDR__M (0xffffffffUL)
107 if (!(serror & TITAN__PCHIP_SERROR__ERRMASK))
110 #ifdef CONFIG_VERBOSE_MCHECK
114 printk(
"%s PChip %d SERROR: %016llx\n",
116 if (serror & TITAN__PCHIP_SERROR__ECCMASK) {
117 printk(
"%s %sorrectable ECC Error:\n"
118 " Source: %-6s Command: %-8s Syndrome: 0x%08x\n"
119 " Address: 0x%llx\n",
121 (serror & TITAN__PCHIP_SERROR__UECC) ?
"Unc" :
"C",
122 serror_src[
EXTRACT(serror, TITAN__PCHIP_SERROR__SRC)],
123 serror_cmd[
EXTRACT(serror, TITAN__PCHIP_SERROR__CMD)],
124 (
unsigned)
EXTRACT(serror, TITAN__PCHIP_SERROR__SYN),
125 EXTRACT(serror, TITAN__PCHIP_SERROR__ADDR));
127 if (serror & TITAN__PCHIP_SERROR__NXIO)
129 if (serror & TITAN__PCHIP_SERROR__LOST_UECC)
130 printk(
"%s Lost Uncorrectable ECC Error\n",
132 if (serror & TITAN__PCHIP_SERROR__LOST_CRE)
140 titan_parse_p_perror(
int which,
int port,
u64 perror,
int print)
146 #ifdef CONFIG_VERBOSE_MCHECK
147 static const char *
const perror_cmd[] = {
148 "Interrupt Acknowledge",
"Special Cycle",
149 "I/O Read",
"I/O Write",
150 "Reserved",
"Reserved",
151 "Memory Read",
"Memory Write",
152 "Reserved",
"Reserved",
153 "Configuration Read",
"Configuration Write",
154 "Memory Read Multiple",
"Dual Address Cycle",
155 "Memory Read Line",
"Memory Write and Invalidate"
159 #define TITAN__PCHIP_PERROR__LOST (1UL << 0)
160 #define TITAN__PCHIP_PERROR__SERR (1UL << 1)
161 #define TITAN__PCHIP_PERROR__PERR (1UL << 2)
162 #define TITAN__PCHIP_PERROR__DCRTO (1UL << 3)
163 #define TITAN__PCHIP_PERROR__SGE (1UL << 4)
164 #define TITAN__PCHIP_PERROR__APE (1UL << 5)
165 #define TITAN__PCHIP_PERROR__TA (1UL << 6)
166 #define TITAN__PCHIP_PERROR__DPE (1UL << 7)
167 #define TITAN__PCHIP_PERROR__NDS (1UL << 8)
168 #define TITAN__PCHIP_PERROR__IPTPR (1UL << 9)
169 #define TITAN__PCHIP_PERROR__IPTPW (1UL << 10)
170 #define TITAN__PCHIP_PERROR__ERRMASK (TITAN__PCHIP_PERROR__LOST | \
171 TITAN__PCHIP_PERROR__SERR | \
172 TITAN__PCHIP_PERROR__PERR | \
173 TITAN__PCHIP_PERROR__DCRTO | \
174 TITAN__PCHIP_PERROR__SGE | \
175 TITAN__PCHIP_PERROR__APE | \
176 TITAN__PCHIP_PERROR__TA | \
177 TITAN__PCHIP_PERROR__DPE | \
178 TITAN__PCHIP_PERROR__NDS | \
179 TITAN__PCHIP_PERROR__IPTPR | \
180 TITAN__PCHIP_PERROR__IPTPW)
181 #define TITAN__PCHIP_PERROR__DAC (1UL << 47)
182 #define TITAN__PCHIP_PERROR__MWIN (1UL << 48)
183 #define TITAN__PCHIP_PERROR__CMD__S (52)
184 #define TITAN__PCHIP_PERROR__CMD__M (0x0f)
185 #define TITAN__PCHIP_PERROR__ADDR__S (14)
186 #define TITAN__PCHIP_PERROR__ADDR__M (0x1fffffffful)
188 if (!(perror & TITAN__PCHIP_PERROR__ERRMASK))
191 cmd =
EXTRACT(perror, TITAN__PCHIP_PERROR__CMD);
192 addr =
EXTRACT(perror, TITAN__PCHIP_PERROR__ADDR) << 2;
219 if (((perror & TITAN__PCHIP_PERROR__NDS) ||
220 ((perror & TITAN__PCHIP_PERROR__ERRMASK) ==
221 TITAN__PCHIP_PERROR__LOST)) &&
222 ((((cmd & 0xE) == 2) && (addr < 0x1000)) ||
223 (((cmd & 0xE) == 6) && (addr >= 0xA0000) && (addr < 0x100000)))) {
227 #ifdef CONFIG_VERBOSE_MCHECK
231 printk(
"%s PChip %d %cPERROR: %016llx\n",
233 port ?
'A' :
'G', perror);
234 if (perror & TITAN__PCHIP_PERROR__IPTPW)
236 if (perror & TITAN__PCHIP_PERROR__IPTPR)
238 if (perror & TITAN__PCHIP_PERROR__NDS)
239 printk(
"%s No DEVSEL as PCI Master [Master Abort]\n",
241 if (perror & TITAN__PCHIP_PERROR__DPE)
243 if (perror & TITAN__PCHIP_PERROR__TA)
245 if (perror & TITAN__PCHIP_PERROR__APE)
247 if (perror & TITAN__PCHIP_PERROR__SGE)
248 printk(
"%s Scatter-Gather Error, Invalid PTE\n",
250 if (perror & TITAN__PCHIP_PERROR__DCRTO)
251 printk(
"%s Delayed-Completion Retry Timeout\n",
253 if (perror & TITAN__PCHIP_PERROR__PERR)
255 if (perror & TITAN__PCHIP_PERROR__SERR)
257 if (perror & TITAN__PCHIP_PERROR__LOST)
259 printk(
"%s Command: 0x%x - %s\n"
262 cmd, perror_cmd[cmd],
264 if (perror & TITAN__PCHIP_PERROR__DAC)
266 if (perror & TITAN__PCHIP_PERROR__MWIN)
274 titan_parse_p_agperror(
int which,
u64 agperror,
int print)
277 #ifdef CONFIG_VERBOSE_MCHECK
281 static const char *
const agperror_cmd[] = {
282 "Read (low-priority)",
"Read (high-priority)",
283 "Write (low-priority)",
"Write (high-priority)",
284 "Reserved",
"Reserved",
289 #define TITAN__PCHIP_AGPERROR__LOST (1UL << 0)
290 #define TITAN__PCHIP_AGPERROR__LPQFULL (1UL << 1)
291 #define TITAN__PCHIP_AGPERROR__HPQFULL (1UL << 2)
292 #define TITAN__PCHIP_AGPERROR__RESCMD (1UL << 3)
293 #define TITAN__PCHIP_AGPERROR__IPTE (1UL << 4)
294 #define TITAN__PCHIP_AGPERROR__PTP (1UL << 5)
295 #define TITAN__PCHIP_AGPERROR__NOWINDOW (1UL << 6)
296 #define TITAN__PCHIP_AGPERROR__ERRMASK (TITAN__PCHIP_AGPERROR__LOST | \
297 TITAN__PCHIP_AGPERROR__LPQFULL | \
298 TITAN__PCHIP_AGPERROR__HPQFULL | \
299 TITAN__PCHIP_AGPERROR__RESCMD | \
300 TITAN__PCHIP_AGPERROR__IPTE | \
301 TITAN__PCHIP_AGPERROR__PTP | \
302 TITAN__PCHIP_AGPERROR__NOWINDOW)
303 #define TITAN__PCHIP_AGPERROR__DAC (1UL << 48)
304 #define TITAN__PCHIP_AGPERROR__MWIN (1UL << 49)
305 #define TITAN__PCHIP_AGPERROR__FENCE (1UL << 59)
306 #define TITAN__PCHIP_AGPERROR__CMD__S (50)
307 #define TITAN__PCHIP_AGPERROR__CMD__M (0x07)
308 #define TITAN__PCHIP_AGPERROR__ADDR__S (15)
309 #define TITAN__PCHIP_AGPERROR__ADDR__M (0xffffffffUL)
310 #define TITAN__PCHIP_AGPERROR__LEN__S (53)
311 #define TITAN__PCHIP_AGPERROR__LEN__M (0x3f)
313 if (!(agperror & TITAN__PCHIP_AGPERROR__ERRMASK))
316 #ifdef CONFIG_VERBOSE_MCHECK
320 cmd =
EXTRACT(agperror, TITAN__PCHIP_AGPERROR__CMD);
321 addr =
EXTRACT(agperror, TITAN__PCHIP_AGPERROR__ADDR) << 3;
322 len =
EXTRACT(agperror, TITAN__PCHIP_AGPERROR__LEN);
326 if (agperror & TITAN__PCHIP_AGPERROR__NOWINDOW)
328 if (agperror & TITAN__PCHIP_AGPERROR__PTP)
330 if (agperror & TITAN__PCHIP_AGPERROR__IPTE)
332 if (agperror & TITAN__PCHIP_AGPERROR__RESCMD)
334 if (agperror & TITAN__PCHIP_AGPERROR__HPQFULL)
335 printk(
"%s HP Transaction Received while Queue Full\n",
337 if (agperror & TITAN__PCHIP_AGPERROR__LPQFULL)
338 printk(
"%s LP Transaction Received while Queue Full\n",
340 if (agperror & TITAN__PCHIP_AGPERROR__LOST)
342 printk(
"%s Command: 0x%x - %s, %d Quadwords%s\n"
345 (agperror & TITAN__PCHIP_AGPERROR__FENCE) ?
", FENCE" :
"",
347 if (agperror & TITAN__PCHIP_AGPERROR__DAC)
349 if (agperror & TITAN__PCHIP_AGPERROR__MWIN)
357 titan_parse_p_chip(
int which,
u64 serror,
u64 gperror,
358 u64 aperror,
u64 agperror,
int print)
361 status |= titan_parse_p_serror(which, serror, print);
362 status |= titan_parse_p_perror(which, 0, gperror, print);
363 status |= titan_parse_p_perror(which, 1, aperror, print);
364 status |= titan_parse_p_agperror(which, agperror, print);
373 ((
unsigned long)mchk_header + mchk_header->
sys_offset);
376 status |= titan_parse_c_misc(tmchk->
c_misc, print);
393 ((
unsigned long)mchk_header + mchk_header->
sys_offset);
405 #define TITAN_MCHECK_INTERRUPT_MASK 0xF800000000000000UL
443 "*System %s Error (Vector 0x%x) reported on CPU %d:\n",
448 #ifdef CONFIG_VERBOSE_MCHECK
450 if (alpha_verbose_mcheck)
475 static char *el_titan_pchip0_extended_annotation[] = {
476 "Subpacket Header",
"P0_SCTL",
"P0_SERREN",
477 "P0_APCTL",
"P0_APERREN",
"P0_AGPERREN",
478 "P0_ASPRST",
"P0_AWSBA0",
"P0_AWSBA1",
479 "P0_AWSBA2",
"P0_AWSBA3",
"P0_AWSM0",
480 "P0_AWSM1",
"P0_AWSM2",
"P0_AWSM3",
481 "P0_ATBA0",
"P0_ATBA1",
"P0_ATBA2",
482 "P0_ATBA3",
"P0_GPCTL",
"P0_GPERREN",
483 "P0_GSPRST",
"P0_GWSBA0",
"P0_GWSBA1",
484 "P0_GWSBA2",
"P0_GWSBA3",
"P0_GWSM0",
485 "P0_GWSM1",
"P0_GWSM2",
"P0_GWSM3",
486 "P0_GTBA0",
"P0_GTBA1",
"P0_GTBA2",
489 static char *el_titan_pchip1_extended_annotation[] = {
490 "Subpacket Header",
"P1_SCTL",
"P1_SERREN",
491 "P1_APCTL",
"P1_APERREN",
"P1_AGPERREN",
492 "P1_ASPRST",
"P1_AWSBA0",
"P1_AWSBA1",
493 "P1_AWSBA2",
"P1_AWSBA3",
"P1_AWSM0",
494 "P1_AWSM1",
"P1_AWSM2",
"P1_AWSM3",
495 "P1_ATBA0",
"P1_ATBA1",
"P1_ATBA2",
496 "P1_ATBA3",
"P1_GPCTL",
"P1_GPERREN",
497 "P1_GSPRST",
"P1_GWSBA0",
"P1_GWSBA1",
498 "P1_GWSBA2",
"P1_GWSBA3",
"P1_GWSM0",
499 "P1_GWSM1",
"P1_GWSM2",
"P1_GWSM3",
500 "P1_GTBA0",
"P1_GTBA1",
"P1_GTBA2",
503 static char *el_titan_memory_extended_annotation[] = {
504 "Subpacket Header",
"AAR0",
"AAR1",
505 "AAR2",
"AAR3",
"P0_SCTL",
506 "P0_GPCTL",
"P0_APCTL",
"P1_SCTL",
507 "P1_GPCTL",
"P1_SCTL",
NULL
514 "Titan PChip 0 Extended Frame",
515 el_titan_pchip0_extended_annotation),
519 "Titan PChip 1 Extended Frame",
520 el_titan_pchip1_extended_annotation),
524 "Titan Memory Extended Frame",
525 el_titan_memory_extended_annotation),
529 "Termination Subpacket",
537 printk(
"%s ** Unexpected header CLASS %d TYPE %d, aborting\n",
543 switch(header->
type) {
549 printk(
"%s ** Occurred on CPU %d:\n",
556 printk(
"%s ** REGATTA TYPE %d SUBPACKET\n",
568 el_process_regatta_subpacket);
575 for (i = 0; i <
ARRAY_SIZE (el_titan_annotations); i++)
589 privateer_process_680_frame(
struct el_common *mchk_header,
int print)
592 #ifdef CONFIG_VERBOSE_MCHECK
595 ((
unsigned long)mchk_header + mchk_header->
sys_offset);
603 printk(
"%s Summary Flags: %016llx\n"
604 " CChip DIRx: %016llx\n"
605 " System Management IR: %016llx\n"
607 " Power Supply IR: %016llx\n"
608 " LM78 Fault Status: %016llx\n"
609 " System Doors: %016llx\n"
610 " Temperature Warning: %016llx\n"
611 " Fan Control: %016llx\n"
612 " Fatal Power Down Code: %016llx\n",
639 #define PRIVATEER_MCHK__CORR_ECC 0x86
640 #define PRIVATEER_MCHK__DC_TAG_PERR 0x9E
641 #define PRIVATEER_MCHK__PAL_BUGCHECK 0x8E
642 #define PRIVATEER_MCHK__OS_BUGCHECK 0x90
643 #define PRIVATEER_MCHK__PROC_HRD_ERR 0x98
644 #define PRIVATEER_MCHK__ISTREAM_CMOV_PRX 0xA0
645 #define PRIVATEER_MCHK__ISTREAM_CMOV_FLT 0xA2
646 #define PRIVATEER_MCHK__SYS_HRD_ERR 0x202
647 #define PRIVATEER_MCHK__SYS_CORR_ERR 0x204
648 #define PRIVATEER_MCHK__SYS_ENVIRON 0x206
688 status |= privateer_process_680_frame(mchk_header, print);
697 printk(
"%s** Unknown Error, frame follows\n",
717 #define PRIVATEER_680_INTERRUPT_MASK (0xE00UL)
718 #define PRIVATEER_HOTPLUG_INTERRUPT_MASK (0xE00UL)
738 printk(
"%s*System Event (Vector 0x%x) reported on CPU %d:\n",
741 privateer_process_680_frame(mchk_header, 1);