Commit fbcafdae authored by Hari Bathini's avatar Hari Bathini Committed by Michael Ellerman

powerpc/fadump: Update documentation about OPAL platform support

With FADump support now available on both pseries and OPAL platforms,
update FADump documentation with these details.
Signed-off-by: default avatarHari Bathini <hbathini@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/156821361692.5656.11377757995827253404.stgit@hbathini.in.ibm.com
parent a4e2e2ca
...@@ -46,10 +46,9 @@ as follows: ...@@ -46,10 +46,9 @@ as follows:
These registered sections of memory are reserved by the first These registered sections of memory are reserved by the first
kernel during early boot. kernel during early boot.
- When a system crashes, the Power firmware will save - When system crashes, the Power firmware will copy the registered
the low memory (boot memory of size larger of 5% of system RAM low memory regions (boot memory) from source to destination area.
or 256MB) of RAM to the previous registered region. It will It will also save hardware PTE's.
also save system registers, and hardware PTE's.
NOTE: NOTE:
The term 'boot memory' means size of the low memory chunk The term 'boot memory' means size of the low memory chunk
...@@ -61,9 +60,9 @@ as follows: ...@@ -61,9 +60,9 @@ as follows:
the default calculated size. Use this option if default the default calculated size. Use this option if default
boot memory size is not sufficient for second kernel to boot memory size is not sufficient for second kernel to
boot successfully. For syntax of crashkernel= parameter, boot successfully. For syntax of crashkernel= parameter,
refer to Documentation/admin-guide/kdump/kdump.rst. If any offset is refer to Documentation/admin-guide/kdump/kdump.rst. If any
provided in crashkernel= parameter, it will be ignored offset is provided in crashkernel= parameter, it will be
as FADump uses a predefined offset to reserve memory ignored as FADump uses a predefined offset to reserve memory
for boot memory dump preservation in case of a crash. for boot memory dump preservation in case of a crash.
- After the low memory (boot memory) area has been saved, the - After the low memory (boot memory) area has been saved, the
...@@ -71,8 +70,9 @@ as follows: ...@@ -71,8 +70,9 @@ as follows:
*not* clear the RAM. It will then launch the bootloader, as *not* clear the RAM. It will then launch the bootloader, as
normal. normal.
- The freshly booted kernel will notice that there is a new - The freshly booted kernel will notice that there is a new node
node (ibm,dump-kernel) in the device tree, indicating that (rtas/ibm,kernel-dump on pSeries or ibm,opal/dump/mpipl-boot
on OPAL platform) in the device tree, indicating that
there is crash data available from a previous boot. During there is crash data available from a previous boot. During
the early boot OS will reserve rest of the memory above the early boot OS will reserve rest of the memory above
boot memory size effectively booting with restricted memory boot memory size effectively booting with restricted memory
...@@ -95,8 +95,11 @@ as follows: ...@@ -95,8 +95,11 @@ as follows:
# echo 1 > /sys/kernel/fadump_release_mem # echo 1 > /sys/kernel/fadump_release_mem
Please note that the firmware-assisted dump feature Please note that the firmware-assisted dump feature
is only available on Power6 and above systems with recent is only available on POWER6 and above systems on pSeries
firmware versions. (PowerVM) platform and POWER9 and above systems with OP940
or later firmware versions on PowerNV (OPAL) platform.
Note that, OPAL firmware exports ibm,opal/dump node when
FADump is supported on PowerNV platform.
Implementation details: Implementation details:
----------------------- -----------------------
...@@ -111,57 +114,76 @@ that are run. If there is dump data, then the ...@@ -111,57 +114,76 @@ that are run. If there is dump data, then the
/sys/kernel/fadump_release_mem file is created, and the reserved /sys/kernel/fadump_release_mem file is created, and the reserved
memory is held. memory is held.
If there is no waiting dump data, then only the memory required If there is no waiting dump data, then only the memory required to
to hold CPU state, HPTE region, boot memory dump and elfcore hold CPU state, HPTE region, boot memory dump, FADump header and
header, is usually reserved at an offset greater than boot memory elfcore header, is usually reserved at an offset greater than boot
size (see Fig. 1). This area is *not* released: this region will memory size (see Fig. 1). This area is *not* released: this region
be kept permanently reserved, so that it can act as a receptacle will be kept permanently reserved, so that it can act as a receptacle
for a copy of the boot memory content in addition to CPU state for a copy of the boot memory content in addition to CPU state and
and HPTE region, in the case a crash does occur. Since this reserved HPTE region, in the case a crash does occur.
memory area is used only after the system crash, there is no point in
blocking this significant chunk of memory from production kernel. Since this reserved memory area is used only after the system crash,
Hence, the implementation uses the Linux kernel's Contiguous Memory there is no point in blocking this significant chunk of memory from
Allocator (CMA) for memory reservation if CMA is configured for kernel. production kernel. Hence, the implementation uses the Linux kernel's
With CMA reservation this memory will be available for applications to Contiguous Memory Allocator (CMA) for memory reservation if CMA is
use it, while kernel is prevented from using it. With this FADump will configured for kernel. With CMA reservation this memory will be
still be able to capture all of the kernel memory and most of the user available for applications to use it, while kernel is prevented from
space memory except the user pages that were present in CMA region:: using it. With this FADump will still be able to capture all of the
kernel memory and most of the user space memory except the user pages
that were present in CMA region::
o Memory Reservation during first kernel o Memory Reservation during first kernel
Low memory Top of memory Low memory Top of memory
0 boot memory size |<--Reserved dump area --->| | 0 boot memory size |<--- Reserved dump area --->| |
| | | (Permanent Reservation) | | | | | Permanent Reservation | |
V V | | V V V | | V
+-----------+----------/ /---+---+----+--------+---+----+------+ +-----------+-----/ /---+---+----+-------+-----+-----+----+--+
| | |CPU|HPTE| DUMP |HDR|ELF | | | | |///|////| DUMP | HDR | ELF |////| |
+-----------+----------/ /---+---+----+--------+---+----+------+ +-----------+-----/ /---+---+----+-------+-----+-----+----+--+
| ^ ^ | ^ ^ ^ ^ ^
| | | | | | | | |
\ / | \ CPU HPTE / | |
----------------------------------- FADump Header ------------------------------ | |
Boot memory content gets transferred (meta area) Boot memory content gets transferred | |
to reserved area by firmware at the to reserved area by firmware at the | |
time of crash time of crash. | |
FADump Header |
(meta area) |
|
|
Metadata: This area holds a metadata struture whose
address is registered with f/w and retrieved in the
second kernel after crash, on platforms that support
tags (OPAL). Having such structure with info needed
to process the crashdump eases dump capture process.
Fig. 1 Fig. 1
o Memory Reservation during second kernel after crash o Memory Reservation during second kernel after crash
Low memory Top of memory Low memory Top of memory
0 boot memory size | 0 boot memory size |
| |<----------- Crash preserved area --------------->| | |<------------ Crash preserved area ------------>|
V V |<-- Reserved dump area -->| V V V |<--- Reserved dump area --->| |
+-----------+----------/ /---+---+----+--------+---+----+------+ +-----------+-----/ /---+---+----+-------+-----+-----+----+--+
| | |CPU|HPTE| DUMP |HDR|ELF | | | | |///|////| DUMP | HDR | ELF |////| |
+-----------+----------/ /---+---+----+--------+---+----+------+ +-----------+-----/ /---+---+----+-------+-----+-----+----+--+
| | | |
V V V V
Used by second /proc/vmcore Used by second /proc/vmcore
kernel to boot kernel to boot
+---+
|///| -> Regions (CPU, HPTE & Metadata) marked like this in the above
+---+ figures are not always present. For example, OPAL platform
does not have CPU & HPTE regions while Metadata region is
not supported on pSeries currently.
Fig. 2 Fig. 2
Currently the dump will be copied from /proc/vmcore to a new file upon Currently the dump will be copied from /proc/vmcore to a new file upon
user intervention. The dump data available through /proc/vmcore will be user intervention. The dump data available through /proc/vmcore will be
in ELF format. Hence the existing kdump infrastructure (kdump scripts) in ELF format. Hence the existing kdump infrastructure (kdump scripts)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment