• Home
  • Raw
  • Download

Lines Matching refs:pi

94 	struct purgatory_info *pi = &image->purgatory_info;  in kimage_file_post_load_cleanup()  local
105 vfree(pi->purgatory_buf); in kimage_file_post_load_cleanup()
106 pi->purgatory_buf = NULL; in kimage_file_post_load_cleanup()
108 vfree(pi->sechdrs); in kimage_file_post_load_cleanup()
109 pi->sechdrs = NULL; in kimage_file_post_load_cleanup()
683 struct purgatory_info *pi = &image->purgatory_info; in kexec_calculate_store_digests() local
731 if (ksegment->kbuf == pi->purgatory_buf) in kexec_calculate_store_digests()
801 static int kexec_purgatory_setup_kbuf(struct purgatory_info *pi, in kexec_purgatory_setup_kbuf() argument
810 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_purgatory_setup_kbuf()
814 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_purgatory_setup_kbuf()
839 pi->purgatory_buf = kbuf->buffer; in kexec_purgatory_setup_kbuf()
847 vfree(pi->purgatory_buf); in kexec_purgatory_setup_kbuf()
848 pi->purgatory_buf = NULL; in kexec_purgatory_setup_kbuf()
862 static int kexec_purgatory_setup_sechdrs(struct purgatory_info *pi, in kexec_purgatory_setup_sechdrs() argument
874 sechdrs = vzalloc(array_size(sizeof(Elf_Shdr), pi->ehdr->e_shnum)); in kexec_purgatory_setup_sechdrs()
877 memcpy(sechdrs, (void *)pi->ehdr + pi->ehdr->e_shoff, in kexec_purgatory_setup_sechdrs()
878 pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in kexec_purgatory_setup_sechdrs()
879 pi->sechdrs = sechdrs; in kexec_purgatory_setup_sechdrs()
883 kbuf->image->start = pi->ehdr->e_entry; in kexec_purgatory_setup_sechdrs()
885 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_purgatory_setup_sechdrs()
913 pi->ehdr->e_entry >= sechdrs[i].sh_addr && in kexec_purgatory_setup_sechdrs()
914 pi->ehdr->e_entry < (sechdrs[i].sh_addr in kexec_purgatory_setup_sechdrs()
916 !WARN_ON(kbuf->image->start != pi->ehdr->e_entry)) { in kexec_purgatory_setup_sechdrs()
921 src = (void *)pi->ehdr + sechdrs[i].sh_offset; in kexec_purgatory_setup_sechdrs()
922 dst = pi->purgatory_buf + offset; in kexec_purgatory_setup_sechdrs()
936 struct purgatory_info *pi = &image->purgatory_info; in kexec_apply_relocations() local
939 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_apply_relocations()
941 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_apply_relocations()
958 if (relsec->sh_info >= pi->ehdr->e_shnum || in kexec_apply_relocations()
959 relsec->sh_link >= pi->ehdr->e_shnum) in kexec_apply_relocations()
962 section = pi->sechdrs + relsec->sh_info; in kexec_apply_relocations()
972 if (symtab->sh_link >= pi->ehdr->e_shnum) in kexec_apply_relocations()
981 ret = arch_kexec_apply_relocations_add(pi, section, in kexec_apply_relocations()
984 ret = arch_kexec_apply_relocations(pi, section, in kexec_apply_relocations()
1006 struct purgatory_info *pi = &image->purgatory_info; in kexec_load_purgatory() local
1012 pi->ehdr = (const Elf_Ehdr *)kexec_purgatory; in kexec_load_purgatory()
1014 ret = kexec_purgatory_setup_kbuf(pi, kbuf); in kexec_load_purgatory()
1018 ret = kexec_purgatory_setup_sechdrs(pi, kbuf); in kexec_load_purgatory()
1028 vfree(pi->sechdrs); in kexec_load_purgatory()
1029 pi->sechdrs = NULL; in kexec_load_purgatory()
1031 vfree(pi->purgatory_buf); in kexec_load_purgatory()
1032 pi->purgatory_buf = NULL; in kexec_load_purgatory()
1043 static const Elf_Sym *kexec_purgatory_find_symbol(struct purgatory_info *pi, in kexec_purgatory_find_symbol() argument
1052 if (!pi->ehdr) in kexec_purgatory_find_symbol()
1055 ehdr = pi->ehdr; in kexec_purgatory_find_symbol()
1093 struct purgatory_info *pi = &image->purgatory_info; in kexec_purgatory_get_symbol_addr() local
1097 sym = kexec_purgatory_find_symbol(pi, name); in kexec_purgatory_get_symbol_addr()
1101 sechdr = &pi->sechdrs[sym->st_shndx]; in kexec_purgatory_get_symbol_addr()
1117 struct purgatory_info *pi = &image->purgatory_info; in kexec_purgatory_get_set_symbol() local
1122 sym = kexec_purgatory_find_symbol(pi, name); in kexec_purgatory_get_set_symbol()
1132 sec = pi->sechdrs + sym->st_shndx; in kexec_purgatory_get_set_symbol()
1140 sym_buf = (char *)pi->purgatory_buf + sec->sh_offset + sym->st_value; in kexec_purgatory_get_set_symbol()