Subject: Re: user mapping pci memory
To: Matthias Drochner <firstname.lastname@example.org>
From: Chris G. Demetriou <email@example.com>
Date: 03/12/1997 11:28:59
> The driver mmap usually uses <arch>_btop() to calculate
> the return value - how to do this mi?
You can't (yet). There's no good way to do that currently.
Note that, as you say, drivers _usually_ use <arch>_btop(), but do not
always. In general, what they use is an architecture-specific
decision, and requires cooperation between the drivers and the pmap
Right now, you _have_ to use #ifdef.
> Seems that things would be simpler if mmap returned
> phys addresses.
(1) Plain physical addresses mean that here's some possibility for the
device mmap routine trying to return non-page-aligned values, which is
(2) There aren't enough bits in a physical address to express the
return value of the device mmap properly, in all cases, from what I
understand, and a plain physical address isn't necessarily all that
you want to return. E.g. on various sun boxes, don't you need a few
bits of 'space' information in addition to the physical address?