linux/arch/powerpc
Mahesh Salgaonkar 2df173d9e8 fadump: Initialize elfcore header and add PT_LOAD program headers.
Build the crash memory range list by traversing through system memory during
the first kernel before we register for firmware-assisted dump. After the
successful dump registration, initialize the elfcore header and populate
PT_LOAD program headers with crash memory ranges. The elfcore header is
saved in the scratch area within the reserved memory. The scratch area starts
at the end of the memory reserved for saving RMR region contents. The
scratch area contains fadump crash info structure that contains magic number
for fadump validation and physical address where the eflcore header can be
found. This structure will also be used to pass some important crash info
data to the second kernel which will help second kernel to populate ELF core
header with correct data before it gets exported through /proc/vmcore. Since
the firmware preserves the entire partition memory at the time of crash the
contents of the scratch area will be preserved till second kernel boot.

Since the memory dump exported through /proc/vmcore is in ELF format similar
to kdump, it will help us to reuse the kdump infrastructure for dump capture
and filtering. Unlike phyp dump, userspace tool does not need to refer any
sysfs interface while reading /proc/vmcore.

NOTE: The current design implementation does not address a possibility of
introducing additional fields (in future) to this structure without affecting
compatibility. It's on TODO list to come up with better approach to
address this.

Reserved dump area start => +-------------------------------------+
                            |  CPU state dump data                |
                            +-------------------------------------+
                            |  HPTE region data                   |
                            +-------------------------------------+
                            |  RMR region data                    |
Scratch area start       => +-------------------------------------+
                            |  fadump crash info structure {      |
                            |     magic nummber                   |
                     +------|---- elfcorehdr_addr                 |
                     |      |  }                                  |
                     +----> +-------------------------------------+
                            |  ELF core header                    |
Reserved dump area end   => +-------------------------------------+

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-23 10:50:01 +11:00
..
boot powerpc/mpic: Add "last-interrupt-source" property to override hardware 2012-02-23 10:50:00 +11:00
configs powerpc: Remove legacy iSeries from ppc64_defconfig 2012-02-16 16:15:08 +11:00
include/asm fadump: Initialize elfcore header and add PT_LOAD program headers. 2012-02-23 10:50:01 +11:00
kernel fadump: Initialize elfcore header and add PT_LOAD program headers. 2012-02-23 10:50:01 +11:00
kvm Merge branch 'kvm-updates/3.3' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-01-10 09:57:11 -08:00
lib powerpc: POWER7 optimised copy_to_user/copy_from_user using VMX 2011-12-19 14:40:40 +11:00
math-emu powerpc/math_emu/efp: Look for errata handler when type mismatches 2011-10-06 23:36:47 -05:00
mm fadump: Register for firmware assisted dump. 2012-02-23 10:50:01 +11:00
net net: filter: BPF 'JIT' compiler for PPC64 2011-07-21 12:38:32 -07:00
oprofile powerpc/oprofile: Handle events that raise an exception without overflowing 2011-05-26 13:38:57 +10:00
platforms powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag 2012-02-23 10:50:00 +11:00
sysdev powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag 2012-02-23 10:50:00 +11:00
xmon powerpc/xmon: Fix #if typo for systems without MSR[RI] 2011-11-25 14:11:28 +11:00
Kconfig fadump: Reserve the memory for firmware assisted dump. 2012-02-23 10:50:01 +11:00
Kconfig.debug powerpc: Implement CONFIG_STRICT_DEVMEM 2011-11-28 11:42:08 +11:00
Makefile powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00