FreeBSD kernel AGP device code
|
#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 <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>
Go to the source code of this file.
Data Structures | |
struct | agp_amd64_softc |
Macros | |
#define | AMD64_MAX_MCTRL 8 |
#define | AGP_AMD64_TABLE_SIZE nitems(agp_amd64_table) |
Functions | |
__FBSDID ("$FreeBSD$") | |
void | pci_cfgregwrite (int, int, int, int, uint32_t, int) |
uint32_t | pci_cfgregread (int, int, int, int, int) |
static void | agp_amd64_apbase_fixup (device_t) |
static void | agp_amd64_uli_init (device_t) |
static int | agp_amd64_uli_set_aperture (device_t, uint32_t) |
static int | agp_amd64_nvidia_match (uint16_t) |
static void | agp_amd64_nvidia_init (device_t) |
static int | agp_amd64_nvidia_set_aperture (device_t, uint32_t) |
static int | agp_amd64_via_match (void) |
static void | agp_amd64_via_init (device_t) |
static int | agp_amd64_via_set_aperture (device_t, uint32_t) |
MALLOC_DECLARE (M_AGP) | |
static const char * | agp_amd64_match (device_t dev) |
static int | agp_amd64_probe (device_t dev) |
static int | agp_amd64_attach (device_t dev) |
static int | agp_amd64_detach (device_t dev) |
static uint32_t | agp_amd64_get_aperture (device_t dev) |
static int | agp_amd64_set_aperture (device_t dev, uint32_t aperture) |
static int | agp_amd64_bind_page (device_t dev, vm_offset_t offset, vm_offset_t physical) |
static int | agp_amd64_unbind_page (device_t dev, vm_offset_t offset) |
static void | agp_amd64_flush_tlb (device_t dev) |
DRIVER_MODULE (agp_amd64, hostb, agp_amd64_driver, agp_devclass, 0, 0) | |
MODULE_DEPEND (agp_amd64, agp, 1, 1, 1) | |
MODULE_DEPEND (agp_amd64, pci, 1, 1, 1) | |
Variables | |
static uint32_t | agp_amd64_table [] |
static device_method_t | agp_amd64_methods [] |
static driver_t | agp_amd64_driver |
static devclass_t | agp_devclass |
#define AGP_AMD64_TABLE_SIZE nitems(agp_amd64_table) |
Definition at line 279 of file agp_amd64.c.
#define AMD64_MAX_MCTRL 8 |
Definition at line 73 of file agp_amd64.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 372 of file agp_amd64.c.
References agp_amd64_softc::agp, AGP_AMD64_APBASE, AGP_AMD64_APBASE_MASK, agp_amd64_softc::apbase, agp_softc::as_aperture, agp_amd64_softc::mctrl, agp_amd64_softc::n_mctrl, and pci_cfgregwrite().
Referenced by agp_amd64_nvidia_init(), agp_amd64_uli_init(), and agp_amd64_via_init().
|
static |
Definition at line 166 of file agp_amd64.c.
References agp_gatt::ag_physical, agp_alloc_gatt(), AGP_AMD64_APCTRL, AGP_AMD64_APCTRL_DISGARTCPU, AGP_AMD64_APCTRL_DISGARTIO, AGP_AMD64_APCTRL_GARTEN, AGP_AMD64_ATTBASE, AGP_AMD64_ATTBASE_MASK, agp_amd64_nvidia_init(), agp_amd64_nvidia_set_aperture(), agp_amd64_uli_init(), agp_amd64_uli_set_aperture(), agp_amd64_via_init(), agp_amd64_via_match(), agp_amd64_via_set_aperture(), agp_generic_attach(), agp_generic_detach(), AMD64_MAX_MCTRL, agp_amd64_softc::gatt, agp_amd64_softc::initial_aperture, agp_amd64_softc::mctrl, agp_amd64_softc::n_mctrl, pci_cfgregread(), pci_cfgregwrite(), and agp_amd64_softc::via_agp.
|
static |
Definition at line 333 of file agp_amd64.c.
References agp_gatt::ag_entries, agp_gatt::ag_virtual, agp_amd64_softc::gatt, offset, and physical.
|
static |
Definition at line 250 of file agp_amd64.c.
References AGP_AMD64_APCTRL, AGP_AMD64_APCTRL_GARTEN, agp_free_cdev(), agp_free_gatt(), agp_free_res(), agp_amd64_softc::gatt, agp_amd64_softc::initial_aperture, agp_amd64_softc::mctrl, agp_amd64_softc::n_mctrl, pci_cfgregread(), and pci_cfgregwrite().
|
static |
Definition at line 360 of file agp_amd64.c.
References AGP_AMD64_CACHECTRL, AGP_AMD64_CACHECTRL_INVGART, agp_amd64_softc::mctrl, agp_amd64_softc::n_mctrl, pci_cfgregread(), and pci_cfgregwrite().
|
static |
Definition at line 282 of file agp_amd64.c.
References AGP_AMD64_APCTRL, AGP_AMD64_APCTRL_SIZE_MASK, agp_amd64_table, AGP_AMD64_TABLE_SIZE, agp_amd64_softc::mctrl, and pci_cfgregread().
|
static |
Definition at line 86 of file agp_amd64.c.
References agp_amd64_nvidia_match(), and agp_find_caps().
Referenced by agp_amd64_probe().
|
static |
Definition at line 419 of file agp_amd64.c.
References agp_amd64_apbase_fixup(), AGP_AMD64_NVIDIA_0_APBASE, AGP_AMD64_NVIDIA_1_APBASE1, AGP_AMD64_NVIDIA_1_APBASE2, agp_amd64_softc::apbase, and pci_cfgregwrite().
Referenced by agp_amd64_attach().
|
static |
Definition at line 124 of file agp_amd64.c.
References pci_cfgregread().
Referenced by agp_amd64_match().
|
static |
Definition at line 432 of file agp_amd64.c.
References AGP_AMD64_NVIDIA_1_APLIMIT1, AGP_AMD64_NVIDIA_1_APLIMIT2, AGP_AMD64_NVIDIA_1_APSIZE, agp_amd64_softc::apbase, aperture, pci_cfgregread(), and pci_cfgregwrite().
Referenced by agp_amd64_attach(), and agp_amd64_set_aperture().
|
static |
Definition at line 151 of file agp_amd64.c.
References agp_amd64_match().
|
static |
Definition at line 297 of file agp_amd64.c.
References AGP_AMD64_APCTRL, AGP_AMD64_APCTRL_SIZE_MASK, agp_amd64_nvidia_set_aperture(), agp_amd64_table, AGP_AMD64_TABLE_SIZE, agp_amd64_uli_set_aperture(), agp_amd64_via_set_aperture(), aperture, agp_amd64_softc::mctrl, agp_amd64_softc::n_mctrl, pci_cfgregread(), pci_cfgregwrite(), and agp_amd64_softc::via_agp.
|
static |
Definition at line 386 of file agp_amd64.c.
References agp_amd64_apbase_fixup(), AGP_AMD64_ULI_APBASE, AGP_AMD64_ULI_HTT_FEATURE, and agp_amd64_softc::apbase.
Referenced by agp_amd64_attach().
|
static |
Definition at line 398 of file agp_amd64.c.
References AGP_AMD64_ULI_ENU_SCR, agp_amd64_softc::apbase, and aperture.
Referenced by agp_amd64_attach(), and agp_amd64_set_aperture().
|
static |
Definition at line 347 of file agp_amd64.c.
References agp_gatt::ag_entries, agp_gatt::ag_virtual, agp_amd64_softc::gatt, and offset.
|
static |
Definition at line 459 of file agp_amd64.c.
References agp_gatt::ag_physical, AGP3_VIA_ATTBASE, AGP3_VIA_GARTCTRL, agp_amd64_apbase_fixup(), agp_amd64_softc::gatt, pci_cfgregread(), and pci_cfgregwrite().
Referenced by agp_amd64_attach().
|
static |
Definition at line 137 of file agp_amd64.c.
References AGP_VIA_AGPSEL, and pci_cfgregread().
Referenced by agp_amd64_attach().
|
static |
Definition at line 470 of file agp_amd64.c.
References AGP3_VIA_APSIZE, aperture, and pci_cfgregwrite().
Referenced by agp_amd64_attach(), and agp_amd64_set_aperture().
DRIVER_MODULE | ( | agp_amd64 | , |
hostb | , | ||
agp_amd64_driver | , | ||
agp_devclass | , | ||
0 | , | ||
0 | |||
) |
MALLOC_DECLARE | ( | M_AGP | ) |
MODULE_DEPEND | ( | agp_amd64 | , |
agp | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_DEPEND | ( | agp_amd64 | , |
pci | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
uint32_t pci_cfgregread | ( | int | , |
int | , | ||
int | , | ||
int | , | ||
int | |||
) |
Referenced by agp_amd64_attach(), agp_amd64_detach(), agp_amd64_flush_tlb(), agp_amd64_get_aperture(), agp_amd64_nvidia_match(), agp_amd64_nvidia_set_aperture(), agp_amd64_set_aperture(), agp_amd64_via_init(), and agp_amd64_via_match().
void pci_cfgregwrite | ( | int | , |
int | , | ||
int | , | ||
int | , | ||
uint32_t | , | ||
int | |||
) |
Referenced by agp_amd64_apbase_fixup(), agp_amd64_attach(), agp_amd64_detach(), agp_amd64_flush_tlb(), agp_amd64_nvidia_init(), agp_amd64_nvidia_set_aperture(), agp_amd64_set_aperture(), agp_amd64_via_init(), and agp_amd64_via_set_aperture().
|
static |
Definition at line 505 of file agp_amd64.c.
|
static |
Definition at line 482 of file agp_amd64.c.
|
static |
Definition at line 269 of file agp_amd64.c.
Referenced by agp_amd64_get_aperture(), and agp_amd64_set_aperture().
|
static |
Definition at line 511 of file agp_amd64.c.