FreeBSD kernel AGP device code
agp_intel.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <dev/agp/agppriv.h>
#include <dev/agp/agpreg.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/pmap.h>
Include dependency graph for agp_intel.c:

Go to the source code of this file.

Data Structures

struct  agp_intel_softc
 

Macros

#define MAX_APSIZE   0x3f /* 256 MB */
 

Functions

 __FBSDID ("$FreeBSD$")
 
static const char * agp_intel_match (device_t dev)
 
static int agp_intel_probe (device_t dev)
 
static void agp_intel_commit_gatt (device_t dev)
 
static int agp_intel_attach (device_t dev)
 
static int agp_intel_detach (device_t dev)
 
static int agp_intel_resume (device_t dev)
 
static u_int32_t agp_intel_get_aperture (device_t dev)
 
static int agp_intel_set_aperture (device_t dev, u_int32_t aperture)
 
static int agp_intel_bind_page (device_t dev, vm_offset_t offset, vm_offset_t physical)
 
static int agp_intel_unbind_page (device_t dev, vm_offset_t offset)
 
static void agp_intel_flush_tlb (device_t dev)
 
 DRIVER_MODULE (agp_intel, hostb, agp_intel_driver, agp_devclass, 0, 0)
 
 MODULE_DEPEND (agp_intel, agp, 1, 1, 1)
 
 MODULE_DEPEND (agp_intel, pci, 1, 1, 1)
 

Variables

static device_method_t agp_intel_methods []
 
static driver_t agp_intel_driver
 
static devclass_t agp_devclass
 

Macro Definition Documentation

◆ MAX_APSIZE

#define MAX_APSIZE   0x3f /* 256 MB */

Definition at line 51 of file agp_intel.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ agp_intel_attach()

static int agp_intel_attach ( device_t  dev)
static

◆ agp_intel_bind_page()

static int agp_intel_bind_page ( device_t  dev,
vm_offset_t  offset,
vm_offset_t  physical 
)
static

◆ agp_intel_commit_gatt()

static void agp_intel_commit_gatt ( device_t  dev)
static

◆ agp_intel_detach()

static int agp_intel_detach ( device_t  dev)
static

◆ agp_intel_flush_tlb()

static void agp_intel_flush_tlb ( device_t  dev)
static

Definition at line 396 of file agp_intel.c.

References AGP_INTEL_AGPCTRL.

◆ agp_intel_get_aperture()

static u_int32_t agp_intel_get_aperture ( device_t  dev)
static

Definition at line 322 of file agp_intel.c.

References AGP_INTEL_APSIZE, and agp_intel_softc::aperture_mask.

◆ agp_intel_match()

static const char * agp_intel_match ( device_t  dev)
static

Definition at line 62 of file agp_intel.c.

References agp_find_caps().

Referenced by agp_intel_probe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agp_intel_probe()

static int agp_intel_probe ( device_t  dev)
static

Definition at line 116 of file agp_intel.c.

References agp_intel_match().

Here is the call graph for this function:

◆ agp_intel_resume()

static int agp_intel_resume ( device_t  dev)
static

Definition at line 311 of file agp_intel.c.

References agp_intel_commit_gatt(), and agp_intel_softc::current_aperture.

Here is the call graph for this function:

◆ agp_intel_set_aperture()

static int agp_intel_set_aperture ( device_t  dev,
u_int32_t  aperture 
)
static

◆ agp_intel_unbind_page()

static int agp_intel_unbind_page ( device_t  dev,
vm_offset_t  offset 
)
static

Definition at line 382 of file agp_intel.c.

References agp_gatt::ag_entries, agp_gatt::ag_virtual, agp_intel_softc::gatt, and offset.

◆ DRIVER_MODULE()

DRIVER_MODULE ( agp_intel  ,
hostb  ,
agp_intel_driver  ,
agp_devclass  ,
,
 
)

◆ MODULE_DEPEND() [1/2]

MODULE_DEPEND ( agp_intel  ,
agp  ,
,
,
 
)

◆ MODULE_DEPEND() [2/2]

MODULE_DEPEND ( agp_intel  ,
pci  ,
,
,
 
)

Variable Documentation

◆ agp_devclass

devclass_t agp_devclass
static

Definition at line 434 of file agp_intel.c.

◆ agp_intel_driver

driver_t agp_intel_driver
static
Initial value:
= {
"agp",
sizeof(struct agp_intel_softc),
}
static device_method_t agp_intel_methods[]
Definition: agp_intel.c:405

Definition at line 428 of file agp_intel.c.

◆ agp_intel_methods

device_method_t agp_intel_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, agp_intel_probe),
DEVMETHOD(device_attach, agp_intel_attach),
DEVMETHOD(device_detach, agp_intel_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, agp_intel_resume),
DEVMETHOD(agp_get_aperture, agp_intel_get_aperture),
DEVMETHOD(agp_set_aperture, agp_intel_set_aperture),
DEVMETHOD(agp_bind_page, agp_intel_bind_page),
DEVMETHOD(agp_unbind_page, agp_intel_unbind_page),
DEVMETHOD(agp_flush_tlb, agp_intel_flush_tlb),
{ 0, 0 }
}
struct agp_memory * agp_generic_alloc_memory(device_t dev, int type, vm_size_t size)
Definition: agp.c:496
int agp_bind_memory(device_t dev, void *handle, vm_offset_t offset)
Definition: agp.c:982
void agp_free_memory(device_t dev, void *handle)
Definition: agp.c:976
int agp_generic_bind_memory(device_t dev, struct agp_memory *mem, vm_offset_t offset)
Definition: agp.c:543
int agp_generic_unbind_memory(device_t dev, struct agp_memory *mem)
Definition: agp.c:649
int agp_unbind_memory(device_t dev, void *handle)
Definition: agp.c:988
int agp_generic_free_memory(device_t dev, struct agp_memory *mem)
Definition: agp.c:528
void * agp_alloc_memory(device_t dev, int type, vm_size_t bytes)
Definition: agp.c:971
int agp_generic_enable(device_t dev, u_int32_t mode)
Definition: agp.c:466
int agp_enable(device_t dev, u_int32_t mode)
Definition: agp.c:966
static int agp_intel_unbind_page(device_t dev, vm_offset_t offset)
Definition: agp_intel.c:382
static u_int32_t agp_intel_get_aperture(device_t dev)
Definition: agp_intel.c:322
static int agp_intel_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
Definition: agp_intel.c:368
static void agp_intel_flush_tlb(device_t dev)
Definition: agp_intel.c:396
static int agp_intel_attach(device_t dev)
Definition: agp_intel.c:218
static int agp_intel_resume(device_t dev)
Definition: agp_intel.c:311
static int agp_intel_set_aperture(device_t dev, u_int32_t aperture)
Definition: agp_intel.c:342
static int agp_intel_probe(device_t dev)
Definition: agp_intel.c:116
static int agp_intel_detach(device_t dev)
Definition: agp_intel.c:261

Definition at line 405 of file agp_intel.c.