From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/2] Make sure 85xx bss doesn't start at 0x0
Date: Tue, 06 Oct 2009 16:01:36 +0200 [thread overview]
Message-ID: <20091006140136.E9EE51824EB6@gemini.denx.de> (raw)
In-Reply-To: <1254830475.22896.43.camel@ptyser-laptop>
Dear Peter Tyser,
In message <1254830475.22896.43.camel@ptyser-laptop> you wrote:
>
> > This whole "bss at 0x0" is a myth to me.
>
> Do a readelf on most MPC8548 boards, eg MPC8548CDS. __bss_start is also
> located at 0x0 for these boards, which is the issue this patch attempted
> to address.
I know that this _is_ the case. My questions meant: _why_ is this the
case? My speculkation is that it's just by accident, because the bss
was located just after the instruction allocated for the reset
vector; this being at 0xFFFFFFFC on most 8xxx systems, the address
counter wrapped around on 32 bit tool chains, resulting in 0x0.
> The current U-Boot code is already relocating this bss address higher up
> in SDRAM during relocation, all this patch does is add 0x10 bytes to
> that address. I had assumed the current code was working, but perhaps
> there's a bigger issue...
I don;t think it's an issue. The code seems to work. But I wonder if
we could not simplify all this buy defining an arbitrary, non-zero
address.
> I shied away from this since as the text/data/bss grow at some point the
> bss is going to overlap with the boot page. I think ld would
> intelligently wrap the bss around the boot page, but U-Boot won't be so
> intelligent when the bss is zeroed out:) The bss address range would
> also wrap back around to 0x0. I didn't feel good about zeroing out the
But bss is NOLOAD, and the actual location in the flash is just a
fiction - we never use anything of this but the start address.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
God made the integers; all else is the work of Man. - Kronecker
next prev parent reply other threads:[~2009-10-06 14:01 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-05 23:01 [U-Boot] [PATCH 0/2] Make sure 85xx bss doesn't start at 0x0 Peter Tyser
2009-10-05 23:01 ` [U-Boot] [PATCH 1/2] 85xx: Preprocess link scripts Peter Tyser
2009-10-06 7:28 ` Wolfgang Denk
2009-10-06 11:13 ` Peter Tyser
2009-10-05 23:01 ` [U-Boot] [PATCH 2/2] 85xx: Ensure BSS segment doesn't start at address 0x0 Peter Tyser
2009-10-06 8:54 ` Wolfgang Denk
2009-10-06 12:10 ` Peter Tyser
2009-10-06 7:32 ` [U-Boot] [PATCH 0/2] Make sure 85xx bss doesn't start at 0x0 Wolfgang Denk
2009-10-06 12:01 ` Peter Tyser
2009-10-06 14:01 ` Wolfgang Denk [this message]
2009-10-06 14:07 ` Kumar Gala
2009-10-06 14:24 ` Peter Tyser
2009-10-06 15:22 ` Wolfgang Denk
2009-10-06 15:45 ` Peter Tyser
2009-10-06 17:51 ` Wolfgang Denk
2009-10-06 18:08 ` Peter Tyser
2009-10-06 20:34 ` J. William Campbell
2009-10-06 20:53 ` Peter Tyser
2009-10-06 22:34 ` J. William Campbell
2009-10-06 23:10 ` Peter Tyser
2009-10-06 23:25 ` Wolfgang Denk
2009-10-06 23:43 ` Peter Tyser
2009-10-07 0:09 ` Peter Tyser
2009-10-07 1:24 ` Graeme Russ
2009-10-07 6:55 ` Wolfgang Denk
2009-10-07 9:56 ` Graeme Russ
2009-10-07 10:07 ` Graeme Russ
2009-10-07 10:32 ` Joakim Tjernlund
2009-10-07 14:37 ` J. William Campbell
2009-10-07 6:53 ` Wolfgang Denk
2009-10-07 11:57 ` Peter Tyser
2009-10-07 12:19 ` Wolfgang Denk
2009-10-06 23:07 ` Wolfgang Denk
2009-10-06 23:29 ` Peter Tyser
2009-10-07 6:51 ` Wolfgang Denk
2009-10-06 20:46 ` Kumar Gala
2009-10-06 21:13 ` Peter Tyser
2009-10-06 16:53 ` Stefan Roese
2009-10-06 15:04 ` Wolfgang Denk
2009-10-06 15:20 ` Peter Tyser
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=20091006140136.E9EE51824EB6@gemini.denx.de \
--to=wd@denx.de \
--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