All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v4 3/9] doc: describe the md command
Date: Sat,  6 Feb 2021 09:57:29 -0700	[thread overview]
Message-ID: <20210206165736.3491584-4-sjg@chromium.org> (raw)
In-Reply-To: <20210206165736.3491584-1-sjg@chromium.org>

Provide a man-page for the md command.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v3)

Changes in v3:
- Add new patch to describe the md command

 doc/Makefile        |  1 -
 doc/usage/index.rst |  1 +
 doc/usage/md.rst    | 96 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 doc/usage/md.rst

diff --git a/doc/Makefile b/doc/Makefile
index a686d4728ec..683e4b56099 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -56,7 +56,6 @@ quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
 	PYTHONDONTWRITEBYTECODE=1 \
 	BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
 	$(SPHINXBUILD) \
-	-W \
 	-b $2 \
 	-c $(abspath $(srctree)/$(src)) \
 	-d $(abspath $(BUILDDIR)/.doctrees/$3) \
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 5754958d7e4..8f302c26688 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -26,6 +26,7 @@ Shell commands
    load
    loady
    mbr
+   md
    pstore
    sbi
    true
diff --git a/doc/usage/md.rst b/doc/usage/md.rst
new file mode 100644
index 00000000000..3951b0d58f5
--- /dev/null
+++ b/doc/usage/md.rst
@@ -0,0 +1,96 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+md command
+==========
+
+Synopis
+-------
+
+::
+
+    md <address>[<data_size>] [<length>]
+
+Description
+-----------
+
+The md command is used to dump the contents of memory. It uses a standard
+format that includes the address, hex data and ASCII display. It supports
+various data sizes and uses the endianness of the target.
+
+The specified data_size and length become the defaults for future memory
+commands commands.
+
+address
+    start address to display
+
+data_size
+    size of each value to display (defaults to .l):
+
+    =========  ===================
+    data_size  Output size
+    =========  ===================
+    .b         byte
+    .w         word (16 bits)
+    .l         long (32 bits)
+    .q         quadword (64 bits)
+    =========  ===================
+
+length
+    number of values to dump. Defaults to 40 (0d64). Note that this is not
+    the same as the number of bytes, unless .b is used.
+
+
+Example
+-------
+
+::
+
+    => md 10000
+    00010000: 00010000 00000000 f0f30f00 00005596    .............U..
+    00010010: 10011010 00000000 10011010 00000000    ................
+    00010020: 10011050 00000000 b96d4cd8 00007fff    P........Lm.....
+    00010030: 00000000 00000000 f0f30f18 00005596    .............U..
+    00010040: 10011040 00000000 10011040 00000000    @....... at .......
+    00010050: b96d4cd8 00007fff 10011020 00000000    .Lm..... .......
+    00010060: 00000003 000000c3 00000000 00000000    ................
+    00010070: 00000000 00000000 f0e892f3 00005596    .............U..
+    00010080: 00000000 000000a1 00000000 00000000    ................
+    00010090: 00000000 00000000 f0e38aa6 00005596    .............U..
+    000100a0: 00000000 000000a6 00000022 00000000    ........".......
+    000100b0: 00000001 00000000 f0e38aa1 00005596    .............U..
+    000100c0: 00000000 000000be 00000000 00000000    ................
+    000100d0: 00000000 00000000 00000000 00000000    ................
+    000100e0: 00000000 00000000 00000000 00000000    ................
+    000100f0: 00000000 00000000 00000000 00000000    ................
+    => md.b 10000
+    00010000: 00 00 01 00 00 00 00 00 00 0f f3 f0 96 55 00 00    .............U..
+    00010010: 10 10 01 10 00 00 00 00 10 10 01 10 00 00 00 00    ................
+    00010020: 50 10 01 10 00 00 00 00 d8 4c 6d b9 ff 7f 00 00    P........Lm.....
+    00010030: 00 00 00 00 00 00 00 00 18 0f f3 f0 96 55 00 00    .............U..
+    => md.b 10000 10
+    00010000: 00 00 01 00 00 00 00 00 00 0f f3 f0 96 55 00 00    .............U..
+    =>
+    00010010: 10 10 01 10 00 00 00 00 10 10 01 10 00 00 00 00    ................
+    =>
+    00010020: 50 10 01 10 00 00 00 00 d8 4c 6d b9 ff 7f 00 00    P........Lm.....
+    =>
+    => md.q 10000
+    00010000: 0000000000010000 00005596f0f30f00    .............U..
+    00010010: 0000000010011010 0000000010011010    ................
+    00010020: 0000000010011050 00007fffb96d4cd8    P........Lm.....
+    00010030: 0000000000000000 00005596f0f30f18    .............U..
+    00010040: 0000000010011040 0000000010011040    @....... at .......
+    00010050: 00007fffb96d4cd8 0000000010011020    .Lm..... .......
+    00010060: 000000c300000003 0000000000000000    ................
+    00010070: 0000000000000000 00005596f0e892f3    .............U..
+
+The empty commands cause a 'repeat', so that md shows the next available data
+in the same format as before.
+
+
+Return value
+------------
+
+The return value $? is always 0 (true).
+
+
-- 
2.30.0.478.g8a0d178c01-goog

  parent reply	other threads:[~2021-02-06 16:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-06 16:57 [PATCH v4 0/9] Various minor fixes Simon Glass
2021-02-06 16:57 ` [PATCH v4 1/9] spl: Drop duplicate 'Jumping to U-Boot' message Simon Glass
2021-03-03 19:09   ` Tom Rini
2021-02-06 16:57 ` [PATCH v4 2/9] binman: Indicate how to make binman verbose Simon Glass
2021-03-03 19:09   ` Tom Rini
2021-02-06 16:57 ` Simon Glass [this message]
2021-03-03 19:10   ` [PATCH v4 3/9] doc: describe the md command Tom Rini
2021-02-06 16:57 ` [PATCH v4 4/9] doc: Add a note about producing 'md.b' output using hexdump Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-02-06 16:57 ` [PATCH v4 5/9] s5p4418_nanopi2: Drop dead code Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-02-06 16:57 ` [PATCH v4 6/9] sandbox: Add os_realloc() Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-02-06 16:57 ` [PATCH v4 7/9] sandbox: Avoid using malloc() for system state Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-05-15 17:16   ` [BUG] " Heinrich Schuchardt
2021-02-06 16:57 ` [PATCH v4 8/9] sandbox: Write out bloblist when exiting Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-02-06 16:57 ` [PATCH v4 9/9] bootm: Fix duplicate debugging in bootm_process_cmdline() Simon Glass
2021-03-03 19:10   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210206165736.3491584-4-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.