iPXE
Macros | Functions | Variables
efi_driver.c File Reference

EFI driver interface. More...

#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <ipxe/version.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/Protocol/DriverBinding.h>
#include <ipxe/efi/Protocol/ComponentName2.h>
#include <ipxe/efi/Protocol/DevicePath.h>
#include <ipxe/efi/efi_strings.h>
#include <ipxe/efi/efi_utils.h>
#include <ipxe/efi/efi_driver.h>

Go to the source code of this file.

Macros

#define EINFO_EEFI_CONNECT
 
#define EINFO_EEFI_CONNECT_PROHIBITED
 
#define EEFI_CONNECT_PROHIBITED   __einfo_error ( EINFO_EEFI_CONNECT_PROHIBITED )
 
#define EEFI_CONNECT(efirc)
 

Functions

 FILE_LICENCE (GPL2_OR_LATER)
 
static LIST_HEAD (efi_devices)
 List of controlled EFI devices. More...
 
static struct efi_deviceefidev_find (EFI_HANDLE device)
 Find EFI device. More...
 
struct efi_deviceefidev_parent (struct device *dev)
 Get parent EFI device. More...
 
static EFI_STATUS EFIAPI efi_driver_supported (EFI_DRIVER_BINDING_PROTOCOL *driver __unused, EFI_HANDLE device, EFI_DEVICE_PATH_PROTOCOL *child)
 Check to see if driver supports a device. More...
 
static EFI_STATUS EFIAPI efi_driver_start (EFI_DRIVER_BINDING_PROTOCOL *driver __unused, EFI_HANDLE device, EFI_DEVICE_PATH_PROTOCOL *child)
 Attach driver to device. More...
 
static EFI_STATUS EFIAPI efi_driver_stop (EFI_DRIVER_BINDING_PROTOCOL *driver __unused, EFI_HANDLE device, UINTN num_children, EFI_HANDLE *children)
 Detach driver from device. More...
 
static EFI_STATUS EFIAPI efi_driver_name (EFI_COMPONENT_NAME2_PROTOCOL *wtf __unused, CHAR8 *language __unused, CHAR16 **driver_name)
 Look up driver name. More...
 
static EFI_STATUS EFIAPI efi_driver_controller_name (EFI_COMPONENT_NAME2_PROTOCOL *wtf __unused, EFI_HANDLE device, EFI_HANDLE child, CHAR8 *language, CHAR16 **controller_name)
 Look up controller name. More...
 
int efi_driver_install (void)
 Install EFI driver. More...
 
void efi_driver_uninstall (void)
 Uninstall EFI driver. More...
 
static int efi_driver_connect (EFI_HANDLE device)
 Try to connect EFI driver. More...
 
static int efi_driver_disconnect (EFI_HANDLE device)
 Try to disconnect EFI driver. More...
 
static int efi_driver_reconnect (EFI_HANDLE device)
 Reconnect original EFI driver. More...
 
static int efi_driver_handles (int(*method)(EFI_HANDLE handle))
 Connect/disconnect EFI driver from all handles. 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...
 

Variables

static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
 EFI driver binding protocol. More...
 
static int efi_driver_disconnecting
 We are currently disconnecting drivers. More...
 
static EFI_COMPONENT_NAME2_PROTOCOL efi_wtf
 EFI component name protocol. More...
 

Detailed Description

EFI driver interface.

Definition in file efi_driver.c.

Macro Definition Documentation

◆ EINFO_EEFI_CONNECT

#define EINFO_EEFI_CONNECT
Value:
"Could not connect controllers" )
#define EINFO_EPLATFORM
Platform-generated base error.
Definition: errno.h:691
#define __einfo_uniqify(einfo_base, uniq, desc)
Declare disambiguated error.
Definition: errno.h:180

Definition at line 43 of file efi_driver.c.

◆ EINFO_EEFI_CONNECT_PROHIBITED

#define EINFO_EEFI_CONNECT_PROHIBITED
Value:
"Connecting controllers prohibited by " \
"security policy" )
#define __einfo_platformify(einfo_base, platform, desc)
Declare platform-generated error.
Definition: errno.h:193
#define EINFO_EEFI_CONNECT
Definition: efi_driver.c:43
#define EFI_SECURITY_VIOLATION
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:146

Definition at line 46 of file efi_driver.c.

◆ EEFI_CONNECT_PROHIBITED

#define EEFI_CONNECT_PROHIBITED   __einfo_error ( EINFO_EEFI_CONNECT_PROHIBITED )

Definition at line 51 of file efi_driver.c.

◆ EEFI_CONNECT

#define EEFI_CONNECT (   efirc)
Value:
#define EEFI_CONNECT_PROHIBITED
Definition: efi_driver.c:51
#define EINFO_EEFI_CONNECT
Definition: efi_driver.c:43
#define EPLATFORM(einfo_base, platform,...)
Generate an error based on an external platform error code.
Definition: errno.h:248

Definition at line 53 of file efi_driver.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ LIST_HEAD()

static LIST_HEAD ( efi_devices  )
static

List of controlled EFI devices.

◆ efidev_find()

static struct efi_device* efidev_find ( EFI_HANDLE  device)
static

Find EFI device.

Parameters
deviceEFI device handle
Return values
efidevEFI device, or NULL if not found

Definition at line 70 of file efi_driver.c.

