public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH v2 0/2] efi/libstub: Ensure instruction cache coherency after kernel relocation
@ 2026-04-27  8:47 WANG Rui
  2026-04-27  8:47 ` [RESEND PATCH v2 1/2] efi/loongarch: Implement efi_cache_sync_image() WANG Rui
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: WANG Rui @ 2026-04-27  8:47 UTC (permalink / raw)
  To: Ard Biesheuvel, Huacai Chen
  Cc: Ilias Apalodimas, WANG Xuerui, linux-efi, linux-kernel, loongarch,
	WANG Rui

Changes since [v1]:
  * Move efi_cache_sync_image() after check_platform_features(), matching arm64.
  * Add "()" after function name in the subject.

The EFI stub relocates the kernel image by copying it to a new memory
location using memcpy(). On architectures where the instruction and data
caches are not automatically coherent, the copied instructions may not be
visible to the instruction fetch unit without explicit cache maintenance.

This series adds the missing call to efi_cache_sync_image() in the generic
relocation path, and provides a LoongArch implementation using the ibar
instruction to ensure instruction fetches observe the updated contents.

[v1]: https://lore.kernel.org/loongarch/20260427034451.717817-1-r@hev.cc

WANG Rui (2):
  efi/loongarch: Implement efi_cache_sync_image
  efi/libstub: Synchronize instruction cache after kernel relocation

 drivers/firmware/efi/libstub/loongarch.c | 5 +++++
 drivers/firmware/efi/libstub/relocate.c  | 1 +
 2 files changed, 6 insertions(+)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-29  7:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27  8:47 [RESEND PATCH v2 0/2] efi/libstub: Ensure instruction cache coherency after kernel relocation WANG Rui
2026-04-27  8:47 ` [RESEND PATCH v2 1/2] efi/loongarch: Implement efi_cache_sync_image() WANG Rui
2026-04-27  8:47 ` [RESEND PATCH v2 2/2] efi/libstub: Synchronize instruction cache after kernel relocation WANG Rui
2026-04-27 16:11 ` [RESEND PATCH v2 0/2] efi/libstub: Ensure instruction cache coherency " Ard Biesheuvel
2026-04-28 11:07   ` Ard Biesheuvel
2026-04-29  7:32     ` Huacai Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox