Skip to content
Commit 04bd3b94 authored by James Morse's avatar James Morse
Browse files

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's avatarJames Morse <james.morse@arm.com>
parent c5fa35da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment