]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
openrisc: fix relocation code
authorFranck Jullien <franck.jullien@gmail.com>
Wed, 21 May 2014 20:43:50 +0000 (22:43 +0200)
committerTom Rini <trini@ti.com>
Thu, 5 Jun 2014 18:44:56 +0000 (14:44 -0400)
commit9cd73bf85994ea06cd2fbde509e73e72d063b332
tree9aff766af8d1d19b3132f3b27e71648451305651
parentc346cf13509c9bfcd98c679a9822bb346432b9b6
openrisc: fix relocation code

The relocation code can now relocate from anywhere to
the RAM.

The old code assumed that the binary was copied to the RAM
by some PBL and then it just relocated the .text section
from the loaded address to the linked address.

Now, it first checks if vectors are somewhere else than the
linked address. If yes, there are copied to address 0 (or
to the exception vector base address if register EVBAR is
present).

Then, the .text section is relocated from its current location
to the RAM.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
arch/openrisc/cpu/start.S