summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Lan <jlan@sgi.com>2008-03-03 17:53:26 -0800
committerSimon Horman <horms@verge.net.au>2008-03-04 11:47:54 +0900
commitf4bf231af8a8c29ba0908551ed7582b5dc33586d (patch)
treef0263d778a04b37ac38594a3bb4149208763ef81
parent8cfe9008523f7459aea9275e6c2f57e2948890e5 (diff)
ia64 kern_vaddr_start was calculated incorrectly
I tested in a rhel5.1 root with: 2.6.24 kernel kexec-tools-testing-20080227 crash-4.0-5.1 Crash failed to initialize: crash: read error: kernel virtual address: a0000001007f0868 type: "kernel_config_data" WARNING: cannot read kernel_config_data crash: read error: kernel virtual address: a000000100f370b0 type: "xtime" It turned out that the kexec sets info->kern_vaddr_start incorrectly on ia64 platform. Jonathan Lim posted a fix to the fastboot list in March 2007: https://lists.linux-foundation.org/pipermail/fastboot/2007-March/013645.html This patch derived from Jonathan's patch, but fixes the problem at kexec/arch/ia64/crashdump-ia64.c. Signed-off-by: Jay Lan <jlan@sgi.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/ia64/crashdump-ia64.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/kexec/arch/ia64/crashdump-ia64.c b/kexec/arch/ia64/crashdump-ia64.c
index e365b3e..9cd13aa 100644
--- a/kexec/arch/ia64/crashdump-ia64.c
+++ b/kexec/arch/ia64/crashdump-ia64.c
@@ -223,9 +223,21 @@ int load_crashdump_segments(struct kexec_info *info, struct mem_ehdr *ehdr,
void *tmp;
if (info->kexec_flags & KEXEC_ON_CRASH ) {
if (get_crash_memory_ranges(&mem_range, &nr_ranges) == 0) {
+ int i;
info->kern_paddr_start = kernel_code_start;
- info->kern_vaddr_start = LOAD_OFFSET;
+ for (i=0; i < nr_ranges; i++) {
+ unsigned long long mstart = crash_memory_range[i].start;
+ unsigned long long mend = crash_memory_range[i].end;
+ if (!mstart && !mend)
+ continue;
+ if (kernel_code_start >= mstart &&
+ kernel_code_start < mend) {
+ info->kern_vaddr_start = mstart +
+ LOAD_OFFSET;
+ break;
+ }
+ }
info->kern_size = kernel_code_end - kernel_code_start + 1;
if (crash_create_elf64_headers(info, &elf_info,
crash_memory_range,