Lines Matching refs:efi_reloc
22 unsigned long rel_size, void *efi_reloc) in efi_loader_relocate() argument
35 unsigned long delta = (unsigned long)efi_reloc; in efi_loader_relocate()
36 uint64_t *x64 = efi_reloc + offset; in efi_loader_relocate()
37 uint32_t *x32 = efi_reloc + offset; in efi_loader_relocate()
38 uint16_t *x16 = efi_reloc + offset; in efi_loader_relocate()
83 void *efi_reloc; in efi_load_pe() local
129 efi_reloc = efi_alloc(virt_size, EFI_LOADER_DATA); in efi_load_pe()
130 if (!efi_reloc) { in efi_load_pe()
135 entry = efi_reloc + opt->AddressOfEntryPoint; in efi_load_pe()
137 rel = efi_reloc + opt->DataDirectory[rel_idx].VirtualAddress; in efi_load_pe()
142 efi_reloc = efi_alloc(virt_size, EFI_LOADER_DATA); in efi_load_pe()
143 if (!efi_reloc) { in efi_load_pe()
148 entry = efi_reloc + opt->AddressOfEntryPoint; in efi_load_pe()
150 rel = efi_reloc + opt->DataDirectory[rel_idx].VirtualAddress; in efi_load_pe()
160 memset(efi_reloc + sec->VirtualAddress, 0, in efi_load_pe()
162 memcpy(efi_reloc + sec->VirtualAddress, in efi_load_pe()
168 if (efi_loader_relocate(rel, rel_size, efi_reloc) != EFI_SUCCESS) { in efi_load_pe()
169 efi_free_pages((uintptr_t) efi_reloc, in efi_load_pe()
175 flush_cache((ulong)efi_reloc, in efi_load_pe()