]> git.lizzy.rs Git - plan9front.git/blob - sys/man/9/inb
lib9p: get rid of Srv.nopipe and Srv.leavefdsopen hacks
[plan9front.git] / sys / man / 9 / inb
1 .TH INB 9
2 .SH NAME
3 inb, ins, inl, outb, outs, outl, insb, inss, insl, outsb, outss, outsl \- programmed I/O
4 .SH SYNOPSIS
5 .ta \w'\fLushort 'u
6 .B
7 int     inb(int port)
8 .PP
9 .B
10 ushort  ins(int port)
11 .PP
12 .B
13 ulong   inl(int port)
14 .PP
15 .B
16 void    outb(int port, int value)
17 .PP
18 .B
19 void    outs(int port, ushort value)
20 .PP
21 .B
22 void    outl(int port, ulong value)
23 .PP
24 .B
25 void    insb(int port, void *address, int count)
26 .PP
27 .B
28 void    inss(int port, void *address, int count)
29 .PP
30 .B
31 void    insl(int port, void *address, int count)
32 .PP
33 .B
34 void    outsb(int port, void *address, int count)
35 .PP
36 .B
37 void    outss(int port, void *address, int count)
38 .PP
39 .B
40 void    outsl(int port, void *address, int count)
41 .SH DESCRIPTION
42 The
43 .I x86
44 implementation provides functions to allow kernel code
45 written in C to access the I/O address space.
46 On several other architectures such as the PowerPC and Strongarm,
47 the platform-dependent code provides similar functions to access
48 devices with an I/O space interface, even when that is memory mapped, to encourage portability of device drivers.
49 .PP
50 .IR Inb ,
51 .I ins
52 and
53 .I inl
54 apply the corresponding hardware instruction to fetch the next byte, short or long
55 from the I/O
56 .IR port .
57 .IR Outb ,
58 .I outs
59 and
60 .I outl
61 output a
62 .I value
63 to the I/O
64 .IR port .
65 .PP
66 The remaining functions transfer
67 .I count
68 bytes, shorts, or longs using programmed I/O between a memory
69 .I address
70 and
71 .IR port .
72 Functions
73 .B insX
74 copy values into memory; functions
75 .B outsX
76 copy values from memory.
77 The
78 .I count
79 is in elements, not bytes.
80 .SH SOURCE
81 .B /sys/src/9/pc/l.s
82 .SH SEE ALSO
83 .IR dma (9)