1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" Portions extracted from linux/kernel/ioport.c (no copyright notice).
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" Modified Tue Aug 1 16:47 1995 by Jochen Karrer
27 .\" <cip307@cip.physik.uni-wuerzburg.de>
28 .\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
29 .\" Modified Fri Nov 27 14:50:36 CET 1998 by Andries Brouwer <aeb@cwi.nl>
30 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
31 .\" Added notes on capability requirements
33 .TH IOPL 2 2021-03-22 "Linux" "Linux Programmer's Manual"
35 iopl \- change I/O privilege level
38 .B #include <sys/io.h>
40 .BI "int iopl(int " level );
44 changes the I/O privilege level of the calling thread,
45 as specified by the two least significant bits in
48 The I/O privilege level for a normal thread is 0.
49 Permissions are inherited from parents to children.
51 This call is deprecated, is significantly slower than
53 and is only provided for older X servers which require
54 access to all 65536 I/O ports.
55 It is mostly for the i386 architecture.
56 On many other architectures it does not exist or will always
59 On success, zero is returned.
60 On error, \-1 is returned, and
62 is set to indicate the error.
70 This call is unimplemented.
73 The calling thread has insufficient privilege to call
77 capability is required to raise the I/O privilege level
78 above its current value.
81 is Linux-specific and should not be used in programs that are
82 intended to be portable.
84 .\" Libc5 treats it as a system call and has a prototype in
86 .\" Glibc1 does not have a prototype.
87 Glibc2 has a prototype both in
91 Avoid the latter, it is available on i386 only.
95 allowed the thread to disable interrupts while running
96 at a higher I/O privilege level.
97 This will probably crash the system, and is not recommended.
100 on some architectures (such as i386), permissions
102 inherited by the child produced by
104 and were preserved across
106 This behavior was inadvertently changed in Linux 3.7,
107 and won't be reinstated.