Subject: Re: mmap()'ing the I/O page
To: Eric Smith <eric@brouhaha.com>
From: Anders Magnusson <ragge@ludd.luth.se>
List: port-vax
Date: 03/29/2000 11:24:15
> Anders Magnusson <ragge@ludd.luth.se> wrote:
> > It would be simple to just add mmap() support to /dev/mem, but then you
> > must keep track of what you access yourself (wrong address will crash
> > the machine :-)
> 
> Actually, for the device I want to experiment with, the mmap() isn't
> really necessary.  If I can do 8 and 16 bit qbus I/O through reads and
> writes to /dev/mem, that would be fine.  (Or do all /dev/mem accesses turn
> into byte accesses?)
> 
/dev/mem on VAX can only access the RAM memory, not any I/O addresses.

> But I still have no idea where in /dev/mem to find the I/O space.  It
> doesn't seem to be at octal 17 760 000 (hex 3fe000); that looks like memory.
> (Not surprising since the machine has 48M of RAM.)
> 
That differs between different machines. You must look in the kernel source
code for your specific CPU type. (This is why it should be a separate 
device that could be accessed :-)

-- Ragge