[U-Boot] [PATCH v2 04/22] omap4: save parameters passed by ROM code to SPL
Aneesh V
aneesh at ti.com
Tue May 17 08:44:49 CEST 2011
Hi Wolfgang,
On Monday 16 May 2011 09:07 PM, Wolfgang Denk wrote:
> Dear Aneesh V,
>
> In message<4DD1189D.4050603 at ti.com> you wrote:
>>
>>>> Save this information in SPL so that we can use the same media
>>>> and mode to bootload u-boot.
>>>>
>>>> Signed-off-by: Aneesh V<aneesh at ti.com>
>>> ...
>>>> + /* Store the boot device in omap4_boot_device */
>>>> + ldr r2, [r0, #BOOT_DEVICE_OFFSET] @ r1<- value of boot device
>>>> + and r2, #BOOT_DEVICE_MASK
>>>> + ldr r3, =omap4_boot_device
>>>> + str r2, [r3] @ omap4_boot_device<- r1
>>>
>>> Why don't you use stadard global data here?
>>
>> SPL has access to .data right from the beginning. Besides this is too
>> early. global data is not initialized yet.
>
> Please keep in mind that this is a special situation then. The code
> will not work as intended for example when running form NOR flash.
Yes, I realize that. The values passed in the ARM registers need to be
saved before they are lost. At the moment only SPL needs them. We do
not have a board with NOR flash yet. If there is a need in the future
we may have to save it in some predefined special purpose memory such
as the scratchpad memory of OMAP or some location in the internal RAM
that is not used. But there is no such need at the moment.
best regards,
Aneesh
More information about the U-Boot
mailing list