All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher Harvey <chris@basementcode.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] newbie questions regarding some config options.
Date: Mon, 13 Jun 2011 09:12:39 -0500	[thread overview]
Message-ID: <900370e88f15c7517c5e2bb29f0a1408@basementcode.com> (raw)
In-Reply-To: <OF0DAC137B.B5EC37B0-ONC12578AE.004D7395-802578AE.004D9320@eu.necel.com>

 On Mon, 13 Jun 2011 15:08:35 +0100, PHIL.EDWORTHY at renesas.com wrote:
> Hi Matthias,
>
>> >> What is the CONFIG_SYS_TEXT_BASE variable and how can
>> >>  I figure out what it should be?
>> >
>> > U-boot is typically stored in flash and one of the first things it 
>> does when executed is relocate to ram. CONFIG_SYS_TEXT_BASE is
>> > the relocation
>> > address. Typically, u-boot global data, heap and then stack is 
>> stored just below this.
>>
>> On ARM, CONFIG_SYS_TEXT_BASE is typically the base address of the 
>> image
>> in flash. This is, on a system booting from NOR, the address of the
>> first instruction which is fetched from the CPU.
>>
>> > Since u-boot is used to load some other program like the kernel, 
>> you need the u-boot relocation address to be out of the way of this. 
>> So, for the
>> > boards I have seen (not arm), CONFIG_SYS_TEXT_BASE is set to the 
>> top of ram - 256KB, i.e. enough room for the u-boot image.
>>
>> The relocation address is dynamically calculated from a couple of
>> (runtime) information and has nothing to do with 
>> CONFIG_SYS_TEXT_BASE.
>> This is true for ARM and AFAIK for PPC.
>
> Thanks for the additional info - SH is a little different then!
>
> Phil

 Thanks for the information. Since CONFIG_SYS_TEXT_BASE seems to be a 
 critical value and isn't something that can be ignored, maybe it 
 deserves an entry in the already helpful README. I'd write it myself but 
 I'm not qualified.

 -Chris

  reply	other threads:[~2011-06-13 14:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 12:31 [U-Boot] newbie questions regarding some config options Christopher Harvey
2011-06-13 13:09 ` PHIL.EDWORTHY at renesas.com
2011-06-13 13:59   ` Matthias Weisser
2011-06-13 14:08     ` PHIL.EDWORTHY at renesas.com
2011-06-13 14:12       ` Christopher Harvey [this message]
2011-06-13 16:00         ` Wolfgang Denk
2011-06-13 15:59       ` Wolfgang Denk
2011-06-13 15:58   ` Wolfgang Denk
2014-08-22  3:49     ` Chris

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=900370e88f15c7517c5e2bb29f0a1408@basementcode.com \
    --to=chris@basementcode.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 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.