|
iPXE
|
Device model. More...
#include <string.h>#include <ipxe/list.h>#include <ipxe/tables.h>#include <ipxe/init.h>#include <ipxe/interface.h>#include <ipxe/device.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static | LIST_HEAD (devices) |
| Registered root devices. | |
| static int | rootdev_probe (struct root_device *rootdev) |
| Probe a root device. | |
| static void | rootdev_remove (struct root_device *rootdev) |
| Remove a root device. | |
| static void | probe_devices (void) |
| Probe all devices. | |
| static void | remove_devices (int booting __unused) |
| Remove all devices. | |
| struct startup_fn startup_devices | __startup_fn (STARTUP_NORMAL) |
| struct device * | identify_device (struct interface *intf) |
| Identify a device behind an interface. | |
Variables | |
| int | device_keep_count = 0 |
| Device removal inhibition counter. | |
Device model.
Definition in file device.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
Registered root devices.
|
static |
Probe a root device.
| rootdev | Root device |
| rc | Return status code |
Definition at line 53 of file device.c.
References DBG, root_device::dev, root_device::driver, device::name, root_driver::probe, rc, and strerror().
Referenced by probe_devices().
|
static |
Remove a root device.
| rootdev | Root device |
Definition at line 71 of file device.c.
References DBG, root_device::dev, root_device::driver, device::name, and root_driver::remove.
Referenced by remove_devices().
|
static |
Probe all devices.
This initiates probing for all devices in the system. After this call, the device hierarchy will be populated, and all hardware should be ready to use.
Definition at line 83 of file device.c.
References device::children, root_device::dev, for_each_table_entry, INIT_LIST_HEAD, list_add, list_del, rc, ROOT_DEVICES, rootdev_probe(), and device::siblings.
Referenced by __startup_fn().
|
static |
Remove all devices.
Definition at line 99 of file device.c.
References __unused, DBG, root_device::dev, device_keep_count, list_del, list_for_each_entry_safe, rootdev_remove(), device::siblings, and tmp.
Referenced by __startup_fn().
| struct startup_fn startup_devices __startup_fn | ( | STARTUP_NORMAL | ) |
References __startup_fn, probe_devices(), remove_devices(), and STARTUP_NORMAL.
Identify a device behind an interface.
| intf | Interface |
| device | Device, or NULL |
Definition at line 126 of file device.c.
References dest, identify_device(), identify_device_TYPE, interface::intf, intf_get_dest_op, intf_object(), intf_put(), NULL, and op.
Referenced by fcpdev_identify_device(), identify_device(), and int13_device_path_info().
| int device_keep_count = 0 |
Device removal inhibition counter.
Definition at line 45 of file device.c.
Referenced by devices_get(), devices_put(), and remove_devices().