All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] DNS323 (Orion5x) must double ORION5X_SZ_BOOTROM to access full flash
Date: Tue, 24 Aug 2010 14:52:22 +0200	[thread overview]
Message-ID: <4C73C086.3000701@free.fr> (raw)
In-Reply-To: <4C73B876.8040709@dawes.za.net>

Le 24/08/2010 14:17, Rogan Dawes a ?crit :
> On 2010/08/24 1:34 PM, Albert ARIBAUD wrote:
>> Le 24/08/2010 09:47, Rogan Dawes a ?crit :
>>
>>> Yes, I still have the vendor u-boot flashed, so I can still see its
>>> configuration. And, yes, it does allow reading the full 8MB of flash.
>>
>>> Vendor u-boot:
>>
>>> f1020040: 007f0f11 ff800000 00000000 00000000    ................
>>
>>> Mainline (8MB window):
>>
>>> f1020070: 003f0f11 ff800000 00000000 00000000    ..?.............
>>
>>> Mainline (16MB window):
>>
>>> f1020070: 007f0f11 ff800000 00000000 00000000    ................
>>
>> The good news is that your flash works normally.
>>
>> The bad news is that the mainline settings you are showing here are
>> wrong with respect to the ORION5X_SZ_BOOTROM: A 16 MB window would be
>> 00ff0f11. 007f0f11 is 8MB, and 003f0f11 is 4 MB. Thus, what you think is
>> a 16MB widow is actually a 8MB one, and the 8MB one is actually 4MB,
>> which explains the issues you have.
>>
>> I've just checked the code for computing the window size in mainline
>> u-boot, and it is off by one, reducing the actual window mapping by
>> half. :(
>>
>> They weird thing is that it affect *all* windows, RAM included; we
>> should have seen other issues! I'll do some checks later today and
>> provide an officiel bugfix this evening.
>>
>> Amicalement,
>
> Hi Albert,
>
> Thanks for looking at this.
>
> Do you mean that your own u-boot is also misconfigured?
>
> Rogan

Yes, it is, to the point that just like you, I can only flash the lower 
half of my (512KB) flash -- when I did the flash tests, it escaped me 
because I only erased and flashed small sectors at the beginning of the 
flash. :/

As for RAM, thanks to Wolfgang's suggestion to use get_ram_size() rather 
than the (now evidently buggy) SoC's calculation routine, mainline 
u-boot actually finds the real amount of RAM regardless of any macro 
value, which explains why u-boot could access RAM above the first half, 
and especially the upmost megabyte as I am doing now.

Bugfix patch on its way, and adding Prafulla as this bug also hits 
kirkwood SoC code from which the calculation code was taken.

Amicalement,
-- 
Albert.

  reply	other threads:[~2010-08-24 12:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 16:06 [U-Boot] DNS323 (Orion5x) must double ORION5X_SZ_BOOTROM to access full flash Rogan Dawes
     [not found] ` <4C7356E0.500@free.fr>
2010-08-24  6:07   ` Albert ARIBAUD
2010-08-24  7:47     ` Rogan Dawes
2010-08-24 11:34       ` Albert ARIBAUD
2010-08-24 12:17         ` Rogan Dawes
2010-08-24 12:52           ` Albert ARIBAUD [this message]
2010-08-25  4:38             ` Prafulla Wadaskar

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=4C73C086.3000701@free.fr \
    --to=albert.aribaud@free.fr \
    --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.