HomeFreeBSD

MFC r355224, r355308, r355392:

Description

MFC r355224, r355308, r355392:
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, C220M3).
Also on MBP with UEFI 1.10

Details

Provenance
tsoomeAuthored on
Parents
rS355559: MFC r355424: release: chase ports r519089 (rpi-firmware update)
Branches
Unknown
Tags
Unknown