summaryrefslogtreecommitdiff
path: root/kexec/arch/i386/crashdump-x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch/i386/crashdump-x86.c')
-rw-r--r--kexec/arch/i386/crashdump-x86.c8
1 files changed, 6 insertions, 2 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;