arm64: kexec: Perform relocations before disabling the MMU
Now that the kexec relocation code only runs when necessary, runs at EL1
and has a safe copy of the linear-map loaded, we can change it to leave
the MMU enabled until after the relocation work has been done.
This avoids the performance cost of reading and writing a large initramfs
with non-cacheable attributes.
To do this, we need to idmap the relocation code, and add the MMU
disable after it has done its wrok.
kexec used to invalidate the dcache, then make non-cacheable writes
with the new data. If we make cachable writes, we need to clean and
invalidate the dcache once the write has completed.
Signed-off-by:
James Morse <james.morse@arm.com>
Loading
Please register or sign in to comment