aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 0505dd884ae2..4142873a87ef 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -147,6 +147,48 @@ static void __init pas_progress(char *s, unsigned short hex)
147} 147}
148 148
149 149
150static int pas_machine_check_handler(struct pt_regs *regs)
151{
152 int cpu = smp_processor_id();
153 unsigned long srr0, srr1, dsisr;
154
155 srr0 = regs->nip;
156 srr1 = regs->msr;
157 dsisr = mfspr(SPRN_DSISR);
158 printk(KERN_ERR "Machine Check on CPU %d\n", cpu);
159 printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1);
160 printk(KERN_ERR "DSISR 0x%016lx DAR 0x%016lx\n", dsisr, regs->dar);
161 printk(KERN_ERR "Cause:\n");
162
163 if (srr1 & 0x200000)
164 printk(KERN_ERR "Signalled by SDC\n");
165 if (srr1 & 0x100000) {
166 printk(KERN_ERR "Load/Store detected error:\n");
167 if (dsisr & 0x8000)
168 printk(KERN_ERR "D-cache ECC double-bit error or bus error\n");
169 if (dsisr & 0x4000)
170 printk(KERN_ERR "LSU snoop response error\n");
171 if (dsisr & 0x2000)
172 printk(KERN_ERR "MMU SLB multi-hit or invalid B field\n");
173 if (dsisr & 0x1000)
174 printk(KERN_ERR "Recoverable Duptags\n");
175 if (dsisr & 0x800)
176 printk(KERN_ERR "Recoverable D-cache parity error count overflow\n");
177 if (dsisr & 0x400)
178 printk(KERN_ERR "TLB parity error count overflow\n");
179 }
180 if (srr1 & 0x80000)
181 printk(KERN_ERR "Bus Error\n");
182 if (srr1 & 0x40000)
183 printk(KERN_ERR "I-side SLB multiple hit\n");
184 if (srr1 & 0x20000)
185 printk(KERN_ERR "I-cache parity error hit\n");
186
187 /* SRR1[62] is from MSR[62] if recoverable, so pass that back */
188 return !!(srr1 & 0x2);
189}
190
191
150/* 192/*
151 * Called very early, MMU is off, device-tree isn't unflattened 193 * Called very early, MMU is off, device-tree isn't unflattened
152 */ 194 */
@@ -175,4 +217,5 @@ define_machine(pas) {
175 .calibrate_decr = generic_calibrate_decr, 217 .calibrate_decr = generic_calibrate_decr,
176 .check_legacy_ioport = pas_check_legacy_ioport, 218 .check_legacy_ioport = pas_check_legacy_ioport,
177 .progress = pas_progress, 219 .progress = pas_progress,
220 .machine_check_exception = pas_machine_check_handler,
178}; 221};