Subject: mmap'ing device driver memory
To: None <tech-kern@netbsd.org>
From: Michael Richardson <mcr@solidum.com>
List: tech-kern
Date: 12/14/1998 16:57:05
  Am I correct that there is no call like "machine_ptob()" that can be used
by MI device drivers that want to map memory that is on an expansion card
(i.e. PCI) into user space?
  I see that, for instance, the mmap() code for the VGA drivers is all MD.

  For the moment, I'm cheating and using i386_ptob().

  Second, due to lack of actual hardware, I'm simulating part of my card's
memory with system ram. Is there something I should call other than than
malloc() to get memory that is safe for mmap()'ing?

  Or should I really switch to using the bus_dma stuff? It isn't clear to me
how to do this although Jason's paper helped a lot...

   :!mcr!:            |  Solidum Systems Corporation, http://www.solidum.com
   Michael Richardson |For a better connected world,where data flows faster<tm>
 Personal: mcr@sandelman.ottawa.on.ca. PGP key available.
 Corporate: <A HREF="mailto:mcr@solidum.com">mcr@solidum.com</A>.