[LCP]C inb outb ....

Jack Lloyd lloyd at acm.jhu.edu
Sun Jun 8 02:56:02 UTC 2003


On Fri, 6 Jun 2003, Maharajan Veerabag wrote:

>  i am in the process of writing a linux device driver in C. is it
> possible to access the pci local I/O address space with inb,outb
> instructions... directly or is any request of space required. What is
> the exact power of the inb family of instructions..

It may be possible, but that is not how to write Linux drivers. For one,
using inb/outb would mean using asm, which means it would not be portable
to other PCI systems (Alpha, some PPCs and UltraSPARCs, etc). I would also
imagine that Linux provides a great deal of generic functionality for PCI
drivers directly, leaving you to just plug in the 'interesting' bits.
However, I don't know the full details, perhaps asking at someplace like
the #kernelnewbies IRC channel would provide more useful help.

-Jack




More information about the linuxCprogramming mailing list