* Re: [PATCH] efi/libstub/x86: fix mixed mode boot issue after macro refactor
@ 2020-05-03 16:16 Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2020-05-03 16:16 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: linux-efi
On Sun, May 03, 2020 at 05:45:07PM +0200, Ard Biesheuvel wrote:
> Commit
>
> 22090f84bc3f8081 ("efi/libstub: Unify EFI call wrappers for non-x86")
>
> refactored some macros that are used to wrap EFI service calls, and
> allow us to boot the 64-bit x86 kernel from 32-bit firmware. Sadly, due
> to an oversight, this caused a boot issue on mixed mode, due to the fact
> that efi_is_native() is not a macro on x86, and so #ifndef will not
> detect that it is already defined.
>
> Fix this by defining the macro as well.
>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> arch/x86/include/asm/efi.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> index cd0c3fbf6156..42b2fd123a2f 100644
> --- a/arch/x86/include/asm/efi.h
> +++ b/arch/x86/include/asm/efi.h
> @@ -240,6 +240,7 @@ static inline bool efi_is_native(void)
> return true;
> return efi_is_64bit();
> }
> +#define efi_is_native efi_is_native
>
> #define efi_mixed_mode_cast(attr) \
> __builtin_choose_expr( \
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] efi/libstub/x86: fix mixed mode boot issue after macro refactor
@ 2020-05-03 15:45 Ard Biesheuvel
0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2020-05-03 15:45 UTC (permalink / raw)
To: linux-efi; +Cc: linux, Ard Biesheuvel
Commit
22090f84bc3f8081 ("efi/libstub: Unify EFI call wrappers for non-x86")
refactored some macros that are used to wrap EFI service calls, and
allow us to boot the 64-bit x86 kernel from 32-bit firmware. Sadly, due
to an oversight, this caused a boot issue on mixed mode, due to the fact
that efi_is_native() is not a macro on x86, and so #ifndef will not
detect that it is already defined.
Fix this by defining the macro as well.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
arch/x86/include/asm/efi.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index cd0c3fbf6156..42b2fd123a2f 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -240,6 +240,7 @@ static inline bool efi_is_native(void)
return true;
return efi_is_64bit();
}
+#define efi_is_native efi_is_native
#define efi_mixed_mode_cast(attr) \
__builtin_choose_expr( \
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-03 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 16:16 [PATCH] efi/libstub/x86: fix mixed mode boot issue after macro refactor Guenter Roeck
-- strict thread matches above, loose matches on Subject: below --
2020-05-03 15:45 Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).