[PATCH] arm: mvebu: Replace hardcoded values 0x0030/0x4030 by proper calculation
Pali Rohár
pali at kernel.org
Wed Jan 12 23:31:23 CET 2022
On Wednesday 12 January 2022 23:27:06 Marek Behún wrote:
> On Wed, 12 Jan 2022 18:32:08 +0100
> Pali Rohár <pali at kernel.org> wrote:
>
> > These hardcoded values were calculated from CONFIG_SPL_TEXT_BASE macro. Now
> > this macro is configurable via Kconfig, so calculate values 0x0030/0x4030
> > at compile time via CONFIG_SPL_TEXT_BASE option. Values 0x0030/0x4030
> > represents offset of CONFIG_SPL_TEXT_BASE from address 0x40000000.
>
> Is there any point in having these configurable? Can the board boot if
> the user changes it? If not, wouldn't it make more sense to convert
> these to macros in soc.h, and changing their names?
With this patch series it is possible to change CONFIG_SPL_TEXT_BASE and
board would be normally bootable. Build system propagates
CONFIG_SPL_TEXT_BASE to kwbimage and kwbimage then set correct load
address.
So user can change CONFIG_SPL_TEXT_BASE also to other value.
> Or does compilation need CONFIG_SPL_TEXT_BASE to link properly?
And yes, compilation needs CONFIG_SPL_TEXT_BASE for proper linking.
Because U-Boot SPL for 32-bit ARM is not position independent.
More information about the U-Boot
mailing list