Bug 196289 - Kernel hangs when booting via UEFI
Summary: Kernel hangs when booting via UEFI
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: uefi
Depends on: 202455
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-27 01:33 UTC by Kyle Dassoff
Modified: 2016-02-18 02:22 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Dassoff 2014-12-27 01:33:20 UTC
When booting on my system via UEFI mode, loader.efi runs, and I can use the loader command line. But when it tries to hand control to the kernel, it gets as far as the spinner character appearing, but then the system completely hangs. After some time in this state, it will eventually reboot.

CPU: AMD A6-6400K
Motherboard: MSI FM2-A75MA-P33
Firmware version: E7721AMS V11.5

This behavior has been observed both on an installer image running from a USB memory stick, and from a manually bootstrapped installation on an internal SATA SSD.
Comment 1 ucsdboy 2015-02-24 07:25:07 UTC
I randomly experience the same situation below. I also receive the following, on occasion:

elf64_exec: ExitBootServices() returned 0x8000000000000002

If I reboot or turn it off and cold boot it, it may or may not run as expected.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2015-12-26 23:37:16 UTC
(In reply to ucsdboy from comment #1)
> elf64_exec: ExitBootServices() returned 0x8000000000000002

This ExitBootServices issue should be fixed in both stable/10 and HEAD.
Comment 3 Kyle Dassoff 2015-12-26 23:56:35 UTC
(In reply to Ed Maste from comment #2)
Ed, do you know which revision contains this fix? I could format a memory stick with a -CURRENT snapshot to see if this fixes the issue on my motherboard.
Comment 4 Ed Maste freebsd_committer freebsd_triage 2015-12-27 00:31:29 UTC
(In reply to Kyle Dassoff from comment #3)

Oops, I mixed up a couple of related issues; the final ExitBootServices fix is r292515 (r292338 was the initial take). The most recent -CURRENT snapshots have the first fix but not the followup. Neither of these has been MFC'd to stable/10 yet.
Comment 5 Kyle Dassoff 2016-01-04 20:12:05 UTC
(In reply to Ed Maste from comment #4)
I see a new snapshot of 11-CURRENT available on FTP. But there's no -uefi- images listed. Have those been combined with the BIOS-boot images for 11?
Comment 6 Ed Maste freebsd_committer freebsd_triage 2016-01-04 20:13:05 UTC
> But there's no -uefi- images listed. Have those been combined with the BIOS-boot images for 11?

That's correct, the same image can boot by BIOS or UEFI.
Comment 7 Kyle Dassoff 2016-01-04 23:41:58 UTC
Good news! I tested booting from the memstick image on my same computer and it boots into the installer just fine. That snapshot was for 11-CURRENT-r292858 on amd64 architecture.

If you mention when the fix is MFC'd into STABLE, I'd be happy to watch for a snapshot of STABLE and test booting that as well if that would be worthwhile.
Comment 8 Ed Maste freebsd_committer freebsd_triage 2016-01-04 23:53:48 UTC
> Good news! I tested booting from the memstick image on my same computer and it
> boots into the installer just fine. That snapshot was for 11-CURRENT-r292858 on
> amd64 

Great! I expect to merge it by mid next week, so that it should be available in a snapshot in early February.
Comment 9 Ed Maste freebsd_committer freebsd_triage 2016-01-07 18:15:26 UTC
I've merged the "0x8000000000000002" fix in r293304. Unfortunately I just missed a snapshot build, so check for a new snapshot to test around Jan 14th or so.
Comment 10 Kyle Dassoff 2016-01-19 17:06:43 UTC
Verified booting also with 10.2-STABLE-r293802.