From owner-freebsd-arch Sun Mar 16 22: 5:24 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E271337B401; Sun, 16 Mar 2003 22:05:21 -0800 (PST) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B72E43FBF; Sun, 16 Mar 2003 22:05:18 -0800 (PST) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.8/8.12.8) with ESMTP id h2H69oxS076486; Mon, 17 Mar 2003 01:09:50 -0500 (EST) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.8/8.12.8/Submit) id h2H69oop076485; Mon, 17 Mar 2003 01:09:50 -0500 (EST) Date: Mon, 17 Mar 2003 01:09:49 -0500 From: Jake Burkholder To: Robert Watson Cc: arch@FreeBSD.ORG Subject: Re: sizeof(void *)!=sizeof(vm_paddr_t) Message-ID: <20030317010949.A76446@locore.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from rwatson@FreeBSD.ORG on Mon, Mar 17, 2003 at 12:58:44AM -0500 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Mon, Mar 17, 2003 at 12:58:44AM -0500, Robert Watson said words to the effect of; > > I just committed a new column to our increasingly complicated driver > status table on the web site. This column is intended to capture whether > or not drivers are able to handle (both compile and run properly in) an > environment where the assumption that a physical memory address can be > stored in a variable of a pointer type. Intel PAE support will operate > only with drivers that meet this assumption. If driver developers could > review the table at > > http://www.FreeBSD.org/projects/busdma/ > > to make sure their driver is accurately characterized from the perspective > of the current criteria: busdma, INTR_MPSAFE, SMPng locked, and p!=a > safety. In addition, if your driver is not safe on one or more of these > counts, fixing it prior to 5.1-RELEASE would be a very good idea. Drivers > not adapted for these requirements will perform less well than drivers > that are adapted, run on few hardware architectures, and may not run with > large memory systems. I've set the "default" for p!=a safety to "New", > but I suspect a moderate number of drivers are already safe from this > regard (including syscons, ata, ...) Note that vm_paddr_t doesn't actually exist yet, but it will soon; vm_offset_t can be more or less substituted. The point is to always use an arithmetic type for physical or bus addresses, not a pointer type. In general the only portable way to print these things is with the %j modifier and to cast to uintmax_t. Jake > > Thanks, > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > robert@fledge.watson.org Network Associates Laboratories > > ---------- Forwarded message ---------- > Date: Sun, 16 Mar 2003 21:44:30 -0800 (PST) > From: Robert Watson > To: doc-committers@FreeBSD.org, cvs-doc@FreeBSD.org, cvs-all@FreeBSD.org > Subject: cvs commit: www/en/projects/busdma index.sgml > > rwatson 2003/03/16 21:44:30 PST > > FreeBSD doc repository > > Modified files: > en/projects/busdma index.sgml > Log: > Add a new driver status column to indicate whether the driver can > safely handle sizeof(void *) != sizeof(vm_paddr_t) or != > sizeof(bus_addr_t). In order for drivers to be supported with PAE, > they must be able to handle this, including avoiding casting of > physical addresses to pointers for printfs, pointer arithmetic, > etc. > > Thought reasonable by: jake > > Revision Changes Path > 1.50 +88 -0 www/en/projects/busdma/index.sgml > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message