Fix parallel make
[ioport.git] / README
1 I/O port access from the command line
2 By Richard W.M. Jones
3 ----------------------------------------------------------------------
4
5 This package adds commands to access machine I/O ports directly.  For
6 example:
7
8   outw 0x443 0xf
9   inb 0x278
10
11 Note most of the time you should never use these commands unless you
12 know what you are doing.
13
14 Usage
15 ----------------------------------------------------------------------
16
17 The commands are pretty much used as you would expect.  For additional
18 help, use '--help' and/or read the manual page.
19
20 You will need to run the commands as root.  Strictly speaking you will
21 need CAP_SYS_RAWIO capability.
22
23 Implementation
24 ----------------------------------------------------------------------
25
26 At first glance it would seem that /dev/port would be the best way to
27 access I/O ports.  However /dev/port under Linux is fundamentally
28 flawed because it only allows byte-sized access to ports.  For example
29 if you write a single long (4 bytes) it will turn that into 4
30 individual outb operations.
31
32 Instead we use iopl(2) to raise our I/O privilege level so that we can
33 do the correct in<size> and out<size> operation as requested.