mtest.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. .. Copyright 2022, Heinrich Schuchardt <xypron.glpk@gmx.de>
  3. mtest command
  4. =============
  5. Synopsis
  6. --------
  7. ::
  8. mtest [start [end [pattern [iterations]]]]
  9. Description
  10. -----------
  11. The *mtest* command tests the random access memory. It writes long values, reads
  12. them back and checks for differences. The test can be interrupted with CTRL+C.
  13. The default test uses *pattern* as first value to be written and varies it
  14. between memory addresses.
  15. An alternative test can be selected with CONFIG_SYS_ALT_MEMTEST=y. It uses
  16. multiple hard coded bit patterns.
  17. With CONFIGSYS_ALT_MEMTEST_BITFLIP=y a further test is executed. It writes long
  18. values offset by half the size of long and checks if writing to the one address
  19. causes bit flips at the other address.
  20. start
  21. start address of the memory range tested, defaults to
  22. CONFIG_SYS_MEMTEST_START
  23. end
  24. end address of the memory range tested, defaults to
  25. CONFIG_SYS_MEMTEST_END. If CONFIGSYS_ALT_MEMTEST_BITFLIP=y, a value will
  26. be written to this address. Otherwise it is excluded from the range.
  27. pattern
  28. pattern to be written to memory. This is a 64bit value on 64bit systems
  29. and a 32bit value on 32bit systems. It defaults to 0. The value is
  30. ignored if CONFIG_SYS_ALT_MEMTEST=y.
  31. iterations
  32. number of test repetitions. If the value is not provided the test will
  33. not terminate automatically. Enter CTRL+C instead.
  34. Examples
  35. --------
  36. ::
  37. => mtest 1000 2000 0x55aa55aa55aa55aa 10
  38. Testing 00001000 ... 00002000:
  39. Pattern AA55AA55AA55AA55 Writing... Reading...
  40. Tested 16 iteration(s) with 0 errors.
  41. Configuration
  42. -------------
  43. The mtest command is enabled by CONFIG_CMD_MEMTEST=y.
  44. Return value
  45. ------------
  46. The return value $? is 0 (true) if the command succeeds, 1 (false) otherwise.