iPXE
|
EFI utilities. More...
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <ipxe/efi/efi.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) |
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_pci_info (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 | ||
) |
Locate parent device supporting a given protocol.
device | EFI device handle |
protocol | Protocol GUID |
parent | Parent EFI device handle to fill in |
rc | Return status code |
Definition at line 43 of file efi_utils.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, DBGC, EEFI, efi_device_path_protocol_guid, efi_guid_ntoa(), efi_handle_name(), efi_image_handle, EFI_OPEN_PROTOCOL_GET_PROTOCOL, efi_systab, EFI_BOOT_SERVICES::LocateDevicePath, EFI_BOOT_SERVICES::OpenProtocol, protocol, rc, and strerror().
Referenced by chained_locate(), efi_pci_info(), and nii_pci_open().
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 94 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 128 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().
|
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 145 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 181 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 nii_start(), snpnet_start(), and usbio_start().