Bug 193564

Summary: UEFI boot failure: BIOS smap did not include a basemem segment!
Product: Base System Reporter: Jean-Sébastien Pédron <dumbbell>
Component: kernAssignee: Roger Pau Monné <royger>
Status: Closed FIXED    
Severity: Affects Some People CC: emaste
Priority: --- Keywords: uefi
Version: CURRENT   
Hardware: amd64   
OS: Any   

Description Jean-Sébastien Pédron freebsd_committer 2014-09-11 14:37:20 UTC
I tried the following FreeBSD snapshot on my Clevo W860CU with UEFI
enabled:
FreeBSD-11.0-CURRENT-amd64-20140903-r270990-memstick.img

The boot fails early with the following error:
panic: BIOS smap did not include a basemem segment!

The full picture of the panic is here:
https://people.freebsd.org/~dumbbell/uefi/FreeBSD-Clevo-W860CU-UEFI-no-basemem-segment.jpg

Here's a video of a verbose boot (the quality is really low, I can try
to redo it if this one doesn't help):
http://www.dumbbell.fr/~dumbbell/FreeBSD-Clevo-W860CU-UEFI-no-basemem-segment.mov

When I tried UEFI a couple years ago (with Windows 7), it could boot.
Comment 1 Ed Maste freebsd_committer 2014-09-12 19:57:10 UTC
A screen grab from the video showing the first bit of the EFI map is at https://people.freebsd.org/~emaste/uefi/dumbbell.png
Comment 2 Jean-Sébastien Pédron freebsd_committer 2014-09-13 10:14:57 UTC
Here's the output of "sysctl machdep.smap":

SMAP type=01, xattr=00, base=0000000000000000, len=000000000009c000
SMAP type=02, xattr=00, base=000000000009c000, len=0000000000004000
SMAP type=02, xattr=00, base=00000000000e0000, len=0000000000020000
SMAP type=01, xattr=00, base=0000000000100000, len=00000000c717c000
SMAP type=02, xattr=00, base=00000000c727c000, len=0000000000006000
SMAP type=01, xattr=00, base=00000000c7282000, len=0000000000155000
SMAP type=02, xattr=00, base=00000000c73d7000, len=0000000000038000
SMAP type=01, xattr=00, base=00000000c740f000, len=000000000005e000
SMAP type=02, xattr=00, base=00000000c746d000, len=0000000000001000
SMAP type=04, xattr=00, base=00000000c746e000, len=0000000000081000
SMAP type=02, xattr=00, base=00000000c74ef000, len=0000000000220000
SMAP type=01, xattr=00, base=00000000c770f000, len=0000000000008000
SMAP type=02, xattr=00, base=00000000c7717000, len=0000000000008000
SMAP type=01, xattr=00, base=00000000c771f000, len=0000000000063000
SMAP type=04, xattr=00, base=00000000c7782000, len=000000000001d000
SMAP type=01, xattr=00, base=00000000c779f000, len=0000000000043000
SMAP type=03, xattr=00, base=00000000c77e2000, len=000000000001d000
SMAP type=01, xattr=00, base=00000000c77ff000, len=0000000000001000
SMAP type=02, xattr=00, base=00000000c7800000, len=0000000000800000
SMAP type=02, xattr=00, base=00000000e0000000, len=0000000010000000
SMAP type=02, xattr=00, base=00000000f160a000, len=0000000000001000
SMAP type=02, xattr=00, base=00000000feaff000, len=0000000000001000
SMAP type=02, xattr=00, base=00000000fec00000, len=0000000000010000
SMAP type=02, xattr=00, base=00000000fed00000, len=0000000000000400
SMAP type=02, xattr=00, base=00000000fed1c000, len=0000000000004000
SMAP type=02, xattr=00, base=00000000fed20000, len=0000000000070000
SMAP type=02, xattr=00, base=00000000fee00000, len=0000000000001000
SMAP type=02, xattr=00, base=00000000ff000000, len=0000000001000000
SMAP type=01, xattr=00, base=0000000100000000, len=0000000038000000
Comment 3 Ed Maste freebsd_committer 2014-09-21 12:50:06 UTC
The EFI shell (downloadable from http://sourceforge.net/projects/efi-shell ) has a memmap command which will show the memory map EFI will use.
Comment 4 Ed Maste freebsd_committer 2014-10-21 18:33:46 UTC
The loader also has a memmap command now, which will show the EFI memory map.
Comment 5 Jean-Sébastien Pédron freebsd_committer 2014-10-21 20:52:24 UTC
That reminds me I didn't try this EFI shell...

Here's the output of the "memmap" loader command:

The screenshot of the first page of data:
https://people.freebsd.org/~dumbbell/uefi/FreeBSD-Clevo-W860CU-UEFI-efiloader-memmap-f3.jpg

The full video is here:
http://www.dumbbell.fr/~dumbbell/FreeBSD-Clevo-W860CU-UEFI-efiloader-memmap-2.mov
Comment 6 Ed Maste freebsd_committer 2015-01-05 15:55:45 UTC
See review D1417
https://reviews.freebsd.org/D1417
Comment 7 Ed Maste freebsd_committer 2015-01-14 19:04:57 UTC
royger@ has a patch in progress for this
Comment 8 Jean-Sébastien Pédron freebsd_committer 2015-01-27 13:58:46 UTC
This Clevo W860CU boots fine with r277776, which includes https://reviews.freebsd.org/D1417.

Thank you!