iPXE
|
Xen device bus. More...
Go to the source code of this file.
Data Structures | |
struct | xen_device |
A Xen device. More... | |
struct | xen_driver |
A Xen device driver. More... | |
Macros | |
#define | XEN_DRIVERS __table ( struct xen_driver, "xen_drivers" ) |
Xen device driver table. More... | |
#define | __xen_driver __table_entry ( XEN_DRIVERS, 01 ) |
Declare a Xen device driver. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | xen_set_drvdata (struct xen_device *xendev, void *priv) |
Set Xen device driver-private data. More... | |
static void * | xen_get_drvdata (struct xen_device *xendev) |
Get Xen device driver-private data. More... | |
int | xenbus_set_state (struct xen_device *xendev, int state) |
Set device state. More... | |
int | xenbus_backend_state (struct xen_device *xendev) |
Get backend state. More... | |
int | xenbus_backend_wait (struct xen_device *xendev, int state) |
Wait for backend to reach a given state. More... | |
int | xenbus_probe (struct xen_hypervisor *xen, struct device *parent) |
Probe Xen bus. More... | |
void | xenbus_remove (struct xen_hypervisor *xen, struct device *parent) |
Xen device bus.
Definition in file xenbus.h.
#define XEN_DRIVERS __table ( struct xen_driver, "xen_drivers" ) |
#define __xen_driver __table_entry ( XEN_DRIVERS, 01 ) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Set Xen device driver-private data.
xendev | Xen device |
priv | Private data |
Definition at line 66 of file xenbus.h.
References xen_device::priv, and priv.
Referenced by netfront_probe().
|
inlinestatic |
Get Xen device driver-private data.
xendev | Xen device |
priv | Private data |
Definition at line 76 of file xenbus.h.
References xen_device::priv.
Referenced by netfront_remove().
int xenbus_set_state | ( | struct xen_device * | xendev, |
int | state | ||
) |
Set device state.
xendev | Xen device |
state | New state |
rc | Return status code |
Definition at line 105 of file xenbus.c.
References DBGC, xen_device::key, NULL, rc, state, strerror(), xen_device::xen, and xenstore_write_num().
Referenced by netfront_open(), and netfront_reset().
int xenbus_backend_state | ( | struct xen_device * | xendev | ) |
Get backend state.
xendev | Xen device |
state | Backend state, or negative error |
Definition at line 125 of file xenbus.c.
References xen_device::backend, DBGC, xen_device::key, NULL, rc, state, strerror(), xen_device::xen, and xenstore_read_num().
Referenced by netfront_reset(), and xenbus_backend_wait().
int xenbus_backend_wait | ( | struct xen_device * | xendev, |
int | state | ||
) |
Wait for backend to reach a given state.
xendev | Xen device |
state | Desired backend state |
rc | Return status code |
Definition at line 147 of file xenbus.c.
References xen_device::backend, cpu_nap(), currticks(), DBGC, ETIMEDOUT_STATE, xen_device::key, rc, started, state, strerror(), xenbus_backend_state(), and XENBUS_BACKEND_TIMEOUT.
Referenced by netfront_open(), and netfront_reset().
int xenbus_probe | ( | struct xen_hypervisor * | xen, |
struct device * | parent | ||
) |
Probe Xen bus.
xen | Xen hypervisor |
parent | Parent device |
rc | Return status code |
Definition at line 353 of file xenbus.c.
References DBGC, free, len, NULL, rc, strerror(), strlen(), type, xenbus_probe_type(), xenbus_remove(), and xenstore_directory().
Referenced by hvm_probe().
void xenbus_remove | ( | struct xen_hypervisor * | xen, |
struct device * | parent | ||
) |