[PATCH 0/6] kdump support for ppc64

R Sharada sharada at in.ibm.com
Tue Jan 17 02:07:12 EST 2006


The patches that follow implement the kdump support for 
ppc64, built on top of the kexec infrastructure.

The set contains 6 patches:

- ppc64-fix-function-parameters.patch
  - this is required for basic kexec working on ppc64 for
    newer 2.6 kernels.
  - it fixes some function prototype changes that were made
    in arch independent code that affects ppc64 compilation
  - fixes some variable names, to keep in line with the
    changed kernel names (kernel_end, htab_base, htab_size)

- ppc64-kdump-prepare-device-tree.patch
  - this patch adds the code for add_usable_mem_property to
    create the usable-memory property
    (thanks to Haren for this implementation)
  - adds code to modify commandline for bootargs
  - adds code to modify the initrd device-tree
    properties 
    (thanks to Mohan for this fix)
  - includes some miscellaneous cleanups

- ppc64-kdump-crash-memory-support.patch
  - this patch adds all the support for creating the 
    various memory ranges required for creating elf headers
    for dump, memory regions to be excluded from the second
    kernel boot (similar to memmap option).
  - adds code to calculate memory regions to create elf 
    headers for. excludes rtas region if it is within crash
    reserved region
  - adds code to read linux,crashkernel-base and 
    linux,crashkernel-size values from device-tree and 
    limit mem_min and mem_max for kdump case
  - adds code for adding usable memmory regions which is
    used by add_usablem_mem_property
    (thanks to Haren for this implementation)

- ppc64-kdump-crash-segments-support.patch
  - this patch implements the code to load crashdump
    segments
  - adds code to add the additional commandline 
    parameters required for crashdump
  - other miscellaneous cleanups and code re-order

- ppc64-kdump-elf-hdr-generation.patch
  - creates elf core headers for the crash_memory_regions

- ppc64-kdump-purgatory-backup-support.patch
  (thanks to Mohan for this getting this functionality
  working)
  - changes v2wrap.S to make secondary cpus spin 
    directly in v2wrap code
  - adds code to use elf_rel_xx functions to retrieve and
    set the values for the variables used in purgatory
    (panic_kernel, backup_start, dt_offset, etc)
  - loads device-tree now as a separate segment
  - other miscellaneous compiler warning fixes in common
    kexec code

Besides this, thanks to Haren and Mohan for all the 
intermediate testing, reporting bugs and providing fixes

These patches were created on top of the following level of
kexec-tools:

- kexec-tools-1.101.tar.gz (from eric biederman's site or 
from lse site) +
- kexec-tools-1.101-kdump.patch (consolidated patch posted
on http://lse.sf.net/kdump) +
- the 1-line patch posted by Mark Williamson
http://lists.osdl.org/pipermail/fastboot/2005-June/001584.html

The patches have been tested on the following level of 
kernel sources:

- 2.6.15-git11 linux source + 
Haren's 2 patches, which were posted on the linuxppc64-dev
list
- http://ozlabs.org/pipermail/linuxppc64-dev/2006-January/007624.html (fix for crash-notes)
- http://ozlabs.org/pipermail/linuxppc64-dev/2006-January/007314.html (initrd fix for free_initrd)


Kernel Requirements:
--------------------

2.6 kernel with kexec and kdump support
(CONFIG_KEXEC and CONFIG_CRASH_DUMP)
- kexec requires CONFIG_KEXEC to be set to y 
- kdump requires CONFIG_KEXEC, CONFIG_CRASH_DUMP,
CONFIG_EMBEDDED, CONFIG_PROC_VMCORE

Note: At the moment, both require CONFIG_NUMA to be not set

Test Status:
------------

They have been tested on Power5, 4 CPU, 12GB RAM p550, for
1. kexec load and kexec reboot (using kexec -l and kexec -e)
  (with and without ramdisk)
2. kexec load on panic and kdump reboot (using kexec -p and
  alt-sysrq-c trigger via /proc interface)
  (with and without ramdisk)

The ramdisk tests were tried with ipr driver built as module

Test Results:
-------------
- Normal kexec works fine and all drivers come up ok.
- Kdump triggered kexec reboot brings up the system ok to
login prompt. However, n/w interface and usb drivers fail
to come up.
- /proc/vmcore is generated and copied over successfully in
the kdump case
- The vmcore thus generated was able to show backtraces 
using gdb

Known issues:
-------------

- During crashdump reboot, usb and network fails to come up
- For now, the kexec kernels have to be built as non-NUMA.
(NUMA kernels seem to panic in find_busiest_group)

Commandline Syntax to use the tools:
------------------------------------

Note: parameters in [] braces are optional

Normal kexec load and reboot:
For load:
./kexec -l <vmlinux> [--append="commandline options"] 
[--ramdisk=<ramdisk>]
For reboot:
./kexec -e

kdump panic kernel load and reboot:
For load:
./kexec -p <vmlinux> [--append="commandline options"]
[--ramdisk=<ramdisk>]
For triggering crashdump:
echo c > /proc/sysrq-trigger

Review and test comments, inputs are welcome 

Thanks and Regards,
Sharada



More information about the Linuxppc64-dev mailing list