From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] devkit8000: Move CONFIG_SYS_TEXT_BASE out of bss
Date: Thu, 01 Dec 2011 13:04:56 +0200 [thread overview]
Message-ID: <4ED75F58.5030809@compulab.co.il> (raw)
In-Reply-To: <4ED75411.1080401@ti.com>
On 12/01/11 12:16, Aneesh V wrote:
> Hi Igor,
>
> On Thursday 01 December 2011 03:33 PM, Igor Grinberg wrote:
>> On 12/01/11 11:07, Simon Schwarz wrote:
>>> Hi Igor,
>>>
>>> this only affects Boards with SPL support - and only devkit8000.
>>>
>>> The SPL has its .bss section in SD-RAM while the rest is in SRAM -
>>> CONFIG_SYS_TEXT_BASE was in the same area as .bss. This caused trouble
>>> as the header of the u-boot.img was written before
>>> CONFIG_SYS_TEXT_BASE. In the described case this messed with the
>>> pointer to the mcc datastructure - therefore the u-boot.img file
>>> failed to be read.
>>
>> Thank you very much for the explanation.
>>
>> So as to my understanding, what happens is:
>> 1) The SPL initializes the SDRAM
>> 2) Copies its .bss section to SDRAM
>> 3) Starts loading the U-Boot image and overwrites the .bss section
>> Is the above correct?
>>
>> If it is, then why do we need the .bss in SDRAM?
>
> U-Boot FAT implementation uses 3 buffers each of size 64 KB.
>
>> Aren't there enough space in SRAM?
>
> SRAM doesn't have space for such huge buffers.
>
>> Also, is this what X-Loader did in first place?
>
> Yes, x-loader had these buffers in SDRAM too. But instead of putting
> the .bss in SDRAM, x-loader made these huge arrays into pointer
> variables that were then made to point to the SDRAM.
Ok. Now I get the picture of what's going on there.
Never had the time to go through the code to figure this out...
Thanks for the explanation, Aneesh.
--
Regards,
Igor.
next prev parent reply other threads:[~2011-12-01 11:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 17:05 [U-Boot] [PATCH] devkit8000: Move CONFIG_SYS_TEXT_BASE out of bss Simon Schwarz
2011-11-30 17:12 ` Simon Schwarz
2011-11-30 17:20 ` Tom Rini
2011-12-01 7:49 ` Igor Grinberg
2011-12-01 9:07 ` Simon Schwarz
2011-12-01 10:03 ` Igor Grinberg
2011-12-01 10:16 ` Aneesh V
2011-12-01 11:04 ` Igor Grinberg [this message]
2011-12-01 8:47 ` Thomas Weber
2011-12-06 9:16 ` [U-Boot] [PATCH V2] " Simon Schwarz
2011-12-06 13:52 ` Thomas Weber
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=4ED75F58.5030809@compulab.co.il \
--to=grinberg@compulab.co.il \
--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