AnsweredAssumed Answered

who copy the u-boot-mx53-smd.bin into RAM?

Question asked by Collin Shi on Dec 22, 2015
Latest reply on Dec 22, 2015 by Yuri Muhin

Hello experts,


I am working on imx53 SABRE Tablet board (boot from eMMC) and u-boot-2009.08 which was downloaded from freescale website.

As my understanding, the ROM code of IMX53 copy the first part of uboot into the IRAM ,then the first part uboot will copy the rest part uboot into DDR RAM, and jump to the C code start_armboot().


In the line140 of  \u-boot-2009.08\cpu\arm_cortexa8\start.S,there is :


relocate:    @ relocate U-Boot to RAM
adr r0, _start  @ r0 <- current position of code
ldr r1, _TEXT_BASE  @ test if we run from flash or RAM
cmp r0, r1   @ don't reloc during debug
beq stack_setup

ldr r2, _armboot_start
ldr r3, _bss_start
sub r2, r3, r2  @ r2 <- size of armboot
add r2, r0, r2  @ r2 <- source end address

copy_loop:    @ copy 32 bytes at a time
ldmia r0!, {r3 - r10}  @ copy from source address [r0]
stmia r1!, {r3 - r10}  @ copy to   target address [r1]
cmp r0, r2   @ until source end addreee [r2]
ble copy_loop

I guess this code is used to copy the second part uboot into RAM.

But I found the CONFIG_SKIP_RELOCATE_UBOOT is defined in mx53_smd.h. So this code will not run.

In this case, who will copy the rest part uboot into RAM?

In IMX53,the IRAM is 128KB, but the u-boot-mx53-smd.bin is 167KB. So I don't think the ROM CODE can copy all the uboot into IRAM.