efi/libstub/x86: fix mixed mode boot issue after macro refactor
Guenter Roeck
Tested-byQuoted 10 lines · 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.
Quoted 4 lines
Fix this by defining the macro as well.
Reported-by Guenter Roeck <[email protected]>Signed-off-by Ard Biesheuvel <[email protected]>
Tested-by Guenter Roeck <[email protected]>
Quoted 19 lines
--- arch/x86/include/asm/efi.h | 1 + 1 file changed, 1 insertion(+)arch/x86/include/asm/efi.h +1
-0@@ -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( \Signature · 1 line
2.26.2