主题 : 请教关于Tekkaman的Uboot移植的一些问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 29516
精华: 0
发帖: 2
金钱: 10 两
威望: 2 点
综合积分: 4 分
注册时间: 2010-09-29
最后登录: 2010-10-26
楼主  发表于: 2010-09-29 16:45

 请教关于Tekkaman的Uboot移植的一些问题

1:nand_read.c中对于坏块的检测,
    
     其中有这样的代码:
    
     if (is_bad_block(&nand, i) ||
                is_bad_block(&nand, i + nand.page_size))、

     再参考is_bad_block代码的实现,我的理解是,读取某块的第一页之后的第一个字节,然后判断是否是0xff。
     那么上面if判断的第一个选择分支则很好理解,可是第二个选择分支呢?怎么理解?
     还有判断是否是0xff的依据是上面?我粗略的看了些资料,貌似没。

2:在跳转到第二部分前点亮LED

     为什么将点亮LED的代码放在:ldr    pc, _start_armboot之后?
     而跳转到start_arm_boot最后是进入一个main_loop,
     为什么不放在之前?

谢谢各位回答,谢谢。。。
    
级别: 新手上路
UID: 29516
精华: 0
发帖: 2
金钱: 10 两
威望: 2 点
综合积分: 4 分
注册时间: 2010-09-29
最后登录: 2010-10-26
1楼  发表于: 2010-09-29 17:15
第一个问题明白了,

我在FLASH的手册上看到如下文字和图:

All device locations are erased(FFh) except locations where the initial invalid block(s) information is written prior to shipping. The initial
invalid block(s) status is defined by the 1st byte in the spare area. Samsung makes sure that either the 1st or 2nd page of every
initial invalid block has non-FFh data at the column address of 2048. Since the initial invalid block information is also erasable in
most cases, it is impossible to recover the information once it has been erased. Therefore, the system must be able to recognize the
initial invalid block(s) based on the original initial invalid block information and create the initial invalid block table via the following
suggested flow chart(Figure 3). Any intentional erasure of the original initial invalid block information is prohibited.

[upload=1]

没什么好问的了,就剩第二个问题了