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

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.

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] 5+ messages in thread

end of thread, other threads:[~2026-04-27  8:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27  3:44 [PATCH 0/2] efi/libstub: Ensure instruction cache coherency after kernel relocation WANG Rui
2026-04-27  3:44 ` [PATCH 1/2] efi/loongarch: Implement efi_cache_sync_image WANG Rui
2026-04-27  8:09   ` Huacai Chen
2026-04-27  3:44 ` [PATCH 2/2] efi/libstub: Synchronize instruction cache after kernel relocation WANG Rui
2026-04-27  8:09   ` Huacai Chen

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