aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common
diff options
context:
space:
mode:
authorRobin Getz <robin.getz@analog.com>2009-07-07 16:17:09 -0400
committerMike Frysinger <vapier@gentoo.org>2009-09-16 21:31:44 -0400
commit837ec2d56c41640d1f1238e52c350b2a516d29ba (patch)
tree1732468388385c411853c67cb2b288c2f8d17cc7 /arch/blackfin/mach-common
parent3f871feaf3390c6d6e578818f867917c2e4738a2 (diff)
Blackfin: catch hardware errors earlier during booting
Allow hardware errors to be caught during early portions of booting, and leave something in the shadow console that people can use to debug their system with (to be printed out by the bootloader on next reset). This enables the hardare error interrupts in head.S, allowing us to find hardware errors when they happen (well, as much as you can with a hardware error) and prints out the trace if it is enabled. This will catch errors (like booting the wrong image on a 533) which previously resulted in a infinite loop/hang, as well as random hardware errors before before setup_arch(). To disable this debug only feature - turn off EARLY_PRINTK. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r--arch/blackfin/mach-common/head.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S
index f826f6b9f917..66910121fa6f 100644
--- a/arch/blackfin/mach-common/head.S
+++ b/arch/blackfin/mach-common/head.S
@@ -153,6 +153,8 @@ ENTRY(__start)
153 153
154#ifdef CONFIG_EARLY_PRINTK 154#ifdef CONFIG_EARLY_PRINTK
155 call _init_early_exception_vectors; 155 call _init_early_exception_vectors;
156 r0 = (EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
157 sti r0;
156#endif 158#endif
157 159
158 r0 = 0 (x); 160 r0 = 0 (x);
@@ -212,12 +214,21 @@ ENTRY(__start)
212 [p0] = p1; 214 [p0] = p1;
213 csync; 215 csync;
214 216
217#ifdef CONFIG_EARLY_PRINTK
218 r0 = (EVT_IVG15 | EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU) (z);
219#else
215 r0 = EVT_IVG15 (z); 220 r0 = EVT_IVG15 (z);
221#endif
216 sti r0; 222 sti r0;
217 223
218 raise 15; 224 raise 15;
225#ifdef CONFIG_EARLY_PRINTK
226 p0.l = _early_trap;
227 p0.h = _early_trap;
228#else
219 p0.l = .LWAIT_HERE; 229 p0.l = .LWAIT_HERE;
220 p0.h = .LWAIT_HERE; 230 p0.h = .LWAIT_HERE;
231#endif
221 reti = p0; 232 reti = p0;
222#if ANOMALY_05000281 233#if ANOMALY_05000281
223 nop; nop; nop; 234 nop; nop; nop;