README.mpc83xx.ddrecc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. Overview
  2. ========
  3. The overall usage pattern for ECC diagnostic commands is the following:
  4. * (injecting errors is initially disabled)
  5. * define inject mask (which tells the DDR controller what type of errors
  6. we'll be injecting: single/multiple bit etc.)
  7. * enable injecting errors - from now on the controller injects errors as
  8. indicated in the inject mask
  9. IMPORTANT NOTICE: enabling injecting multiple-bit errors is potentially
  10. dangerous as such errors are NOT corrected by the controller. Therefore caution
  11. should be taken when enabling the injection of multiple-bit errors: it is only
  12. safe when used on a carefully selected memory area and used under control of
  13. the 'ecc testdw' 'ecc testword' command (see example 'Injecting Multiple-Bit
  14. Errors' below). In particular, when you simply set the multiple-bit errors in
  15. inject mask and enable injection, U-Boot is very likely to hang quickly as the
  16. errors will be injected when it accesses its code, data etc.
  17. Use cases for DDR 'ecc' command:
  18. ================================
  19. Before executing particular tests reset target board or clear status registers:
  20. => ecc captureclear
  21. => ecc errdetectclr all
  22. => ecc sbecnt 0
  23. Injecting Single-Bit Errors
  24. ---------------------------
  25. 1. Set 1 bit in Data Path Error Inject Mask
  26. => ecc injectdatahi 1
  27. 2. Run test over some memory region
  28. => ecc testdw 200000 10
  29. 3. Check ECC status
  30. => ecc status
  31. ...
  32. Memory Data Path Error Injection Mask High/Low: 00000001 00000000
  33. ...
  34. Memory Single-Bit Error Management (0..255):
  35. Single-Bit Error Threshold: 255
  36. Single Bit Error Counter: 16
  37. ...
  38. Memory Error Detect:
  39. Multiple Memory Errors: 0
  40. Multiple-Bit Error: 0
  41. Single-Bit Error: 0
  42. ...
  43. 16 errors were generated, Single-Bit Error flag was not set as Single Bit Error
  44. Counter did not reach Single-Bit Error Threshold.
  45. 4. Make sure used memory region got re-initialized with 0x0123456789abcdef
  46. => md 200000
  47. 00200000: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  48. 00200010: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  49. 00200020: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  50. 00200030: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  51. 00200040: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  52. 00200050: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  53. 00200060: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  54. 00200070: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  55. 00200080: deadbeef deadbeef deadbeef deadbeef ................
  56. 00200090: deadbeef deadbeef deadbeef deadbeef ................
  57. Injecting Multiple-Bit Errors
  58. -----------------------------
  59. 1. Set more than 1 bit in Data Path Error Inject Mask
  60. => ecc injectdatahi 1
  61. => ecc injectdatalo 1
  62. 2. Run test over some memory region
  63. => ecc testword 200000 1
  64. 3. Check ECC status
  65. => ecc status
  66. ...
  67. Memory Data Path Error Injection Mask High/Low: 00000001 00000001
  68. ...
  69. Memory Error Detect:
  70. Multiple Memory Errors: 0
  71. Multiple-Bit Error: 1
  72. Single-Bit Error: 0
  73. ...
  74. The Multiple Memory Errors flags not set and Multiple-Bit Error flags are set.
  75. 4. Make sure used memory region got re-initialized with 0x0123456789abcdef
  76. => md 200000
  77. 00200000: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  78. 00200010: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  79. 00200020: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  80. 00200030: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  81. 00200040: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  82. 00200050: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  83. 00200060: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  84. 00200070: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
  85. 00200080: deadbeef deadbeef deadbeef deadbeef ................
  86. 00200090: deadbeef deadbeef deadbeef deadbeef ................
  87. Test Single-Bit Error Counter and Threshold
  88. -------------------------------------------
  89. 1. Set 1 bit in Data Path Error Inject Mask
  90. => ecc injectdatahi 1
  91. 2. Enable error injection
  92. => ecc inject en
  93. 3. Let u-boot run for a with Single-Bit error injection enabled
  94. 4. Disable error injection
  95. => ecc inject dis
  96. 4. Check status
  97. => ecc status
  98. ...
  99. Memory Single-Bit Error Management (0..255):
  100. Single-Bit Error Threshold: 255
  101. Single Bit Error Counter: 199
  102. Memory Error Detect:
  103. Multiple Memory Errors: 1
  104. Multiple-Bit Error: 0
  105. Single-Bit Error: 1
  106. ...
  107. Observe that Single-Bit Error is 'on' which means that Single-Bit Error Counter
  108. reached Single-Bit Error Threshold. Multiple Memory Errors bit is also 'on', that
  109. is Counter reached Threshold more than one time (it wraps back after reaching
  110. Threshold).