[efi] Allow for allocating EFI devices from arbitrary handles

Split out the code that allocates our internal struct efi_device
representations, to allow for the creation of temporary MNP devices in
order to download the autoexec.ipxe script.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2024-03-29 12:43:24 +00:00
parent 764e34f15a
commit b52b4a46d9
2 changed files with 67 additions and 42 deletions

View File

@@ -86,6 +86,8 @@ static inline void * efidev_get_drvdata ( struct efi_device *efidev ) {
return efidev->priv;
}
extern struct efi_device * efidev_alloc ( EFI_HANDLE device );
extern void efidev_free ( struct efi_device *efidev );
extern struct efi_device * efidev_parent ( struct device *dev );
extern int efi_driver_install ( void );
extern void efi_driver_uninstall ( void );