From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] arm926ejs: fix jump to RAM nand_boot
Date: Mon, 01 Nov 2010 20:30:32 +0100 [thread overview]
Message-ID: <4CCF1558.1040108@free.fr> (raw)
In-Reply-To: <20101101192318.06C231522C0@gemini.denx.de>
Le 01/11/2010 20:23, Wolfgang Denk a ?crit :
> Dear Albert ARIBAUD,
>
> In message<4CCEF2E4.5080003@free.fr> you wrote:
>>
>> Also, I understand why the second RFC change I did was harmful to tx25.
>> Contrary to u-boot itself, u-boot-spl is not compiled to be position
>> independent; it actually loads at a given address then copies itself,
>> without relocating, to its home location.
>
> It copies _itself_? Not the U-Boot payload?
>
> Heiko, is this intentional? Do we really first load the whole image,
> then copy the U-Boot payload to some other address, then relocate it
> to yet another one?
I haven't been clear.
The boot ROM or IPL loads u-boot-spl in RAM at a fixed location and
jumps to it.
u-boot-spl copies itself at its intended location if not already there,
and jumps to tiself at that new location.
u-boot-spl loads u-boot at a fixed location and jumps to it.
u-boot relocates (copies and fixes up) itself at top of ram if not
already there, and jumps to itself at that new location.
>> I also think I might have found out what hit tx25.
>>
>> include/configs/tx25 defines the size of u-boot which SPL will use to
>> load from NAND into RAM. currently it is defined thus:
>>
>> #define CONFIG_SYS_NAND_U_BOOT_SIZE 0x30000
>
> Arghh...
>
>> Wolfgang, please try the following:
>>
>> - on u-boot-testing, branch reloc_tests, revert commit 7fab02d...
>> (that's "arm926ejs: fix jump to RAM nand_boot") as this 'fix' is a mistake.
>>
>> - in include/configs/tx25.h, increasing CONFIG_SYS_NAND_U_BOOT_SIZE to
>> 0x31000
>>
>> Let me know if building tx25 after these two corrections makes things
>> better.
>
> Bingo.
Phew.
> Both the ELDK and the CS compiled versions run fine now:
>
> with ELDK:
>
> U-Boot 2010.12-rc1-00030-g7fec359 (Nov 01 2010 - 20:13:53)
>
> U-Boot code: 81200000 -> 81224E64 BSS: -> 8122DF68
> CPU: Freescale i.MX25 at 399 MHz
>
> monitor len: 0002DF68
> ramsize: 02000000
> TLB table at: 81ff0000
> Top of RAM usable for U-Boot at: 81ff0000
> Reserving 183k for U-Boot at: 81fc2000
> Reserving 1024k for malloc() at: 81ec2000
> Reserving 24 Bytes for Board Info at: 81ec1fe8
> Reserving 92 Bytes for Global Data at: 81ec1f8c
> New Stack Pointer is: 81ec1f88
> RAM Configuration:
> Bank #0: 80000000 32 MiB
> relocation Offset is: 00dc2000
> monitor flash len: 00024E64
> Now running in RAM - U-Boot at: 81fc2000
> ....
>
> with CS:
>
> U-Boot 2010.12-rc1-00030-g7fec359 (Nov 01 2010 - 20:18:09)
>
> U-Boot code: 81200000 -> 812237E8 BSS: -> 8122C8F0
> CPU: Freescale i.MX25 at 399 MHz
>
> monitor len: 0002C8F0
> ramsize: 02000000
> TLB table at: 81ff0000
> Top of RAM usable for U-Boot at: 81ff0000
> Reserving 178k for U-Boot at: 81fc3000
> Reserving 1024k for malloc() at: 81ec3000
> Reserving 24 Bytes for Board Info at: 81ec2fe8
> Reserving 92 Bytes for Global Data at: 81ec2f8c
> New Stack Pointer is: 81ec2f88
> RAM Configuration:
> Bank #0: 80000000 32 MiB
> relocation Offset is: 00dc3000
> monitor flash len: 000237E8
> Now running in RAM - U-Boot at: 81fc3000
> ....
>
> Note that the CS tool chain gives somewhat smaller code...
>
> Thanks a lot!
You're welcome. :)
>
> Guess we should submit the temporary changes now as formal patches?
Yes, I will now prepare a patchset for mainline master. Do I include the
increase of tx25 size?
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-11-01 19:30 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-31 17:43 [U-Boot] [RFC] arm926ejs: fix linker file for newer ld support Albert Aribaud
2010-10-31 18:11 ` Alexander Holler
2010-10-31 18:12 ` Wolfgang Denk
2010-10-31 18:31 ` Albert ARIBAUD
2010-10-31 18:36 ` Wolfgang Denk
2010-10-31 18:38 ` Alexander Holler
2010-10-31 19:01 ` Wolfgang Denk
2010-10-31 19:07 ` Albert ARIBAUD
2010-10-31 19:22 ` Wolfgang Denk
2010-10-31 19:40 ` Albert ARIBAUD
2010-10-31 19:59 ` Wolfgang Denk
2010-10-31 20:23 ` Albert ARIBAUD
2010-10-31 20:32 ` Wolfgang Denk
2010-10-31 21:20 ` [U-Boot] [RFC] arm926ejs: fix jump to RAM nand_boot Albert Aribaud
2010-10-31 21:51 ` Wolfgang Denk
2010-10-31 21:55 ` Albert ARIBAUD
2010-10-31 22:28 ` Alexander Holler
2010-10-31 23:04 ` Albert ARIBAUD
2010-11-01 5:13 ` sughosh ganu
2010-11-01 8:12 ` Albert ARIBAUD
2010-11-01 9:13 ` Wolfgang Denk
2010-11-01 9:15 ` Wolfgang Denk
2010-11-01 17:03 ` Albert ARIBAUD
2010-11-01 19:23 ` Wolfgang Denk
2010-11-01 19:30 ` Albert ARIBAUD [this message]
2010-11-01 19:35 ` Wolfgang Denk
2010-11-01 20:04 ` Albert ARIBAUD
2010-11-01 19:44 ` Graeme Russ
2010-11-01 19:53 ` Albert ARIBAUD
2010-11-01 20:01 ` Wolfgang Denk
2010-11-01 20:19 ` Scott Wood
2010-11-02 6:29 ` Heiko Schocher
2010-11-02 6:54 ` Albert ARIBAUD
2010-11-02 7:10 ` Heiko Schocher
2010-11-02 8:33 ` Wolfgang Denk
2010-11-02 8:55 ` Heiko Schocher
2010-11-02 9:17 ` Stefan Roese
2010-11-09 19:19 ` Scott Wood
2010-11-02 9:21 ` Sughosh Ganu
2010-11-02 8:57 ` Reinhard Meyer
2010-11-02 9:11 ` Albert ARIBAUD
2010-11-02 9:34 ` Reinhard Meyer
2010-11-02 9:42 ` Albert ARIBAUD
2010-11-03 6:37 ` V, Aneesh
2010-11-03 8:02 ` Wolfgang Denk
2010-11-03 10:39 ` V, Aneesh
2010-11-03 11:27 ` Wolfgang Denk
2010-11-03 12:03 ` V, Aneesh
2010-11-03 12:08 ` Albert ARIBAUD
2010-11-03 12:20 ` V, Aneesh
2010-11-03 13:00 ` Wolfgang Denk
2010-11-03 14:07 ` V, Aneesh
2010-11-03 18:25 ` Wolfgang Denk
2010-11-02 9:38 ` Wolfgang Denk
2010-11-02 9:47 ` Albert ARIBAUD
2010-11-02 9:56 ` Sughosh Ganu
2010-11-02 11:16 ` Albert ARIBAUD
2010-11-02 11:32 ` Sughosh Ganu
2010-11-02 13:28 ` Wolfgang Denk
2010-10-31 19:01 ` [U-Boot] [RFC] arm926ejs: fix linker file for newer ld support Albert ARIBAUD
2010-10-31 18:35 ` Darius Augulis
2010-10-31 18:53 ` 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=4CCF1558.1040108@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox