public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Corey Ashford <cjashfor@linux.vnet.ibm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-boot's stack space on a Sequoia board
Date: Fri, 14 Sep 2012 17:32:53 -0700	[thread overview]
Message-ID: <5053CCB5.3070606@linux.vnet.ibm.com> (raw)
In-Reply-To: <5053AF57.1010406@imap.linux.ibm.com>

Hello,

I recently spent quite a lot of time finding a problem where U-boot was
overwriting part of its stack onto my kernel that I had downloaded via
tftpboot.

The board I am using is a Sequoia, powerpc 440EPx board running U-boot
1.2.0-gc0c292b2 (Jun 5 2007 - 07:16:12).

I found that when I booted my Linux kernel, part of its text space was
corrupted upon entry.  I traced this back to U-boot writing a command
line and board info record into its own stack space (- 2048 bytes).
This happens in common/cmd_bootm.c

What surprised me was that this board (fairly old now) has 256M of
memory, but U-boot's stack pointer was around the 8MB point (the pointer
to the board info record passed into my kernel is address 0x007ffe70 --
just under 8M).

So I have a couple of questions:

1) Any idea why the stack pointer would be so low in memory?
2) Is there any way to tell, once the board is up and running U-boot,
where its stack space is so that I can be sure to avoid running into it?

The U-boot that is running on this board wasn't compiled with DEBUG enabled.

Thanks for your consideration,

- Corey

       reply	other threads:[~2012-09-15  0:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5053AF57.1010406@imap.linux.ibm.com>
2012-09-15  0:32 ` Corey Ashford [this message]
2012-09-15  8:27   ` [U-Boot] U-boot's stack space on a Sequoia board Wolfgang Denk
2012-09-17 17:24     ` Corey Ashford
2012-09-17 18:40       ` Wolfgang Denk

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=5053CCB5.3070606@linux.vnet.ibm.com \
    --to=cjashfor@linux.vnet.ibm.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