-
Notifications
You must be signed in to change notification settings - Fork 0
/
insw.html
157 lines (127 loc) · 4.89 KB
/
insw.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!-- Creator : groff version 1.22.4 -->
<!-- CreationDate: Wed Jan 29 11:26:11 2020 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>OUTB</title>
</head>
<body>
<h1 align="center">OUTB</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#CONFORMING TO">CONFORMING TO</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#COLOPHON">COLOPHON</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">outb, outw,
outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl,
outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>#include
<sys/io.h></b></p>
<p style="margin-left:11%; margin-top: 1em"><b>unsigned
char inb(unsigned short int</b> <i>port</i><b>); <br>
unsigned char inb_p(unsigned short int</b> <i>port</i><b>);
<br>
unsigned short int inw(unsigned short int</b>
<i>port</i><b>); <br>
unsigned short int inw_p(unsigned short int</b>
<i>port</i><b>); <br>
unsigned int inl(unsigned short int</b> <i>port</i><b>);
<br>
unsigned int inl_p(unsigned short int</b>
<i>port</i><b>);</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>void
outb(unsigned char</b> <i>value</i><b>, unsigned short
int</b> <i>port</i><b>); <br>
void outb_p(unsigned char</b> <i>value</i><b>, unsigned
short int</b> <i>port</i><b>); <br>
void outw(unsigned short int</b> <i>value</i><b>, unsigned
short int</b> <i>port</i><b>); <br>
void outw_p(unsigned short int</b> <i>value</i><b>, unsigned
short int</b> <i>port</i><b>); <br>
void outl(unsigned int</b> <i>value</i><b>, unsigned short
int</b> <i>port</i><b>); <br>
void outl_p(unsigned int</b> <i>value</i><b>, unsigned short
int</b> <i>port</i><b>);</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>void
insb(unsigned short int</b> <i>port</i><b>, void
*</b><i>addr</i><b>, <br>
unsigned long int</b> <i>count</i><b>); <br>
void insw(unsigned short int</b> <i>port</i><b>, void
*</b><i>addr</i><b>, <br>
unsigned long int</b> <i>count</i><b>); <br>
void insl(unsigned short int</b> <i>port</i><b>, void
*</b><i>addr</i><b>, <br>
unsigned long int</b> <i>count</i><b>); <br>
void outsb(unsigned short int</b> <i>port</i><b>, const void
*</b><i>addr</i><b>, <br>
unsigned long int</b> <i>count</i><b>); <br>
void outsw(unsigned short int</b> <i>port</i><b>, const void
*</b><i>addr</i><b>, <br>
unsigned long int</b> <i>count</i><b>); <br>
void outsl(unsigned short int</b> <i>port</i><b>, const void
*</b><i>addr</i><b>, <br>
unsigned long int</b> <i>count</i><b>);</b></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">This family of
functions is used to do low-level port input and output. The
out* functions do port output, the in* functions do port
input; the b-suffix functions are byte-width and the
w-suffix functions word-width; the _p-suffix functions pause
until the I/O completes.</p>
<p style="margin-left:11%; margin-top: 1em">They are
primarily designed for internal kernel use, but can be used
from user space.</p>
<p style="margin-left:11%; margin-top: 1em">You must
compile with <b>-O</b> or <b>-O2</b> or similar. The
functions are defined as inline macros, and will not be
substituted in without optimization enabled, causing
unresolved references at link time.</p>
<p style="margin-left:11%; margin-top: 1em">You use
<b>ioperm</b>(2) or alternatively <b>iopl</b>(2) to tell the
kernel to allow the user space application to access the I/O
ports in question. Failure to do this will cause the
application to receive a segmentation fault.</p>
<h2>CONFORMING TO
<a name="CONFORMING TO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>outb</b>()
and friends are hardware-specific. The <i>value</i> argument
is passed first and the <i>port</i> argument is passed
second, which is the opposite order from most DOS
implementations.</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>ioperm</b>(2),
<b>iopl</b>(2)</p>
<h2>COLOPHON
<a name="COLOPHON"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">This page is
part of release 5.02 of the Linux <i>man-pages</i> project.
A description of the project, information about reporting
bugs, and the latest version of this page, can be found at
https://www.kernel.org/doc/man-pages/.</p>
<hr>
</body>
</html>