1.\" $OpenBSD: xf86.4,v 1.19 2015/05/28 20:53:05 jcs 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 $Mdocdate: May 28 2015 $ 29.Dt XF86 4 30.Os 31.Sh NAME 32.Nm xf86 33.Nd X Window System aperture driver 34.Sh SYNOPSIS 35.Cd "option APERTURE" 36.Sh DESCRIPTION 37On 38the alpha, amd64, i386, macppc, and sparc64 architectures, 39the 40.Pa /dev/xf86 41driver provides access to the memory and I/O ports of a VGA board 42and to the PCI configuration registers 43for use by the X servers 44when running with a kernel security level greater than 0. 45.Pp 46The X servers require the use of this driver for 47.Xr isa 4 48or 49.Xr pci 4 50video cards on 51.Ar alpha , 52.Ar amd64 , 53.Ar i386 , 54.Ar macppc , 55and 56.Ar sparc64 . 57.Sh ACCESS CONTROL 58Access to the 59.Pa /dev/xf86 60device is allowed when the 61.Xr sysctl 8 62variable 63.Va machdep.allowaperture 64is greater than or equal to 1. 65This variable (which has a default value of 0) 66can only be raised when the security level 67is less than or equal to 0, so it should be 68set in 69.Pa /etc/sysctl.conf . 70The possible values for 71.Va machdep.allowaperture 72are: 73.Bl -tag -width Ds 74.It 0 75the aperture driver is disabled. 76Opening it returns 77.Dv EPERM . 78.It 1 79the aperture driver allows access to standard VGA framebuffer and BIOS. 80Access to 81.Xr pci 4 82configuration registers is also allowed. 83.It 2 84in addition to allowing access to 85.Xr pci 4 86configuration registers, 87the aperture driver allows access to the whole first megabyte of physical 88memory, permitting use of the int10 emulation in X.Org 6.8 and later. 89Note that this can cause some security problems, since the process that 90has access to the aperture driver can also access part of the kernel 91memory. 92This mode is not supported on alpha or sparc64. 93.It 3 94the aperture driver allows multiple processes to concurrently access 95.Xr pci 4 96configuration registers and the whole first megabyte of physical memory. 97.El 98.Sh SEE ALSO 99.Xr Xorg 1 , 100.Xr options 4 , 101.Xr pci 4 , 102.Xr sysctl.conf 5 , 103.Xr securelevel 7 , 104.Xr config 8 , 105.Xr sysctl 8 106.Sh HISTORY 107.Pa /dev/xf86 108was integrated as an in-kernel device on 109.Ox 2.3 . 110It is required in order to allow access to I/O ports for all X servers since 111.Ox 2.4 . 112.Sh AUTHORS 113The aperture driver was written by 114.An Matthieu Herrb . 115.Sh BUGS 116This driver allows access to all addresses above 117.Va physmem . 118It should be restricted to the actual address range of the video 119memory. 120