• Home
  • Raw
  • Download

Lines Matching refs:pi

120 arch_kexec_apply_relocations_add(struct purgatory_info *pi, Elf_Shdr *section,  in arch_kexec_apply_relocations_add()  argument
137 arch_kexec_apply_relocations(struct purgatory_info *pi, Elf_Shdr *section, in arch_kexec_apply_relocations() argument
151 struct purgatory_info *pi = &image->purgatory_info; in kimage_file_post_load_cleanup() local
162 vfree(pi->purgatory_buf); in kimage_file_post_load_cleanup()
163 pi->purgatory_buf = NULL; in kimage_file_post_load_cleanup()
165 vfree(pi->sechdrs); in kimage_file_post_load_cleanup()
166 pi->sechdrs = NULL; in kimage_file_post_load_cleanup()
715 struct purgatory_info *pi = &image->purgatory_info; in kexec_calculate_store_digests() local
761 if (ksegment->kbuf == pi->purgatory_buf) in kexec_calculate_store_digests()
831 static int kexec_purgatory_setup_kbuf(struct purgatory_info *pi, in kexec_purgatory_setup_kbuf() argument
840 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_purgatory_setup_kbuf()
844 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_purgatory_setup_kbuf()
869 pi->purgatory_buf = kbuf->buffer; in kexec_purgatory_setup_kbuf()
877 vfree(pi->purgatory_buf); in kexec_purgatory_setup_kbuf()
878 pi->purgatory_buf = NULL; in kexec_purgatory_setup_kbuf()
892 static int kexec_purgatory_setup_sechdrs(struct purgatory_info *pi, in kexec_purgatory_setup_sechdrs() argument
904 sechdrs = vzalloc(array_size(sizeof(Elf_Shdr), pi->ehdr->e_shnum)); in kexec_purgatory_setup_sechdrs()
907 memcpy(sechdrs, (void *)pi->ehdr + pi->ehdr->e_shoff, in kexec_purgatory_setup_sechdrs()
908 pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in kexec_purgatory_setup_sechdrs()
909 pi->sechdrs = sechdrs; in kexec_purgatory_setup_sechdrs()
913 kbuf->image->start = pi->ehdr->e_entry; in kexec_purgatory_setup_sechdrs()
915 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_purgatory_setup_sechdrs()
932 pi->ehdr->e_entry >= sechdrs[i].sh_addr && in kexec_purgatory_setup_sechdrs()
933 pi->ehdr->e_entry < (sechdrs[i].sh_addr in kexec_purgatory_setup_sechdrs()
939 src = (void *)pi->ehdr + sechdrs[i].sh_offset; in kexec_purgatory_setup_sechdrs()
940 dst = pi->purgatory_buf + offset; in kexec_purgatory_setup_sechdrs()
954 struct purgatory_info *pi = &image->purgatory_info; in kexec_apply_relocations() local
957 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_apply_relocations()
959 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_apply_relocations()
976 if (relsec->sh_info >= pi->ehdr->e_shnum || in kexec_apply_relocations()
977 relsec->sh_link >= pi->ehdr->e_shnum) in kexec_apply_relocations()
980 section = pi->sechdrs + relsec->sh_info; in kexec_apply_relocations()
990 if (symtab->sh_link >= pi->ehdr->e_shnum) in kexec_apply_relocations()
999 ret = arch_kexec_apply_relocations_add(pi, section, in kexec_apply_relocations()
1002 ret = arch_kexec_apply_relocations(pi, section, in kexec_apply_relocations()
1024 struct purgatory_info *pi = &image->purgatory_info; in kexec_load_purgatory() local
1030 pi->ehdr = (const Elf_Ehdr *)kexec_purgatory; in kexec_load_purgatory()
1032 ret = kexec_purgatory_setup_kbuf(pi, kbuf); in kexec_load_purgatory()
1036 ret = kexec_purgatory_setup_sechdrs(pi, kbuf); in kexec_load_purgatory()
1046 vfree(pi->sechdrs); in kexec_load_purgatory()
1047 pi->sechdrs = NULL; in kexec_load_purgatory()
1049 vfree(pi->purgatory_buf); in kexec_load_purgatory()
1050 pi->purgatory_buf = NULL; in kexec_load_purgatory()
1061 static const Elf_Sym *kexec_purgatory_find_symbol(struct purgatory_info *pi, in kexec_purgatory_find_symbol() argument
1070 if (!pi->ehdr) in kexec_purgatory_find_symbol()
1073 ehdr = pi->ehdr; in kexec_purgatory_find_symbol()
1111 struct purgatory_info *pi = &image->purgatory_info; in kexec_purgatory_get_symbol_addr() local
1115 sym = kexec_purgatory_find_symbol(pi, name); in kexec_purgatory_get_symbol_addr()
1119 sechdr = &pi->sechdrs[sym->st_shndx]; in kexec_purgatory_get_symbol_addr()
1135 struct purgatory_info *pi = &image->purgatory_info; in kexec_purgatory_get_set_symbol() local
1140 sym = kexec_purgatory_find_symbol(pi, name); in kexec_purgatory_get_set_symbol()
1150 sec = pi->sechdrs + sym->st_shndx; in kexec_purgatory_get_set_symbol()
1158 sym_buf = (char *)pi->purgatory_buf + sec->sh_offset + sym->st_value; in kexec_purgatory_get_set_symbol()