The special file
is a controlled security hole that allows a process to gain I/O
(which are normally reserved for kernel-internal code).
This can be useful in order to write userland
programs that handle some hardware directly.
The usual operations on the device are to open it via the
interface and to send I/O requests to the file descriptor using the
requests available for
are mostly platform dependent, but there are also some in common between
all of them.
is used by all the architectures in order to request that an I/O operation
It takes a struct iodev_pio_req argument that must be previously setup.
member specifies the type of operation requested.
It may be:
The operation is an "in" type.
A value will be read from the specified port
(retrieved from the
member) and the result will be stored in the
The operation is a "out" type.
The value will be fetched from the
member and will be written out to the specified port (defined as the
member specifies the size of the operand to be read/written, expressed
In addition to any file access permissions on
the kernel enforces that only the super-user may open this device.