[U-Boot] [PATCH] devkit8000: Move CONFIG_SYS_TEXT_BASE out of bss

Igor Grinberg
2011-12-01T10:03:28Z

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?
Aren't there enough space in SRAM?
Also, is this what X-Loader did in first place?

--
Regards,
Igor.