| 
					
				 | 
			
			
				@@ -50,3 +50,148 @@ titan_parse_c_misc(u64 c_misc, int print) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	case 3:	/* CPU 3 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		src = "CPU"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		/* num is already the CPU number */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	case 4:	/* Pchip 0 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	case 5:	/* Pchip 1 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		src = "Pchip"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		nxs -= 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	default:/* reserved */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		src = "Unknown, NXS ="; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		/* leave num untouched */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	printk("%s    Non-existent memory access from: %s %d\n",  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	       err_print_prefix, src, nxs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif /* CONFIG_VERBOSE_MCHECK */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return status; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static int 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+titan_parse_p_serror(int which, u64 serror, int print) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	int status = MCHK_DISPOSITION_REPORT; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_VERBOSE_MCHECK 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	static const char * const serror_src[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"GPCI", "APCI", "AGP HP", "AGP LP" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	static const char * const serror_cmd[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"DMA Read", "DMA RMW", "SGTE Read", "Reserved" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif /* CONFIG_VERBOSE_MCHECK */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__LOST_UECC	(1UL << 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__UECC	(1UL << 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__CRE	(1UL << 2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__NXIO	(1UL << 3) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__LOST_CRE	(1UL << 4) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__ECCMASK	(TITAN__PCHIP_SERROR__UECC |	  \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_SERROR__CRE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__ERRMASK	(TITAN__PCHIP_SERROR__LOST_UECC | \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_SERROR__UECC |	  \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_SERROR__CRE |	  \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_SERROR__NXIO |	  \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_SERROR__LOST_CRE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__SRC__S	(52) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__SRC__M	(0x3) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__CMD__S	(54) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__CMD__M	(0x3) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__SYN__S	(56) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__SYN__M	(0xff) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__ADDR__S	(15) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_SERROR__ADDR__M	(0xffffffffUL) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (!(serror & TITAN__PCHIP_SERROR__ERRMASK)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return MCHK_DISPOSITION_UNKNOWN_ERROR; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_VERBOSE_MCHECK 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (!print) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return status; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	printk("%s  PChip %d SERROR: %016llx\n", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	       err_print_prefix, which, serror); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (serror & TITAN__PCHIP_SERROR__ECCMASK) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		printk("%s    %sorrectable ECC Error:\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       "      Source: %-6s  Command: %-8s  Syndrome: 0x%08x\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       "      Address: 0x%llx\n", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       err_print_prefix, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       (serror & TITAN__PCHIP_SERROR__UECC) ? "Unc" : "C", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       serror_src[EXTRACT(serror, TITAN__PCHIP_SERROR__SRC)], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       serror_cmd[EXTRACT(serror, TITAN__PCHIP_SERROR__CMD)], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       (unsigned)EXTRACT(serror, TITAN__PCHIP_SERROR__SYN), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       EXTRACT(serror, TITAN__PCHIP_SERROR__ADDR)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (serror & TITAN__PCHIP_SERROR__NXIO) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		printk("%s    Non Existent I/O Error\n", err_print_prefix); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (serror & TITAN__PCHIP_SERROR__LOST_UECC) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		printk("%s    Lost Uncorrectable ECC Error\n",  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		       err_print_prefix); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (serror & TITAN__PCHIP_SERROR__LOST_CRE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		printk("%s    Lost Correctable ECC Error\n", err_print_prefix); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif /* CONFIG_VERBOSE_MCHECK */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return status; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static int  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+titan_parse_p_perror(int which, int port, u64 perror, int print) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	int cmd; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	unsigned long addr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	int status = MCHK_DISPOSITION_REPORT; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#ifdef CONFIG_VERBOSE_MCHECK 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	static const char * const perror_cmd[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"Interrupt Acknowledge", "Special Cycle", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"I/O Read",		"I/O Write", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"Reserved",		"Reserved", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"Memory Read",		"Memory Write", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"Reserved",		"Reserved", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"Configuration Read",	"Configuration Write", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"Memory Read Multiple",	"Dual Address Cycle", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		"Memory Read Line",	"Memory Write and Invalidate" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif /* CONFIG_VERBOSE_MCHECK */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__LOST	(1UL << 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__SERR	(1UL << 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__PERR	(1UL << 2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__DCRTO	(1UL << 3) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__SGE	(1UL << 4) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__APE	(1UL << 5) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__TA		(1UL << 6) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__DPE	(1UL << 7) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__NDS	(1UL << 8) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__IPTPR	(1UL << 9) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__IPTPW	(1UL << 10) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__ERRMASK	(TITAN__PCHIP_PERROR__LOST |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__SERR |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__PERR |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__DCRTO |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__SGE |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__APE |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__TA |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__DPE |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__NDS |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__IPTPR |	\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 TITAN__PCHIP_PERROR__IPTPW) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__DAC	(1UL << 47) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__MWIN	(1UL << 48) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__CMD__S	(52) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__CMD__M	(0x0f) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__ADDR__S	(14) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TITAN__PCHIP_PERROR__ADDR__M	(0x1fffffffful) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (!(perror & TITAN__PCHIP_PERROR__ERRMASK)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return MCHK_DISPOSITION_UNKNOWN_ERROR; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	cmd = EXTRACT(perror, TITAN__PCHIP_PERROR__CMD); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	addr = EXTRACT(perror, TITAN__PCHIP_PERROR__ADDR) << 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * Initializing the BIOS on a video card on a bus without 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * a south bridge (subtractive decode agent) can result in  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * master aborts as the BIOS probes the capabilities of the 
			 |