U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot,v2] SPL: tiny-printf: avoid any BSS usage
Date: Sat, 9 Jul 2016 10:50:26 -0400	[thread overview]
Message-ID: <20160709145026.GW25382@bill-the-cat> (raw)
In-Reply-To: <552c49ad-0be1-1bc7-2238-b42af9283902@denx.de>

On Sat, Jul 09, 2016 at 10:22:37AM +0200, Marek Vasut wrote:
> On 07/09/2016 02:28 AM, Tom Rini wrote:
> >On Fri, Jul 08, 2016 at 11:48:12PM +0200, Marek Vasut wrote:
> >>On 07/08/2016 06:50 PM, Tom Rini wrote:
> >>>On Fri, Jul 08, 2016 at 03:18:35PM +0100, Andre Przywara wrote:
> >>>
> >>>>As printf calls may be executed quite early, we should avoid using any
> >>>>BSS stored variables, since some boards put BSS in DRAM, which may not
> >>>>have been initialised yet.
> >>>>Explicitly mark those "static global" variables as belonging to the
> >>>>.data section, to keep tiny-printf clear of any BSS usage.
> >>>>
> >>>>Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >>>
> >>>Applied to u-boot/master, thanks!
> >>>
> >>Mind you, __section(".data") would be enough, no need to spell the
> >>whole attribute.
> >
> >True, but that's a helper that's not really utilized today.
> >
> That's something that should likely be changed, as it allows to
> seamlessly deal with compiler quirks (if some were to ever pop up in
> this area).

Patches welcome for the next release ;)

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160709/08357d10/attachment.sig>

  reply	other threads:[~2016-07-09 14:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 14:18 [U-Boot] [PATCH v2] SPL: tiny-printf: avoid any BSS usage Andre Przywara
2016-07-08 16:50 ` [U-Boot] [U-Boot,v2] " Tom Rini
2016-07-08 21:48   ` Marek Vasut
2016-07-09  0:28     ` Tom Rini
2016-07-09  8:22       ` Marek Vasut
2016-07-09 14:50         ` Tom Rini [this message]
2016-07-09 14:38 ` [U-Boot] [PATCH v2] " Simon Glass
2016-07-09 15:16   ` Marek Vasut
2016-07-09 17:27   ` André Przywara
2016-08-06  0:11     ` Simon Glass

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=20160709145026.GW25382@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