From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] Fix board init code to use a valid C runtime environment
Date: Wed, 11 Nov 2015 09:52:31 +0100 [thread overview]
Message-ID: <20151111095231.30257650@lilith> (raw)
In-Reply-To: <1447180247-29704-1-git-send-email-albert.u.boot@aribaud.net>
On Tue, 10 Nov 2015 19:30:47 +0100, Albert ARIBAUD
<albert.u.boot@aribaud.net> wrote:
> board_init_f_mem() alters the C runtime environment's
> stack it ls actually already using. This is not a valid
> C runtime environment.
>
> Split board_init_f_mem into C functions which do not
> alter their own stack and therefore run in a valid C
> runtime environment.
Additional note: tested with current u-boot/master (commit cad04990) on
an OpenRD-Client board (which builds Thumb-1 code) using gcc 5.2.1 (which
saves and restores r9 in just about any C function, causing
arch_setup_gd to fail setting GD):
- without this patch, the board fails to boot with an undefined
instruction exception.
- with this patch, the board boots and functions normally (at least
dhcp, tftp, go are working as expected).
Amicalement,
--
Albert.
next prev parent reply other threads:[~2015-11-11 8:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 18:30 [U-Boot] [PATCH v2] Fix board init code to use a valid C runtime environment Albert ARIBAUD
2015-11-11 8:52 ` Albert ARIBAUD [this message]
2015-11-12 5:59 ` Thomas Chou
2015-11-12 7:17 ` Albert ARIBAUD
2015-11-12 8:28 ` Thomas Chou
2015-11-12 10:23 ` Albert ARIBAUD
2015-11-13 6:41 ` Albert ARIBAUD
2015-11-13 8:20 ` Thomas Chou
2015-11-13 9:08 ` Bin Meng
2015-11-13 12:22 ` Albert ARIBAUD
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=20151111095231.30257650@lilith \
--to=albert.u.boot@aribaud.net \
--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