Skip to contentSkip to conversation

ppc4xx: Add "ecctest" command to test/simulate ECC errors

PATCH New Stefan Roese 1 participant 2 messages Jul 21, 2010 – Jul 23, 2010 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: Add "ecctest" command to test/simulate ECC errors

This patch adds the "ecctest" command to test and simulate ECC errors (single bit and/or double bit) while running from SDRAM. Currently only the IBM DDR2 controller is supported (405EX, 440SP(e), 460EX/GT).

This is done by copying and calling functions, modifying the SDRAM controller operation mode, in internal SRAM/OCM.

For correctable ECC errors (single bit) only the status will be printed since the DDR2 controller doesn't provide the faulting address:

=> ecctest 1000000 1
Using address 01000000 for 1 bit ECC error injection
ECC: Correctable error

Uncorrectable ECC errors (double bit) will also display the faulting address:

=> ecctest 1000000 2
Using address 01000000 for 2 bit ECC error injection
ECC: Uncorrectable error at 0x0001000000

To enable this "ecctest" function you need to define CONFIG_CMD_ECCTEST in the board config header.

Tested on katmai and t3corp.

---
 arch/powerpc/cpu/ppc4xx/Makefile      |    3 +
 arch/powerpc/cpu/ppc4xx/cmd_ecctest.c |  284 +++++++++++++++++++++++++++++++++
 2 files changed, 287 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/cpu/ppc4xx/cmd_ecctest.c
arch/powerpc/cpu/ppc4xx/Makefile +3 -0
index 88d53fb..c9c1a33 100644
@@ -51,6 +51,9 @@ COBJS	+= cpu_init.o
 COBJS	+= denali_data_eye.o
 COBJS	+= denali_spd_ddr2.o
 COBJS	+= ecc.o
+ifdef CONFIG_CMD_ECCTEST
+COBJS	+= cmd_ecctest.o
+endif
 COBJS	+= fdt.o
 COBJS	+= interrupts.o
 COBJS	+= iop480_uart.o
arch/powerpc/cpu/ppc4xx/cmd_ecctest.c new file +284 -0

284 lines not on this page · raw message

Signature · 1 line
1.7.1.1
#1 lore raw

PATCH 1/1 ppc4xx: Add "ecctest" command to test/simulate ECC errors

Quoted 17 lines · On Wednesday 21 July 2010 19:06:10 Stefan Roese wrote:

This patch adds the "ecctest" command to test and simulate ECC errors (single bit and/or double bit) while running from SDRAM. Currently only the IBM DDR2 controller is supported (405EX, 440SP(e), 460EX/GT).

This is done by copying and calling functions, modifying the SDRAM controller operation mode, in internal SRAM/OCM.

For correctable ECC errors (single bit) only the status will be printed since the DDR2 controller doesn't provide the faulting address:

=> ecctest 1000000 1
Using address 01000000 for 1 bit ECC error injection
ECC: Correctable error

Uncorrectable ECC errors (double bit) will also display the faulting address:

Quoted 8 lines

=> ecctest 1000000 2
Using address 01000000 for 2 bit ECC error injection
ECC: Uncorrectable error at 0x0001000000

To enable this "ecctest" function you need to define CONFIG_CMD_ECCTEST in the board config header.

Tested on katmai and t3corp.

Applied to u-boot-ppc4xx/master. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de