blob: 698960ed66974944b420a12a1befc277ab983750 (
plain)
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
|
# $OpenBSD: README,v 1.2 1998/02/03 23:33:51 deraadt Exp $
XFree86 Framebuffer aperture driver for OpenBSD.
-----------------------------------------------
This module was written to help work around the security feature of
OpenBSD that prevents read/write access to /dev/mem.
XFree86 can take advantage of having direct access to video
memory (especially with VLB and PCI cards) and even requires it for
the P9000 server.
This driver works like the standard /dev/mem driver. It just allows
mapping of the VGA framebuffer even if kernel security level is > 0.
The driver only implements the open(), close() and mmap() calls. In
order not to defeat kernel security, only one open() at a time is
allowed and only a process with effective user id of 0 can perform
it. So while you're running XFree86, no other process will be allowed
to open /dev/xf86.
This work is heavily inspired from the Solaris x86 aperture driver by
Doug Anson (danson@lgc.com) and David Holland (davidh@use.com).
Installation:
-------------
1. Edit the Makefile if you want to modify the default installation
directory.
2. run make depend && make; then as root, run make install.
3. add these lines somehere at the end of /etc/rc.local (before the
sysctl that raises the security level):
KERNDIR=/usr/X11R6/lib/X11/kernel
if [ -f ${KERNDIR}/ap.o ]; then
modload -o ${KERNDIR}/ap -e ap -p ${KERNDIR}/apinstall ${KERNDIR}/ap.o
fi
to load the driver at bootime.
4. Reboot your system.
5. Test the module by running 'aptest' as root. The outpout will look like:
# ./aptest
NOTICE: VGA mapped [0xa0000 ,size=4096) to addr=0x10073000...
DONE displaying memory contents (80 bytes)
UNMAPPING [0xa0000 ,size=4096) to addr=0x10073000... and closing...DONE.
Exiting successful...
6. If you're running XFree86 3.1 or higher, just make sure that
HasOpenBSDApertureDriver is set to YES in xf86site.def before building
your server. The OpenBSD binary distribution has the aperture driver
code enabled.
Bug reports, comments, suggestions can be sent to matthieu@laas.fr
--Matthieu Herrb
----------------------------------------------------------------------
Copyright (c) 1994 The XFree86 Project Inc.
|