xref: /openbsd/share/man/man4/xf86.4 (revision 27626149)
1.\"	$OpenBSD: xf86.4,v 1.4 2002/08/24 17:21:44 matthieu Exp $
2.\"
3.\" Copyright (c) 1998 Matthieu Herrb
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. The name of the author may not be used to endorse or promote products
15.\"    derived from this software without specific prior written permission
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27.\"
28.Dd February 20, 1998
29.Dt XF86 4
30.Os
31.Sh NAME
32.Nm xf86
33.Nd XFree86 aperture driver
34.Sh SYNOPSIS
35.Cd "option APERTURE"
36.Sh DESCRIPTION
37On
38.Va alpha Ns ,
39.Va i386 Ns ,
40.Va macppc
41and
42.Va sparc64
43the
44.Pa /dev/xf86
45driver provides access to the memory and I/O ports of a VGA board
46and to the PCI configuration registers
47for use by the XFree86 X servers
48when running with a kernel security level > 0.
49.Pp
50The X servers require the use of this driver.
51.Sh ACCESS CONTROL
52Access to the
53.Pa /dev/xf86
54device is allowed when the sysctl variable
55.Va machdep.allowaperture
56>= 1.
57This variable (which default value is 0)
58can only be manipulated when the security level is <= 0, so it should be
59set in
60.Pa /etc/sysctl.conf .
61The possible values for
62.Va machdep.allowaperture
63are:
64.Bl -tag -width Ds
65.It 0
66the aperture driver is disabled.
67Opening it returns
68.Dv EPERM.
69.It 1
70the aperture driver allows access to standard VGA framebuffer and BIOS.
71Access to
72.Xr pci 4
73configuration registers is also allowed.
74.It 2
75in addition to allowing access to
76.Xr pci 4
77configuration registers,
78the aperture driver allows access to the whole 1st megabyte of physical
79memory, permitting use of the int10 emulation in XFree86 4.0.x.
80Note that this can cause some security problems, since the process that
81has access to the aperture driver can also access part of the kernel
82memory.
83This mode is not supported on alpha or sparc64.
84.El
85.Sh SEE ALSO
86.Xr XF86_Accel 1 ,
87.Xr XF86_SVGA 1 ,
88.Xr options 4 ,
89.Xr pci 4 ,
90.Xr sysctl.conf 5 ,
91.Xr config 8 ,
92.Xr sysctl 8
93.Sh HISTORY
94.Pa /dev/xf86
95was introduced as a loadable kernel module for
96.Nx 0.9 c
97with XFree86 3.1.
98It was integrated as an in-kernel device on
99.Ox 2.3 .
100It is required in order to allow access to I/O ports for all X servers since
101.Ox 2.4 .
102.Sh AUTHORS
103The aperture driver was written by Matthieu Herrb.
104.Sh BUGS
105This driver allows access to all addresses above
106.Va physmem .
107It should be restricted to the actual address range of the video
108memory.
109