[U-Boot] [RFC] arm926ejs: fix jump to RAM nand_boot
Reinhard Meyer
u-boot at emk-elektronik.de
Tue Nov 2 09:57:34 CET 2010
Dear Heiko Schocher,
> But there is a possibility to prevent one copy, if TEXT_BASE =
> relocation address = CONFIG_SYS_NAND_U_BOOT_DST
>
> In this case nand_spl code copies u-boot from nand to
> CONFIG_SYS_NAND_U_BOOT_DST. As this is equal to the relocation address,
> no need to copy code in relocate_code().
>
> But as codesize changes (and with it relocation address) this
> is not a perfect solution.
Worse: it would certainly crash since the original and relocated memory
areas must not overlap - they sure would with even the slightest size change.
That idea should not be promoted any further.
I would recommend that we add code to check for overlapping relocation into
board.c and print a panic message if an overlap is detected.
Best Regards,
Reinhard
More information about the U-Boot
mailing list