From: Mans Rullgard <mans@mansr.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] ARM: arm926ejs: fix lowlevel_init call
Date: Sat, 21 Apr 2018 16:11:07 +0100 [thread overview]
Message-ID: <20180421151110.20423-2-mans@mansr.com> (raw)
In-Reply-To: <20180421151110.20423-1-mans@mansr.com>
The code attempts to preserve the value of LR by storing it in R12/IP
across the lowevel_init() call. However, this register is not saved
by the callee. Use a register that guaranteed to be preserved instead.
Signed-off-by: Mans Rullgard <mans@mansr.com>
---
arch/arm/cpu/arm926ejs/start.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 959d1ed86d8a..a6f0bdb70345 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -105,9 +105,9 @@ flush_dcache:
/*
* Go setup Memory and board specific bits prior to relocation.
*/
- mov ip, lr /* perserve link reg across call */
+ mov r4, lr /* perserve link reg across call */
bl lowlevel_init /* go setup pll,mux,memory */
- mov lr, ip /* restore link */
+ mov lr, r4 /* restore link */
#endif
mov pc, lr /* back to my caller */
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
--
2.17.0
next prev parent reply other threads:[~2018-04-21 15:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-21 15:11 [U-Boot] [PATCH 1/5] ARM: mxs: make lowlevel_init() weak Mans Rullgard
2018-04-21 15:11 ` Mans Rullgard [this message]
2018-04-27 8:59 ` [U-Boot] [PATCH 2/5] ARM: arm926ejs: fix lowlevel_init call Stefano Babic
2018-05-07 8:25 ` Chris Packham
2018-05-07 8:48 ` klaus.goger at theobroma-systems.com
2018-05-07 21:10 ` Chris Packham
2018-05-07 10:11 ` Måns Rullgård
2018-05-07 21:08 ` Chris Packham
2018-04-21 15:11 ` [U-Boot] [PATCH 3/5] ARM: spl: include arm/thumb glue sections Mans Rullgard
2018-04-27 8:59 ` Stefano Babic
2018-04-21 15:11 ` [U-Boot] [PATCH 4/5] ARM: mxs: move spl data Mans Rullgard
2018-04-27 8:59 ` Stefano Babic
2018-04-21 15:11 ` [U-Boot] [PATCH 5/5] ARM: mxs: support full SPL framework Mans Rullgard
2018-04-27 9:00 ` Stefano Babic
2018-04-27 8:59 ` [U-Boot] [PATCH 1/5] ARM: mxs: make lowlevel_init() weak Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180421151110.20423-2-mans@mansr.com \
--to=mans@mansr.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox