On Tue, Aug 15, 2017 at 09:32:30AM +0200, Wolfgang Denk wrote: > Dear Tom, > > In message <20170814211300.GM20467@bill-the-cat> you wrote: > > > > But we're talking about CONFIG_STANDALONE_LOAD_ADDR not > > CONFIG_STANDALONE_ENTRY_POINT. What we've been doing in > > arch/arm/config.mk has been on my to fix list for a long time, because > > it's been wrong for so many boards. Setting this to CONFIG_LOADADDR is > > a reasonable default value. > > No, it is not. It is fundamentally broken. If you need a default > for the entry point address, then define one. CONFIG_LOADADDR means > where the image gets loaded to, and almost all image formats have a > header in front of the payuload, so the entry point is somewhere > else. And even if you load raw binary images, there is no guarantee > that the entry point is right at the start of the image, > > Mixing things that are defined for different purposes (loading image > versus start address of the code) is a really bad idea.
What CONFIG_STANDALONE_LOAD_ADDR is, is the location that we want hello_world, or other example stand alone applications loaded into memory at. CONFIG_LOADADDR is the safe default location to load things into memory at in order to run them. At least on ARM, where there's a good number of different default memory layouts, what arch/arm/config.mk does today is broken for the majority of platforms. We should be providing at least a functional default value here, which we are not today. This in no way precludes a 'real' standalone application from linking and running at whatever it wants within a platforms memory map. -- Tom
signature.asc
Description: Digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot