mmap()
Hans Petter Selasky
hselasky at c2i.net
Thu Dec 9 13:32:39 PST 2004
On Wed, Dec 08, 2004 at 01:05:04AM -0800, John-Mark Gurney wrote:
> Kamal R. Prasad wrote this message on Wed, Dec 08, 2004 at 10:45 +0530:
> > Wilko Bulte wrote:
> >
> > >On Tue, Dec 07, 2004 at 02:19:19PM -0800, John-Mark Gurney wrote..
> > >
> > >>Kamal R. Prasad wrote this message on Tue, Dec 07, 2004 at 22:21 +0530:
> > >>
> > >>>There was a bug in my interface routine which probably resulted in too
> > >>>many calls.
> > >>>Something like *paddr=vtophys(base) instead of
> > >>>*paddr=vtophys(base+offset) should result in lots of calls to the
> > >>>interface.
> > >>>
> > >>Just remeber that vtophys is not a supported interface in HEAD, (if it
> > >>still works, it will probably be removed shortly).. Also, vtophys only
> > >>works on limited archs, like i386 and alpha...
> > >
> > >s/limited/some/
> >
> > So what would be the equivalent supported interface in HEAD?
>
> bus_dma(9) It's a bit more complicated though...
Why is there not a simple interface to it? I'd suggest something like:
void *
xxx_alloc_mem(u_int32_t size, u_int8_t align_power);
u_int32_t
xxx_vtophys(void *ptr, u_int32_t size);
void
xxx_free_mem(void *ptr, u_int32_t size);
Yours
-HPS
More information about the freebsd-hackers
mailing list