arm64: head: Run feature override detection before mapping the kernel
authorArd Biesheuvel <ardb@kernel.org>
Wed, 14 Feb 2024 12:28:54 +0000 (13:28 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 16 Feb 2024 12:42:30 +0000 (12:42 +0000)
commitdcfe969a641984fcd2b52aa257e478443612c050
tree1e3dc78dccfd1eec67302fd5f0780a245a8943e3
parent30687dec5ed5576c743a4cd012a91f93848fe902
arm64: head: Run feature override detection before mapping the kernel

To permit the feature overrides to be taken into account before the
KASLR init code runs and the kernel mapping is created, move the
detection code to an earlier stage in the boot.

In a subsequent patch, this will be taken advantage of by merging the
preliminary and permanent mappings of the kernel text and data into a
single one that gets created and relocated before start_kernel() is
called.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240214122845.2033971-53-ardb+git@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/head.S
arch/arm64/kernel/vmlinux.lds.S