Subject: Re: user mapping pci memory
To: Chris G. Demetriou <>
From: Matthias Drochner <>
List: tech-kern
Date: 03/11/1997 11:35:58
Excerpts from netbsd: 11-Mar-97 Re: user mapping pci memory "Chris G.
Demetriou"@cs. (3376)

> Your note about the potential inadequacy of using 'int's to describe
> page frame numbers is a good observation, and one that may cause
> problems in the future.  However, using ints gives 32 + (number of
> bits of page offset; 13 on current alphas) bits of addressable space.
> 45 bits of physical address space is currently enough.  (However, the
> time when it's _not_ enough is rapidly approaching.)

There is another problem with the mmap() return value which
is hurting me from time to time: (on i386)
I have a PCI device with a 2k region which I'd like to access from
user space. Sometimes this area is physically mapped 4k-aligned,
sometimes not, depending on BIOS version and resource usage in
the machine. There is no way to tell the user application the actual
base address (I use an additional ioctl which is ugly).

Further, the mmap() interface is not very satisfying when mapping
registers have to be allocated for the mapped region. It would be useful
to get an information about the whole mapped range when it is mapped,
and it would be even nicer to know when it is unmapped.

Are my needs too exotic or are there more people looking  for a

best regards
Matthias Drochner