Re: 16-bit read/write operations on ISA bus

Drew Eckhardt (drew@poohsticks.org)
Thu, 20 Jul 1995 17:50:36 -0600


In message <3uj8n2$1b3a@info4.rus.uni-stuttgart.de>, friebe@xvnews.unconfigured
.domain writes:
>Hi folks,
>
>I'm aware that there are existing operations like outb, inb, ... for direct IS
>A-bus
>comunication, but unfortunately I have no information which file I have to inc
>lude
>in my C source or in which files these operations are defined (if I include io
>.h,

#include <asm/io.h>

and use inb, outb, inw, etc.

>where a definition of inb, outb, ... is given, the internal functions __outb,
>__inb, ... are unknown on compilation).

This is because the actual functions used (the macro calls invoke more
efficient code if constants smaller than 256 being used for port addresses)
are declared

extern inline

which tells GDB to emit inline code if optomization is on; otherwise
declare the functions extern and generate calls.

If you compile your source with

-O2

the functions will be defined.

Also note that you need to run your program as root, there is no
way to get attomic access to more than one port if you are running
more than one copy of your program, and that you must call iopl()
to allow all port accesses (not desireable) or ioperm() to allow
access to the ports you are interested in.

One more thing : please configure your news software!