FreeBSD kernel /amd64 XEN device code
xenpv.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/pcpu.h>
#include <sys/rman.h>
#include <sys/smp.h>
#include <sys/limits.h>
#include <sys/vmmeter.h>
#include <vm/vm.h>
#include <vm/vm_page.h>
#include <vm/vm_param.h>
#include <vm/vm_phys.h>
#include <xen/xen-os.h>
#include <xen/gnttab.h>
#include "xenmem_if.h"
Include dependency graph for xenpv.c:

Go to the source code of this file.

Macros

#define LOW_MEM_LIMIT   0
 

Functions

 __FBSDID ("$FreeBSD$")
 
static void xenpv_identify (driver_t *driver, device_t parent)
 
static int xenpv_probe (device_t dev)
 
static int xenpv_attach (device_t dev)
 
static struct resource * xenpv_alloc_physmem (device_t dev, device_t child, int *res_id, size_t size)
 
static int xenpv_free_physmem (device_t dev, device_t child, int res_id, struct resource *res)
 
 DRIVER_MODULE (xenpv, nexus, xenpv_driver, xenpv_devclass, 0, 0)
 
struct resource * xenmem_alloc (device_t dev, int *res_id, size_t size)
 
int xenmem_free (device_t dev, int res_id, struct resource *res)
 

Variables

static devclass_t xenpv_devclass
 
static device_method_t xenpv_methods []
 
static driver_t xenpv_driver
 

Macro Definition Documentation

◆ LOW_MEM_LIMIT

#define LOW_MEM_LIMIT   0

Definition at line 68 of file xenpv.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( xenpv  ,
nexus  ,
xenpv_driver  ,
xenpv_devclass  ,
,
 
)

◆ xenmem_alloc()

struct resource * xenmem_alloc ( device_t  dev,
int *  res_id,
size_t  size 
)

Definition at line 192 of file xenpv.c.

Referenced by gnttab_resume(), mmap_gmap(), privcmd_mmap_single(), xbb_alloc_communication_mem(), and xnb_alloc_communication_mem().

Here is the caller graph for this function:

◆ xenmem_free()

int xenmem_free ( device_t  dev,
int  res_id,
struct resource *  res 
)

Definition at line 203 of file xenpv.c.

Referenced by mmap_gmap(), notify_unmap_cleanup(), privcmd_mmap_single(), privcmd_pg_dtor(), xbb_free_communication_mem(), and xnb_free_communication_mem().

Here is the caller graph for this function:

◆ xenpv_alloc_physmem()

static struct resource * xenpv_alloc_physmem ( device_t  dev,
device_t  child,
int *  res_id,
size_t  size 
)
static

Definition at line 119 of file xenpv.c.

References LOW_MEM_LIMIT.

◆ xenpv_attach()

static int xenpv_attach ( device_t  dev)
static

Definition at line 100 of file xenpv.c.

◆ xenpv_free_physmem()

static int xenpv_free_physmem ( device_t  dev,
device_t  child,
int  res_id,
struct resource *  res 
)
static

Definition at line 146 of file xenpv.c.

◆ xenpv_identify()

static void xenpv_identify ( driver_t *  driver,
device_t  parent 
)
static

Definition at line 74 of file xenpv.c.

References xenpv_devclass.

◆ xenpv_probe()

static int xenpv_probe ( device_t  dev)
static

Definition at line 92 of file xenpv.c.

Variable Documentation

◆ xenpv_devclass

devclass_t xenpv_devclass
static

Definition at line 71 of file xenpv.c.

Referenced by xenpv_identify().

◆ xenpv_driver

driver_t xenpv_driver
static
Initial value:
= {
"xenpv",
0,
}
static device_method_t xenpv_methods[]
Definition: xenpv.c:161

Definition at line 183 of file xenpv.c.

◆ xenpv_methods

device_method_t xenpv_methods[]
static
Initial value:
= {
DEVMETHOD(device_identify, xenpv_identify),
DEVMETHOD(device_probe, xenpv_probe),
DEVMETHOD(device_attach, xenpv_attach),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(bus_add_child, bus_generic_add_child),
DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
DEVMETHOD(bus_release_resource, bus_generic_release_resource),
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD_END
}
static struct resource * xenpv_alloc_physmem(device_t dev, device_t child, int *res_id, size_t size)
Definition: xenpv.c:119
static int xenpv_probe(device_t dev)
Definition: xenpv.c:92
struct resource * xenmem_alloc(device_t dev, int *res_id, size_t size)
Definition: xenpv.c:192
int xenmem_free(device_t dev, int res_id, struct resource *res)
Definition: xenpv.c:203
static int xenpv_free_physmem(device_t dev, device_t child, int res_id, struct resource *res)
Definition: xenpv.c:146
static void xenpv_identify(driver_t *driver, device_t parent)
Definition: xenpv.c:74
static int xenpv_attach(device_t dev)
Definition: xenpv.c:100

Definition at line 161 of file xenpv.c.