From: Tom Rini Date: Tue, 15 Aug 2017 07:39:52 -0400 Subject: [U-Boot] [PATCH 1/2] arm: use $loadaddr as the standalone entry point In-Reply-To: <20170815073231.052D3120219@gemini.denx.de> References: <20170812090346.7887-1-max.krummenacher@toradex.com> <20170812182951.D4D52120203@gemini.denx.de> <1502572898.17070.11.camel@gmail.com> <20170814193635.82A43120217@gemini.denx.de> <20170814211300.GM20467@bill-the-cat> <20170815073231.052D3120219@gemini.denx.de> Message-ID: <20170815113952.GE20467@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: