]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: head: add helper function to remap regions in early page tables
authorArd Biesheuvel <ardb@kernel.org>
Fri, 24 Jun 2022 15:06:41 +0000 (17:06 +0200)
committerWill Deacon <will@kernel.org>
Fri, 24 Jun 2022 16:18:10 +0000 (17:18 +0100)
commit579de6f9304370337c08c90e06c7b2d3a17bd68f
tree348c63400d3f9e30dba5e65bc23cd72683264de5
parentddecaca6d91b8f919b117d09119c78d04740dd3b
arm64: head: add helper function to remap regions in early page tables

The asm macros used to create the initial ID map and kernel mappings
don't support randomly remapping parts of the address space after it has
been populated. What we can do, however, given that all block or page
mappings are created at the final level, is take a subset of the mapped
range and update its attributes or output address. This will permit us
to make parts of these page tables read-only, or remap a part of it to
cover the device tree.

So add a helper that encapsulates this.

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