Bug 199165 - UEFI issues
Summary: UEFI issues
Status: New
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 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-04 20:00 UTC by bstirling2307
Modified: 2016-02-18 02:26 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bstirling2307 2015-04-04 20:00:01 UTC
https://forums.freebsd.org/threads/uefi-boot-fail.51126/#post-286422

Howdy All,

I have been beating my head against the brick wall that is this issue for the last few days. I have tried everything I can think of and everything I have found on this forum and others. I will explain my goal and what I have attempted.

Also this is the first time I am trying to install FreeBSD on an UEFI system

Goal:
Dual boot FreeBSD 10.1 and Windows 8.1 (required for work)
Boot manager: don't really care rEFInd, Grub2, ect
I am installing FreeBSD 10.1 using the FreeBSD-10.1-RELEASE-amd64-uefi-memstick.img .
I am installing this on Asus X200MA-RCLT08

First installation attempt:
windows 8.1 working boots normally
Disabled secure boot
installed from usb and used UFS (GTP)
partition talble is:
100MB EFI -(windows UEFI)
900MB Recovery
128MB MS- Reserverd
186GB MS-basic-data
800KB EFI (FreeBSD)
144GB FreeBSD-UFS /
4GB FreeBSD-swap

Issue:
FreeBSD will not freaking boot!!!
UEFI dose not see the EFI partition created during installation.
It will boot if the install media is in the USB port it was in during installation and that is selected from the UEFI boot menu. (note if it is not in the USB port used during install, then the installation menu is booted)

Attempted resolutions:

I followed this guide http://ximalas.info/2015/03/19/uefi-gpt-windows-10-freebsd-10-and-refind/
when I select freeBSD from the menu I get the attached error
Code:

Fatal trap 1 with interrupts dissabled

Fatal trap 1: privileged instruction fault while in kernel mode
cpuid = 0; apic id = 00
instruction pointer     = 0x20:0xffffff80400000
stack pointer           = 0x28:0xffffff814b5a70
frame pointer           = 0x28:0x0
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = resume, IOPL = 0
current process         = 0 ()
trap number             = 1
panic: privileged instruction fault
cpuid = 0
KDB: stack backtrace:
#0 0xffffffff80963000 at ??+0
#1 0xffffffff80928125 at ??+0
#2 0xffffffff80d24f1f at ??+0
#3 0xffffffff80d24b7c at ??+0
#4 0xffffffff80d0a782 at ??+0
Uptime: 1s


I then attempted to skip the 3rd party boot loader and mounted the windows ESP again and copied the /boot/boot1.efi to /esp/efi/fbsd/bootx64.efi
I then in the system UEFI created boot entry pointing at /efi/fbsd/bootx64.efi
booted the system to the new entry and
Code:

Fatal trap 1 with interrupts dissabled

Fatal trap 1: privileged instruction fault while in kernel mode
cpuid = 0; apic id = 00
instruction pointer     = 0x20:0xffffff80400000
stack pointer           = 0x28:0xffffff814b5a70
frame pointer           = 0x28:0x0
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = resume, IOPL = 0
current process         = 0 ()
trap number             = 1
panic: privileged instruction fault
cpuid = 0
KDB: stack backtrace:
#0 0xffffffff80963000 at ??+0
#1 0xffffffff80928125 at ??+0
#2 0xffffffff80d24f1f at ??+0
#3 0xffffffff80d24b7c at ??+0
#4 0xffffffff80d0a782 at ??+0
Uptime: 1s


Again!!!

Second installation attempt:
Disabled secure boot
installed from usb and used UFS (GTP)
partition talble is:
800KB EFI (FreeBSD)
144GB FreeBSD-UFS /
4GB FreeBSD-swap

UEFI Sees the EFI Partition now: YAY (im hopeful; who needs wendooz anyway)
I boot the system and ... wait for it....
Code:

Fatal trap 1 with interrupts dissabled

Fatal trap 1: privileged instruction fault while in kernel mode
cpuid = 0; apic id = 00
instruction pointer     = 0x20:0xffffff80400000
stack pointer           = 0x28:0xffffff814b5a70
frame pointer           = 0x28:0x0
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = resume, IOPL = 0
current process         = 0 ()
trap number             = 1
panic: privileged instruction fault
cpuid = 0
KDB: stack backtrace:
#0 0xffffffff80963000 at ??+0
#1 0xffffffff80928125 at ??+0
#2 0xffffffff80d24f1f at ??+0
#3 0xffffffff80d24b7c at ??+0
#4 0xffffffff80d0a782 at ??+0
Uptime: 1s



FML
Comment 1 Steven Hartland freebsd_committer 2016-02-18 02:26:37 UTC
Can you re-test with 10.3-BETA2 please as there's been lots of work in this area.