summaryrefslogtreecommitdiff
path: root/doc/usage
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-01-26 21:40:35 +0300
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-01-27 20:31:59 +0300
commit7d489128dc3721a168fd356e7accc62453e0d3e6 (patch)
treee5f7c69de632136b953cc0dd5c818599a56fd9a4 /doc/usage
parente1f0fd525fb1b635e64661de1321bf968ad80e91 (diff)
downloadu-boot-7d489128dc3721a168fd356e7accc62453e0d3e6.tar.xz
doc: man-page for mtest
Provide a man-page for the mtest command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'doc/usage')
-rw-r--r--doc/usage/cmd/mtest.rst66
-rw-r--r--doc/usage/index.rst1
2 files changed, 67 insertions, 0 deletions
diff --git a/doc/usage/cmd/mtest.rst b/doc/usage/cmd/mtest.rst
new file mode 100644
index 0000000000..81d1f8fd1b
--- /dev/null
+++ b/doc/usage/cmd/mtest.rst
@@ -0,0 +1,66 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. Copyright 2022, Heinrich Schuchardt <xypron.glpk@gmx.de>
+
+mtest command
+=============
+
+Synopsis
+--------
+
+::
+
+ mtest [start [end [pattern [iterations]]]]
+
+Description
+-----------
+
+The *mtest* command tests the random access memory. It writes long values, reads
+them back and checks for differences. The test can be interrupted with CTRL+C.
+
+The default test uses *pattern* as first value to be written and varies it
+between memory addresses.
+
+An alternative test can be selected with CONFIG_SYS_ALT_MEMTEST=y. It uses
+multiple hard coded bit patterns.
+
+With CONFIGSYS_ALT_MEMTEST_BITFLIP=y a further test is executed. It writes long
+values offset by half the size of long and checks if writing to the one address
+causes bit flips at the other address.
+
+start
+ start address of the memory range tested, defaults to
+ CONFIG_SYS_MEMTEST_START
+
+end
+ end address of the memory range tested, defaults to
+ CONFIG_SYS_MEMTEST_END. If CONFIGSYS_ALT_MEMTEST_BITFLIP=y, a value will
+ be written to this address. Otherwise it is excluded from the range.
+
+pattern
+ pattern to be written to memory. This is a 64bit value on 64bit systems
+ and a 32bit value on 32bit systems. It defaults to 0. The value is
+ ignored if CONFIG_SYS_ALT_MEMTEST=y.
+
+iterations
+ number of test repetitions. If the value is not provided the test will
+ not terminate automatically. Enter CTRL+C instead.
+
+Examples
+--------
+
+::
+
+ => mtest 1000 2000 0x55aa55aa55aa55aa 10
+ Testing 00001000 ... 00002000:
+ Pattern AA55AA55AA55AA55 Writing... Reading...
+ Tested 16 iteration(s) with 0 errors.
+
+Configuration
+-------------
+
+The mtest command is enabled by CONFIG_CMD_MEMTEST=y.
+
+Return value
+------------
+
+The return value $? is 0 (true) if the command succeeds, 1 (false) otherwise.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 72c15ca17a..2c95471f45 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -63,6 +63,7 @@ Shell commands
cmd/mbr
cmd/md
cmd/mmc
+ cmd/mtest
cmd/part
cmd/pause
cmd/pinmux