From owner-freebsd-hackers Wed Jan 24 11:19:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from etinc.com (et-gw.etinc.com [207.252.1.2]) by hub.freebsd.org (Postfix) with ESMTP id CC51237B698 for ; Wed, 24 Jan 2001 11:19:10 -0800 (PST) Received: from dbsys.etinc.com (dbsys.etinc.com [207.252.1.18]) by etinc.com (8.9.3/8.9.3) with ESMTP id OAA68060; Wed, 24 Jan 2001 14:15:08 GMT (envelope-from dennis@etinc.com) Message-Id: <5.0.0.25.0.20010124141209.02782aa0@mail.etinc.com> X-Sender: dennis@mail.etinc.com X-Mailer: QUALCOMM Windows Eudora Version 5.0 Date: Wed, 24 Jan 2001 14:20:26 -0500 To: David Rufino , freebsd-hackers@FreeBSD.ORG From: Dennis Subject: Re: driver help In-Reply-To: <20010124153228.A5828@btinternet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 10:32 AM 01/24/2001, David Rufino wrote: >* Mike Smith (msmith@freebsd.org) wrote: > > > I am currently trying to port the compatability layer of a linux > > > kernel driver to FreeBSD 4.x. The bit I'm stuck on at the moment > > > is, how do I map arbitrary physical address space to kernel virtual > > > address space (ala ioremap() in linux) ? Thanks. > > > > You don't. > > > > If this is a PCI device, it's all done for you when you call > > bus_alloc_resource. > >Ideally I would do this, except I'm porting a compatability layer for >a binary module, so I need a function which simply maps I/O space to >kernel virtual address space. Is it possible, if not desirable ? You can use vaddr_t pmap_mapdev(paddr,size) to map any physical memory address. Of course you never know when these "old friend" routines will disappear. Dennis To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message