From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 14 Jan 2016 08:20:44 -0500 Subject: [U-Boot] [U-Boot, v7, 2/2] arm: move gd handling outside of C code In-Reply-To: <1448470593-23998-2-git-send-email-albert.u.boot@aribaud.net> References: <1448470593-23998-2-git-send-email-albert.u.boot@aribaud.net> Message-ID: <20160114132044.GE3359@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 Wed, Nov 25, 2015 at 05:56:33PM +0100, Albert ARIBAUD wrote: > As of gcc 5.2.1 for Thumb-1, it is not possible any > more to assign gd from C code, as gd is mapped to r9, > and r9 may now be saved in the prolog sequence, and > restored in the epilog sequence, of any C functions. > > Therefore arch_setup_gd(), which is supposed to set > r9, may actually have no effect, causing U-Boot to > use a bad address to access GD. > > Fix this by never calling arch_setup_gd() for ARM, > and instead setting r9 in arch/arm/lib/crt0.S, to > the value returned by board_init_f_alloc_reserve(). > > Signed-off-by: Albert ARIBAUD > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: