All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] gd_t/bd_t on ARM
Date: Sat, 29 Nov 2008 00:19:43 +0100	[thread overview]
Message-ID: <20081128231943.GF14044@buzzloop.caiaq.de> (raw)
In-Reply-To: <3efb10970811281339m17b1d1f5o675e1cc08db817f@mail.gmail.com>

Hi Remy,

On Fri, Nov 28, 2008 at 10:39:49PM +0100, Remy Bohmer wrote:
> > I'm hunting weird behaviours with the gd_t global data pointer on my
> > PXA300 board board. The pointer gets set up fine in lib_arm/boot.c and
> > gd->bd is filled in my board specific code. However, after the tftp
> > download is finished, the content of these structures have been
> > destroyed and overwritten with garbage.
> >
> > I suspect a stack corruption to be the culprit, an overflow or overlap,
> > as it seems to happen randomly, after a while and some function calls.
> > Any hints about that?
> 
> Hook up a JTAG (or preferable an ETM) debugger and start tracing?

I did that for a couple of hours now and got somehow stuck with it.
However, I believe it's not related to my board specific code, so I
wanted to ask whether anyone else had similar trouble with the cutting
edge source tree.

> > Also, I wonder why the pointer to this struct is not placed *after*
> > U-Boot's own code as shown in the patch below. This works fine for me
> > now. Any oppinion on that?
> 
> Aren't you just hiding the symptoms here?
> It seems that there is something really wrong and by moving the global
> structures probably a different memory area is overwritten, but the
> problem should still be there...

Of course. That wasn't meant to be the fix for the other problem, I was
just curious as this other location makes more sense to me and also does
not require CONFIG_SYS_GBL_DATA_SIZE anymore. If I got that right, this
variable has to be set to something at least sizeof(gd_t)+sizeof(bd_t).
Right?

Best regards,
Daniel

      reply	other threads:[~2008-11-28 23:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 21:04 [U-Boot] gd_t/bd_t on ARM Daniel Mack
2008-11-28 21:39 ` Remy Bohmer
2008-11-28 23:19   ` Daniel Mack [this message]

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=20081128231943.GF14044@buzzloop.caiaq.de \
    --to=daniel@caiaq.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 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.