Re: PCI Functions problems

Hein Roehrig (roehrig@mpi-sb.mpg.de)
Mon, 26 May 1997 17:16:07 +0200 (MET DST)


> Indeed it may be nice to have a driver to access PCI configuration
> space, this should however be done carefully because you can easily crash
> a machine by destroying all your mappings and setup.

Absolutely. My driver is called "pcidev" like PCI development. It is
intended for safe/development environments only. BTW, by changing
the permissions of /dev/pcidev, access can be restricted to the super
user. Though user space device drivers should not be used for
production use anyway.

I don't know about SMP, but my driver just calls the pcibios_* functions
we *should* take care of this.

> Also X servers contain code that directly access PCI configuration
> space which is quite dangerous if an interrupt happens between the
> access to the address and data ports: they would better use system
> services that provide controlled access to PCI configuration space.

Interesting -- do you know how they access *config* space without
going through the kernel?

Cheers,
Hein