From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v7, 2/2] arm: move gd handling outside of C code
Date: Thu, 14 Jan 2016 08:20:44 -0500 [thread overview]
Message-ID: <20160114132044.GE3359@bill-the-cat> (raw)
In-Reply-To: <1448470593-23998-2-git-send-email-albert.u.boot@aribaud.net>
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 <albert.u.boot@aribaud.net>
> Reviewed-by: Simon Glass <sjg@chromium.org>
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: <http://lists.denx.de/pipermail/u-boot/attachments/20160114/32fb17e2/attachment.sig>
next prev parent reply other threads:[~2016-01-14 13:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 16:56 [U-Boot] [PATCH v7 1/2] Fix board init code to respect the C runtime environment Albert ARIBAUD
2015-11-25 16:56 ` [U-Boot] [PATCH v7 2/2] arm: move gd handling outside of C code Albert ARIBAUD
2015-11-27 2:51 ` Simon Glass
2016-01-14 13:20 ` Tom Rini [this message]
2016-01-14 18:35 ` [U-Boot] [U-Boot, v7, " Stephen Warren
2016-01-14 19:11 ` Tom Rini
2016-01-14 19:27 ` Stephen Warren
2016-01-14 19:45 ` Tom Rini
2016-01-14 20:48 ` Stephen Warren
2015-11-27 2:51 ` [U-Boot] [PATCH v7 1/2] Fix board init code to respect the C runtime environment Simon Glass
2015-11-29 6:13 ` Thomas Chou
2016-01-14 13:20 ` [U-Boot] [U-Boot, v7, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160114132044.GE3359@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox