|
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_HARDWARE 02 |
| Hardware drivers. More... | |
| #define | EFI_DRIVER_NII 03 |
| NII protocol drivers. More... | |
| #define | EFI_DRIVER_SNP 04 |
| SNP protocol drivers. More... | |
| #define | EFI_DRIVER_MNP 05 |
| MNP protocol 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_exclude (EFI_HANDLE device, EFI_GUID *protocol) |
| Try to disconnect an existing 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 66 of file efi_driver.h.
| #define __efi_driver | ( | order | ) | __table_entry ( EFI_DRIVERS, order ) |
Declare an EFI driver.
Definition at line 69 of file efi_driver.h.
| #define EFI_DRIVER_EARLY 01 |
Early drivers.
Definition at line 71 of file efi_driver.h.
| #define EFI_DRIVER_HARDWARE 02 |
Hardware drivers.
Definition at line 72 of file efi_driver.h.
| #define EFI_DRIVER_NII 03 |
NII protocol drivers.
Definition at line 73 of file efi_driver.h.
| #define EFI_DRIVER_SNP 04 |
SNP protocol drivers.
Definition at line 74 of file efi_driver.h.
| #define EFI_DRIVER_MNP 05 |
MNP protocol drivers.
Definition at line 75 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 83 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 94 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 56 of file efi_driver.c.
References device_description::bus_type, BUS_TYPE_EFI, device::children, DBGC, device::desc, efi_device::dev, efi_device::device, device, efi_device_path_protocol_guid, efi_handle_name(), efi_open, efi_path_len(), INIT_LIST_HEAD, list_add, memcpy(), NULL, 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 91 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 128 of file efi_driver.c.
References efi_device::dev, list_for_each_entry, NULL, device::parent, and device::siblings.
Referenced by efi_parent_path(), and efi_snp_probe().
| int efi_driver_install | ( | void | ) |
Install EFI driver.
| rc | Return status code |
Definition at line 387 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 420 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_exclude | ( | EFI_HANDLE | device, |
| EFI_GUID * | protocol | ||
| ) |
Try to disconnect an existing EFI driver.
| device | EFI device |
| protocol | Protocol GUID |
| rc | Return status code |
Definition at line 437 of file efi_driver.c.
References EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::AgentHandle, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::Attributes, EFI_SYSTEM_TABLE::BootServices, count, DBGC, EEFI, efi_disconnect(), efi_guid_ntoa(), efi_handle_name(), EFI_OPEN_PROTOCOL_BY_DRIVER, efi_systab, EFI_BOOT_SERVICES::FreePool, NULL, EFI_BOOT_SERVICES::OpenProtocolInformation, protocol, rc, and strerror().
Referenced by efipci_exclude(), nii_exclude(), snpnet_exclude(), and usbio_exclude().
| int efi_driver_connect_all | ( | void | ) |
Connect EFI driver to all possible devices.
| rc | Return status code |
Definition at line 636 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 647 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 658 of file efi_driver.c.
References DBGC, efi_driver_binding, efi_driver_handles(), and efi_driver_reconnect().
Referenced by _efi_start(), efi_block_boot(), and efi_image_exec().
1.8.15