blob: d8edada5654c13c9abc39ac3a8faaf32a65f2893 [file] [log] [blame]
Marian Balakowiczd326f4a2006-03-16 15:19:35 +01001
2
3Use cases for DDR 'ecc' command:
4================================
5
6Before executing particular tests reset target board or clear status registers:
7
8=> ecc captureclear
9=> ecc errdetectclr all
10=> ecc sbecnt 0
11
12
13Injecting Single-Bit Errors
14---------------------------
15
161. Set 1 bit in Data Path Error Inject Mask
17
18=> ecc injectdatahi 1
19
202. Run test over some memory region
21
22=> ecc test 200000 10
23
243. Check ECC status
25
26=> ecc status
27...
28Memory Data Path Error Injection Mask High/Low: 00000001 00000000
29...
30Memory Single-Bit Error Management (0..255):
31 Single-Bit Error Threshold: 255
32 Single Bit Error Counter: 16
33...
34Memory Error Detect:
35 Multiple Memory Errors: 0
36 Multiple-Bit Error: 0
37 Single-Bit Error: 0
38...
39
4016 errors were generated, Single-Bit Error flag was not set as Single Bit Error
41Counter did not reach Single-Bit Error Threshold.
42
434. Make sure used memory region got re-initialized with 0xcafecafe pattern
44
45=> md 200000
4600200000: cafecafe cafecafe cafecafe cafecafe ................
4700200010: cafecafe cafecafe cafecafe cafecafe ................
4800200020: cafecafe cafecafe cafecafe cafecafe ................
4900200030: cafecafe cafecafe cafecafe cafecafe ................
5000200040: cafecafe cafecafe cafecafe cafecafe ................
5100200050: cafecafe cafecafe cafecafe cafecafe ................
5200200060: cafecafe cafecafe cafecafe cafecafe ................
5300200070: cafecafe cafecafe cafecafe cafecafe ................
5400200080: deadbeef deadbeef deadbeef deadbeef ................
5500200090: deadbeef deadbeef deadbeef deadbeef ................
56
57
58Injecting Multiple-Bit Errors
59-----------------------------
60
611. Set more than 1 bit in Data Path Error Inject Mask
62
63=> ecc injectdatahi 5
64
652. Run test over some memory region
66
67=> ecc test 200000 10
68
693. Check ECC status
70
71=> ecc status
72...
73Memory Data Path Error Injection Mask High/Low: 00000005 00000000
74...
75Memory Error Detect:
76 Multiple Memory Errors: 1
77 Multiple-Bit Error: 1
78 Single-Bit Error: 0
79...
80
81Observe that both Multiple Memory Errors and Multiple-Bit Error flags are set.
82
834. Make sure used memory region got re-initialized with 0xcafecafe pattern
84
85=> md 200000
8600200000: cafecafe cafecafe cafecafe cafecafe ................
8700200010: cafecafe cafecafe cafecafe cafecafe ................
8800200020: cafecafe cafecafe cafecafe cafecafe ................
8900200030: cafecafe cafecafe cafecafe cafecafe ................
9000200040: cafecafe cafecafe cafecafe cafecafe ................
9100200050: cafecafe cafecafe cafecafe cafecafe ................
9200200060: cafecafe cafecafe cafecafe cafecafe ................
9300200070: cafecafe cafecafe cafecafe cafecafe ................
9400200080: deadbeef deadbeef deadbeef deadbeef ................
9500200090: deadbeef deadbeef deadbeef deadbeef ................
96
97
98Test Single-Bit Error Counter and Threshold
99-------------------------------------------
100
1011. Set 1 bit in Data Path Error Inject Mask
102
103=> ecc injectdatahi 1
104
1052. Enable error injection
106
107=> ecc inject en
108
1093. Let u-boot run for a with Single-Bit error injection enabled
110
1114. Disable error injection
112
113=> ecc inject dis
114
1154. Check status
116
117=> ecc status
118
119...
120Memory Single-Bit Error Management (0..255):
121 Single-Bit Error Threshold: 255
122 Single Bit Error Counter: 60
123
124Memory Error Detect:
125 Multiple Memory Errors: 1
126 Multiple-Bit Error: 0
127 Single-Bit Error: 1
128...
129
130Observe that Single-Bit Error is 'on' which means that Single-Bit Error Counter
131reached Single-Bit Error Threshold. Multiple Memory Errors bit is also 'on', that
132is Counter reached Threshold more than one time (it wraps back after reaching
133Threshold).
134
135