mirror of
https://xff.cz/git/u-boot/
synced 2025-09-28 05:51:17 +02:00
efi_loader: avoid duplicate weak invalidate_icache_all()
If multiple weak implementations of a weak function exist, it is unclear which one the linker should chose. cmd/cache.c already defines a weak invalidate_icache_all(). We don't need a call to invalidate_icache_all() on x86. ARM, RISC-V, and Sandbox provide an implementation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
committed by
Tom Rini
parent
15a15e3feb
commit
19d41f495a
@@ -173,11 +173,6 @@ static efi_status_t efi_loader_relocate(const IMAGE_BASE_RELOCATION *rel,
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __weak invalidate_icache_all(void)
|
|
||||||
{
|
|
||||||
/* If the system doesn't support icache_all flush, cross our fingers */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* efi_set_code_and_data_type() - determine the memory types to be used for code
|
* efi_set_code_and_data_type() - determine the memory types to be used for code
|
||||||
* and data.
|
* and data.
|
||||||
@@ -986,7 +981,13 @@ efi_status_t efi_load_pe(struct efi_loaded_image_obj *handle,
|
|||||||
/* Flush cache */
|
/* Flush cache */
|
||||||
flush_cache((ulong)efi_reloc,
|
flush_cache((ulong)efi_reloc,
|
||||||
ALIGN(virt_size, EFI_CACHELINE_SIZE));
|
ALIGN(virt_size, EFI_CACHELINE_SIZE));
|
||||||
invalidate_icache_all();
|
|
||||||
|
/*
|
||||||
|
* If on x86 a write affects a prefetched instruction,
|
||||||
|
* the prefetch queue is invalidated.
|
||||||
|
*/
|
||||||
|
if (!CONFIG_IS_ENABLED(X86))
|
||||||
|
invalidate_icache_all();
|
||||||
|
|
||||||
/* Populate the loaded image interface bits */
|
/* Populate the loaded image interface bits */
|
||||||
loaded_image_info->image_base = efi_reloc;
|
loaded_image_info->image_base = efi_reloc;
|
||||||
|
@@ -783,7 +783,12 @@ void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map)
|
|||||||
lastoff = offset;
|
lastoff = offset;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
invalidate_icache_all();
|
/*
|
||||||
|
* If on x86 a write affects a prefetched instruction,
|
||||||
|
* the prefetch queue is invalidated.
|
||||||
|
*/
|
||||||
|
if (!CONFIG_IS_ENABLED(X86))
|
||||||
|
invalidate_icache_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user