Fix parallel make
[ioport.git] / inb.pod
1 =head1 NAME
2
3 inb, outb, inw, outw, inl, outl - access I/O ports
4
5 =head1 SYNOPSIS
6
7  inb ADDRESS
8  inw ADDRESS
9  inl ADDRESS
10  outb ADDRESS DATA
11  outw ADDRESS DATA
12  outl ADDRESS DATA
13
14 =head1 EXAMPLES
15
16  inb 0x278
17  outw 0x440 0xffff
18
19 =head1 DESCRIPTION
20
21 These commands enable command line and script access directly to I/O
22 ports on PC hardware.
23
24 The C<inb>, C<inw> and C<inl> commands perform an input (read)
25 operation on the given I/O port, and print the result.
26
27 The C<outb>, C<outw> and C<outl> commands perform an output (write)
28 operation to the given I/O port, sending the given data.  Note that
29 the order of the parameters is ADDRESS DATA.
30
31 The size of the operation is selected according to the suffix, with
32 C<b> meaning byte, C<w> meaning word (16 bits) and C<l> meaning long
33 (32 bits).
34
35 Port numbers are in the range 0-0xffff.  We don't support access to
36 memory mapped devices.
37
38 Hexadecimal numbers (prefixed by C<0x>), decimal numbers, and octal
39 numbers (prefixed by C<0>), are allowed as parameters.
40
41 =head1 RETURN FROM "IN" OPERATIONS
42
43 The value read from the port by an "in" operation is normally printed
44 in decimal.
45
46 Use the C<--hex> option to print the result as hexadecimal (C<0x>
47 prefix is NOT printed).
48
49 Use the C<--code> option to turn the result into an exit status.  Note
50 that Unix/shell can only reliably return exit status in the range
51 0-0x7f, so this is not particularly useful in practice.
52
53 =head1 TYPE AND SIZE OF OPERATION
54
55 The type and size of the operation is normally determined by the name
56 of the command, eg. C<inb> is a read operation of 1 byte.
57
58 You can override this by using the C<--read>, C<--write> and/or
59 C<--size N> options.  For C<--size N>, C<N> should be C<1>, C<2> or
60 C<4> meaning byte, word and long respectively.
61
62 =head1 PERMISSIONS
63
64 You would normally need to be root or have the C<CAP_SYS_RAWIO>
65 capability in order to run these commands.
66
67 =head1 WARNING
68
69 Using these commands can cause Bad Things to happen to your hardware.
70
71 =head1 SEE ALSO
72
73 L<iopl(2)>,
74 L<mem(4)>,
75 L<http://et.redhat.com/~rjones/ioport>,
76 L<http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html>.
77
78 =head1 AUTHORS
79
80 Richard W.M. Jones <rjones @ redhat . com>
81
82 =head1 COPYRIGHT
83
84 (C) Copyright 2009 Red Hat Inc.,
85 L<http://et.redhat.com/~rjones/ioport>.
86
87 This program is free software; you can redistribute it and/or modify
88 it under the terms of the GNU General Public License as published by
89 the Free Software Foundation; either version 2 of the License, or
90 (at your option) any later version.
91
92 This program is distributed in the hope that it will be useful,
93 but WITHOUT ANY WARRANTY; without even the implied warranty of
94 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
95 GNU General Public License for more details.
96
97 You should have received a copy of the GNU General Public License
98 along with this program; if not, write to the Free Software
99 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.