]> git.baikalelectronics.ru Git - kernel.git/commit
efi/x86: libstub: Make DXE calls mixed mode safe
authorArd Biesheuvel <ardb@kernel.org>
Fri, 20 May 2022 10:07:58 +0000 (12:07 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 1 Jun 2022 12:08:12 +0000 (14:08 +0200)
commitcd98ecf699caa44ba3ed75bf8bfb77ff6ac17606
tree7a77266725e0604c45e10b94855f4cf296a25d57
parent676e67359582ef0f2bd2eaa620e9b0bf976d56b6
efi/x86: libstub: Make DXE calls mixed mode safe

The newly added DXE calls use 64-bit quantities, which means we need to
marshall them explicitly when running in mixed mode. Currently, we get
away without it because we just bail when GetMemorySpaceDescriptor()
fails, which is guaranteed to happen due to the function argument mixup.

Let's fix this properly, though, by defining the macros that describe
how to marshall the arguments. While at it, drop an incorrect cast on a
status variable.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/x86/include/asm/efi.h
drivers/firmware/efi/libstub/x86-stub.c