Skip to contentSkip to conversation

arm: Do not clear LR on exception in SPL

PATCH In review Andrew F. Davis 2 participants 2 messages Jun 11, 2018 – Jun 19, 2018 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: Do not clear LR on exception in SPL

When an exception or interrupt occurs the link register (LR) may contain the source of the exception, although we do not print the value it may still be extracted with a debugger. When in SPL we loop on getting and exception, but use a linking branch, which over-writes the LR value, use a regular branch instruction here.

---
 arch/arm/lib/vectors.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/vectors.S +1 -1
index 79afc27e84..d629cb1dc2 100644
@@ -133,7 +133,7 @@ not_used:
 irq:
 fiq:
 1:
-	bl	1b			/* hang and never return */
+	b	1b			/* hang and never return */
 
 #else	/* !CONFIG_SPL_BUILD */
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 7 lines · Andrew F. Davis

When an exception or interrupt occurs the link register (LR) may contain the source of the exception, although we do not print the value it may still be extracted with a debugger. When in SPL we loop on getting and exception, but use a linking branch, which over-writes the LR value, use a regular branch instruction here.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180619/00d837ad/attachment.sig>