freebsd-dev/stand/efi/libefi
Toomas Soome 523a713ffb loader.efi: efipart needs better support detecting nested partitions
Just as disks can have nested partitions, the same happens with cd devices,
so we need to detect device paths and make sure we will not mix the handles.

To address this:

we fetch handle array and create linked list of block devices.
we walk the list and detect parent devices and set children pd_parent.
for {fd, cd, hd}, we walk device list and pick up our devices and store to
corresponding list. We make sure we store parent device first.

For sorting we use 3 steps: We check for floppy, we check for cd and then
everything else must be hd.

In general, it seems the floppy devices have no parent.
CD can have both parents and children (multiple boot entries, partitions
from the hybrid disk image).

Tested by: cross+freebsd@distal.com on Cisco UCS systems, C200 series (C220M5, C240M4).
Also on MBP with UEFI 1.10

Reported by:	Chriss Ross
MFC after:	1w
Differential Revision:	https://reviews.freebsd.org/D22553
2019-11-30 09:11:28 +00:00
..
delay.c Simplify the EFI delay() function by calling BS->Stall() 2018-10-26 21:57:22 +00:00
devicename.c Start to reduce the number of #ifdef EFI_ZFS_BOOT 2019-04-20 05:31:56 +00:00
devpath.c loader.efi: efipart needs better support detecting nested partitions 2019-11-30 09:11:28 +00:00
efi_console.c Also turn of teken for RB_MULTIPLE 2019-11-28 05:40:15 +00:00
efi_driver_utils.c
efichar.c utf8_to_ucs2() should check for malloc failure 2018-01-16 20:35:54 +00:00
efienv.c Add efi_freebsd_delenv 2019-04-25 20:09:49 +00:00
efihttp.c efihttp: mac and err can be used uninitialized 2019-07-02 20:32:35 +00:00
efinet.c loader.efi: replace HandleProtocol() with OpenProtocol() 2019-08-06 19:27:27 +00:00
efipart.c loader.efi: efipart needs better support detecting nested partitions 2019-11-30 09:11:28 +00:00
efizfs.c Create boot_img as a global variable 2019-04-22 18:40:24 +00:00
env.c Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
errno.c
handles.c
libefi.c loader.efi: efilib.h and libefi.c were left out of 350654 2019-08-06 20:13:28 +00:00
Makefile loader: fall back to term_emu on efi console with serial backend 2019-11-02 09:50:36 +00:00
Makefile.depend
time_event.c
time.c
wchar.c Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00