x86/boot: Move early kernel mapping code into startup/
authorArd Biesheuvel <ardb@kernel.org>
Thu, 10 Apr 2025 13:41:21 +0000 (15:41 +0200)
committerIngo Molnar <mingo@kernel.org>
Sat, 12 Apr 2025 09:13:05 +0000 (11:13 +0200)
commitdbe0ad775cbbd614583409d96abbc8ea7edb5eb4
tree887785965e04d3fe00b98078a6fbc9805d5055b6
parent4cecebf200efea0fc865b5656f6d12ead2eb5573
x86/boot: Move early kernel mapping code into startup/

The startup code that constructs the kernel virtual mapping runs from
the 1:1 mapping of memory itself, and therefore, cannot use absolute
symbol references. Before making changes in subsequent patches, move
this code into a separate source file under arch/x86/boot/startup/ where
all such code will be kept from now on.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Dionna Amalie Glaze <dionnaglaze@google.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kevin Loughlin <kevinloughlin@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: linux-efi@vger.kernel.org
Link: https://lore.kernel.org/r/20250410134117.3713574-16-ardb+git@google.com
arch/x86/boot/startup/Makefile
arch/x86/boot/startup/map_kernel.c [new file with mode: 0644]
arch/x86/kernel/head64.c