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) | |
static | LIST_HEAD (devices) |
Registered root devices. More... | |
static int | rootdev_probe (struct root_device *rootdev) |
Probe a root device. More... | |
static void | rootdev_remove (struct root_device *rootdev) |
Remove a root device. More... | |
static void | probe_devices (void) |
Probe all devices. More... | |
static void | remove_devices (int booting __unused) |
Remove all devices. More... | |
struct startup_fn startup_devices | __startup_fn (STARTUP_NORMAL) |
struct device * | identify_device (struct interface *intf) |
Identify a device behind an interface. More... | |
Variables | |
int | device_keep_count = 0 |
Device removal inhibition counter. More... | |
Device model.
Definition in file device.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Registered root devices.
|
static |
Probe a root device.
rootdev | Root device |
rc | Return status code |
Definition at line 52 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 70 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 82 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.
|
static |
Remove all devices.
Definition at line 98 of file device.c.
References DBG, root_device::dev, device_keep_count, list_del, list_for_each_entry_safe, rootdev_remove(), device::siblings, and tmp.
struct startup_fn startup_devices __startup_fn | ( | STARTUP_NORMAL | ) |
Identify a device behind an interface.
intf | Interface |
device | Device, or NULL |
Definition at line 125 of file device.c.
References dest, device, 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 44 of file device.c.
Referenced by devices_get(), devices_put(), and remove_devices().