主题 : 求教:uboot中copy_uboot_to_ram函数? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 72261
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
贡献值: 0 点
综合积分: 38 分
注册时间: 2012-06-18
最后登录: 2012-12-04
楼主  发表于: 2012-07-24 10:27

 求教:uboot中copy_uboot_to_ram函数?

void copy_uboot_to_ram(void)
{
    ulong ch;
#if defined(CONFIG_EVT1)
    ch = *(volatile u32 *)(0xD0037488);
    copy_sd_mmc_to_mem copy_bl2 =
        (copy_sd_mmc_to_mem) (*(u32 *) (0xD0037F98));
#else
    ch = *(volatile u32 *)(0xD003A508);
    copy_sd_mmc_to_mem copy_bl2 =
        (copy_sd_mmc_to_mem) (*(u32 *) (0xD003E008));
#endif
。。。
  函数中copy_sd_mmc_to_mem函数指针的常量(硬编码)是怎么确定的啊?谢谢!
[ 此帖被guangyung在2012-07-24 10:36重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2012-07-24 10:53

 回 楼主(guangyung) 的帖子

这个是CPU的Boot ROM中固定的位置,由CPU决定。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 72261
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
贡献值: 0 点
综合积分: 38 分
注册时间: 2012-06-18
最后登录: 2012-12-04
2楼  发表于: 2012-07-24 11:26

 回 1楼(kasim) 的帖子

0xD0037488这个地址并不在irom code的代码空间啊,或者这个指针的代码什么什么时候被加载的?刚接触嵌入式,有很多问题!谢谢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2012-07-24 12:17
0xD0037488在S5PV210 IRAM的地址空间里,我想这个地址的code上应该是从IROM中复制过来的,在IROM加载第一阶段u-boot的之前。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 72261
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
贡献值: 0 点
综合积分: 38 分
注册时间: 2012-06-18
最后登录: 2012-12-04
4楼  发表于: 2012-07-24 13:04
谁有irom application note?传一个给我好嘛,谢谢!mail:guangyung#gmail.com   (#  --> @)