diff options
author | Arvind Sankar <nivedita@alum.mit.edu> | 2020-01-03 14:39:49 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-01-10 20:55:04 +0300 |
commit | ea7d87f98fa9675076fb5ad208d889b217e83889 (patch) | |
tree | 77ee2f45103441c18fa5a7e1a60ccbda44936548 /arch/riscv | |
parent | 14b864f4b5c402fe1ca394042beeea6fdf54f8f5 (diff) | |
download | linux-ea7d87f98fa9675076fb5ad208d889b217e83889.tar.xz |
efi/x86: Allow translating 64-bit arguments for mixed mode calls
Introduce the ability to define macros to perform argument translation
for the calls that need it, and define them for the boot services that
we currently use.
When calling 32-bit firmware methods in mixed mode, all output
parameters that are 32-bit according to the firmware, but 64-bit in the
kernel (ie OUT UINTN * or OUT VOID **) must be initialized in the
kernel, or the upper 32 bits may contain garbage. Define macros that
zero out the upper 32 bits of the output before invoking the firmware
method.
When a 32-bit EFI call takes 64-bit arguments, the mixed-mode call must
push the two 32-bit halves as separate arguments onto the stack. This
can be achieved by splitting the argument into its two halves when
calling the assembler thunk. Define a macro to do this for the
free_pages boot service.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Matthew Garrett <mjg59@google.com>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20200103113953.9571-17-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/riscv')
0 files changed, 0 insertions, 0 deletions