[efi] Allow for creating devices with no EFI parent device

On some systems (observed on an AWS m8g.medium instance in eu-west-2),
the UEFI firmware fails to enumerate some of the underlying hardware
devices.  On these systems, we cannot comply with the UEFI device
model by adding our SNP device as a child of the hardware device and
appending to the parent hardware device path, since no parent hardware
device has been created.

Work around these systems by allowing for the creation of SNP devices
with no parent device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-11-25 11:59:03 +00:00
parent dfea3bbfad
commit 19dffdc836
3 changed files with 76 additions and 37 deletions

View File

@@ -30,8 +30,8 @@ struct efi_snp_device {
struct list_head list;
/** The underlying iPXE network device */
struct net_device *netdev;
/** The underlying EFI device */
struct efi_device *efidev;
/** EFI parent device handle (if any) */
EFI_HANDLE parent;
/** EFI device handle */
EFI_HANDLE handle;
/** The SNP structure itself */