This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ecc scheme used by Linux

Guru 20755 points

Hello,

I would like to ask what is the ecc scheme used by Linux ?

In  http://processors.wiki.ti.com/index.php/DM814x_AM387x_PSP_U-Boot it is says that hamming should be used for flashing any image (except u-boot). But I used bch8 in all flashing (including environment save from u-boot). I would like to assure that there should not be any problem with using bch8 for all image flashing ? Does Linux use BCH8 too ?

ECC Schemes and their context of usage
ECC typeUsage
S/W ECC Not used
H/W ECC - Hamming Code Should use this scheme while flashing any image/binary which will be used by Linux. This is also used for the U-Boot ENV variables.
H/W ECC – BCH8 Only while flashing U-Boot from U-Boot already running out of OCMC RAM1. After flashing revert back to hamming code H/W ECC

Regards,

Ran

  • Ran,

    Ran Shalit said:
    In  http://processors.wiki.ti.com/index.php/DM814x_AM387x_PSP_U-Boot it is says that hamming should be used for flashing any image (except u-boot).

    This wiki page is old. Refer to the below one:

    TI816X& TI814X

    If the previous Uboot used a different ECC scheme from the default ECC present in the current release, erase all images (and the environment if applicable) that were flashed on to NAND and re-flash the images with the new ECC scheme.

    ECC Schemes and their context of usage
    ECC typeUsage
    S/W ECC Not used
    H/W ECC - Hamming Code Not used by default. Switch back to this only if using JFFS2 file system.
    H/W ECC – BCH8 Used by default to flash any image from the Uboot. Environment variables are also stored in this ECC scheme.

     

    Ran Shalit said:
    But I used bch8 in all flashing (including environment save from u-boot). I would like to assure that there should not be any problem with using bch8 for all image flashing ? Does Linux use BCH8 too ?

    Yes, BCH8 should be used (except for JFFS2 fs):

    The default ECC scheme used across Uboot, Kernel and File System is changed to 8-bit BCH ECC

    UBIFS file system support has been enabled by default in the kernel. Since 8-bit BCH ECC scheme is using [2-57] bytes of the 64 byte OOB area in NAND, accommodating metadata for JFFS2 file system can not be supported with 8-bit ECC scheme. Hence, usage of UBIFS file system is recommended.

    8-bit BCH ECC scheme as default across Uboot, Kernel and File System(TI81XX)

    Regards,
    Pavel