Home | History | Annotate | Line # | Download | only in pci
agp_i810var.h revision 1.3
      1  1.3  riastrad /*	$NetBSD: agp_i810var.h,v 1.3 2014/05/23 22:58:56 riastradh Exp $	*/
      2  1.2  riastrad 
      3  1.2  riastrad /*-
      4  1.2  riastrad  * Copyright (c) 2000 Doug Rabson
      5  1.2  riastrad  * Copyright (c) 2000 Ruslan Ermilov
      6  1.2  riastrad  * All rights reserved.
      7  1.2  riastrad  *
      8  1.2  riastrad  * Redistribution and use in source and binary forms, with or without
      9  1.2  riastrad  * modification, are permitted provided that the following conditions
     10  1.2  riastrad  * are met:
     11  1.2  riastrad  * 1. Redistributions of source code must retain the above copyright
     12  1.2  riastrad  *    notice, this list of conditions and the following disclaimer.
     13  1.2  riastrad  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.2  riastrad  *    notice, this list of conditions and the following disclaimer in the
     15  1.2  riastrad  *    documentation and/or other materials provided with the distribution.
     16  1.2  riastrad  *
     17  1.2  riastrad  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     18  1.2  riastrad  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19  1.2  riastrad  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20  1.2  riastrad  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     21  1.2  riastrad  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22  1.2  riastrad  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23  1.2  riastrad  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24  1.2  riastrad  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25  1.2  riastrad  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26  1.2  riastrad  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27  1.2  riastrad  * SUCH DAMAGE.
     28  1.2  riastrad  */
     29  1.2  riastrad 
     30  1.2  riastrad #include <sys/types.h>
     31  1.2  riastrad #include <sys/bus.h>
     32  1.2  riastrad 
     33  1.2  riastrad #include <dev/pci/pcivar.h>
     34  1.2  riastrad 
     35  1.2  riastrad #include <dev/pci/agpvar.h>
     36  1.2  riastrad 
     37  1.2  riastrad struct agp_i810_softc {
     38  1.2  riastrad 	u_int32_t initial_aperture;	/* aperture size at startup */
     39  1.2  riastrad 	struct agp_gatt *gatt;
     40  1.2  riastrad 	int chiptype;			/* i810-like or i830 */
     41  1.2  riastrad 	u_int32_t dcache_size;		/* i810 only */
     42  1.2  riastrad 	u_int32_t stolen;		/* number of i830/845 gtt entries
     43  1.2  riastrad 					   for stolen memory */
     44  1.2  riastrad 	bus_space_tag_t bst;		/* register bus_space tag */
     45  1.2  riastrad 	bus_space_handle_t bsh;		/* register bus_space handle */
     46  1.2  riastrad 	bus_space_tag_t gtt_bst;	/* GTT bus_space tag */
     47  1.2  riastrad 	bus_space_handle_t gtt_bsh;	/* GTT bus_space handle */
     48  1.2  riastrad 	struct pci_attach_args vga_pa;
     49  1.2  riastrad 
     50  1.2  riastrad 	u_int32_t pgtblctl;
     51  1.3  riastrad 
     52  1.3  riastrad 	bus_space_tag_t flush_bst;	/* flush page bus_space tag */
     53  1.3  riastrad 	bus_space_handle_t flush_bsh;	/* flush page bus_space handle */
     54  1.3  riastrad 	bus_addr_t flush_addr;		/* flush page bus address */
     55  1.2  riastrad };
     56  1.2  riastrad 
     57  1.2  riastrad extern struct agp_softc	*agp_i810_sc;
     58  1.2  riastrad 
     59  1.2  riastrad int	agp_i810_write_gtt_entry(struct agp_i810_softc *, off_t, bus_addr_t);
     60  1.2  riastrad void	agp_i810_post_gtt_entry(struct agp_i810_softc *, off_t);
     61  1.3  riastrad void	agp_i810_chipset_flush(struct agp_i810_softc *);
     62