Subject: Re: user mapping pci memory
To: Chris G. Demetriou <email@example.com>
From: Matthias Drochner <firstname.lastname@example.org>
Date: 03/12/1997 10:53:06
Excerpts from netbsd: 11-Mar-97 Re: user mapping pci memory "Chris G.
[mmap can't return not page-aligned phys addresses]
> This is not "a problem with the mmap return value." mmap maps
> page-sized physical regions to virtual pages. It does not map areas
> smaller than full pages to anything, and can't be used for that
> without 'special help.' That's not a bug in the mmap design, it's a
> necessary side effect of having to map things in units of pages.
OK, the MMU handles pages, and vm works in page units.
But even if this has no effect to the problem I mentioned,
the only thing that the device_pager does with the mmap() return
value is to use it as argument for pmap_phys_address(), which
ends in <arch>_ptob().
The driver mmap usually uses <arch>_btop() to calculate
the return value - how to do this mi?
Seems that things would be simpler if mmap returned