OSDN Git Service

ARM: decompressor: run decompressor in place if loaded via UEFI
authorArd Biesheuvel <ardb@kernel.org>
Mon, 13 Apr 2020 16:21:35 +0000 (18:21 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 19 May 2020 16:23:22 +0000 (18:23 +0200)
commitd0f9ca9be11f25ef4151195eab7ea36d136084f6
tree842ac1c29d90b20a67b1d1f535246b707189c758
parent35d57d1215ed0da3349180275b845f0c2ee62d08
ARM: decompressor: run decompressor in place if loaded via UEFI

The decompressor can load from anywhere in memory, and the only reason
the EFI stub code relocates it is to ensure it appears within the first
128 MiB of memory, so that the uncompressed kernel ends up at the right
offset in memory.

We can short circuit this, and simply jump into the decompressor startup
code at the point where it knows where the base of memory lives. This
also means there is no need to disable the MMU and caches, create new
page tables and re-enable them.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nicolas Pitre <nico@fluxnic.net>
arch/arm/boot/compressed/head.S
drivers/firmware/efi/libstub/arm32-stub.c