agpreg.h revision 61452
161452Sdfr/*- 261452Sdfr * Copyright (c) 2000 Doug Rabson 361452Sdfr * All rights reserved. 461452Sdfr * 561452Sdfr * Redistribution and use in source and binary forms, with or without 661452Sdfr * modification, are permitted provided that the following conditions 761452Sdfr * are met: 861452Sdfr * 1. Redistributions of source code must retain the above copyright 961452Sdfr * notice, this list of conditions and the following disclaimer. 1061452Sdfr * 2. Redistributions in binary form must reproduce the above copyright 1161452Sdfr * notice, this list of conditions and the following disclaimer in the 1261452Sdfr * documentation and/or other materials provided with the distribution. 1361452Sdfr * 1461452Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1561452Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1661452Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1761452Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1861452Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1961452Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2061452Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2161452Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2261452Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2361452Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2461452Sdfr * SUCH DAMAGE. 2561452Sdfr * 2661452Sdfr * $FreeBSD: head/sys/dev/agp/agpreg.h 61452 2000-06-09 16:04:30Z dfr $ 2761452Sdfr */ 2861452Sdfr 2961452Sdfr#ifndef _PCI_AGPREG_H_ 3061452Sdfr#define _PCI_AGPREG_H_ 3161452Sdfr 3261452Sdfr/* 3361452Sdfr * Offsets for various AGP configuration registers. 3461452Sdfr */ 3561452Sdfr#define AGP_APBASE 0x10 3661452Sdfr#define AGP_CAPPTR 0x34 3761452Sdfr 3861452Sdfr/* 3961452Sdfr * Offsets from the AGP Capability pointer. 4061452Sdfr */ 4161452Sdfr#define AGP_CAPID 0x0 4261452Sdfr#define AGP_CAPID_GET_MAJOR(x) (((x) & 0x00f00000U) >> 20) 4361452Sdfr#define AGP_CAPID_GET_MINOR(x) (((x) & 0x000f0000U) >> 16) 4461452Sdfr#define AGP_CAPID_GET_NEXT_PTR(x) (((x) & 0x0000ff00U) >> 8) 4561452Sdfr#define AGP_CAPID_GET_CAP_ID(x) (((x) & 0x000000ffU) >> 0) 4661452Sdfr 4761452Sdfr#define AGP_STATUS 0x4 4861452Sdfr#define AGP_COMMAND 0x8 4961452Sdfr 5061452Sdfr/* 5161452Sdfr * Config offsets for Intel AGP chipsets. 5261452Sdfr */ 5361452Sdfr#define AGP_INTEL_NBXCFG 0x50 5461452Sdfr#define AGP_INTEL_ERRSTS 0x91 5561452Sdfr#define AGP_INTEL_AGPCTRL 0xb0 5661452Sdfr#define AGP_INTEL_APSIZE 0xb4 5761452Sdfr#define AGP_INTEL_ATTBASE 0xb8 5861452Sdfr 5961452Sdfr/* 6061452Sdfr * Config offsets for VIA AGP chipsets. 6161452Sdfr */ 6261452Sdfr#define AGP_VIA_GARTCTRL 0x80 6361452Sdfr#define AGP_VIA_APSIZE 0x84 6461452Sdfr#define AGP_VIA_ATTBASE 0x88 6561452Sdfr 6661452Sdfr/* 6761452Sdfr * Config offsets for SiS AGP chipsets. 6861452Sdfr */ 6961452Sdfr#define AGP_SIS_ATTBASE 0x90 7061452Sdfr#define AGP_SIS_WINCTRL 0x94 7161452Sdfr#define AGP_SIS_TLBCTRL 0x97 7261452Sdfr#define AGP_SIS_TLBFLUSH 0x98 7361452Sdfr 7461452Sdfr/* 7561452Sdfr * Config offsets for Ali AGP chipsets. 7661452Sdfr */ 7761452Sdfr#define AGP_ALI_AGPCTRL 0xb8 7861452Sdfr#define AGP_ALI_ATTBASE 0xbc 7961452Sdfr#define AGP_ALI_TLBCTRL 0xc0 8061452Sdfr 8161452Sdfr/* 8261452Sdfr * Config offsets for the AMD 751 chipset. 8361452Sdfr */ 8461452Sdfr#define AGP_AMD751_REGISTERS 0x14 8561452Sdfr#define AGP_AMD751_APCTRL 0xac 8661452Sdfr#define AGP_AMD751_MODECTRL 0xb0 8761452Sdfr 8861452Sdfr/* 8961452Sdfr * Memory mapped register offsets for AMD 751 chipset. 9061452Sdfr */ 9161452Sdfr#define AGP_AMD751_CAPS 0x00 9261452Sdfr#define AGP_AMD751_CAPS_EHI 0x0800 9361452Sdfr#define AGP_AMD751_CAPS_P2P 0x0400 9461452Sdfr#define AGP_AMD751_CAPS_MPC 0x0200 9561452Sdfr#define AGP_AMD751_CAPS_VBE 0x0100 9661452Sdfr#define AGP_AMD751_CAPS_REV 0x00ff 9761452Sdfr#define AGP_AMD751_STATUS 0x02 9861452Sdfr#define AGP_AMD751_STATUS_P2PS 0x0800 9961452Sdfr#define AGP_AMD751_STATUS_GCS 0x0400 10061452Sdfr#define AGP_AMD751_STATUS_MPS 0x0200 10161452Sdfr#define AGP_AMD751_STATUS_VBES 0x0100 10261452Sdfr#define AGP_AMD751_STATUS_P2PE 0x0008 10361452Sdfr#define AGP_AMD751_STATUS_GCE 0x0004 10461452Sdfr#define AGP_AMD751_STATUS_VBEE 0x0001 10561452Sdfr#define AGP_AMD751_ATTBASE 0x04 10661452Sdfr#define AGP_AMD751_TLBCTRL 0x0c 10761452Sdfr 10861452Sdfr 10961452Sdfr#endif /* !_PCI_AGPREG_H_ */ 110