[U-Boot] [PATCH v2] mx51evk: support new relocation scheme

Shawn Guo shawn.gsc at gmail.com
Wed Oct 27 17:32:06 CEST 2010


On Wed, Oct 27, 2010 at 7:46 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Shawn Guo,
>
> In message <1288174358-14896-1-git-send-email-shawn.gsc at gmail.com> you wrote:
>> This patch is to fix build breakage and support new relocatoin
>> scheme for mx51evk.
>>
>> - Correct IRAM base address and add size definition
>>
>>   The IRAM starts from 0x1FFE0000 on final revsion i.mx51 than
>>   0x1FFE8000 which is for older revision.
>>
>> - Include imx-regs.h in mx51evk.h
>>
>>   Definitions like CSD0_BASE_ADDR and IRAM_BASE_ADDR can be
>>   referred to.
>>
>> - Define CONFIG_SYS_INIT_RAM_ADDR and CONFIG_SYS_INIT_RAM_SIZE
>>
>>   This is something suggested by Wolfgang, and for automatic
>>   calculation of macros like CONFIG_SYS_GBL_DATA_SIZE (done) and
>>   CONFIG_SYS_INIT_SP_ADDR (later).
>
> Um... this is NOT what we discussed.
>
>> +#define CONFIG_SYS_SDRAM_BASE                (PHYS_SDRAM_1)
>> +#define CONFIG_SYS_INIT_RAM_ADDR     (IRAM_BASE_ADDR)
>> +#define CONFIG_SYS_INIT_RAM_SIZE     (IRAM_SIZE)
>> +#define CONFIG_SYS_INIT_SP_ADDR      \
>> +     (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)
>> +
>
> No.  This is not what I want to se.
>
> Memory allocation in the inital ram has the global data at the top.
>
> Please use something like
>
> #define CONFIG_SYS_INIT_SP_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
> #define CONFIG_SYS_INIT_SP_ADDR    (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
>
It ends up with the following compiling error.

start.S:175: Error: garbage following instruction -- `ldr
sp,=(((0x1FFE0000)+((0x00020000)-#96)))'

Can we just go the current way for the near term, and wait for the
auto calculation to clean it up?

-- 
Regards,
Shawn


More information about the U-Boot mailing list