diff options
author | Vivek Goyal <vgoyal@in.ibm.com> | 2006-09-21 14:51:44 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2006-10-06 12:46:16 +0900 |
commit | 103c946e39eb9dd57ccbda20ac12ccb01f883c17 (patch) | |
tree | 439847d98ca015f0675690fd61cb3a16dd1c7216 /kexec/crashdump.h | |
parent | f11123aa03a7e8bfee165a56f7f1f6d8baa1d163 (diff) |
kexec-tools: x86_64 read kernel vaddr and size from /proc/kcore
o With relocatable kernel in picture, the kernel text map offset
(__START_KERNEL_map) is no longer constant. It depends on where kernel
is loaded.
o Now /proc/kcore is read to determine the virtual address the kernel
is mapped at and /porc/iomem is read for determining the physical
address where kernel is loaded at. This information is enough to
create to fill virtual address and phy addr info for elf header
mapping kernel text and data.
o Virtual address for kernel text are needed by gdb as well as crash to
retrieve the meaningful data from core file.
o This patch requires "elf note memsz" fix in the kernel. Currently
that fix is in -mm tree. It will still work with older kernels. It will
display the warning messages (/proc/kcore could not be parsed) and hardcode
the kernel virtual address and size.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/crashdump.h')
-rw-r--r-- | kexec/crashdump.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kexec/crashdump.h b/kexec/crashdump.h index 682dd53..bb3649f 100644 --- a/kexec/crashdump.h +++ b/kexec/crashdump.h @@ -5,5 +5,7 @@ extern int get_crash_notes_per_cpu(int cpu, uint64_t *addr); /* Need to find a better way to determine per cpu notes section size. */ #define MAX_NOTE_BYTES 1024 +/* Expecting ELF headers to fit in 4K. Increase it if you need more. */ +#define KCORE_ELF_HEADERS_SIZE 4096 #endif /* CRASHDUMP_H */ |