summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>2014-09-03 23:32:33 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-09-11 18:04:34 +0200
commit58f9e1ae6391a1fbb7ca024ae45e288aabb88807 (patch)
tree2bf901b5312f6c63977adc91d59ed83dc6b60ead
parent5bfdcebf73f843b4a0968e87cff9ad6546358c8d (diff)
downloadu-boot-imx-58f9e1ae6391a1fbb7ca024ae45e288aabb88807.zip
u-boot-imx-58f9e1ae6391a1fbb7ca024ae45e288aabb88807.tar.gz
u-boot-imx-58f9e1ae6391a1fbb7ca024ae45e288aabb88807.tar.bz2
arm: Make reset position-independent
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> Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
-rw-r--r--arch/arm/lib/vectors.S3
1 files changed, 1 insertions, 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