70  {
71  struct efi_device *efidev;
72 
73  /* Look for an existing EFI device */
74  list_for_each_entry ( efidev, &efi_devices, dev.siblings ) {
75  if ( efidev->device == device )
76  return efidev;
77  }
78 
79  return NULL;
80 }
EFI_HANDLE device
EFI device handle.
Definition: efi_driver.h:21
A hardware device.
Definition: device.h:73
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
Definition: list.h:420
struct list_head siblings
Devices on the same bus.
Definition: device.h:81
An EFI device.
Definition: efi_driver.h:17
struct device dev
Generic device.
Definition: efi_driver.h:19
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References efi_device::dev, efi_device::device, list_for_each_entry, NULL, and device::siblings.

Referenced by efi_driver_start(), efi_driver_stop(), and efi_driver_supported().

◆ efidev_parent()

struct efi_device* efidev_parent ( struct device dev)

Get parent EFI device.

Parameters
devGeneric device
Return values
efidevParent EFI device, or NULL

Definition at line 88 of file efi_driver.c.

88  {
89  struct device *parent;
90  struct efi_device *efidev;
91 
92  /* Walk upwards until we find a registered EFI device */
93  while ( ( parent = dev->parent ) ) {
94  list_for_each_entry ( efidev, &efi_devices, dev.siblings ) {
95  if ( parent == &efidev->dev )
96  return efidev;
97  }
98  dev = parent;
99  }
100 
101  return NULL;
102 }
struct device * parent
Bus device.
Definition: device.h:85
A hardware device.
Definition: device.h:73
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
Definition: list.h:420
struct list_head siblings
Devices on the same bus.
Definition: device.h:81
An EFI device.
Definition: efi_driver.h:17
struct device dev
Generic device.
Definition: efi_driver.h:19
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References efi_device::dev, list_for_each_entry, NULL, device::parent, and device::siblings.

Referenced by efi_snp_probe(), and efi_usb_probe().

◆ efi_driver_supported()

static EFI_STATUS EFIAPI efi_driver_supported ( EFI_DRIVER_BINDING_PROTOCOL *driver  __unused,
EFI_HANDLE  device,
EFI_DEVICE_PATH_PROTOCOL child 
)
static

Check to see if driver supports a device.

Parameters
driverEFI driver
deviceEFI device
childPath to child device, if any
Return values
efircEFI status code

Definition at line 113 of file efi_driver.c.

114  {
115  struct efi_driver *efidrv;
116  int rc;
117 
118  DBGCP ( device, "EFIDRV %s DRIVER_SUPPORTED",
119  efi_handle_name ( device ) );
120  if ( child )
121  DBGCP ( device, " (child %s)", efi_devpath_text ( child ) );
122  DBGCP ( device, "\n" );
123 
124  /* Do nothing if we are already driving this device */
125  if ( efidev_find ( device ) != NULL ) {
126  DBGCP ( device, "EFIDRV %s is already started\n",
127  efi_handle_name ( device ) );
128  return EFI_ALREADY_STARTED;
129  }
130 
131  /* Look for a driver claiming to support this device */
132  for_each_table_entry ( efidrv, EFI_DRIVERS ) {
133  if ( ( rc = efidrv->supported ( device ) ) == 0 ) {
134  DBGC ( device, "EFIDRV %s has driver \"%s\"\n",
135  efi_handle_name ( device ), efidrv->name );
136  return 0;
137  }
138  }
139  DBGCP ( device, "EFIDRV %s has no driver\n",
140  efi_handle_name ( device ) );
141 
142  return EFI_UNSUPPORTED;
143 }
#define EFI_UNSUPPORTED
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:123
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define EFI_ALREADY_STARTED
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:140
static struct efi_device * efidev_find(EFI_HANDLE device)
Find EFI device.
Definition: efi_driver.c:70
#define DBGC(...)
Definition: compiler.h:505
int(* supported)(EFI_HANDLE device)
Check if driver supports device.
Definition: efi_driver.h:40
A hardware device.
Definition: device.h:73
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
Definition: efi_debug.c:366
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:713
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
Definition: tables.h:358
An EFI driver.
Definition: efi_driver.h:31
const char * name
Name.
Definition: efi_driver.h:33
#define DBGCP(...)
Definition: compiler.h:539
#define EFI_DRIVERS
EFI driver table.
Definition: efi_driver.h:57
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References DBGC, DBGCP, EFI_ALREADY_STARTED, efi_devpath_text(), EFI_DRIVERS, efi_handle_name(), EFI_UNSUPPORTED, efidev_find(), for_each_table_entry, efi_driver::name, NULL, rc, and efi_driver::supported.

Referenced by efi_driver_connect().

◆ efi_driver_start()

static EFI_STATUS EFIAPI efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver  __unused,
EFI_HANDLE  device,
EFI_DEVICE_PATH_PROTOCOL child 
)
static

Attach driver to device.

Parameters
driverEFI driver
deviceEFI device
childPath to child device, if any
Return values
efircEFI status code

Definition at line 154 of file efi_driver.c.

155  {
157  struct efi_driver *efidrv;
158  struct efi_device *efidev;
159  union {
161  void *interface;
162  } path;
163  EFI_DEVICE_PATH_PROTOCOL *path_end;
164  size_t path_len;
165  EFI_TPL saved_tpl;
166  EFI_STATUS efirc;
167  int rc;
168 
169  DBGC ( device, "EFIDRV %s DRIVER_START", efi_handle_name ( device ) );
170  if ( child )
171  DBGC ( device, " (child %s)", efi_devpath_text ( child ) );
172  DBGC ( device, "\n" );
173 
174  /* Do nothing if we are already driving this device */
175  efidev = efidev_find ( device );
176  if ( efidev ) {
177  DBGCP ( device, "EFIDRV %s is already started\n",
178  efi_handle_name ( device ) );
179  efirc = EFI_ALREADY_STARTED;
180  goto err_already_started;
181  }
182 
183  /* Raise TPL */
184  saved_tpl = bs->RaiseTPL ( TPL_CALLBACK );
185 
186  /* Do nothing if we are currently disconnecting drivers */
187  if ( efi_driver_disconnecting ) {
188  DBGC ( device, "EFIDRV %s refusing to start during "
189  "disconnection\n", efi_handle_name ( device ) );
190  efirc = EFI_NOT_READY;
191  goto err_disconnecting;
192  }
193 
194  /* Open device path */
195  if ( ( efirc = bs->OpenProtocol ( device,
197  &path.interface, efi_image_handle,
198  device,
200  rc = -EEFI ( efirc );
201  DBGC ( device, "EFIDRV %s could not open device path: %s\n",
202  efi_handle_name ( device ), strerror ( rc ) );
203  goto err_open_path;
204  }
205  path_len = ( efi_devpath_len ( path.path ) + sizeof ( *path_end ) );
206 
207  /* Allocate and initialise structure */
208  efidev = zalloc ( sizeof ( *efidev ) + path_len );
209  if ( ! efidev ) {
210  efirc = EFI_OUT_OF_RESOURCES;
211  goto err_alloc;
212  }
213  efidev->device = device;
214  efidev->dev.desc.bus_type = BUS_TYPE_EFI;
215  efidev->path = ( ( ( void * ) efidev ) + sizeof ( *efidev ) );
216  memcpy ( efidev->path, path.path, path_len );
217  INIT_LIST_HEAD ( &efidev->dev.children );
218  list_add ( &efidev->dev.siblings, &efi_devices );
219 
220  /* Close device path */
223  path.path = NULL;
224 
225  /* Try to start this device */
226  for_each_table_entry ( efidrv, EFI_DRIVERS ) {
227  if ( ( rc = efidrv->supported ( device ) ) != 0 ) {
228  DBGC ( device, "EFIDRV %s is not supported by driver "
229  "\"%s\": %s\n", efi_handle_name ( device ),
230  efidrv->name,
231  strerror ( rc ) );
232  continue;
233  }
234  if ( ( rc = efidrv->start ( efidev ) ) == 0 ) {
235  efidev->driver = efidrv;
236  DBGC ( device, "EFIDRV %s using driver \"%s\"\n",
238  efidev->driver->name );
239  bs->RestoreTPL ( saved_tpl );
240  return 0;
241  }
242  DBGC ( device, "EFIDRV %s could not start driver \"%s\": %s\n",
243  efi_handle_name ( device ), efidrv->name,
244  strerror ( rc ) );
245  }
246  efirc = EFI_UNSUPPORTED;
247 
248  list_del ( &efidev->dev.siblings );
249  free ( efidev );
250  err_alloc:
251  if ( path.path ) {
254  }
255  err_open_path:
256  err_disconnecting:
257  bs->RestoreTPL ( saved_tpl );
258  err_already_started:
259  return efirc;
260 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
#define EFI_UNSUPPORTED
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:123
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
Definition: efi.h:159
EFI_RAISE_TPL RaiseTPL
Definition: UefiSpec.h:1845
struct efi_driver * driver
Driver for this device.
Definition: efi_driver.h:25
#define EFI_ALREADY_STARTED
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:140
#define list_add(new, head)
Add a new entry to the head of a list.
Definition: list.h:69
static int efi_driver_disconnecting
We are currently disconnecting drivers.
Definition: efi_driver.c:62
static struct efi_device * efidev_find(EFI_HANDLE device)
Find EFI device.
Definition: efi_driver.c:70
#define DBGC(...)
Definition: compiler.h:505
size_t efi_devpath_len(EFI_DEVICE_PATH_PROTOCOL *path)
Find length of device path (excluding terminator)
Definition: efi_utils.c:59
EFI_HANDLE device
EFI device handle.
Definition: efi_driver.h:21
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition: DevicePath.h:51
uint16_t device
Device ID.
Definition: ena.h:24
EFI_CLOSE_PROTOCOL CloseProtocol
Definition: UefiSpec.h:1906
#define EFI_OUT_OF_RESOURCES
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:129
int(* supported)(EFI_HANDLE device)
Check if driver supports device.
Definition: efi_driver.h:40
#define list_del(list)
Delete an entry from a list.
Definition: list.h:119
A hardware device.
Definition: device.h:73
void * memcpy(void *dest, const void *src, size_t len) __nonnull
An object interface.
Definition: interface.h:109
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
Definition: efi_debug.c:366
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL
Definition: UefiSpec.h:1271
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:713
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
static void(* free)(struct refcnt *refcnt))
Definition: refcnt.h:54
void * zalloc(size_t size)
Allocate cleared memory.
Definition: malloc.c:624
EFI Boot Services Table.
Definition: UefiSpec.h:1836
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
Definition: efi_init.c:30
struct list_head siblings
Devices on the same bus.
Definition: device.h:81
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
Definition: tables.h:358
#define TPL_CALLBACK
Definition: UefiSpec.h:591
#define EFI_NOT_READY
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:126
An EFI device.
Definition: efi_driver.h:17
EFI_GUID efi_device_path_protocol_guid
Device path protocol GUID.
Definition: efi_guid.c:132
#define BUS_TYPE_EFI
EFI bus type.
Definition: device.h:61
An EFI driver.
Definition: efi_driver.h:31
#define INIT_LIST_HEAD(list)
Initialise a list head.
Definition: list.h:45
unsigned int bus_type
Bus type.
Definition: device.h:24
UINTN EFI_TPL
Task priority level.
Definition: UefiBaseType.h:47
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
struct list_head children
Devices attached to this device.
Definition: device.h:83
const char * name
Name.
Definition: efi_driver.h:33
struct device_description desc
Device description.
Definition: device.h:79
#define DBGCP(...)
Definition: compiler.h:539
EFI_SYSTEM_TABLE * efi_systab
EFI_OPEN_PROTOCOL OpenProtocol
Definition: UefiSpec.h:1905
EFI_DEVICE_PATH_PROTOCOL * path
EFI device path copy.
Definition: efi_driver.h:23
EFI_RESTORE_TPL RestoreTPL
Definition: UefiSpec.h:1846
#define EFI_DRIVERS
EFI driver table.
Definition: efi_driver.h:57
struct device dev
Generic device.
Definition: efi_driver.h:19
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
int(* start)(struct efi_device *efidev)
Attach driver to device.
Definition: efi_driver.h:47

References EFI_SYSTEM_TABLE::BootServices, device_description::bus_type, BUS_TYPE_EFI, device::children, EFI_BOOT_SERVICES::CloseProtocol, DBGC, DBGCP, device::desc, efi_device::dev, efi_device::device, device, efi_device::driver, EEFI, EFI_ALREADY_STARTED, efi_device_path_protocol_guid, efi_devpath_len(), efi_devpath_text(), efi_driver_disconnecting, EFI_DRIVERS, efi_handle_name(), efi_image_handle, EFI_NOT_READY, EFI_OPEN_PROTOCOL_GET_PROTOCOL, EFI_OUT_OF_RESOURCES, efi_systab, EFI_UNSUPPORTED, efidev_find(), for_each_table_entry, free, INIT_LIST_HEAD, list_add, list_del, memcpy(), efi_driver::name, NULL, EFI_BOOT_SERVICES::OpenProtocol, efi_device::path, EFI_BOOT_SERVICES::RaiseTPL, rc, EFI_BOOT_SERVICES::RestoreTPL, device::siblings, efi_driver::start, strerror(), efi_driver::supported, TPL_CALLBACK, and zalloc().

Referenced by efi_driver_connect().

◆ efi_driver_stop()

static EFI_STATUS EFIAPI efi_driver_stop ( EFI_DRIVER_BINDING_PROTOCOL *driver  __unused,
EFI_HANDLE  device,
UINTN  num_children,
EFI_HANDLE children 
)
static

Detach driver from device.

Parameters
driverEFI driver
deviceEFI device
pciPCI device
num_childrenNumber of child devices
childrenList of child devices
Return values
efircEFI status code

Definition at line 273 of file efi_driver.c.

275  {
277  struct efi_driver *efidrv;
278  struct efi_device *efidev;
279  EFI_TPL saved_tpl;
280  UINTN i;
281 
282  DBGC ( device, "EFIDRV %s DRIVER_STOP", efi_handle_name ( device ) );
283  for ( i = 0 ; i < num_children ; i++ ) {
284  DBGC ( device, "%s%s", ( i ? ", " : " child " ),
285  efi_handle_name ( children[i] ) );
286  }
287  DBGC ( device, "\n" );
288 
289  /* Do nothing unless we are driving this device */
290  efidev = efidev_find ( device );
291  if ( ! efidev ) {
292  DBGCP ( device, "EFIDRV %s is not started\n",
293  efi_handle_name ( device ) );
294  return EFI_DEVICE_ERROR;
295  }
296 
297  /* Raise TPL */
298  saved_tpl = bs->RaiseTPL ( TPL_CALLBACK );
299 
300  /* Stop this device */
301  efidrv = efidev->driver;
302  assert ( efidrv != NULL );
303  efidrv->stop ( efidev );
304  list_del ( &efidev->dev.siblings );
305  free ( efidev );
306 
307  bs->RestoreTPL ( saved_tpl );
308  return 0;
309 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
EFI_RAISE_TPL RaiseTPL
Definition: UefiSpec.h:1845
struct efi_driver * driver
Driver for this device.
Definition: efi_driver.h:25
void(* stop)(struct efi_device *efidev)
Detach driver from device.
Definition: efi_driver.h:53
static struct efi_device * efidev_find(EFI_HANDLE device)
Find EFI device.
Definition: efi_driver.c:70
#define DBGC(...)
Definition: compiler.h:505
#define EFI_DEVICE_ERROR
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:127
#define list_del(list)
Delete an entry from a list.
Definition: list.h:119
A hardware device.
Definition: device.h:73
char unsigned long const char unsigned long char ** children
Definition: xenstore.h:25
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:713
static void(* free)(struct refcnt *refcnt))
Definition: refcnt.h:54
EFI Boot Services Table.
Definition: UefiSpec.h:1836
struct list_head siblings
Devices on the same bus.
Definition: device.h:81
#define TPL_CALLBACK
Definition: UefiSpec.h:591
UINT64 UINTN
Unsigned value of native width.
Definition: ProcessorBind.h:71
An EFI device.
Definition: efi_driver.h:17
An EFI driver.
Definition: efi_driver.h:31
UINTN EFI_TPL
Task priority level.
Definition: UefiBaseType.h:47
#define DBGCP(...)
Definition: compiler.h:539
EFI_SYSTEM_TABLE * efi_systab
EFI_RESTORE_TPL RestoreTPL
Definition: UefiSpec.h:1846
struct device dev
Generic device.
Definition: efi_driver.h:19
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References assert(), EFI_SYSTEM_TABLE::BootServices, children, DBGC, DBGCP, efi_device::dev, efi_device::driver, EFI_DEVICE_ERROR, efi_handle_name(), efi_systab, efidev_find(), free, list_del, NULL, EFI_BOOT_SERVICES::RaiseTPL, EFI_BOOT_SERVICES::RestoreTPL, device::siblings, efi_driver::stop, and TPL_CALLBACK.

◆ efi_driver_name()

static EFI_STATUS EFIAPI efi_driver_name ( EFI_COMPONENT_NAME2_PROTOCOL *wtf  __unused,
CHAR8 *language  __unused,
CHAR16 **  driver_name 
)
static

Look up driver name.

Parameters
wtfComponent name protocol
languageLanguage to use
driver_nameDriver name to fill in
Return values
efircEFI status code

Definition at line 327 of file efi_driver.c.

328  {
329  const wchar_t *name;
330 
332  *driver_name = ( ( wchar_t * ) name );
333  return 0;
334 }
const char * name
Definition: ath9k_hw.c:1984
const wchar_t product_wname[]
Wide-character product name string.
Definition: version.c:84
const wchar_t build_wname[]
Wide-character build name string.
Definition: version.c:90

References build_wname, name, and product_wname.

◆ efi_driver_controller_name()

static EFI_STATUS EFIAPI efi_driver_controller_name ( EFI_COMPONENT_NAME2_PROTOCOL *wtf  __unused,
EFI_HANDLE  device,
EFI_HANDLE  child,
CHAR8 language,
CHAR16 **  controller_name 
)
static

Look up controller name.

Parameters
wtfComponent name protocol
deviceDevice
childChild device, or NULL
languageLanguage to use
driver_nameDevice name to fill in
Return values
efircEFI status code

Definition at line 347 of file efi_driver.c.

349  {
351  union {
353  void *interface;
354  } name2;
355  EFI_STATUS efirc;
356 
357  /* Delegate to the EFI_COMPONENT_NAME2_PROTOCOL instance
358  * installed on child handle, if present.
359  */
360  if ( ( child != NULL ) &&
361  ( ( efirc = bs->OpenProtocol (
363  &name2.interface, NULL, NULL,
364  EFI_OPEN_PROTOCOL_GET_PROTOCOL ) ) == 0 ) ) {
365  return name2.name2->GetControllerName ( name2.name2, device,
366  child, language,
367  controller_name );
368  }
369 
370  /* Otherwise, let EFI use the default Device Path Name */
371  return EFI_UNSUPPORTED;
372 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
#define EFI_UNSUPPORTED
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:123
This protocol is used to retrieve user readable names of drivers and controllers managed by UEFI Driv...
A hardware device.
Definition: device.h:73
An object interface.
Definition: interface.h:109
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL
Definition: UefiSpec.h:1271
EFI Boot Services Table.
Definition: UefiSpec.h:1836
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
Definition: efi_guid.c:124
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
EFI_SYSTEM_TABLE * efi_systab
EFI_OPEN_PROTOCOL OpenProtocol
Definition: UefiSpec.h:1905
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References EFI_SYSTEM_TABLE::BootServices, efi_component_name2_protocol_guid, EFI_OPEN_PROTOCOL_GET_PROTOCOL, efi_systab, EFI_UNSUPPORTED, NULL, and EFI_BOOT_SERVICES::OpenProtocol.

◆ efi_driver_install()

int efi_driver_install ( void  )

Install EFI driver.

Return values
rcReturn status code

Definition at line 386 of file efi_driver.c.

386  {
388  EFI_STATUS efirc;
389  int rc;
390 
391  /* Calculate driver version number. We use the build
392  * timestamp (in seconds since the Epoch) shifted right by six
393  * bits: this gives us an approximately one-minute resolution
394  * and a scheme which will last until the year 10680.
395  */
397 
398  /* Install protocols on image handle */
401  if ( ( efirc = bs->InstallMultipleProtocolInterfaces (
405  NULL ) ) != 0 ) {
406  rc = -EEFI ( efirc );
407  DBGC ( &efi_driver_binding, "EFIDRV could not install "
408  "protocols: %s\n", strerror ( rc ) );
409  return rc;
410  }
411 
412  return 0;
413 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
Definition: efi.h:159
#define DBGC(...)
Definition: compiler.h:505
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces
Definition: UefiSpec.h:1915
unsigned long build_timestamp
Build timestamp.
Definition: version.c:57
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
EFI Boot Services Table.
Definition: UefiSpec.h:1836
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
Definition: efi_init.c:30
EFI_HANDLE DriverBindingHandle
The handle on which this instance of the EFI_DRIVER_BINDING_PROTOCOL is installed.
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
Definition: efi_guid.c:124
EFI_HANDLE ImageHandle
The image handle of the UEFI driver that produced this instance of the EFI_DRIVER_BINDING_PROTOCOL.
static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
EFI driver binding protocol.
Definition: efi_driver.c:56
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
EFI_SYSTEM_TABLE * efi_systab
static EFI_COMPONENT_NAME2_PROTOCOL efi_wtf
EFI component name protocol.
Definition: efi_driver.c:375
EFI_GUID efi_driver_binding_protocol_guid
Driver binding protocol GUID.
Definition: efi_guid.c:148
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
UINT32 Version
The version number of the UEFI driver that produced the EFI_DRIVER_BINDING_PROTOCOL.

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().

◆ efi_driver_uninstall()

void efi_driver_uninstall ( void  )

Uninstall EFI driver.

Definition at line 419 of file efi_driver.c.

419  {
421 
422  /* Uninstall protocols */
427 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
EFI Boot Services Table.
Definition: UefiSpec.h:1836
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
Definition: efi_init.c:30
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces
Definition: UefiSpec.h:1916
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
Definition: efi_guid.c:124
static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
EFI driver binding protocol.
Definition: efi_driver.c:56
EFI_SYSTEM_TABLE * efi_systab
static EFI_COMPONENT_NAME2_PROTOCOL efi_wtf
EFI component name protocol.
Definition: efi_driver.c:375
EFI_GUID efi_driver_binding_protocol_guid
Driver binding protocol GUID.
Definition: efi_guid.c:148
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

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().

◆ efi_driver_connect()

static int efi_driver_connect ( EFI_HANDLE  device)
static

Try to connect EFI driver.

Parameters
deviceEFI device
Return values
rcReturn status code

Definition at line 435 of file efi_driver.c.

435  {
437  EFI_HANDLE drivers[2] =
439  EFI_STATUS efirc;
440  int rc;
441 
442  /* Check if we want to drive this device */
444  NULL ) ) != 0 ) {
445  /* Not supported; not an error */
446  return 0;
447  }
448 
449  /* Disconnect any existing drivers */
450  DBGC2 ( device, "EFIDRV %s before disconnecting:\n",
451  efi_handle_name ( device ) );
453  DBGC ( device, "EFIDRV %s disconnecting existing drivers\n",
454  efi_handle_name ( device ) );
456  if ( ( efirc = bs->DisconnectController ( device, NULL,
457  NULL ) ) != 0 ) {
458  rc = -EEFI ( efirc );
459  DBGC ( device, "EFIDRV %s could not disconnect existing "
460  "drivers: %s\n", efi_handle_name ( device ),
461  strerror ( rc ) );
462  /* Ignore the error and attempt to connect our drivers */
463  }
465  DBGC2 ( device, "EFIDRV %s after disconnecting:\n",
466  efi_handle_name ( device ) );
468 
469  /* Connect our driver */
470  DBGC ( device, "EFIDRV %s connecting new drivers\n",
471  efi_handle_name ( device ) );
472  if ( ( efirc = bs->ConnectController ( device, drivers, NULL,
473  FALSE ) ) != 0 ) {
474  rc = -EEFI_CONNECT ( efirc );
475  DBGC ( device, "EFIDRV %s could not connect new drivers: "
476  "%s\n", efi_handle_name ( device ), strerror ( rc ) );
477  DBGC ( device, "EFIDRV %s connecting driver directly\n",
478  efi_handle_name ( device ) );
479  if ( ( efirc = efi_driver_start ( &efi_driver_binding, device,
480  NULL ) ) != 0 ) {
481  rc = -EEFI_CONNECT ( efirc );
482  DBGC ( device, "EFIDRV %s could not connect driver "
483  "directly: %s\n", efi_handle_name ( device ),
484  strerror ( rc ) );
485  return rc;
486  }
487  }
488  DBGC2 ( device, "EFIDRV %s after connecting:\n",
489  efi_handle_name ( device ) );
491 
492  return 0;
493 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
Definition: efi.h:159
static int efi_driver_disconnecting
We are currently disconnecting drivers.
Definition: efi_driver.c:62
#define DBGC(...)
Definition: compiler.h:505
static EFI_STATUS EFIAPI efi_driver_supported(EFI_DRIVER_BINDING_PROTOCOL *driver __unused, EFI_HANDLE device, EFI_DEVICE_PATH_PROTOCOL *child)
Check to see if driver supports a device.
Definition: efi_driver.c:113
A hardware device.
Definition: device.h:73
static EFI_STATUS EFIAPI efi_driver_start(EFI_DRIVER_BINDING_PROTOCOL *driver __unused, EFI_HANDLE device, EFI_DEVICE_PATH_PROTOCOL *child)
Attach driver to device.
Definition: efi_driver.c:154
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:713
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
EFI Boot Services Table.
Definition: UefiSpec.h:1836
EFI_HANDLE DriverBindingHandle
The handle on which this instance of the EFI_DRIVER_BINDING_PROTOCOL is installed.
EFI_CONNECT_CONTROLLER ConnectController
Definition: UefiSpec.h:1899
#define EEFI_CONNECT(efirc)
Definition: efi_driver.c:53
#define DBGC2(...)
Definition: compiler.h:522
static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
EFI driver binding protocol.
Definition: efi_driver.c:56
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
#define DBGC2_EFI_PROTOCOLS(...)
Definition: efi.h:269
#define FALSE
Definition: tlan.h:45
EFI_SYSTEM_TABLE * efi_systab
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
Definition: efi.h:55
EFI_DISCONNECT_CONTROLLER DisconnectController
Definition: UefiSpec.h:1900

References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::ConnectController, DBGC, DBGC2, DBGC2_EFI_PROTOCOLS, EFI_BOOT_SERVICES::DisconnectController, _EFI_DRIVER_BINDING_PROTOCOL::DriverBindingHandle, EEFI, EEFI_CONNECT, efi_driver_binding, efi_driver_disconnecting, efi_driver_start(), efi_driver_supported(), efi_handle_name(), efi_systab, FALSE, NULL, rc, and strerror().

Referenced by efi_driver_connect_all().

◆ efi_driver_disconnect()

static int efi_driver_disconnect ( EFI_HANDLE  device)
static

Try to disconnect EFI driver.

Parameters
deviceEFI device
Return values
rcReturn status code

Definition at line 501 of file efi_driver.c.

501  {
503 
504  /* Disconnect our driver */
508  NULL );
510  return 0;
511 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
static int efi_driver_disconnecting
We are currently disconnecting drivers.
Definition: efi_driver.c:62
A hardware device.
Definition: device.h:73
EFI Boot Services Table.
Definition: UefiSpec.h:1836
EFI_HANDLE DriverBindingHandle
The handle on which this instance of the EFI_DRIVER_BINDING_PROTOCOL is installed.
static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
EFI driver binding protocol.
Definition: efi_driver.c:56
EFI_SYSTEM_TABLE * efi_systab
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
EFI_DISCONNECT_CONTROLLER DisconnectController
Definition: UefiSpec.h:1900

References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::DisconnectController, _EFI_DRIVER_BINDING_PROTOCOL::DriverBindingHandle, efi_driver_binding, efi_driver_disconnecting, efi_systab, and NULL.

Referenced by efi_driver_disconnect_all().

◆ efi_driver_reconnect()

static int efi_driver_reconnect ( EFI_HANDLE  device)
static

Reconnect original EFI driver.

Parameters
deviceEFI device
Return values
rcReturn status code

Definition at line 519 of file efi_driver.c.

519  {
521 
522  /* Reconnect any available driver */
524 
525  return 0;
526 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
A hardware device.
Definition: device.h:73
EFI Boot Services Table.
Definition: UefiSpec.h:1836
EFI_CONNECT_CONTROLLER ConnectController
Definition: UefiSpec.h:1899
#define FALSE
Definition: tlan.h:45
EFI_SYSTEM_TABLE * efi_systab
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::ConnectController, efi_systab, FALSE, and NULL.

Referenced by efi_driver_reconnect_all().

◆ efi_driver_handles()

static int efi_driver_handles ( int(*)(EFI_HANDLE handle method)
static

Connect/disconnect EFI driver from all handles.

Parameters
methodConnect/disconnect method
Return values
rcReturn status code

Definition at line 534 of file efi_driver.c.

534  {
536  EFI_HANDLE *handles;
537  UINTN num_handles;
538  EFI_STATUS efirc;
539  UINTN i;
540  int rc;
541 
542  /* Enumerate all handles */
543  if ( ( efirc = bs->LocateHandleBuffer ( AllHandles, NULL, NULL,
544  &num_handles,
545  &handles ) ) != 0 ) {
546  rc = -EEFI ( efirc );
547  DBGC ( &efi_driver_binding, "EFIDRV could not list handles: "
548  "%s\n", strerror ( rc ) );
549  goto err_locate;
550  }
551 
552  /* Connect/disconnect driver from all handles */
553  for ( i = 0 ; i < num_handles ; i++ ) {
554  if ( ( rc = method ( handles[i] ) ) != 0 ) {
555  /* Ignore errors and continue to process
556  * remaining handles.
557  */
558  }
559  }
560 
561  /* Success */
562  rc = 0;
563 
564  bs->FreePool ( handles );
565  err_locate:
566  return rc;
567 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2000
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
Definition: efi.h:159
Retrieve all the handles in the handle database.
Definition: UefiSpec.h:1439
#define DBGC(...)
Definition: compiler.h:505
uint8_t method
Definition: ib_mad.h:14
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
EFI Boot Services Table.
Definition: UefiSpec.h:1836
UINT64 UINTN
Unsigned value of native width.
Definition: ProcessorBind.h:71
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1855
static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
EFI driver binding protocol.
Definition: efi_driver.c:56
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
EFI_SYSTEM_TABLE * efi_systab
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
Definition: efi.h:55
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer
Definition: UefiSpec.h:1913

References AllHandles, EFI_SYSTEM_TABLE::BootServices, DBGC, EEFI, efi_driver_binding, efi_systab, EFI_BOOT_SERVICES::FreePool, EFI_BOOT_SERVICES::LocateHandleBuffer, method, NULL, rc, and strerror().

Referenced by efi_driver_connect_all(), efi_driver_disconnect_all(), and efi_driver_reconnect_all().

◆ efi_driver_connect_all()

int efi_driver_connect_all ( void  )

Connect EFI driver to all possible devices.

Return values
rcReturn status code

Definition at line 574 of file efi_driver.c.

574  {
575 
576  DBGC ( &efi_driver_binding, "EFIDRV connecting our drivers\n" );
578 }
static int efi_driver_connect(EFI_HANDLE device)
Try to connect EFI driver.
Definition: efi_driver.c:435
#define DBGC(...)
Definition: compiler.h:505
static int efi_driver_handles(int(*method)(EFI_HANDLE handle))
Connect/disconnect EFI driver from all handles.
Definition: efi_driver.c:534
static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
EFI driver binding protocol.
Definition: efi_driver.c:56

References DBGC, efi_driver_binding, efi_driver_connect(), and efi_driver_handles().

Referenced by efi_probe().

◆ efi_driver_disconnect_all()

void efi_driver_disconnect_all ( void  )

Disconnect EFI driver from all possible devices.

Return values
rcReturn status code

Definition at line 585 of file efi_driver.c.

585  {
586 
587  DBGC ( &efi_driver_binding, "EFIDRV disconnecting our drivers\n" );
589 }
#define DBGC(...)
Definition: compiler.h:505
static int efi_driver_handles(int(*method)(EFI_HANDLE handle))
Connect/disconnect EFI driver from all handles.
Definition: efi_driver.c:534
static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
EFI driver binding protocol.
Definition: efi_driver.c:56
static int efi_driver_disconnect(EFI_HANDLE device)
Try to disconnect EFI driver.
Definition: efi_driver.c:501

References DBGC, efi_driver_binding, efi_driver_disconnect(), and efi_driver_handles().

Referenced by efi_remove(), and efi_unload().

◆ efi_driver_reconnect_all()

void efi_driver_reconnect_all ( void  )

Reconnect original EFI drivers to all possible devices.

Return values
rcReturn status code

Definition at line 596 of file efi_driver.c.

596  {
597 
598  DBGC ( &efi_driver_binding, "EFIDRV reconnecting old drivers\n" );
600 }
#define DBGC(...)
Definition: compiler.h:505
static int efi_driver_reconnect(EFI_HANDLE device)
Reconnect original EFI driver.
Definition: efi_driver.c:519
static int efi_driver_handles(int(*method)(EFI_HANDLE handle))
Connect/disconnect EFI driver from all handles.
Definition: efi_driver.c:534
static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
EFI driver binding protocol.
Definition: efi_driver.c:56

References DBGC, efi_driver_binding, efi_driver_handles(), and efi_driver_reconnect().

Referenced by _efi_start().

Variable Documentation

◆ efi_driver_binding

static EFI_DRIVER_BINDING_PROTOCOL efi_driver_binding
static
Initial value:
= {
.Supported = efi_driver_supported,
.Start = efi_driver_start,
.Stop = efi_driver_stop,
}
static EFI_STATUS EFIAPI efi_driver_supported(EFI_DRIVER_BINDING_PROTOCOL *driver __unused, EFI_HANDLE device, EFI_DEVICE_PATH_PROTOCOL *child)
Check to see if driver supports a device.
Definition: efi_driver.c:113
static EFI_STATUS EFIAPI efi_driver_start(EFI_DRIVER_BINDING_PROTOCOL *driver __unused, EFI_HANDLE device, EFI_DEVICE_PATH_PROTOCOL *child)
Attach driver to device.
Definition: efi_driver.c:154
static EFI_STATUS EFIAPI efi_driver_stop(EFI_DRIVER_BINDING_PROTOCOL *driver __unused, EFI_HANDLE device, UINTN num_children, EFI_HANDLE *children)
Detach driver from device.
Definition: efi_driver.c:273

EFI driver binding protocol.

Definition at line 56 of file efi_driver.c.

Referenced by efi_driver_connect(), efi_driver_connect_all(), efi_driver_disconnect(), efi_driver_disconnect_all(), efi_driver_handles(), efi_driver_install(), efi_driver_reconnect_all(), and efi_driver_uninstall().

◆ efi_driver_disconnecting

int efi_driver_disconnecting
static

We are currently disconnecting drivers.

Definition at line 62 of file efi_driver.c.

Referenced by efi_driver_connect(), efi_driver_disconnect(), and efi_driver_start().

◆ efi_wtf

Initial value:
= {
.GetDriverName = efi_driver_name,
.GetControllerName = efi_driver_controller_name,
.SupportedLanguages = "en",
}
static EFI_STATUS EFIAPI efi_driver_name(EFI_COMPONENT_NAME2_PROTOCOL *wtf __unused, CHAR8 *language __unused, CHAR16 **driver_name)
Look up driver name.
Definition: efi_driver.c:327
static EFI_STATUS EFIAPI efi_driver_controller_name(EFI_COMPONENT_NAME2_PROTOCOL *wtf __unused, EFI_HANDLE device, EFI_HANDLE child, CHAR8 *language, CHAR16 **controller_name)
Look up controller name.
Definition: efi_driver.c:347

EFI component name protocol.

Definition at line 375 of file efi_driver.c.

Referenced by efi_driver_install(), and efi_driver_uninstall().