
On Tue, Aug 23, 2016 at 09:57:34AM -0500, Andrew F. Davis wrote:
On 08/23/2016 12:45 AM, Masahiro Yamada wrote:
2016-08-23 0:21 GMT+09:00 Andrew F. Davis afd@ti.com:
Add a new Kconfig CONFIG_SPL_TEXT_BASE. Set its default value to 0x0.
Signed-off-by: Andrew F. Davis afd@ti.com
Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/Kconfig b/Kconfig index cb5af5b..2935c41 100644 --- a/Kconfig +++ b/Kconfig @@ -319,6 +319,14 @@ config SYS_TEXT_BASE help TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture
+config SPL_TEXT_BASE
hex "SPL Text Base"
depends on SPL
default 0x0
help
When SPL is enabled the image is linked with this as the
starting address in memeory for which the SPL will be loaded.
config SPL_LOAD_FIT bool "Enable SPL loading U-Boot as a FIT" depends on FIT
For example, my SoC, configs/uniphier_ld20_defconfig, needs to set CONFIG_SPL_TEXT_BASE to 0x100000 because its Boot ROM loads SPL onto 0x100000.
It is not user-configurable at all, so I do not see much sense for the prompt. I am not quite sure for other SoCs, but I guess similar situation.
But note that it also sets CONFIG_SYS_TEXT_BASE=0x84000000 which isn't really something that should be changed by users.
(If we support relocation for SPL, we can make SPL_TEXT_BASE a configurable parameter, but we do not have it at this point of time.)
Is it better to hide the prompt unless EXPERT is defined?
config SPL_TEXT_BASE hex "SPL Text Base" if EXPERT
I would be okay with this, I only really need this as a Kconfig option so I can easily set it on a per defconfig basis (am335x_evm_{boot_type}_defconfig), as you stated this isn't really for users to change and so should be hidden by default.
I think this shows that we need to think about how to migrate CONFIG_xxx values that do not belong in CONFIG space. What's really true here (yes?) is that for HS devices we must be loaded in a different, but still not really configurable, area. And we don't want to do like we have in the past of using a compatible with all types address[1] as this reduces the available image space and SPL is larger than we would like it to be these days.
I'm not sure if it's better to push this up to the architecture Kconfig file so that in turn we can do a list of default 0x... if SOC so that it's correct by default at least, or just be as good/bad as CONFIG_SYS_TEXT_BASE is for today and follow up with better ideas after the conversion is done for everything.