aboutsummaryrefslogtreecommitdiff
path: root/doc/usage/pstore.rst
diff options
context:
space:
mode:
authorBin Meng2022-03-28 11:02:56 +0800
committerHeinrich Schuchardt2022-03-31 19:06:16 +0200
commit34e452dd0252c162242a718ed5287a2af622b7d7 (patch)
treea8a179f5b78f829947fdd67ec0f6b685dff46780 /doc/usage/pstore.rst
parent572934d15a67ce5643472b5f6d3151476cc2b89d (diff)
doc: usage: Group all shell command docs into cmd/ sub-directory
Currently all shell command docs are put in the doc/usage root. Let's group them into cmd/ sub-directory. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'doc/usage/pstore.rst')
-rw-r--r--doc/usage/pstore.rst93
1 files changed, 0 insertions, 93 deletions
diff --git a/doc/usage/pstore.rst b/doc/usage/pstore.rst
deleted file mode 100644
index 1c8374513aa..00000000000
--- a/doc/usage/pstore.rst
+++ /dev/null
@@ -1,93 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0+
-
-pstore command
-==============
-
-Synopsis
---------
-
-::
-
- pstore set <addr> <len> [record-size] [console-size] [ftrace-size] [pmsg_size] [ecc-size]
- pstore display [record-type] [nb]
- pstore save <interface> <dev[:part]> <directory-path>
-
-Design
-------
-
-Linux PStore and Ramoops modules (Linux config options PSTORE and PSTORE_RAM)
-allow to use memory to pass data from the dying breath of a crashing kernel to
-its successor. This command allows to read those records from U-Boot command
-line.
-
-Ramoops is an oops/panic logger that writes its logs to RAM before the system
-crashes. It works by logging oopses and panics in a circular buffer. Ramoops
-needs a system with persistent RAM so that the content of that area can survive
-after a restart.
-
-Ramoops uses a predefined memory area to store the dump.
-
-Ramoops parameters can be passed as kernel parameters or through Device Tree,
-i.e.::
-
- ramoops.mem_address=0x30000000 ramoops.mem_size=0x100000 ramoops.record_size=0x2000 ramoops.console_size=0x2000 memmap=0x100000$0x30000000
-
-The same values should be set in U-Boot to be able to retrieve the records.
-This values can be set at build time in U-Boot configuration file, or at runtime.
-U-Boot automatically patches the Device Tree to pass the Ramoops parameters to
-the kernel.
-
-The PStore configuration parameters are:
-
-======================= ==========
- Name Default
-======================= ==========
-CMD_PSTORE_MEM_ADDR
-CMD_PSTORE_MEM_SIZE 0x10000
-CMD_PSTORE_RECORD_SIZE 0x1000
-CMD_PSTORE_CONSOLE_SIZE 0x1000
-CMD_PSTORE_FTRACE_SIZE 0x1000
-CMD_PSTORE_PMSG_SIZE 0x1000
-CMD_PSTORE_ECC_SIZE 0
-======================= ==========
-
-Records sizes should be a power of 2.
-The memory size and the record/console size must be non-zero.
-
-Multiple 'dump' records can be stored in the memory reserved for PStore.
-The memory size has to be larger than the sum of the record sizes, i.e.::
-
- MEM_SIZE >= RECORD_SIZE * n + CONSOLE_SIZE + FTRACE_SIZE + PMSG_SIZE
-
-Usage
------
-
-Generate kernel crash
-~~~~~~~~~~~~~~~~~~~~~
-
-For test purpose, you can generate a kernel crash by setting reboot timeout to
-10 seconds and trigger a panic
-
-.. code-block:: console
-
- $ sudo sh -c "echo 1 > /proc/sys/kernel/sysrq"
- $ sudo sh -c "echo 10 > /proc/sys/kernel/panic"
- $ sudo sh -c "echo c > /proc/sysrq-trigger"
-
-Retrieve logs in U-Boot
-~~~~~~~~~~~~~~~~~~~~~~~
-
-First of all, unless PStore parameters as been set during U-Boot configuration
-and match kernel ramoops parameters, it needs to be set using 'pstore set', e.g.::
-
- => pstore set 0x30000000 0x100000 0x2000 0x2000
-
-Then all available dumps can be displayed
-using::
-
- => pstore display
-
-Or saved to an existing directory in an Ext2 or Ext4 partition, e.g. on root
-directory of 1st partition of the 2nd MMC::
-
- => pstore save mmc 1:1 /