iPXE
|
EFI driver interface. More...
#include <ipxe/device.h>
#include <ipxe/tables.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/Protocol/DevicePath.h>
Go to the source code of this file.
Data Structures | |
struct | efi_device |
An EFI device. More... | |
struct | efi_driver |
An EFI driver. More... | |
Macros | |
#define | EFI_DRIVERS __table ( struct efi_driver, "efi_drivers" ) |
EFI driver table. More... | |
#define | __efi_driver(order) __table_entry ( EFI_DRIVERS, order ) |
Declare an EFI driver. More... | |
#define | EFI_DRIVER_EARLY 01 |
Early drivers. More... | |
#define | EFI_DRIVER_NORMAL 02 |
Normal drivers. More... | |
#define | EFI_DRIVER_LATE 03 |
Late drivers. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | efidev_set_drvdata (struct efi_device *efidev, void *priv) |
Set EFI driver-private data. More... | |
static void * | efidev_get_drvdata (struct efi_device *efidev) |
Get EFI driver-private data. More... | |
struct efi_device * | efidev_alloc (EFI_HANDLE device) |
Allocate new EFI device. More... | |
void | efidev_free (struct efi_device *efidev) |
Free EFI device. More... | |
struct efi_device * | efidev_parent (struct device *dev) |
Get parent EFI device. More... | |
int | efi_driver_install (void) |
Install EFI driver. More... | |
void | efi_driver_uninstall (void) |
Uninstall EFI driver. More... | |
int | efi_driver_connect_all (void) |
Connect EFI driver to all possible devices. More... | |
void | efi_driver_disconnect_all (void) |
Disconnect EFI driver from all possible devices. More... | |
void | efi_driver_reconnect_all (void) |
Reconnect original EFI drivers to all possible devices. More... | |
EFI driver interface.
Definition in file efi_driver.h.
#define EFI_DRIVERS __table ( struct efi_driver, "efi_drivers" ) |
EFI driver table.
Definition at line 59 of file efi_driver.h.
#define __efi_driver | ( | order | ) | __table_entry ( EFI_DRIVERS, order ) |
Declare an EFI driver.
Definition at line 62 of file efi_driver.h.
#define EFI_DRIVER_EARLY 01 |
Early drivers.
Definition at line 64 of file efi_driver.h.
#define EFI_DRIVER_NORMAL 02 |
Normal drivers.
Definition at line 65 of file efi_driver.h.
#define EFI_DRIVER_LATE 03 |
Late drivers.
Definition at line 66 of file efi_driver.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Set EFI driver-private data.
efidev | EFI device |
priv | Private data |
Definition at line 74 of file efi_driver.h.
References efi_device::priv, and priv.
Referenced by efipci_start(), mnpnet_start(), nii_start(), snpnet_start(), and usbio_start().
|
inlinestatic |
Get EFI driver-private data.
efidev | EFI device |
priv | Private data |
Definition at line 85 of file efi_driver.h.
References efi_device::priv.
Referenced by efipci_stop(), mnpnet_stop(), mnptemp_create(), nii_stop(), snpnet_stop(), and usbio_stop().
struct efi_device* efidev_alloc | ( | EFI_HANDLE | device | ) |
Allocate new EFI device.
device | EFI device handle |
efidev | EFI device, or NULL on error |
Definition at line 70 of file efi_driver.c.
References EFI_SYSTEM_TABLE::BootServices, device_description::bus_type, BUS_TYPE_EFI, device::children, EFI_BOOT_SERVICES::CloseProtocol, DBGC, device::desc, efi_device::dev, efi_device::device, device, EEFI, efi_device_path_protocol_guid, efi_handle_name(), efi_image_handle, EFI_OPEN_PROTOCOL_GET_PROTOCOL, efi_path_len(), efi_systab, INIT_LIST_HEAD, list_add, memcpy(), NULL, EFI_BOOT_SERVICES::OpenProtocol, efi_device::path, rc, device::siblings, strerror(), and zalloc().
Referenced by efi_driver_start(), and mnptemp_create().
void efidev_free | ( | struct efi_device * | efidev | ) |
Free EFI device.
efidev | EFI device |
Definition at line 118 of file efi_driver.c.
References assert(), device::children, efi_device::dev, free, list_del, list_empty, and device::siblings.
Referenced by efi_driver_start(), efi_driver_stop(), mnptemp_create(), and mnptemp_destroy().
struct efi_device* efidev_parent | ( | struct device * | dev | ) |
Get parent EFI device.
dev | Generic device |
efidev | Parent EFI device, or NULL |
Definition at line 155 of file efi_driver.c.
References efi_device::dev, list_for_each_entry, NULL, device::parent, and device::siblings.
Referenced by efi_ib_srp_path(), efi_netdev_path(), efi_snp_probe(), and efi_usb_path().
int efi_driver_install | ( | void | ) |
Install EFI driver.
rc | Return status code |
Definition at line 414 of file efi_driver.c.
References EFI_SYSTEM_TABLE::BootServices, build_timestamp, DBGC, _EFI_DRIVER_BINDING_PROTOCOL::DriverBindingHandle, EEFI, efi_component_name2_protocol_guid, efi_driver_binding, efi_driver_binding_protocol_guid, efi_image_handle, efi_systab, efi_wtf, _EFI_DRIVER_BINDING_PROTOCOL::ImageHandle, EFI_BOOT_SERVICES::InstallMultipleProtocolInterfaces, NULL, rc, strerror(), and _EFI_DRIVER_BINDING_PROTOCOL::Version.
Referenced by efi_init().
void efi_driver_uninstall | ( | void | ) |
Uninstall EFI driver.
Definition at line 447 of file efi_driver.c.
References EFI_SYSTEM_TABLE::BootServices, efi_component_name2_protocol_guid, efi_driver_binding, efi_driver_binding_protocol_guid, efi_image_handle, efi_systab, efi_wtf, NULL, and EFI_BOOT_SERVICES::UninstallMultipleProtocolInterfaces.
Referenced by efi_init(), and efi_unload().
int efi_driver_connect_all | ( | void | ) |
Connect EFI driver to all possible devices.
rc | Return status code |
Definition at line 602 of file efi_driver.c.
References DBGC, efi_driver_binding, efi_driver_connect(), and efi_driver_handles().
Referenced by efi_probe().
void efi_driver_disconnect_all | ( | void | ) |
Disconnect EFI driver from all possible devices.
rc | Return status code |
Definition at line 613 of file efi_driver.c.
References DBGC, efi_driver_binding, efi_driver_disconnect(), and efi_driver_handles().
Referenced by efi_remove(), and efi_unload().
void efi_driver_reconnect_all | ( | void | ) |
Reconnect original EFI drivers to all possible devices.
rc | Return status code |
Definition at line 624 of file efi_driver.c.
References DBGC, efi_driver_binding, efi_driver_handles(), and efi_driver_reconnect().
Referenced by _efi_start(), and efi_image_exec().