Lines Matching refs:efi_reloc
114 unsigned long rel_size, void *efi_reloc, in efi_loader_relocate() argument
117 unsigned long delta = (unsigned long)efi_reloc - pref_address; in efi_loader_relocate()
132 uint64_t *x64 = efi_reloc + offset; in efi_loader_relocate()
133 uint32_t *x32 = efi_reloc + offset; in efi_loader_relocate()
134 uint16_t *x16 = efi_reloc + offset; in efi_loader_relocate()
846 void *efi_reloc; in efi_load_pe() local
907 efi_reloc = efi_alloc_aligned_pages(virt_size, in efi_load_pe()
910 if (!efi_reloc) { in efi_load_pe()
915 handle->entry = efi_reloc + opt->AddressOfEntryPoint; in efi_load_pe()
917 rel = efi_reloc + opt->DataDirectory[rel_idx].VirtualAddress; in efi_load_pe()
923 efi_reloc = efi_alloc_aligned_pages(virt_size, in efi_load_pe()
926 if (!efi_reloc) { in efi_load_pe()
931 handle->entry = efi_reloc + opt->AddressOfEntryPoint; in efi_load_pe()
933 rel = efi_reloc + opt->DataDirectory[rel_idx].VirtualAddress; in efi_load_pe()
956 memcpy(efi_reloc, efi, in efi_load_pe()
969 memset(efi_reloc + sec->VirtualAddress, 0, in efi_load_pe()
972 memcpy(efi_reloc + sec->VirtualAddress, in efi_load_pe()
978 if (efi_loader_relocate(rel, rel_size, efi_reloc, in efi_load_pe()
980 efi_free_pages((uintptr_t) efi_reloc, in efi_load_pe()
987 flush_cache((ulong)efi_reloc, in efi_load_pe()
992 loaded_image_info->image_base = efi_reloc; in efi_load_pe()