public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V4 1/2] arm926ejs: fix linker file for newer ld	support
Date: Wed, 10 Nov 2010 13:31:18 +0100	[thread overview]
Message-ID: <4CDA9096.2080505@schmid-telecom.ch> (raw)
In-Reply-To: <4CD99755.7000103@free.fr>

Hi Albert,

On 09.11.2010 19:47, Albert ARIBAUD wrote:
> Le 09/11/2010 19:24, Daniel Hobi a ?crit :
>> Thank you. This patch is required to get Kirkwood-based boards working
>> again when using the CodeSourcery 2009q3 toolchain.
> 
> (can't find the 2010q3 Lite toolchain on CodeSourcery's site, latest is 
> 2010q1 apparently... Can you tell me which gcc and which ld version is 
> used in 2010q3?)

Andreas is correct: I'm still using Sourcery G++ Lite 2009q3-67.

> I think this V4 of my patchset could be now committed to 
> u-boot-arm/master, and if possible even on u-boot-arm for the december 
> release of u-boot, as it is a bugfix.

Since all ARM boards are broken when using a recent toolchain, the patch
should go in as fast as possible.

>> But shouldn't this change be applied to all ARM linker scripts, ie
>> arch/arm/cpu/*/u-boot.lds?
> 
> Yes, it should. :)

Can you please provide such a patch?

>> And on many ARM platforms (including Kirkwood), the timer implementation
>> is still accessing BSS variables before relocation.
>>
>> Is someone working on this? Candidates are:
>>
>> $ git grep "static ulong timestamp"
>> arch/arm/cpu/arm1136/mx31/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm1136/omap24xx/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm1176/tnetv107x/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm720t/interrupts.c:static ulong timestamp;
>> arch/arm/cpu/arm920t/a320/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm920t/at91rm9200/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm920t/s3c24x0/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm926ejs/davinci/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm926ejs/kirkwood/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm926ejs/mx25/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm926ejs/mx27/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm926ejs/omap/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm926ejs/orion5x/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm926ejs/spear/timer.c:static ulong timestamp;
>> arch/arm/cpu/arm926ejs/versatile/timer.c:static ulong timestamp;
>> arch/arm/cpu/armv7/mx5/timer.c:static ulong timestamp;
>> arch/arm/cpu/armv7/omap-common/timer.c:static ulong timestamp;
>> arch/arm/cpu/lh7a40x/timer.c:static ulong timestamp;
>> arch/arm/cpu/s3c44b0/timer.c:static ulong timestamp;
> 
> Normally, the board maintainers should handle this during the window 
> after next version... Dunno if that is practical, but OTOH it would 
> easily show which boards are still maintained and which are not. :)

Since accessing BSS variables before relocation is a severe bug, we
should handle this now for all SoCs. But right now, there are two
approaches:

 - Perform initialization of static variables after relocation, and
   thus forbid using functions which access such variables before
   relocation (reset_timer*, get_timer*, set_timer).

   You patched arch/arm/cpu/arm926ejs/orion5x/timer.c to use this
   approach.

 - Move static variables to struct global_data, so they can be used
   before relocation. Used by AT91 timers and proposed for A320 and
   S3C64xx in:

   http://article.gmane.org/gmane.comp.boot-loaders.u-boot/88095
   http://article.gmane.org/gmane.comp.boot-loaders.u-boot/88160

I hope we can solve this problem in the same way for all ARM timers. And
if we use the second approach, we probably can generalize the AT91 data
in struct global_data as proposed by Andreas.

Best regards,
Daniel

  parent reply	other threads:[~2010-11-10 12:31 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04 22:22 [U-Boot] [PATCH V4 1/2] arm926ejs: fix linker file for newer ld support Albert Aribaud
2010-11-04 22:22 ` [U-Boot] [PATCH V4 2/2] tx25: " Albert Aribaud
2010-11-04 22:27 ` [U-Boot] [PATCH V4 1/2] arm926ejs: " Albert ARIBAUD
2010-11-09 13:49   ` Albert ARIBAUD
2010-11-05  8:38 ` Reinhard Meyer
2010-11-05  9:04   ` Albert ARIBAUD
2010-11-09 18:24 ` Daniel Hobi
2010-11-09 18:47   ` Albert ARIBAUD
2010-11-09 18:55     ` Albert ARIBAUD
2010-11-09 19:30     ` Andreas Bießmann
2010-11-10 12:31     ` Daniel Hobi [this message]
2010-11-10 12:48       ` Albert ARIBAUD
2010-11-10 13:24         ` Daniel Hobi
2010-11-11  8:11           ` Albert ARIBAUD
2010-11-14 21:22             ` Wolfgang Denk
2010-11-15 11:01               ` Albert ARIBAUD
2010-11-15 11:09                 ` Andreas Bießmann
2010-11-15 11:43                   ` Sebastien Carlier
2010-11-16  7:38                     ` Andreas Bießmann
2010-11-15 11:13                 ` Wolfgang Denk
2010-11-15 11:49                   ` Albert ARIBAUD
2010-11-15 11:55                     ` Loïc Minier
2010-11-15 12:03                       ` Wolfgang Denk
2010-11-15 14:06                         ` Loïc Minier
2010-11-15 14:29                           ` Albert ARIBAUD
2010-11-15 15:09                             ` Loïc Minier
2010-11-16 13:42                               ` Peter Maydell
2010-11-16 13:54                                 ` [U-Boot] qemu-arm (was: [PATCH V4 1/2] arm926ejs: fix linker file for newer ld support) Albert ARIBAUD
2010-11-16 14:49                                   ` Peter Maydell
2010-11-16 16:02                                     ` [U-Boot] qemu-arm Albert ARIBAUD
2010-11-15 12:00                     ` [U-Boot] [PATCH V4 1/2] arm926ejs: fix linker file for newer ld support Reinhard Meyer
2010-11-15 12:02                     ` Wolfgang Denk
2010-11-15 12:13                       ` Albert ARIBAUD
2010-11-15 12:16                     ` Bas Mevissen
2010-11-10 13:02       ` [U-Boot] Timer Statics (was: arm926ejs: fix linker file for newer ld support) Reinhard Meyer
2010-11-09 19:27   ` [U-Boot] [PATCH V4 1/2] arm926ejs: fix linker file for newer ld support Andreas Bießmann
2010-11-09 19:31     ` Albert ARIBAUD
2010-11-09 23:43 ` Eric Cooper
2010-11-10  7:53   ` Albert ARIBAUD
2010-11-10 14:20     ` Eric Cooper
2010-11-11  7:33       ` Albert ARIBAUD
2010-11-15 14:15   ` Daniel Hobi
2010-11-15 14:37     ` Albert ARIBAUD
2010-11-15 19:14     ` Eric Cooper

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=4CDA9096.2080505@schmid-telecom.ch \
    --to=daniel.hobi@schmid-telecom.ch \
    --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