iPXE
|
EFI utilities. More...
#include <ipxe/efi/efi.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | efi_locate_device (EFI_HANDLE device, EFI_GUID *protocol, EFI_HANDLE *parent, unsigned int skip) |
Locate parent device supporting a given protocol. More... | |
int | efi_child_add (EFI_HANDLE parent, EFI_HANDLE child) |
Add EFI device as child of another EFI device. More... | |
void | efi_child_del (EFI_HANDLE parent, EFI_HANDLE child) |
Remove EFI device as child of another EFI device. More... | |
void | efi_device_info (EFI_HANDLE device, const char *prefix, struct device *dev) |
Get underlying device information. More... | |
EFI utilities.
Definition in file efi_utils.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int efi_locate_device | ( | EFI_HANDLE | device, |
EFI_GUID * | protocol, | ||
EFI_HANDLE * | parent, | ||
unsigned int | skip | ||
) |
Locate parent device supporting a given protocol.
device | EFI device handle |
protocol | Protocol GUID |
parent | Parent EFI device handle to fill in |
skip | Number of protocol-supporting parent devices to skip |
rc | Return status code |
Definition at line 45 of file efi_utils.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, DBGC, EEFI, efi_device_path_protocol_guid, efi_devpath_text(), efi_guid_ntoa(), efi_handle_name(), efi_image_handle, EFI_OPEN_PROTOCOL_GET_PROTOCOL, efi_path_len(), efi_path_prev(), efi_path_terminate(), efi_systab, end, ENOMEM, free, len, EFI_BOOT_SERVICES::LocateDevicePath, malloc(), memcpy(), EFI_BOOT_SERVICES::OpenProtocol, protocol, rc, strerror(), and u.
Referenced by chained_locate(), efi_autoexec_load(), efi_pci_info(), nii_pci_open(), and snpnet_supported().
int efi_child_add | ( | EFI_HANDLE | parent, |
EFI_HANDLE | child | ||
) |
Add EFI device as child of another EFI device.
parent | EFI parent device handle |
child | EFI child device handle |
rc | Return status code |
Definition at line 122 of file efi_utils.c.
References EFI_SYSTEM_TABLE::BootServices, DBGC, DBGC2, DBGC_EFI_OPENERS, EEFI, efi_device_path_protocol_guid, efi_handle_name(), efi_image_handle, EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER, efi_systab, EFI_BOOT_SERVICES::OpenProtocol, rc, and strerror().
Referenced by efi_snp_hii_install(), and efi_snp_probe().
void efi_child_del | ( | EFI_HANDLE | parent, |
EFI_HANDLE | child | ||
) |
Remove EFI device as child of another EFI device.
parent | EFI parent device handle |
child | EFI child device handle |
Definition at line 156 of file efi_utils.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, DBGC2, efi_device_path_protocol_guid, efi_handle_name(), efi_image_handle, and efi_systab.
Referenced by efi_snp_hii_install(), efi_snp_hii_uninstall(), efi_snp_probe(), and efi_snp_remove().
void efi_device_info | ( | EFI_HANDLE | device, |
const char * | prefix, | ||
struct device * | dev | ||
) |
Get underlying device information.
device | EFI device handle |
prefix | Device name prefix |
dev | Generic device to fill in |
Definition at line 209 of file efi_utils.c.
References device_description::bus_type, BUS_TYPE_EFI, DBGC, device::desc, efi_handle_name(), efi_pci_info(), device::name, prefix, rc, and snprintf().
Referenced by mnpnet_start(), nii_start(), snpnet_start(), and usbio_start().