diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-05-20 12:07:58 +0200 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2022-06-01 14:08:12 +0200 |
commit | 31f1a0edff78c43e8a3bd3692af0db1b25c21b17 (patch) | |
tree | 7a77266725e0604c45e10b94855f4cf296a25d57 /drivers/firmware | |
parent | ca209f8b5f61b74782dd4275ebc7173d92cb4905 (diff) | |
download | linux-31f1a0edff78c43e8a3bd3692af0db1b25c21b17.tar.bz2 |
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>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efi/libstub/x86-stub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c index b14e88ccefca..05ae8bcc9d67 100644 --- a/drivers/firmware/efi/libstub/x86-stub.c +++ b/drivers/firmware/efi/libstub/x86-stub.c @@ -260,10 +260,10 @@ adjust_memory_range_protection(unsigned long start, unsigned long size) EFI_MEMORY_WB); if (status != EFI_SUCCESS) { - efi_warn("Unable to unprotect memory range [%08lx,%08lx]: %d\n", + efi_warn("Unable to unprotect memory range [%08lx,%08lx]: %lx\n", unprotect_start, unprotect_start + unprotect_size, - (int)status); + status); } } } |