|
iPXE
|
EFI utilities. More...
#include <stdio.h>#include <string.h>#include <errno.h>#include <ipxe/efi/efi.h>#include <ipxe/efi/efi_path.h>#include <ipxe/efi/efi_pci.h>#include <ipxe/efi/efi_utils.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| 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... | |
| static int | efi_device_info_pci (EFI_HANDLE device, const char *prefix, struct device *dev) |
| Get underlying PCI device information. 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.c.
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| 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, DBGC, EEFI, efi_device_path_protocol_guid, efi_devpath_text(), efi_guid_ntoa(), efi_handle_name(), efi_open, efi_path_len(), efi_path_prev(), efi_path_terminate(), efi_systab, end, ENOMEM, free, len, EFI_BOOT_SERVICES::LocateDevicePath, malloc(), memcpy(), protocol, rc, and strerror().
Referenced by chained_locate(), efi_autoexec_load(), efi_device_info_pci(), 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 110 of file efi_utils.c.
References DBGC, DBGC2, DBGC_EFI_OPENERS, efi_device_path_protocol_guid, efi_handle_name(), efi_open_by_child, 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 137 of file efi_utils.c.
References DBGC2, efi_close_by_child(), efi_device_path_protocol_guid, and efi_handle_name().
Referenced by efi_snp_hii_install(), efi_snp_hii_uninstall(), efi_snp_probe(), and efi_snp_remove().
|
static |
Get underlying PCI device information.
| device | EFI device handle |
| prefix | Device name prefix |
| dev | Generic device to fill in |
| rc | Return status code |
Definition at line 152 of file efi_utils.c.
References DBGC, device::desc, pci_device::dev, efi_handle_name(), efi_locate_device(), efi_pci_io_protocol_guid, efipci_info(), memcpy(), device::name, efi_pci_device::pci, prefix, rc, snprintf(), and strerror().
Referenced by efi_device_info().
| 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 188 of file efi_utils.c.
References device_description::bus_type, BUS_TYPE_EFI, DBGC, device::desc, efi_device_info_pci(), efi_handle_name(), device::name, prefix, rc, and snprintf().
Referenced by mnpnet_start(), nii_start(), snpnet_start(), and usbio_start().
1.8.15