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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

441 Views
collinshi
Contributor II

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 :

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
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
#endif /* CONFIG_SKIP_RELOCATE_UBOOT */

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.

Thanks

Collin

Labels (1)
0 Kudos
1 Reply

293 Views
Yuri
NXP Employee
NXP Employee

Hello,

  The i.MX53 boot ROM is able to load the whole U-boot image to DRAM.

It is only needed to read the DCD table to initialize DRAM. For it, coping of
the first part of uboot into the IRAM is used.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos