vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, Here's a patch that adds AGP support to the amd64 arch. This is aimed mainly at people that run amd64 on Intel EM64T boxes, with Intel graphics chipsets (e.g. 945). However, if you have some AMD or VIA chipset with onboard AGP graphics, I'm also interested in the results. If you try this, please send me dmesgs and Xorg.log files from before and after. Cheers, Dimitry Index: sys/arch/amd64/conf/GENERIC ================================================== ================= RCS file: /cvs/src/sys/arch/amd64/conf/GENERIC,v retrieving revision 1.172 diff -u -p -r1.172 GENERIC --- sys/arch/amd64/conf/GENERIC 22 Jan 2007 21:53:15 -0000 1.172 +++ sys/arch/amd64/conf/GENERIC 1 Feb 2007 11:00:01 -0000 @@ -225,6 +225,7 @@ pckbd* at pckbc? # PC keyboard pms* at pckbc? # PS/2 mouse for wsmouse pmsi* at pckbc? # PS/2 "Intelli"mouse for wsmouse vga0 at isa? +option PCIAGP vga* at pci? wsdisplay* at vga? wskbd* at pckbd? mux 1 Index: sys/arch/amd64/conf/files.amd64 ================================================== ================= RCS file: /cvs/src/sys/arch/amd64/conf/files.amd64,v retrieving revision 1.25 diff -u -p -r1.25 files.amd64 --- sys/arch/amd64/conf/files.amd64 27 Sep 2006 06:33:03 -0000 1.25 +++ sys/arch/amd64/conf/files.amd64 1 Feb 2007 11:00:01 -0000 @@ -96,6 +96,13 @@ file arch/amd64/amd64/ioapic.c ioapic n include "dev/pci/files.pci" file arch/amd64/pci/pci_machdep.c pci file arch/amd64/pci/iommu.c pci +file arch/amd64/pci/agp_machdep.c pciagp +file dev/pci/agp_ali.c pciagp +file dev/pci/agp_amd.c pciagp +file dev/pci/agp_i810.c pciagp +file dev/pci/agp_intel.c pciagp +file dev/pci/agp_sis.c pciagp +file dev/pci/agp_via.c pciagp file arch/amd64/pci/pciide_machdep.c pciide include "dev/puc/files.puc" Index: sys/arch/amd64/pci/agp_machdep.c ================================================== ================= RCS file: sys/arch/amd64/pci/agp_machdep.c diff -N sys/arch/amd64/pci/agp_machdep.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sys/arch/amd64/pci/agp_machdep.c 1 Feb 2007 11:00:01 -0000 @@ -0,0 +1,64 @@ +/* $OpenBSD: agp_machdep.c,v 1.7 2006/05/15 08:27:19 dim Exp $ */ + +/* + * Copyright (c) 2002 Michael Shalayeff + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/param.h> +#include <sys/device.h> + +#include <dev/pci/pcivar.h> +#include <dev/pci/pcireg.h> +#include <dev/pci/pcidevs.h> +#include <dev/pci/agpvar.h> + +#include <machine/cpufunc.h> + +const struct agp_product agp_products[] = { + { PCI_VENDOR_ALI, -1, agp_ali_attach }, + { PCI_VENDOR_AMD, -1, agp_amd_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82810_GC, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82810_DC100_GC, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82810E_GC, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82815_FULL_GRAPH, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82830MP_IV, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82845G_IGD, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82852GM_AGP, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82865_IGD, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82915G_IV, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82915GM_IGD, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82945G_IGD_1, agp_i810_attach }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82945GM_IGD, agp_i810_attach }, + { PCI_VENDOR_INTEL, -1, agp_intel_attach }, + { PCI_VENDOR_SIS, -1, agp_sis_attach }, + { PCI_VENDOR_VIATECH, -1, agp_via_attach }, + { 0, 0, NULL } +}; + +void +agp_flush_cache(void) +{ + wbinvd(); +} Index: sys/arch/amd64/pci/pchb.c ================================================== ================= RCS file: /cvs/src/sys/arch/amd64/pci/pchb.c,v retrieving revision 1.5 diff -u -p -r1.5 pchb.c --- sys/arch/amd64/pci/pchb.c 15 Jan 2007 23:19:05 -0000 1.5 +++ sys/arch/amd64/pci/pchb.c 1 Feb 2007 11:00:01 -0000 @@ -129,7 +129,21 @@ pchbattach(struct device *parent, struct for (i = 0; i < AMD64HT_NUM_LDT; i++) pchb_amd64ht_attach(self, pa, i); break; +#ifdef PCIAGP + case PCI_PRODUCT_AMD_SC751_SC: + case PCI_PRODUCT_AMD_762_PCHB: + pciagp_set_pchb(pa); + break; +#endif } +#ifdef PCIAGP + case PCI_VENDOR_ALI: + case PCI_VENDOR_INTEL: + case PCI_VENDOR_SIS: + case PCI_VENDOR_VIATECH: + pciagp_set_pchb(pa); + break; +#endif } } |