Subject: Re: user mapping pci memory
To: Gordon W. Ross <>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 03/12/1997 15:03:34
ISTR that I beat up this issue about November last year.
I was concerned simply to write portable drivers that map
(e.g.,) PCI bus space into the _kernel_ address space.
Even doing that in an MI way loses in the current scheme.

Regularizing  the interface between the MD pager code and the
MI d_mmap() routines is the right first step. We *need* to get
the machine-specific *_btop() out of MI drivers.  Requiring all
d_mmap() routines to return a `page address' with machine-dependent
flags in the low-order bits sounded  fine to me and to CGD.
I even have code in my own tree that does this for an i386.

I can probably find the details of what I proposed, if anyone cares.
It think it stalled when FVDL wanted to wait until ``all ports''
or all drivers used that new interface; I could mis remember though.

The path I took was slightly different; I created an MI set of flag
*names* which notionally get stored in the low-order bits of
addresses. The exact bit positions are MD; they may map to hardware
PTE bits or `bus space' selection bits.  That lets that MI drivers can
get things like cache attributes correct in an MI way, when the
existing interface (cached, uncached) isnt' quite rich enough.  (AFAIK
the existing interface isn't rich enough for what i wanted to do.)