public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Holler <holler@ahsoftware.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Most ARM CPU's have buggy clear_bss?
Date: Fri, 29 Oct 2010 15:50:56 +0200	[thread overview]
Message-ID: <4CCAD140.8050207@ahsoftware.de> (raw)
In-Reply-To: <4CCACE26.8060104@free.fr>

Am 29.10.2010 15:37, schrieb Albert ARIBAUD:
> Le 29/10/2010 14:31, Alexander Holler a ?crit :
>
>>> Hmm... What do you mean by "a non relocated BSS ins't cleared" ? AFAICT,
>>> the start.S code clears the relocated BSS. Are we in a case where you
>>> prevent part of the relocation process, such as by using
>>> CONFIG_SKIP_RELOCATE_UBOOT?
>>
>> The (wrong, not relocated) location of nand_chip (building without
>> -fPIC) is inside the BSS before relocation through sta?t.S. This part of
>> RAM will not be cleared because it shouldn't be used.
>
> Er... nand_chip is declared as static global uninitialized, which makes
> it normal that it goes to BSS, and also normal that it has no fixups
> applied, as relocation happens before BSS can be accessed, that is, at a
> time where BSS is still completely uninitialized. Relocations to BSS
> just don't make sense, they're done only to constant code (.text and
> .data) emitted by the compiler/linker.
>
> So if you call nand_init to fill nand_chip before relocation, don't
> expect it to be fixed up during relocation and useable after. That
> simply is not possible.

nand_init() is called inside board.c after relocation. But the 
relocation does not change the address of that nand_chip. At least this 
is what that printf("nand_chip: %p\n", &nand_chip[0]); inside 
nand_init() tells me.

>
>>> Providing the location on the Net of the toolchains will be enough,
>>> (along with which version of nand.c you're using if that matters).
>>
>> I'm using Gentoo where it's easy to swith the compiler (on a DockStar ~
>> Sheevaplug = Kirkwood Feroceon 88FR131) to compile the current HEAD of
>> the master
>
> I'm sure it is, but it does not tell me where I can get these toolchains
> and test them :) (except for the ELDK one which I use routinely).

I assume it's not possible. Gentoo is compiled from source. A minimal 
root containing binaries for binutils and gcc (4.4.x currently I think) 
is available at

http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3/

Therefore my offer to supply generated nand.s.

Regards,

Alexander

  reply	other threads:[~2010-10-29 13:50 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27  7:26 [U-Boot] Most ARM CPU's have buggy clear_bss? Darius Augulis
2010-10-27  8:01 ` Sughosh Ganu
2010-10-27  8:22   ` Darius Augulis
2010-10-27  8:54     ` Sughosh Ganu
2010-10-27  8:58       ` Darius Augulis
2010-10-27  9:09         ` Sughosh Ganu
2010-10-27 10:10           ` Darius Augulis
2010-10-27 10:40             ` Wolfgang Denk
2010-10-27 10:59               ` Darius Augulis
2010-10-27 11:41                 ` Wolfgang Denk
2010-10-27 15:12 ` Eric Cooper
2010-10-27 18:11   ` Darius Augulis
2010-10-28  5:50     ` Heiko Schocher
2010-10-28  6:09       ` Reinhard Meyer
2010-10-28  6:17         ` Heiko Schocher
2010-10-28  6:20           ` Reinhard Meyer
2010-10-28  6:23             ` Reinhard Meyer
2010-10-28  6:35               ` Heiko Schocher
2010-10-28  6:14 ` Heiko Schocher
2010-10-28  6:36   ` Reinhard Meyer
2010-10-28  6:56     ` Darius Augulis
2010-10-28  8:36       ` Wolfgang Denk
2010-10-28  8:31     ` Wolfgang Denk
2010-10-28  8:39   ` Wolfgang Denk
2010-10-28  8:53     ` Heiko Schocher
2010-10-28 10:23     ` Alexander Holler
2010-10-28 11:16       ` Reinhard Meyer
2010-10-28 11:38         ` Wolfgang Denk
2010-10-28 11:55           ` Reinhard Meyer
2010-10-29  9:29           ` Albert ARIBAUD
2010-10-28 11:46         ` [U-Boot] CONFIG_SKIP_RELOCATE_UBOOT still used? Alexander Holler
2010-10-29  9:32           ` Albert ARIBAUD
2010-10-29 11:32             ` Alexander Holler
2010-10-29 11:43               ` Albert ARIBAUD
2010-10-29 11:48                 ` Wolfgang Denk
2010-10-28  9:03 ` [U-Boot] Most ARM CPU's have buggy clear_bss? Alexander Holler
2010-10-28  9:31   ` Alexander Holler
2010-10-29  8:50     ` Alexander Holler
2010-10-29  9:19       ` Albert ARIBAUD
2010-10-29 11:56         ` Alexander Holler
2010-10-29 12:08           ` Albert ARIBAUD
2010-10-29 12:31             ` Alexander Holler
2010-10-29 13:37               ` Albert ARIBAUD
2010-10-29 13:50                 ` Alexander Holler [this message]
2010-10-29 14:04                   ` Albert ARIBAUD
2010-10-29 14:37                 ` Alexander Holler
2010-10-29 14:44                   ` Wolfgang Denk
2010-10-29 14:50                     ` Alexander Holler
2010-10-29 14:50                   ` Reinhard Meyer
2010-10-29 14:58                     ` Alexander Holler
2010-10-29 14:54                   ` Albert ARIBAUD
2010-10-29 15:05                     ` Alexander Holler
2010-10-29 15:23                       ` Albert ARIBAUD
2010-10-29 15:32                         ` Alexander Holler
2010-10-29 15:38                           ` Albert ARIBAUD
2010-10-29 16:56                             ` Alexander Holler

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=4CCAD140.8050207@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox