[U-Boot] [PATCH] MIPS: use CONFIG_SYS_TEXT_BASE in relocation calculations

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Mon Nov 11 20:15:49 CET 2013


2013/11/11 Gabor Juhos <juhosg at openwrt.org>:
> The relocation code uses the CONFIG_SYS_MONITOR_BASE
> constant for calculating the reserved memory size and
> relocation offset values. Along with these predefined
> values the code also uses several other constants which
> are computed by the linker from the CONFIG_SYS_TEXT_BASE
> value. Due to this, the relocation code works incorreclty
> if the CONFIG_SYS_TEXT_BASE and CONFIG_SYS_MONITOR_BASE
> values are different.
>
> Change the relocation code to use the CONFIG_SYS_TEXT_BASE
> constant in the calculations to avoid the problem.
>
> Only tested in qemu with the 'malta' and 'qemu_mips{,el}'
> targets.
>
> Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
> Cc: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
> Cc: Paul Burton <paul.burton at imgtec.com>
> ---
> Daniel,
>
> This should be merged before my 'malta: use unmapped flash base address'
> patch.
>
> Thanks,
> Gabor

thanks, I'll test it on real hardware.

-- 
- Daniel


More information about the U-Boot mailing list