On Mon, 3 Feb 2003, vinai wrote:
I'm not anywhere near an expert on this, so take what I say with a pound
of salt or so ... :) I was reading up on the PCI specifications to try
to understand a little bit about drivers, and it was mentioned that the
x86 architecture use I/O space to access devices, whereas with PowerPC
systems, everything is accessed through memory space mapping ...
So you should mmap() /dev/mem and access the memory range that contains PCI I/O
space on your box. This is machine dependent. An example (for CHRP LongTrail)
can be found at http://home.tvd.be/cr26864/Linux/PPC/sio.c
In theory we could let ioperm() take care of mapping /dev/mem and setting up
_IO_BASE, based on information from /proc.