From ab86f72c354f9b2572340f72b74ca0a258c451bd Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Fri, 17 Sep 2010 13:10:42 +0200 Subject: ARM: implement relocation for ARM926 Change the implementation for arm926 to relocate the code to an arbitrary address in RAM. Adapt the TX25 (i.MX25), magnesium board to test the changes. On the tx25 board TEXT_BASE is set to the final relocation address to prevent one more copying of u-boot code when relocating. More info see: doc/README.arm-relocation da850 board: Tested-by: Ben Gardiner Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher Cc: Ben Gardiner --- doc/README.arm-relocation | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/README.arm-relocation b/doc/README.arm-relocation index 6be1a1292..e3ed60ecd 100644 --- a/doc/README.arm-relocation +++ b/doc/README.arm-relocation @@ -43,6 +43,29 @@ CONFIG_SYS_ARM_WITHOUT_RELOC defined!!! ------------------------------------------------------------------------------------- +For boards which boot from nand_spl, it is possible to save a copy +if TEXT_BASE == relocation address! This prevents that uboot code +is copied again in relocate_code(). + +example for the tx25 board: + +a) cpu starts +b) it copies the first page in nand to internal ram + (nand_spl_code) +c) end executes this code +d) this initialize CPU, RAM, ... and copy itself to RAM + (this bin must fit in one page, so board_init_f() + don;t fit in it ... ) +e) there it copy u-boot to CONFIG_SYS_NAND_U_BOOT_DST and + starts this image @ CONFIG_SYS_NAND_U_BOOT_START +f) u-boot code steps through board_init_f() and calculates + the relocation address and copy itself to it + +If TEXT_BASE == relocation address, the copying of u-boot +in f) could be saved. + +------------------------------------------------------------------------------------- + ToDo: - fill in bd_t infos (check) -- cgit v1.2.3