FreeBSD kernel AGP device code
agp_apple.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 <machine/resource.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_apple.c:

Go to the source code of this file.

Data Structures

struct  agp_apple_softc
 

Macros

#define UNIN_AGP_GART_BASE   0x8c
 
#define UNIN_AGP_BASE_ADDR   0x90
 
#define UNIN_AGP_GART_CONTROL   0x94
 
#define UNIN_AGP_GART_INVAL   0x00000001
 
#define UNIN_AGP_GART_ENABLE   0x00000100
 
#define UNIN_AGP_GART_2XRESET   0x00010000
 
#define UNIN_AGP_U3_GART_PERFRD   0x00080000
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int agp_apple_probe (device_t dev)
 
static int agp_apple_attach (device_t dev)
 
static int agp_apple_detach (device_t dev)
 
static uint32_t agp_apple_get_aperture (device_t dev)
 
static int agp_apple_set_aperture (device_t dev, uint32_t aperture)
 
static int agp_apple_bind_page (device_t dev, vm_offset_t offset, vm_offset_t physical)
 
static int agp_apple_unbind_page (device_t dev, vm_offset_t offset)
 
static void agp_apple_flush_tlb (device_t dev)
 
 DRIVER_MODULE (agp_apple, hostb, agp_apple_driver, agp_devclass, 0, 0)
 
 MODULE_DEPEND (agp_apple, agp, 1, 1, 1)
 
 MODULE_DEPEND (agp_apple, pci, 1, 1, 1)
 

Variables

static device_method_t agp_apple_methods []
 
static driver_t agp_apple_driver
 
static devclass_t agp_devclass
 

Macro Definition Documentation

◆ UNIN_AGP_BASE_ADDR

#define UNIN_AGP_BASE_ADDR   0x90

Definition at line 54 of file agp_apple.c.

◆ UNIN_AGP_GART_2XRESET

#define UNIN_AGP_GART_2XRESET   0x00010000

Definition at line 59 of file agp_apple.c.

◆ UNIN_AGP_GART_BASE

#define UNIN_AGP_GART_BASE   0x8c

Definition at line 53 of file agp_apple.c.

◆ UNIN_AGP_GART_CONTROL

#define UNIN_AGP_GART_CONTROL   0x94

Definition at line 55 of file agp_apple.c.

◆ UNIN_AGP_GART_ENABLE

#define UNIN_AGP_GART_ENABLE   0x00000100

Definition at line 58 of file agp_apple.c.

◆ UNIN_AGP_GART_INVAL

#define UNIN_AGP_GART_INVAL   0x00000001

Definition at line 57 of file agp_apple.c.

◆ UNIN_AGP_U3_GART_PERFRD

#define UNIN_AGP_U3_GART_PERFRD   0x00080000

Definition at line 60 of file agp_apple.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ agp_apple_attach()

static int agp_apple_attach ( device_t  dev)
static

◆ agp_apple_bind_page()

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

◆ agp_apple_detach()

static int agp_apple_detach ( device_t  dev)
static

◆ agp_apple_flush_tlb()

static void agp_apple_flush_tlb ( device_t  dev)
static

◆ agp_apple_get_aperture()

static uint32_t agp_apple_get_aperture ( device_t  dev)
static

Definition at line 190 of file agp_apple.c.

References agp_apple_softc::aperture.

◆ agp_apple_probe()

static int agp_apple_probe ( device_t  dev)
static

Definition at line 71 of file agp_apple.c.

References agp_find_caps().

Here is the call graph for this function:

◆ agp_apple_set_aperture()

static int agp_apple_set_aperture ( device_t  dev,
uint32_t  aperture 
)
static

◆ agp_apple_unbind_page()

static int agp_apple_unbind_page ( device_t  dev,
vm_offset_t  offset 
)
static

Definition at line 233 of file agp_apple.c.

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

◆ DRIVER_MODULE()

DRIVER_MODULE ( agp_apple  ,
hostb  ,
agp_apple_driver  ,
agp_devclass  ,
,
 
)

◆ MODULE_DEPEND() [1/2]

MODULE_DEPEND ( agp_apple  ,
agp  ,
,
,
 
)

◆ MODULE_DEPEND() [2/2]

MODULE_DEPEND ( agp_apple  ,
pci  ,
,
,
 
)

Variable Documentation

◆ agp_apple_driver

driver_t agp_apple_driver
static
Initial value:
= {
"agp",
sizeof(struct agp_apple_softc),
}
static device_method_t agp_apple_methods[]
Definition: agp_apple.c:264

Definition at line 287 of file agp_apple.c.

◆ agp_apple_methods

device_method_t agp_apple_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, agp_apple_probe),
DEVMETHOD(device_attach, agp_apple_attach),
DEVMETHOD(device_detach, agp_apple_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(agp_get_aperture, agp_apple_get_aperture),
DEVMETHOD(agp_set_aperture, agp_apple_set_aperture),
DEVMETHOD(agp_bind_page, agp_apple_bind_page),
DEVMETHOD(agp_unbind_page, agp_apple_unbind_page),
DEVMETHOD(agp_flush_tlb, agp_apple_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_apple_probe(device_t dev)
Definition: agp_apple.c:71
static int agp_apple_unbind_page(device_t dev, vm_offset_t offset)
Definition: agp_apple.c:233
static int agp_apple_set_aperture(device_t dev, uint32_t aperture)
Definition: agp_apple.c:198
static int agp_apple_attach(device_t dev)
Definition: agp_apple.c:113
static int agp_apple_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
Definition: agp_apple.c:221
static uint32_t agp_apple_get_aperture(device_t dev)
Definition: agp_apple.c:190
static void agp_apple_flush_tlb(device_t dev)
Definition: agp_apple.c:245
static int agp_apple_detach(device_t dev)
Definition: agp_apple.c:166

Definition at line 264 of file agp_apple.c.

◆ agp_devclass

devclass_t agp_devclass
static

Definition at line 293 of file agp_apple.c.