diff options
| author | WANG Rui <r@hev.cc> | 2026-04-27 16:47:20 +0800 |
|---|---|---|
| committer | Ard Biesheuvel <ardb@kernel.org> | 2026-04-29 08:56:16 +0200 |
| commit | ad6f4f3ea72f866176f9dd6031c8778da088c686 (patch) | |
| tree | 6bdb36f7fd47166e471790a95595b6d13743ae0c | |
| parent | 883a32793c86091ea37bb84f88cc697d019e7a5d (diff) | |
efi/loongarch: Implement efi_cache_sync_image()
Provide a LoongArch implementation of efi_cache_sync_image() to ensure
instruction cache coherency after the kernel image is relocated.
Signed-off-by: WANG Rui <r@hev.cc>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
| -rw-r--r-- | drivers/firmware/efi/libstub/loongarch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/loongarch.c b/drivers/firmware/efi/libstub/loongarch.c index 9825f5218137..f7938d5c196a 100644 --- a/drivers/firmware/efi/libstub/loongarch.c +++ b/drivers/firmware/efi/libstub/loongarch.c @@ -18,6 +18,11 @@ efi_status_t check_platform_features(void) return EFI_SUCCESS; } +void efi_cache_sync_image(unsigned long image_base, unsigned long alloc_size) +{ + asm volatile ("ibar 0" ::: "memory"); +} + struct exit_boot_struct { efi_memory_desc_t *runtime_map; int runtime_entry_count; |
