x86/boot: Move the 5-level paging trampoline into /startup
authorArd Biesheuvel <ardb@kernel.org>
Tue, 1 Apr 2025 13:34:19 +0000 (15:34 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 6 Apr 2025 18:15:14 +0000 (20:15 +0200)
commit5a67da1f49cf4f16ec9966446885131dad0eb245
treef78e43c8e91a13c68fee61cce2a992aac5e2cb3b
parent5d4456fc88f7aa9bd139b7c5bd4f1c03f552b973
x86/boot: Move the 5-level paging trampoline into /startup

The 5-level paging trampoline is used by both the EFI stub and the
traditional decompressor. Move it out of the decompressor sources into
the newly minted arch/x86/boot/startup/ sub-directory which will hold
startup code that may be shared between the decompressor, the EFI stub
and the kernel proper, and needs to tolerate being called during early
boot, before the kernel virtual mapping has been created.

This will allow the 5-level paging trampoline to be used by EFI boot
images such as zboot that omit the traditional decompressor entirely.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250401133416.1436741-10-ardb+git@google.com
arch/x86/Makefile
arch/x86/boot/compressed/Makefile
arch/x86/boot/compressed/la57toggle.S [deleted file]
arch/x86/boot/startup/Makefile [new file with mode: 0644]
arch/x86/boot/startup/la57toggle.S [new file with mode: 0644]