34#include <sys/malloc.h>
35#include <sys/kernel.h>
36#include <sys/module.h>
44#include <dev/pci/pcivar.h>
45#include <dev/pci/pcireg.h>
48#include <vm/vm_object.h>
60 if (pci_get_class(dev) != PCIC_BRIDGE
61 || pci_get_subclass(dev) != PCIS_BRIDGE_HOST)
67 switch (pci_get_devid(dev)) {
69 return (
"SiS 5591 host to AGP bridge");
71 return (
"SiS 530 host to AGP bridge");
73 return (
"SiS 540 host to AGP bridge");
75 return (
"SiS 550 host to AGP bridge");
77 return (
"SiS 620 host to AGP bridge");
79 return (
"SiS 630 host to AGP bridge");
81 return (
"SiS 645 host to AGP bridge");
83 return (
"SiS 645DX host to AGP bridge");
85 return (
"SiS 648 host to AGP bridge");
87 return (
"SiS 650 host to AGP bridge");
89 return (
"SiS 651 host to AGP bridge");
91 return (
"SiS 655 host to AGP bridge");
93 return (
"SiS 661 host to AGP bridge");
95 return (
"SiS 730 host to AGP bridge");
97 return (
"SiS 735 host to AGP bridge");
99 return (
"SiS 740 host to AGP bridge");
101 return (
"SiS 741 host to AGP bridge");
103 return (
"SiS 745 host to AGP bridge");
105 return (
"SiS 746 host to AGP bridge");
116 if (resource_disabled(
"agp", device_get_unit(dev)))
120 device_set_desc(dev, desc);
121 return BUS_PROBE_DEFAULT;
149 if (AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2)) {
203 return (4*1024*1024) << gws;
220 gws = ffs(
aperture / 4*1024*1024) - 1;
264 DEVMETHOD(device_shutdown, bus_generic_shutdown),
265 DEVMETHOD(device_suspend, bus_generic_suspend),
266 DEVMETHOD(device_resume, bus_generic_resume),
struct agp_memory * agp_generic_alloc_memory(device_t dev, int type, vm_size_t size)
int agp_bind_memory(device_t dev, void *handle, vm_offset_t offset)
void agp_free_memory(device_t dev, void *handle)
int agp_generic_bind_memory(device_t dev, struct agp_memory *mem, vm_offset_t offset)
int agp_generic_unbind_memory(device_t dev, struct agp_memory *mem)
int agp_unbind_memory(device_t dev, void *handle)
int agp_generic_detach(device_t dev)
int agp_generic_attach(device_t dev)
int agp_generic_free_memory(device_t dev, struct agp_memory *mem)
u_int8_t agp_find_caps(device_t dev)
void agp_free_res(device_t dev)
void agp_free_cdev(device_t dev)
void * agp_alloc_memory(device_t dev, int type, vm_size_t bytes)
void agp_free_gatt(struct agp_gatt *gatt)
struct agp_gatt * agp_alloc_gatt(device_t dev)
int agp_generic_enable(device_t dev, u_int32_t mode)
int agp_enable(device_t dev, u_int32_t mode)
static int agp_sis_attach(device_t dev)
MODULE_DEPEND(agp_sis, agp, 1, 1, 1)
static const char * agp_sis_match(device_t dev)
static driver_t agp_sis_driver
static device_method_t agp_sis_methods[]
static int agp_sis_set_aperture(device_t dev, u_int32_t aperture)
static int agp_sis_detach(device_t dev)
static int agp_sis_unbind_page(device_t dev, vm_offset_t offset)
static int agp_sis_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
static devclass_t agp_devclass
static int agp_sis_probe(device_t dev)
static u_int32_t agp_sis_get_aperture(device_t dev)
static void agp_sis_flush_tlb(device_t dev)
DRIVER_MODULE(agp_sis, hostb, agp_sis_driver, agp_devclass, 0, 0)
u_int32_t initial_aperture