efi/libstub/x86: fix an EFI server boot failure
PATCH 1/1 efi/libstub/x86: fix an EFI server boot failure
x86_64 EFI systems are unable to boot due to a typo in the recent commit.
EFI config tables not found.
-- System halted
--- arch/x86/boot/compressed/eboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/compressed/eboot.c +1 -1
@@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void) {if (IS_ENABLED (CONFIG_EFI_MIXED ))return efi_is64; -return IS_ENABLED (CONFIG_X64_64 ); +return IS_ENABLED (CONFIG_X86_64 ); } static efi_status_t
Signature · 1 line
2.21.0 (Apple Git-122.2)
Quoted 17 lines · Qian Cai
x86_64EFI systems are unable to boot due to a typo in the recent commit.EFI config tables not found.
-- System haltedFixes 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")Signed-off-by Qian Cai <[email protected]>--- arch/x86/boot/compressed/eboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/boot/compressed/eboot.c +0
-0
arch/x86/boot/compressed/eboot.c __attribute_const__ bool efi_is_64bit(void) · line 38
Quoted 8 lines
arch/x86/boot/compressed/eboot.c +1
-1@@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void) {if (IS_ENABLED (CONFIG_EFI_MIXED ))return efi_is64; -return IS_ENABLED (CONFIG_X64_64 ); +return IS_ENABLED (CONFIG_X86_64 ); } static efi_status_t
Apologies for the breakage - your fix is obviously correct. But I did test this code, so I am curious why I didn't see this problem. Are you booting via GRUB or from the UEFI shell? Can you share your .config please?
Ard Biesheuvel
Acked-byQuoted 26 lines · Ard Biesheuvel
Quoted 24 lines · Qian Cai
x86_64EFI systems are unable to boot due to a typo in the recent commit.EFI config tables not found.
-- System haltedFixes 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")Signed-off-by Qian Cai <[email protected]>--- arch/x86/boot/compressed/eboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/boot/compressed/eboot.c +1
-1@@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void) {if (IS_ENABLED (CONFIG_EFI_MIXED ))return efi_is64; -return IS_ENABLED (CONFIG_X64_64 ); +return IS_ENABLED (CONFIG_X86_64 ); }
Quoted 6 lines
arch/x86/boot/compressed/eboot.c __attribute_const__ bool efi_is_64bit(void) · line 38
Quoted 1 line
arch/x86/boot/compressed/eboot.c +0
-0static efi_status_tApologies for the breakage - your fix is obviously correct. But I did test this code, so I am curious why I didn't see this problem. Are you booting via GRUB or from the UEFI shell? Can you share your .config please?
Hmm, I guess it is simply the absence of CONFIG_EFI_MIXED=y ...
Ingo, Thomas, could you drop this into efi/core directly please? Thanks.
Quoted 34 lines · Ard Biesheuvel
Quoted 26 lines · Ard Biesheuvel
Quoted 24 lines · Qian Cai
x86_64EFI systems are unable to boot due to a typo in the recent commit.EFI config tables not found.
-- System haltedFixes 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")Signed-off-by Qian Cai <[email protected]>--- arch/x86/boot/compressed/eboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/boot/compressed/eboot.c +1
-1@@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void) {if (IS_ENABLED (CONFIG_EFI_MIXED ))return efi_is64; -return IS_ENABLED (CONFIG_X64_64 ); +return IS_ENABLED (CONFIG_X86_64 ); }Quoted 6 lines
arch/x86/boot/compressed/eboot.c __attribute_const__ bool efi_is_64bit(void) · line 38
Quoted 1 line
arch/x86/boot/compressed/eboot.c +0
-0static efi_status_tApologies for the breakage - your fix is obviously correct. But I did test this code, so I am curious why I didn't see this problem. Are you booting via GRUB or from the UEFI shell? Can you share your .config please?
Quoted 5 lines
Hmm, I guess it is simply the absence of
CONFIG_EFI_MIXED=y...Acked-by Ard Biesheuvel <[email protected]>Ingo, Thomas, could you drop this into efi/core directly please? Thanks.
Sure, done!
Thanks,
Ingo
Quoted 29 lines · Ard Biesheuvel
Quoted 24 lines · Qian Cai
x86_64EFI systems are unable to boot due to a typo in the recent commit.EFI config tables not found.
-- System haltedFixes 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")Signed-off-by Qian Cai <[email protected]>---
arch/x86/boot/compressed/eboot.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/boot/compressed/eboot.c +1
-1@@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void) {if (IS_ENABLED (CONFIG_EFI_MIXED ))return efi_is64; -return IS_ENABLED (CONFIG_X64_64 ); +return IS_ENABLED (CONFIG_X86_64 ); }
Quoted 6 lines
Quoted 1 line
static
efi_status_tApologies for the breakage - your fix is obviously correct. But I did test this code, so I am curious why I didn't see this problem. Are you booting via GRUB or from the UEFI shell? Can you share your .config please?
https://raw.githubusercontent.com/cailca/linux-mm/master/x86.config
BTW, this will also trigger a compilation breakage,
ld: arch/x86/platform/efi/efi_64.o: in function `efi_set_virtual_address_map':
efi_64.c:(.init.text+0x1419): undefined reference to `__efi64_thunk'
ld: efi_64.c:(.init.text+0x1530): undefined reference to `efi_uv1_memmap_phys_prolog'
ld: efi_64.c:(.init.text+0x1706): undefined reference to `efi_uv1_memmap_phys_epilog’
Likely due to the commit “efi/x86: avoid KASAN false positives when accessing the 1:1 mapping”
Looks like you are in process fixing that one as well.