diff options
author | Maneesh Soni <maneesh@in.ibm.com> | 2006-11-08 12:58:09 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2006-11-08 12:58:09 +0900 |
commit | 785f8f7c4e71803cc1ec73f0660e28e14696d1cf (patch) | |
tree | 2f1205d573b6ef9213a7cff6953d11e7886ab529 | |
parent | b7d1e7aab0da6904986a12f2851dd6010c5f503f (diff) |
Make sure that elf headers are created for all physical memory
o fix the regression in -kdump6 due to vmcore copy fix for x86_64 kdump
o Also made similar fix for i386
Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/crashdump-x86.c | 8 | ||||
-rw-r--r-- | kexec/arch/x86_64/crashdump-x86_64.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index d8fa091..b5d1d60 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -525,10 +525,12 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info, * A seprate program header for Backup Region*/ for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) { unsigned long long mstart, mend; + if (crash_memory_range[i].type != RANGE_RAM) + continue; mstart = crash_memory_range[i].start; mend = crash_memory_range[i].end; if (!mstart && !mend) - break; + continue; phdr = (Elf64_Phdr *) bufp; bufp += sizeof(Elf64_Phdr); phdr->p_type = PT_LOAD; @@ -620,10 +622,12 @@ static int prepare_crash_memory_elf32_headers(struct kexec_info *info, * A seprate program header for Backup Region*/ for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) { unsigned long long mstart, mend; + if (crash_memory_range[i].type != RANGE_RAM) + continue; mstart = crash_memory_range[i].start; mend = crash_memory_range[i].end; if (!mstart && !mend) - break; + continue; phdr = (Elf32_Phdr *) bufp; bufp += sizeof(Elf32_Phdr); phdr->p_type = PT_LOAD; diff --git a/kexec/arch/x86_64/crashdump-x86_64.c b/kexec/arch/x86_64/crashdump-x86_64.c index c23fb30..2b8c3fc 100644 --- a/kexec/arch/x86_64/crashdump-x86_64.c +++ b/kexec/arch/x86_64/crashdump-x86_64.c @@ -688,12 +688,12 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info, * A seprate program header for Backup Region*/ for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) { unsigned long long mstart, mend; + if (crash_memory_range[i].type != RANGE_RAM) + continue; mstart = crash_memory_range[i].start; mend = crash_memory_range[i].end; if (!mstart && !mend) - break; - if (crash_memory_range[i].type != RANGE_RAM) - break; + continue; phdr = (Elf64_Phdr *) bufp; bufp += sizeof(Elf64_Phdr); phdr->p_type = PT_LOAD; |