diff options
author | Alexander Graf <agraf@suse.de> | 2018-06-18 17:23:05 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-07-25 14:57:43 +0200 |
commit | beb077a2a8201c4b215d82e58c4d1d8ec8e48b58 (patch) | |
tree | 6b1fa3b5e2cde3b3ac176e776a7227b50911b6db /include/efi.h | |
parent | c034bfab2975f4a02ef20f0e88ac82a451696f79 (diff) |
efi_loader: Introduce ms abi vararg helpers
Varargs differ between sysv and ms abi. On x86_64 we have to follow the ms
abi though, so we also need to make sure we use x86_64 varargs helpers.
This patch introduces generic efi vararg helpers that adhere to the
respective EFI ABI. That way we can deal with them properly from efi
loader code and properly interpret variable arguments.
This fixes the InstallMultipleProtocolInterfaces tests in the efi selftests
on x86_64 for me.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/efi.h')
-rw-r--r-- | include/efi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/efi.h b/include/efi.h index 0fe15e65c0..41530a7537 100644 --- a/include/efi.h +++ b/include/efi.h @@ -29,8 +29,16 @@ */ #ifdef __x86_64__ #define EFIAPI __attribute__((ms_abi)) +#define efi_va_list __builtin_ms_va_list +#define efi_va_start __builtin_ms_va_start +#define efi_va_arg __builtin_va_arg +#define efi_va_end __builtin_ms_va_end #else #define EFIAPI asmlinkage +#define efi_va_list va_list +#define efi_va_start va_start +#define efi_va_arg va_arg +#define efi_va_end va_end #endif /* __x86_64__ */ struct efi_device_path; |