Merge "msm: ipa3: Changes to load signed elf."
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
a9e3762ee0
@@ -11702,12 +11702,15 @@ int ipa3_load_fws(const struct firmware *firmware, phys_addr_t gsi_mem_base,
|
|||||||
|
|
||||||
ehdr = (struct elf32_hdr *) firmware->data;
|
ehdr = (struct elf32_hdr *) firmware->data;
|
||||||
ipa_assert_on(!ehdr);
|
ipa_assert_on(!ehdr);
|
||||||
if (ehdr->e_phnum != 3) {
|
if (ehdr->e_phnum != 3 && ehdr->e_phnum != 5) {
|
||||||
IPAERR("Unexpected number of ELF program headers\n");
|
IPAERR("Unexpected number of ELF program headers\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
phdr = (struct elf32_phdr *)(firmware->data + sizeof(*ehdr));
|
phdr = (struct elf32_phdr *)(firmware->data + sizeof(*ehdr));
|
||||||
|
|
||||||
|
if (ehdr->e_phnum == 5)
|
||||||
|
phdr = phdr + 2;
|
||||||
/*
|
/*
|
||||||
* Each ELF program header represents a FW image and contains:
|
* Each ELF program header represents a FW image and contains:
|
||||||
* p_vaddr : The starting address to which the FW needs to loaded.
|
* p_vaddr : The starting address to which the FW needs to loaded.
|
||||||
|
Reference in New Issue
Block a user