public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter Tyser <ptyser@xes-inc.com>
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 18:29:01 -0500	[thread overview]
Message-ID: <1254871741.24664.3117.camel@localhost.localdomain> (raw)
In-Reply-To: <20091006230722.DC763E84EB5@gemini.denx.de>

On Wed, 2009-10-07 at 01:07 +0200, Wolfgang Denk wrote:
> Dear Peter Tyser,
> 
> In message <1254862383.24664.2742.camel@localhost.localdomain> you wrote:
> >
> > What's the advantage of having the bss not be located next to U-Boot?
> 
> One advantage is that we might chose the same address for all boards,
> and eventually for all Power processor families.

We could achieve this wherever we end up putting the bss.  eg if people
think putting the bss right after the u-boot image is best, we can
update the 44x linker script, etc to do the same thing.  I think this
discussion is applicable to most any PPC board.

> One disadvantage is that we need to relocate it separately, or we will
> have a gap in the RAm memory map which is IMO not acceptable.

What does "relocating the bss separately" entail?

> > The big disadvantage of picking an arbitrary address for the bss is that
> > there's now 1 more magical section of SDRAM that the user needs to know
> > shouldn't be used.  I already field enough question from people that
> 
> Why should it not be used?  You seem to be pretty fixed on that idea,
> which is wrong. No code will ever be written to RAM at list location.

When I say user, I'm refering to an end user, eg a customer.  Not a
developer.

For arguments sake, lets say we developers put the bss at a "fixed
(random, non-zero) address" of 0x80000.  A user tftps an image to
0x80000 and suddenly their board starts acting up.

> In the current setup, we don't write any code to RAM at 0x0 either.

Right, and this limitation causes headaches.  I personally get lots of
questions from customers about why their board hangs when they tftp an
image to 0x0.  In a perfect world we'd only have 1 reserved section of
memory which contained the interrupt vectors, text, bss, malloc, stack,
etc.



> > corrupt their exception vectors or stack/malloc pool/u-boot code, I
> > don't want to add more bss questions:)

Its crappy to have 2 sections of memory that a user has to know not to
touch, I don't want to have 3:)

Maybe I'm not understanding your suggestion "to chose a fixed (random,
non-zero) address" for the bss.  That implies to me we choose an address
low memory (eg 0x10000) and put the bss there.  I think it'd be more
plausible for someone to blow this away accidentally than high memory by
U-Boot, and you also couldn't use any data stored in the bss after you
blow it away, eg right before jumping to a linux kernel.

Best,
Peter

  reply	other threads:[~2009-10-06 23:29 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
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 [this message]
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=1254871741.24664.3117.camel@localhost.localdomain \
    --to=ptyser@xes-inc.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