diff options
Diffstat (limited to 'kexec')
-rw-r--r-- | kexec/arch/ppc64/kexec-elf-ppc64.c | 6 | ||||
-rw-r--r-- | kexec/arch/ppc64/kexec-elf-rel-ppc64.c | 3 | ||||
-rw-r--r-- | kexec/arch/ppc64/kexec-ppc64.c | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/kexec/arch/ppc64/kexec-elf-ppc64.c b/kexec/arch/ppc64/kexec-elf-ppc64.c index 3550fc1..7d49d8a 100644 --- a/kexec/arch/ppc64/kexec-elf-ppc64.c +++ b/kexec/arch/ppc64/kexec-elf-ppc64.c @@ -237,13 +237,13 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len, * entry is before this one */ bb_ptr = (struct bootblock *)(seg_buf); - rsvmap_ptr = (uint64_t *)(seg_buf + bb_ptr->off_mem_rsvmap); + rsvmap_ptr = (uint64_t *)(seg_buf + be32_to_cpu(bb_ptr->off_mem_rsvmap)); while (*rsvmap_ptr || *(rsvmap_ptr+1)) rsvmap_ptr += 2; rsvmap_ptr -= 2; - *rsvmap_ptr = my_dt_offset; + *rsvmap_ptr = cpu_to_be64(my_dt_offset); rsvmap_ptr++; - *rsvmap_ptr = bb_ptr->totalsize; + *rsvmap_ptr = cpu_to_be64((uint64_t)be32_to_cpu(bb_ptr->totalsize)); #endif /* Set kernel */ diff --git a/kexec/arch/ppc64/kexec-elf-rel-ppc64.c b/kexec/arch/ppc64/kexec-elf-rel-ppc64.c index 54d506a..5fc2f87 100644 --- a/kexec/arch/ppc64/kexec-elf-rel-ppc64.c +++ b/kexec/arch/ppc64/kexec-elf-rel-ppc64.c @@ -7,9 +7,6 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr) { - if (ehdr->ei_data != ELFDATA2MSB) { - return 0; - } if (ehdr->ei_class != ELFCLASS64) { return 0; } diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c index 21bd0a8..af9112b 100644 --- a/kexec/arch/ppc64/kexec-ppc64.c +++ b/kexec/arch/ppc64/kexec-ppc64.c @@ -532,6 +532,7 @@ static int get_devtree_details(unsigned long kexec_flags) perror(fname); goto error_openfile; } + rtas_base = be32_to_cpu(rtas_base); memset(fname, 0, sizeof(fname)); strcpy(fname, device_tree); strcat(fname, dentry->d_name); @@ -545,6 +546,7 @@ static int get_devtree_details(unsigned long kexec_flags) goto error_openfile; } closedir(cdir); + rtas_size = be32_to_cpu(rtas_size); /* Add rtas to exclude_range */ exclude_range[i].start = rtas_base; exclude_range[i].end = rtas_base + rtas_size; @@ -798,6 +800,7 @@ const struct arch_map_entry arches[] = { * So pass KEXEC_ARCH_PPC64 here */ { "ppc64", KEXEC_ARCH_PPC64 }, + { "ppc64le", KEXEC_ARCH_PPC64 }, { NULL, 0 }, }; |