iPXE
efi_utils.h
Go to the documentation of this file.
1 #ifndef _IPXE_EFI_UTILS_H
2 #define _IPXE_EFI_UTILS_H
3 
4 /** @file
5  *
6  * EFI utilities
7  */
8 
9 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
10 
11 #include <ipxe/efi/efi.h>
13 
14 struct device;
15 
18 extern size_t efi_devpath_len ( EFI_DEVICE_PATH_PROTOCOL *path );
20  EFI_HANDLE *parent );
21 extern int efi_child_add ( EFI_HANDLE parent, EFI_HANDLE child );
22 extern void efi_child_del ( EFI_HANDLE parent, EFI_HANDLE child );
23 extern void efi_device_info ( EFI_HANDLE device, const char *prefix,
24  struct device *dev );
25 
26 #endif /* _IPXE_EFI_UTILS_H */
void efi_device_info(EFI_HANDLE device, const char *prefix, struct device *dev)
Get underlying device information.
Definition: efi_utils.c:211
The device path protocol as defined in UEFI 2.0.
EFI_DEVICE_PATH_PROTOCOL * efi_devpath_end(EFI_DEVICE_PATH_PROTOCOL *path)
Find end of device path.
Definition: efi_utils.c:41
128 bit buffer containing a unique identifier value.
Definition: Base.h:263
int efi_child_add(EFI_HANDLE parent, EFI_HANDLE child)
Add EFI device as child of another EFI device.
Definition: efi_utils.c:124
char prefix[4]
Definition: vmconsole.c:53
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition: DevicePath.h:51
struct device * parent
Bus device.
Definition: device.h:85
void efi_child_del(EFI_HANDLE parent, EFI_HANDLE child)
Remove EFI device as child of another EFI device.
Definition: efi_utils.c:158
size_t efi_devpath_len(EFI_DEVICE_PATH_PROTOCOL *path)
Find length of device path (excluding terminator)
Definition: efi_utils.c:59
A hardware device.
Definition: device.h:73
int efi_locate_device(EFI_HANDLE device, EFI_GUID *protocol, EFI_HANDLE *parent)
Locate parent device supporting a given protocol.
Definition: efi_utils.c:73
EFI API.
uint16_t protocol
Protocol ID.
Definition: stp.h:18
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
Definition: efi.h:55