• Home
  • Raw
  • Download

Lines Matching refs:phdr

862 static bool q6v5_phdr_valid(const struct elf32_phdr *phdr)  in q6v5_phdr_valid()  argument
864 if (phdr->p_type != PT_LOAD) in q6v5_phdr_valid()
867 if ((phdr->p_flags & QCOM_MDT_TYPE_MASK) == QCOM_MDT_TYPE_HASH) in q6v5_phdr_valid()
870 if (!phdr->p_memsz) in q6v5_phdr_valid()
1094 const struct elf32_phdr *phdr; in q6v5_mpss_load() local
1137 phdr = &phdrs[i]; in q6v5_mpss_load()
1139 if (!q6v5_phdr_valid(phdr)) in q6v5_mpss_load()
1142 if (phdr->p_flags & QCOM_MDT_RELOCATABLE) in q6v5_mpss_load()
1145 if (phdr->p_paddr < min_addr) in q6v5_mpss_load()
1146 min_addr = phdr->p_paddr; in q6v5_mpss_load()
1148 if (phdr->p_paddr + phdr->p_memsz > max_addr) in q6v5_mpss_load()
1149 max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); in q6v5_mpss_load()
1173 phdr = &phdrs[i]; in q6v5_mpss_load()
1175 if (!q6v5_phdr_valid(phdr)) in q6v5_mpss_load()
1178 offset = phdr->p_paddr - mpss_reloc; in q6v5_mpss_load()
1179 if (offset < 0 || offset + phdr->p_memsz > qproc->mpss_size) { in q6v5_mpss_load()
1185 if (phdr->p_filesz > phdr->p_memsz) { in q6v5_mpss_load()
1193 ptr = memremap(qproc->mpss_phys + offset, phdr->p_memsz, MEMREMAP_WC); in q6v5_mpss_load()
1197 &qproc->mpss_phys, offset, phdr->p_memsz); in q6v5_mpss_load()
1201 if (phdr->p_filesz && phdr->p_offset < fw->size) { in q6v5_mpss_load()
1203 if (phdr->p_offset + phdr->p_filesz > fw->size) { in q6v5_mpss_load()
1212 memcpy(ptr, fw->data + phdr->p_offset, phdr->p_filesz); in q6v5_mpss_load()
1213 } else if (phdr->p_filesz) { in q6v5_mpss_load()
1217 ptr, phdr->p_filesz); in q6v5_mpss_load()
1224 if (seg_fw->size != phdr->p_filesz) { in q6v5_mpss_load()
1237 if (phdr->p_memsz > phdr->p_filesz) { in q6v5_mpss_load()
1238 memset(ptr + phdr->p_filesz, 0, in q6v5_mpss_load()
1239 phdr->p_memsz - phdr->p_filesz); in q6v5_mpss_load()
1242 size += phdr->p_memsz; in q6v5_mpss_load()
1393 const struct elf32_phdr *phdr; in qcom_q6v5_register_dump_segments() local
1413 phdr = &phdrs[i]; in qcom_q6v5_register_dump_segments()
1415 if (!q6v5_phdr_valid(phdr)) in qcom_q6v5_register_dump_segments()
1418 ret = rproc_coredump_add_custom_segment(rproc, phdr->p_paddr, in qcom_q6v5_register_dump_segments()
1419 phdr->p_memsz, in qcom_q6v5_register_dump_segments()
1425 qproc->total_dump_size += phdr->p_memsz; in qcom_q6v5_register_dump_segments()