Subject: Re: mmap'ing framebuffer memory in MI drivers...
To: Jason Thorpe <firstname.lastname@example.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 03/03/1999 16:55:30
>On Wed, 03 Mar 1999 12:42:45 -0800
> Jonathan Stone <jonathan@DSG.Stanford.EDU> wrote:
>Um, pmap_phys_address() currently does it. It's an icky interface, but it
Err, nope, that's the converse of what i'm asking for.
pmap_phys_address() does <machine>_ptob(). I want a hook to do
<machine>_btop(), inside the driver's d_mmap entrypoint.
See, e.g., the shenanigans in sys/dev/tc/sfb.c: it currently has
#ifdefs to use alpha_btop() or mips_btop() or whatever.
For bus_dma, I guess this is buried inside bus_dma_mmap(), but that
wasn't the way I read it the first time. (maybe i was looking at old
bus_dma pages? i dunno).
But that still doenst help, say, drivers that steal non-DMA pages, put
them into ringbuffers or whatever, and then let userlevel space mmap()
them, or which dont yet use bus_dma, or whatever.
(audio drivers will need to do this, if Charles' mandate to support
mmap() on pio-only hardware goes anywhere).
And it doesn't help with implementations of bus_dma for a given bus
which, otherwise, could/should be shared -- like the ioasic DMA I've
started working on again.