]> code.ossystems Code Review - bsp/u-boot.git/commit
arm: Make reset position-independent
authorBenoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Wed, 3 Sep 2014 21:32:33 +0000 (23:32 +0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Mon, 22 Sep 2014 13:24:20 +0000 (10:24 -0300)
commitbbc071233cb10c4ff9dbaa4fd1c90e18237b040e
tree85a757ae2c39df156ba778d3942f108e3a8d11b9
parent53cd36bae2a9805c945ba290c9af10a090ccd8cf
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>
arch/arm/lib/vectors.S