• «
  • 1
  • 2
  • »
  • Pages: 2/2     Go
主题 : 分析一下tiny210v2的16bitECC校验(已经实现u-boot for tiny210v2) 复制链接 | 浏览器收藏 | 打印
:)
级别: 骑士
UID: 61588
精华: 5
发帖: 248
金钱: 1500 两
威望: 300 点
贡献值: 5 点
综合积分: 596 分
注册时间: 2012-01-02
最后登录: 2018-03-05
10楼  发表于: 2013-08-04 22:29

 回 35楼(mhjong) 的帖子

这么有兴趣对16BIT ECC 何不来点实际的。请关注一下https://github.com/kangear/tiny210v2-uboot/tree/16bit-ecc
这个是Fix u-boot对16BIT ECC校验的分支。
主要是drivers/mtd/nand/s5pc1xx_nand.c 的移植。一起来讨论吧。:)
可以git clone https://github.com/kangear/tiny210v2-uboot -b 16bit-ecc 得到这个分支的源代码。
:)
级别: 骑士
UID: 61588
精华: 5
发帖: 248
金钱: 1500 两
威望: 300 点
贡献值: 5 点
综合积分: 596 分
注册时间: 2012-01-02
最后登录: 2018-03-05
11楼  发表于: 2013-08-09 08:43

 回 4楼(mhjong) 的帖子

你厉害!
:)
级别: 骑士
UID: 61588
精华: 5
发帖: 248
金钱: 1500 两
威望: 300 点
贡献值: 5 点
综合积分: 596 分
注册时间: 2012-01-02
最后登录: 2018-03-05
12楼  发表于: 2013-08-09 08:52

 回 45楼(mhjong) 的帖子

在移植u-boot的读16bit的ECC校验的时候,很是费解。写是成功的了,但是似乎校验是有问题的:
校验码是有了:
NAND write: device 0 offset 0x400000, size 0x2000
        8192 bytes written: OK
    Page 00400000 dump:
    OOB:
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff dc e7 f0 25
    d2 d5 03 f8 57 43 61 20
    6d b6 e5 79 ab 0b 9d f5
    09 3e a0 b5 7a b0 ff ff
    dc e7 f0 25 d2 d5 03 f8
    57 43 61 20 6d b6 e5 79
    ab 0b 9d f5 09 3e a0 b5
    7a b0 ff ff dc e7 f0 25
    d2 d5 03 f8 57 43 61 20
    6d b6 e5 79 ab 0b 9d f5
    09 3e a0 b5 7a b0 ff ff
    dc e7 f0 25 d2 d5 03 f8
    57 43 61 20 6d b6 e5 79
    ab 0b 9d f5 09 3e a0 b5
    7a b0 ff ff dc e7 f0 25
    d2 d5 03 f8 57 43 61 20
    6d b6 e5 79 ab 0b 9d f5
    09 3e a0 b5 7a b0 ff ff
    dc e7 f0 25 d2 d5 03 f8
    57 43 61 20 6d b6 e5 79
    ab 0b 9d f5 09 3e a0 b5
    7a b0 ff ff dc e7 f0 25
    d2 d5 03 f8 57 43 61 20
    6d b6 e5 79 ab 0b 9d f5
    09 3e a0 b5 7a b0 ff ff
    dc e7 f0 25 d2 d5 03 f8
    57 43 61 20 6d b6 e5 79
    ab 0b 9d f5 09 3e a0 b5
    7a b0 ff ff dc e7 f0 25
    d2 d5 03 f8 57 43 61 20
    6d b6 e5 79 ab 0b 9d f5
    09 3e a0 b5 7a b0 ff ff
    dc e7 f0 25 d2 d5 03 f8
    57 43 61 20 6d b6 e5 79
    ab 0b 9d f5 09 3e a0 b5
    7a b0 ff ff dc e7 f0 25
    d2 d5 03 f8 57 43 61 20
    6d b6 e5 79 ab 0b 9d f5
    09 3e a0 b5 7a b0 ff ff
    dc e7 f0 25 d2 d5 03 f8
    57 43 61 20 6d b6 e5 79
    ab 0b 9d f5 09 3e a0 b5
    7a b0 ff ff dc e7 f0 25
    d2 d5 03 f8 57 43 61 20
    6d b6 e5 79 ab 0b 9d f5
    09 3e a0 b5 7a b0 ff ff
    dc e7 f0 25 d2 d5 03 f8
    57 43 61 20 6d b6 e5 79
    ab 0b 9d f5 09 3e a0 b5
    7a b0 ff ff dc e7 f0 25
    d2 d5 03 f8 57 43 61 20
    6d b6 e5 79 ab 0b 9d f5
    09 3e a0 b5 7a b0 ff ff
    dc e7 f0 25 d2 d5 03 f8
    57 43 61 20 6d b6 e5 79
    ab 0b 9d f5 09 3e a0 b5
    7a b0 ff ff 00 ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    [Ver130726-TINY210v2]#

校验的成功不成功很难判断:
[Ver130726-TINY210v2]# nand read 21000000 400000 500000

    NAND read: device 0 offset 0x400000, size 0x500000
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
    s3c-nand: 1 bit(s) error detected, corrected successfully
        5242880 bytes read: OK
    [Ver130726-TINY210v2]# bootm
    ## Booting kernel from Legacy Image at 21000000 ...
        Image Name:   Linux-3.0.8-FriendlyARM
        Image Type:   ARM Linux Kernel Image (uncompressed)
        Data Size:    4811560 Bytes = 4.6 MiB
        Load Address: 20008000
        Entry Point:  20008000
        Verifying Checksum ... Bad Data CRC
    ERROR: can't get kernel image!
    [Ver130726-TINY210v2]#

不过打这段字的时候似乎有点门路了,向以前验证BL1代码的读ecc的方法来做,512byte+校验码全部输出,来人工看看结果!
:)
级别: 骑士
UID: 61588
精华: 5
发帖: 248
金钱: 1500 两
威望: 300 点
贡献值: 5 点
综合积分: 596 分
注册时间: 2012-01-02
最后登录: 2018-03-05
13楼  发表于: 2013-08-09 20:18

 回 48楼(mhjong) 的帖子

原来你是这样走的!我喜欢从这头出发,能碰头了,说明两边都通了。
  • «
  • 1
  • 2
  • »
  • Pages: 2/2     Go