]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r335228-r335231, r335272: stand: efiloader fixes
authorkevans <kevans@FreeBSD.org>
Wed, 20 Feb 2019 18:34:20 +0000 (18:34 +0000)
committerkevans <kevans@FreeBSD.org>
Wed, 20 Feb 2019 18:34:20 +0000 (18:34 +0000)
commitc0af1c1a2e10ba1ffff01b9ccdcf47cabb5ac53e
treef3adc1e34d1fbf9a75188f833739d6327112483a
parent0777b3f0a366f58879e3d2c25dbc240a5a1d60ff
MFC r335228-r335231, r335272: stand: efiloader fixes

r335228:
Migrate has_keyboard to bool.

r335229:
Provide a more direct interface to tell ZFS what the preferred handle
is. We tell the ZFS code now, and it checks rather than having a
callback to do the checks.

This will allow us to have a more graceful fallback code. In the
future, it's anticipated that we may fallback to a more global search
(or implement a command to do so) when reqeusted by the user, or we
detect a violation of the UEFI Boot Manager protocol severe enough to
warrant this backstop. For now, it just allows us to get rid of img as
a global.

r335230:
Move arg parsing into its own routine for possible later reuse.

r335231:
There's no need to walk through the tables looking for the smbios
table if we're just going to ignore it on arm, so expand, slightly,
the reach of the ifdef. Move the buffer to the inner block so we
don't have a separate #ifdef far away from these lines.

The issue on arm is that smbios_detect does unaligned accesses, which
in the u-boot implementing EFI context causes a crash.

r335272:
Many netboot scenarios don't have /boot/defaults/loader.conf. As
a fallback, also check /boot/kernel/kernel existing as well, since
that's the fallback behavior of the loader.
stand/efi/include/efizfs.h
stand/efi/libefi/efizfs.c
stand/efi/loader/main.c