aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r--xorg-server/hw/xfree86/common/.gitignore6
-rw-r--r--xorg-server/hw/xfree86/common/extramodes54
-rw-r--r--xorg-server/hw/xfree86/common/modeline2c.awk186
-rw-r--r--xorg-server/hw/xfree86/common/vesamodes222
-rw-r--r--xorg-server/hw/xfree86/common/xf86Build.h.in4
-rw-r--r--xorg-server/hw/xfree86/ddc/DDC.HOWTO194
-rw-r--r--xorg-server/hw/xfree86/ddc/Makefile.am22
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/README32
-rw-r--r--xorg-server/hw/xfree86/i2c/i2c_def.h12
-rw-r--r--xorg-server/hw/xfree86/int10/INT10.HOWTO688
-rw-r--r--xorg-server/hw/xfree86/int10/Makefile.am92
-rw-r--r--xorg-server/hw/xfree86/int10/x86emu.c24
-rw-r--r--xorg-server/hw/xfree86/int10/xf86x86emu.h108
-rw-r--r--xorg-server/hw/xfree86/modes/Makefile.am70
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/Makefile.am152
-rw-r--r--xorg-server/hw/xfree86/os-support/hurd/Makefile.am30
-rw-r--r--xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c74
-rw-r--r--xorg-server/hw/xfree86/os-support/int10Defines.h178
-rw-r--r--xorg-server/hw/xfree86/os-support/misc/Makefile.am24
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/Makefile.am74
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/apSolaris.shar1612
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_inout.s248
-rw-r--r--xorg-server/hw/xfree86/ramdac/CURSOR.NOTES382
-rw-r--r--xorg-server/hw/xfree86/vgahw/Makefile.am18
-rw-r--r--xorg-server/hw/xfree86/x86emu/Makefile.am58
25 files changed, 2282 insertions, 2282 deletions
diff --git a/xorg-server/hw/xfree86/common/.gitignore b/xorg-server/hw/xfree86/common/.gitignore
index 3262e2f37..81e8416d2 100644
--- a/xorg-server/hw/xfree86/common/.gitignore
+++ b/xorg-server/hw/xfree86/common/.gitignore
@@ -1,3 +1,3 @@
-# Add & Override for this directory and it's subdirectories
-xf86Build.h
-xf86DefModeSet.c
+# Add & Override for this directory and it's subdirectories
+xf86Build.h
+xf86DefModeSet.c
diff --git a/xorg-server/hw/xfree86/common/extramodes b/xorg-server/hw/xfree86/common/extramodes
index fdabb709a..450502670 100644
--- a/xorg-server/hw/xfree86/common/extramodes
+++ b/xorg-server/hw/xfree86/common/extramodes
@@ -1,27 +1,27 @@
-//
-// Extra modes to include as default modes in the X server.
-//
-// $XFree86: xc/programs/Xserver/hw/xfree86/etc/extramodes,v 1.5 2002/06/05 19:43:05 dawes Exp $
-//
-
-# 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz
-ModeLine "832x624" 57.284 832 864 928 1152 624 625 628 667 -Hsync -Vsync
-
-# 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz
-ModeLine "1400x1050" 122.0 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync
-
-# 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz
-ModeLine "1400x1050" 155.8 1400 1464 1784 1912 1050 1052 1064 1090 +hsync +vsync
-
-# 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz
-Modeline "1920x1440" 341.35 1920 2072 2288 2656 1440 1441 1444 1512 -hsync +vsync
-
-# 2048x1536 @ 60Hz (VESA GTF) hsync: 95.3kHz
-Modeline "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -hsync +vsync
-
-# 2048x1536 @ 75Hz (VESA GTF) hsync: 120.2kHz
-Modeline "2048x1536" 340.48 2048 2216 2440 2832 1536 1537 1540 1603 -hsync +vsync
-
-# 2048x1536 @ 85Hz (VESA GTF) hsync: 137.0kHz
-Modeline "2048x1536" 388.04 2048 2216 2440 2832 1536 1537 1540 1612 -hsync +vsync
-
+//
+// Extra modes to include as default modes in the X server.
+//
+// $XFree86: xc/programs/Xserver/hw/xfree86/etc/extramodes,v 1.5 2002/06/05 19:43:05 dawes Exp $
+//
+
+# 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz
+ModeLine "832x624" 57.284 832 864 928 1152 624 625 628 667 -Hsync -Vsync
+
+# 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz
+ModeLine "1400x1050" 122.0 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync
+
+# 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz
+ModeLine "1400x1050" 155.8 1400 1464 1784 1912 1050 1052 1064 1090 +hsync +vsync
+
+# 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz
+Modeline "1920x1440" 341.35 1920 2072 2288 2656 1440 1441 1444 1512 -hsync +vsync
+
+# 2048x1536 @ 60Hz (VESA GTF) hsync: 95.3kHz
+Modeline "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -hsync +vsync
+
+# 2048x1536 @ 75Hz (VESA GTF) hsync: 120.2kHz
+Modeline "2048x1536" 340.48 2048 2216 2440 2832 1536 1537 1540 1603 -hsync +vsync
+
+# 2048x1536 @ 85Hz (VESA GTF) hsync: 137.0kHz
+Modeline "2048x1536" 388.04 2048 2216 2440 2832 1536 1537 1540 1612 -hsync +vsync
+
diff --git a/xorg-server/hw/xfree86/common/modeline2c.awk b/xorg-server/hw/xfree86/common/modeline2c.awk
index a85d36c58..038e7e935 100644
--- a/xorg-server/hw/xfree86/common/modeline2c.awk
+++ b/xorg-server/hw/xfree86/common/modeline2c.awk
@@ -1,93 +1,93 @@
-#!/usr/bin/awk -f
-#
-# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
-# All rights reserved.
-#
-# Based on Perl script by Dirk Hohndel.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# Usage: modeline2c.awk < modefile > xf86DefModeSet.c
-#
-
-BEGIN {
- flagsdict[""] = "0"
-
- flagsdict["+hsync +vsync"] = "V_PHSYNC | V_PVSYNC"
- flagsdict["+hsync -vsync"] = "V_PHSYNC | V_NVSYNC"
- flagsdict["-hsync +vsync"] = "V_NHSYNC | V_PVSYNC"
- flagsdict["-hsync -vsync"] = "V_NHSYNC | V_NVSYNC"
- flagsdict["+hsync +vsync interlace"] = "V_PHSYNC | V_PVSYNC | V_INTERLACE"
- flagsdict["+hsync -vsync interlace"] = "V_PHSYNC | V_NVSYNC | V_INTERLACE"
- flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE"
- flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE"
-
- print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at"
- print " * modeline2c.awk */"
- print ""
- print "/*"
- print " * Author: Joerg Sonnenberger <joerg@NetBSD.org>"
- print " * Based on Perl script from Dirk Hohndel <hohndel@XFree86.Org>"
- print " */"
- print ""
- print "#ifdef HAVE_XORG_CONFIG_H"
- print "#include <xorg-config.h>"
- print "#endif"
- print ""
- print "#include \"xf86.h\""
- print "#include \"xf86Config.h\""
- print "#include \"xf86Priv.h\""
- print "#include \"xf86_OSlib.h\""
- print ""
- print "#include \"globals.h\""
- print ""
- print "#define MODEPREFIX NULL, NULL, NULL, MODE_OK, M_T_DEFAULT"
- print "#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0"
- print ""
- print "const DisplayModeRec xf86DefaultModes [] = {"
-
- modeline = "\t{MODEPREFIX,%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n"
- modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+"
-}
-
-/^[mM][oO][dD][eE][lL][iI][nN][eE]/ {
- flags = $0
- gsub(modeline_data, "", flags)
- flags = tolower(flags)
- printf(modeline, $3 * 1000, $4, $5, $6, $7,
- $8, $9, $10, $11, flagsdict[flags])
- # Half-width double scanned modes
- printf(modeline, $3 * 500, $4/2, $5/2, $6/2, $7/2,
- $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN")
-}
-
-/^#/ {
- print "/*" substr($0, 2) " */"
-}
-
-END {
- print "};"
- printf "const int xf86NumDefaultModes = sizeof(xf86DefaultModes) / sizeof(DisplayModeRec);"
-}
+#!/usr/bin/awk -f
+#
+# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
+# All rights reserved.
+#
+# Based on Perl script by Dirk Hohndel.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# Usage: modeline2c.awk < modefile > xf86DefModeSet.c
+#
+
+BEGIN {
+ flagsdict[""] = "0"
+
+ flagsdict["+hsync +vsync"] = "V_PHSYNC | V_PVSYNC"
+ flagsdict["+hsync -vsync"] = "V_PHSYNC | V_NVSYNC"
+ flagsdict["-hsync +vsync"] = "V_NHSYNC | V_PVSYNC"
+ flagsdict["-hsync -vsync"] = "V_NHSYNC | V_NVSYNC"
+ flagsdict["+hsync +vsync interlace"] = "V_PHSYNC | V_PVSYNC | V_INTERLACE"
+ flagsdict["+hsync -vsync interlace"] = "V_PHSYNC | V_NVSYNC | V_INTERLACE"
+ flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE"
+ flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE"
+
+ print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at"
+ print " * modeline2c.awk */"
+ print ""
+ print "/*"
+ print " * Author: Joerg Sonnenberger <joerg@NetBSD.org>"
+ print " * Based on Perl script from Dirk Hohndel <hohndel@XFree86.Org>"
+ print " */"
+ print ""
+ print "#ifdef HAVE_XORG_CONFIG_H"
+ print "#include <xorg-config.h>"
+ print "#endif"
+ print ""
+ print "#include \"xf86.h\""
+ print "#include \"xf86Config.h\""
+ print "#include \"xf86Priv.h\""
+ print "#include \"xf86_OSlib.h\""
+ print ""
+ print "#include \"globals.h\""
+ print ""
+ print "#define MODEPREFIX NULL, NULL, NULL, MODE_OK, M_T_DEFAULT"
+ print "#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0"
+ print ""
+ print "const DisplayModeRec xf86DefaultModes [] = {"
+
+ modeline = "\t{MODEPREFIX,%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n"
+ modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+"
+}
+
+/^[mM][oO][dD][eE][lL][iI][nN][eE]/ {
+ flags = $0
+ gsub(modeline_data, "", flags)
+ flags = tolower(flags)
+ printf(modeline, $3 * 1000, $4, $5, $6, $7,
+ $8, $9, $10, $11, flagsdict[flags])
+ # Half-width double scanned modes
+ printf(modeline, $3 * 500, $4/2, $5/2, $6/2, $7/2,
+ $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN")
+}
+
+/^#/ {
+ print "/*" substr($0, 2) " */"
+}
+
+END {
+ print "};"
+ printf "const int xf86NumDefaultModes = sizeof(xf86DefaultModes) / sizeof(DisplayModeRec);"
+}
diff --git a/xorg-server/hw/xfree86/common/vesamodes b/xorg-server/hw/xfree86/common/vesamodes
index 6644ee6ae..2bc886276 100644
--- a/xorg-server/hw/xfree86/common/vesamodes
+++ b/xorg-server/hw/xfree86/common/vesamodes
@@ -1,111 +1,111 @@
-//
-// Default modes distilled from
-// "VESA and Industry Standards and Guide for Computer Display Monitor
-// Timing", version 1.0, revision 0.8, adopted September 17, 1998.
-//
-// $XFree86: xc/programs/Xserver/hw/xfree86/etc/vesamodes,v 1.3 1999/11/16 03:28:03 tsi Exp $
-
-
-# 640x350 @ 85Hz (VESA) hsync: 37.9kHz
-ModeLine "640x350" 31.5 640 672 736 832 350 382 385 445 +hsync -vsync
-
-# 640x400 @ 85Hz (VESA) hsync: 37.9kHz
-ModeLine "640x400" 31.5 640 672 736 832 400 401 404 445 -hsync +vsync
-
-# 720x400 @ 85Hz (VESA) hsync: 37.9kHz
-ModeLine "720x400" 35.5 720 756 828 936 400 401 404 446 -hsync +vsync
-
-# 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz
-ModeLine "640x480" 25.175 640 656 752 800 480 490 492 525 -hsync -vsync
-
-# 640x480 @ 72Hz (VESA) hsync: 37.9kHz
-ModeLine "640x480" 31.5 640 664 704 832 480 489 492 520 -hsync -vsync
-
-# 640x480 @ 75Hz (VESA) hsync: 37.5kHz
-ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
-
-# 640x480 @ 85Hz (VESA) hsync: 43.3kHz
-ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
-
-# 800x600 @ 56Hz (VESA) hsync: 35.2kHz
-ModeLine "800x600" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
-
-# 800x600 @ 60Hz (VESA) hsync: 37.9kHz
-ModeLine "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
-
-# 800x600 @ 72Hz (VESA) hsync: 48.1kHz
-ModeLine "800x600" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
-
-# 800x600 @ 75Hz (VESA) hsync: 46.9kHz
-ModeLine "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
-
-# 800x600 @ 85Hz (VESA) hsync: 53.7kHz
-ModeLine "800x600" 56.3 800 832 896 1048 600 601 604 631 +hsync +vsync
-
-# 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz
-ModeLine "1024x768" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync Interlace
-
-# 1024x768 @ 60Hz (VESA) hsync: 48.4kHz
-ModeLine "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
-
-# 1024x768 @ 70Hz (VESA) hsync: 56.5kHz
-ModeLine "1024x768" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
-
-# 1024x768 @ 75Hz (VESA) hsync: 60.0kHz
-ModeLine "1024x768" 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
-
-# 1024x768 @ 85Hz (VESA) hsync: 68.7kHz
-ModeLine "1024x768" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync +vsync
-
-# 1152x864 @ 75Hz (VESA) hsync: 67.5kHz
-ModeLine "1152x864" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync
-
-# 1280x960 @ 60Hz (VESA) hsync: 60.0kHz
-ModeLine "1280x960" 108.0 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync
-
-# 1280x960 @ 85Hz (VESA) hsync: 85.9kHz
-ModeLine "1280x960" 148.5 1280 1344 1504 1728 960 961 964 1011 +hsync +vsync
-
-# 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz
-ModeLine "1280x1024" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
-
-# 1280x1024 @ 75Hz (VESA) hsync: 80.0kHz
-ModeLine "1280x1024" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
-
-# 1280x1024 @ 85Hz (VESA) hsync: 91.1kHz
-ModeLine "1280x1024" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +hsync +vsync
-
-# 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz
-ModeLine "1600x1200" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz
-ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1600x1200 @ 70Hz (VESA) hsync: 87.5kHz
-ModeLine "1600x1200" 189.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1600x1200 @ 75Hz (VESA) hsync: 93.8kHz
-ModeLine "1600x1200" 202.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1600x1200 @ 85Hz (VESA) hsync: 106.3kHz
-ModeLine "1600x1200" 229.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz
-ModeLine "1792x1344" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync
-
-# 1792x1344 @ 75Hz (VESA) hsync: 106.3kHz
-ModeLine "1792x1344" 261.0 1792 1888 2104 2456 1344 1345 1348 1417 -hsync +vsync
-
-# 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz
-ModeLine "1856x1392" 218.3 1856 1952 2176 2528 1392 1393 1396 1439 -hsync +vsync
-
-# 1856x1392 @ 75Hz (VESA) hsync: 112.5kHz
-ModeLine "1856x1392" 288.0 1856 1984 2208 2560 1392 1393 1396 1500 -hsync +vsync
-
-# 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz
-ModeLine "1920x1440" 234.0 1920 2048 2256 2600 1440 1441 1444 1500 -hsync +vsync
-
-# 1920x1440 @ 75Hz (VESA) hsync: 112.5kHz
-ModeLine "1920x1440" 297.0 1920 2064 2288 2640 1440 1441 1444 1500 -hsync +vsync
-
-
+//
+// Default modes distilled from
+// "VESA and Industry Standards and Guide for Computer Display Monitor
+// Timing", version 1.0, revision 0.8, adopted September 17, 1998.
+//
+// $XFree86: xc/programs/Xserver/hw/xfree86/etc/vesamodes,v 1.3 1999/11/16 03:28:03 tsi Exp $
+
+
+# 640x350 @ 85Hz (VESA) hsync: 37.9kHz
+ModeLine "640x350" 31.5 640 672 736 832 350 382 385 445 +hsync -vsync
+
+# 640x400 @ 85Hz (VESA) hsync: 37.9kHz
+ModeLine "640x400" 31.5 640 672 736 832 400 401 404 445 -hsync +vsync
+
+# 720x400 @ 85Hz (VESA) hsync: 37.9kHz
+ModeLine "720x400" 35.5 720 756 828 936 400 401 404 446 -hsync +vsync
+
+# 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz
+ModeLine "640x480" 25.175 640 656 752 800 480 490 492 525 -hsync -vsync
+
+# 640x480 @ 72Hz (VESA) hsync: 37.9kHz
+ModeLine "640x480" 31.5 640 664 704 832 480 489 492 520 -hsync -vsync
+
+# 640x480 @ 75Hz (VESA) hsync: 37.5kHz
+ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
+
+# 640x480 @ 85Hz (VESA) hsync: 43.3kHz
+ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
+
+# 800x600 @ 56Hz (VESA) hsync: 35.2kHz
+ModeLine "800x600" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
+
+# 800x600 @ 60Hz (VESA) hsync: 37.9kHz
+ModeLine "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
+
+# 800x600 @ 72Hz (VESA) hsync: 48.1kHz
+ModeLine "800x600" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
+
+# 800x600 @ 75Hz (VESA) hsync: 46.9kHz
+ModeLine "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
+
+# 800x600 @ 85Hz (VESA) hsync: 53.7kHz
+ModeLine "800x600" 56.3 800 832 896 1048 600 601 604 631 +hsync +vsync
+
+# 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz
+ModeLine "1024x768" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync Interlace
+
+# 1024x768 @ 60Hz (VESA) hsync: 48.4kHz
+ModeLine "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
+
+# 1024x768 @ 70Hz (VESA) hsync: 56.5kHz
+ModeLine "1024x768" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
+
+# 1024x768 @ 75Hz (VESA) hsync: 60.0kHz
+ModeLine "1024x768" 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
+
+# 1024x768 @ 85Hz (VESA) hsync: 68.7kHz
+ModeLine "1024x768" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync +vsync
+
+# 1152x864 @ 75Hz (VESA) hsync: 67.5kHz
+ModeLine "1152x864" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync
+
+# 1280x960 @ 60Hz (VESA) hsync: 60.0kHz
+ModeLine "1280x960" 108.0 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync
+
+# 1280x960 @ 85Hz (VESA) hsync: 85.9kHz
+ModeLine "1280x960" 148.5 1280 1344 1504 1728 960 961 964 1011 +hsync +vsync
+
+# 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz
+ModeLine "1280x1024" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
+
+# 1280x1024 @ 75Hz (VESA) hsync: 80.0kHz
+ModeLine "1280x1024" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
+
+# 1280x1024 @ 85Hz (VESA) hsync: 91.1kHz
+ModeLine "1280x1024" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +hsync +vsync
+
+# 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz
+ModeLine "1600x1200" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz
+ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1600x1200 @ 70Hz (VESA) hsync: 87.5kHz
+ModeLine "1600x1200" 189.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1600x1200 @ 75Hz (VESA) hsync: 93.8kHz
+ModeLine "1600x1200" 202.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1600x1200 @ 85Hz (VESA) hsync: 106.3kHz
+ModeLine "1600x1200" 229.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz
+ModeLine "1792x1344" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync
+
+# 1792x1344 @ 75Hz (VESA) hsync: 106.3kHz
+ModeLine "1792x1344" 261.0 1792 1888 2104 2456 1344 1345 1348 1417 -hsync +vsync
+
+# 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz
+ModeLine "1856x1392" 218.3 1856 1952 2176 2528 1392 1393 1396 1439 -hsync +vsync
+
+# 1856x1392 @ 75Hz (VESA) hsync: 112.5kHz
+ModeLine "1856x1392" 288.0 1856 1984 2208 2560 1392 1393 1396 1500 -hsync +vsync
+
+# 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz
+ModeLine "1920x1440" 234.0 1920 2048 2256 2600 1440 1441 1444 1500 -hsync +vsync
+
+# 1920x1440 @ 75Hz (VESA) hsync: 112.5kHz
+ModeLine "1920x1440" 297.0 1920 2064 2288 2640 1440 1441 1444 1500 -hsync +vsync
+
+
diff --git a/xorg-server/hw/xfree86/common/xf86Build.h.in b/xorg-server/hw/xfree86/common/xf86Build.h.in
index f4af80637..a4f56b0ae 100644
--- a/xorg-server/hw/xfree86/common/xf86Build.h.in
+++ b/xorg-server/hw/xfree86/common/xf86Build.h.in
@@ -1,2 +1,2 @@
-#define BUILD_DATE @BUILD_DATE@
-#define BUILD_TIME @BUILD_TIME@
+#define BUILD_DATE @BUILD_DATE@
+#define BUILD_TIME @BUILD_TIME@
diff --git a/xorg-server/hw/xfree86/ddc/DDC.HOWTO b/xorg-server/hw/xfree86/ddc/DDC.HOWTO
index 54fbe73ad..1d06ca124 100644
--- a/xorg-server/hw/xfree86/ddc/DDC.HOWTO
+++ b/xorg-server/hw/xfree86/ddc/DDC.HOWTO
@@ -1,97 +1,97 @@
- DDC.HOWTO
-
- This file describes how to add DDC support to a chipset driver.
-
-1) DDC INITIALIZATION
-
- When implementing DDC in the driver one has the choice between
- DDC1 and DDC2.
- DDC1 data is continuously transmitted by a DDC1 capable display
- device. The data is send serially over a data line; the Vsync
- signal serves as clock. Only one EDID 1.x data block can be
- transmitted using DDC1. Since transmission of an EDID1 block
- using a regular Vsync frequency would take up several seconds
- the driver can increase the Vsync frequency to up to 25 kHz as
- soon as it detects DDC1 activity on the data line.
- DDC2 data is transmitted using the I2C protocol. This requires
- an additional clock line. DDC2 is capable of transmitting EDID1
- and EDID2 block as well as a VDIF block on display devices that
- support these.
- Display devices switch into the DDC2 mode as soon as they detect
- activity on the DDC clock line. Once the are in DDC2 mode they
- stop transmitting DDC1 signals until the next power cycle.
-
- Some graphics chipset configurations which are not capable of
- DDC2 might still be able to read DDC1 data. Where available
- DDC2 it is preferable.
-
- All relevant prototypes and defines are in xf86DDC.h.
- DDC2 additionally requires I2C support. The I2C prototypes
- are in xf86i2c.h.
-
- DDC1 Support:
-
- The driver has to provide a read function which waits for the
- end of the next Vsync signal and reads in and returns the status
- of the DDC line:
-
- unsigned int XXX_ddc1Read(ScrnInfoPtr pScrn)
-
- Additionally a function is required to increase the Vsync
- frequency to max. 25 kHz.
-
- void XXX_ddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed)
-
- If the speed argument is DDC_FAST the function should increase
- the Vsync frequency on DDC_SLOW it should restore the original
- value. For convenience a generic ddc1SetSpeed() function is provided
- in the vga module for VGA-like chipsets.
-
- void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, sf86ddcSpeed speed).
-
- To read out the DDC1 data the driver should call
-
- xf86MonPtr xf86DoEDID_DDC1(int scrnIndex,
- void (*DDC1SetSpeed)(ScrnInfoPtr, xf86ddcSpeed),
- unsigned int (*DDC1Read)(ScrnInfoPtr))
-
- in PreInit(). DDC1SetSpeed is a pointer to the SetSpeed()
- function, DDC1Read has to point to the DDC1 read function.
- The function will return a pointer to the xf86Monitor structure
- which contains all information retrieved by DDC.
- NULL will be returned on failure.
-
- DDC2 Support
-
- To read out DDC2 information I2C has to be initialized first.
- (See documentation for the i2c module).
- The function
-
- xf86MonPtr xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
-
- is provided to read out and process DDC2 data. A pointer
- to the I2CBusRec of the appropriate I2C Bus has to be passed
- as the second argument.
- The function will return a pointer to the xf86Monitor structure
- which contains all information retrieved by DDC.
- NULL will be returned on failure.
-
- Printing monitor parameters
-
- To print out the information contained in the xf86Monitor
- structure the function
-
- xf86MonPtr xf86PrintEDID(xf86MonPtr monitor)
-
- is provided.
-
- Further processing of the xf86Monitor structure is not yet
- implemented. However, it is planned to use the information
- about video modes, gamma values etc.
- Therefore it is strongly recommended to read out DDC data
- before any video mode processing is done.
-
-
-
-
-$XFree86: xc/programs/Xserver/hw/xfree86/ddc/DDC.HOWTO,v 1.2 1998/12/06 13:30:39 dawes Exp $
+ DDC.HOWTO
+
+ This file describes how to add DDC support to a chipset driver.
+
+1) DDC INITIALIZATION
+
+ When implementing DDC in the driver one has the choice between
+ DDC1 and DDC2.
+ DDC1 data is continuously transmitted by a DDC1 capable display
+ device. The data is send serially over a data line; the Vsync
+ signal serves as clock. Only one EDID 1.x data block can be
+ transmitted using DDC1. Since transmission of an EDID1 block
+ using a regular Vsync frequency would take up several seconds
+ the driver can increase the Vsync frequency to up to 25 kHz as
+ soon as it detects DDC1 activity on the data line.
+ DDC2 data is transmitted using the I2C protocol. This requires
+ an additional clock line. DDC2 is capable of transmitting EDID1
+ and EDID2 block as well as a VDIF block on display devices that
+ support these.
+ Display devices switch into the DDC2 mode as soon as they detect
+ activity on the DDC clock line. Once the are in DDC2 mode they
+ stop transmitting DDC1 signals until the next power cycle.
+
+ Some graphics chipset configurations which are not capable of
+ DDC2 might still be able to read DDC1 data. Where available
+ DDC2 it is preferable.
+
+ All relevant prototypes and defines are in xf86DDC.h.
+ DDC2 additionally requires I2C support. The I2C prototypes
+ are in xf86i2c.h.
+
+ DDC1 Support:
+
+ The driver has to provide a read function which waits for the
+ end of the next Vsync signal and reads in and returns the status
+ of the DDC line:
+
+ unsigned int XXX_ddc1Read(ScrnInfoPtr pScrn)
+
+ Additionally a function is required to increase the Vsync
+ frequency to max. 25 kHz.
+
+ void XXX_ddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed)
+
+ If the speed argument is DDC_FAST the function should increase
+ the Vsync frequency on DDC_SLOW it should restore the original
+ value. For convenience a generic ddc1SetSpeed() function is provided
+ in the vga module for VGA-like chipsets.
+
+ void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, sf86ddcSpeed speed).
+
+ To read out the DDC1 data the driver should call
+
+ xf86MonPtr xf86DoEDID_DDC1(int scrnIndex,
+ void (*DDC1SetSpeed)(ScrnInfoPtr, xf86ddcSpeed),
+ unsigned int (*DDC1Read)(ScrnInfoPtr))
+
+ in PreInit(). DDC1SetSpeed is a pointer to the SetSpeed()
+ function, DDC1Read has to point to the DDC1 read function.
+ The function will return a pointer to the xf86Monitor structure
+ which contains all information retrieved by DDC.
+ NULL will be returned on failure.
+
+ DDC2 Support
+
+ To read out DDC2 information I2C has to be initialized first.
+ (See documentation for the i2c module).
+ The function
+
+ xf86MonPtr xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
+
+ is provided to read out and process DDC2 data. A pointer
+ to the I2CBusRec of the appropriate I2C Bus has to be passed
+ as the second argument.
+ The function will return a pointer to the xf86Monitor structure
+ which contains all information retrieved by DDC.
+ NULL will be returned on failure.
+
+ Printing monitor parameters
+
+ To print out the information contained in the xf86Monitor
+ structure the function
+
+ xf86MonPtr xf86PrintEDID(xf86MonPtr monitor)
+
+ is provided.
+
+ Further processing of the xf86Monitor structure is not yet
+ implemented. However, it is planned to use the information
+ about video modes, gamma values etc.
+ Therefore it is strongly recommended to read out DDC data
+ before any video mode processing is done.
+
+
+
+
+$XFree86: xc/programs/Xserver/hw/xfree86/ddc/DDC.HOWTO,v 1.2 1998/12/06 13:30:39 dawes Exp $
diff --git a/xorg-server/hw/xfree86/ddc/Makefile.am b/xorg-server/hw/xfree86/ddc/Makefile.am
index 0db5d833f..93ea4a2a5 100644
--- a/xorg-server/hw/xfree86/ddc/Makefile.am
+++ b/xorg-server/hw/xfree86/ddc/Makefile.am
@@ -1,11 +1,11 @@
-sdk_HEADERS = edid.h xf86DDC.h
-
-noinst_LTLIBRARIES = libddc.la
-
-libddc_la_SOURCES = ddc.c interpret_edid.c print_edid.c ddcProperty.c
-
-INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
-
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-
-EXTRA_DIST = DDC.HOWTO
+sdk_HEADERS = edid.h xf86DDC.h
+
+noinst_LTLIBRARIES = libddc.la
+
+libddc_la_SOURCES = ddc.c interpret_edid.c print_edid.c ddcProperty.c
+
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
+
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+
+EXTRA_DIST = DDC.HOWTO
diff --git a/xorg-server/hw/xfree86/fbdevhw/README b/xorg-server/hw/xfree86/fbdevhw/README
index 65ca06033..27cc337d4 100644
--- a/xorg-server/hw/xfree86/fbdevhw/README
+++ b/xorg-server/hw/xfree86/fbdevhw/README
@@ -1,16 +1,16 @@
-
-This is a submodule to access linux framebuffer devices.
-It is supported to work as helper module (like vgahw)
-for the chipset drivers. There are functions for
-saving/restoring/setting video modes, set palette entries,
-and a few more helper functions. Some of them can be
-hooked directly into ScrnInfoRec.
-
-In ../drivers/fbdev is a "chipset" driver. It is a simple,
-non-accelerated and hardware-independent driver which works
-on top of this fbdevhw submodule.
-
- Gerd
-
---
-Gerd Knorr <kraxel@goldbach.in-berlin.de>
+
+This is a submodule to access linux framebuffer devices.
+It is supported to work as helper module (like vgahw)
+for the chipset drivers. There are functions for
+saving/restoring/setting video modes, set palette entries,
+and a few more helper functions. Some of them can be
+hooked directly into ScrnInfoRec.
+
+In ../drivers/fbdev is a "chipset" driver. It is a simple,
+non-accelerated and hardware-independent driver which works
+on top of this fbdevhw submodule.
+
+ Gerd
+
+--
+Gerd Knorr <kraxel@goldbach.in-berlin.de>
diff --git a/xorg-server/hw/xfree86/i2c/i2c_def.h b/xorg-server/hw/xfree86/i2c/i2c_def.h
index e6a4e039e..140a071d6 100644
--- a/xorg-server/hw/xfree86/i2c/i2c_def.h
+++ b/xorg-server/hw/xfree86/i2c/i2c_def.h
@@ -1,6 +1,6 @@
-#ifndef __I2C_DEF_H__
-#define __I2C_DEF_H__
-
-#include "xf86i2c.h"
-
-#endif
+#ifndef __I2C_DEF_H__
+#define __I2C_DEF_H__
+
+#include "xf86i2c.h"
+
+#endif
diff --git a/xorg-server/hw/xfree86/int10/INT10.HOWTO b/xorg-server/hw/xfree86/int10/INT10.HOWTO
index f2f08ceec..e2154c1c3 100644
--- a/xorg-server/hw/xfree86/int10/INT10.HOWTO
+++ b/xorg-server/hw/xfree86/int10/INT10.HOWTO
@@ -1,344 +1,344 @@
-
- INT10 X86 Real Mode executor
- =============================
-
- PRELIMINARY
-
-INT10 is a XFree86 module for soft-booting and executing real mode
-int10 BIOS calls. The BIOS call code is largely untested, yet.
-
-1. Usage
-========
-
-To use the int10 module in a driver the header file
-xfree86/os-support/int10/xf86int10.h must be included.
-
- a. Initialization
- -----------------
-
-The int10-executer gets initialized by calling:
-
- xf86Int10InfoPtr xf86InitInt10(int entityIndex);
-
-The function will soft-boot any non-primary device and return a
-pointer to a xf86Int10InfoRec on success. If anything fails or if
-int10 execution is disabled by an option in the device section NULL
-will be returned. The driver should store this pointer for later
-calls to other int10 module functions.
-
- b. Memory allocation
- --------------------
-
-To allocate memory in the real mode execution environment
-
- void * xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off);
-
-can be called. It allocates num consecutive pagesize chunks. It
-returns the address of the allocated area. off is set to its offset in
-the real mode memory space.
-
- void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num);
-
-Is used to free num pages beginning at pbase.
-
- c. Doing int10 BIOS calls
- -------------------------
-
-The BIOS call is executed by calling:
-
- void xf86ExecX86int10(xf86Int10InfoPtr pInt);
-
-The number of the interrupt (normally 10) and the initial values of
-the ax, bx, cx, dx, si, di and es x86-CPU registers can be set in the
-xf86Int10InfoRec passed to the function. On return this structure
-contains the exit values of the registers listed above and the CPU
-flag register.
-
- d. De-initializing
- -----------------
-
-If no further int10 calls are required for a certain chipset
-the driver should call:
-
- void xf86FreeInt10(xf86Int10InfoPtr pInt);
-
-to free the memory allocated for real mode int10 calls.
-
-
-2. Porting issues
-=================
-
-The int10 real mode executor is designed to run on top of various x86
-CPU emulators as well as in vm86 mode of a real x86 CPU. If used with
-a CPU emulator the emulator and CPU specific interfaces can be held
-separate thus requiring minimal efforts to port the int10 module to
-new platforms. Currently an interface to the x86emu real mode
-emulator is provided. Since details of setting up and running the
-vm86 mode is platform dependent both the platform dependent
-environment and the emulation layer have to be ported. Several helper
-functions are provided for that.
-
-A CPU emulator should meet certain requirements to be usable
-for the INT10 executor:
-
-1. It must trap calls to intXX instructions and pass execution to an
- external function which is allowed to modify CPU registers
- including the instruction pointer (IP) before returning to the
- emulator for continuing execution. When the external function is
- called the IP must point to the instruction past the intXX call.
-
-2. The emulator should use externally provided functions to handle
- PIO.
-
-3. The emulator should be able to use externally provided functions
- to access memory from the real mode memory environment. Note, that
- the vm86 mode usually requires one hunk of consecutive memory
- starting at address 0 in the process virtual memory space. Thus if
- this mode is to be used, the OS environment has to be able to provide
- that, ie. it must be able to remap the processes virtual memory space
- onto itself. If the emulator is able to handle memory access thru
- externally provided functions the real mode process memory can be
- located anywhere in the processes virtual memory. It does not even
- have to be consecutive.
-
-4. The executor should terminate on encountering a 'hlt' instruction.
-
-
-Functions to implement:
-
-To simplify development the code has been split into a general setup
-part and an emulator specific one. A generic setup code is provided in
-generic.c. It should be usable with any emulator satisfying the
-conditions mentioned above. Therefore the following section on int10
-setup may be skipped when porting int10 to new emulator.
-
-If the vm86() is to be used no memory access functions can be used.
-Therefore the layout of the real mode memory image has to meet certain
-requirements. Therefore when porting to other platforms a new setup
-code may have to be designed, too. The following section will give
-guidelines how this may be done. A sample implementation using SysV
-IPC to map the appropriate real mode memory image to address 0 in
-virtual address space just prior to execution may be found in
-xfree86/os-support/linux/int10/linux.c.
-
-On non-PC like platforms emulation of certain PC features such as
-initialization of BIOS int vectors, sys_BIOS constants or PCI config
-method 1 can be turned on by defining _PC.
-
-I. Setup Code
--------------
-
-This sets up the real mode memory image, calls the emulator to POST
-the chipset if required and maintains memory allocations in real mode
-address space.
-
-1. xf86Int10InfoPtr xf86InitInt10(int entityIndex);
-
-This function should first find the screen assigned to the entity
-carrying entitiyIndex and then call
-
- Bool int10skip(ScrnInfoPtr pScrn)
-
-to find out if the user has requested not to initialize int10. If so
-xf86InitInt10() should return NULL. Otherwise an xf86Int10InfoRec
-should be allocated. This structure contains the following fields:
-
- a. int entityIndex - index of the entity whose BIOS is to be
- executed.
- b. int scrnIndex - index of the screen assigned the entity.
- c. pointer cpuRegs - pointer to a emulator/vm86-mode private
- structure. May hold cpu register values
- for the emulator.
- d. CARD16 BIOSseg - Video BIOS segment address.
- e. pointer private - pointer to a os specific data structure.
- f. struct _int10Mem* - pointer to a structure to hold the memory
- access functions for use by an emulator.
- g. int num - number of the int to be called.
- h. int ax..es,flags - CPU register values to pass to int-call.
-
-The Init function should initialize a-f. To initialize the emulator
-specific execute environment the function
-
- Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt)
-
-should be called. If this function returns FALSE any already allocated
-memory should be freed and xf86Int10Init(0 should exit returning NULL.
-
-If the platform has a PC like system BIOS it may be copied to or
-mapped into memory locations SYS_BIOS to SYS_SIZE-1 of the real mode
-memory environment of this process. Otherwise the helper function:
-
-int setup_system_bios(CARD32 base_addr);
-
-may be called to set up a rudimentary system BIOS sufficient to be
-used to boot video BIOSes. base_addr specifies the virtual address
-corresponding to SYS_BIOS in the real mode environment. If a PC-like
-int vector and BIOS data area is available it should be copied to 0 to
-LOW_PAGE_SIZE of the entities real mode environment. In this case the
-video interrupt related entries should be reset for all non-primary
-cards by calling:
-
-void reset_int_vect(xf86Int10InfoPtr pInt); To initialize the
-
-correct video BIOS entry points the BIOS must be warm-booted. If no
-PC-like int vector is available one can be set up by calling
-
-void setup_int_vect(xf86Int10InfoPtr pInt);
-
-In this case the video BIOS has to be warm-booted always. If the
-video BIOS for this entity has been installed during boot it may be
-mapped (or copied) directly to the correct address in the real mode
-memory environment. Otherwise
-
-int mapPciRom(xf86Int10InfoPtr pInt, unsigned char * address);
-
-should be called to copy the BIOS image from PCI ROM. 'address'
-specifies the address this image should be copied to. Sufficient space
-to hold an entire BIOS image should be allocated prior to calling
-mapPciRom(). This function will return the size of the BIOS image in
-bytes if it was able to successfully copy the image and 0
-otherwise. To create a well defined point to exit the softbooter
-
-void set_return_trap(xf86Int10Ptr pInt);
-
-may be called. It sets up a 'hlt' instruction in the emulator memory
-just above the BIOS variable area. Before entering real mode execution
-this address will be pushed onto the return stack. If the BIOS needs
-to be warm-booted this should be done before leaving xf86InitInt10()
-by setting num in the xf86Int10InfoRec to 0xe6 and calling
-
-void xf86ExecX86int10(xf86Int10IfoPtr pInt);
-
-The implementation of this function will be discussed below. This
-function should be wrapped by calls to void LockLegacyVGA(screen,
-legacyVGAPtr vga); and void UnlockLegacyVGA(screen, legacyVGAPtr vga);
-The struct vga is used to hold the state of the legacy VGA access
-registers if a legacy VGA device exists. xf86InitInt10() should
-return a pointer to the xf86Int10InfoRec allocated.
-
-2. Bool MapCurrentInt10(xf86Int10InfoPtr pInt);
-
-In case a platform specific mapping has to be performed to map the
-memory allocated for the real mode memory environment into a specific
-location prior to executing the x86 real mode code a function
-
- Bool MapCurrentInt10(xf86Int10InfoPtr pInt);
-
-has to be provided. It will be called by a helper function whenever
-the active entity changes. If the vm86 mode is used it is most likely
-that the 1MB real mode memory space located somewhere in the processes
-virtual memory will have to be remapped to address 0 of the virtual
-memory space.
-
-3. void xf86FreeInt10(xf86Int10InfoPtr pInt);
-
-To free all memory allocated for video BIOS calls of a specific entity
-the function
-
- void xf86FreeInt10(xf86Int10InfoPtr pInt);
-
-should be provided. If the entity to be freed was mapped by
-MapCurrentInt10() this mapping needs to be undone also.
-
-4.
- void * xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off)
- void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num)
-
-xf86Int10AllocPages() should allocate 'num' consecutive page-size
-chunks of memory. In real mode memory space this range needs to occupy
-consecutive addresses, too. The function must return the address of
-this memory. The offset in real mode memory needs to be returned in
-'off'. If no block of 'num' pages are available the function should
-return NULL.
-
-xf86Int10FreePages() will free the 'num' pages starting at 'pbase'.
-'num' is equal to the number of pages allocated by a single
-xf86Int10AllocatePages() call. 'pbase' is the address of the range
-previously returned by xf86Int10AllocatePages().
-
-II. Emulator specific functions
--------------------------------
-
-1. Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt);
-
-This function will be called from xf86InitInt10(). It may be used to
-set up the static emulator specific part of the real mode
-environment. On success it should return TRUE.
-
-2. xf86ExecX86int10(xf86Int10InfoPtr pInt);
-
-This function gets called to execute an int call. It may call the
-helper function:
-
- void setup_int(xf86Int10InfoPrt pInt);
-
-to copy the register values to the emulator specific locations and to
-set up the non-static real mode execution environment. On return from
-setup_int() 'Int10Current' holds a pointer to the current
-xf86Int10InfoRec.
-
-It should start execution by calling
-
- Bool int_handler(xf86Int10InfoPtr pInt);
-
-and if this function returns TRUE it should call whatever necessary to
-continue execution until a 'hlt' instruction is encountered. To copy
-the resulting register values back to the xf86Int10InfoRec structure
-
- void finish_int(xf86Int10InfoPtr pInt);
-
-should be called.
-
-Helper functions are provided to aid the implementation of a vm86
-call:
-
- Bool vm86_GP_fault(xf86Int10InfoPtr pInt);
-
-This function handles instructions which cause a vm86 call to
-trap. PIO access is handled by the in/out calls as defined in
-compiler.h. Optionally the PIO instructions can be logged by defining
-PRINT_PORT in xf86int10.h. This is meant for debugging purposes.
-
-Unknown instructions and 'hlt' cause vm86_GP_fault() to return
-FALSE. Otherwise TRUE is returned.
-
-Note: This function is currently based on the Linux vm86 call. It
-might have to be modified or even rewritten for other OS. So your
-milage may vary.
-
-Functions to dump memory, code, xf86 CPU register values and stack are
-also provided. Take a look at helper.c To view a memory range the
-function
-
- void dprint(unsigned long start, unsigned long size)
-
-is provided. The use should be self explanatory.
-
-Register and memory access functions are provided in helper_mem.c.
-The PIO register access functions can trap access to PCI config space
-access register (config method 1) if _PC is not defined.
-
-A header file 'defines.h' is required to define OS/emulator specific
-ways to access memory and xf86 CPU registers: Defines need to be
-provided for memory byte/work/long read/write access
-(MEM_RB(name,addr),MEM_RW(name,addr),MEM_RL(name,addr),
-MEM_WB(name,addr,val),MEM_WL(name,addr,val),MEM_WL(name,addr,val)) of
-the real mode memory environment. 'name' will contain a pointer to the
-current xf86Int10InfoRec. Currently defines are available for
-vm86-mode under Linux and x86emu. They may be activated by defining
-_X86EMU or _VM86_LINUX respectively.
-
-Note: Emulators usually are not able to pass this pointer when calling
-memory access functions. In this case a global variable should be
-defined which can hold this pointer. This variable can be set in
-MapCurrentInt10(). It also must be set in xf86InitInt10() if this
-function calls the memory access functions either directly or by
-calling xf86ExecX86int10(pInt). Defines to access the emulator
-specific xf86 CPU register locations are also required:
-X86_EAX,...,X86_EFLAGS for access of the full 32 bit registers,
-X86_AX...X86_FLAGS for access of the 16 bit registers and
-XF86_AL,XF86_BL,XF86_CL,XF86_DL to access the lower byte of the
-AX,BX,CX and DX register.
-
-
-$XFree86: xc/programs/Xserver/hw/xfree86/int10/INT10.HOWTO,v 1.2 2000/02/08 13:13:22 eich Exp $
+
+ INT10 X86 Real Mode executor
+ =============================
+
+ PRELIMINARY
+
+INT10 is a XFree86 module for soft-booting and executing real mode
+int10 BIOS calls. The BIOS call code is largely untested, yet.
+
+1. Usage
+========
+
+To use the int10 module in a driver the header file
+xfree86/os-support/int10/xf86int10.h must be included.
+
+ a. Initialization
+ -----------------
+
+The int10-executer gets initialized by calling:
+
+ xf86Int10InfoPtr xf86InitInt10(int entityIndex);
+
+The function will soft-boot any non-primary device and return a
+pointer to a xf86Int10InfoRec on success. If anything fails or if
+int10 execution is disabled by an option in the device section NULL
+will be returned. The driver should store this pointer for later
+calls to other int10 module functions.
+
+ b. Memory allocation
+ --------------------
+
+To allocate memory in the real mode execution environment
+
+ void * xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off);
+
+can be called. It allocates num consecutive pagesize chunks. It
+returns the address of the allocated area. off is set to its offset in
+the real mode memory space.
+
+ void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num);
+
+Is used to free num pages beginning at pbase.
+
+ c. Doing int10 BIOS calls
+ -------------------------
+
+The BIOS call is executed by calling:
+
+ void xf86ExecX86int10(xf86Int10InfoPtr pInt);
+
+The number of the interrupt (normally 10) and the initial values of
+the ax, bx, cx, dx, si, di and es x86-CPU registers can be set in the
+xf86Int10InfoRec passed to the function. On return this structure
+contains the exit values of the registers listed above and the CPU
+flag register.
+
+ d. De-initializing
+ -----------------
+
+If no further int10 calls are required for a certain chipset
+the driver should call:
+
+ void xf86FreeInt10(xf86Int10InfoPtr pInt);
+
+to free the memory allocated for real mode int10 calls.
+
+
+2. Porting issues
+=================
+
+The int10 real mode executor is designed to run on top of various x86
+CPU emulators as well as in vm86 mode of a real x86 CPU. If used with
+a CPU emulator the emulator and CPU specific interfaces can be held
+separate thus requiring minimal efforts to port the int10 module to
+new platforms. Currently an interface to the x86emu real mode
+emulator is provided. Since details of setting up and running the
+vm86 mode is platform dependent both the platform dependent
+environment and the emulation layer have to be ported. Several helper
+functions are provided for that.
+
+A CPU emulator should meet certain requirements to be usable
+for the INT10 executor:
+
+1. It must trap calls to intXX instructions and pass execution to an
+ external function which is allowed to modify CPU registers
+ including the instruction pointer (IP) before returning to the
+ emulator for continuing execution. When the external function is
+ called the IP must point to the instruction past the intXX call.
+
+2. The emulator should use externally provided functions to handle
+ PIO.
+
+3. The emulator should be able to use externally provided functions
+ to access memory from the real mode memory environment. Note, that
+ the vm86 mode usually requires one hunk of consecutive memory
+ starting at address 0 in the process virtual memory space. Thus if
+ this mode is to be used, the OS environment has to be able to provide
+ that, ie. it must be able to remap the processes virtual memory space
+ onto itself. If the emulator is able to handle memory access thru
+ externally provided functions the real mode process memory can be
+ located anywhere in the processes virtual memory. It does not even
+ have to be consecutive.
+
+4. The executor should terminate on encountering a 'hlt' instruction.
+
+
+Functions to implement:
+
+To simplify development the code has been split into a general setup
+part and an emulator specific one. A generic setup code is provided in
+generic.c. It should be usable with any emulator satisfying the
+conditions mentioned above. Therefore the following section on int10
+setup may be skipped when porting int10 to new emulator.
+
+If the vm86() is to be used no memory access functions can be used.
+Therefore the layout of the real mode memory image has to meet certain
+requirements. Therefore when porting to other platforms a new setup
+code may have to be designed, too. The following section will give
+guidelines how this may be done. A sample implementation using SysV
+IPC to map the appropriate real mode memory image to address 0 in
+virtual address space just prior to execution may be found in
+xfree86/os-support/linux/int10/linux.c.
+
+On non-PC like platforms emulation of certain PC features such as
+initialization of BIOS int vectors, sys_BIOS constants or PCI config
+method 1 can be turned on by defining _PC.
+
+I. Setup Code
+-------------
+
+This sets up the real mode memory image, calls the emulator to POST
+the chipset if required and maintains memory allocations in real mode
+address space.
+
+1. xf86Int10InfoPtr xf86InitInt10(int entityIndex);
+
+This function should first find the screen assigned to the entity
+carrying entitiyIndex and then call
+
+ Bool int10skip(ScrnInfoPtr pScrn)
+
+to find out if the user has requested not to initialize int10. If so
+xf86InitInt10() should return NULL. Otherwise an xf86Int10InfoRec
+should be allocated. This structure contains the following fields:
+
+ a. int entityIndex - index of the entity whose BIOS is to be
+ executed.
+ b. int scrnIndex - index of the screen assigned the entity.
+ c. pointer cpuRegs - pointer to a emulator/vm86-mode private
+ structure. May hold cpu register values
+ for the emulator.
+ d. CARD16 BIOSseg - Video BIOS segment address.
+ e. pointer private - pointer to a os specific data structure.
+ f. struct _int10Mem* - pointer to a structure to hold the memory
+ access functions for use by an emulator.
+ g. int num - number of the int to be called.
+ h. int ax..es,flags - CPU register values to pass to int-call.
+
+The Init function should initialize a-f. To initialize the emulator
+specific execute environment the function
+
+ Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt)
+
+should be called. If this function returns FALSE any already allocated
+memory should be freed and xf86Int10Init(0 should exit returning NULL.
+
+If the platform has a PC like system BIOS it may be copied to or
+mapped into memory locations SYS_BIOS to SYS_SIZE-1 of the real mode
+memory environment of this process. Otherwise the helper function:
+
+int setup_system_bios(CARD32 base_addr);
+
+may be called to set up a rudimentary system BIOS sufficient to be
+used to boot video BIOSes. base_addr specifies the virtual address
+corresponding to SYS_BIOS in the real mode environment. If a PC-like
+int vector and BIOS data area is available it should be copied to 0 to
+LOW_PAGE_SIZE of the entities real mode environment. In this case the
+video interrupt related entries should be reset for all non-primary
+cards by calling:
+
+void reset_int_vect(xf86Int10InfoPtr pInt); To initialize the
+
+correct video BIOS entry points the BIOS must be warm-booted. If no
+PC-like int vector is available one can be set up by calling
+
+void setup_int_vect(xf86Int10InfoPtr pInt);
+
+In this case the video BIOS has to be warm-booted always. If the
+video BIOS for this entity has been installed during boot it may be
+mapped (or copied) directly to the correct address in the real mode
+memory environment. Otherwise
+
+int mapPciRom(xf86Int10InfoPtr pInt, unsigned char * address);
+
+should be called to copy the BIOS image from PCI ROM. 'address'
+specifies the address this image should be copied to. Sufficient space
+to hold an entire BIOS image should be allocated prior to calling
+mapPciRom(). This function will return the size of the BIOS image in
+bytes if it was able to successfully copy the image and 0
+otherwise. To create a well defined point to exit the softbooter
+
+void set_return_trap(xf86Int10Ptr pInt);
+
+may be called. It sets up a 'hlt' instruction in the emulator memory
+just above the BIOS variable area. Before entering real mode execution
+this address will be pushed onto the return stack. If the BIOS needs
+to be warm-booted this should be done before leaving xf86InitInt10()
+by setting num in the xf86Int10InfoRec to 0xe6 and calling
+
+void xf86ExecX86int10(xf86Int10IfoPtr pInt);
+
+The implementation of this function will be discussed below. This
+function should be wrapped by calls to void LockLegacyVGA(screen,
+legacyVGAPtr vga); and void UnlockLegacyVGA(screen, legacyVGAPtr vga);
+The struct vga is used to hold the state of the legacy VGA access
+registers if a legacy VGA device exists. xf86InitInt10() should
+return a pointer to the xf86Int10InfoRec allocated.
+
+2. Bool MapCurrentInt10(xf86Int10InfoPtr pInt);
+
+In case a platform specific mapping has to be performed to map the
+memory allocated for the real mode memory environment into a specific
+location prior to executing the x86 real mode code a function
+
+ Bool MapCurrentInt10(xf86Int10InfoPtr pInt);
+
+has to be provided. It will be called by a helper function whenever
+the active entity changes. If the vm86 mode is used it is most likely
+that the 1MB real mode memory space located somewhere in the processes
+virtual memory will have to be remapped to address 0 of the virtual
+memory space.
+
+3. void xf86FreeInt10(xf86Int10InfoPtr pInt);
+
+To free all memory allocated for video BIOS calls of a specific entity
+the function
+
+ void xf86FreeInt10(xf86Int10InfoPtr pInt);
+
+should be provided. If the entity to be freed was mapped by
+MapCurrentInt10() this mapping needs to be undone also.
+
+4.
+ void * xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off)
+ void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num)
+
+xf86Int10AllocPages() should allocate 'num' consecutive page-size
+chunks of memory. In real mode memory space this range needs to occupy
+consecutive addresses, too. The function must return the address of
+this memory. The offset in real mode memory needs to be returned in
+'off'. If no block of 'num' pages are available the function should
+return NULL.
+
+xf86Int10FreePages() will free the 'num' pages starting at 'pbase'.
+'num' is equal to the number of pages allocated by a single
+xf86Int10AllocatePages() call. 'pbase' is the address of the range
+previously returned by xf86Int10AllocatePages().
+
+II. Emulator specific functions
+-------------------------------
+
+1. Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt);
+
+This function will be called from xf86InitInt10(). It may be used to
+set up the static emulator specific part of the real mode
+environment. On success it should return TRUE.
+
+2. xf86ExecX86int10(xf86Int10InfoPtr pInt);
+
+This function gets called to execute an int call. It may call the
+helper function:
+
+ void setup_int(xf86Int10InfoPrt pInt);
+
+to copy the register values to the emulator specific locations and to
+set up the non-static real mode execution environment. On return from
+setup_int() 'Int10Current' holds a pointer to the current
+xf86Int10InfoRec.
+
+It should start execution by calling
+
+ Bool int_handler(xf86Int10InfoPtr pInt);
+
+and if this function returns TRUE it should call whatever necessary to
+continue execution until a 'hlt' instruction is encountered. To copy
+the resulting register values back to the xf86Int10InfoRec structure
+
+ void finish_int(xf86Int10InfoPtr pInt);
+
+should be called.
+
+Helper functions are provided to aid the implementation of a vm86
+call:
+
+ Bool vm86_GP_fault(xf86Int10InfoPtr pInt);
+
+This function handles instructions which cause a vm86 call to
+trap. PIO access is handled by the in/out calls as defined in
+compiler.h. Optionally the PIO instructions can be logged by defining
+PRINT_PORT in xf86int10.h. This is meant for debugging purposes.
+
+Unknown instructions and 'hlt' cause vm86_GP_fault() to return
+FALSE. Otherwise TRUE is returned.
+
+Note: This function is currently based on the Linux vm86 call. It
+might have to be modified or even rewritten for other OS. So your
+milage may vary.
+
+Functions to dump memory, code, xf86 CPU register values and stack are
+also provided. Take a look at helper.c To view a memory range the
+function
+
+ void dprint(unsigned long start, unsigned long size)
+
+is provided. The use should be self explanatory.
+
+Register and memory access functions are provided in helper_mem.c.
+The PIO register access functions can trap access to PCI config space
+access register (config method 1) if _PC is not defined.
+
+A header file 'defines.h' is required to define OS/emulator specific
+ways to access memory and xf86 CPU registers: Defines need to be
+provided for memory byte/work/long read/write access
+(MEM_RB(name,addr),MEM_RW(name,addr),MEM_RL(name,addr),
+MEM_WB(name,addr,val),MEM_WL(name,addr,val),MEM_WL(name,addr,val)) of
+the real mode memory environment. 'name' will contain a pointer to the
+current xf86Int10InfoRec. Currently defines are available for
+vm86-mode under Linux and x86emu. They may be activated by defining
+_X86EMU or _VM86_LINUX respectively.
+
+Note: Emulators usually are not able to pass this pointer when calling
+memory access functions. In this case a global variable should be
+defined which can hold this pointer. This variable can be set in
+MapCurrentInt10(). It also must be set in xf86InitInt10() if this
+function calls the memory access functions either directly or by
+calling xf86ExecX86int10(pInt). Defines to access the emulator
+specific xf86 CPU register locations are also required:
+X86_EAX,...,X86_EFLAGS for access of the full 32 bit registers,
+X86_AX...X86_FLAGS for access of the 16 bit registers and
+XF86_AL,XF86_BL,XF86_CL,XF86_DL to access the lower byte of the
+AX,BX,CX and DX register.
+
+
+$XFree86: xc/programs/Xserver/hw/xfree86/int10/INT10.HOWTO,v 1.2 2000/02/08 13:13:22 eich Exp $
diff --git a/xorg-server/hw/xfree86/int10/Makefile.am b/xorg-server/hw/xfree86/int10/Makefile.am
index 58e1d0f25..f5ece69ef 100644
--- a/xorg-server/hw/xfree86/int10/Makefile.am
+++ b/xorg-server/hw/xfree86/int10/Makefile.am
@@ -1,46 +1,46 @@
-module_LTLIBRARIES = libint10.la
-
-sdk_HEADERS = xf86int10.h
-
-EXTRA_CFLAGS =
-
-libint10_la_LDFLAGS = -avoid-version
-libint10_la_LIBADD = $(PCIACCESS_LIBS)
-
-COMMON_SOURCES = \
- helper_exec.c \
- helper_mem.c \
- xf86int10.c \
- xf86int10module.c
-
-if I386_VIDEO
-I386_VIDEO_CFLAGS = -D_PC
-endif
-
-if INT10_VM86
-AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
-INCLUDES = $(XORG_INCS)
-libint10_la_SOURCES = \
- $(COMMON_SOURCES) \
- $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \
- $(srcdir)/../os-support/linux/int10/linux.c
-endif
-
-if INT10_X86EMU
-AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_X86EMU -DNO_SYS_HEADERS \
- $(XORG_CFLAGS) $(EXTRA_CFLAGS) $(DIX_CFLAGS)
-INCLUDES = $(XORG_INCS) -I$(srcdir)/../x86emu
-libint10_la_SOURCES = \
- $(COMMON_SOURCES) \
- xf86x86emu.c \
- generic.c \
- x86emu.c
-endif
-
-if INT10_STUB
-AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
-INCLUDES = $(XORG_INCS)
-libint10_la_SOURCES = stub.c xf86int10module.c
-endif
-
-EXTRA_DIST = xf86x86emu.h INT10.HOWTO
+module_LTLIBRARIES = libint10.la
+
+sdk_HEADERS = xf86int10.h
+
+EXTRA_CFLAGS =
+
+libint10_la_LDFLAGS = -avoid-version
+libint10_la_LIBADD = $(PCIACCESS_LIBS)
+
+COMMON_SOURCES = \
+ helper_exec.c \
+ helper_mem.c \
+ xf86int10.c \
+ xf86int10module.c
+
+if I386_VIDEO
+I386_VIDEO_CFLAGS = -D_PC
+endif
+
+if INT10_VM86
+AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
+INCLUDES = $(XORG_INCS)
+libint10_la_SOURCES = \
+ $(COMMON_SOURCES) \
+ $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \
+ $(srcdir)/../os-support/linux/int10/linux.c
+endif
+
+if INT10_X86EMU
+AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_X86EMU -DNO_SYS_HEADERS \
+ $(XORG_CFLAGS) $(EXTRA_CFLAGS) $(DIX_CFLAGS)
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../x86emu
+libint10_la_SOURCES = \
+ $(COMMON_SOURCES) \
+ xf86x86emu.c \
+ generic.c \
+ x86emu.c
+endif
+
+if INT10_STUB
+AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
+INCLUDES = $(XORG_INCS)
+libint10_la_SOURCES = stub.c xf86int10module.c
+endif
+
+EXTRA_DIST = xf86x86emu.h INT10.HOWTO
diff --git a/xorg-server/hw/xfree86/int10/x86emu.c b/xorg-server/hw/xfree86/int10/x86emu.c
index 087059131..b3320e5b9 100644
--- a/xorg-server/hw/xfree86/int10/x86emu.c
+++ b/xorg-server/hw/xfree86/int10/x86emu.c
@@ -1,12 +1,12 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "debug.c"
-#include "decode.c"
-#include "fpu.c"
-#include "ops.c"
-#include "ops2.c"
-#include "prim_ops.c"
-#include "sys.c"
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "debug.c"
+#include "decode.c"
+#include "fpu.c"
+#include "ops.c"
+#include "ops2.c"
+#include "prim_ops.c"
+#include "sys.c"
diff --git a/xorg-server/hw/xfree86/int10/xf86x86emu.h b/xorg-server/hw/xfree86/int10/xf86x86emu.h
index 320ad6fa8..4af2dafb7 100644
--- a/xorg-server/hw/xfree86/int10/xf86x86emu.h
+++ b/xorg-server/hw/xfree86/int10/xf86x86emu.h
@@ -1,54 +1,54 @@
-/*
- * XFree86 int10 module
- * execute BIOS int 10h calls in x86 real mode environment
- * Copyright 1999 Egbert Eich
- */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef XF86X86EMU_H_
-#define XF86X86EMU_H_
-#include <x86emu.h>
-
-#define M _X86EMU_env
-
-#define X86_EAX M.x86.R_EAX
-#define X86_EBX M.x86.R_EBX
-#define X86_ECX M.x86.R_ECX
-#define X86_EDX M.x86.R_EDX
-#define X86_ESI M.x86.R_ESI
-#define X86_EDI M.x86.R_EDI
-#define X86_EBP M.x86.R_EBP
-#define X86_EIP M.x86.R_EIP
-#define X86_ESP M.x86.R_ESP
-#define X86_EFLAGS M.x86.R_EFLG
-
-#define X86_FLAGS M.x86.R_FLG
-#define X86_AX M.x86.R_AX
-#define X86_BX M.x86.R_BX
-#define X86_CX M.x86.R_CX
-#define X86_DX M.x86.R_DX
-#define X86_SI M.x86.R_SI
-#define X86_DI M.x86.R_DI
-#define X86_BP M.x86.R_BP
-#define X86_IP M.x86.R_IP
-#define X86_SP M.x86.R_SP
-#define X86_CS M.x86.R_CS
-#define X86_DS M.x86.R_DS
-#define X86_ES M.x86.R_ES
-#define X86_SS M.x86.R_SS
-#define X86_FS M.x86.R_FS
-#define X86_GS M.x86.R_GS
-
-#define X86_AL M.x86.R_AL
-#define X86_BL M.x86.R_BL
-#define X86_CL M.x86.R_CL
-#define X86_DL M.x86.R_DL
-
-#define X86_AH M.x86.R_AH
-#define X86_BH M.x86.R_BH
-#define X86_CH M.x86.R_CH
-#define X86_DH M.x86.R_DH
-
-#endif
+/*
+ * XFree86 int10 module
+ * execute BIOS int 10h calls in x86 real mode environment
+ * Copyright 1999 Egbert Eich
+ */
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef XF86X86EMU_H_
+#define XF86X86EMU_H_
+#include <x86emu.h>
+
+#define M _X86EMU_env
+
+#define X86_EAX M.x86.R_EAX
+#define X86_EBX M.x86.R_EBX
+#define X86_ECX M.x86.R_ECX
+#define X86_EDX M.x86.R_EDX
+#define X86_ESI M.x86.R_ESI
+#define X86_EDI M.x86.R_EDI
+#define X86_EBP M.x86.R_EBP
+#define X86_EIP M.x86.R_EIP
+#define X86_ESP M.x86.R_ESP
+#define X86_EFLAGS M.x86.R_EFLG
+
+#define X86_FLAGS M.x86.R_FLG
+#define X86_AX M.x86.R_AX
+#define X86_BX M.x86.R_BX
+#define X86_CX M.x86.R_CX
+#define X86_DX M.x86.R_DX
+#define X86_SI M.x86.R_SI
+#define X86_DI M.x86.R_DI
+#define X86_BP M.x86.R_BP
+#define X86_IP M.x86.R_IP
+#define X86_SP M.x86.R_SP
+#define X86_CS M.x86.R_CS
+#define X86_DS M.x86.R_DS
+#define X86_ES M.x86.R_ES
+#define X86_SS M.x86.R_SS
+#define X86_FS M.x86.R_FS
+#define X86_GS M.x86.R_GS
+
+#define X86_AL M.x86.R_AL
+#define X86_BL M.x86.R_BL
+#define X86_CL M.x86.R_CL
+#define X86_DL M.x86.R_DL
+
+#define X86_AH M.x86.R_AH
+#define X86_BH M.x86.R_BH
+#define X86_CH M.x86.R_CH
+#define X86_DH M.x86.R_DH
+
+#endif
diff --git a/xorg-server/hw/xfree86/modes/Makefile.am b/xorg-server/hw/xfree86/modes/Makefile.am
index e0386d748..9236426bf 100644
--- a/xorg-server/hw/xfree86/modes/Makefile.am
+++ b/xorg-server/hw/xfree86/modes/Makefile.am
@@ -1,35 +1,35 @@
-noinst_LTLIBRARIES = libxf86modes.la
-
-if DGA
-DGA_SRCS = xf86DiDGA.c
-endif
-
-libxf86modes_la_SOURCES = \
- xf86Crtc.c \
- xf86Crtc.h \
- xf86Cursors.c \
- xf86cvt.c \
- xf86gtf.c \
- xf86DisplayIDModes.c \
- xf86EdidModes.c \
- xf86Modes.c \
- xf86Modes.h \
- xf86RandR12.c \
- xf86RandR12.h \
- xf86Rename.h \
- xf86Rotate.c \
- $(DGA_SRCS)
-
-INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
- -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \
- -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
- -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \
- -I$(srcdir)/../dixmods/extmod
-
-sdk_HEADERS = \
- xf86Crtc.h \
- xf86Modes.h \
- xf86RandR12.h \
- xf86Rename.h
-
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+noinst_LTLIBRARIES = libxf86modes.la
+
+if DGA
+DGA_SRCS = xf86DiDGA.c
+endif
+
+libxf86modes_la_SOURCES = \
+ xf86Crtc.c \
+ xf86Crtc.h \
+ xf86Cursors.c \
+ xf86cvt.c \
+ xf86gtf.c \
+ xf86DisplayIDModes.c \
+ xf86EdidModes.c \
+ xf86Modes.c \
+ xf86Modes.h \
+ xf86RandR12.c \
+ xf86RandR12.h \
+ xf86Rename.h \
+ xf86Rotate.c \
+ $(DGA_SRCS)
+
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
+ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \
+ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
+ -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \
+ -I$(srcdir)/../dixmods/extmod
+
+sdk_HEADERS = \
+ xf86Crtc.h \
+ xf86Modes.h \
+ xf86RandR12.h \
+ xf86Rename.h
+
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/xorg-server/hw/xfree86/os-support/bsd/Makefile.am b/xorg-server/hw/xfree86/os-support/bsd/Makefile.am
index 55eb1151d..b6ecdf1d1 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/Makefile.am
+++ b/xorg-server/hw/xfree86/os-support/bsd/Makefile.am
@@ -1,76 +1,76 @@
-noinst_LTLIBRARIES = libbsd.la
-
-# APM support.
-if BSD_KQUEUE_APM
-APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c
-else
-if BSD_APM
-APM_SOURCES = $(srcdir)/bsd_apm.c
-else
-APM_SOURCES = $(srcdir)/../shared/pm_noop.c
-endif
-endif
-
-if FREEBSD_KLDLOAD
-KMOD_SOURCES = bsd_kmod.c
-else
-KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c
-endif
-
-if AGP
-AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c
-else
-AGP_SOURCES = $(srcdir)/../shared/agp_noop.c
-endif
-
-if ALPHA_VIDEO
-# Cheat here and piggyback other alpha bits on ALPHA_VIDEO.
-ARCH_SOURCES = \
- alpha_video.c \
- bsd_ev56.c \
- bsd_axp.c \
- $(srcdir)/../shared/xf86Axp.c
-endif
-
-if ARM_VIDEO
-ARCH_SOURCES = arm_video.c
-endif
-
-if I386_VIDEO
-ARCH_SOURCES = i386_video.c
-endif
-
-if PPC_VIDEO
-ARCH_SOURCES = ppc_video.c
-endif
-
-if SPARC64_VIDEO
-# Cheat here and piggyback other sparc64 bits on SPARC64_VIDEO.
-ARCH_SOURCES = \
- sparc64_video.c \
- $(srcdir)/../shared/ioperm_noop.c
-endif
-
-# FIXME: NetBSD Aperture defines (configure.ac)
-AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS)
-
-INCLUDES = $(XORG_INCS)
-
-libbsd_la_SOURCES = \
- $(srcdir)/../shared/posix_tty.c \
- $(srcdir)/../shared/sigio.c \
- $(srcdir)/../shared/vidmem.c \
- bsd_VTsw.c \
- bsd_init.c \
- bsd_bell.c \
- $(ARCH_SOURCES) \
- $(AGP_SOURCES) \
- $(APM_SOURCES) \
- $(AXP_SOURCES) \
- $(DRI_SOURCES) \
- $(KMOD_SOURCES) \
- $(RES_SOURCES)
-
-# FIXME: Add these files to the build as needed
-EXTRA_DIST = \
- memrange.h
+noinst_LTLIBRARIES = libbsd.la
+
+# APM support.
+if BSD_KQUEUE_APM
+APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c
+else
+if BSD_APM
+APM_SOURCES = $(srcdir)/bsd_apm.c
+else
+APM_SOURCES = $(srcdir)/../shared/pm_noop.c
+endif
+endif
+
+if FREEBSD_KLDLOAD
+KMOD_SOURCES = bsd_kmod.c
+else
+KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c
+endif
+
+if AGP
+AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c
+else
+AGP_SOURCES = $(srcdir)/../shared/agp_noop.c
+endif
+
+if ALPHA_VIDEO
+# Cheat here and piggyback other alpha bits on ALPHA_VIDEO.
+ARCH_SOURCES = \
+ alpha_video.c \
+ bsd_ev56.c \
+ bsd_axp.c \
+ $(srcdir)/../shared/xf86Axp.c
+endif
+
+if ARM_VIDEO
+ARCH_SOURCES = arm_video.c
+endif
+
+if I386_VIDEO
+ARCH_SOURCES = i386_video.c
+endif
+
+if PPC_VIDEO
+ARCH_SOURCES = ppc_video.c
+endif
+
+if SPARC64_VIDEO
+# Cheat here and piggyback other sparc64 bits on SPARC64_VIDEO.
+ARCH_SOURCES = \
+ sparc64_video.c \
+ $(srcdir)/../shared/ioperm_noop.c
+endif
+
+# FIXME: NetBSD Aperture defines (configure.ac)
+AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS)
+
+INCLUDES = $(XORG_INCS)
+
+libbsd_la_SOURCES = \
+ $(srcdir)/../shared/posix_tty.c \
+ $(srcdir)/../shared/sigio.c \
+ $(srcdir)/../shared/vidmem.c \
+ bsd_VTsw.c \
+ bsd_init.c \
+ bsd_bell.c \
+ $(ARCH_SOURCES) \
+ $(AGP_SOURCES) \
+ $(APM_SOURCES) \
+ $(AXP_SOURCES) \
+ $(DRI_SOURCES) \
+ $(KMOD_SOURCES) \
+ $(RES_SOURCES)
+
+# FIXME: Add these files to the build as needed
+EXTRA_DIST = \
+ memrange.h
diff --git a/xorg-server/hw/xfree86/os-support/hurd/Makefile.am b/xorg-server/hw/xfree86/os-support/hurd/Makefile.am
index 2f0ba2ac8..3e8224753 100644
--- a/xorg-server/hw/xfree86/os-support/hurd/Makefile.am
+++ b/xorg-server/hw/xfree86/os-support/hurd/Makefile.am
@@ -1,15 +1,15 @@
-noinst_LTLIBRARIES = libhurd.la
-
-libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \
- hurd_video.c \
- $(srcdir)/../shared/VTsw_noop.c \
- $(srcdir)/../shared/posix_tty.c \
- $(srcdir)/../shared/vidmem.c \
- $(srcdir)/../shared/sigiostubs.c \
- $(srcdir)/../shared/pm_noop.c \
- $(srcdir)/../shared/kmod_noop.c \
- $(srcdir)/../shared/agp_noop.c
-
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
-
-INCLUDES = $(XORG_INCS)
+noinst_LTLIBRARIES = libhurd.la
+
+libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \
+ hurd_video.c \
+ $(srcdir)/../shared/VTsw_noop.c \
+ $(srcdir)/../shared/posix_tty.c \
+ $(srcdir)/../shared/vidmem.c \
+ $(srcdir)/../shared/sigiostubs.c \
+ $(srcdir)/../shared/pm_noop.c \
+ $(srcdir)/../shared/kmod_noop.c \
+ $(srcdir)/../shared/agp_noop.c
+
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
+
+INCLUDES = $(XORG_INCS)
diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c
index 8750eaf44..33965a44c 100644
--- a/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c
+++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c
@@ -1,37 +1,37 @@
-/*
- * Copyright © 2006 Daniel Stone
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Daniel Stone <daniel@fooishbar.org>
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86Priv.h"
-
-void
-xf86OSRingBell(int loudness, int pitch, int duration)
-{
- return;
-}
+/*
+ * Copyright © 2006 Daniel Stone
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "xf86.h"
+#include "xf86Priv.h"
+
+void
+xf86OSRingBell(int loudness, int pitch, int duration)
+{
+ return;
+}
diff --git a/xorg-server/hw/xfree86/os-support/int10Defines.h b/xorg-server/hw/xfree86/os-support/int10Defines.h
index e79722839..d942fbdad 100644
--- a/xorg-server/hw/xfree86/os-support/int10Defines.h
+++ b/xorg-server/hw/xfree86/os-support/int10Defines.h
@@ -1,89 +1,89 @@
-/*
- * Copyright (c) 2000-2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _INT10DEFINES_H_
-#define _INT10DEFINES_H_ 1
-
-#ifdef _VM86_LINUX
-
-#include <asm/vm86.h>
-
-#define CPU_R(type,name,num) \
- (((type *)&(((struct vm86_struct *)REG->cpuRegs)->regs.name))[num])
-#define CPU_RD(name,num) CPU_R(CARD32,name,num)
-#define CPU_RW(name,num) CPU_R(CARD16,name,num)
-#define CPU_RB(name,num) CPU_R(CARD8,name,num)
-
-#define X86_EAX CPU_RD(eax,0)
-#define X86_EBX CPU_RD(ebx,0)
-#define X86_ECX CPU_RD(ecx,0)
-#define X86_EDX CPU_RD(edx,0)
-#define X86_ESI CPU_RD(esi,0)
-#define X86_EDI CPU_RD(edi,0)
-#define X86_EBP CPU_RD(ebp,0)
-#define X86_EIP CPU_RD(eip,0)
-#define X86_ESP CPU_RD(esp,0)
-#define X86_EFLAGS CPU_RD(eflags,0)
-
-#define X86_FLAGS CPU_RW(eflags,0)
-#define X86_AX CPU_RW(eax,0)
-#define X86_BX CPU_RW(ebx,0)
-#define X86_CX CPU_RW(ecx,0)
-#define X86_DX CPU_RW(edx,0)
-#define X86_SI CPU_RW(esi,0)
-#define X86_DI CPU_RW(edi,0)
-#define X86_BP CPU_RW(ebp,0)
-#define X86_IP CPU_RW(eip,0)
-#define X86_SP CPU_RW(esp,0)
-#define X86_CS CPU_RW(cs,0)
-#define X86_DS CPU_RW(ds,0)
-#define X86_ES CPU_RW(es,0)
-#define X86_SS CPU_RW(ss,0)
-#define X86_FS CPU_RW(fs,0)
-#define X86_GS CPU_RW(gs,0)
-
-#define X86_AL CPU_RB(eax,0)
-#define X86_BL CPU_RB(ebx,0)
-#define X86_CL CPU_RB(ecx,0)
-#define X86_DL CPU_RB(edx,0)
-
-#define X86_AH CPU_RB(eax,1)
-#define X86_BH CPU_RB(ebx,1)
-#define X86_CH CPU_RB(ecx,1)
-#define X86_DH CPU_RB(edx,1)
-
-#elif defined(_X86EMU)
-
-#include "xf86x86emu.h"
-
-#endif
-
-#endif
+/*
+ * Copyright (c) 2000-2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _INT10DEFINES_H_
+#define _INT10DEFINES_H_ 1
+
+#ifdef _VM86_LINUX
+
+#include <asm/vm86.h>
+
+#define CPU_R(type,name,num) \
+ (((type *)&(((struct vm86_struct *)REG->cpuRegs)->regs.name))[num])
+#define CPU_RD(name,num) CPU_R(CARD32,name,num)
+#define CPU_RW(name,num) CPU_R(CARD16,name,num)
+#define CPU_RB(name,num) CPU_R(CARD8,name,num)
+
+#define X86_EAX CPU_RD(eax,0)
+#define X86_EBX CPU_RD(ebx,0)
+#define X86_ECX CPU_RD(ecx,0)
+#define X86_EDX CPU_RD(edx,0)
+#define X86_ESI CPU_RD(esi,0)
+#define X86_EDI CPU_RD(edi,0)
+#define X86_EBP CPU_RD(ebp,0)
+#define X86_EIP CPU_RD(eip,0)
+#define X86_ESP CPU_RD(esp,0)
+#define X86_EFLAGS CPU_RD(eflags,0)
+
+#define X86_FLAGS CPU_RW(eflags,0)
+#define X86_AX CPU_RW(eax,0)
+#define X86_BX CPU_RW(ebx,0)
+#define X86_CX CPU_RW(ecx,0)
+#define X86_DX CPU_RW(edx,0)
+#define X86_SI CPU_RW(esi,0)
+#define X86_DI CPU_RW(edi,0)
+#define X86_BP CPU_RW(ebp,0)
+#define X86_IP CPU_RW(eip,0)
+#define X86_SP CPU_RW(esp,0)
+#define X86_CS CPU_RW(cs,0)
+#define X86_DS CPU_RW(ds,0)
+#define X86_ES CPU_RW(es,0)
+#define X86_SS CPU_RW(ss,0)
+#define X86_FS CPU_RW(fs,0)
+#define X86_GS CPU_RW(gs,0)
+
+#define X86_AL CPU_RB(eax,0)
+#define X86_BL CPU_RB(ebx,0)
+#define X86_CL CPU_RB(ecx,0)
+#define X86_DL CPU_RB(edx,0)
+
+#define X86_AH CPU_RB(eax,1)
+#define X86_BH CPU_RB(ebx,1)
+#define X86_CH CPU_RB(ecx,1)
+#define X86_DH CPU_RB(edx,1)
+
+#elif defined(_X86EMU)
+
+#include "xf86x86emu.h"
+
+#endif
+
+#endif
diff --git a/xorg-server/hw/xfree86/os-support/misc/Makefile.am b/xorg-server/hw/xfree86/os-support/misc/Makefile.am
index db5e7cff0..4bd3fc3e1 100644
--- a/xorg-server/hw/xfree86/os-support/misc/Makefile.am
+++ b/xorg-server/hw/xfree86/os-support/misc/Makefile.am
@@ -1,12 +1,12 @@
-
-noinst_LTLIBRARIES = libmisc.la
-
-libmisc_la_SOURCES = SlowBcopy.c
-
-#AM_LDFLAGS = -r
-
-INCLUDES = $(XORG_INCS)
-
-AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
-
-EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS)
+
+noinst_LTLIBRARIES = libmisc.la
+
+libmisc_la_SOURCES = SlowBcopy.c
+
+#AM_LDFLAGS = -r
+
+INCLUDES = $(XORG_INCS)
+
+AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
+
+EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS)
diff --git a/xorg-server/hw/xfree86/os-support/solaris/Makefile.am b/xorg-server/hw/xfree86/os-support/solaris/Makefile.am
index 9f358a6ea..5163f4423 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/Makefile.am
+++ b/xorg-server/hw/xfree86/os-support/solaris/Makefile.am
@@ -1,37 +1,37 @@
-if SOLARIS_VT
-VTSW_SRC = sun_VTsw.c
-else
-VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
-endif
-
-if AGP
-AGP_SRC = sun_agp.c
-else
-AGP_SRC = $(srcdir)/../shared/agp_noop.c
-endif
-
-SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S
-DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il
-
-solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S
- $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@
-
-noinst_LTLIBRARIES = libsolaris.la
-libsolaris_la_SOURCES = sun_init.c \
- sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \
- $(srcdir)/../shared/kmod_noop.c \
- $(srcdir)/../shared/posix_tty.c \
- $(srcdir)/../shared/sigio.c \
- $(srcdir)/../shared/vidmem.c \
- $(VTSW_SRC)
-nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
-
-sdk_HEADERS =
-nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il
-
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
-
-INCLUDES = $(XORG_INCS)
-
-EXTRA_DIST = solaris-amd64.S solaris-ia32.S solaris-sparcv8plus.S \
- apSolaris.shar sun_inout.s
+if SOLARIS_VT
+VTSW_SRC = sun_VTsw.c
+else
+VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
+endif
+
+if AGP
+AGP_SRC = sun_agp.c
+else
+AGP_SRC = $(srcdir)/../shared/agp_noop.c
+endif
+
+SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S
+DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il
+
+solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S
+ $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@
+
+noinst_LTLIBRARIES = libsolaris.la
+libsolaris_la_SOURCES = sun_init.c \
+ sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \
+ $(srcdir)/../shared/kmod_noop.c \
+ $(srcdir)/../shared/posix_tty.c \
+ $(srcdir)/../shared/sigio.c \
+ $(srcdir)/../shared/vidmem.c \
+ $(VTSW_SRC)
+nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
+
+sdk_HEADERS =
+nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il
+
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
+
+INCLUDES = $(XORG_INCS)
+
+EXTRA_DIST = solaris-amd64.S solaris-ia32.S solaris-sparcv8plus.S \
+ apSolaris.shar sun_inout.s
diff --git a/xorg-server/hw/xfree86/os-support/solaris/apSolaris.shar b/xorg-server/hw/xfree86/os-support/solaris/apSolaris.shar
index 68f44029e..a3548f7b4 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/apSolaris.shar
+++ b/xorg-server/hw/xfree86/os-support/solaris/apSolaris.shar
@@ -1,806 +1,806 @@
-#!/bin/sh
-#
-# This is a shell archive. Save it in a file, remove anything before
-# this line, and then unpack it by entering "sh file". Note, it may
-# create directories; files and directories will be owned by you and
-# have default permissions.
-# Made on Sun Jun 25 20:24:59 CEST 2006 by Martin Bochnig at martux.org
-#
-# This archive contains:
-#
-# ./aperture
-#
-# ./aperture/Makefile
-# ./aperture/Makefile.amd64
-# ./aperture/Makefile.sparcv9
-# ./aperture/README
-# ./aperture/aperture.c
-# ./aperture/aperture.conf
-# ./aperture/devlink.tab
-#
-echo c - ./aperture
-mkdir -p ./aperture > /dev/null 2>&1
-#
-echo x - ./aperture/Makefile
-sed 's/^X//' >./aperture/Makefile << 'END-of-./aperture/Makefile'
-X#
-X# File: makefile for aperture Framebuffer Driver
-X# Author: Doug Anson (danson@lgc.com)
-X# Date: 2/15/94
-X# Modified: David Holland (davidh@use.com)
-X# Date: 2/23/94
-X# - Changed name, and debugging structure
-X# Modified: Marc Aurele La France (tsi@xfree86.org)
-X# Date: 2001.06.08
-X# - SPARC support, cleanup and turf aptest.
-X#
-X# >>NOTE<< Have a look at Makefile.sparcv9 for specifics.
-X#
-X# Modified: Martin Bochnig (martin@martux.org)
-X# Date: 2006.06.24
-X# - Slightly modified to also build on Solaris 10 and 11.
-X# - amd64 64 bit kernel support
-X# - cosmetical changes to also support sun4v, not only sun4u
-X#
-X# >>NOTE<< Have a look at Makefile.amd64 for amd64 specifics.
-X#
-X# GNU gcc compiler
-XCC=gcc
-XCFLGS=-fno-builtin -Wall -O3
-X
-X#
-X# SUNWspro compiler
-X#CC=/opt/SUNWspro/bin/cc
-X#CFLGS=-Xa -xnolib -xO3
-X
-X#
-X# Debug error reporting
-X#DEBUG_FLG=
-X#DEBUG_FLG=-DAPERTURE_DEBUG
-X
-X#
-X# Files and object declarations
-XKERNEL_FLGS=-D_KERNEL -DSUNDDI
-XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
-XCFILES= aperture.c
-XOBJS= aperture.o
-XDRIVER= aperture
-X
-X#
-X# Make rules
-Xall: $(DRIVER)
-X
-X$(DRIVER): $(OBJS)
-X @if [ -f "Makefile.`isainfo -k`" ]; then \
-X make -f Makefile.`isainfo -k` $(DRIVER); \
-X else \
-X rm -f $(DRIVER); \
-X ld -r -o $(DRIVER) $(OBJS); \
-X fi
-X
-Xinstall: $(DRIVER)
-X @if [ -f "Makefile.`isainfo -k`" ]; then \
-X make -f Makefile.`isainfo -k` install; \
-X else \
-X cp aperture.conf /kernel/drv; \
-X cp $(DRIVER) /kernel/drv; \
-X fi
-X
-Xadd_drv:
-X @if [ -f "Makefile.`isainfo -k`" ]; then \
-X make -f Makefile.`isainfo -k` add_drv; \
-X else \
-X add_drv aperture; \
-X fi
-X
-Xclean:
-X rm -f *% *.BAK $(OBJS) $(DRIVER) core
-X
-X.SUFFIXES: .i
-X
-X.c.i:
-X $(CC) -E $(CFLAGS) $*.c > $@
-X
-X.c.o:
-X @if [ -f "Makefile.`isainfo -k`" ]; then \
-X make -f Makefile.`isainfo -k` $@; \
-X else \
-X rm -f $@; \
-X $(CC) -c $(CFLAGS) $*.c -o $@; \
-X fi
-END-of-./aperture/Makefile
-echo x - ./aperture/Makefile.amd64
-sed 's/^X//' >./aperture/Makefile.amd64 << 'END-of-./aperture/Makefile.amd64'
-X#
-X# File: Makefile for aperture Framebuffer Driver
-X# Author: Doug Anson (danson@lgc.com)
-X# Date: 2/15/94
-X# Modified: David Holland (davidh@use.com)
-X# Date: 2/23/94
-X# - Changed name, and debugging structure
-X# Modified: Marc Aurele La France (tsi@xfree86.org)
-X# Date: 2001.06.08
-X# - SPARC support, cleanup and turf aptest.
-X# Modified: Martin Bochnig (martin@martux.org)
-X# - amd64 64 bit kernel support, cosmetics and also
-X# supporting sun4v (and arbitrary sparcv9) platforms
-X# as well as SunOS 5.10 or higher now
-X# - Changed name
-X#
-X
-X#
-X# GNU gcc compiler, version 3.2 or later
-X#
-XCC=gcc
-XCFLGS=-fno-builtin -Wall -O3 -m64 -mcmodel=kernel
-X
-X#
-X# SUNWspro compiler (untested, might not properly work for amd64 here)
-X#CC=/opt/SUNWspro/bin/cc
-X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
-X
-X#
-X# Debug error reporting
-X#DEBUG_FLG=
-X#DEBUG_FLG=-DAPERTURE_DEBUG
-X
-X#
-X# Files and object declarations
-XKERNEL_FLGS=-D_KERNEL -DSUNDDI
-XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
-XCFILES= aperture.c
-XOBJS= aperture.o
-XDRIVER= aperture
-X
-X#
-X# Make rules
-Xall: $(DRIVER)
-X
-X$(DRIVER): $(OBJS)
-X rm -f $(DRIVER)
-X ld -r -o $(DRIVER) $(OBJS)
-X
-Xinstall: $(DRIVER)
-X cp aperture.conf /kernel/drv
-X cp $(DRIVER) /kernel/drv/amd64
-X
-Xadd_drv:
-X add_drv aperture
-X
-Xclean:
-X rm -f *% *.BAK $(OBJS) $(DRIVER) core
-X
-X.SUFFIXES: .i
-X
-X.c.i:
-X $(CC) -E $(CFLAGS) $*.c > $@
-END-of-./aperture/Makefile.amd64
-echo x - ./aperture/Makefile.sparcv9
-sed 's/^X//' >./aperture/Makefile.sparcv9 << 'END-of-./aperture/Makefile.sparcv9'
-X#
-X# File: makefile for aperture Framebuffer Driver
-X# Author: Doug Anson (danson@lgc.com)
-X# Date: 2/15/94
-X# Modified: David Holland (davidh@use.com)
-X# Date: 2/23/94
-X# - Changed name, and debugging structure
-X# Modified: Marc Aurele La France (tsi@xfree86.org)
-X# Date: 2001.06.08
-X# - SPARC support, cleanup and turf aptest.
-X# Modified: Martin Bochnig (martin@martux.org)
-X# Date: 2006.06.24
-X# - Changed name for generic sparcv9 support
-X# - updated to better work with Solaris 10 and 11
-X#
-X
-X#
-X# GNU gcc compiler, version 3.2 or later
-X#
-XCC=gcc
-XCFLGS=-fno-builtin -Wall -O3 -m64
-X
-X#
-X# SUNWspro compiler
-X#CC=/opt/SUNWspro/bin/cc
-X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
-X
-X#
-X# Debug error reporting
-X#DEBUG_FLG=
-X#DEBUG_FLG=-DAPERTURE_DEBUG
-X
-X#
-X# Files and object declarations
-XKERNEL_FLGS=-D_KERNEL -DSUNDDI
-XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
-XCFILES= aperture.c
-XOBJS= aperture.o
-XDRIVER= aperture
-X
-X#
-X# Make rules
-Xall: $(DRIVER)
-X
-X$(DRIVER): $(OBJS)
-X rm -f $(DRIVER)
-X ld -r -o $(DRIVER) $(OBJS)
-X
-Xinstall: $(DRIVER)
-X cp aperture.conf /kernel/drv
-X cp $(DRIVER) /kernel/drv/sparcv9
-X
-Xadd_drv:
-X add_drv aperture
-X
-Xclean:
-X rm -f *% *.BAK $(OBJS) $(DRIVER) core
-X
-X.SUFFIXES: .i
-X
-X.c.i:
-X $(CC) -E $(CFLAGS) $*.c > $@
-END-of-./aperture/Makefile.sparcv9
-echo x - ./aperture/README
-sed 's/^X//' >./aperture/README << 'END-of-./aperture/README'
-XFramebuffer aperture driver.
-X
-XThis driver was written to provide a device that, unlike /dev/mem, allows
-Xmmap()'ing of ranges beyond installed memory.
-X
-XThe original x86-based version of this driver was the collaborative work of
-XDoug Anson (danson@lgc.com), and David Holland (davidh@use.com). It has since
-Xbeen rewritten to also work on sparc machines and - later on - also on sparcv9
-Xand recently amd64 64 bit kernels.
-XIt flawlessly compiles and installs on Solaris 10 and 11 now.
-X
-X
-XInstallation instructions:
-X
-X1) Check the Makefile, for appropriate CC, and CFLAGS definitions. Compiling
-X with APERTURE_DEBUG defined means the driver will generate reams of
-X debugging output. You'll probably want to leave this off...
-X
-X2) Type 'make' (or 'gmake'). Both the driver and test program should compile
-X without any problems. No warning messages should be generated.
-X
-X3) Become 'root'.
-X
-X4) Type 'make install' and 'make add_drv'. The screen should look something
-X like this:
-X
-X # make install
-X cp aperture aperture.conf /kernel/drv
-X # make add_drv
-X add_drv aperture
-X
-X On a sparcv9 machine this will mention the /kernel/drv/sparcv9 directory
-X instead of /kernel/drv. Similarily /kernel/drv/amd64 should be used on amd64.
-X
-X This installs the driver to the system.
-X
-X5) While as root modify the file /etc/devlink.tab, adding these lines:
-X
-X# The following entry is for the framebuffer driver
-Xtype=ddi_pseudo;name=aperture fbs/\M0
-X
-X Add that line exactly as shown. You may also simply add the
-X contents of the devlink.tab file supplied to /etc/devlink.tab.
-X It contains the lines as well. (Yes, that is a tab between
-X aperture and fbs, not spaces - very important)
-X
-X6) Perform a reconfiguration boot of the system.
-X
-X # touch /reconfigure
-X # init 6
-X
-XBug reports, questions, suggestions, etc can be sent to xfree86@xfree86.org.
-END-of-./aperture/README
-echo x - ./aperture/aperture.c
-sed 's/^X//' >./aperture/aperture.c << 'END-of-./aperture/aperture.c'
-X/*
-X * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
-X *
-X * Permission is hereby granted, free of charge, to any person obtaining a copy
-X * of this software and associated documentation files (the "Software"), to
-X * deal in the Software without restriction, including without limitation the
-X * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-X * sell copies of the Software, and to permit persons to whom the Software is
-X * furnished to do so, subject to the following conditions:
-X *
-X * The above copyright notice and this permission notice shall be included in
-X * all copies or substantial portions of the Software.
-X *
-X * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-X * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-X * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-X * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-X * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-X * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-X *
-X * Except as contained in this notice, the name of the XFree86 Project shall
-X * not be used in advertising or otherwise to promote the sale, use or other
-X * dealings in this Software without prior written authorization from the
-X * XFree86 Project.
-X */
-X
-X/*
-X * Aperture driver for Solaris.
-X */
-X
-X/*
-X * Modified: Martin Bochnig (martin@martux.org)
-X * Log: Commented out obsolete kernel interfaces DDI_IDENTIFIED and DDI_NOT_IDENTIFIED
-X * not supported by SunOS 5.10 or higher anymore,
-X * see http://docs.sun.com/app/docs/doc/819-2255/6n4ibnffr?a=view
-X */
-X
-X#include <sys/conf.h>
-X#include <sys/ddi.h>
-X#include <sys/modctl.h>
-X#include <sys/open.h>
-X#include <sys/stat.h>
-X#include <sys/sunddi.h>
-X
-X#define DEV_IDENT "aperture"
-X#define DEV_BANNER "XFree86 aperture driver"
-X
-X#ifndef D_64BIT
-X#define D_64BIT 0
-X#endif
-X
-X#ifndef NULL
-X#define NULL ((void *)0)
-X#endif
-X
-X/*
-X * open(9E)
-X */
-X/*ARGSUSED*/
-Xstatic int
-Xaperture_open
-X(
-X#ifdef __STDC__
-X dev_t *devp,
-X int flag,
-X int typ,
-X struct cred *cred
-X#endif
-X)
-X#ifndef __STDC__
-X dev_t *devp;
-X int flag;
-X int typ;
-X struct cred *cred;
-X#endif
-X{
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering open()\n");
-X
-X#endif
-X
-X if ((typ != OTYP_CHR) || (getminor(*devp)))
-X error = EINVAL;
-X else
-X error = 0;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving open() = %d\n", error);
-X
-X#endif
-X
-X return error;
-X}
-X
-X/*
-X * mmap(9E)
-X */
-X/*ARGSUSED*/
-Xstatic int
-Xaperture_mmap
-X(
-X#ifdef __STDC__
-X dev_t dev,
-X off_t off,
-X int prot
-X#endif
-X)
-X#ifndef __STDC__
-X dev_t dev;
-X off_t off;
-X int prot;
-X#endif
-X{
-X pfn_t pf;
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering mmap(0x%016lx)\n", off);
-X
-X#endif
-X
-X pf = btop((unsigned long)off);
-X
-X /* Deal with mmap(9E) interface limits */
-X error = (int)pf;
-X if ((error < 0) || (pf != (pfn_t)error))
-X error = -1;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving mmap() = 0x%08lx", error);
-X
-X#endif
-X
-X return error;
-X}
-X
-Xstatic struct cb_ops aperture_cb_ops =
-X{
-X aperture_open, /* open */
-X nulldev, /* close */
-X nodev, /* strategy */
-X nodev, /* print */
-X nodev, /* dump */
-X nodev, /* read */
-X nodev, /* write */
-X nodev, /* ioctl */
-X nodev, /* devmap */
-X aperture_mmap, /* mmap */
-X ddi_segmap, /* segmap */
-X nochpoll, /* poll */
-X ddi_prop_op, /* cb_prop_op */
-X 0, /* streamtab */
-X D_NEW | D_MP | D_64BIT /* Driver compatibility flag */
-X};
-X
-X
-Xstatic dev_info_t *aperture_dip; /* private copy of devinfo pointer */
-X
-X/*
-X * getinfo(9E)
-X */
-X/*ARGSUSED*/
-Xstatic int
-Xaperture_getinfo
-X(
-X#ifdef __STDC__
-X dev_info_t *dip,
-X ddi_info_cmd_t infocmd,
-X void *arg,
-X void **result
-X#endif
-X)
-X#ifndef __STDC__
-X dev_info_t *dip;
-X ddi_info_cmd_t infocmd;
-X void *arg;
-X void **result;
-X#endif
-X{
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering getinfo()\n");
-X
-X#endif
-X
-X switch (infocmd) {
-X case DDI_INFO_DEVT2DEVINFO:
-X *result = aperture_dip;
-X error = DDI_SUCCESS;
-X break;
-X case DDI_INFO_DEVT2INSTANCE:
-X *result = NULL;
-X error = DDI_SUCCESS;
-X break;
-X default:
-X error = DDI_FAILURE;
-X }
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving getinfo() = %d\n", error);
-X
-X#endif
-X
-X return error;
-X}
-X
-X/*
-X * identify(9E)
-X */
-X/*ARGSUSED*/
-Xstatic int
-Xaperture_identify
-X(
-X#ifdef __STDC__
-X dev_info_t *dip
-X#endif
-X)
-X#ifndef __STDC__
-X dev_info_t *dip;
-X#endif
-X{
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering identify()\n");
-X
-X#endif
-X
-X if (strcmp(ddi_get_name(dip), DEV_IDENT))
-X error = 1 /* DDI_NOT_IDENTIFIED obsolete since SunOS 5.10 */ ;
-X else
-X error = 2 /* DDI_IDENTIFIED obsolete since SunOS 5.10 */ ;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving identify() = %d\n", error);
-X
-X#endif
-X
-X return error;
-X}
-X
-X/*
-X * attach(9E)
-X */
-X/*ARGSUSED*/
-Xstatic int
-Xaperture_attach
-X(
-X#ifdef __STDC__
-X dev_info_t *dip,
-X ddi_attach_cmd_t cmd
-X#endif
-X)
-X#ifndef __STDC__
-X dev_info_t *dip;
-X ddi_attach_cmd_t cmd;
-X#endif
-X{
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering attach()\n");
-X
-X#endif
-X
-X if (cmd != DDI_ATTACH)
-X {
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": not attach(, DDI_ATTACH)\n");
-X
-X#endif
-X
-X error = DDI_FAILURE;
-X }
-X else
-X {
-X error = ddi_create_minor_node(dip, ddi_get_name(dip), S_IFCHR,
-X (minor_t)ddi_get_instance(dip),
-X NULL, 0 /* NODESPECIFIC_DEV obsolete since SunOS 5.10 */ );
-X
-X if (error == DDI_SUCCESS)
-X {
-X aperture_dip = dip;
-X ddi_report_dev(dip);
-X }
-X }
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving attach() = %d\n", error);
-X
-X#endif
-X
-X return error;
-X}
-X
-X/*
-X * detach(9E)
-X */
-Xstatic int
-Xaperture_detach
-X(
-X#ifdef __STDC__
-X dev_info_t *dip,
-X ddi_detach_cmd_t cmd
-X#endif
-X)
-X#ifndef __STDC__
-X dev_info_t *dip;
-X ddi_detach_cmd_t cmd;
-X#endif
-X{
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering detach()\n");
-X
-X#endif
-X
-X if (cmd != DDI_DETACH)
-X {
-X error = DDI_FAILURE;
-X }
-X else
-X {
-X ddi_remove_minor_node(dip, NULL);
-X aperture_dip = NULL;
-X error = DDI_SUCCESS;
-X }
-X
-X#if APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving detach() = %d\n", error);
-X
-X#endif
-X
-X return error;
-X}
-X
-X
-Xstatic struct dev_ops aperture_ops =
-X{
-X DEVO_REV, /* revision */
-X 0, /* refcnt */
-X aperture_getinfo, /* getinfo */
-X aperture_identify, /* identify */
-X nulldev, /* probe */
-X aperture_attach, /* attach */
-X aperture_detach, /* detach */
-X nodev, /* reset */
-X &aperture_cb_ops, /* driver operations */
-X NULL /* bus operations */
-X};
-X
-X
-Xstatic struct modldrv modldrv =
-X{
-X &mod_driverops, /* mod_ops structure pointer */
-X DEV_BANNER, /* driver banner string */
-X &aperture_ops, /* dev_ops structure pointer */
-X};
-X
-X
-Xstatic struct modlinkage modlinkage =
-X{
-X MODREV_1, /* module API revision */
-X {
-X &modldrv, /* module driver structure pointer */
-X NULL /* list termination */
-X }
-X};
-X
-X
-X/*
-X * _init(9E)
-X */
-Xint
-X_init
-X(
-X#ifdef __STDC__
-X void
-X#endif
-X)
-X{
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering _init()\n");
-X
-X#endif
-X
-X error = mod_install(&modlinkage);
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving _init() = %d\n", error);
-X
-X#endif
-X
-X return error;
-X}
-X
-X/*
-X * _info(9E)
-X */
-Xint
-X_info
-X(
-X#ifdef __STDC__
-X struct modinfo *modinfop
-X#endif
-X)
-X#ifndef __STDC__
-X struct modinfo *modinfop;
-X#endif
-X{
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering _info()\n");
-X
-X#endif
-X
-X error = mod_info(&modlinkage, modinfop);
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving _info() = %d\n", error);
-X
-X#endif
-X
-X return error;
-X}
-X
-X/*
-X * _fini(9E)
-X */
-Xint
-X_fini
-X(
-X#ifdef __STDC__
-X void
-X#endif
-X)
-X{
-X int error;
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": entering _fini()\n");
-X
-X#endif
-X
-X error = mod_remove(&modlinkage);
-X
-X#ifdef APERTURE_DEBUG
-X
-X cmn_err(CE_CONT, DEV_IDENT ": leaving _fini() = %d\n", error);
-X
-X#endif
-X
-X return error;
-X}
-END-of-./aperture/aperture.c
-echo x - ./aperture/aperture.conf
-sed 's/^X//' >./aperture/aperture.conf << 'END-of-./aperture/aperture.conf'
-X#
-X# Copyright 1994 Doug Anson, danson@lgc.com & David Holland, davidh@use.com
-X#
-X# File: aperture.conf
-X# Author: Doug Anson (danson@lgc.com)
-X#
-X# Modified: David Holland (davidh@use.com)
-X# Log: Change comments 02/23/94
-X# Change defaults/comments 09/25/94
-X#
-X# Modified: Marc Aurele La France (tsi@xfree86.org)
-X# Log: SPARC changes 2001.09
-X#
-X# Purpose: This conf file is used by the aperture driver.
-X#
-Xname="aperture" parent="pseudo";
-END-of-./aperture/aperture.conf
-echo x - ./aperture/devlink.tab
-sed 's/^X//' >./aperture/devlink.tab << 'END-of-./aperture/devlink.tab'
-X# The following entry is for the aperture driver
-Xtype=ddi_pseudo;name=aperture fbs/\M0
-END-of-./aperture/devlink.tab
-exit
-
+#!/bin/sh
+#
+# This is a shell archive. Save it in a file, remove anything before
+# this line, and then unpack it by entering "sh file". Note, it may
+# create directories; files and directories will be owned by you and
+# have default permissions.
+# Made on Sun Jun 25 20:24:59 CEST 2006 by Martin Bochnig at martux.org
+#
+# This archive contains:
+#
+# ./aperture
+#
+# ./aperture/Makefile
+# ./aperture/Makefile.amd64
+# ./aperture/Makefile.sparcv9
+# ./aperture/README
+# ./aperture/aperture.c
+# ./aperture/aperture.conf
+# ./aperture/devlink.tab
+#
+echo c - ./aperture
+mkdir -p ./aperture > /dev/null 2>&1
+#
+echo x - ./aperture/Makefile
+sed 's/^X//' >./aperture/Makefile << 'END-of-./aperture/Makefile'
+X#
+X# File: makefile for aperture Framebuffer Driver
+X# Author: Doug Anson (danson@lgc.com)
+X# Date: 2/15/94
+X# Modified: David Holland (davidh@use.com)
+X# Date: 2/23/94
+X# - Changed name, and debugging structure
+X# Modified: Marc Aurele La France (tsi@xfree86.org)
+X# Date: 2001.06.08
+X# - SPARC support, cleanup and turf aptest.
+X#
+X# >>NOTE<< Have a look at Makefile.sparcv9 for specifics.
+X#
+X# Modified: Martin Bochnig (martin@martux.org)
+X# Date: 2006.06.24
+X# - Slightly modified to also build on Solaris 10 and 11.
+X# - amd64 64 bit kernel support
+X# - cosmetical changes to also support sun4v, not only sun4u
+X#
+X# >>NOTE<< Have a look at Makefile.amd64 for amd64 specifics.
+X#
+X# GNU gcc compiler
+XCC=gcc
+XCFLGS=-fno-builtin -Wall -O3
+X
+X#
+X# SUNWspro compiler
+X#CC=/opt/SUNWspro/bin/cc
+X#CFLGS=-Xa -xnolib -xO3
+X
+X#
+X# Debug error reporting
+X#DEBUG_FLG=
+X#DEBUG_FLG=-DAPERTURE_DEBUG
+X
+X#
+X# Files and object declarations
+XKERNEL_FLGS=-D_KERNEL -DSUNDDI
+XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
+XCFILES= aperture.c
+XOBJS= aperture.o
+XDRIVER= aperture
+X
+X#
+X# Make rules
+Xall: $(DRIVER)
+X
+X$(DRIVER): $(OBJS)
+X @if [ -f "Makefile.`isainfo -k`" ]; then \
+X make -f Makefile.`isainfo -k` $(DRIVER); \
+X else \
+X rm -f $(DRIVER); \
+X ld -r -o $(DRIVER) $(OBJS); \
+X fi
+X
+Xinstall: $(DRIVER)
+X @if [ -f "Makefile.`isainfo -k`" ]; then \
+X make -f Makefile.`isainfo -k` install; \
+X else \
+X cp aperture.conf /kernel/drv; \
+X cp $(DRIVER) /kernel/drv; \
+X fi
+X
+Xadd_drv:
+X @if [ -f "Makefile.`isainfo -k`" ]; then \
+X make -f Makefile.`isainfo -k` add_drv; \
+X else \
+X add_drv aperture; \
+X fi
+X
+Xclean:
+X rm -f *% *.BAK $(OBJS) $(DRIVER) core
+X
+X.SUFFIXES: .i
+X
+X.c.i:
+X $(CC) -E $(CFLAGS) $*.c > $@
+X
+X.c.o:
+X @if [ -f "Makefile.`isainfo -k`" ]; then \
+X make -f Makefile.`isainfo -k` $@; \
+X else \
+X rm -f $@; \
+X $(CC) -c $(CFLAGS) $*.c -o $@; \
+X fi
+END-of-./aperture/Makefile
+echo x - ./aperture/Makefile.amd64
+sed 's/^X//' >./aperture/Makefile.amd64 << 'END-of-./aperture/Makefile.amd64'
+X#
+X# File: Makefile for aperture Framebuffer Driver
+X# Author: Doug Anson (danson@lgc.com)
+X# Date: 2/15/94
+X# Modified: David Holland (davidh@use.com)
+X# Date: 2/23/94
+X# - Changed name, and debugging structure
+X# Modified: Marc Aurele La France (tsi@xfree86.org)
+X# Date: 2001.06.08
+X# - SPARC support, cleanup and turf aptest.
+X# Modified: Martin Bochnig (martin@martux.org)
+X# - amd64 64 bit kernel support, cosmetics and also
+X# supporting sun4v (and arbitrary sparcv9) platforms
+X# as well as SunOS 5.10 or higher now
+X# - Changed name
+X#
+X
+X#
+X# GNU gcc compiler, version 3.2 or later
+X#
+XCC=gcc
+XCFLGS=-fno-builtin -Wall -O3 -m64 -mcmodel=kernel
+X
+X#
+X# SUNWspro compiler (untested, might not properly work for amd64 here)
+X#CC=/opt/SUNWspro/bin/cc
+X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
+X
+X#
+X# Debug error reporting
+X#DEBUG_FLG=
+X#DEBUG_FLG=-DAPERTURE_DEBUG
+X
+X#
+X# Files and object declarations
+XKERNEL_FLGS=-D_KERNEL -DSUNDDI
+XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
+XCFILES= aperture.c
+XOBJS= aperture.o
+XDRIVER= aperture
+X
+X#
+X# Make rules
+Xall: $(DRIVER)
+X
+X$(DRIVER): $(OBJS)
+X rm -f $(DRIVER)
+X ld -r -o $(DRIVER) $(OBJS)
+X
+Xinstall: $(DRIVER)
+X cp aperture.conf /kernel/drv
+X cp $(DRIVER) /kernel/drv/amd64
+X
+Xadd_drv:
+X add_drv aperture
+X
+Xclean:
+X rm -f *% *.BAK $(OBJS) $(DRIVER) core
+X
+X.SUFFIXES: .i
+X
+X.c.i:
+X $(CC) -E $(CFLAGS) $*.c > $@
+END-of-./aperture/Makefile.amd64
+echo x - ./aperture/Makefile.sparcv9
+sed 's/^X//' >./aperture/Makefile.sparcv9 << 'END-of-./aperture/Makefile.sparcv9'
+X#
+X# File: makefile for aperture Framebuffer Driver
+X# Author: Doug Anson (danson@lgc.com)
+X# Date: 2/15/94
+X# Modified: David Holland (davidh@use.com)
+X# Date: 2/23/94
+X# - Changed name, and debugging structure
+X# Modified: Marc Aurele La France (tsi@xfree86.org)
+X# Date: 2001.06.08
+X# - SPARC support, cleanup and turf aptest.
+X# Modified: Martin Bochnig (martin@martux.org)
+X# Date: 2006.06.24
+X# - Changed name for generic sparcv9 support
+X# - updated to better work with Solaris 10 and 11
+X#
+X
+X#
+X# GNU gcc compiler, version 3.2 or later
+X#
+XCC=gcc
+XCFLGS=-fno-builtin -Wall -O3 -m64
+X
+X#
+X# SUNWspro compiler
+X#CC=/opt/SUNWspro/bin/cc
+X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
+X
+X#
+X# Debug error reporting
+X#DEBUG_FLG=
+X#DEBUG_FLG=-DAPERTURE_DEBUG
+X
+X#
+X# Files and object declarations
+XKERNEL_FLGS=-D_KERNEL -DSUNDDI
+XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
+XCFILES= aperture.c
+XOBJS= aperture.o
+XDRIVER= aperture
+X
+X#
+X# Make rules
+Xall: $(DRIVER)
+X
+X$(DRIVER): $(OBJS)
+X rm -f $(DRIVER)
+X ld -r -o $(DRIVER) $(OBJS)
+X
+Xinstall: $(DRIVER)
+X cp aperture.conf /kernel/drv
+X cp $(DRIVER) /kernel/drv/sparcv9
+X
+Xadd_drv:
+X add_drv aperture
+X
+Xclean:
+X rm -f *% *.BAK $(OBJS) $(DRIVER) core
+X
+X.SUFFIXES: .i
+X
+X.c.i:
+X $(CC) -E $(CFLAGS) $*.c > $@
+END-of-./aperture/Makefile.sparcv9
+echo x - ./aperture/README
+sed 's/^X//' >./aperture/README << 'END-of-./aperture/README'
+XFramebuffer aperture driver.
+X
+XThis driver was written to provide a device that, unlike /dev/mem, allows
+Xmmap()'ing of ranges beyond installed memory.
+X
+XThe original x86-based version of this driver was the collaborative work of
+XDoug Anson (danson@lgc.com), and David Holland (davidh@use.com). It has since
+Xbeen rewritten to also work on sparc machines and - later on - also on sparcv9
+Xand recently amd64 64 bit kernels.
+XIt flawlessly compiles and installs on Solaris 10 and 11 now.
+X
+X
+XInstallation instructions:
+X
+X1) Check the Makefile, for appropriate CC, and CFLAGS definitions. Compiling
+X with APERTURE_DEBUG defined means the driver will generate reams of
+X debugging output. You'll probably want to leave this off...
+X
+X2) Type 'make' (or 'gmake'). Both the driver and test program should compile
+X without any problems. No warning messages should be generated.
+X
+X3) Become 'root'.
+X
+X4) Type 'make install' and 'make add_drv'. The screen should look something
+X like this:
+X
+X # make install
+X cp aperture aperture.conf /kernel/drv
+X # make add_drv
+X add_drv aperture
+X
+X On a sparcv9 machine this will mention the /kernel/drv/sparcv9 directory
+X instead of /kernel/drv. Similarily /kernel/drv/amd64 should be used on amd64.
+X
+X This installs the driver to the system.
+X
+X5) While as root modify the file /etc/devlink.tab, adding these lines:
+X
+X# The following entry is for the framebuffer driver
+Xtype=ddi_pseudo;name=aperture fbs/\M0
+X
+X Add that line exactly as shown. You may also simply add the
+X contents of the devlink.tab file supplied to /etc/devlink.tab.
+X It contains the lines as well. (Yes, that is a tab between
+X aperture and fbs, not spaces - very important)
+X
+X6) Perform a reconfiguration boot of the system.
+X
+X # touch /reconfigure
+X # init 6
+X
+XBug reports, questions, suggestions, etc can be sent to xfree86@xfree86.org.
+END-of-./aperture/README
+echo x - ./aperture/aperture.c
+sed 's/^X//' >./aperture/aperture.c << 'END-of-./aperture/aperture.c'
+X/*
+X * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
+X *
+X * Permission is hereby granted, free of charge, to any person obtaining a copy
+X * of this software and associated documentation files (the "Software"), to
+X * deal in the Software without restriction, including without limitation the
+X * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+X * sell copies of the Software, and to permit persons to whom the Software is
+X * furnished to do so, subject to the following conditions:
+X *
+X * The above copyright notice and this permission notice shall be included in
+X * all copies or substantial portions of the Software.
+X *
+X * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+X * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+X * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+X * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+X * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+X *
+X * Except as contained in this notice, the name of the XFree86 Project shall
+X * not be used in advertising or otherwise to promote the sale, use or other
+X * dealings in this Software without prior written authorization from the
+X * XFree86 Project.
+X */
+X
+X/*
+X * Aperture driver for Solaris.
+X */
+X
+X/*
+X * Modified: Martin Bochnig (martin@martux.org)
+X * Log: Commented out obsolete kernel interfaces DDI_IDENTIFIED and DDI_NOT_IDENTIFIED
+X * not supported by SunOS 5.10 or higher anymore,
+X * see http://docs.sun.com/app/docs/doc/819-2255/6n4ibnffr?a=view
+X */
+X
+X#include <sys/conf.h>
+X#include <sys/ddi.h>
+X#include <sys/modctl.h>
+X#include <sys/open.h>
+X#include <sys/stat.h>
+X#include <sys/sunddi.h>
+X
+X#define DEV_IDENT "aperture"
+X#define DEV_BANNER "XFree86 aperture driver"
+X
+X#ifndef D_64BIT
+X#define D_64BIT 0
+X#endif
+X
+X#ifndef NULL
+X#define NULL ((void *)0)
+X#endif
+X
+X/*
+X * open(9E)
+X */
+X/*ARGSUSED*/
+Xstatic int
+Xaperture_open
+X(
+X#ifdef __STDC__
+X dev_t *devp,
+X int flag,
+X int typ,
+X struct cred *cred
+X#endif
+X)
+X#ifndef __STDC__
+X dev_t *devp;
+X int flag;
+X int typ;
+X struct cred *cred;
+X#endif
+X{
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering open()\n");
+X
+X#endif
+X
+X if ((typ != OTYP_CHR) || (getminor(*devp)))
+X error = EINVAL;
+X else
+X error = 0;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving open() = %d\n", error);
+X
+X#endif
+X
+X return error;
+X}
+X
+X/*
+X * mmap(9E)
+X */
+X/*ARGSUSED*/
+Xstatic int
+Xaperture_mmap
+X(
+X#ifdef __STDC__
+X dev_t dev,
+X off_t off,
+X int prot
+X#endif
+X)
+X#ifndef __STDC__
+X dev_t dev;
+X off_t off;
+X int prot;
+X#endif
+X{
+X pfn_t pf;
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering mmap(0x%016lx)\n", off);
+X
+X#endif
+X
+X pf = btop((unsigned long)off);
+X
+X /* Deal with mmap(9E) interface limits */
+X error = (int)pf;
+X if ((error < 0) || (pf != (pfn_t)error))
+X error = -1;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving mmap() = 0x%08lx", error);
+X
+X#endif
+X
+X return error;
+X}
+X
+Xstatic struct cb_ops aperture_cb_ops =
+X{
+X aperture_open, /* open */
+X nulldev, /* close */
+X nodev, /* strategy */
+X nodev, /* print */
+X nodev, /* dump */
+X nodev, /* read */
+X nodev, /* write */
+X nodev, /* ioctl */
+X nodev, /* devmap */
+X aperture_mmap, /* mmap */
+X ddi_segmap, /* segmap */
+X nochpoll, /* poll */
+X ddi_prop_op, /* cb_prop_op */
+X 0, /* streamtab */
+X D_NEW | D_MP | D_64BIT /* Driver compatibility flag */
+X};
+X
+X
+Xstatic dev_info_t *aperture_dip; /* private copy of devinfo pointer */
+X
+X/*
+X * getinfo(9E)
+X */
+X/*ARGSUSED*/
+Xstatic int
+Xaperture_getinfo
+X(
+X#ifdef __STDC__
+X dev_info_t *dip,
+X ddi_info_cmd_t infocmd,
+X void *arg,
+X void **result
+X#endif
+X)
+X#ifndef __STDC__
+X dev_info_t *dip;
+X ddi_info_cmd_t infocmd;
+X void *arg;
+X void **result;
+X#endif
+X{
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering getinfo()\n");
+X
+X#endif
+X
+X switch (infocmd) {
+X case DDI_INFO_DEVT2DEVINFO:
+X *result = aperture_dip;
+X error = DDI_SUCCESS;
+X break;
+X case DDI_INFO_DEVT2INSTANCE:
+X *result = NULL;
+X error = DDI_SUCCESS;
+X break;
+X default:
+X error = DDI_FAILURE;
+X }
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving getinfo() = %d\n", error);
+X
+X#endif
+X
+X return error;
+X}
+X
+X/*
+X * identify(9E)
+X */
+X/*ARGSUSED*/
+Xstatic int
+Xaperture_identify
+X(
+X#ifdef __STDC__
+X dev_info_t *dip
+X#endif
+X)
+X#ifndef __STDC__
+X dev_info_t *dip;
+X#endif
+X{
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering identify()\n");
+X
+X#endif
+X
+X if (strcmp(ddi_get_name(dip), DEV_IDENT))
+X error = 1 /* DDI_NOT_IDENTIFIED obsolete since SunOS 5.10 */ ;
+X else
+X error = 2 /* DDI_IDENTIFIED obsolete since SunOS 5.10 */ ;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving identify() = %d\n", error);
+X
+X#endif
+X
+X return error;
+X}
+X
+X/*
+X * attach(9E)
+X */
+X/*ARGSUSED*/
+Xstatic int
+Xaperture_attach
+X(
+X#ifdef __STDC__
+X dev_info_t *dip,
+X ddi_attach_cmd_t cmd
+X#endif
+X)
+X#ifndef __STDC__
+X dev_info_t *dip;
+X ddi_attach_cmd_t cmd;
+X#endif
+X{
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering attach()\n");
+X
+X#endif
+X
+X if (cmd != DDI_ATTACH)
+X {
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": not attach(, DDI_ATTACH)\n");
+X
+X#endif
+X
+X error = DDI_FAILURE;
+X }
+X else
+X {
+X error = ddi_create_minor_node(dip, ddi_get_name(dip), S_IFCHR,
+X (minor_t)ddi_get_instance(dip),
+X NULL, 0 /* NODESPECIFIC_DEV obsolete since SunOS 5.10 */ );
+X
+X if (error == DDI_SUCCESS)
+X {
+X aperture_dip = dip;
+X ddi_report_dev(dip);
+X }
+X }
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving attach() = %d\n", error);
+X
+X#endif
+X
+X return error;
+X}
+X
+X/*
+X * detach(9E)
+X */
+Xstatic int
+Xaperture_detach
+X(
+X#ifdef __STDC__
+X dev_info_t *dip,
+X ddi_detach_cmd_t cmd
+X#endif
+X)
+X#ifndef __STDC__
+X dev_info_t *dip;
+X ddi_detach_cmd_t cmd;
+X#endif
+X{
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering detach()\n");
+X
+X#endif
+X
+X if (cmd != DDI_DETACH)
+X {
+X error = DDI_FAILURE;
+X }
+X else
+X {
+X ddi_remove_minor_node(dip, NULL);
+X aperture_dip = NULL;
+X error = DDI_SUCCESS;
+X }
+X
+X#if APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving detach() = %d\n", error);
+X
+X#endif
+X
+X return error;
+X}
+X
+X
+Xstatic struct dev_ops aperture_ops =
+X{
+X DEVO_REV, /* revision */
+X 0, /* refcnt */
+X aperture_getinfo, /* getinfo */
+X aperture_identify, /* identify */
+X nulldev, /* probe */
+X aperture_attach, /* attach */
+X aperture_detach, /* detach */
+X nodev, /* reset */
+X &aperture_cb_ops, /* driver operations */
+X NULL /* bus operations */
+X};
+X
+X
+Xstatic struct modldrv modldrv =
+X{
+X &mod_driverops, /* mod_ops structure pointer */
+X DEV_BANNER, /* driver banner string */
+X &aperture_ops, /* dev_ops structure pointer */
+X};
+X
+X
+Xstatic struct modlinkage modlinkage =
+X{
+X MODREV_1, /* module API revision */
+X {
+X &modldrv, /* module driver structure pointer */
+X NULL /* list termination */
+X }
+X};
+X
+X
+X/*
+X * _init(9E)
+X */
+Xint
+X_init
+X(
+X#ifdef __STDC__
+X void
+X#endif
+X)
+X{
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering _init()\n");
+X
+X#endif
+X
+X error = mod_install(&modlinkage);
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving _init() = %d\n", error);
+X
+X#endif
+X
+X return error;
+X}
+X
+X/*
+X * _info(9E)
+X */
+Xint
+X_info
+X(
+X#ifdef __STDC__
+X struct modinfo *modinfop
+X#endif
+X)
+X#ifndef __STDC__
+X struct modinfo *modinfop;
+X#endif
+X{
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering _info()\n");
+X
+X#endif
+X
+X error = mod_info(&modlinkage, modinfop);
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving _info() = %d\n", error);
+X
+X#endif
+X
+X return error;
+X}
+X
+X/*
+X * _fini(9E)
+X */
+Xint
+X_fini
+X(
+X#ifdef __STDC__
+X void
+X#endif
+X)
+X{
+X int error;
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": entering _fini()\n");
+X
+X#endif
+X
+X error = mod_remove(&modlinkage);
+X
+X#ifdef APERTURE_DEBUG
+X
+X cmn_err(CE_CONT, DEV_IDENT ": leaving _fini() = %d\n", error);
+X
+X#endif
+X
+X return error;
+X}
+END-of-./aperture/aperture.c
+echo x - ./aperture/aperture.conf
+sed 's/^X//' >./aperture/aperture.conf << 'END-of-./aperture/aperture.conf'
+X#
+X# Copyright 1994 Doug Anson, danson@lgc.com & David Holland, davidh@use.com
+X#
+X# File: aperture.conf
+X# Author: Doug Anson (danson@lgc.com)
+X#
+X# Modified: David Holland (davidh@use.com)
+X# Log: Change comments 02/23/94
+X# Change defaults/comments 09/25/94
+X#
+X# Modified: Marc Aurele La France (tsi@xfree86.org)
+X# Log: SPARC changes 2001.09
+X#
+X# Purpose: This conf file is used by the aperture driver.
+X#
+Xname="aperture" parent="pseudo";
+END-of-./aperture/aperture.conf
+echo x - ./aperture/devlink.tab
+sed 's/^X//' >./aperture/devlink.tab << 'END-of-./aperture/devlink.tab'
+X# The following entry is for the aperture driver
+Xtype=ddi_pseudo;name=aperture fbs/\M0
+END-of-./aperture/devlink.tab
+exit
+
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_inout.s b/xorg-server/hw/xfree86/os-support/solaris/sun_inout.s
index c13ba8b2f..e8f03d0e8 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_inout.s
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_inout.s
@@ -1,124 +1,124 @@
-/ $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_inout.s,v 1.1 2001/05/28 02:42:31 tsi Exp $
-/
-/ Copyright 1994-2001 The XFree86 Project, Inc. All Rights Reserved.
-/
-/ Permission is hereby granted, free of charge, to any person obtaining a copy
-/ of this software and associated documentation files (the "Software"), to deal
-/ in the Software without restriction, including without limitation the rights
-/ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-/ copies of the Software, and to permit persons to whom the Software is
-/ furnished to do so, subject to the following conditions:
-/
-/ The above copyright notice and this permission notice shall be included in
-/ all copies or substantial portions of the Software.
-/
-/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-/ XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-/ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-/ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-/
-/ Except as contained in this notice, the name of the XFree86 Project shall not
-/ be used in advertising or otherwise to promote the sale, use or other
-/ dealings in this Software without prior written authorization from the
-/ XFree86 Project.
-/
-/
-/ File: sun_inout.s
-/
-/ Purpose: Provide inb(), inw(), inl(), outb(), outw(), outl() functions
-/ for Solaris x86 using the ProWorks compiler by SunPro
-/
-/ Author: Installed into XFree86 SuperProbe by Doug Anson (danson@lgc.com)
-/ Portions donated to XFree86 by Steve Dever (Steve.Dever@Eng.Sun.Com)
-/
-/ Synopsis: (c callable external declarations)
-/ extern unsigned char inb(int port);
-/ extern unsigned short inw(int port);
-/ extern unsigned long inl(int port);
-/ extern void outb(int port, unsigned char value);
-/ extern void outw(int port, unsigned short value);
-/ extern void outl(int port, unsigned long value);
-/
-
-.file "sunos_inout.s"
-.text
-
-.globl inb
-.globl inw
-.globl inl
-.globl outb
-.globl outw
-.globl outl
-
-/
-/ unsigned char inb(int port);
-/
-.align 4
-inb:
- movl 4(%esp),%edx
- subl %eax,%eax
- inb (%dx)
- ret
-.type inb,@function
-.size inb,.-inb
-
-/
-/ unsigned short inw(int port);
-/
-.align 4
-inw:
- movl 4(%esp),%edx
- subl %eax,%eax
- inw (%dx)
- ret
-.type inw,@function
-.size inw,.-inw
-
-/
-/ unsigned long inl(int port);
-/
-.align 4
-inl:
- movl 4(%esp),%edx
- inl (%dx)
- ret
-.type inl,@function
-.size inl,.-inl
-
-/
-/ void outb(int port, unsigned char value);
-/
-.align 4
-outb:
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- outb (%dx)
- ret
-.type outb,@function
-.size outb,.-outb
-
-/
-/ void outw(int port, unsigned short value);
-/
-.align 4
-outw:
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- outw (%dx)
- ret
-.type outw,@function
-.size outw,.-outw
-
-/
-/ void outl(int port, unsigned long value);
-/
-.align 4
-outl:
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- outl (%dx)
- ret
-.type outl,@function
-.size outl,.-outl
+/ $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_inout.s,v 1.1 2001/05/28 02:42:31 tsi Exp $
+/
+/ Copyright 1994-2001 The XFree86 Project, Inc. All Rights Reserved.
+/
+/ Permission is hereby granted, free of charge, to any person obtaining a copy
+/ of this software and associated documentation files (the "Software"), to deal
+/ in the Software without restriction, including without limitation the rights
+/ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+/ copies of the Software, and to permit persons to whom the Software is
+/ furnished to do so, subject to the following conditions:
+/
+/ The above copyright notice and this permission notice shall be included in
+/ all copies or substantial portions of the Software.
+/
+/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+/ XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+/ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+/ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+/
+/ Except as contained in this notice, the name of the XFree86 Project shall not
+/ be used in advertising or otherwise to promote the sale, use or other
+/ dealings in this Software without prior written authorization from the
+/ XFree86 Project.
+/
+/
+/ File: sun_inout.s
+/
+/ Purpose: Provide inb(), inw(), inl(), outb(), outw(), outl() functions
+/ for Solaris x86 using the ProWorks compiler by SunPro
+/
+/ Author: Installed into XFree86 SuperProbe by Doug Anson (danson@lgc.com)
+/ Portions donated to XFree86 by Steve Dever (Steve.Dever@Eng.Sun.Com)
+/
+/ Synopsis: (c callable external declarations)
+/ extern unsigned char inb(int port);
+/ extern unsigned short inw(int port);
+/ extern unsigned long inl(int port);
+/ extern void outb(int port, unsigned char value);
+/ extern void outw(int port, unsigned short value);
+/ extern void outl(int port, unsigned long value);
+/
+
+.file "sunos_inout.s"
+.text
+
+.globl inb
+.globl inw
+.globl inl
+.globl outb
+.globl outw
+.globl outl
+
+/
+/ unsigned char inb(int port);
+/
+.align 4
+inb:
+ movl 4(%esp),%edx
+ subl %eax,%eax
+ inb (%dx)
+ ret
+.type inb,@function
+.size inb,.-inb
+
+/
+/ unsigned short inw(int port);
+/
+.align 4
+inw:
+ movl 4(%esp),%edx
+ subl %eax,%eax
+ inw (%dx)
+ ret
+.type inw,@function
+.size inw,.-inw
+
+/
+/ unsigned long inl(int port);
+/
+.align 4
+inl:
+ movl 4(%esp),%edx
+ inl (%dx)
+ ret
+.type inl,@function
+.size inl,.-inl
+
+/
+/ void outb(int port, unsigned char value);
+/
+.align 4
+outb:
+ movl 4(%esp),%edx
+ movl 8(%esp),%eax
+ outb (%dx)
+ ret
+.type outb,@function
+.size outb,.-outb
+
+/
+/ void outw(int port, unsigned short value);
+/
+.align 4
+outw:
+ movl 4(%esp),%edx
+ movl 8(%esp),%eax
+ outw (%dx)
+ ret
+.type outw,@function
+.size outw,.-outw
+
+/
+/ void outl(int port, unsigned long value);
+/
+.align 4
+outl:
+ movl 4(%esp),%edx
+ movl 8(%esp),%eax
+ outl (%dx)
+ ret
+.type outl,@function
+.size outl,.-outl
diff --git a/xorg-server/hw/xfree86/ramdac/CURSOR.NOTES b/xorg-server/hw/xfree86/ramdac/CURSOR.NOTES
index a0ecd02ae..726e2edc1 100644
--- a/xorg-server/hw/xfree86/ramdac/CURSOR.NOTES
+++ b/xorg-server/hw/xfree86/ramdac/CURSOR.NOTES
@@ -1,191 +1,191 @@
- CURSOR.NOTES
-
- This file describes how to add hardware cursor support to a chipset
-driver. Though the cursor support itself is in the ramdac module,
-cursor management is separate from the rest of the module.
-
-
-1) CURSOR INITIALIZATION AND SHUTDOWN
-
- All relevant prototypes and defines are in xf86Cursor.h.
-
- To initialize the cursor, the driver should allocate an
-xf86CursorInfoRec via xf86CreateCursorInfoRec(), fill it out as described
-later in this document and pass it to xf86InitCursor(). xf86InitCursor()
-must be called _after_ the software cursor initialization (usually
-miDCInitialize).
-
- When shutting down, the driver should free the xf86CursorInfoRec
-structure in its CloseScreen function via xf86DestroyCursorInfoRec().
-
-
-2) FILLING OUT THE xf86CursorInfoRec
-
- The driver informs the ramdac module of it's hardware cursor capablities by
-filling out an xf86CursorInfoRec structure and passing it to xf86InitCursor().
-The xf86CursorInfoRec contains the following function pointers:
-
-
-/**** These functions are required ****/
-
-void ShowCursor(ScrnInfoPtr pScrn)
-
- ShowCursor should display the current cursor.
-
-void HideCursor(ScrnInfoPtr pScrn)
-
- HideCursor should hide the current cursor.
-
-void SetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
-
- Set the cursor position to (x,y). X and/or y may be negative
- indicating that the cursor image is partially offscreen on
- the left and/or top edges of the screen. It is up to the
- driver to trap for this and deal with that situation.
-
-void SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
-
- Set the cursor foreground and background colors. In 8bpp, fg and
- bg are indicies into the current colormap unless the
- HARDWARE_CURSOR_TRUECOLOR_AT_8BPP flag is set. In that case
- and in all other bpps the fg and bg are in 8-8-8 RGB format.
-
-void LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *bits)
-
- LoadCursorImage is how the hardware cursor bits computed by the
- RealizeCursor function will be passed to the driver when the cursor
- shape needs to be changed.
-
-
-/**** These functions are optional ****/
-
-
-unsigned char* RealizeCursor(xf86CursorInfoPtr infoPtr, CursorPtr pCurs)
-
- If RealizeCursor is not provided by the driver, one will be provided
- for you based on the Flags field described below. The driver must
- provide this function if the hardware cursor format is not one of
- the common ones supported by this module.
-
-
-Bool UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs)
-
- If the driver is unable to use a hardware cursor for reasons
- other than the cursor being larger than the maximum specified
- in the MaxWidth or MaxHeight field below, it can supply the
- UseHWCursor function. If UseHWCursor is provided by the driver,
- it will be called whenever the cursor shape changes or the video
- mode changes. This is useful for when the hardware cursor cannot
- be used in interlaced or doublescan modes.
-
-
-/**** The following fields are required ****/
-
-MaxWidth
-MaxHeight
-
- These indicate the largest sized cursor that can be a hardware
- cursor. It will fall back to a software cursor when a cursor
- exceeding this size needs to be used.
-
-
-Flags
-
- /* Color related flags */
-
- HARDWARE_CURSOR_TRUECOLOR_AT_8BPP
-
- This indicates that the colors passed to the SetCursorColors
- function should not be in 8-8-8 RGB format in 8bpp but rather,
- they should be the pixel values from the current colormap.
-
-
- /* Cursor data loading flags */
-
- HARDWARE_CURSOR_SHOW_TRANSPARENT
-
- The HideCursor entry will normally be called instead of displaying a
- completely transparent cursor, or when a switch to a software cursor
- needs to occur. This flag prevents this behaviour, thus causing the
- LoadCursorImage entry to be called with transparent cursor data.
- NOTE: If you use this flag and provide your own RealizeCursor() entry,
- ensure this entry returns transparent cursor data when called
- with a NULL pCurs parameter.
-
- HARDWARE_CURSOR_UPDATE_UNHIDDEN
-
- This flag prevents the HideCursor call that would normally occur just before
- the LoadCursorImage entry is to be called to load a new hardware cursor
- image.
-
-
- /* Cursor data packing flags */
-
- Hardware cursor data consists of two pieces, a source and a mask.
- The mask is a bitmap indicating which parts of the cursor are
- transparent and which parts are drawn. The source is a bitmap
- indicating which parts of the non-transparent portion of the the
- cursor should be painted in the foreground color and which should
- be painted in the background color.
-
- HARDWARE_CURSOR_INVERT_MASK
-
- By default, set bits indicate the opaque part of the mask bitmap
- and clear bits indicate the transparent part. If your hardware
- wants this the opposite way, this flag will invert the mask.
-
- HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK
-
- By default, RealizeCursor will store the source first and then
- the mask. If the hardware needs this order reversed then this
- flag should be set.
-
- HARDWARE_CURSOR_AND_SOURCE_WITH_MASK
-
- This flag will have the module logical AND the source with the mask to make
- sure there are no source bits set if the corresponding mask bits
- aren't set. Some hardware will not care if source bits are set where
- there are supposed to be transparent areas, but some hardware will
- interpret this as a third cursor color or similar. That type of
- hardware will need this flag set.
-
- HARDWARE_CURSOR_BIT_ORDER_MSBFIRST
-
- By default, it is assumed that the least significant bit in each byte
- corresponds to the leftmost pixel on the screen. If your hardware
- has this reversed you should set this flag.
-
- HARDWARE_CURSOR_NIBBLE_SWAPPED
-
- If your hardware requires byte swapping of the hardware cursor, enable
- this option.
-
-
- /* Source-Mask interleaving flags */
-
- By default the source and mask data are inlined (source first unless
- the HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK flag is set). Some hardware
- will require the source and mask to be interleaved, that is, X number
- of source bits should packed and then X number of mask bits repeating
- until the entire pattern is stored. The following flags describe the
- bit interleave.
-
- HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED
-
- This one is the default.
-
- The following are for interleaved cursors.
-
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64
-
- And once again, if your hardware requires something different than
- these packing styles, your driver can supply its own RealizeCursor
- function.
-
-
-
-$XFree86: xc/programs/Xserver/hw/xfree86/ramdac/CURSOR.NOTES,v 1.4tsi Exp $
+ CURSOR.NOTES
+
+ This file describes how to add hardware cursor support to a chipset
+driver. Though the cursor support itself is in the ramdac module,
+cursor management is separate from the rest of the module.
+
+
+1) CURSOR INITIALIZATION AND SHUTDOWN
+
+ All relevant prototypes and defines are in xf86Cursor.h.
+
+ To initialize the cursor, the driver should allocate an
+xf86CursorInfoRec via xf86CreateCursorInfoRec(), fill it out as described
+later in this document and pass it to xf86InitCursor(). xf86InitCursor()
+must be called _after_ the software cursor initialization (usually
+miDCInitialize).
+
+ When shutting down, the driver should free the xf86CursorInfoRec
+structure in its CloseScreen function via xf86DestroyCursorInfoRec().
+
+
+2) FILLING OUT THE xf86CursorInfoRec
+
+ The driver informs the ramdac module of it's hardware cursor capablities by
+filling out an xf86CursorInfoRec structure and passing it to xf86InitCursor().
+The xf86CursorInfoRec contains the following function pointers:
+
+
+/**** These functions are required ****/
+
+void ShowCursor(ScrnInfoPtr pScrn)
+
+ ShowCursor should display the current cursor.
+
+void HideCursor(ScrnInfoPtr pScrn)
+
+ HideCursor should hide the current cursor.
+
+void SetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
+
+ Set the cursor position to (x,y). X and/or y may be negative
+ indicating that the cursor image is partially offscreen on
+ the left and/or top edges of the screen. It is up to the
+ driver to trap for this and deal with that situation.
+
+void SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
+
+ Set the cursor foreground and background colors. In 8bpp, fg and
+ bg are indicies into the current colormap unless the
+ HARDWARE_CURSOR_TRUECOLOR_AT_8BPP flag is set. In that case
+ and in all other bpps the fg and bg are in 8-8-8 RGB format.
+
+void LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *bits)
+
+ LoadCursorImage is how the hardware cursor bits computed by the
+ RealizeCursor function will be passed to the driver when the cursor
+ shape needs to be changed.
+
+
+/**** These functions are optional ****/
+
+
+unsigned char* RealizeCursor(xf86CursorInfoPtr infoPtr, CursorPtr pCurs)
+
+ If RealizeCursor is not provided by the driver, one will be provided
+ for you based on the Flags field described below. The driver must
+ provide this function if the hardware cursor format is not one of
+ the common ones supported by this module.
+
+
+Bool UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs)
+
+ If the driver is unable to use a hardware cursor for reasons
+ other than the cursor being larger than the maximum specified
+ in the MaxWidth or MaxHeight field below, it can supply the
+ UseHWCursor function. If UseHWCursor is provided by the driver,
+ it will be called whenever the cursor shape changes or the video
+ mode changes. This is useful for when the hardware cursor cannot
+ be used in interlaced or doublescan modes.
+
+
+/**** The following fields are required ****/
+
+MaxWidth
+MaxHeight
+
+ These indicate the largest sized cursor that can be a hardware
+ cursor. It will fall back to a software cursor when a cursor
+ exceeding this size needs to be used.
+
+
+Flags
+
+ /* Color related flags */
+
+ HARDWARE_CURSOR_TRUECOLOR_AT_8BPP
+
+ This indicates that the colors passed to the SetCursorColors
+ function should not be in 8-8-8 RGB format in 8bpp but rather,
+ they should be the pixel values from the current colormap.
+
+
+ /* Cursor data loading flags */
+
+ HARDWARE_CURSOR_SHOW_TRANSPARENT
+
+ The HideCursor entry will normally be called instead of displaying a
+ completely transparent cursor, or when a switch to a software cursor
+ needs to occur. This flag prevents this behaviour, thus causing the
+ LoadCursorImage entry to be called with transparent cursor data.
+ NOTE: If you use this flag and provide your own RealizeCursor() entry,
+ ensure this entry returns transparent cursor data when called
+ with a NULL pCurs parameter.
+
+ HARDWARE_CURSOR_UPDATE_UNHIDDEN
+
+ This flag prevents the HideCursor call that would normally occur just before
+ the LoadCursorImage entry is to be called to load a new hardware cursor
+ image.
+
+
+ /* Cursor data packing flags */
+
+ Hardware cursor data consists of two pieces, a source and a mask.
+ The mask is a bitmap indicating which parts of the cursor are
+ transparent and which parts are drawn. The source is a bitmap
+ indicating which parts of the non-transparent portion of the the
+ cursor should be painted in the foreground color and which should
+ be painted in the background color.
+
+ HARDWARE_CURSOR_INVERT_MASK
+
+ By default, set bits indicate the opaque part of the mask bitmap
+ and clear bits indicate the transparent part. If your hardware
+ wants this the opposite way, this flag will invert the mask.
+
+ HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK
+
+ By default, RealizeCursor will store the source first and then
+ the mask. If the hardware needs this order reversed then this
+ flag should be set.
+
+ HARDWARE_CURSOR_AND_SOURCE_WITH_MASK
+
+ This flag will have the module logical AND the source with the mask to make
+ sure there are no source bits set if the corresponding mask bits
+ aren't set. Some hardware will not care if source bits are set where
+ there are supposed to be transparent areas, but some hardware will
+ interpret this as a third cursor color or similar. That type of
+ hardware will need this flag set.
+
+ HARDWARE_CURSOR_BIT_ORDER_MSBFIRST
+
+ By default, it is assumed that the least significant bit in each byte
+ corresponds to the leftmost pixel on the screen. If your hardware
+ has this reversed you should set this flag.
+
+ HARDWARE_CURSOR_NIBBLE_SWAPPED
+
+ If your hardware requires byte swapping of the hardware cursor, enable
+ this option.
+
+
+ /* Source-Mask interleaving flags */
+
+ By default the source and mask data are inlined (source first unless
+ the HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK flag is set). Some hardware
+ will require the source and mask to be interleaved, that is, X number
+ of source bits should packed and then X number of mask bits repeating
+ until the entire pattern is stored. The following flags describe the
+ bit interleave.
+
+ HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED
+
+ This one is the default.
+
+ The following are for interleaved cursors.
+
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64
+
+ And once again, if your hardware requires something different than
+ these packing styles, your driver can supply its own RealizeCursor
+ function.
+
+
+
+$XFree86: xc/programs/Xserver/hw/xfree86/ramdac/CURSOR.NOTES,v 1.4tsi Exp $
diff --git a/xorg-server/hw/xfree86/vgahw/Makefile.am b/xorg-server/hw/xfree86/vgahw/Makefile.am
index 0634e47e3..f48e46a11 100644
--- a/xorg-server/hw/xfree86/vgahw/Makefile.am
+++ b/xorg-server/hw/xfree86/vgahw/Makefile.am
@@ -1,9 +1,9 @@
-module_LTLIBRARIES = libvgahw.la
-libvgahw_la_LDFLAGS = -avoid-version
-libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c
-INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-
-sdk_HEADERS = vgaHW.h
-
-EXTRA_DIST = vgaCmap.c
+module_LTLIBRARIES = libvgahw.la
+libvgahw_la_LDFLAGS = -avoid-version
+libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+
+sdk_HEADERS = vgaHW.h
+
+EXTRA_DIST = vgaCmap.c
diff --git a/xorg-server/hw/xfree86/x86emu/Makefile.am b/xorg-server/hw/xfree86/x86emu/Makefile.am
index c4108cffb..df9697767 100644
--- a/xorg-server/hw/xfree86/x86emu/Makefile.am
+++ b/xorg-server/hw/xfree86/x86emu/Makefile.am
@@ -1,29 +1,29 @@
-if INT10_X86EMU
-noinst_LTLIBRARIES = libx86emu.la
-endif
-
-libx86emu_la_SOURCES = debug.c \
- decode.c \
- fpu.c \
- ops2.c \
- ops.c \
- prim_ops.c \
- sys.c \
- x86emu.h
-
-INCLUDES =
-
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-
-EXTRA_DIST = validate.c \
- x86emu/debug.h \
- x86emu/decode.h \
- x86emu/fpu.h \
- x86emu/fpu_regs.h \
- x86emu/ops.h \
- x86emu/prim_asm.h \
- x86emu/prim_ops.h \
- x86emu/prim_x86_gcc.h \
- x86emu/regs.h \
- x86emu/types.h \
- x86emu/x86emui.h
+if INT10_X86EMU
+noinst_LTLIBRARIES = libx86emu.la
+endif
+
+libx86emu_la_SOURCES = debug.c \
+ decode.c \
+ fpu.c \
+ ops2.c \
+ ops.c \
+ prim_ops.c \
+ sys.c \
+ x86emu.h
+
+INCLUDES =
+
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+
+EXTRA_DIST = validate.c \
+ x86emu/debug.h \
+ x86emu/decode.h \
+ x86emu/fpu.h \
+ x86emu/fpu_regs.h \
+ x86emu/ops.h \
+ x86emu/prim_asm.h \
+ x86emu/prim_ops.h \
+ x86emu/prim_x86_gcc.h \
+ x86emu/regs.h \
+ x86emu/types.h \
+ x86emu/x86emui.h