All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Holler <holler@ahsoftware.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] arm: timer_init() and bss (relocation)
Date: Sat, 22 Jan 2011 08:13:34 +0100	[thread overview]
Message-ID: <4D3A839E.6030109@ahsoftware.de> (raw)
In-Reply-To: <AANLkTikKqXCQpxHZ=91Zk65OiaOM1NneC2NJVk8PW4yN@mail.gmail.com>

Am 22.01.2011 07:38, schrieb John Rigby:
> On Fri, Jan 21, 2011 at 11:07 PM, Alexander Holler<holler@ahsoftware.de>  wrote:
>> Hello,
>>
>> because I still have problems where I think the problem is the
>> relocation, I've had a look at some timer code.
>>
>> E.g. in arch/arm/cpu/arm926ejs/kirkwood/timer.c  on top there is
>>
>> struct kwtmr_registers *kwtmr_regs = (struct kwtmr_registers
>> *)KW_TIMER_BASE;
>>
>> which is used in timer_init().
>>
>> In arch/arm/cpu/armv7/omap-common/timer.c we have
>>
>> static struct gptimer *timer_base = (struct gptimer *)CONFIG_SYS_TIMERBASE;
>>
>> which is used in timer_init() too.
>>
>> (I assume similiar code is used in more files, I've just had a look at
>> those two.)
>>
>> timer_init() is called in board_init_f() through init_sequence, that
>> means before relocation.
>>
>> Did I miss something, or I'm right that this is a problem because those
>> two variables are stored in bss but are accessed before relocation?
>>
> These are both initialized data so they do not go in bss.

Correct, I should have a look into u-boot.map before writing this mail. 
Thanks for the pointer.

But this leads me to the question what happens with the stuff in the 
data section. Seems I should have again a look at the lowlevel stuff to 
understand that.

Thanks,

Alexander

  reply	other threads:[~2011-01-22  7:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-22  6:07 [U-Boot] arm: timer_init() and bss (relocation) Alexander Holler
2011-01-22  6:38 ` John Rigby
2011-01-22  7:13   ` Alexander Holler [this message]
2011-01-22  7:21     ` Reinhard Meyer
2011-01-22  7:40       ` Albert ARIBAUD

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=4D3A839E.6030109@ahsoftware.de \
    --to=holler@ahsoftware.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.