Linux 3.16.1 - ECC warning

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

mikepro
Posts: 27
Joined: Thu Jan 23, 2014 9:31 pm

Linux 3.16.1 - ECC warning

Tue Aug 19, 2014 2:35 pm

Hi

I'm testing kernel v3.16.1 (latest stable from kernel.org when writing this) with SAMA5D34 EK-board.

I get a warning about ECC that is being used is too weak:

Code: Select all

atmel_nand_nfc 70000000.nfc: NFC is probed.
atmel_nand 60000000.nand: Use On Flash BBT
atmel_nand 60000000.nand: Using dma0chan4 for DMA transfers.
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
nand: Micron MT29F2G08ABAEAWP
nand: 256MiB, SLC, page size: 2048, OOB size: 64
atmel_nand 60000000.nand: minimum ECC: 4 bits in 512 bytes
atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512
atmel_nand 60000000.nand: Using NFC Sram read 
nand: WARNING: MT29F2G08ABAEAWP: the ECC used on your system is too weak compared to the one required by the NAND chip
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: bad block at 0x0000009e0000
nand_read_bbt: bad block at 0x000009880000
nand_read_bbt: bad block at 0x00000a580000
nand_read_bbt: bad block at 0x00000a660000
nand_read_bbt: bad block at 0x00000b400000
nand_read_bbt: bad block at 0x00000b440000
nand_read_bbt: bad block at 0x00000ca80000
nand_read_bbt: bad block at 0x00000cd60000
nand_read_bbt: bad block at 0x00000d720000
8 cmdlinepart partitions found on MTD device atmel_nand
Creating 8 MTD partitions on "atmel_nand":
0x000000000000-0x000000040000 : "bootstrap"
0x000000040000-0x0000000c0000 : "uboot"
0x0000000c0000-0x000000100000 : "env"
0x000000100000-0x000000140000 : "env_redundant"
0x000000140000-0x000000180000 : "spare"
0x000000180000-0x000000200000 : "dtb"
0x000000200000-0x000000800000 : "kernel"
0x000000800000-0x000010000000 : "rootfs"
Minimum ECC conf. is 4b/512B, which is initialized by atmel_nand driver as we can see from the messages log. But I still get the warning message.

The system boots OK, but I'm worried about the UBI integrity on the NAND. I've read that too weak ECC can mess up the filesystem after few days or even weeks of use.

Is there a way to test that PMECC is really enabled and working?


When booting older kernel V3.10, there's no warning about ECC:

Code: Select all

NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64
atmel_nand 60000000.nand: ONFI params, minimum required ECC: 4 bits in 512 bytes
atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512
atmel_nand 60000000.nand: Using NFC Sram read and write
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: bad block at 0x0000009e0000
nand_read_bbt: bad block at 0x000009880000
nand_read_bbt: bad block at 0x00000a580000
nand_read_bbt: bad block at 0x00000a660000
nand_read_bbt: bad block at 0x00000b400000
nand_read_bbt: bad block at 0x00000b440000
nand_read_bbt: bad block at 0x00000ca80000
nand_read_bbt: bad block at 0x00000cd60000
nand_read_bbt: bad block at 0x00000d720000
8 cmdlinepart partitions found on MTD device atmel_nand
Creating 8 MTD partitions on "atmel_nand":
0x000000000000-0x000000040000 : "bootstrap"
0x000000040000-0x0000000c0000 : "uboot"
0x0000000c0000-0x000000100000 : "env"
0x000000100000-0x000000140000 : "env_redundant"
0x000000140000-0x000000180000 : "spare"
0x000000180000-0x000000200000 : "dtb"
0x000000200000-0x000000800000 : "kernel"
0x000000800000-0x000010000000 : "rootfs"

Thanks for any advice!
blue_z
Location: USA
Posts: 2131
Joined: Thu Apr 19, 2007 10:15 pm

Re: Linux 3.16.1 - ECC warning

Tue Aug 19, 2014 9:27 pm

mikepro wrote:Is there a way to test that PMECC is really enabled and working?
You could write a little app that mmap()s the System Controller registers, and then dump the PMECC Status Register and anything else of interest.
mikepro wrote:When booting older kernel V3.10, there's no warning about ECC:
The simple reason for that is that the warning is new to version 3.16.
mikepro wrote:Thanks for any advice!
Instrument nand_base.c to see what values nand_ecc_strength_good() uses to determine your system's alleged deficiency.

Regards
blue_z
Location: USA
Posts: 2131
Joined: Thu Apr 19, 2007 10:15 pm

Re: Linux 3.16.1 - ECC warning

Fri Aug 22, 2014 2:21 am

That ECC warning is a bogus message.
It's caused by a bad value in a data structure set by atmel_nand.c.
There's a patch to correct this issue.

Regards
mikepro
Posts: 27
Joined: Thu Jan 23, 2014 9:31 pm

Re: Linux 3.16.1 - ECC warning

Fri Aug 22, 2014 12:54 pm

Thanks blue_z!

The patch fixed to problem.
Vezza
Posts: 1
Joined: Tue Nov 17, 2020 12:33 am

Re: Linux 3.16.1 - ECC warning

Tue Nov 17, 2020 12:37 am

I have the same issue but cant seem to fix it. can anyone help?

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 15 guests