]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/efi: move SetVirtualAddressMap() to UEFI stub
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 20 Oct 2014 14:27:26 +0000 (16:27 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 12 Jan 2015 16:29:12 +0000 (16:29 +0000)
commit082eee5858b141df3705bcc1d37a0631d3401197
tree71eef379af8b2aac7232d21bdcbb4ae390ae9ba5
parent95733ac2888fa902dd2ec08b6e4943c2074a4b0a
arm64/efi: move SetVirtualAddressMap() to UEFI stub

In order to support kexec, the kernel needs to be able to deal with the
state of the UEFI firmware after SetVirtualAddressMap() has been called.
To avoid having separate code paths for non-kexec and kexec, let's move
the call to SetVirtualAddressMap() to the stub: this will guarantee us
that it will only be called once (since the stub is not executed during
kexec), and ensures that the UEFI state is identical between kexec and
normal boot.

This implies that the layout of the virtual mapping needs to be created
by the stub as well. All regions are rounded up to a naturally aligned
multiple of 64 KB (for compatibility with 64k pages kernels) and recorded
in the UEFI memory map. The kernel proper reads those values and installs
the mappings in a dedicated set of page tables that are swapped in during
UEFI Runtime Services calls.

Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
arch/arm64/include/asm/efi.h
arch/arm64/kernel/efi.c
arch/arm64/kernel/setup.c
drivers/firmware/efi/libstub/arm-stub.c
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/fdt.c