#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/uio.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/conf.h>
#include <sys/module.h>
#include <xen/xen-os.h>
#include <xen/hypervisor.h>
#include <xen/xenstore/xenstorevar.h>
#include <vm/vm.h>
#include <vm/pmap.h>
Go to the source code of this file.
|
| __FBSDID ("$FreeBSD$") |
|
static int | xsd_dev_read (struct cdev *dev, struct uio *uio, int ioflag) |
|
static int | xsd_dev_mmap (struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot, vm_memattr_t *memattr) |
|
static void | xsd_dev_identify (driver_t *driver __unused, device_t parent) |
| Identify instances of this device type in the system. More...
|
|
static int | xsd_dev_probe (device_t dev) |
| Probe for the existence of the Xenstored device. More...
|
|
static int | xsd_dev_attach (device_t dev) |
| Attach the Xenstored device. More...
|
|
| DEFINE_CLASS_0 (xsd_dev, xsd_dev_driver, xsd_dev_methods, 0) |
|
| DRIVER_MODULE (xsd_dev, xenpv, xsd_dev_driver, xsd_dev_devclass, NULL, NULL) |
|
◆ XSD_READ_SIZE
◆ __FBSDID()
◆ DEFINE_CLASS_0()
◆ DRIVER_MODULE()
DRIVER_MODULE |
( |
xsd_dev |
, |
|
|
xenpv |
, |
|
|
xsd_dev_driver |
, |
|
|
xsd_dev_devclass |
, |
|
|
NULL |
, |
|
|
NULL |
|
|
) |
| |
◆ xsd_dev_attach()
static int xsd_dev_attach |
( |
device_t |
dev | ) |
|
|
static |
Attach the Xenstored device.
- Parameters
-
dev | NewBus device_t for this instance. |
- Returns
- On success, 0. Otherwise an errno value indicating the type of failure.
Definition at line 138 of file xenstored_dev.c.
References xsd_dev_cdevsw.
◆ xsd_dev_identify()
static void xsd_dev_identify |
( |
driver_t *driver |
__unused, |
|
|
device_t |
parent |
|
) |
| |
|
static |
Identify instances of this device type in the system.
- Parameters
-
driver | The driver performing this identify action. |
parent | The NewBus parent device for any devices this method adds. |
Definition at line 101 of file xenstored_dev.c.
References xs_initialized().
◆ xsd_dev_mmap()
static int xsd_dev_mmap |
( |
struct cdev * |
dev, |
|
|
vm_ooffset_t |
offset, |
|
|
vm_paddr_t * |
paddr, |
|
|
int |
nprot, |
|
|
vm_memattr_t * |
memattr |
|
) |
| |
|
static |
◆ xsd_dev_probe()
static int xsd_dev_probe |
( |
device_t |
dev | ) |
|
|
static |
Probe for the existence of the Xenstored device.
- Parameters
-
dev | NewBus device_t for this instance. |
- Returns
- Always returns 0 indicating success.
Definition at line 122 of file xenstored_dev.c.
◆ xsd_dev_read()
static int xsd_dev_read |
( |
struct cdev * |
dev, |
|
|
struct uio * |
uio, |
|
|
int |
ioflag |
|
) |
| |
|
static |
◆ xsd_dev_cdevsw
struct cdevsw xsd_dev_cdevsw |
|
static |
Initial value:= {
.d_version = D_VERSION,
.d_name = "xsd_dev",
}
static int xsd_dev_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot, vm_memattr_t *memattr)
static int xsd_dev_read(struct cdev *dev, struct uio *uio, int ioflag)
Definition at line 56 of file xenstored_dev.c.
Referenced by xsd_dev_attach().
◆ xsd_dev_devclass
devclass_t xsd_dev_devclass |
◆ xsd_dev_methods
device_method_t xsd_dev_methods[] |
|
static |
Initial value:= {
DEVMETHOD_END
}
static int xsd_dev_probe(device_t dev)
Probe for the existence of the Xenstored device.
static void xsd_dev_identify(driver_t *driver __unused, device_t parent)
Identify instances of this device type in the system.
static int xsd_dev_attach(device_t dev)
Attach the Xenstored device.
Definition at line 151 of file xenstored_dev.c.