efi/arm64: Check whether x18 is preserved by runtime services calls
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 8 Mar 2018 08:00:13 +0000 (08:00 +0000)
committerIngo Molnar <mingo@kernel.org>
Fri, 9 Mar 2018 07:58:22 +0000 (08:58 +0100)
commit7e611e7dbb235938fca1dd359bad5e5f86ceabcb
tree9ae6a27e4b8c8e5d4b3832cb9d5fad3405623917
parent1832e64162ffbbbdf7230401298550f2b624351b
efi/arm64: Check whether x18 is preserved by runtime services calls

Whether or not we will ever decide to start using x18 as a platform
register in Linux is uncertain, but by that time, we will need to
ensure that UEFI runtime services calls don't corrupt it.

So let's start issuing warnings now for this, and increase the
likelihood that these firmware images have all been replaced by that time.

This has been fixed on the EDK2 side in commit:

  6d73863b5464 ("BaseTools/tools_def AARCH64: mark register x18 as reserved")

dated July 13, 2017.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20180308080020.22828-6-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/arm64/include/asm/efi.h
arch/arm64/kernel/Makefile
arch/arm64/kernel/efi-rt-wrapper.S [new file with mode: 0644]
arch/arm64/kernel/efi.c