From owner-freebsd-x11@FreeBSD.ORG Thu Jun 17 20:24:20 2004 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B85D16A4CE for ; Thu, 17 Jun 2004 20:24:20 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E1C143D39 for ; Thu, 17 Jun 2004 20:24:20 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 31915 invoked from network); 17 Jun 2004 20:24:08 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 17 Jun 2004 20:24:07 -0000 Received: from 10.50.41.233 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i5HKO394082302; Thu, 17 Jun 2004 16:24:03 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-amd64@FreeBSD.org Date: Thu, 17 Jun 2004 16:24:59 -0400 User-Agent: KMail/1.6 References: <200406141646.03171.jkim@niksun.com> In-Reply-To: <200406141646.03171.jkim@niksun.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406171624.59264.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: freebsd-x11@FreeBSD.org cc: dfr@FreeBSD.org cc: Jung-uk Kim Subject: Re: [PATCH] AMD64 On-CPU GART support + more X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2004 20:24:20 -0000 On Monday 14 June 2004 04:46 pm, Jung-uk Kim wrote: > Since the latest DRM is imported, I made my AMD64 on-CPU GART[1] > working (patch attached). This driver has some ugliness because of > its nature: driver is for AGP bridge but directly touches north > bridge registers (of multiple north bridges if you have multiple > CPUs). Ideally we can attach child driver here for each bridge but > it is just a part of its functions so that I didn't want to create a > full-blown driver. The second ugliness comes from the agp_sis.c and > agp_via.c. They fall back to 'generic host to PCI bridge' if it is > not supported but it finds a bridge. I believe this has to be > removed. The kludge is 'AGP_AMD64_GART' in kernel configuration. > This kludge can be removed when the 'fallback' match/probe is > removed. For now, 'AGP_AMD64_GART' is required to test this driver. > If anyone is interested, please cleanup/fix them. :-( Yes, all the generic probes need to go away. Also, I think that agp0 should be a child of hostb0. I.e., each agp driver (except for agp_i810.c) needs to actually be a child of hostb0. The hostb driver on the other hand would pass some ivars like PCI ID requests down to the children (so they can do a pci_get_devid() on themselves), and the hostb driver would add an agp child device automatically if it detects an AGP extended capability in its config registers. > > It's tested with Via K8T800 (both FreeBSD/i386 and FreeBSD/amd64) but > it should work with other bridges/tunnels. XFree86 snapshot (after > Mesa 6.1 import) + DRI snapshot worked fine with MGA 400 and Radeon > RV280 in FreeBSD/i386. In FreeBSD/amd64, MGA 400 works but Radeon > RV280 doesn't work but I believe it's DRM/DRI's problem, i. e., > Radeon SAREA handles. > > Cheers, > > Jung-uk Kim > > [1] BIOS and Kernel Developer's Guide for AMD Athlon? 64 and AMD > Opteron(tm) Processors (3.6.12-15) > http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/260 >94.PDF > > * PS: I think the current agp_via.c doesn't support K8T800 or other > AGP v3 bridges correctly. If anyone is interested, let me know. ;-) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org