可以确定启动配置肯定是正确的,就是NandFlash启动的。我手上有两份NandFlash的驱动,唯一区别是ECC写在Spare Page里的位置不一样,把同一份UBL固件烧写在同一个机器的NandFlash的第一块,但是就是有一个正常启动,另一个不能启动,不能启动的机器PC地址还在ROM里面,也就是说,ROM没有找到UBL固件了吧!难道ROM启动代码在读NandFlash是也有做ECC的?是这样子的吗?
Tony Tang:
Wayne Lee难道ROM启动代码在读NandFlash是也有做ECC的?
这是必需的!
user4755476:
回复 Tony Tang:
嗯,这是必须的,但是,有没有相关的文档说明呢?
Tony Tang:
回复 user4755476:
参考bootloader文档:sprab41e:
6.4 NAND Flash BootTo boot from NAND Flash, the AIS should be written to NAND block 1 (NAND block 0 is not used bydefault) in a sequential manner, skipping (and marking) any bad blocks. The bootloader detects a badblock by examining the spare bytes in the first and second pages of the current block. For NAND devicesthat comply with the ONFI standard, the first and last pages are used instead. Figure 21 illustrates thestructure of a NAND data page. Each page includes N segments of spare bytes, where N is the number ofdata bytes per page divided by 512. Each segment of spare bytes contains 6 test bytes and 10 ECCbytes. For those pages that are checked during bad block detection, all the test bytes in each segmentmust equal FFh; any other value indicates that the page (and its entire block) is bad and should not beused.
user4755476:
回复 Tony Tang:
谢谢!非常有用的资料!