arm64: head: create a temporary FDT mapping in the initial ID map
authorArd Biesheuvel <ardb@kernel.org>
Fri, 24 Jun 2022 15:06:44 +0000 (17:06 +0200)
committerWill Deacon <will@kernel.org>
Fri, 24 Jun 2022 16:18:10 +0000 (17:18 +0100)
commitf70b3a23324a2d31efb83cc01302acb343e4ec1b
treeebaf6a32b781aa2e9254c7ccf11ab806bfc84886
parentd7bea550279db28cd154fd54843ebc858ffdf0b7
arm64: head: create a temporary FDT mapping in the initial ID map

We need to access the DT very early to get at the command line and the
KASLR seed, which currently means we rely on some hacks to call into the
kernel before really calling into the kernel, which is undesirable.

So instead, let's create a mapping for the FDT in the initial ID map,
which is feasible now that it has been extended to cover more than a
single page or block, and can be updated in place to remap other output
addresses.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220624150651.1358849-15-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/kernel-pgtable.h
arch/arm64/kernel/head.S