]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/ia64/sys/io.h
Update to LGPL v2.1.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / ia64 / sys / io.h
CommitLineData
131bf9f3
UD
1/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
4
5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
131bf9f3
UD
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
131bf9f3 14
41bdb6e2
AJ
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
131bf9f3
UD
19
20#ifndef _SYS_IO_H
21#define _SYS_IO_H 1
22
23#include <features.h>
24
25__BEGIN_DECLS
26
27/* If TURN_ON is TRUE, request for permission to do direct i/o on the
28 port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
29 permission off for that range. This call requires root privileges.
30
31 Portability note: not all Linux platforms support this call. Most
32 platforms based on the PC I/O architecture probably will, however.
33 E.g., Linux/Alpha for Alpha PCs supports this. */
34extern int ioperm (unsigned long int __from, unsigned long int __num,
35 int __turn_on);
36
37/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
38 access any I/O port is granted. This call requires root
39 privileges. */
40extern int iopl (int __level);
41
42extern unsigned int _inb (unsigned long int __port);
43extern unsigned int _inb (unsigned long int __port);
44extern unsigned int _inw (unsigned long int __port);
45extern unsigned int _inl (unsigned long int __port);
46extern void _outb (unsigned char __val, unsigned long int __port);
47extern void _outw (unsigned short __val, unsigned long int __port);
48extern void _outl (unsigned int __val, unsigned long int __port);
49
50#define inb _inb
51#define inw _inw
52#define inl _inl
53#define outb _outb
54#define outw _outw
55#define outl _outl
56
57/* Access PCI space protected from machine checks. */
58extern int pciconfig_read (unsigned long int __bus, unsigned long int __dfn,
59 unsigned long int __off, unsigned long int __len,
60 unsigned char *__buf);
61
62extern int pciconfig_write (unsigned long int __bus, unsigned long int __dfn,
63 unsigned long int __off, unsigned long int __len,
64 unsigned char *__buf);
65
66__END_DECLS
67
68#endif /* _SYS_IO_H */