Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2001 14:20:26 -0500
From:      Dennis <dennis@etinc.com>
To:        David Rufino <daverufino@btinternet.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: driver help
Message-ID:  <5.0.0.25.0.20010124141209.02782aa0@mail.etinc.com>
In-Reply-To: <20010124153228.A5828@btinternet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.0.0.25.0.20010124141209.02782aa0>