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