Skip to contentSkip to conversation

x86: Don't use the EFI reboot method by default

PATCH In review Matthew Garrett 4 participants 6 messages Jul 6, 2011 – Dec 23, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Don't use the EFI reboot method by default

Testing suggests that at least some Lenovos and some Intels will fail to reboot via EFI, attempting to jump to an unmapped physical address. In the long run we could handle this by providing a page table with a 1:1 mapping of physical addresses, but for now it's probably just easier to assume that ACPI or legacy methods will be present and reboot via those.

---
 arch/x86/platform/efi/efi.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/x86/platform/efi/efi.c +0 -3
index 06f6666..4f26568 100644
@@ -540,9 +540,6 @@ void __init efi_init(void)
 	x86_platform.set_wallclock = efi_set_rtc_mmss;
 #endif
 
-	/* Setup for EFI runtime service */
-	reboot_type = BOOT_EFI;
-
 #if EFI_DEBUG
 	print_efi_memmap();
 #endif
Signature · 1 line
1.7.5.4
#1 lore raw
Commit-ID:  f70e957cda22d309c769805cbb932407a5232219
Gitweb:     http://git.kernel.org/tip/f70e957cda22d309c769805cbb932407a5232219
Author:     Matthew Garrett <[email protected]>
AuthorDate: Wed, 6 Jul 2011 16:52:37 -0400
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 7 Jul 2011 11:35:05 +0200

x86: Don't use the EFI reboot method by default

Testing suggests that at least some Lenovos and some Intels will fail to reboot via EFI, attempting to jump to an unmapped physical address. In the long run we could handle this by providing a page table with a 1:1 mapping of physical addresses, but for now it's probably just easier to assume that ACPI or legacy methods will be present and reboot via those.

---
 arch/x86/platform/efi/efi.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/x86/platform/efi/efi.c +0 -3
index 474356b..899e393 100644
@@ -504,9 +504,6 @@ void __init efi_init(void)
 	x86_platform.set_wallclock = efi_set_rtc_mmss;
 #endif
 
-	/* Setup for EFI runtime service */
-	reboot_type = BOOT_EFI;
-
 #if EFI_DEBUG
 	print_efi_memmap();
 #endif
#2 lore raw
In reply to Matthew Garrett

Hi Willy et al,

Please consider

f70e957cda22 x86: Don't use the EFI reboot method by default,

               2011-07-06

for application to the 2.6.32.y and 2.6.34.y trees. The patch was applied upstream late in the 3.0 cycle, so newer kernels don't need it.

In 2011, Keith Ward wrote[1]:

Quoted 4 lines

When attempting to reboot my my UEFI enabled system, the system hangs when calling reboot requiring me to manually reset the system via the reset switch.

Screenshot: http://twitgoo.com/29bq1c

Ben Hutchings writes[1]:

Quoted 6 lines

Version: 3.0.0-1

I also had this problem on my own system, but it is fixed now. I bisected the fix to:

commit f70e957cda22d309c769805cbb932407a5232219

Quoted 8 lines
Author: Matthew Garrett <[email protected]>
Date:   Wed Jul 6 16:52:37 2011 -0400

x86: Don't use the EFI reboot method by default

which is basically equivalent to the workaround!

I'll also apply this fix to squeeze as it's so simple.

Keith Ward also wrote[1]:

Quoted 2 lines

It seems as if this has recently been reported at Ubuntu's Launchpad as well:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/721576

There are a variety of reports of the same panic at that bug on 2.6.32.y-, 2.6.38.y-, and 2.6.39-based kernels. Passing "reboot=a,w" on the kernel command line avoids trouble for reporters.

Regards,
Jonathan

[1] http://bugs.debian.org/626022

#3 lore raw

Hi Jonathan,

[ccing Paul for 2.6.34]

Quoted 40 lines · Jonathan Nieder

Hi Willy et al,

Please consider

f70e957cda22 x86: Don't use the EFI reboot method by default,

               2011-07-06

for application to the 2.6.32.y and 2.6.34.y trees. The patch was applied upstream late in the 3.0 cycle, so newer kernels don't need it.

In 2011, Keith Ward wrote[1]:

Quoted 4 lines

When attempting to reboot my my UEFI enabled system, the system hangs when calling reboot requiring me to manually reset the system via the reset switch.

Screenshot: http://twitgoo.com/29bq1c

Ben Hutchings writes[1]:

Quoted 6 lines

Version: 3.0.0-1

I also had this problem on my own system, but it is fixed now. I bisected the fix to:

commit f70e957cda22d309c769805cbb932407a5232219

Quoted 8 lines
Author: Matthew Garrett <[email protected]>
Date:   Wed Jul 6 16:52:37 2011 -0400

x86: Don't use the EFI reboot method by default

which is basically equivalent to the workaround!

I'll also apply this fix to squeeze as it's so simple.

Keith Ward also wrote[1]:

Quoted 2 lines

It seems as if this has recently been reported at Ubuntu's Launchpad as well:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/721576

Quoted 8 lines

There are a variety of reports of the same panic at that bug on 2.6.32.y-, 2.6.38.y-, and 2.6.39-based kernels. Passing "reboot=a,w" on the kernel command line avoids trouble for reporters.

Regards,
Jonathan

[1] http://bugs.debian.org/626022

Thanks for the detailed report. I'm queuing it now.

Best regards,
Willy

#4 lore raw
Quoted 49 lines · Willy Tarreau

Hi Jonathan,

[ccing Paul for 2.6.34]

Quoted 44 lines · Jonathan Nieder

Hi Willy et al,

Please consider

f70e957cda22 x86: Don't use the EFI reboot method by default,

               2011-07-06

for application to the 2.6.32.y and 2.6.34.y trees. The patch was applied upstream late in the 3.0 cycle, so newer kernels don't need it.

In 2011, Keith Ward wrote[1]:

Quoted 4 lines

When attempting to reboot my my UEFI enabled system, the system hangs when calling reboot requiring me to manually reset the system via the reset switch.

Screenshot: http://twitgoo.com/29bq1c

Ben Hutchings writes[1]:

Quoted 6 lines

Version: 3.0.0-1

I also had this problem on my own system, but it is fixed now. I bisected the fix to:

commit f70e957cda22d309c769805cbb932407a5232219

Quoted 8 lines
Author: Matthew Garrett <[email protected]>
Date:   Wed Jul 6 16:52:37 2011 -0400

x86: Don't use the EFI reboot method by default

which is basically equivalent to the workaround!

I'll also apply this fix to squeeze as it's so simple.

Keith Ward also wrote[1]:

Quoted 2 lines

It seems as if this has recently been reported at Ubuntu's Launchpad as well:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/721576

There are a variety of reports of the same panic at that bug on 2.6.32.y-, 2.6.38.y-, and 2.6.39-based kernels. Passing "reboot=a,w" on the kernel command line avoids trouble for reporters.

Quoted 6 lines
Quoted 4 lines

Regards,
Jonathan

[1] http://bugs.debian.org/626022

Thanks for the detailed report. I'm queuing it now.

In 2.6.32 the relevant code is in arch/x86/kernel/efi.c. With the filename changed, the patch applies cleanly and works for me.

Ben.

Signature · 2 lines
Ben Hutchings
One of the nice things about standards is that there are so many of them.
#5 lore raw

On Sun, Dec 23, 2012 at 09:11:36PM +0000, Ben Hutchings wrote:
(...)

Quoted 2 lines

In 2.6.32 the relevant code is in arch/x86/kernel/efi.c. With the filename changed, the patch applies cleanly and works for me.

OK, thanks Ben, I had not looked at it yet.

Best regards,
Willy