diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 19:39:46 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 19:39:46 +0000 |
commit | 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch) | |
tree | c1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/hw/xfree86/os-support/linux | |
parent | dc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff) | |
download | vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2 vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip |
Added xorg-server-1.6.2.tar.gz
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/linux')
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/Makefile.am | 9 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/Makefile.in | 96 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/int10/linux.c | 21 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnxResource.c | 104 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_axp.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_bell.c | 1 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_init.c | 54 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c | 180 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_mouse.c | 221 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_video.c | 221 |
11 files changed, 71 insertions, 840 deletions
diff --git a/xorg-server/hw/xfree86/os-support/linux/Makefile.am b/xorg-server/hw/xfree86/os-support/linux/Makefile.am index beaae3d5b..da1dcf690 100644 --- a/xorg-server/hw/xfree86/os-support/linux/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/linux/Makefile.am @@ -2,7 +2,6 @@ noinst_LTLIBRARIES = liblinux.la if LINUX_IA64 PLATFORM_PCI_SUPPORT = $(srcdir)/../shared/ia64Pci.c -PLATFORM_DEFINES = -DOS_PROBE_PCI_CHIPSET=lnxProbePciChipset PLATFORM_INCLUDES = -I$(srcdir)/../shared endif if LINUX_ALPHA @@ -26,7 +25,7 @@ APM_SRCS = lnx_apm.c XORG_CFLAGS += -DHAVE_APM endif -liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ +liblinux_la_SOURCES = lnx_init.c lnx_video.c \ lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c \ $(srcdir)/../shared/VTsw_usl.c \ @@ -40,13 +39,11 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) -INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack +INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) # FIXME: These need to be added to the build LNX_EXTRA_SRCS = \ - lnx_font.c \ - lnx_jstk.c \ - lnxResource.c + lnx_font.c EXTRA_DIST = \ $(LNX_EXTRA_SRCS) \ diff --git a/xorg-server/hw/xfree86/os-support/linux/Makefile.in b/xorg-server/hw/xfree86/os-support/linux/Makefile.in index a753ac9a0..2d3aa3e34 100644 --- a/xorg-server/hw/xfree86/os-support/linux/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/linux/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -46,7 +46,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -54,8 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @LINUX_ALPHA_TRUE@liblinux_la_DEPENDENCIES = liblinuxev56.la -am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_mouse.c \ - lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ +am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_pci.c \ + lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c $(srcdir)/../shared/stdResource.c \ @@ -65,9 +64,9 @@ am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_mouse.c \ @LNXAPM_TRUE@am__objects_2 = lnx_apm.lo @LINUX_ALPHA_FALSE@@LINUX_IA64_TRUE@am__objects_3 = ia64Pci.lo @LINUX_ALPHA_TRUE@am__objects_3 = lnx_axp.lo xf86Axp.lo -am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_mouse.lo \ - lnx_pci.lo lnx_agp.lo lnx_kmod.lo lnx_bell.lo bios_mmap.lo \ - VTsw_usl.lo posix_tty.lo vidmem.lo sigio.lo stdResource.lo \ +am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_pci.lo \ + lnx_agp.lo lnx_kmod.lo lnx_bell.lo bios_mmap.lo VTsw_usl.lo \ + posix_tty.lo vidmem.lo sigio.lo stdResource.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) liblinux_la_OBJECTS = $(am_liblinux_la_OBJECTS) liblinuxev56_la_LIBADD = @@ -84,9 +83,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -102,8 +98,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -124,10 +121,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -149,6 +142,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -158,18 +152,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -188,7 +179,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -202,7 +193,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -214,8 +208,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -224,8 +217,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -258,7 +251,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -268,27 +260,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -299,10 +276,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ $(am__append_2) $(am__append_3) XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -311,13 +284,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -350,8 +318,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -371,7 +338,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -381,12 +347,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -404,21 +370,18 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LTLIBRARIES = liblinux.la $(am__append_1) @LINUX_ALPHA_TRUE@PLATFORM_PCI_SUPPORT = \ @LINUX_ALPHA_TRUE@ $(srcdir)/lnx_axp.c \ @LINUX_ALPHA_TRUE@ $(srcdir)/../shared/xf86Axp.c @LINUX_IA64_TRUE@PLATFORM_PCI_SUPPORT = $(srcdir)/../shared/ia64Pci.c -@LINUX_IA64_TRUE@PLATFORM_DEFINES = -DOS_PROBE_PCI_CHIPSET=lnxProbePciChipset @LINUX_IA64_TRUE@PLATFORM_INCLUDES = -I$(srcdir)/../shared @LINUX_ALPHA_TRUE@liblinuxev56_la_CFLAGS = $(AM_CFLAGS) -mcpu=ev56 @LINUX_ALPHA_TRUE@liblinuxev56_la_SOURCES = lnx_ev56.c @LNXACPI_TRUE@ACPI_SRCS = lnx_acpi.c lnx_apm.c @LNXAPM_TRUE@APM_SRCS = lnx_apm.c -liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ +liblinux_la_SOURCES = lnx_init.c lnx_video.c \ lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c \ $(srcdir)/../shared/VTsw_usl.c \ @@ -431,13 +394,11 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ $(PLATFORM_PCI_SUPPORT) AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) -INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack +INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) # FIXME: These need to be added to the build LNX_EXTRA_SRCS = \ - lnx_font.c \ - lnx_jstk.c \ - lnxResource.c + lnx_font.c EXTRA_DIST = \ $(LNX_EXTRA_SRCS) \ @@ -453,8 +414,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -509,7 +470,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_bell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_kmod.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_mouse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_pci.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ @@ -620,7 +580,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c index 9e2c6199c..8274bbbfb 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c @@ -1,6 +1,6 @@ /* * linux specific part of the int10 module - * Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich + * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2008 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> @@ -245,14 +245,15 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) * 64K bytes at a time. */ if (!videoBiosMapped) { - (void)memset((pointer)V_BIOS, 0, SYS_BIOS - V_BIOS); + memset((pointer)V_BIOS, 0, SYS_BIOS - V_BIOS); #ifdef DEBUG ErrorF("Reading BIOS\n"); #endif for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE) xf86DrvMsg(screen, X_WARNING, - "Unable to retrieve all of segment 0x%06lX.\n", cs); + "Unable to retrieve all of segment 0x%06lX.\n", + (long)cs); #ifdef DEBUG ErrorF("done\n"); #endif @@ -292,10 +293,6 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) pInt->BIOSseg = V_BIOS >> 4; break; } - case BUS_ISA: - if (!xf86int10GetBiosSegment(pInt, NULL)) - goto error3; - break; default: goto error3; } @@ -357,7 +354,10 @@ MapCurrentInt10(xf86Int10InfoPtr pInt) "shmat(low_mem) error: %s\n",strerror(errno)); return FALSE; } - + if (mprotect((void*)0, V_RAM, PROT_READ|PROT_WRITE|PROT_EXEC) != 0) + xf86DrvMsg(pInt->scrnIndex, X_ERROR, + "Cannot set EXEC bit on low memory: %s\n", strerror(errno)); + if (((linuxInt10Priv*)pInt->private)->highMem >= 0) { addr = shmat(((linuxInt10Priv*)pInt->private)->highMem, (char*)HIGH_MEM, 0); @@ -368,6 +368,11 @@ MapCurrentInt10(xf86Int10InfoPtr pInt) "shmget error: %s\n",strerror(errno)); return FALSE; } + if (mprotect((void*)HIGH_MEM, HIGH_MEM_SIZE, + PROT_READ|PROT_WRITE|PROT_EXEC) != 0) + xf86DrvMsg(pInt->scrnIndex, X_ERROR, + "Cannot set EXEC bit on high memory: %s\n", + strerror(errno)); } else { if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if (mmap((void *)(V_BIOS), SYS_BIOS - V_BIOS, diff --git a/xorg-server/hw/xfree86/os-support/linux/lnxResource.c b/xorg-server/hw/xfree86/os-support/linux/lnxResource.c deleted file mode 100644 index 67af9db3d..000000000 --- a/xorg-server/hw/xfree86/os-support/linux/lnxResource.c +++ /dev/null @@ -1,104 +0,0 @@ - -/* Resource information code */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <X11/X.h> -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86Privstr.h" -#include "xf86Pci.h" -#include "xf86Resources.h" -#define NEED_OS_RAC_PROTOS -#include "xf86_OSlib.h" -#include "lnx.h" - -/* Avoid Imakefile changes */ -#include "bus/Pci.h" - -#ifdef INCLUDE_XF86_NO_DOMAIN - -#ifdef __alpha__ - -resPtr -xf86AccResFromOS(resPtr ret) -{ - resRange range; - - /* - * Fallback is to claim the following areas: - * - * 0x000c0000 - 0x000effff location of VGA and other extensions ROMS - */ - - RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* - * Fallback would be to claim well known ports in the 0x0 - 0x3ff range - * along with their sparse I/O aliases, but that's too imprecise. Instead - * claim a bare minimum here. - */ - RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */ - ret = xf86AddResToList(ret, &range, -1); - - /* - * At minimum, the top and bottom resources must be claimed, so that - * resources that are (or appear to be) unallocated can be relocated. - */ - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); -/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); */ - RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* XXX add others */ - return ret; -} - -#elif defined(__powerpc__) || \ - defined(__sparc__) || \ - defined(__mips__) || \ - defined(__sh__) || \ - defined(__mc68000__) || \ - defined(__arm__) || \ - defined(__s390__) || \ - defined(__hppa__) - -resPtr -xf86AccResFromOS(resPtr ret) -{ - resRange range; - - /* - * At minimum, the top and bottom resources must be claimed, so that - * resources that are (or appear to be) unallocated can be relocated. - */ - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); -#if defined(__sparc__) || defined(__powerpc__) - RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock); -#else - RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock); -#endif - ret = xf86AddResToList(ret, &range, -1); - - return ret; -} - -#else - -#error : Put your platform dependent code here!! - -#endif - -#endif /* INCLUDE_XF86_NO_DOMAIN */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c index a8ad161b6..e8b6d4749 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c @@ -179,7 +179,6 @@ _alpha_iobase_query(unsigned flags, int hose, int bus, int devfn) */ _iobase = _alpha_iobase; -#ifndef INCLUDE_XF86_NO_DOMAIN /* * Only take over the inx/outx functions if this is a dense I/O * system *and* addressing domains are being used. The dense I/O @@ -191,7 +190,6 @@ _alpha_iobase_query(unsigned flags, int hose, int bus, int devfn) _alpha_inb = _dense_inb; _alpha_inw = _dense_inw; _alpha_inl = _dense_inl; -#endif /* !INCLUDE_XF86_NO_DOMAIN */ } else _iobase = _alpha_iobase_legacy; return _iobase(flags, hose, bus, devfn); diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c index 93ad680d7..702dfa675 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c @@ -32,6 +32,7 @@ #include "xf86.h" #include "xf86Priv.h" +#include "xf86_OSproc.h" _X_EXPORT void xf86OSRingBell(int loudness, int pitch, int duration) diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c index 11c45e538..e751da2d0 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c @@ -90,7 +90,6 @@ writeDense32(int Value, pointer Base, register unsigned long Offset) } -#ifndef INCLUDE_XF86_NO_DOMAIN void _dense_outb(char val, unsigned long port) @@ -146,5 +145,4 @@ _dense_inl(unsigned long port) return *(volatile CARD32 *)port; } -#endif /* !INCLUDE_XF86_NO_DOMAIN */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c index da5ca57cc..7f408573a 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c @@ -250,6 +250,8 @@ xf86OpenConsole(void) if (!ShareVTs) { + struct termios nTty; + #if defined(DO_OS_FONTRESTORE) lnx_savefont(); #endif @@ -282,37 +284,27 @@ xf86OpenConsole(void) FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n", strerror(errno)); - /* Set the keyboard to RAW mode. If we're using the keyboard - * driver, the driver does it for us. If we have AEI on, then - * we're expecting the devices to be added (i.e. evdev) and we - * have to set it manually. - */ - if (xf86Info.allowEmptyInput) - { - struct termios nTty; - - tcgetattr(xf86Info.consoleFd, &tty_attr); - ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode); - - if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0) - FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", - strerror(errno)); - - nTty = tty_attr; - nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); - nTty.c_oflag = 0; - nTty.c_cflag = CREAD | CS8; - nTty.c_lflag = 0; - nTty.c_cc[VTIME]=0; - nTty.c_cc[VMIN]=1; - cfsetispeed(&nTty, 9600); - cfsetospeed(&nTty, 9600); - tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); - - /* need to keep the buffer clean, else the kernel gets angry */ - console_handler = xf86AddGeneralHandler(xf86Info.consoleFd, - drain_console, NULL); - } + tcgetattr(xf86Info.consoleFd, &tty_attr); + ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode); + + if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0) + FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", + strerror(errno)); + + nTty = tty_attr; + nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); + nTty.c_oflag = 0; + nTty.c_cflag = CREAD | CS8; + nTty.c_lflag = 0; + nTty.c_cc[VTIME]=0; + nTty.c_cc[VMIN]=1; + cfsetispeed(&nTty, 9600); + cfsetospeed(&nTty, 9600); + tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); + + /* need to keep the buffer clean, else the kernel gets angry */ + console_handler = xf86AddGeneralHandler(xf86Info.consoleFd, + drain_console, NULL); /* we really should have a InitOSInputDevices() function instead * of Init?$#*&Device(). So I just place it here */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c b/xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c deleted file mode 100644 index d77631ba4..000000000 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright 1995 by Frederic Lepied, France. <fred@sugix.frmug.fr.net> - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Frederic Lepied not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Frederic Lepied makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL FREDERIC LEPIED BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - - -static const char rcs_id[] = "Id: lnx_jstk.c,v 1.1 1995/12/20 14:06:09 lepied Exp"; - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <sys/types.h> -#include <unistd.h> -#include <string.h> -#include <errno.h> -#define inline __inline__ -#include <linux/joystick.h> -#include <fcntl.h> -#include <sys/ioctl.h> - -#include "xf86.h" - -#if !defined(JSIOCGTIMELIMIT) -/* make 2.1.x joystick.h backward compatable */ -#define JSIOCGTIMELIMIT JS_GET_TIMELIMIT -#define JSIOCSTIMELIMIT JS_SET_TIMELIMIT -#define js_status JS_DATA_TYPE -#endif - - -/*********************************************************************** - * - * xf86JoystickOn -- - * - * open the device and init timeout according to the device value. - * - *********************************************************************** - */ - -int -xf86JoystickOn(char *name, int *timeout, int *centerX, int *centerY) -{ - int fd; - struct js_status js; - -#ifdef DEBUG - ErrorF("xf86JoystickOn %s\n", name); -#endif - - if ((fd = open(name, O_RDWR | O_NDELAY, 0)) < 0) - { - xf86Msg(X_WARNING, "Cannot open joystick '%s' (%s)\n", name, - strerror(errno)); - return -1; - } - - if (*timeout == 0) { - if (ioctl (fd, JSIOCGTIMELIMIT, timeout) == -1) { - Error("joystick JSIOCGTIMELIMIT ioctl"); - } - else { - xf86Msg(X_CONFIG, "Joystick: timeout value = %d\n", *timeout); - } - } - else { - if (ioctl(fd, JSIOCSTIMELIMIT, timeout) == -1) { - Error("joystick JSIOCSTIMELIMIT ioctl"); - } - } - - /* Assume the joystick is centred when this is called */ - read(fd, &js, JS_RETURN); - if (*centerX < 0) { - *centerX = js.x; - xf86Msg(X_CONFIG, "Joystick: CenterX set to %d\n", *centerX); - } - if (*centerY < 0) { - *centerY = js.y; - xf86Msg(X_CONFIG, "Joystick: CenterY set to %d\n", *centerY); - } - - return fd; -} - -/*********************************************************************** - * - * xf86JoystickInit -- - * - * called when X device is initialized. - * - *********************************************************************** - */ - -void -xf86JoystickInit() -{ - return; -} - -/*********************************************************************** - * - * xf86JoystickOff -- - * - * close the handle. - * - *********************************************************************** - */ - -int -xf86JoystickOff(int *fd, int doclose) -{ - int oldfd; - - if (((oldfd = *fd) >= 0) && doclose) { - close(*fd); - *fd = -1; - } - return oldfd; -} - -/*********************************************************************** - * - * xf86JoystickGetState -- - * - * return the state of buttons and the position of the joystick. - * - *********************************************************************** - */ - -int -xf86JoystickGetState(int fd, int *x, int *y, int *buttons) -{ - struct js_status js; - int status; - - status = read(fd, &js, JS_RETURN); - - if (status != JS_RETURN) - { - Error("Joystick read"); - return 0; - } - - *x = js.x; - *y = js.y; - *buttons = js.buttons; - - return 1; -} - -/* - * Entry point for XFree86 Loader - */ -void -linux_jstkModuleInit(pointer *data, INT32 *magic) -{ - *magic = MAGIC_DONE; - *data = NULL; -} - -/* end of lnx_jstk.c */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_mouse.c b/xorg-server/hw/xfree86/os-support/linux/lnx_mouse.c deleted file mode 100644 index d2822153f..000000000 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_mouse.c +++ /dev/null @@ -1,221 +0,0 @@ - -/* - * Copyright 1999 by The XFree86 Project, Inc. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <X11/X.h> -#include "xf86.h" -#include "xf86Xinput.h" -#include "xf86OSmouse.h" -#include "xf86_OSlib.h" -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> - -static int -SupportedInterfaces(void) -{ - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO; -} - -static const char * -DefaultProtocol(void) -{ - return "Auto"; -} - -#define DEFAULT_MOUSE_DEV "/dev/input/mice" -#define DEFAULT_PS2_DEV "/dev/psaux" -#define DEFAULT_GPM_DATA_DEV "/dev/gpmdata" -#define DEFAULT_GPM_CTL_DEV "/dev/gpmdata" - -static const char *mouseDevs[] = { - DEFAULT_MOUSE_DEV, - DEFAULT_PS2_DEV, - DEFAULT_GPM_DATA_DEV, - NULL -}; - -typedef enum { - MOUSE_PROTO_UNKNOWN = 0, - MOUSE_PROTO_SERIAL, - MOUSE_PROTO_PS2, - MOUSE_PROTO_MSC, - MOUSE_PROTO_GPM, - MOUSE_PROTO_EXPPS2, -} protocolTypes; - -static struct { - protocolTypes proto; - const char *name; -} devproto[] = { - { MOUSE_PROTO_UNKNOWN, NULL }, - { MOUSE_PROTO_PS2, "PS/2" }, - { MOUSE_PROTO_MSC, "MouseSystems" }, - { MOUSE_PROTO_GPM, "GPM" }, - { MOUSE_PROTO_EXPPS2, "ExplorerPS/2" }, -}; - -static const char * -FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) -{ - int fd = -1; - const char **pdev; - - for (pdev = mouseDevs; *pdev; pdev++) { - SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK | O_EXCL)); - if (fd == -1) { -#ifdef DEBUG - ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno)); -#endif - } else - break; - } - - if (*pdev) { - close(fd); - /* Set the Device option. */ - pInfo->conf_idev->commonOptions = - xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", *pdev); - xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", - pInfo->name, *pdev); - } - - return *pdev; -} - -static const char * -lnxMouseMagic(InputInfoPtr pInfo) -{ - int fd = -1; - const char *dev; - char *realdev; - struct stat sbuf; - int i; - int proto = MOUSE_PROTO_UNKNOWN; - - dev = xf86SetStrOption(pInfo->conf_idev->commonOptions, "Device", NULL); - if (!dev) { -#ifdef DEBUG - ErrorF("xf86SetStrOption failed to return the device name\n"); -#endif - return NULL; - } - /* Look at the device name to guess the protocol. */ - realdev = NULL; - if (strcmp(dev, DEFAULT_MOUSE_DEV) == 0) { - if (lstat(dev, &sbuf) != 0) { -#ifdef DEBUG - ErrorF("lstat failed for %s (%s)\n", dev, strerror(errno)); -#endif - return NULL; - } - if (S_ISLNK(sbuf.st_mode)) { - realdev = xnfalloc(PATH_MAX + 1); - i = readlink(dev, realdev, PATH_MAX); - if (i <= 0) { -#ifdef DEBUG - ErrorF("readlink failed for %s (%s)\n", dev, strerror(errno)); -#endif - xfree(realdev); - return NULL; - } - realdev[i] = '\0'; - } - } - if (!realdev) - realdev = xnfstrdup(dev); - else { - /* If realdev doesn't contain a '/' then prepend "/dev/" */ - if (!strchr(realdev, '/')) { - char *tmp = xnfalloc(strlen(realdev) + 5 + 1); - sprintf(tmp, "/dev/%s", realdev); - xfree(realdev); - realdev = tmp; - } - } - - if (strcmp(realdev, DEFAULT_MOUSE_DEV) == 0) - proto = MOUSE_PROTO_EXPPS2; - else if (strcmp(realdev, DEFAULT_PS2_DEV) == 0) - proto = MOUSE_PROTO_EXPPS2; - else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0) - proto = MOUSE_PROTO_MSC; - else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0) - proto = MOUSE_PROTO_GPM; - xfree(realdev); - /* - * If the protocol can't be guessed from the device name, - * try to characterise it. - */ - if (proto == MOUSE_PROTO_UNKNOWN) { - SYSCALL (fd = open(dev, O_RDWR | O_NONBLOCK | O_EXCL)); - if (isatty(fd)) { - /* Serial PnP has already failed, so give up. */ - } else { - if (fstat(fd, &sbuf) != 0) { -#ifdef DEBUG - ErrorF("fstat failed for %s (%s)\n", dev, strerror(errno)); -#endif - close(fd); - return NULL; - } - if (S_ISFIFO(sbuf.st_mode)) { - /* Assume GPM data in MSC format. */ - proto = MOUSE_PROTO_MSC; - } else { - /* Default to PS/2 */ - proto = MOUSE_PROTO_PS2; - } - } - close(fd); - } - if (proto == MOUSE_PROTO_UNKNOWN) { - xf86Msg(X_ERROR, "%s: Cannot find mouse protocol.\n", - pInfo->name); - return NULL; - } else { - for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) { - if (devproto[i].proto == proto) { - xf86Msg(X_INFO, - "%s: Setting mouse protocol to \"%s\"\n", - pInfo->name, devproto[i].name); - return devproto[i].name; - } - } - } - return NULL; -} - -static const char * -GuessProtocol(InputInfoPtr pInfo, int flags) -{ - return lnxMouseMagic(pInfo); -} - -static const char * -SetupAuto(InputInfoPtr pInfo, int *protoPara) -{ - return lnxMouseMagic(pInfo); -} - -_X_EXPORT OSMouseInfoPtr -xf86OSMouseInit(int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - p->SupportedInterfaces = SupportedInterfaces; - p->DefaultProtocol = DefaultProtocol; - p->FindDevice = FindDevice; - p->GuessProtocol = GuessProtocol; - p->SetupAuto = SetupAuto; - return p; -} - diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c index 1bd2d575f..688106af4 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c @@ -75,19 +75,7 @@ extern int iopl(int __level); #ifdef __alpha__ -# ifdef LIBC_IS_FIXED extern void sethae(unsigned long hae); -# else -# include <unistd.h> -# define sethae(x) syscall(301,x); -# endif - -/* define to test the Sparse addressing on a non-Jensen */ -# ifdef TEST_JENSEN_CODE -# define isJensen (1) -# else -# define isJensen (axpSystem == JENSEN) -# endif # define BUS_BASE bus_base @@ -107,10 +95,6 @@ static void unmapVidMem(int, pointer, unsigned long); static pointer mapVidMemSparse(int, unsigned long, unsigned long, int); extern axpDevice lnxGetAXP(void); static void unmapVidMemSparse(int, pointer, unsigned long); -# if defined(JENSEN_SUPPORT) -static pointer mapVidMemJensen(int, unsigned long, unsigned long, int); -static void unmapVidMemJensen(int, pointer, unsigned long); -# endif static axpDevice axpSystem = -1; static Bool needSparse; static unsigned long hae_thresh; @@ -398,17 +382,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) } bus_base = _bus_base(); } - if (isJensen) { -# ifndef JENSEN_SUPPORT - FatalError("Jensen is not supported any more\n" - "If you are intereseted in fixing Jensen support\n" - "please contact xorg@lists.freedesktop.org\n"); -# else - xf86Msg(X_INFO,"Machine type is Jensen\n"); - pVidMem->mapMem = mapVidMemJensen; - pVidMem->unmapMem = unmapVidMemJensen; -# endif /* JENSEN_SUPPORT */ - } else if (needSparse) { + if (needSparse) { xf86Msg(X_INFO,"Machine needs sparse mapping\n"); pVidMem->mapMem = mapVidMemSparse; pVidMem->unmapMem = unmapVidMemSparse; @@ -558,7 +532,7 @@ xf86EnableIO(void) #endif } close(fd); -#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) +#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) if (ioperm(0, 1024, 1) || iopl(3)) { if (errno == ENODEV) ErrorF("xf86EnableIOPorts: no I/O ports found\n"); @@ -585,7 +559,7 @@ xf86DisableIO(void) #if defined(__powerpc__) munmap(ioBase, 0x20000); ioBase = NULL; -#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) +#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__) iopl(0); ioperm(0, 1024, 0); #endif @@ -594,24 +568,6 @@ xf86DisableIO(void) return; } -/* - * Don't use these two functions. They can't possibly work. If you actually - * need interrupts off for something, you ought to be doing it in the kernel - * anyway. - */ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - return (TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - return; -} - #if defined (__alpha__) #define vuip volatile unsigned int * @@ -932,175 +888,4 @@ _X_EXPORT int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) _X_EXPORT int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) = readDense32; -#ifdef JENSEN_SUPPORT - -static int -readSparseJensen8(pointer Base, register unsigned long Offset); -static int -readSparseJensen16(pointer Base, register unsigned long Offset); -static int -readSparseJensen32(pointer Base, register unsigned long Offset); -static void -writeSparseJensen8(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensen16(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensen32(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensenNB8(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensenNB16(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensenNB32(int Value, pointer Base, register unsigned long Offset); - -/* - * The Jensen lacks dense memory, thus we have to address the bus via - * the sparse addressing scheme. - * - * Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996 - */ - -#ifdef TEST_JENSEN_CODE -#define SPARSE (5) -#else -#define SPARSE (7) -#endif - -#define JENSEN_SHIFT(x) ((long)x<<SPARSE) - -static pointer -mapVidMemJensen(int ScreenNum, unsigned long Base, unsigned long Size, int flags) -{ - pointer base; - int fd, prot; - - xf86WriteMmio8 = writeSparseJensen8; - xf86WriteMmio16 = writeSparseJensen16; - xf86WriteMmio32 = writeSparseJensen32; - xf86WriteMmioNB8 = writeSparseJensenNB8; - xf86WriteMmioNB16 = writeSparseJensenNB16; - xf86WriteMmioNB32 = writeSparseJensenNB32; - xf86ReadMmio8 = readSparseJensen8; - xf86ReadMmio16 = readSparseJensen16; - xf86ReadMmio32 = readSparseJensen32; - - fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR); - if (fd < 0) { - FatalError("xf86MapVidMem: failed to open " DEV_MEM " (%s)\n", - strerror(errno)); - } - - if (flags & VIDMEM_READONLY) - prot = PROT_READ; - else - prot = PROT_READ | PROT_WRITE; - - /* This requires linux-0.99.pl10 or above */ - base = mmap((caddr_t)0, JENSEN_SHIFT(Size), - prot, MAP_SHARED, fd, - (off_t)(JENSEN_SHIFT((off_t)Base) + _bus_base_sparse())); - close(fd); - if (base == MAP_FAILED) { - FatalError("xf86MapVidMem: Could not mmap framebuffer" - " (0x%08x,0x%x) (%s)\n", Base, Size, - strerror(errno)); - } - return base; -} - -static void -unmapVidMemJensen(int ScreenNum, pointer Base, unsigned long Size) -{ - munmap((caddr_t)Base, JENSEN_SHIFT(Size)); -} - -static int -readSparseJensen8(pointer Base, register unsigned long Offset) -{ - register unsigned long result, shift; - - mem_barrier(); - shift = (Offset & 0x3) << 3; - - result = *(vuip) ((unsigned long)Base + (Offset << SPARSE)); - - result >>= shift; - return 0xffUL & result; -} - -static int -readSparseJensen16(pointer Base, register unsigned long Offset) -{ - register unsigned long result, shift; - - mem_barrier(); - shift = (Offset & 0x2) << 3; - - result = *(vuip)((unsigned long)Base+(Offset<<SPARSE)+(1<<(SPARSE-2))); - - result >>= shift; - return 0xffffUL & result; -} - -static int -readSparseJensen32(pointer Base, register unsigned long Offset) -{ - register unsigned long result; - - mem_barrier(); - result = *(vuip)((unsigned long)Base+(Offset<<SPARSE)+(3<<(SPARSE-2))); - - return result; -} - -static void -writeSparseJensen8(int Value, pointer Base, register unsigned long Offset) -{ - register unsigned int b = Value & 0xffU; - - write_mem_barrier(); - *(vuip) ((unsigned long)Base + (Offset << SPARSE)) = b * 0x01010101; -} - -static void -writeSparseJensen16(int Value, pointer Base, register unsigned long Offset) -{ - register unsigned int w = Value & 0xffffU; - - write_mem_barrier(); - *(vuip)((unsigned long)Base+(Offset<<SPARSE)+(1<<(SPARSE-2))) = - w * 0x00010001; -} - -static void -writeSparseJensen32(int Value, pointer Base, register unsigned long Offset) -{ - write_mem_barrier(); - *(vuip)((unsigned long)Base+(Offset<<SPARSE)+(3<<(SPARSE-2))) = Value; -} - -static void -writeSparseJensenNB8(int Value, pointer Base, register unsigned long Offset) -{ - register unsigned int b = Value & 0xffU; - - *(vuip) ((unsigned long)Base + (Offset << SPARSE)) = b * 0x01010101; -} - -static void -writeSparseJensenNB16(int Value, pointer Base, register unsigned long Offset) -{ - register unsigned int w = Value & 0xffffU; - - *(vuip)((unsigned long)Base+(Offset<<SPARSE)+(1<<(SPARSE-2))) = - w * 0x00010001; -} - -static void -writeSparseJensenNB32(int Value, pointer Base, register unsigned long Offset) -{ - *(vuip)((unsigned long)Base+(Offset<<SPARSE)+(3<<(SPARSE-2))) = Value; -} -#endif /* JENSEN_SUPPORT */ - #endif /* __alpha__ */ |