From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 18 15:00:50 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91FBA16A4CE for ; Tue, 18 Jan 2005 15:00:50 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5780543D55 for ; Tue, 18 Jan 2005 15:00:50 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0IF0ops015998 for ; Tue, 18 Jan 2005 15:00:50 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0IF0o29015994; Tue, 18 Jan 2005 15:00:50 GMT (envelope-from gnats) Resent-Date: Tue, 18 Jan 2005 15:00:50 GMT Resent-Message-Id: <200501181500.j0IF0o29015994@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jonathan Fosburgh Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 163EF16A4CE for ; Tue, 18 Jan 2005 14:59:58 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDEC443D3F for ; Tue, 18 Jan 2005 14:59:57 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j0IExvre028356 for ; Tue, 18 Jan 2005 14:59:57 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j0IExvuP028355; Tue, 18 Jan 2005 14:59:57 GMT (envelope-from nobody) Message-Id: <200501181459.j0IExvuP028355@www.freebsd.org> Date: Tue, 18 Jan 2005 14:59:57 GMT From: Jonathan Fosburgh To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/76411: AGP aperture incorrectly probed for SiS 755 AGP X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2005 15:00:50 -0000 >Number: 76411 >Category: misc >Synopsis: AGP aperture incorrectly probed for SiS 755 AGP >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 18 15:00:49 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Jonathan Fosburgh >Release: 5.3-STABLE (i386) >Organization: >Environment: FreeBSD gw.fosburgh.org 5.3-STABLE FreeBSD 5.3-STABLE #9: Mon Jan 17 21:14:35 CST 2005 root@gw.fosburgh.org:/usr/obj/usr/src/sys/vmbsd i386 >Description: This is an Athlon 64 system with an ECS 755-A2 mobo, using the SiS 755 chipset. When trying to load drm, the agp driver incorrectly probes the aperture as 4MB, regardless of what I specify it as in the BIOS. I have used 32, 128, and 256MB aperture sizes and all fail the same way. In trying to troubleshoot this, one of the things I found was the driver was not correctly ID'ing the hardware. The following patch from Junk-uk Kim corrected that (though not the issue): Index: pci/agp_amd64.c =================================================================== RCS file: /home/ncvs/src/sys/pci/agp_amd64.c,v retrieving revision 1.3 diff -u -r1.3 agp_amd64.c --- pci/agp_amd64.c 5 Oct 2004 04:40:32 -0000 1.3 +++ pci/agp_amd64.c 11 Jan 2005 21:57:44 -0000 @@ -80,12 +80,12 @@ switch (pci_get_devid(dev)) { case 0x74541022: return ("AMD 8151 AGP graphics tunnel"); - case 0x10221039: - return ("SiS 755 host to AGP bridge"); case 0x02041106: return ("VIA 8380 host to PCI bridge"); case 0x02821106: return ("VIA K8T800Pro host to PCI bridge"); + case 0x07551039: + return ("SiS 755 host to AGP bridge"); case 0x31881106: return ("VIA 8385 host to PCI bridge"); }; Index: pci/agp_sis.c =================================================================== RCS file: /home/ncvs/src/sys/pci/agp_sis.c,v retrieving revision 1.16 diff -u -r1.16 agp_sis.c --- pci/agp_sis.c 30 Dec 2004 07:18:58 -0000 1.16 +++ pci/agp_sis.c 11 Jan 2005 21:57:44 -0000 @@ -105,8 +105,6 @@ return ("SiS 746 host to AGP bridge"); case 0x07601039: return ("SiS 760 host to AGP bridge"); - case 0x10221039: /* AMD64 */ - return NULL; }; return NULL; Additionally, I found a small program posted to x11@ from Junk-uk Kim that checks what the AGP driver is probing. The output from that program is: version: 0.0 bridge id: 0x7551039 agp_mode: 0x1f000217 aper_base: 0xd0000000 aper_size: 4 pg_total: 112640 pg_system: 112640 pg_used: 0 MTRR: d0000000/400000 entry.key : 2 ioctl(AGPIOC_BIND): Invalid argument dmesg from a verbose boot: Jan 12 20:56:46 gw kernel: agp0: mem 0xe8000000-0xebffffff at device 0.0 on pci0 Jan 12 20:56:46 gw kernel: agp0: Reserved 0x4000000 bytes for rid 0x10 type 3 at 0xe8000000 Jan 12 20:56:46 gw kernel: agp0: allocating GATT for aperture of size 4M And an error from trying to bind: agp0: binding memory at bad offset 0x400000 The output from pciconf for the AGP device: agp0@pci0:0:0: class=0x060000 card=0x18911019 chip=0x07551039 rev=0x01 hdr=0x00 vendor = 'Silicon Integrated Systems (SiS)' device = 'SiSM650? Host-to-PCI Bridge' class = bridge subclass = HOST-PCI >How-To-Repeat: On a mobo (possibly this same model?) using the SiS755 chipset, attempt to do anything that causes the AGP driver to attempt to bind to memory, such as using DRI. >Fix: >Release-Note: >Audit-Trail: >Unformatted: