Ard Biesheuvel 53519ddf58 arm64: head: simplify page table mapping macros (slightly)
Simplify the macros in head.S that are used to set up the early page
tables, by switching to immediates for the number of bits that are
interpreted as the table index at each level. This makes it much
easier to infer from the instruction stream what is going on, and
reduces the number of instructions emitted substantially.

Note that the extended ID map for cases where no additional level needs
to be configured now uses a compile time size as well, which means that
we interpret up to 10 bits as the table index at the root level (for
52-bit physical addressing), without taking into account whether or not
this is supported on the current system.  However, those bits can only
be set if we are executing the image from an address that exceeds the
48-bit PA range, and are guaranteed to be cleared otherwise, and given
that we are dealing with a mapping in the lower TTBR0 range of the
address space, the result is therefore the same as if we'd mask off only
6 bits.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220624150651.1358849-6-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2022-06-24 17:18:09 +01:00
..
2022-05-23 21:06:11 -07:00
2021-10-01 13:31:00 +01:00
2022-06-17 13:55:19 -05:00
2021-08-04 16:54:36 +00:00
2022-06-10 17:29:23 +01:00
2022-03-24 11:58:57 -07:00
2020-09-07 15:00:52 +01:00
2021-03-24 20:19:30 +00:00
2022-04-04 10:32:50 +01:00
2022-01-12 16:26:58 -08:00
2022-06-03 14:05:34 -07:00
2021-04-16 16:10:36 -07:00
2022-04-04 10:32:50 +01:00