主题 : u-boot-2013.01移植 拷贝到内存失败 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 3868
精华: 0
发帖: 37
金钱: 190 两
威望: 46 点
贡献值: 0 点
综合积分: 74 分
注册时间: 2009-02-13
最后登录: 2018-08-25
楼主  发表于: 2013-10-14 19:41

 u-boot-2013.01移植 拷贝到内存失败

void copy_uboot_to_ram(void)
{

        unsigned long ch;
        unsigned char ret;
        copy_sd_to_ram copy_bl2=(copy_sd_to_ram)(*(u32 *)(0xD0037F98));
        ch=*(volatile u32 *)(0xD0037488);
        if(ch==0xEB200000){
                ret=copy_bl2(2, BL2_START_OFFSET, BL2_SIZE_BLOC_COUNT, CONFIG_SYS_TEXT_BASE,0);
        }
        else if(ch==0xEB000000){
                ret=copy_bl2(0, BL2_START_OFFSET, BL2_SIZE_BLOC_COUNT, CONFIG_SYS_TEXT_BASE,0);
        }
        else return;

        if(ret==0)while(1);
        else return;
}
void board_init_f(unsigned long bootflag)
{
        __attribute__((noreturn)) void (*uboot)(void);
        copy_uboot_to_ram();
        /* Jump to U-Boot image */
              uboot = (void *)CONFIG_SYS_TEXT_BASE;
        (*uboot)();
        /* Never returns Here */
}

内存初始化测试过,是没有问题的。
这是u-boot源码中的,在S5PV210中能够执行到board_init_f这个函数处,但是执行copy_uboot_to_ram时无法返回,也就此函数执行没有成功,试了很多中方式就过不去这个函数,想请教下这个现象估计是有什么原因导致的?
[ 此帖被linuxer在2013-10-14 19:53重新编辑 ]