[U-Boot] [PATCH 2/9] MIPS: fix ROM exception vectors

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Sun Sep 25 20:05:25 CEST 2016


When booting from ROM, early exceptions can't be handled
properly. Instead of busy-looping give the developer the
possibilty to examine the situation. Thus issue a SDBBP
instruction to transfer control to hardware debugger if one
is attached.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
---

 arch/mips/cpu/start.S | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
index 108d2df..6886036 100644
--- a/arch/mips/cpu/start.S
+++ b/arch/mips/cpu/start.S
@@ -79,30 +79,30 @@ ENTRY(_start)
 #endif
 
 #if defined(CONFIG_ROM_EXCEPTION_VECTORS)
+	/*
+	 * Exception vector entry points. When running from ROM, an exception
+	 * cannot be handled. Halt execution and transfer control to debugger,
+	 * if one is attached.
+	 */
 	.org 0x200
 	/* TLB refill, 32 bit task */
-1:	b	1b
-	 nop
+	sdbbp
 
 	.org 0x280
 	/* XTLB refill, 64 bit task */
-1:	b	1b
-	 nop
+	sdbbp
 
 	.org 0x300
 	/* Cache error exception */
-1:	b	1b
-	 nop
+	sdbbp
 
 	.org 0x380
 	/* General exception */
-1:	b	1b
-	 nop
+	sdbbp
 
 	.org 0x400
 	/* Catch interrupt exceptions */
-1:	b	1b
-	 nop
+	sdbbp
 
 	.org 0x480
 	/* EJTAG debug exception */
@@ -222,6 +222,7 @@ reset:
 
 	move	a0, zero		# a0 <-- boot_flags = 0
 	PTR_LA	t9, board_init_f
+
 	jr	t9
 	 move	ra, zero
 
-- 
2.9.3



More information about the U-Boot mailing list