b43c6042c3
loading. If we are booting in a conforming UEFI Boot Manager Environment, then use the BootCurrent variable to find the BootXXXX we're using. Once we find that, then if it contains more than one EFI_DEVICE_PATH in its what to boot section, try to use the last one as the kernel to load. This will also set the default root partition as well. If there's only one path, or if there's an error along the way, assume that nothing specific was specified and revert to the old algorithm. If something was specified, but not found, then fail the boot. Otherwise you that, specific thing. On FreeBSD, this can be set using efibootmgr -l <loader> -k <kernel>. We try a few variations of kernel to cope with the fact that UEFI comes from a DOS world where paths might be upper case and/or contain back-slashes. Note: In an ideal world, we'd work out where we are in chain loading by looking at the passed-in image handle and doing name matching. However, that's unreliable since at least boot1.efi booted images don't have that, hence the assumption that loader.efi needs to load the last thing on the list, if possible. The reason we fail for something specific is so that we can fully participate in the UEFI Boot Manager Protocol and fail over to the next item in the list of BootOrder choices when something goes wrong at this stage. This implements was was talked about in freebsd-arch@ last year https://docs.freebsd.org/cgi/getmsg.cgi?fetch=3576+0+archive/2017/freebsd-arch/20171022.freebsd-arch and documented in full (after changed resulting from the discussion) in https://docs.google.com/document/d/1aK9IqF-60JPEbUeSAUAkYjF2W_8EnmczFs6RqCT90Jg/edit# although one or two minor details may have been modified in this implementation to make it work, and the ZFS MEDIA PATH extension isn't implemented. This does not yet move things to ESP:\efi\freebsd\loader.efi. RelNotes: Yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16403 |
||
---|---|---|
.. | ||
arm | ||
arm64 | ||
common | ||
defaults | ||
efi | ||
fdt | ||
ficl | ||
ficl32 | ||
forth | ||
i386 | ||
kshim | ||
liblua | ||
liblua32 | ||
libsa | ||
libsa32 | ||
lua | ||
man | ||
mips | ||
ofw | ||
powerpc | ||
sparc64 | ||
uboot | ||
usb | ||
userboot | ||
defs.mk | ||
fdt.mk | ||
ficl.mk | ||
loader.mk | ||
lua.mk | ||
Makefile | ||
Makefile.amd64 | ||
Makefile.inc | ||
uboot.mk |