]> git.ipfire.org Git - thirdparty/linux.git/commit
arm64: head: Clear BSS and the kernel page tables in one go
authorArd Biesheuvel <ardb@kernel.org>
Wed, 14 Feb 2024 12:28:52 +0000 (13:28 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 16 Feb 2024 12:42:29 +0000 (12:42 +0000)
commitaa99aad798a8bc6d35ada2af1dc38f75d364e1ce
tree44e9896455202068b0a74b58f59ed8a977e3aca2
parent9c4cd2a7d12c2c5b11efe7831b54e46c73eb3a8c
arm64: head: Clear BSS and the kernel page tables in one go

We will move the CPU feature overrides into BSS in a subsequent patch,
and this requires that BSS is zeroed before the feature override
detection code runs. So let's map BSS read-write in the ID map, and zero
it via this mapping.

Since the kernel page tables are right next to it, and also zeroed via
the ID map, let's drop the separate clear_page_tables() function, and
just zero everything in one go.

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