From owner-freebsd-current@FreeBSD.ORG Tue Nov 15 15:40:56 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9073516A41F for ; Tue, 15 Nov 2005 15:40:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (66-23-216-219.clients.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BAE943D46 for ; Tue, 15 Nov 2005 15:40:55 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2002042 for multiple; Tue, 15 Nov 2005 10:40:56 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jAFFealX087129; Tue, 15 Nov 2005 10:40:42 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Andrew Gallatin Date: Tue, 15 Nov 2005 10:30:57 -0500 User-Agent: KMail/1.8.2 References: <436E66FB.60700@desk.pl> <200511141153.27640.jhb@freebsd.org> <17273.59797.727269.288021@grasshopper.cs.duke.edu> In-Reply-To: <17273.59797.727269.288021@grasshopper.cs.duke.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511151030.58879.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-current@freebsd.org Subject: Re: NVidia driver for amd64 / Page Attribute Table status? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2005 15:40:56 -0000 On Tuesday 15 November 2005 08:58 am, Andrew Gallatin wrote: > John Baldwin writes: > > On Sunday 13 November 2005 06:20 am, Marcin Koziej wrote: > > > Would it be possible for You to put a snapshot patch against CURRENT > > > for jhb_pat branch somewhere? I can't make it with P4DB interface, and > > > i don't have access to p4. > > > > > > Best regards, > > > m. > > > > Sure, though it's not commit ready yet. > > > > http://www.FreeBSD.org/~jhb/patches/pat.patch > > I have a question about this.. I maintain a driver where our > device really, really wants to have its memory mapped write-combined. > I currently use mem_range_attr_set() to (try to) do this. > > The problem is that some BIOSes leave useless uncacheable MTRR > attributes laying around which obscure our device (and in fact, nearly > all the PCI memory space). In order for the mem_range_attr_set() to > work, there cannot be another conflicting MTRR attribute already > covering our memory, so we play games with shell scripts which try to > remove the uncacheable attributes. This is a royal PITA. > > With your new PAT stuff, does this mean that I'll no longer have > to worry about the MTRR attributes, and I can be certain of getting > my memory mapped write-combined? On modern CPUs, yes. (Anything later than a PIII I think). You'll just be able to use pmap_mapdev_attr(), though it will only work on i386 and eventually amd64 for now. Also, that currently only affects the in-kernel mapping, there currently isn't anything to handle the cache mode of user mappings. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org