From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] printf and R9 in ARM architecture
Date: Tue, 20 Jan 2015 10:37:38 +0100 [thread overview]
Message-ID: <20150120103738.20a03f89@lilith> (raw)
In-Reply-To: <CAG3POBk3kjcqcE5-HF7xwFJfufrCnbvPuhLs9A=kiYC0SyEddA@mail.gmail.com>
Hello Dashi Cao,
On Tue, 20 Jan 2015 14:12:35 +0800, Da Shi Cao <dscao999@gmail.com>
wrote:
> In standalone applications, it seems that the execution of printf
> function in U-Boot is dependent on the value of register R9, which is
> setup in app_startup. But r9 can be used by your program at the
> decision of gcc compilation which is not aware of this dependence.
> This is especially the case if +O2 is used!
U-Boot follows the ARM EABI, in which ""The role of register r9 is
platform specific". In U-Boot r9 is specifically used for the global
data structure, and the standalone programs must follow this EABI.
If your standalone program is built with the same options as U-Boot
example standalone programs are (see hellow_world), then it should
have gcc option -ffixed-r9 which will prevent the compiler from ever
touching r9.
How exactly do you build your standalone application?
> My version is U-Boot 2014.10
>
> Regards,
> Dashi Cao
Amicalement,
--
Albert.
next prev parent reply other threads:[~2015-01-20 9:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 6:12 [U-Boot] printf and R9 in ARM architecture Da Shi Cao
2015-01-20 9:37 ` Albert ARIBAUD [this message]
2015-01-20 11:34 ` Da Shi Cao
2015-01-20 12:20 ` Albert ARIBAUD
2015-01-20 10:56 ` Marek Vasut
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=20150120103738.20a03f89@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.