From 6698bb343fec66a2167dcdfe5cd645e09166440e Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 24 Jan 2018 14:54:21 +0100 Subject: efi: Conflict efi_loader with different stub bitness We have 2 users of the EFI headers: efi_loader and the EFI stub. Efi_loader always expects that the bitness of the definitions it uses is identical to the execution. The EFI stub however allows to run x86_64 U-Boot on 32bit EFI and the other way around, so it allows for different bitness of EFI definitions and U-Boot environment. This patch explicitly requests via Kconfig that efi_loader can only be enabled if the bitness is identical. Because we can run efi_loader on x86_64 without EFI stub enabled, it also ensures that this case propagates the correct ABI constraints. Signed-off-by: Alexander Graf --- include/efi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/efi.h') diff --git a/include/efi.h b/include/efi.h index 2f0be9c86cb..98bddbac1ad 100644 --- a/include/efi.h +++ b/include/efi.h @@ -19,7 +19,7 @@ #include #include -#ifdef CONFIG_EFI_STUB_64BIT +#if CONFIG_EFI_STUB_64BIT || (!defined(CONFIG_EFI_STUB) && defined(__x86_64__)) /* EFI uses the Microsoft ABI which is not the default for GCC */ #define EFIAPI __attribute__((ms_abi)) #else -- cgit v1.2.3