kdump saves first 640kB backup region for BIOS of the second kernel to
boot. We should read the backup region instead if kdump has run at
crash.
Surely if kdump has not run, we don't do any special thing. Now we
check this by checking if the backup region is full of 0.
Note that this initialization must be performed before trying to read
memory that requres paging to access such as VMALLOC'ed memory because
the first 640kB could contain page table entries.
This patch implements:
1. identify location of the backup region by searching kexec
resources, and put the data, and
2. read backup region if read to the first 640kB memory is
requested; but only if kdump has run at crash.
Signed-off-by: HATAYAMA Daisuke <d.hatayama(a)jp.fujitsu.com>
---
defs.h | 2 +
main.c | 3 +
sadump.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sadump.h | 6 ++
4 files changed, 192 insertions(+), 0 deletions(-)