tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bus_space_physload(9)

On Wed, Mar 24, 2010 at 09:15:53PM +0900, Izumi Tsutsui wrote:
> > I'd like to propose a new function in bus_space(9) API, 
> > bus_space_physload(9).
> > 
> >     void *bus_space_physload(bus_space_tag_t space, bus_addr_t addr,
> >         bus_size_t size);
> > 
> > This function is provided for device drivers to register its linear memory
> > region to be managed by VM.  When user process maps these regions, VM will
> > take care of detailed treatment.
> What's different from bus_space_alloc(9)?

bus_space_physload(9) is to replace bus_space_mmap(9).

bus_space_alloc(9) is to manage a space where device regions are placed.
bus_space_mmap(9)/bus_space_physload(9) are about after device regions are
fixed there.  You can't mmap() device regions that are not fixed in bus space.

> Even if there is some API difference,
> doesn't it require more parameters as bus_space_alloc(9)?

Yes.  I added "int prot" and "int flags" as bus_space_mmap(9).


Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635

Home | Main Index | Thread Index | Old Index