From: "Benoît Thébaudeau" <benoit.thebaudeau.dev@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] arm: Make reset position-independent
Date: Wed, 3 Sep 2014 23:32:33 +0200 [thread overview]
Message-ID: <1409779954-14542-1-git-send-email-benoit.thebaudeau.dev@gmail.com> (raw)
Some boards, like mx31pdk and tx25, require the beginning of the SPL
code to be position-independent. For these two boards, this is because
they use the i.MX external NAND boot, which starts by executing the
first NAND Flash page from the NFC page buffer. The SPL then needs to
copy itself to its actual link address in order to free the NFC page
buffer and use it to load the non-SPL image from Flash before running
it. This means that the SPL runtime address differs from its link
address between the reset and the initial copy performed by
board_init_f(), so this part of the SPL binary must be
position-independent.
This requirement was broken by commit 41623c9 'arm: move exception
handling out of start.S files', which used an absolute address to branch
to the reset routine. This new commit restores the original behavior,
which just performed a relative branch. This fixes the boot of mx31pdk
and tx25.
Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau.dev@gmail.com>
Reported-by: Helmut Raiger <helmut.raiger@hale.at>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: John Rigby <jcrigby@gmail.com>
---
arch/arm/lib/vectors.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index 493f337..843b18f 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -50,7 +50,7 @@
#endif
_start:
- ldr pc, _reset
+ b reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
@@ -77,7 +77,6 @@ _start:
.globl _irq
.globl _fiq
-_reset: .word reset
_undefined_instruction: .word undefined_instruction
_software_interrupt: .word software_interrupt
_prefetch_abort: .word prefetch_abort
--
1.7.10.4
next reply other threads:[~2014-09-03 21:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 21:32 Benoît Thébaudeau [this message]
2014-09-03 21:32 ` [U-Boot] [PATCH 2/2] arm: Fix _start for CONFIG_SYS_DV_NOR_BOOT_CFG Benoît Thébaudeau
2014-09-12 5:52 ` Albert ARIBAUD
2014-09-03 21:52 ` [U-Boot] [PATCH 1/2] arm: Make reset position-independent Benoît Thébaudeau
2014-09-03 21:55 ` Benoît Thébaudeau
2014-09-05 18:41 ` Magnus Lilja
2014-09-09 20:24 ` Fabio Estevam
2014-09-12 5:51 ` Albert ARIBAUD
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=1409779954-14542-1-git-send-email-benoit.thebaudeau.dev@gmail.com \
--to=benoit.thebaudeau.dev@gmail.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