ioremap() on ISA memory space

Paul Mackerras paulus at
Wed Jun 9 11:06:46 EST 1999

Daniel Jacobowitz <drow at> wrote:

> When I was hacking on tulip.c, I wanted to use tulip-daig to get the
> state of the card.  But it uses inl/outl, and on powerpc these have a
> kernel private variable (isa_io_base) in their macro expansion.  Is
> there any way to make the PCI space available to userland on powerpc,
> as iopl() and inb/outb can on x86?

You have to open /dev/mem and do a mmap of the physical pages for the
PCI I/O space.  You would then need to have a variable called
isa_io_base and put the address you get back from mmap into it.
PCI I/O space is usually at 0xf2000000 on older powermacs.  If you
want to get fancy, you can wander through /proc/device-tree looking
for the primary PCI bridge and use that to work out where the I/O
space is.


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check ]]
[[ and for useful information before posting.   ]]

More information about the Linuxppc-dev mailing list