sylijinlei 发表于 2012-4-15 10:08:45

start.s 复制代码疑惑

2440start重定位有这样的代码:

#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:
        ldmia        r0!, {r3-r10}                /* copy from source address     */
        stmia        r1!, {r3-r10}                /* copy to   target address     */
        cmp        r0, r2                        /* until source end addreee     */
        ble        copy_loop
#endif        /* CONFIG_SKIP_RELOCATE_UBOOT

请问如果是从nandflash启动,复制又是怎么处理的呢,uboot的大小至少也是几十K啊,怎么全都复制到sdram中呢,请高手指点?

dglwx 发表于 2012-4-15 14:25:28

回复 1# sylijinlei

参考我在另外一个论坛的帖子:
http://mcuos.com/thread-7137-1-1.html
页: [1]
查看完整版本: start.s 复制代码疑惑