|
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. | |
| #define | __efi_driver(order) |
| Declare an EFI driver. | |
| #define | EFI_DRIVER_EARLY 01 |
| Early drivers. | |
| #define | EFI_DRIVER_HARDWARE 02 |
| Hardware drivers. | |
| #define | EFI_DRIVER_NII 03 |
| NII protocol drivers. | |
| #define | EFI_DRIVER_SNP 04 |
| SNP protocol drivers. | |
| #define | EFI_DRIVER_MNP 05 |
| MNP protocol drivers. | |
| #define | EFI_ROM(_name, _desc) |
| Define build rules for an EFI driver. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static void | efidev_set_drvdata (struct efi_device *efidev, void *priv) |
| Set EFI driver-private data. | |
| static void * | efidev_get_drvdata (struct efi_device *efidev) |
| Get EFI driver-private data. | |
| struct efi_device * | efidev_alloc (EFI_HANDLE device) |
| Allocate new EFI device. | |
| void | efidev_free (struct efi_device *efidev) |
| Free EFI device. | |
| struct efi_device * | efidev_parent (struct device *dev) |
| Get parent EFI device. | |
| int | efi_driver_install (void) |
| Install EFI driver. | |
| void | efi_driver_uninstall (void) |
| Uninstall EFI driver. | |
| int | efi_driver_exclude (EFI_HANDLE device, EFI_GUID *protocol) |
| Try to disconnect an existing EFI driver. | |
| int | efi_driver_connect_all (void) |
| Connect EFI driver to all possible devices. | |
| void | efi_driver_disconnect_all (void) |
| Disconnect EFI driver from all possible devices. | |
| void | efi_driver_reconnect_all (void) |
| Reconnect original EFI drivers to all possible devices. | |
EFI driver interface.
Definition in file efi_driver.h.
| #define EFI_DRIVERS __table ( struct efi_driver, "efi_drivers" ) |
EFI driver table.
Definition at line 67 of file efi_driver.h.
Referenced by efi_driver_connect(), efi_driver_start(), and efi_driver_supported().
| #define __efi_driver | ( | order | ) |
Declare an EFI driver.
Definition at line 70 of file efi_driver.h.
Referenced by __efi_driver(), __efi_driver(), __efi_driver(), __efi_driver(), and __efi_driver().
| #define EFI_DRIVER_EARLY 01 |
| #define EFI_DRIVER_HARDWARE 02 |
| #define EFI_DRIVER_NII 03 |
| #define EFI_DRIVER_SNP 04 |
| #define EFI_DRIVER_MNP 05 |
| #define EFI_ROM | ( | _name, | |
| _desc ) |
Define build rules for an EFI driver.
Definition at line 79 of file efi_driver.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
inlinestatic |
Set EFI driver-private data.
| efidev | EFI device |
| priv | Private data |
Definition at line 87 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 98 of file efi_driver.h.
References efi_device::priv.
Referenced by efipci_stop(), mnpnet_stop(), mnptemp_create(), nii_stop(), snpnet_stop(), and usbio_stop().
|
extern |
Allocate new EFI device.
| device | EFI device handle |
| efidev | EFI device, or NULL on error |
Definition at line 57 of file efi_driver.c.
References device_description::bus_type, BUS_TYPE_EFI, device::children, DBGC, device::desc, efi_device::dev, efi_device::device, efi_device_path_protocol_guid, EFI_HANDLE, 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().
|
extern |
Free EFI device.
| efidev | EFI device |
Definition at line 92 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().
|
extern |
Get parent EFI device.
| dev | Generic device |
| efidev | Parent EFI device, or NULL |
Definition at line 129 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().
|
extern |
Install EFI driver.
| rc | Return status code |
Definition at line 388 of file efi_driver.c.
References build_timestamp, DBGC, EEFI, efi_component_name2_protocol_guid, efi_driver_binding, efi_driver_binding_protocol_guid, efi_image_handle, efi_systab, efi_wtf, EFI_BOOT_SERVICES::InstallMultipleProtocolInterfaces, NULL, rc, and strerror().
Referenced by efi_init().
|
extern |
Uninstall EFI driver.
Definition at line 421 of file efi_driver.c.
References 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().
|
extern |
Try to disconnect an existing EFI driver.
| device | EFI device |
| protocol | Protocol GUID |
| rc | Return status code |
Definition at line 438 of file efi_driver.c.
References EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::AgentHandle, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::Attributes, count, DBGC, EEFI, efi_disconnect(), efi_guid_ntoa(), EFI_HANDLE, 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().
|
extern |
Connect EFI driver to all possible devices.
| rc | Return status code |
Definition at line 637 of file efi_driver.c.
References DBGC, efi_driver_binding, efi_driver_connect(), and efi_driver_handles().
Referenced by efi_probe().
|
extern |
Disconnect EFI driver from all possible devices.
| rc | Return status code |
Definition at line 648 of file efi_driver.c.
References DBGC, efi_driver_binding, efi_driver_disconnect(), and efi_driver_handles().
Referenced by efi_remove(), efi_remove(), and efi_unload().
|
extern |
Reconnect original EFI drivers to all possible devices.
| rc | Return status code |
Definition at line 659 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().