diff options
146 files changed, 10807 insertions, 4666 deletions
@@ -10,11 +10,11 @@ ---------- N: Matti Aarnio -E: mea@utu.fi -D: LILO for AHA1542, modularized several of drivers/net/, -D: dynamic SLIP devices, dynamic /proc/net/, true size /proc/ksyms, -D: and other hacks.. -D: Documenting various parts of network subsystem (kernel side) +E: mea@nic.funet.fi +D: Alpha systems hacking, IPv6 and other network related stuff +D: One of assisting postmasters for vger.rutgers.edu's lists +S: (ask for current address) +S: Finland N: Werner Almesberger E: werner.almesberger@lrc.di.epfl.ch @@ -93,7 +93,7 @@ S: Calgary, Alberta S: Canada N: Ralf Baechle -E: ralf@gnu.ai.mit.edu +E: ralf@gnu.org P: 1024/AF7B30C1 CF 97 C2 CC 6D AE A7 FE C8 BA 9C FC 88 DE 32 C3 D: Linux/MIPS port D: Linux/68k hacker @@ -210,9 +210,11 @@ S: Marrickville NSW 2204 S: Australia N: Philip Blundell -E: Philip.Blundell@pobox.com -D: Device driver hacking -D: Some Linux/ARM stuff +E: philb@gnu.org +D: Linux/ARM hacker +D: Device driver hacker (eexpress, 3c505, c-qcam, ...) +D: m68k port to HP9000/300 +D: AUN network protocols D: Co-architect of the parallel port sharing system S: Nexus Electronics Ltd S: 10 St Barnabas Road, Cambridge CB1 2BY @@ -427,7 +429,7 @@ S: Belgium N: Cort Dougan E: cort@cs.nmt.edu W: http://www.cs.nmt.edu/~cort/ -D: PowerPC PReP port +D: PowerPC S: Computer Science Department S: New Mexico Tech S: Socorro, New Mexico 87801 @@ -566,15 +568,11 @@ S: Oak Park, Illinois 60302 S: USA N: Jim Freeman -E: jfree@caldera.com +E: jfree@sovereign.org W: http://www.sovereign.org/ D: Initial GPL'd Frame Relay driver D: Dynamic PPP devices D: Sundry modularizations (PPP, IPX, ...) and fixes -S: Caldera, Inc. -S: 240 West Center Street -S: Orem, Utah 84059-1920 -S: USA N: Bob Frey E: bobf@advansys.com @@ -943,8 +941,8 @@ S: L-1148 Luxembourg-City S: Luxembourg N: Gerd Knorr -E: kraxel@cs.tu-berlin.de -D: SCSI CD-ROM driver hacking, minor bug fixes +E: kraxel@goldbach.in-berlin.de +D: SCSI CD-ROM driver hacking, vesafb, v4l, minor bug fixes N: Harald Koenig E: koenig@tat.physik.uni-tuebingen.de @@ -1118,11 +1116,11 @@ E: Kai.Makisara@metla.fi D: SCSI Tape Driver N: Hamish Macdonald -E: hamish@border.ocunix.on.ca +E: hamish_macdonald@westendsys.com D: Linux/68k port -S: 102-B Valleystream Drive -S: Nepean, Ontario -S: Canada K2H-9E1 +S: 32 Clydesdale Avenue +S: Kanata, Ontario +S: Canada K2M-2G7 N: Peter MacDonald D: SLS distribution @@ -1308,7 +1306,7 @@ S: Lafayette, Indiana 47905 S: USA N: Johan Myreen -E: jem@vipunen.hut.fi +E: jem@iki.fi D: PS/2 mouse driver writer etc. S: Dragonvagen 1 A 13 S: FIN-00330 Helsingfors @@ -1383,7 +1381,7 @@ E: orc@pell.chi.il.us D: improved memory detection code. N: Vojtech Pavlik -E: vojtech@atrey.karlin.mff.cuni.cz +E: vojtech@ucw.cz D: Joystick driver D: arcnet-hardware readme D: Minor ARCnet hacking @@ -1403,7 +1401,8 @@ S: Albuquerque, New Mexico 87131 S: USA N: Avery Pennarun -E: apenwarr@bond.net +E: apenwarr@worldvisions.ca +W: http://www.worldvisions.ca/~apenwarr/ D: ARCnet driver D: "make xconfig" improvements D: Various minor hacking @@ -1424,6 +1423,10 @@ W: http://www.speakeasy.org/~kirk/ D: implemented kmod D: modularized BSD Unix domain sockets +N: Reed H. Petty +E: rhp@draper.net +D: Loop device driver extensions + N: Kai Petzke E: wpp@marie.physik.tu-berlin.de W: http://physik.tu-berlin.de/~wpp @@ -1615,14 +1618,12 @@ S: Beaverton, Oregon 97008 S: USA N: Mike Shaver -E: shaver@ingenia.com -W: http://neon.ingenia.com/~shaver/ -D: Network hacking, /proc/sys/net -S: c/o Ingenia Communications Corporation -S: Suite 4200, CTTC Building -S: 1125 Colonel By Drive +E: shaver@netscape.com +W: http://people.netscape.com/shaver/ +D: MIPS work, /proc/sys/net, misc net hacking +S: 149 Union St. S: Ottawa, Ontario -S: Canada K1S 5R1 +S: Canada K7L 2P4 N: John Shifflett E: john@geolog.com @@ -1680,11 +1681,12 @@ S: Cliffwood, New Jersey 07721 S: USA N: Henrik Storner -E: storner@osiris.ping.dk -E: storner@olicom.dk -W: http://eolicom.olicom.dk/~storner/ -D: Configure script: tristate, bugfixes +E: storner@image.dk +W: http://www.image.dk/~storner/ +W: http://www.sslug.dk/ +D: Configure script: Invented tristate for module-configuration D: vfat/msdos integration, kerneld docs, Linux promotion +D: Miscellaneous bug-fixes S: Chr. Winthersvej 1 B, st.th. S: DK-1860 Frederiksberg C S: Denmark @@ -1698,6 +1700,14 @@ S: 22 Irvington Cres. S: Willowdale, Ontario S: Canada M2N 2Z1 +N: Adrian Sun +E: asun@u.washington.edu +D: hfs support +D: alpha rtc port, random appletalk fixes +S: Department of Zoology, University of Washington +S: Seattle, WA 98195-1800 +S: USA + N: Tommy Thorn E: Tommy.Thorn@irisa.fr W: http://www.irisa.fr/prive/thorn/index.html @@ -1849,6 +1859,18 @@ S: Schleiermacherstrasse 12 S: 90491 Nuernberg S: Germany +N: Geert Uytterhoeven +E: geert@linux-m68k.org +W: http://www.cs.kuleuven.ac.be/~geert/ +P: 1024/EC4A1EE1 8B 88 38 35 88 1E 95 A1 CD 9E AE DC 4B 4A 2F 41 +D: m68k/Amiga and PPC/CHRP Longtrail coordinator +D: Frame buffer device and XF68_FBDev maintainer +D: m68k IDE maintainer +D: Amiga Zorro maintainer +S: C. Huysmansstraat 12 +S: B-3128 Baal +S: Belgium + N: Petr Vandrovec E: vandrove@vc.cvut.cz D: Small contributions to ncpfs @@ -1885,15 +1907,20 @@ S: The Netherlands N: Tim Waugh E: tim@cyberelk.demon.co.uk D: Co-architect of the parallel-port sharing system -S: 110 Twyford Road -S: EASTLEIGH -S: SO50 4HN +S: 4 Fox Close +S: Bishopstoke +S: SO50 8NB S: United Kingdom N: Juergen Weigert E: jnweiger@immd4.informatik.uni-erlangen.de D: The Linux Support Team Erlangen +N: David Weinehall +E: tao@acc.umu.se +D: NE/2-driver maintainer +D: Miscellaneous MCA-support + N: Matt Welsh E: mdw@sunsite.unc.edu D: Linux Documentation Project coordinator @@ -1988,14 +2015,15 @@ S: 2612 XV Delft S: The Netherlands N: David Woodhouse +E: David.Woodhouse@mvhi.com E: Dave@imladris.demon.co.uk D: Extensive ARCnet rewrite D: ARCnet COM20020, COM90xx IO-MAP drivers D: SO_BINDTODEVICE in 2.1.x (from Elliot Poger's code in 2.0.31) D: Contributed to NCPFS rewrite for 2.1.x dcache D: Alpha platforms: SX164, LX164 and Ruffian ported to 2.1.x -S: Robinson College, Grange Road -S: Cambridge. CB3 9AN +S: 29, David Bull Way +S: Milton, Cambridge. CB4 6DP S: England N: Frank Xia @@ -2046,7 +2074,7 @@ S: San Jose, California 95148 S: USA N: Marc Zyngier -E: maz@gloups.fdn.fr +E: maz@wild-wind.fr.eu.org D: MD driver S: 11 rue Victor HUGO S: 95560 Montsoult diff --git a/Documentation/Changes b/Documentation/Changes index 2886c6215..32e528ea8 100644 --- a/Documentation/Changes +++ b/Documentation/Changes @@ -33,7 +33,7 @@ http://cyberbuzz.gatech.edu/kaboom/linux/ as well. Also, don't forget http://www.linuxhq.com/ for all your Linux kernel needs. -Last updated: September 3, 1998 +Last updated: October 9, 1998 Current Author: Chris Ricker (kaboom@gatech.edu or chris.ricker@m.cc.utah.edu). Current Minimal Requirements @@ -43,13 +43,14 @@ Current Minimal Requirements encountered a bug! If you're unsure what version you're currently running, the suggested command should tell you. -- Kernel modules 2.1.85 ; insmod -V +- Kernel modules 2.1.121 ; insmod -V - Gnu C 2.7.2.3 ; gcc --version - Binutils 2.8.1.0.23 ; ld -v -- Linux C Library 5.4.46 ; ls -l /lib/libc.so.* +- Linux libc5 C Library 5.4.46 ; ls -l /lib/libc.so.* +- Linux libc6 C Library 2.0.7pre6 ; ls -l /lib/libc.so.* - Dynamic Linker (ld.so) 1.9.9 ; ldd --version or ldd -v - Linux C++ Library 2.7.2.8 ; ls -l /usr/lib/libg++.so.* -- Procps 1.2.8 ; ps --version +- Procps 1.2.9 ; ps --version - Procinfo 14 ; procinfo -v - Psmisc 17 ; pstree -V - Mount 2.7l ; mount --version @@ -57,11 +58,12 @@ running, the suggested command should tell you. - Loadlin 1.6a - Sh-utils 1.16 ; basename --v - Autofs 0.3.11 ; automount --version -- NFS 0.4.21 ; showmount --version +- NFS 2.2beta37 ; showmount --version - Bash 1.14.7 ; bash -version - Ncpfs 2.2.0 ; ncpmount -v - Pcmcia-cs 3.0.5 ; cardmgr -V - PPP 2.3.5 ; pppd -v +- PCI Utilities 1.08 ; lspci --version Upgrade notes ************* @@ -114,8 +116,8 @@ Linux ports, and it displays a spiffy penguin logo on boot-up ;-). For more information, see the files in Documentation/fb/ ; you may also need to download the fbset utilities. -Libc -==== +Libc (libc5) +============ Linux-2.1.x is ELF-only. You can still compile a.out apps if you really want, but your kernel must be compiled ELF. If you can't @@ -144,11 +146,25 @@ you're using NIS. accompanying release notes. The section about it breaking make is not a joke. +GNU libc (libc6) +================ + + Older versions of GNU libc (libc6) have a bug in the dynamic linker. +/etc/ld.so.cache gets mapped into memory and is never unmapped. If one +of your boot scripts calls ldconfig, /etc/ld.so.cache is deleted. Init, +however, still references that file; as of 2.1.122, the kernel will +consequently not be able to remount the root file system r/o at system +shutdown. To fix this, upgrade to at least the pre6 release of GNU +libc 2.0.7. As a temporary workaround, modify your boot scripts to do +the following before calling ldconfig: + + ln -f /etc/ld.so.cache /etc/ld.so.cache.old + Modules ======= - You need to upgrade to modutils-2.1.85 for kernels 2.1.85 and later. -This version will also work with 2.0.x kernels. + You need to upgrade to the latest version of modutils-2.1.x for +development kernels. This version will also work with 2.0.x kernels. As of 2.1.90-pre1, kerneld has been replaced by a kernel thread, kmod. See Documentation/kmod.txt for more information. The main @@ -222,10 +238,13 @@ new /proc/net/dev format. This will also provide support for new features like IPv6. As of 2.1.102, the IP firewalling code has been replaced; ipfwadm -will no longer work. You need to optain "ipchains," available from +will no longer work. You need to obtain "ipchains," available from http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html, and use that instead of ipfwadm. + To use port forwarding and auto forwarding you will need to obtain +"ipmasqadm," available from http://juanjox.home.ml.org/. + Memory ====== @@ -278,6 +297,13 @@ parallel port may no longer be where you expect it; for example, LPT1 /dev/lp0 with the new Plug-and-Play driver. If printing breaks with the new driver, try checking your lpd configuration. +Setserial +========= + + If you experience random problems (stuck lines, lost characters, +etc.) with serial lines under recent kernels, upgrading setserial +should help. + Syncookies ========== @@ -348,35 +374,28 @@ Installation notes: ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.binutils-2.8.1.0.23 ftp://sunsite.unc.edu/pub/Linux/GCC/release.binutils-2.8.1.0.23 -The 2.9.1.0.7 release: -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.7-glibc.x86.tar.gz -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.7-libc5.x86.tar.gz -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.7.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.7-glibc.x86.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.7-libc5.x86.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.7.tar.gz +The 2.9.1.0.12 release: +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.12-glibc.x86.tar.gz +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.12-libc5.x86.tar.gz +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.12.tar.gz +ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.12-glibc.x86.tar.gz +ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.12-libc5.x86.tar.gz +ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.12.tar.gz Installation notes: -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.binutils-2.9.1.0.7 -ftp://sunsite.unc.edu/pub/Linux/GCC/release.binutils-2.9.1.0.7 +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.binutils-2.9.1.0.12 +ftp://sunsite.unc.edu/pub/Linux/GCC/release.binutils-2.9.1.0.12 Gnu C ===== -The 2.7.2.3 release: -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/gcc-2.7.2.3.bin.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/gcc-2.7.2.3.bin.tar.gz -Installation notes: -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.gcc-2.7.2.3 -ftp://sunsite.unc.edu/pub/Linux/GCC/release.gcc-2.7.2.3 - -The egcs-1.0.2 release: -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/egcs-1.0.2-glibc.x86.tar.gz -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/egcs-1.0.2-libc5.x86.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/egcs-1.0.2-glibc.x86.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/egcs-1.0.2-libc5.x86.tar.gz +The egcs-1.0.3 release: +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/egcs-1.0.3-glibc.x86.tar.bz2 +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/egcs-1.0.3-libc5.x86.tar.bz2 +ftp://sunsite.unc.edu/pub/Linux/GCC/egcs-1.0.3-glibc.x86.tar.bz2 +ftp://sunsite.unc.edu/pub/Linux/GCC/egcs-1.0.3-libc5.x86.tar.bz2 Installation notes: -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.egcs-1.0.2 -ftp://sunsite.unc.edu/pub/Linux/GCC/release.egcs-1.0.2 +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.egcs-1.0.3 +ftp://sunsite.unc.edu/pub/Linux/GCC/release.egcs-1.0.3 Gnu C 2.7.2.3 source: ftp://prep.ai.mit.edu/pub/gnu/gcc-2.7.2.3.tar.gz @@ -385,13 +404,17 @@ ftp://sunsite.unc.edu/pub/gnu/gcc-2.7.2.3.tar.gz Linux C Library =============== -The 5.4.46 release: +The (libc5) 5.4.46 release: ftp://tsx-11.mit.edu/pub/linux/packages/GCC/libc-5.4.46.bin.tar.gz ftp://sunsite.unc.edu/pub/Linux/GCC/libc-5.4.46.bin.tar.gz Installation notes for 5.4.46: ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.libc-5.4.46 ftp://sunsite.unc.edu/pub/Linux/GCC/release.libc-5.4.46 +The (libc6) GNU libc 2.0.7pre6 release: +ftp://ftp.kernel.org/pub/software/libs/glibc/glibc-2.0.7pre6.tar.gz +ftp://ftp.kernel.org/pub/software/libs/glibc/glibc-2.0.7pre6.tar.bz2 + Linux C++ Library ================= @@ -412,15 +435,15 @@ ftp://sunsite.unc.edu/pub/Linux/GCC/ld.so-1.9.9.tar.gz Modules utilities ================= -The 2.1.85 release: -ftp://ftp.kernel.org/pub/linux/kernel/v2.1/modutils-2.1.85.tar.gz +The 2.1.121 release: +ftp://ftp.kernel.org/pub/linux/kernel/v2.1/modutils-2.1.121.tar.gz Procps utilities ================ The 1.2 release: -ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/procps-1.2.8.tar.gz -ftp://sunsite.unc.edu/pub/Linux/system/status/ps/procps-1.2.8.tgz +ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/procps-1.2.9.tar.gz +ftp://sunsite.unc.edu/pub/Linux/system/status/ps/procps-1.2.9.tgz Procinfo utilities ================== @@ -451,8 +474,9 @@ ftp://ftp.redhat.com/pub/redhat/old-releases/redhat-4.0/updates/sparc/rpm-devel- DOSEMU ====== -The 0.66.7 release: -ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/dosemu-0.66.7.tgz +The 0.98.1 release: +ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/dosemu-0.98.1.tgz +ftp://ftp.dosemu.org/dosemu/dosemu-0.98.1.tgz Loadlin ======= @@ -483,12 +507,13 @@ ftp://ftp.kernel.org/pub/linux/daemons/autofs/autofs-3.1.1.tar.gz NFS === -The user-land 0.4.21 release: -ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir/linux-nfs-0.4.21.tar.gz -ftp://linux.nrao.edu/mirrors/fb0429.mathematik.th-darmstadt.de/pub/linux/okir/linux-nfs-0.4.21.tar.gz +The user-land 2.2beta37 release: +ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir/nfs-server-2.2beta37.tar.gz +ftp://linux.nrao.edu/mirrors/fb0429.mathematik.th-darmstadt.de/pub/linux/okir/nfs-server-2.2beta37.tar.gz -The kernel-level 8/30/98 release: -ftp://ftp.yggdrasil.com/private/hjl/knfsd-980830.tar.gz +The kernel-level 9/30/98 release: +ftp://ftp.yggdrasil.com/private/hjl/knfsd-980930.tar.gz +ftp://ftp.kernel.org/pub/linux/devel/gcc/knfsd-980930.tar.gz Net-tools ========= @@ -527,6 +552,13 @@ Pcmcia-cs The 3.0.5 release: ftp://hyper.stanford.edu/pub/pcmcia/pcmcia-cs.3.0.5.tar.gz +Setserial +========= + +The 2.14 release: +ftp://tsx-11.mit.edu/pub/linux/sources/sbin/setserial-2.14.tar.gz +ftp://sunsite.unc.edu/pub/Linux/system/serial/setserial-2.14.tar.gz + PPP === @@ -540,6 +572,12 @@ The 1.3.3 release: http://www.adelaide.net.au/~rustcorp/ipfwchains/ipchains-source-1.3.3.tar.gz http://www.adelaide.net.au/~rustcorp/ipfwchains/ipchains-source-1.3.3.tar.bz2 +IP Masq Adm +=========== + +The 0.4.1 release: +http://juanjox.home.ml.org/ipmasqadm-0.4.1.tar.gz + iBCS ==== @@ -558,6 +596,13 @@ Fbset The 7/13/98 release: http://www.cs.kuleuven.ac.be/~geert/bin/fbset-2.0-pre-19980713.tar.gz +PCIutils +======== + +The 1.08 release: +ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-1.08.tar.gz +ftp://sunsite.unc.edu/pub/Linux/hardware/pciutils-1.08.tar.gz + Other Info ========== @@ -573,12 +618,12 @@ distribution), most of these are available in RPM format. Check around your favorite Red Hat mirror site before installing the non-RPM version. Remember, you might need to use the -force option to get the upgrade to install. ftp://ftp.redhat.com/pub/contrib/ will have almost -everything you need, as does Red Hat 5.0. +everything you need, and Red Hat 5.1 ships with most necessary software. Those of you running Debian (or a different distribution that supports .deb packages) can look in the "unstable" and "project/experimental" directories of your favorite Debian mirror. The -Debian 2.0 release should have most packages you need as well. +Debian 2.0 release ships with most packages you need as well. For others, David Bourgin has put together a package of everything necessary to quickly and easily upgrade to 2.1.x. See diff --git a/Documentation/Configure.help b/Documentation/Configure.help index 91b3320ed..34b408df6 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -6,25 +6,18 @@ # # Translations of this file available on the WWW: # -# - http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Configure.help.euc -# is a Japanese translation, maintained by Tetsuyasu YAMADA -# (tetsu@cauchy.nslab.ntt.co.jp). -# - http://nevod.perm.su/service/linux/doc/kernel/Configure.help -# is a Russian translation, maintained by kaf@linux.nevod.perm.su. -# - http://www.linux-kheops.com/traduc/kernels/ -# has a French translation of the whole kernel, including -# Configure.help. This is maintained by David Bourgin -# (dbourgin@wsc.com). -# - http://visar.csustan.edu/~carlos/ contains Spanish translations -# of the 2.0 kernel documentation files, produced by Carlos Perelló -# Marín (fperllo@ehome.encis.es). -# - ftp://ftp-pavia1.linux.it/pub/linux/Configure.help -# is a work-in-progress effort of the Italian translation team, -# currently only for the 2.0 version of this file, maintained -# by rubini@linux.it. -# - http://www.cs.net.pl/~cezar/Kernel is the beginning of a Polish -# translation of the 2.0 version of this file, maintained by Cezar -# Cichocki (cezar@cs.net.pl). +# - Japanese, by Tetsuyasu YAMADA (tetsu@cauchy.nslab.ntt.co.jp), at +# http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Configure.help.euc +# - Russian, by kaf@linux.nevod.perm.su, at +# http://nevod.perm.su/service/linux/doc/kernel/Configure.help +# - French, by David Bourgin (dbourgin@wsc.com), at +# http://www.linux-kheops.com/traduc/kernels/ +# - Spanish, by Carlos Perelló Marín (fperllo@ehome.encis.es), at +# http://visar.csustan.edu/~carlos/ +# - Italian, by Alessandro Rubini (rubini@linux.it), at +# ftp://ftp-pavia1.linux.it/pub/linux/Configure.help +# - Polish, by Cezar Cichocki (cezar@cs.net.pl), at +# http://www.cs.net.pl/~cezar/Kernel # # Information about what a kernel is, what it does, how to patch and # compile it and much more is contained in the Kernel-HOWTO, available @@ -78,7 +71,7 @@ CONFIG_EXPERIMENTAL with the kernel internals are usually welcomed by the developers (before submitting bug reports, please read the documents README, MAINTAINERS, Documentation/BUG-HUNTING, and - Documentation/oops-tracing.txt in the kernel source). + Documentation/oops-tracing.txt in the kernel source). Unless you intend to help test and develop a feature or driver that falls into this category, or you have a situation that requires @@ -92,7 +85,7 @@ CONFIG_MATH_EMULATION Linux can emulate a math coprocessor (used for floating point operations) if you don't have one. 486DX and Pentium processors have a math coprocessor built in, 486SX and 386 do not, unless you added - a 487DX or 387, respectively. (The messages during boot time can + a 487DX or 387, respectively. (The messages during boot time can give you some hints here ["man dmesg"].) Everyone needs either a coprocessor or this emulation. @@ -110,33 +103,39 @@ CONFIG_MATH_EMULATION math coprocessor emulation can be found in arch/i386/math-emu/README. - If you are not sure, say Y; apart from resulting in a 45kB bigger + If you are not sure, say Y; apart from resulting in a 45 KB bigger kernel, it won't hurt. -Normal floppy disk support +Normal PC floppy disk support CONFIG_BLK_DEV_FD - If you want to use your floppy disk drive(s) under Linux, say - Y. Information about this driver, especially important for IBM + If you want to use the floppy disk drive(s) of your PC under Linux, + say Y. Information about this driver, especially important for IBM Thinkpad users, is contained in drivers/block/README.fd. This file also contains the location of the Floppy driver FAQ as well as location of the fdutils package used to configure additional - parameters of the driver at run time. + parameters of the driver at run time. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called floppy.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. +Support for PowerMac floppy +CONFIG_MAC_FLOPPY + If you have a SWIM-3 (Super Woz Integrated Machine 3; from Apple) + floppy controller, say Y here. Most commonly found in PowerMacs. + RAM disk support CONFIG_BLK_DEV_RAM Saying Y here will allow you to use a portion of your RAM memory as a block device, so that you can make filesystems on it, read and write to it and do all the other things that you can do with normal - block devices (such as hard drives). It is usually used to load and + block devices (such as hard drives). It is usually used to load and store a copy of a minimal root file system off of a floppy into RAM - during the initial install of Linux. Note that the kernel command - line option "ramdisk=XX" is now obsolete. For details, read - Documentation/ramdisk.txt. + during the initial install of Linux. + + Note that the kernel command line option "ramdisk=XX" is now + obsolete. For details, read Documentation/ramdisk.txt. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -158,8 +157,8 @@ Loop device support CONFIG_BLK_DEV_LOOP Saying Y here will allow you to use a regular file as a block device; you can then create a file system on that block device and - mount it just as you would mount other block devices such as hard drive - partitions, CDROM drives or floppy drives. + mount it just as you would mount other block devices such as hard + drive partitions, CDROM drives or floppy drives. This is useful if you want to check an ISO 9660 file system before burning the CD, or if you want to use floppy images without first @@ -171,15 +170,17 @@ CONFIG_BLK_DEV_LOOP bits of, say, a sound file). This is also safe if the file resides on a remote file server. If you want to do this, you will first have to acquire and install a kernel patch from - ftp://ftp.replay.com/pub/crypto/linux/all, and then you need to say - Y to this option. - - Note that alternative ways use encrypted filesystems are provided by - the cfs package, which can be gotten via FTP (user: anonymous) from - ftp://ftp.replay.com/pub/crypto/disk/, and the newer tcfs package, - available at http://tcfs.dia.unisa.it/. These do not require any - kernel support and you can say N here if you want to use one of - them. + ftp://ftp.replay.com/pub/crypto/linux/all or + ftp://verden.pvv.org/pub/linux/kerneli/v2.1/, and then you need to + say Y to this option. + + Note that alternative ways to use encrypted filesystems are provided + by the cfs package, which can be gotten via FTP (user: anonymous) + from ftp://ftp.replay.com/pub/crypto/disk/, and the newer tcfs + package, available at http://tcfs.dia.unisa.it/. You do not need to + say Y here if you want to use one of these. However, using cfs + requires saying Y to "NFS filesystem support" below while using tcfs + requires applying a kernel patch. To use the loop device, you need the losetup utility and a recent version of the mount program, both contained in the util-linux @@ -199,18 +200,22 @@ CONFIG_BLK_DEV_LOOP Network Block Device support CONFIG_BLK_DEV_NBD Saying Y here will allow your computer to be a client for network - block devices - it will be able to use block devices exported by + block devices, i.e. it will be able to use block devices exported by servers (mount filesystems on them etc.). Communication between client and server works over TCP/IP networking, but to the client program this is hidden: it looks like a regular local file access to - a special file such as /dev/nd0. It also allows you to run a - block-device in userland (making server and client physically the - same computer, communicating using the loopback network device). + a block device special file such as /dev/nd0. + + Network block devices also allows you to run a block-device in + userland (making server and client physically the same computer, + communicating using the loopback network device). + Read Documentation/nbd.txt for more information, especially about - where to find the server code. + where to find the server code, which runs in user space and does not + need special kernel support. - Note that this has nothing to do with the network file system NFS; - you can say N here even if you intend to use NFS. + Note that this has nothing to do with the network file systems NFS + or Coda; you can say N here even if you intend to use NFS or Coda. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -224,21 +229,25 @@ CONFIG_BLK_DEV_IDE If you say Y here, you will use the full-featured IDE driver to control up to four IDE interfaces, each being able to serve a "master" and a "slave" device, for a total of up to eight IDE - disk/cdrom/tape/floppy drives. + disk/cdrom/tape/floppy drives. People with SCSI-only systems + can say N here. + + Useful information about large (>540 MB) IDE disks, multiple + interfaces, what to do if IDE devices are not automatically + detected, sound card IDE ports, module support, and other topics, is + contained in Documentation/ide.txt. For detailed information about + hard drives, consult the Disk-HOWTO and the Multi-Disk-HOWTO, + available via FTP (user: anonymous) from + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. - Useful information about large (>540MB) IDE disks, sound card IDE - ports, module support, and other topics, is contained in - Documentation/ide.txt. For detailed information about hard drives, - consult the Disk-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. To fine-tune IDE - drive/interface parameters for improved performance, look for the - hdparm package at - sunsite.unc.edu:/pub/Linux/kernel/patches/diskdrives/ + To fine-tune IDE drive/interface parameters for improved + performance, look for the hdparm package at + ftp://sunsite.unc.edu:/pub/Linux/kernel/patches/diskdrives/ If you have one or more IDE drives, say Y here. If your system has no IDE drives, or if memory requirements are really tight, you could say N here, and select the "Old hard disk driver" instead to save - about 13kB of memory in the kernel. + about 13 KB of memory in the kernel. Old hard disk (MFM/RLL/IDE) driver CONFIG_BLK_DEV_HD_ONLY @@ -250,10 +259,14 @@ CONFIG_BLK_DEV_HD_ONLY since it lacks the enhanced functionality of the new one. This makes it a good choice for systems with very tight memory restrictions, or for systems with only older MFM/RLL/ESDI drives. Choosing the old - driver can save 13kB or so of kernel memory. If you are unsure, then - just choose the Enhanced IDE/MFM/RLL driver instead of this one. For - more detailed information, read the Disk-HOWTO, available via FTP - (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + driver can save 13 KB or so of kernel memory. + + If you are unsure, then just choose the Enhanced IDE/MFM/RLL driver + instead of this one. For more detailed information, read the + Disk-HOWTO, available via FTP (user: anonymous) from + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + + People with SCSI-only systems can say N here. Use old disk-only driver on primary interface CONFIG_BLK_DEV_HD_IDE @@ -266,14 +279,20 @@ CONFIG_BLK_DEV_HD_IDE interface. Choosing this option may be useful for older systems which have MFM/RLL/ESDI controller+drives at the primary port address (0x1f0), along with IDE drives at the secondary/3rd/4th port - addresses. Normally, just say N here; you will then use the new - driver for all 4 interfaces. + addresses. + + Normally, just say N here; you will then use the new driver for all + 4 interfaces. + + People with SCSI-only systems don't need this and can say N here as + well. Include IDE/ATA-2 DISK support CONFIG_BLK_DEV_IDEDISK - This will include enhanced support for MFM/RLL/IDE hard disks. If you - have a MFM/RLL/IDE disk, and there is no special reason to use the - old hard disk driver instead, say Y. + This will include enhanced support for MFM/RLL/IDE hard disks. If + you have a MFM/RLL/IDE disk, and there is no special reason to use + the old hard disk driver instead, say Y. If you have an SCSI-only + system, you can say N here. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -285,7 +304,7 @@ CONFIG_BLK_DEV_IDEDISK Include IDE/ATAPI CDROM support CONFIG_BLK_DEV_IDECD If you have a CDROM drive using the ATAPI protocol, say Y. ATAPI is - a new protocol used by IDE CDROM and TAPE drives, similar to the + a newer protocol used by IDE CDROM and TAPE drives, similar to the SCSI protocol. Most new CDROM drives use ATAPI, including the NEC-260, Mitsumi FX400, Sony 55E, and just about all non-SCSI double(2X), quad(4X), and six(6X) speed drives. @@ -311,8 +330,9 @@ CONFIG_BLK_DEV_IDECD Include IDE/ATAPI TAPE support CONFIG_BLK_DEV_IDETAPE If you have an IDE tape drive using the ATAPI protocol, say Y. - ATAPI is a new protocol used by IDE tape and CDROM drives, similar - to the SCSI protocol. + ATAPI is a newer protocol used by IDE tape and CDROM drives, similar + to the SCSI protocol. If you have an SCSI tape drive however, you + can say N here. If you say Y here, the tape drive will be identified at boot time along with other IDE devices, as "hdb" or "hdc", or something @@ -328,12 +348,12 @@ CONFIG_BLK_DEV_IDETAPE Include IDE/ATAPI FLOPPY support CONFIG_BLK_DEV_IDEFLOPPY - If you have an IDE floppy drive which uses the ATAPI protocol, say - Y. ATAPI is a new protocol used by IDE CDROM/tape/floppy drives, - similar to the SCSI protocol. IDE floppy drives include the LS-120 - and the ATAPI ZIP (ATAPI PD-CD/CDR drives are not supported by this - driver; support for PD-CD/CDR drives is available if you say Y to - "SCSI emulation support", below). + If you have an IDE floppy drive which uses the ATAPI protocol, + answer Y. ATAPI is a newer protocol used by IDE CDROM/tape/floppy + drives, similar to the SCSI protocol. IDE floppy drives include the + LS-120 and the ATAPI ZIP (ATAPI PD-CD/CDR drives are not supported + by this driver; support for PD-CD/CDR drives is available if you + answer Y to "SCSI emulation support", below). If you say Y here, the FLOPPY drive will be identified along with other IDE devices, as "hdb" or "hdc", or something similar (check @@ -362,18 +382,18 @@ CONFIG_BLK_DEV_IDESCSI If both this SCSI emulation and native ATAPI support are compiled into the kernel, the native support will be used. - If unsure, say N. + People with SCSI-only systems can say N here. If unsure, say N. CMD640 chipset bugfix/support CONFIG_BLK_DEV_CMD640 The CMD-Technologies CMD640 IDE chip is used on many common 486 and Pentium motherboards, usually in combination with a "Neptune" or - "SiS" chipset. Unfortunately, it has a number of rather nasty + "SiS" chipset. Unfortunately, it has a number of rather nasty design flaws that can cause severe data corruption under many common - conditions. Say Y here to include code which tries to automatically - detect and correct the problems under Linux. This option also + conditions. Say Y here to include code which tries to automatically + detect and correct the problems under Linux. This option also enables access to the secondary IDE ports in some CMD640 based - systems. + systems. This driver will work automatically in PCI based systems (most new systems have PCI slots). But if your system uses VESA local bus @@ -386,55 +406,84 @@ CONFIG_BLK_DEV_CMD640 The CMD640 chip is also used on add-in cards by Acculogic, and on the "CSA-6400E PCI to IDE controller" that some people have. For - details, read Documentation/ide.txt. If unsure, say Y. + details, read Documentation/ide.txt. + + People with SCSI-only systems should say N here. If unsure, say Y. CMD640 enhanced support CONFIG_BLK_DEV_CMD640_ENHANCED This option includes support for setting/autotuning PIO modes and - prefetch on CMD640 IDE interfaces. For details, read + prefetch on CMD640 IDE interfaces. For details, read Documentation/ide.txt. If you have a CMD640 IDE interface and your - BIOS does not already do this for you, then say Y here. Otherwise + BIOS does not already do this for you, then say Y here. Otherwise say N. RZ1000 chipset bugfix/support CONFIG_BLK_DEV_RZ1000 - The PC-Technologies RZ1000 chip is used on many common 486 and + The PC-Technologies RZ1000 IDE chip is used on many common 486 and Pentium motherboards, usually along with the "Neptune" chipset. Unfortunately, it has a rather nasty design flaw that can cause - severe data corruption under many conditions. Say Y here to include + severe data corruption under many conditions. Say Y here to include code which automatically detects and corrects the problem under - Linux. This may slow disk throughput by a few percent, but at least - things will operate 100% reliably. If unsure, say Y. + Linux. This may slow disk throughput by a few percent, but at least + things will operate 100% reliably. + + People with SCSI-only systems should say N here. If unsure, say Y. Generic PCI IDE chipset support CONFIG_BLK_DEV_IDEPCI Enable this for PCI systems which use IDE drive(s). This option helps the IDE driver to automatically detect and configure all PCI-based IDE interfaces in your system. - It is safe to say Y to this question. + + People with SCSI-only systems should say N here; if unsure say Y. Generic PCI bus-master DMA support CONFIG_BLK_DEV_IDEDMA If your PCI system uses IDE drive(s) (as opposed to SCSI, say) and is capable of bus-master DMA operation (most Pentium PCI systems), - you will want to say Y here to reduce CPU overhead. - You can use the "hdparm" utility to enable DMA for drives which - were not enabled automatically. You can get the latest version of - the hdparm utility via anonymous FTP from - ftp://sunsite.unc.edu/pub/Linux/system/hardware/. + you will want to say Y here to reduce CPU overhead. You can then use + the "hdparm" utility to enable DMA for drives for which it was not + enabled automatically. By default, DMA is not enabled automatically + for these drives, but you can change that by saying Y to the + following question "Use DMA by default when available". You can get + the latest version of the hdparm utility via anonymous FTP from + ftp://sunsite.unc.edu/pub/Linux/system/hardware/. Read the comments at the beginning of drivers/block/idedma.c and the file Documentation/ide.txt for more information. It is safe to say Y to this question. +Winbond SL82c105 support +CONFIG_BLK_DEV_SL82C105 + If you have a Winbond SL82c105 IDE controller, say Y here to enable + special configuration for this chip. This is common on various CHRP + motherboards, but could be used elsewhere. If in doubt, say Y. + +Boot off-board chipsets first support +CONFIG_BLK_DEV_OFFBOARD + Normally, IDE controllers built into the motherboard (on-board + controllers) are assigned to ide0 and ide1 while those on add-in PCI + cards (off-board controllers) are relegated to ide2 and ide3. + Answering Y here will reverse the situation, with off-board + controllers on ide0/1 and on-board controllers on ide2/3. This can + improve the usability of some boot managers such as LILO when + booting from a drive on an off-board controller. + + Note that, if you say Y here, the order of the hd* devices will be + rearranged which may require modification of fstab and other files. + + If in doubt, say N. + Use DMA by default when available CONFIG_IDEDMA_AUTO Prior to kernel version 2.1.112, Linux used to automatically use - DMA for IDE drives and chipsets which support it. Due to concerns + DMA for IDE drives and chipsets which support it. Due to concerns about a couple of cases where buggy hardware may have caused damage, - the default is now to NOT use DMA automatically. To revert to the + the default is now to NOT use DMA automatically. To revert to the previous behaviour, say Y to this question. + If you suspect your hardware is at all flakey, say N here. Do NOT email the IDE kernel people regarding this issue! @@ -443,44 +492,48 @@ CONFIG_IDEDMA_AUTO Other IDE chipset support CONFIG_IDE_CHIPSETS Say Y here if you want to include enhanced support for various IDE - interface chipsets used on motherboards and add-on cards. This - enhanced support may be necessary for Linux to be able to access the - 3rd/4th drives in some systems. It may also enable setting of - higher speed I/O rates to improve system performance with these - chipsets. Most of these also require special kernel boot parameters - to actually turn on the support at runtime. + interface chipsets used on motherboards and add-on cards. You can + then pick your particular IDE chip from among the following options. + This enhanced support may be necessary for Linux to be able to + access the 3rd/4th drives in some systems. It may also enable + setting of higher speed I/O rates to improve system performance with + these chipsets. Most of these also require special kernel boot + parameters to actually turn on the support at runtime; you can find + a list of these in the file Documentation/ide.txt. + + People with SCSI-only systems can say N here. Generic 4 drives/port support CONFIG_BLK_DEV_4DRIVES - Certain older chipsets, including the Tekram 690CD, use a - single set of I/O ports at 0x1f0 to control up to four drives, - instead of the customary two drives per port. Support for this - can be enabled at runtime using the "ide0=four" kernel boot - parameter if you say Y here. + Certain older chipsets, including the Tekram 690CD, use a single set + of I/O ports at 0x1f0 to control up to four drives, instead of the + customary two drives per port. Support for this can be enabled at + runtime using the "ide0=four" kernel boot parameter if you say Y + here. DTC-2278 support CONFIG_BLK_DEV_DTC2278 This driver is enabled at runtime using the "ide0=dtc2278" kernel - boot parameter. It enables support for the secondary IDE interface + boot parameter. It enables support for the secondary IDE interface of the DTC-2278 card, and permits faster I/O speeds to be set as - well. See the Documentation/ide.txt and dtc2278.c files for more + well. See the Documentation/ide.txt and dtc2278.c files for more info. Holtek HT6560B support CONFIG_BLK_DEV_HT6560B This driver is enabled at runtime using the "ide0=ht6560b" kernel - boot parameter. It enables support for the secondary IDE interface + boot parameter. It enables support for the secondary IDE interface of the Holtek card, and permits faster I/O speeds to be set as well. See the Documentation/ide.txt and ht6560b.c files for more info. PROMISE DC4030 support (EXPERIMENTAL) CONFIG_BLK_DEV_PDC4030 This driver provides support for the secondary IDE interface and - cache of Promise IDE chipsets, e.g. DC4030 and DC5030. This driver + cache of Promise IDE chipsets, e.g. DC4030 and DC5030. This driver is known to incur timeouts/retries during heavy I/O to drives - attached to the secondary interface. CDROM and TAPE devices are not - supported yet. This driver is enabled at runtime using the - "ide0=dc4030" kernel boot parameter. See the Documentation/ide.txt + attached to the secondary interface. CDROM and TAPE devices are not + supported yet. This driver is enabled at runtime using the + "ide0=dc4030" kernel boot parameter. See the Documentation/ide.txt and drivers/block/pdc4030.c files for more info. PS/2 ESDI hard disk support @@ -491,7 +544,7 @@ CONFIG_BLK_DEV_PS2 Tekram TRM290 chipset support (EXPERIMENTAL) CONFIG_BLK_DEV_TRM290 This driver adds support for bus master DMA transfers - using the Tekram TRM290 PCI IDE chip. Volunteers are + using the Tekram TRM290 PCI IDE chip. Volunteers are needed for further tweaking and development. Please read the comments at the top of drivers/block/trm290.c. @@ -507,37 +560,54 @@ CONFIG_BLK_DEV_NS87415 Please read the comments at the top of drivers/block/ns87415.c. +VIA82C586 chipset support (EXPERIMENTAL) +CONFIG_BLK_DEV_VIA82C586 + This adds initial timing settings for VIA (U)DMA onboard ide + controllers that are ATA3 compliant. May work with ATA4 systems, but + not tested to date. + + If you say Y here, you also need to say Y to "Use DMA by default + when available", above. + + Please read the comments at the top of drivers/block/via82C586.c + + If unsure, say N. + +CMD646 chipset support (EXPERIMENTAL) +CONFIG_BLK_DEV_CMD646 + Say Y here if you have an IDE controller like this. + +HPT343 chipset support (EXPERIMENTAL) +CONFIG_BLK_DEV_HPT343 + This driver adds up to 4 more EIDE devices sharing a single + interrupt. The HPT343 chipset in its current form is a non-bootable + PCI UDMA controller. This driver requires dynamic tuning of the + chipset during the ide-probe at boot. It is reported to support DVD + II drives, by the manufacturer. + + Please read the comments at the top of drivers/block/hpt343.c + QDI QD6580 support CONFIG_BLK_DEV_QD6580 This driver is enabled at runtime using the "ide0=qd6580" kernel - boot parameter. It permits faster I/O speeds to be set. See the + boot parameter. It permits faster I/O speeds to be set. See the files Documentation/ide.txt and qd6580.c for more info. UMC 8672 support CONFIG_BLK_DEV_UMC8672 This driver is enabled at runtime using the "ide0=umc8672" kernel - boot parameter. It enables support for the secondary IDE interface + boot parameter. It enables support for the secondary IDE interface of the UMC-8672, and permits faster I/O speeds to be set as well. See the files Documentation/ide.txt and umc8672.c for more info. ALI M14xx support CONFIG_BLK_DEV_ALI14XX This driver is enabled at runtime using the "ide0=ali14xx" kernel - boot parameter. It enables support for the secondary IDE interface + boot parameter. It enables support for the secondary IDE interface of the ALI M1439/1443/1445/1487/1489 chipsets, and permits faster I/O speeds to be set as well. See the files Documentation/ide.txt and ali14xx.c for more info. -Apple Macintosh builtin IDE interface support (EXPERIMENTAL) -CONFIG_BLK_DEV_MAC_IDE - This is the IDE driver for the builtin IDE interface on some Apple - Macintosh models. It supports both the Quadra/Performa/LC 630 and - the PowerBook 190 IDE interface. - - Say Y if you have such a Macintosh model and want to use IDE devices - (hard disks, CD-ROM drives, etc.) that are connected to the builtin - IDE interface. - XT hard disk support CONFIG_BLK_DEV_XD Very old 8 bit hard disk controllers used in the IBM XT computer @@ -576,19 +646,19 @@ CONFIG_PARIDE etc.). Parallel port IDE disks -CONFIG_PARIDE_PD +CONFIG_PARIDE_PD This option enables the high-level driver for IDE-type disk devices - connected through a parallel port. If you chose to build PARIDE + connected through a parallel port. If you chose to build PARIDE support into your kernel, you may answer Y here to build in the parallel port IDE driver, otherwise you should answer M to build - it as a loadable module. The module will be called pd.o. You + it as a loadable module. The module will be called pd.o. You must also have at least one parallel port protocol driver in your - system. Among the devices supported by this driver are the SyQuest + system. Among the devices supported by this driver are the SyQuest EZ-135, EZ-230 and SparQ drives, the Avatar Shark and the backpack hard drives from MicroSolutions. Parallel port ATAPI CD-ROMs -CONFIG_PARIDE_PCD +CONFIG_PARIDE_PCD This option enables the high-level driver for ATAPI CD-ROM devices connected through a parallel port. If you chose to build PARIDE support into your kernel, you may answer Y here to build in the @@ -597,31 +667,31 @@ CONFIG_PARIDE_PCD must also have at least one parallel port protocol driver in your system. Among the devices supported by this driver are the MicroSolutions backpack CD-ROM drives and the Freecom Power CD. If - you have such a CD-ROM drive, you should also say Y or M to "ISO 9660 - CDROM filesystem support" below, because that's the filesystem used - on CDROMs. + you have such a CD-ROM drive, you should also say Y or M to "ISO + 9660 CDROM filesystem support" below, because that's the filesystem + used on CDROMs. Parallel port ATAPI disks -CONFIG_PARIDE_PF +CONFIG_PARIDE_PF This option enables the high-level driver for ATAPI disk devices - connected through a parallel port. If you chose to build PARIDE + connected through a parallel port. If you chose to build PARIDE support into your kernel, you may answer Y here to build in the parallel port ATAPI disk driver, otherwise you should answer M - to build it as a loadable module. The module will be called pf.o. + to build it as a loadable module. The module will be called pf.o. You must also have at least one parallel port protocol driver in - your system. Among the devices supported by this driver are the + your system. Among the devices supported by this driver are the MicroSolutions backpack PD/CD drive and the Imation Superdisk LS-120 drive. Parallel port ATAPI tapes CONFIG_PARIDE_PT This option enables the high-level driver for ATAPI tape devices - connected through a parallel port. If you chose to build PARIDE + connected through a parallel port. If you chose to build PARIDE support into your kernel, you may answer Y here to build in the parallel port ATAPI disk driver, otherwise you should answer M - to build it as a loadable module. The module will be called pt.o. + to build it as a loadable module. The module will be called pt.o. You must also have at least one parallel port protocol driver in - your system. Among the devices supported by this driver is the + your system. Among the devices supported by this driver is the parallel port version of the HP 5GB drive. Parallel port generic ATAPI devices @@ -629,86 +699,93 @@ CONFIG_PARIDE_PG This option enables a special high-level driver for generic ATAPI devices connected through a parallel port. The driver allows user programs, such as cdrecord, to send ATAPI commands directly to a - device. If you chose to build PARIDE support into your kernel, you - may answer Y here to build in the parallel port generic ATAPI driver, - otherwise you should answer M to build it as a loadable module. - The module will be called pg.o. You must also have at least one - parallel port protocol driver in your system. This driver - implements an API loosely related to the generic SCSI driver. - See /usr/include/linux/pg.h for details, or visit - http://www.torque.net/parport/cdr.html for more information and - the required patches to cdrecord. + device. + + If you chose to build PARIDE support into your kernel, you may + answer Y here to build in the parallel port generic ATAPI driver, + otherwise you should answer M to build it as a loadable module. The + module will be called pg.o. + + You must also have at least one parallel port protocol driver in + your system. + + This driver implements an API loosely related to the generic SCSI + driver. See /usr/include/linux/pg.h for details. + + You can obtain the most recent version of cdrecord from + ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ . Versions 1.6.1a3 and + later fully support this driver. ATEN EH-100 protocol -CONFIG_PARIDE_ATEN +CONFIG_PARIDE_ATEN This option enables support for the ATEN EH-100 parallel port IDE - protocol. This protocol is used in some inexpensive low performance - parallel port kits made in Hong Kong. If you chose to build PARIDE - support into your kernel, you may answer Y here to build in the - protocol driver, otherwise you should answer M to build it as a - loadable module. The module will be called aten.o. You must also - have a high-level driver for the type of device that you want to + protocol. This protocol is used in some inexpensive low performance + parallel port kits made in Hong Kong. If you chose to build PARIDE + support into your kernel, you may answer Y here to build in the + protocol driver, otherwise you should answer M to build it as a + loadable module. The module will be called aten.o. You must also + have a high-level driver for the type of device that you want to support. MicroSolutions backpack protocol -CONFIG_PARIDE_BPCK - This option enables support for the MicroSolutions backpack - parallel port IDE protocol. If you chose to build PARIDE support - into your kernel, you may answer Y here to build in the protocol - driver, otherwise you should answer M to build it as a loadable - module. The module will be called bpck.o. You must also have - a high-level driver for the type of device that you want to support. +CONFIG_PARIDE_BPCK + This option enables support for the MicroSolutions backpack parallel + port IDE protocol. If you chose to build PARIDE support into your + kernel, you may answer Y here to build in the protocol driver, + otherwise you should answer M to build it as a loadable module. The + module will be called bpck.o. You must also have a high-level driver + for the type of device that you want to support. DataStor Commuter protocol -CONFIG_PARIDE_COMM +CONFIG_PARIDE_COMM This option enables support for the Commuter parallel port IDE - protocol from DataStor. If you chose to build PARIDE support + protocol from DataStor. If you chose to build PARIDE support into your kernel, you may answer Y here to build in the protocol driver, otherwise you should answer M to build it as a loadable - module. The module will be called comm.o. You must also have + module. The module will be called comm.o. You must also have a high-level driver for the type of device that you want to support. DataStor EP-2000 protocol -CONFIG_PARIDE_DSTR +CONFIG_PARIDE_DSTR This option enables support for the EP-2000 parallel port IDE - protocol from DataStor. If you chose to build PARIDE support + protocol from DataStor. If you chose to build PARIDE support into your kernel, you may answer Y here to build in the protocol driver, otherwise you should answer M to build it as a loadable - module. The module will be called dstr.o. You must also have + module. The module will be called dstr.o. You must also have a high-level driver for the type of device that you want to support. Shuttle EPAT/EPEZ protocol -CONFIG_PARIDE_EPAT - This option enables support for the EPAT parallel port IDE - protocol. EPAT is a parallel port IDE adapter manufactured by - Shuttle Technology and widely used in devices from major vendors - such as Hewlett-Packard, SyQuest, Imation and Avatar. If you - chose to build PARIDE support into your kernel, you may answer Y - here to build in the protocol driver, otherwise you should answer M - to build it as a loadable module. The module will be called epat.o. - You must also have a high-level driver for the type of device that - you want to support. +CONFIG_PARIDE_EPAT + This option enables support for the EPAT parallel port IDE protocol. + EPAT is a parallel port IDE adapter manufactured by Shuttle + Technology and widely used in devices from major vendors such as + Hewlett-Packard, SyQuest, Imation and Avatar. If you chose to build + PARIDE support into your kernel, you may answer Y here to build in + the protocol driver, otherwise you should answer M to build it as a + loadable module. The module will be called epat.o. You must also + have a high-level driver for the type of device that you want to + support. Shuttle EPIA protocol -CONFIG_PARIDE_EPIA - This option enables support for the (obsolete) EPIA parallel port - IDE protocol from Shuttle Technology. This adapter can still be found - in some no-name kits. If you chose to build PARIDE support into your - kernel, you may answer Y here to build in the protocol driver, - otherwise you should answer M to build it as a loadable module. - The module will be called epia.o. You must also have a high-level - driver for the type of device that you want to support. +CONFIG_PARIDE_EPIA + This option enables support for the (obsolete) EPIA parallel port + IDE protocol from Shuttle Technology. This adapter can still be + found in some no-name kits. If you chose to build PARIDE support + into your kernel, you may answer Y here to build in the protocol + driver, otherwise you should answer M to build it as a loadable + module. The module will be called epia.o. You must also have a + high-level driver for the type of device that you want to support. FIT TD-2000 protocol CONFIG_PARIDE_FIT2 - This option enables support for the TD-2000 parallel port IDE protocol - from Fidelity International Technology. This is a simple (low speed) - adapter that is used in some portable hard drives. If you chose to - build PARIDE support into your kernel, you may answer Y here to - build in the protocol driver, otherwise you should answer M to - build it as a loadable module. The module will be called ktti.o. - You must also have a high-level driver for the type of device - that you want to support. + This option enables support for the TD-2000 parallel port IDE + protocol from Fidelity International Technology. This is a simple + (low speed) adapter that is used in some portable hard drives. If + you chose to build PARIDE support into your kernel, you may answer Y + here to build in the protocol driver, otherwise you should answer M + to build it as a loadable module. The module will be called ktti.o. + You must also have a high-level driver for the type of device that + you want to support. FIT TD-3000 protocol CONFIG_PARIDE_FIT3 @@ -722,77 +799,86 @@ CONFIG_PARIDE_FIT3 of device that you want to support. FreeCom power protocol -CONFIG_PARIDE_FRPW - This option enables support for the Freecom power parallel port IDE - protocol. If you chose to build PARIDE support into your kernel, you - may answer Y here to build in the protocol driver, otherwise you - should answer M to build it as a loadable module. The module will be - called frpw.o. You must also have a high-level driver for the type +CONFIG_PARIDE_FRPW + This option enables support for the Freecom power parallel port IDE + protocol. If you chose to build PARIDE support into your kernel, you + may answer Y here to build in the protocol driver, otherwise you + should answer M to build it as a loadable module. The module will be + called frpw.o. You must also have a high-level driver for the type of device that you want to support. KingByte KBIC-951A/971A protocols -CONFIG_PARIDE_KBIC - This option enables support for the KBIC-951A and KBIC-971A parallel - port IDE protocols from KingByte Information Corp. KingByte's adapters - appear in many no-name portable disk and CD-ROM products, especially - in Europe. If you chose to build PARIDE support into your kernel, you - may answer Y here to build in the protocol driver, otherwise you should - answer M to build it as a loadable module. The module will be called - kbic.o. You must also have a high-level driver for the type of device - that you want to support. +CONFIG_PARIDE_KBIC + This option enables support for the KBIC-951A and KBIC-971A parallel + port IDE protocols from KingByte Information Corp. KingByte's + adapters appear in many no-name portable disk and CD-ROM products, + especially in Europe. If you chose to build PARIDE support into your + kernel, you may answer Y here to build in the protocol driver, + otherwise you should answer M to build it as a loadable module. The + module will be called kbic.o. You must also have a high-level driver + for the type of device that you want to support. KT PHd protocol CONFIG_PARIDE_KTTI This option enables support for the "PHd" parallel port IDE protocol - from KT Technology. This is a simple (low speed) adapter that is - used in some 2.5" portable hard drives. If you chose to build PARIDE - support into your kernel, you may answer Y here to build in the - protocol driver, otherwise you should answer M to build it as a - loadable module. The module will be called ktti.o. You must also + from KT Technology. This is a simple (low speed) adapter that is + used in some 2.5" portable hard drives. If you chose to build PARIDE + support into your kernel, you may answer Y here to build in the + protocol driver, otherwise you should answer M to build it as a + loadable module. The module will be called ktti.o. You must also have a high-level driver for the type of device that you want to support. OnSpec 90c20 protocol -CONFIG_PARIDE_ON20 +CONFIG_PARIDE_ON20 This option enables support for the (obsolete) 90c20 parallel port IDE protocol from OnSpec (often marketed under the ValuStore brand - name). If you chose to build PARIDE support into your kernel, you + name). If you chose to build PARIDE support into your kernel, you may answer Y here to build in the protocol driver, otherwise you - should answer M to build it as a loadable module. The module will - be called on20.o. You must also have a high-level driver for the + should answer M to build it as a loadable module. The module will + be called on20.o. You must also have a high-level driver for the type of device that you want to support. OnSpec 90c26 protocol -CONFIG_PARIDE_ON26 - This option enables support for the 90c26 parallel port IDE protocol +CONFIG_PARIDE_ON26 + This option enables support for the 90c26 parallel port IDE protocol from OnSpec Electronics (often marketed under the ValuStore brand - name). If you chose to build PARIDE support into your kernel, you - may answer Y here to build in the protocol driver, otherwise you - should answer M to build it as a loadable module. The module will - be called on26.o. You must also have a high-level driver for the - type of device that you want to support. + name). If you chose to build PARIDE support into your kernel, you + may answer Y here to build in the protocol driver, otherwise you + should answer M to build it as a loadable module. The module will be + called on26.o. You must also have a high-level driver for the type + of device that you want to support. Multiple devices driver support CONFIG_BLK_DEV_MD This driver lets you combine several hard disk partitions into one - logical block device. This can be used to combine several redundant + logical block device. This can be used to simply append one + partition to another one or to combine several redundant hard disks to a RAID1/4/5 device so as to provide protection against - hard disk failures. More information and the necessary tools are - available over FTP (user: anonymous) from - ftp://sweet-smoke.ufr-info-p7.ibp.fr/pub/Linux in the md package and - the md-FAQ. Please read drivers/block/README.md and the relevant - section of the Disk-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If unsure, say N. + hard disk failures. This is called "Software RAID" since the + combining of the partitions is done by the kernel. "Hardware RAID" + means that the combining is done by a dedicated controller; if you + have such a controller, you do not need to say Y here. + + More information about Software RAID on Linux is contained in the + Software-RAID mini-HOWTO, available via FTP (user: anonymous) from + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini. There you will also + learn where to get the supporting user space utilities raidtools. + + If unsure, say N. Linear (append) mode CONFIG_MD_LINEAR If you say Y here, then your multiple devices driver will be able to use the so-called linear mode, i.e. it will combine the hard disk - partitions by simply appending one to the other. If you want to - compile this as a module ( = code which can be inserted in and - removed from the running kernel whenever you want), say M here and - read Documentation/modules.txt. The module will be called - linear.o. If unsure, say Y. + partitions by simply appending one to the other. + + If you want to compile this as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read Documentation/modules.txt. The module will be + called linear.o. + + If unsure, say Y. RAID-0 (striping) mode CONFIG_MD_STRIPED @@ -800,31 +886,19 @@ CONFIG_MD_STRIPED use the so-called raid0 mode, i.e. it will combine the hard disk partitions into one logical device in such a fashion as to fill them up evenly, one chunk here and one chunk there. This will increase - the throughput rate if the partitions reside on distinct disks. If - you want to compile this as a module ( = code which can be inserted - in and removed from the running kernel whenever you want), say M - here and read Documentation/modules.txt. The module will be called - raid0.o. If unsure, say Y. + the throughput rate if the partitions reside on distinct disks. -Are you using a crosscompiler -CONFIG_CROSSCOMPILE - Set this if you are using another architecture to compile the - kernel for your MIPS machine. + Information about Software RAID on Linux is contained in the + Software-RAID mini-HOWTO, available via FTP (user: anonymous) from + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini. There you will also + learn where to get the supporting user space utilities raidtools. -Support for Acer PICA 1 chipset -CONFIG_ACER_PICA_61 - This is a machine with a R4400 133/150 MHz CPU. To compile a Linux - kernel that runs on these, say Y here. For details about Linux on - the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at - http://lena.fnet.fr/ (To browse the WWW, you need to have access to - a machine on the Internet that has a program like lynx or - netscape). + If you want to compile this as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read Documentation/modules.txt. The module will be + called raid0.o. -Support for Algorithmics P4032 -CONFIG_ALGOR_P4032 - This is an evaluation board of the British company Algorithmics. The - board uses the R4300 and a R5230 CPUs. For more information about - this board see www.algor.co.uk. + If unsure, say Y. RAID-1 (mirroring) mode CONFIG_MD_MIRRORING @@ -834,41 +908,20 @@ CONFIG_MD_MIRRORING an error free MD (multiple device) to the higher levels of the kernel. In a set with N drives, the available space is the capacity of a single drive, and the set protects against a failure of (N - 1) - drives. + drives. - Raidtools, a set of user-space tools which create and maintain - RAID1/4/5 sets, is available at: - ftp://ftp.kernel.org/pub/linux/daemons/raid - http://luthien.nuclecu.unam.mx/~miguel/raid + Information about Software RAID on Linux is contained in the + Software-RAID mini-HOWTO, available via FTP (user: anonymous) from + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini. There you will also + learn where to get the supporting user space utilities raidtools. If you want to use such a RAID-1 set, say Y. This code is also available as a module called raid1.o ( = code which can be inserted in and removed from the running kernel whenever you want). If you want to compile it as a module, say M here and read - Documentation/modules.txt. If unsure, say Y. - -IDE card support -CONFIG_BLK_DEV_IDE_CARDS - On Acorn systems, say Y here if you wish to use an IDE interface - expansion card. If you do not or are unsure, say N. - -ICS IDE interface -CONFIG_BLK_DEV_IDE_ICS - On Acorn systems, say Y here if you wish to use the ICS IDE - interface card. This is not required for ICS partition support. If - you are unsure, say. - -ADFS partition support -CONFIG_BLK_DEV_PART - This allows Linux on Acorn systems to determine its partitions in - the 'non-ADFS' partition area of the hard disk - usually located - after the ADFS partition. You are probably using this system, so - you should say Y here. + Documentation/modules.txt. -Boot support (linear, striped) -CONFIG_MD_BOOT - To boot with an initial linear or striped md device you have to say - Y here. For lilo and loadlin options see Documentation/md.txt. + If unsure, say Y. RAID-4/RAID-5 mode CONFIG_MD_RAID5 @@ -880,16 +933,47 @@ CONFIG_MD_RAID5 while a RAID-5 set distributes the parity across the drives in one of the available parity distribution methods. - Raidtools, a set of user-space tools which create and maintain - RAID1/4/5 sets, is available at: - ftp://ftp.kernel.org/pub/linux/daemons/raid - http://luthien.nuclecu.unam.mx/~miguel/raid + Information about Software RAID on Linux is contained in the + Software-RAID mini-HOWTO, available via FTP (user: anonymous) from + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini. There you will also + learn where to get the supporting user space utilities raidtools. - If you want to use such a RAID-5 set, say Y. This code is also - available as a module called raid5.o ( = code which can be inserted - in and removed from the running kernel whenever you want). If you - want to compile it as a module, say M here and read - Documentation/modules.txt. If unsure, say Y. + If you want to use such a RAID-4/RAID-5 set, say Y. This code is + also available as a module called raid5.o ( = code which can be + inserted in and removed from the running kernel whenever you want). + If you want to compile it as a module, say M here and read + Documentation/modules.txt. + + If unsure, say Y. + +Boot support (linear, striped) +CONFIG_MD_BOOT + To boot with an initial linear or striped md device you have to + answer Y here. For lilo and loadlin options see the file + Documentation/md.txt. + +Support for Deskstation RPC44 +CONFIG_DESKSTATION_RPC44 + This is a machine with a R4400 100 MHz CPU. To compile a Linux + kernel that runs on these, say Y here. For details about Linux + on the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at + http://lena.fnet.fr/ (To browse the WWW, you need to + have access to a machine on the Internet that has a program like + lynx or netscape). + +Support for Acer PICA 1 chipset +CONFIG_ACER_PICA_61 + This is a machine with a R4400 133/150 MHz CPU. To compile a Linux + kernel that runs on these, say Y here. For details about Linux on + the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at + http://lena.fnet.fr/ (To browse the WWW, you need to have access to + a machine on the Internet that has a program like lynx or netscape). + +Support for Algorithmics P4032 +CONFIG_ALGOR_P4032 + This is an evaluation board of the British company Algorithmics. The + board uses the R4300 and a R5230 CPUs. For more information about + this board see http://www.algor.co.uk. Support for Mips Magnum 4000 CONFIG_MIPS_MAGNUM_4000 @@ -909,27 +993,27 @@ CONFIG_OLIVETTI_M700 CPU type CONFIG_CPU_R3000 - Give the type of your machine's MIPS CPU. For this question, - it suffices to give a unique prefix of the option you want to - choose. In case of doubt select the R3000 CPU. This kernel will - run on other MIPS machines but with slightly reduced performance. + Give the type of your machine's MIPS CPU. For this question, it + suffices to give a unique prefix of the option you want to choose. + In case of doubt select the R3000 CPU. The kernel will then run on + other MIPS machines but with slightly reduced performance. Compile the kernel into the ECOFF object format CONFIG_ECOFF_KERNEL - Some machines require a kernel in the ECOFF format. You will have to - Choose this option for example if you want to a Mips Magnum 3000 or a - DECstation over network. + Some machines require a kernel in the ECOFF format. You will have to + say Y here for example if you want to use a Mips Magnum 3000 or a + DECstation. Generate little endian code CONFIG_CPU_LITTLE_ENDIAN Some MIPS machines can be configured for either little or big endian - byte order. Both modes require different kernels. Say yes if your - machine is little endian, no if it's a big endian machine. + byte order. These modes require different kernels. Say Y if your + machine is little endian, N if it's a big endian machine. Kernel support for IRIX binaries CONFIG_BINFMT_IRIX - This option enables the kernel support for IRIX binaries. Running - IRIX binaries additionally requires IRIX libraries. + If you say Y here, the kernel will support running of IRIX binaries. + You will need IRIX libraries for this to work. Networking support CONFIG_NET @@ -1001,7 +1085,7 @@ CONFIG_FIREWALL network think they're talking to a remote computer, while in reality the traffic is redirected by your Linux firewall to a local proxy server). - + Make sure to say N to "Fast switching" below if you intend to say Y here. @@ -1010,10 +1094,11 @@ CONFIG_FIREWALL SYN flood protection CONFIG_SYN_COOKIES - Normal TCP/IP networking is open to an attack known as "SYN flooding". - This denial-of-service attack prevents legitimate remote users from - being able to connect to your computer and requires very little work - from the attacker, who can operate from anywhere on the Internet. + Normal TCP/IP networking is open to an attack known as "SYN + flooding". This denial-of-service attack prevents legitimate remote + users from being able to connect to your computer during an ongoing + attack and requires very little work from the attacker, who can + operate from anywhere on the Internet. SYN cookies provide protection against this type of attack. If you say Y here, the TCP/IP stack will use a cryptographic challenge @@ -1029,6 +1114,10 @@ CONFIG_SYN_COOKIES an aid in tracing the packets to their actual source and should not be taken as absolute truth. + SYN cookies may prevent correct error reporting on clients when the + server is really overloaded. If this happens frequently better turn + them off. + If you say Y here, note that SYN cookies aren't enabled by default; you can enable them by saying Y to "/proc filesystem support" and "Sysctl support" below and executing the command @@ -1055,7 +1144,7 @@ CONFIG_ALPHA_AVANTI question, it suffices to give a unique prefix of the option you want to choose. The choices: ** Avanti: This is for Mustang (AS200), M3 (AS250), Avanti (AS400) - AlphaStations. These usually come with a TGA graphics adapter, + AlphaStations. These usually come with a TGA graphics adapter, so you'll want to say Y to "TGA Console support", below, if you have one of these. ** Alpha-XL: A.k.a. "Windows NT Dream Machine" :-) These usually @@ -1103,25 +1192,29 @@ CONFIG_ALPHA_SRM Non-standard serial port support CONFIG_SERIAL_NONSTANDARD - Say Y here if you have any non-standard serial boards --- boards + Say Y here if you have any non-standard serial boards -- boards which aren't supported using the standard "dumb" serial driver. This includes intelligent serial boards such as Cyclades, Digiboards, etc. These are usually used for systems that need many serial ports because they serve many terminals or dial-in - connections. Note that the answer to this question won't directly - affect the kernel: saying N will just cause this configure script to - skip all the questions about non-standard serial boards. Most people - can say N here. + connections. + + Note that the answer to this question won't directly affect the + kernel: saying N will just cause this configure script to skip all + the questions about non-standard serial boards. + + Most people can say N here. Extended dumb serial driver options CONFIG_SERIAL_EXTENDED If you wish to use any non-standard features of the standard "dumb" - driver, say Y here. This includes HUB6 support, shared serial + driver, say Y here. This includes HUB6 support, shared serial interrupts, special multiport support, support for more than the - four COM 1/2/3/4 boards, etc. Note that the answer to this question - won't directly affect the kernel: saying N will just cause this - configure script to skip all the questions about serial driver - options. If unsure, say N. + four COM 1/2/3/4 boards, etc. + + Note that the answer to this question won't directly affect the + kernel: saying N will just cause this configure script to skip all + the questions about serial driver options. If unsure, say N. Support more than 4 serial ports CONFIG_SERIAL_MANY_PORTS @@ -1138,7 +1231,7 @@ CONFIG_SERIAL_MANY_PORTS Support for sharing serial interrupts CONFIG_SERIAL_SHARE_IRQ Some serial boards have hardware support which allows multiple dumb - serial ports on the same board to share a single IRQ. To enable + serial ports on the same board to share a single IRQ. To enable support for this in the serial driver, say Y here. Auto detect IRQ on standard ports (unsafe) @@ -1155,60 +1248,26 @@ Support special multiport boards CONFIG_SERIAL_MULTIPORT Some multiport serial ports have special ports which are used to signal when there are any serial ports on the board which need - servicing. Say Y here to enable the serial driver to take advantage + servicing. Say Y here to enable the serial driver to take advantage of those special I/O ports. SGI Zilog85C30 serial support CONFIG_SGI_SERIAL - If you want to use your SGI's built-in serial ports under Linux, say Y. + If you want to use your SGI's built-in serial ports under Linux, + answer Y. SGI graphics support CONFIG_SGI_GRAPHICS - If you have an SGI machine and you want to compile the graphic drivers - select this option. This will include the code for the /dev/graphics - and /dev/gfx drivers into the kernel for supporting the virtualized - access to your graphics hardware. - -Remote GDB kernel debugging -CONFIG_REMOTE_DEBUG - This enables remote debugging support for the MIPS kernel. Enabling - this option enlarges you kernel image disk size by several megabytes - and requires a machine with more than 16mb, better 32mb RAM to avoid - excessive linking time. + If you have an SGI machine and you want to compile the graphics + drivers, say Y here. This will include the code for the + /dev/graphics and /dev/gfx drivers into the kernel for supporting + virtualized access to your graphics hardware. Support the Bell Technologies HUB6 card CONFIG_HUB6 Say Y here to enable support in the dumb serial driver to support the HUB6 card. -Unix98 PTY support -CONFIG_UNIX98_PTYS - Linux traditionally uses BSD-like /dev/ptyxx and /dev/ttyxx names - for pseudo-ttys (PTYs). This scheme has a number or problems. The - GNU C library 2.1 and later, however, supports the Unix98 naming - standard, using a cloning device /dev/ptmx and numbered devices in a - subdirectory /dev/pts/xxx. The device nodes in /dev/pts can be - automatically generated by the devpts virtual filesystem. - - Say Y here if you are uncertain, unless you are very short on memory. - -Maximum number of Unix98 PTYs in use (0-2048) -CONFIG_UNIX98_PTY_COUNT - The maximum number of Unix98 PTYs that can be used at any one time. - The default is 256, and should be enough for desktop systems, - however, server machines which support incoming telnet/rlogin/ssh - connections may want to increase this. When not in use, each - additional set of 256 PTYs occupy approximately 8K of kernel memory - on 32-bit architectures. - -TGA Console Support -CONFIG_TGA_CONSOLE - Many Alpha systems (e.g the Multia) are shipped with a graphics card - that implements the TGA interface (much like the VGA standard, but - older TGA adapters are *not* VGA compatible). On such systems, you - should say Y here so that the TGA driver rather than the standard - VGA driver is used. - PCI support CONFIG_PCI Find out whether you have a PCI motherboard. PCI is the name of a @@ -1240,10 +1299,10 @@ PCI direct access support CONFIG_PCI_DIRECT If you don't want to use the PCI BIOS (e.g., because you run some embedded system with no BIOS at all) or Linux says it cannot use - your PCI BIOS, you can enable direct PCI hardware here. It might fail - if your machine is based on some unusual chipset, but it usually - works. If both PCI BIOS and direct PCI access are enabled, the use - of BIOS is preferred. If unsure, say Y. + your PCI BIOS, you can enable direct PCI hardware here. It might + fail if your machine is based on some unusual chipset, but it + usually works. If both PCI BIOS and direct PCI access are enabled, + the use of BIOS is preferred. If unsure, say Y. PCI quirks CONFIG_PCI_QUIRKS @@ -1255,9 +1314,9 @@ CONFIG_PCI_QUIRKS PCI bridge optimization (experimental) CONFIG_PCI_OPTIMIZE This can improve access times for some hardware devices if you have - a really broken BIOS and your computer uses a PCI bus system. Set to - Y if you think it might help, but try turning it off if you - experience any problems with the PCI bus. N is the safe answer. + a really broken BIOS and your computer uses a PCI bus system. Say Y + if you think it might help, but try turning it off if you experience + any problems with the PCI bus. N is the safe answer. Backward-compatible /proc/pci CONFIG_PCI_OLD_PROC @@ -1277,15 +1336,15 @@ If you say Y here and to the "/proc filesystem support" below, you MCA support CONFIG_MCA MicroChannel Architecture is found in some IBM PS/2 machines and - laptops. It is a bus system similar to PCI or ISA. See + laptops. It is a bus system similar to PCI or ISA. See Documentation/mca.txt (and especially the web page given there) - before attempting to build an MCA bus kernel. Note that this is + before attempting to build an MCA bus kernel. Note that this is still experimental code. System V IPC CONFIG_SYSVIPC Inter Process Communication is a suite of library functions and - system calls which let processes (= running programs) synchronize + system calls which let processes (running programs) synchronize and exchange information. It is generally considered to be a good thing, and some programs won't run unless you say Y here. In particular, if you want to run the DOS emulator dosemu under Linux @@ -1298,7 +1357,7 @@ CONFIG_SYSVIPC (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-guide. - Saying Y here enlarges your kernel by about 7kB. Just say Y. + Saying Y here enlarges your kernel by about 7 KB. Just say Y. BSD Process Accounting CONFIG_BSD_PROCESS_ACCT @@ -1321,31 +1380,33 @@ CONFIG_SYSCTL enabled, a tree of modifiable sysctl entries will be generated beneath the /proc/sys directory. They are explained in the files in Documentation/sysctl/. Note that enabling this option will enlarge - the kernel by at least 8kB. As it is generally a good thing, you - should say Y here unless building a kernel for install/rescue disks - or your system is very limited in memory. + the kernel by at least 8 KB. + + As it is generally a good thing, you should say Y here unless + building a kernel for install/rescue disks or your system is very + limited in memory. Kernel support for ELF binaries CONFIG_BINFMT_ELF ELF (Executable and Linkable Format) is a format for libraries and executables used across different architectures and operating - systems. Saying Y here will enable your kernel to run ELF binaries and - enlarge it by about 2kB. ELF support under Linux has now all but - replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC) + systems. Saying Y here will enable your kernel to run ELF binaries + and enlarge it by about 2 KB. ELF support under Linux has now all + but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC) because it is portable (this does *not* mean that you will be able - to run executables from different architectures or operating - systems!) and makes building run-time libraries very easy. Many new + to run executables from different architectures or operating systems + however) and makes building run-time libraries very easy. Many new executables are distributed solely in ELF format. You definitely - want to say Y here. + want to say Y here. - Information about ELF is on the WWW at - http://www.sjc.ox.ac.uk/users/barlow/elf-howto.html (To browse the - WWW, you need to have access to a machine on the Internet that has a - program like lynx or netscape). If you find that after upgrading - from Linux kernel 1.2 and saying Y here, you still can't run any ELF - binaries (they just crash), then you'll have to install the newest - ELF runtime libraries, including ld.so (check the file - Documentation/Changes for location and latest version). + Information about ELF is contained in the ELF HOWTO available via + FTP (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + + If you find that after upgrading from Linux kernel 1.2 and saying Y + here, you still can't run any ELF binaries (they just crash), then + you'll have to install the newest ELF runtime libraries, including + ld.so (check the file Documentation/Changes for location and latest + version). If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -1391,14 +1452,14 @@ CONFIG_BINFMT_JAVA Saying Y here allows you to execute a JAVA bytecode binary just like any other Linux program: by simply typing in its name. (You also - need to have the JDK installed for this to work). As more and more + need to have the JDK installed for this to work). As more and more Java programs become available, the use for this will gradually - increase. You can even execute HTML files containing JAVA applets (= - JAVA binaries) if those files start with the string + increase. You can even execute HTML files containing JAVA applets + (little embedded JAVA binaries) if those files start with the string "<!--applet-->". If you want to use this, say Y here and read - Documentation/java.txt. + Documentation/java.txt. - If you disable this option it will reduce your kernel by about 4kB. + If you disable this option it will reduce your kernel by about 4 KB. This is not much and by itself does not warrant removing support. However its removal is a good idea if you do not have the JDK installed. You may answer M for module support and later load the @@ -1419,16 +1480,19 @@ CONFIG_BINFMT_EM86 this to work, you need to have the emulator /usr/bin/em86 in place. You may answer M to compile the emulation support as a module and later load the module when you want to use a Linux/Intel binary. The - module will be called binfmt_em86.o. If unsure, say Y. + module will be called binfmt_em86.o. If unsure, say Y. Kernel support for MISC binaries CONFIG_BINFMT_MISC - This enables the possibility to plug wrapper-driven binary formats - into the kernel. You will like this especially when you use programs - that need an interpreter to run like Java, Python or Emacs-Lisp. - Once you have registered such a binary class with the kernel, you - can start such a program simply by typing in its name; Linux will - feed it to the correct interpreter. + If you say Y here, it will be possible to plug wrapper-driven binary + formats into the kernel. You will like this especially when you use + programs that need an interpreter to run like Java, Python or + Emacs-Lisp. It's also useful if you often run DOS executables under + the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available in + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO). Once you have + registered such a binary class with the kernel, you can start one of + those programs simply by typing in its name at a shell prompt; Linux + will automatically feed it to the correct interpreter. If you say Y here, you won't need "Kernel support for JAVA binaries" (CONFIG_BINFMT_JAVA) or "Kernel support for Linux/Intel ELF @@ -1439,17 +1503,17 @@ CONFIG_BINFMT_MISC Documentation/java.txt for information about how to include Java support. - You must enable the "proc filesystem support" (CONFIG_PROC_FS) to + You must say Y to "proc filesystem support" (CONFIG_PROC_FS) to use this part of the kernel. - You may answer M for module support and later load the module when + You may say M here for module support and later load the module when you have use for it; the module is called binfmt_misc.o. If you don't know what to answer at this point, say Y. Solaris binary emulation CONFIG_SOLARIS_EMUL This is experimental code which will enable you to run (many) - Solaris binaries on your SPARC Linux machine. + Solaris binaries on your SPARC Linux machine. This code is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1461,11 +1525,23 @@ CONFIG_M386 This is the processor type of your CPU. This information is used for optimizing purposes. In order to compile a kernel that can run on all x86 CPU types (albeit not optimally fast), you can specify - "386" here. If you specify one of "486" or "Pentium" or "PPro", - then the kernel will run on all of these CPUs: 486 and Pentium - (=586) and Pentium Pro (=686). In rare cases, it can make sense to - specify "Pentium" even if running on a 486: the kernel will be - smaller but slower. + "386" here. If you specify one of "486" or "Pentium" or "PPro", + then the kernel will run on all x86 architectures except on 386. + + Here are the settings recommended for greatest speed: + - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX and + Cyrix/TI 486DLC/DLC2. Only "386" kernels will run on a 386 class + machine. + - "486" for the AMD/Cyrix/IBM/Intel DX4 or 486DX/DX2/SL/SX/SX2, + AMD/Cyrix 5x86, NexGen Nx586 and UMC U5D or U5S + - "Pentium" for the AMD K5, K6 and K6-3D, Cyrix MediaGX, + Cyrix/IBM/National Semiconductor 6x86 and GXm, IDT Centaur + WinChip C6, and Intel Pentium/Pentium MMX + - "PPro" for the Cyrix/IBM/National Semiconductor 6x86MX, MII and + Intel Pentium II/Pentium Pro + + In rare cases, it can make sense to specify "Pentium" even if + running on a 486: the kernel will be smaller but slower. If you have a single processor machine, make sure that the line "SMP=1" at the top of the toplevel kernel Makefile is commented out; @@ -1478,12 +1554,12 @@ CONFIG_M386 like lynx or netscape). People using multiprocessor machines should also say Y to "Enhanced Real Time Clock Support", below. - If you want to compile a kernel that should work on both single - processor and multi processor machines, it is possible to set SMP=1. - The "Advanced Power Management" code (see configuration option - below) will not work in that scenario, though. In addition, the - kernel will be slower on single processor machines, and other - problems may appear, so this is not recommended. + If you want to compile a kernel that works on both single processor + and multi processor machines, it is possible to set SMP=1. The + "Advanced Power Management" code (see configuration option below) + will not work in that scenario, though. In addition, the kernel will + be slower on single processor machines, and other problems may + appear, so this is not recommended. If you don't know what to do, choose "386". @@ -1491,7 +1567,13 @@ VGA text console CONFIG_VGA_CONSOLE Saying Y here will allow you to use Linux in text mode through a display that complies with the generic VGA standard. Virtually - everyone wants that. Say Y. + everyone wants that. + + The program SVGATextMode can be used to utilize SVGA video cards to + their full potential in text mode. Download it via FTP (user: + anonymous) from ftp://sunsite.unc.edu/pub/Linux/utils/console. + + Say Y. Video mode selection support CONFIG_VIDEO_SELECT @@ -1514,20 +1596,28 @@ CONFIG_FB hardware. It represents the frame buffer of some video hardware and allows application software to access the graphics hardware through a well-defined interface, so the software doesn't need to know - anything about the low-level (hardware register) stuff. This works - across the different architectures supported by Linux and makes the - implementation of application programs easier and more portable; at - this point, an X server exists which uses the frame buffer device - exclusively. - + anything about the low-level (hardware register) stuff. + + Frame buffer devices work identically across the different + architectures supported by Linux and make the implementation of + application programs easier and more portable; at this point, an X + server exists which uses the frame buffer device exclusively. + On several non-X86 architectures, the frame buffer device is the + only way to use the graphics hardware. + The device is accessed through special device nodes, usually located in the /dev directory, i.e. /dev/fb*. - Please read the file Documentation/fb/framebuffer.txt for more + You need an utility program called fbset to make full use of frame + buffer devices. Please read Documentation/fb/framebuffer.txt and the + Framebuffer-HOWTO at + http://www.tahallah.demon.co.uk/programming/prog.html for more information. - If you want to play with it, say Y here and to the driver for your - graphics board, below. If unsure, say N. + Say Y here and to the driver for your graphics board below if you + are compiling a kernel for a non-x86 architecture. If you are + compiling for the x86 architecture, you can say Y if you want to + play with it, but it is not essential. Acorn VIDC support CONFIG_FB_ACORN @@ -1547,13 +1637,13 @@ CONFIG_FB_AMIGA Amiga OCS chipset support CONFIG_FB_AMIGA_OCS This enables support for the original Agnus and Denise video chips, - found in the Amiga 1000 and most A500's and A2000's. If you intend + found in the Amiga 1000 and most A500's and A2000's. If you intend to run Linux on any of these systems, say Y; otherwise say N. Amiga ECS chipset support CONFIG_FB_AMIGA_ECS This enables support for the Enhanced Chip Set, found in later - A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If + A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If you intend to run Linux on any of these systems, say Y; otherwise say N. @@ -1561,38 +1651,39 @@ Amiga AGA chipset support CONFIG_FB_AMIGA_AGA This enables support for the Advanced Graphics Architecture (also known as the AGA or AA) Chip Set, found in the A1200, A4000, A4000T - and CD32. If you intend to run Linux on any of these systems, say Y; + and CD32. If you intend to run Linux on any of these systems, say Y; otherwise say N. Amiga CyberVision support CONFIG_FB_CYBER - This enables support for the Cybervision 64 graphics card from Phase5. - Please note that its use is not all that intuitive (i.e. if you have - any questions, be sure to ask!). Say N unless you have a Cybervision - 64 or plan to get one before you next recompile the kernel. - Please note that this driver DOES NOT support the Cybervision 64 3D - card, as they use incompatible video chips. + This enables support for the Cybervision 64 graphics card from + Phase5. Please note that its use is not all that intuitive (i.e. if + you have any questions, be sure to ask!). Say N unless you have a + Cybervision 64 or plan to get one before you next recompile the + kernel. Please note that this driver DOES NOT support the + Cybervision 64 3D card, as they use incompatible video chips. Amiga CyberVision3D support (EXPERIMENTAL) CONFIG_FB_VIRGE - This enables support for the Cybervision 64/3D graphics card from Phase5. - Please note that its use is not all that intuitive (i.e. if you have - any questions, be sure to ask!). Say N unless you have a Cybervision - 64/3D or plan to get one before you next recompile the kernel. - Please note that this driver DOES NOT support the older Cybervision 64 - card, as they use incompatible video chips. + This enables support for the Cybervision 64/3D graphics card from + Phase5. Please note that its use is not all that intuitive (i.e. if + you have any questions, be sure to ask!). Say N unless you have a + Cybervision 64/3D or plan to get one before you next recompile the + kernel. Please note that this driver DOES NOT support the older + Cybervision 64 card, as they use incompatible video chips. Amiga RetinaZ3 support (EXPERIMENTAL) CONFIG_FB_RETINAZ3 - This enables support for the Retina Z3 graphics card. Say N unless you - have a Retina Z3 or plan to get one before you next recompile the kernel. + This enables support for the Retina Z3 graphics card. Say N unless + you have a Retina Z3 or plan to get one before you next recompile + the kernel. Amiga CLgen driver (EXPERIMENTAL) CONFIG_FB_CLGEN - This enables support for Cirrus Logic GD542x/543x based boards on Amiga: - SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum. Say N - unless you have such a graphics board or plan to get one before you next - recompile the kernel. + This enables support for Cirrus Logic GD542x/543x based boards on + Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum. + Say N unless you have such a graphics board or plan to get one + before you next recompile the kernel. Atari native chipset support CONFIG_FB_ATARI @@ -1601,7 +1692,8 @@ CONFIG_FB_ATARI Open Firmware frame buffer device support CONFIG_FB_OF - Say Y if you want support with Open Firmware for your graphics board. + Say Y if you want support with Open Firmware for your graphics + board. S3 Trio frame buffer device support CONFIG_FB_S3TRIO @@ -1618,8 +1710,13 @@ CONFIG_FB_CONTROL PowerMac "platinum" frame buffer device support CONFIG_FB_PLATINUM - This driver supports a frame buffer for the "platinum" graphics adapter - in some Power Macintoshes. + This driver supports a frame buffer for the "platinum" graphics + adapter in some Power Macintoshes. + +PowerMac "valkyrie" frame buffer device support +CONFIG_FB_VALKYRIE + This driver supports a frame buffer for the "valkyrie" graphics + adapter in some Power Macintoshes. Chips 65550 display support CONFIG_FB_CT65550 @@ -1636,37 +1733,93 @@ CONFIG_FB_HP300 This is the frame buffer device driver for the Topcat graphics hardware found in HP300 workstations. -VGA chipset support (text only) -CONFIG_FB_VGA - This is the frame buffer device driver for generic VGA chips. This - driver works only in text mode; if you want graphics mode, say Y to - "VESA VGA graphics console" as well. - -TGA frame buffer support' +TGA frame buffer support CONFIG_FB_TGA - This is the frame buffer device driver for generic TGA graphic cards. - Say Y if you have one of those. + This is the frame buffer device driver for generic TGA graphic + cards. Say Y if you have one of those. VESA VGA graphics console CONFIG_FB_VESA - This is the frame buffer device driver for generic VESA graphic cards. - Please read Documentation/fb/vesafb.txt. - -MDA dual-headed support -CONFIG_FB_MDA + This is the frame buffer device driver for generic VESA 2.0 + compliant graphic cards. The older VESA 1.2 cards are not supported. + You will get a boot time penguin logo at no additional cost. Please + read Documentation/fb/vesafb.txt and the . If unsure, say Y. + +Backward compatibility mode for Xpmac +CONFIG_FB_COMPAT_XPMAC + If you use the Xpmac X server (common with mklinux), you'll need + to enable this to use X. You should consider changing to XFree86 + which includes a server that supports the frame buffer device + directly (XF68_FBDev). + +Matrox unified accelerated driver +CONFIG_FB_MATROX + Say Y here if you have Matrox Millennium, Matrox Milleinnium II, + Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox + Mystique G200, Matrox Millennium G200 or Matrox Marvel G200 in your + box. At this time, G100, Mystique G200 and Marvel G200 support is + untested. If you want, you can select M, in this case module + matroxfb.o will be created. You can pass parameters into driver if + it is compiled into kernel by specifying "video=matrox:XXX", where + meaning of XXX you can found at the end of main source file + (drivers/video/matroxfb.c) at boottime. Same parameters can be + passed into insmod if driver is used as module. + +Matrox Millennium support +CONFIG_FB_MATROX_MILLENIUM + Say Y here if you have Matrox Millennium or Matrox Milleninium II in + the box. If you select "Advanced lowlevel driver options", you should + check 4 bpp packed pixel, 8 bpp packed pixel, 16 bpp packed pixel, 24 + bpp packed pixel and 32 bpp packed pixel. You can also use font + widths different from 8. + +Matrox Mystique support +CONFIG_FB_MATROX_MYSTIQUE + Say Y here if you have Matrox Mystique or Matrox Mystique 220 in the + box. If you select "Advanced lowlevel driver options", you should + check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed pixel + and 32 bpp packed pixel. You can also use font widths different + from 8. + +Matrox G100 support +CONFIG_FB_MATROX_G100 + Say Y here if you have Matrox Productiva G100 in the box. But THIS + DRIVER IS NOT TESTED BECAUSE OF I HAVE NO G100 board and G100 + technical sheets are top secret at this time. But driver should not + cause any damage to your computer. + If you select "Advanced lowlevel driver options", you should check + 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed pixel and + 32 bpp packed pixel. You can also use font widths different from 8. + +Matrox unified driver multihead support +CONFIG_FB_MATROX_MULTIHEAD + Say Y here if you have more than one (supported) Matrox device in + computer and you want to use all of them. If you have only one + device, you should say N because of driver compiled with Y is larger + and a bit slower, especially on ia32 (ix86). + If you compiled driver as module, you are VERY interested in speed + and you can use 40KB of memory per each Matrox device, you can + compile driver without multihead support and instead of it insmod + more module instances. In this case, you MUST specify parameter dev=N + to insmod, where N is sequential number of Matrox device (0 = first, + 1 = second and so on). + +MDA text console (dual-headed) +CONFIG_MDA_CONSOLE Say Y here if you have an old MDA or monochrome Hercules graphics - adapter in your system acting as a second head ( = video card). Do - not enable this driver if your MDA card is the primary card in your - system; the normal VGA driver will handle it. + adapter in your system acting as a second head ( = video card). You + will then be able to use two monitors with your Linux system. Do not + say Y here if your MDA card is the primary card in your system; the + normal VGA driver will handle it. This driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). - The module will be called mdafb.o. If you want to compile it as + The module will be called mdacon.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. If unsure, say N. -SBUS and UPA framebuffers +SBUS and UPA frame buffers CONFIG_FB_SBUS Say Y if you want support for SBUS or UPA based frame buffer device. @@ -1690,45 +1843,47 @@ CONFIG_FB_CGTHREE TCX (SS4/SS5 only) support CONFIG_FB_TCX - This is the frame buffer device driver for the TCX 24/8bit frame buffer. + This is the frame buffer device driver for the TCX 24/8bit frame + buffer. Virtual Frame Buffer support (ONLY FOR TESTING!) CONFIG_FB_VIRTUAL - This is a `virtual' frame buffer device. It operates on a chunk of - unswapable kernel memory instead of on the memory of a graphics board. - This means you cannot see any output sent to this frame buffer device, - while it does consume precious memory. The main use of this frame - buffer device is testing and debugging the frame buffer subsystem. Do - NOT enable it for normal systems! To protect the innocent, it has to - be enabled explicitly on boot time using the kernel option `video=vfb:'. + This is a `virtual' frame buffer device. It operates on a chunk of + unswapable kernel memory instead of on the memory of a graphics + board. This means you cannot see any output sent to this frame + buffer device, while it does consume precious memory. The main use + of this frame buffer device is testing and debugging the frame + buffer subsystem. Do NOT enable it for normal systems! To protect + the innocent, it has to be enabled explicitly at boot time using the + kernel option `video=vfb:'. This driver is also available as a module ( = code which can be - inserted and removed from the running kernel whenever you want). - The module will be called vfb.o. If you want to compile it as - a module, say M here and read Documentation/modules.txt. + inserted and removed from the running kernel whenever you want). The + module will be called vfb.o. If you want to compile it as a module, + say M here and read Documentation/modules.txt. If unsure, say N. Advanced low level driver options CONFIG_FBCON_ADVANCED The frame buffer console uses character drawing routines that are - tailored to the specific organization of pixels in the memory of your - graphics hardware. These are called the low level frame buffer console - drivers. Note that they are used for text console output only; they are - NOT needed for graphical applications. + tailored to the specific organization of pixels in the memory of + your graphics hardware. These are called the low level frame buffer + console drivers. Note that they are used for text console output + only; they are NOT needed for graphical applications. - If you do not enable this option, the needed low level drivers are - automatically enabled, depending on what frame buffer devices you - selected. This is recommended for most users. + If you say N here, the needed low level drivers are automatically + enabled, depending on what frame buffer devices you selected above. + This is recommended for most users. - If you enable this option, you have more fine-grained control over which - low level drivers are enabled. You can e.g. leave out low level drivers + If you say Y here, you have more fine-grained control over which low + level drivers are enabled. You can e.g. leave out low level drivers for color depths you do not intend to use for text consoles. Low level frame buffer console drivers can be modules ( = code which - can be inserted and removed from the running kernel whenever you want). - The modules will be called fbcon-*.o. If you want to compile (some of) - them as modules, read Documentation/modules.txt. + can be inserted and removed from the running kernel whenever you + want). The modules will be called fbcon-*.o. If you want to compile + (some of) them as modules, read Documentation/modules.txt. If unsure, say N. @@ -1739,23 +1894,24 @@ CONFIG_FBCON_MFB 2 bpp packed pixels support CONFIG_FBCON_CFB2 - This is the low level frame buffer console driver for 2 bits per pixel - (4 colors) packed pixels. + This is the low level frame buffer console driver for 2 bits per + pixel (4 colors) packed pixels. 4 bpp packed pixels support CONFIG_FBCON_CFB4 - This is the low level frame buffer console driver for 4 bits per pixel - (16 colors) packed pixels. + This is the low level frame buffer console driver for 4 bits per + pixel (16 colors) packed pixels. 8 bpp packed pixels support CONFIG_FBCON_CFB8 - This is the low level frame buffer console driver for 8 bits per pixel - (256 colors) packed pixels. + This is the low level frame buffer console driver for 8 bits per + pixel (256 colors) packed pixels. 16 bpp packed pixels support CONFIG_FBCON_CFB16 This is the low level frame buffer console driver for 15 or 16 bits - per pixel (32K or 64K colors, also known as `hicolor') packed pixels. + per pixel (32K or 64K colors, also known as `hicolor') packed + pixels. 24 bpp packed pixels support CONFIG_FBCON_CFB24 @@ -1765,13 +1921,13 @@ CONFIG_FBCON_CFB24 32 bpp packed pixels support CONFIG_FBCON_CFB32 - This is the low level frame buffer console driver for 32 bits per pixel - (16M colors, also known as `truecolor') sparse packed pixels. + This is the low level frame buffer console driver for 32 bits per + pixel (16M colors, also known as `truecolor') sparse packed pixels. Amiga bitplanes support CONFIG_FBCON_AFB - This is the low level frame buffer console driver for 1 to 8 bitplanes - (2 to 256 colors) on Amiga. + This is the low level frame buffer console driver for 1 to 8 + bitplanes (2 to 256 colors) on Amiga. Amiga interleaved bitplanes support CONFIG_FBCON_ILBM @@ -1796,13 +1952,13 @@ CONFIG_FBCON_IPLAN2P8 Mac variable bpp packed pixels support CONFIG_FBCON_MAC This is the low level frame buffer console driver for 1/2/4/8/16/32 - bits per pixel packed pixels on Mac. It supports variable fontwidths - for low resolution screens. + bits per pixel packed pixels on Mac. It supports variable font + widths for low resolution screens. VGA characters/attributes support CONFIG_FBCON_VGA - This is the low level frame buffer console driver for VGA text mode, as - used by vgafb. + This is the low level frame buffer console driver for VGA text mode; + it is used if you said Y to "VGA chipset support (text only)" above. Parallel-port support CONFIG_PARPORT @@ -1815,7 +1971,7 @@ CONFIG_PARPORT For extensive information about drivers for many devices attaching to the parallel port see http://www.torque.net/linux-pp.html on the - WWW (To browse the WWW, you need to have access to a machine on the + WWW (to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape). It is possible to share a single parallel port among several devices @@ -1849,33 +2005,19 @@ CONFIG_PARPORT_OTHER Sun Ultra/AX-style hardware CONFIG_PARPORT_AX Say Y here if you need support for the parallel port hardware on Sun - Ultra/AX machines. This code is also available as a module (say M), - called parport_ax.o. If in doubt, saying N is the safe plan. - -Generate little endian code -CONFIG_CPU_LITTLE_ENDIAN - If your compiler is mipsel-linux-gcc or mipsel-linuxelf-gcc (as - opposed to mips-linux-gcc or mips-linuxelf-gcc), say Y here, - otherwise N. Most MIPS machines use little-endian code, but it might - be necessary to run older Mips systems, such as the Sony News and - MIPS RC3xxx, in big endian mode. - -Build fp execption handler module -CONFIG_MIPS_FPE_MODULE - Build the floating point exception handler module. This option is only - useful for people working on the floating point exception handler. If - you don't, say n. + Ultra/AX machines. This code is also available as a module (say M), + called parport_ax.o. If in doubt, saying N is the safe plan. Plug and Play support CONFIG_PNP - Plug and Play support allows the kernel to automatically configure some - peripheral devices. Say Y to enable PnP. + Plug and Play support allows the kernel to automatically configure + some peripheral devices. Say Y to enable PnP. Auto-probe for parallel devices CONFIG_PNP_PARPORT Some IEEE-1284 conforming parallel-port devices can identify - themselves when requested. Say Y to enable this feature, or M to - compile it as a module (parport_ieee1284.o). If in doubt, say N. + themselves when requested. Say Y to enable this feature, or M to + compile it as a module (parport_ieee1284.o). If in doubt, say N. Enable loadable module support CONFIG_MODULES @@ -1896,10 +2038,10 @@ CONFIG_MODVERSIONS same modules even after compiling a new kernel; this requires the program modprobe. All the software needed for module support is in the modutils package (check the file Documentation/Changes for - location and latest version). NOTE: if you say Y here but don't + location and latest version). NOTE: if you say Y here but don't have the program genksyms (which is also contained in the above mentioned modutils package), then the building of your kernel will - fail. If you are going to use modules that are generated from + fail. If you are going to use modules that are generated from non-kernel sources, you would benefit from this option. Otherwise it's not that important. So, N ought to be a safe bet. @@ -1911,20 +2053,21 @@ CONFIG_KMOD modprobe) before you can use them. If you say Y here however, the kernel will be able to load modules for itself: when a part of the kernel needs a module, it runs modprobe with the appropriate - arguments. (This is a replacement for kerneld.) Say Y here and read - about configuring it in Documentation/kmod.txt. + arguments, thereby loading the module if it is available. (This is a + replacement for kerneld.) Say Y here and read about configuring it + in Documentation/kmod.txt. ARP daemon support (EXPERIMENTAL) CONFIG_ARPD Normally, the kernel maintains an internal cache which maps IP addresses to hardware addresses on the local network, so that Ethernet/Token Ring/ etc. frames are sent to the proper address on - the physical networking layer. For small networks having a few + the physical networking layer. For small networks having a few hundred directly connected hosts or less, keeping this address - resolution (ARP) cache inside the kernel works well. However, + resolution (ARP) cache inside the kernel works well. However, maintaining an internal ARP cache does not work well for very large switched networks, and will use a lot of kernel memory if TCP/IP - connections are made to many machines on the network. + connections are made to many machines on the network. If you say Y here, the kernel's internal ARP cache will never grow to more than 256 entries (the oldest entries are expired in a LIFO @@ -1932,10 +2075,10 @@ CONFIG_ARPD daemon arpd. Arpd then answers the address resolution request either from its own cache or by asking the net. - This code is still experimental. If you do say Y here, you should - obtain a copy of arpd from - http://www.loran.com/~layes/arpd/index.html, and you should also say - Y to "Kernel/User network link driver", below. If unsure, say N. + This code is experimental. If you do say Y here, you should obtain a + copy of arpd from http://www.loran.com/~layes/arpd/index.html, and + you should also say Y to "Kernel/User network link driver", below. + If unsure, say N. TCP/IP networking CONFIG_INET @@ -1944,11 +2087,12 @@ CONFIG_INET kernel by about 35 kB), since some programs (e.g. the X window system) use TCP/IP even if your machine is not connected to any other computer. You will get the so-called loopback device which - allows you to ping yourself (great fun, that!). This option is also - necessary if you want to use the full power of term (term is a - program which gives you almost full Internet connectivity if you - have a regular dial up shell account on some Internet connected Unix - computer. Read http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html). + allows you to ping yourself (great fun, that!). This option is + also necessary if you want to use the full power of term (term + is a program which gives you almost full Internet connectivity + if you have a regular dial up shell account on some Internet + connected Unix computer; for more information, read + http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html). If you say Y here and also to "/proc filesystem support" and "Sysctl support" below, you can change various aspects of the behavior of @@ -1979,17 +2123,32 @@ CONFIG_IP_ADVANCED_ROUTER will then be presented with several options that allow more precise control about the routing process. - The answer to this question won't directly affect the kernel: saying - N will just cause this configure script to skip all the questions - about advanced routing. + The answer to this question won't directly affect the kernel: + answering N will just cause this configure script to skip all the + questions about advanced routing. Note that your box can only act as a router if you enable IP forwarding in your kernel; you can do that by saying Y to "/proc - filesystem support" and "Sysctl support" below and executing the line + filesystem support" and "Sysctl support" below and executing the + line echo "1" > /proc/sys/net/ipv4/ip_forward - at boot time after the /proc filesystem has been mounted. + at boot time after the /proc filesystem has been mounted. + + If you turn on IP forwarding, you will also get the rp_filter, which + automatically rejects incoming packets if the routing table entry + for their source address doesn't match the network interface they're + arriving on. This has security advantages because it prevents the + so-called IP spoofing, however it can pose problems if you use + asymmetric routing (packets from you to a host take a different path + than packets from that host to you) or if you operate a non-routing + host which has several IP addresses on different interfaces. To turn + rp_filter off use: + + echo 0 > /proc/sys/net/ipv4/conf/<device>/rp_filter + or + echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter If unsure, say N here. @@ -1997,8 +2156,10 @@ IP: policy routing CONFIG_IP_MULTIPLE_TABLES Normally, a router decides what to do with a received packet based solely on the packet's final destination address. If you say Y here, - routing can also take into account the originating address and the - network device from which the packet reached us. + the Linux router will also be able to take the packet's source + address into account. Furthermore, if you also say Y to "IP: use TOS + value as routing key" below, the TOS (Type-Of-Service) field of the + packet can be used for routing decisions as well. IP: equal cost multipath CONFIG_IP_ROUTE_MULTIPATH @@ -2014,10 +2175,9 @@ IP: use TOS value as routing key CONFIG_IP_ROUTE_TOS The header of every IP packet carries a TOS (Type of Service) value with which the packet requests a certain treatment, e.g. low latency - (for interactive traffic), high throughput, or high reliability. - Normally, these values are ignored, but if you say Y here, you will - be able to specify different routes for packets with different TOS - values. + (for interactive traffic), high throughput, or high reliability. If + you say Y here, you will be able to specify different routes for + packets with different TOS values. IP: verbose route monitoring CONFIG_IP_ROUTE_VERBOSE @@ -2036,7 +2196,8 @@ CONFIG_IP_ROUTE_LARGE_TABLES IP: fast network address translation CONFIG_IP_ROUTE_NAT If you say Y here, your router will be able to modify source and - destination addresses of packets that pass through it. + destination addresses of packets that pass through it, in a manner + you specify. IP: optimize as router not host CONFIG_IP_ROUTER @@ -2049,11 +2210,13 @@ CONFIG_IP_ROUTER Note that your box can only act as a router if you enable IP forwarding in your kernel; you can do that by saying Y to "/proc - filesystem support" and "Sysctl support" below and executing the line + filesystem support" and "Sysctl support" below and executing the + line echo "1" > /proc/sys/net/ipv4/ip_forward - at boot time after the /proc filesystem has been mounted. + at boot time after the /proc filesystem has been mounted. You can do + that even if you say N here. If unsure, say N here. @@ -2087,7 +2250,7 @@ CONFIG_IP_FIREWALL echo "1" > /proc/sys/net/ipv4/ip_forward - at boot time after the /proc filesystem has been mounted. + at boot time after the /proc filesystem has been mounted. You need to say Y to "IP firewalling" in order to be able to use IP masquerading (masquerading means that local computers can chat with @@ -2105,11 +2268,10 @@ CONFIG_IP_FIREWALL IP: firewall packet netlink device CONFIG_IP_FIREWALL_NETLINK - If you say Y here and then packets hit your Linux firewall and are - blocked, the first 128 bytes of each such packet are passed on to - optional user space monitoring software that can then look for - attacks and take actions such as paging the administrator of the - site. + If you say Y here, then the first 128 bytes of each packet that hit + your Linux firewall and was blocked are passed on to optional user + space monitoring software that can then look for attacks and take + actions such as paging the administrator of the site. To use this, you need to create a character special file under /dev with major number 36 and minor number 3 using mknod ("man mknod"), @@ -2124,33 +2286,34 @@ CONFIG_IP_PNP This enables automatic configuration of IP addresses of devices and of the routing table during kernel boot, based on either information supplied at the kernel command line or by BOOTP or RARP protocols. - You need to say Y only for diskless machines requiring network access - to boot (in which case you want to say Y to "Root file system on - NFS" as well), because all other machines configure the network in - their startup scripts. + You need to say Y only for diskless machines requiring network + access to boot (in which case you want to say Y to "Root file system + on NFS" as well), because all other machines configure the network + in their startup scripts. BOOTP support CONFIG_IP_PNP_BOOTP - If you want your Linux box to mount its whole root filesystem from - some other computer over the net via NFS and you want the IP address - of your computer to be discovered automatically at boot time using - the BOOTP protocol (a special protocol designed for doing this job), - say Y here. In case the boot ROM of your network card was designed - for booting Linux and does BOOTP itself, providing all necessary - information on the kernel command line, you can say N here. If - unsure, say Y. Note that if you want to use BOOTP, a BOOTP server - must be operating on your network. Read Documentation/nfsroot.txt - for details. + If you want your Linux box to mount its whole root filesystem (the + one containing the directory /) from some other computer over the + net via NFS and you want the IP address of your computer to be + discovered automatically at boot time using the BOOTP protocol (a + special protocol designed for doing this job), say Y here. In case + the boot ROM of your network card was designed for booting Linux and + does BOOTP itself, providing all necessary information on the kernel + command line, you can say N here. If unsure, say Y. Note that if you + want to use BOOTP, a BOOTP server must be operating on your network. + Read Documentation/nfsroot.txt for details. RARP support CONFIG_IP_PNP_RARP - If you want your Linux box to mount its whole root filesystem from - some other computer over the net via NFS and you want the IP address - of your computer to be discovered automatically at boot time using - the RARP protocol (an older protocol which is being obsoleted by - BOOTP and DHCP), say Y here. Note that if you want to use RARP, a - RARP server must be operating on your network. Read - Documentation/nfsroot.txt for details. + If you want your Linux box to mount its whole root filesystem (the + one containing the directory /) from some other computer over the + net via NFS and you want the IP address of your computer to be + discovered automatically at boot time using the RARP protocol (an + older protocol which is being obsoleted by BOOTP and DHCP), say Y + here. Note that if you want to use RARP, a RARP server must be + operating on your network. Read Documentation/nfsroot.txt for + details. IP: tunneling CONFIG_NET_IPIP @@ -2194,10 +2357,10 @@ CONFIG_IP_TRANSPARENT_PROXY This enables your Linux firewall to transparently redirect any network traffic originating from the local network and destined for a remote host to a local server, called a "transparent proxy - server". This makes the local computers think they are talking to + server". This makes the local computers think they are talking to the remote end, while in fact they are connected to the local proxy. Redirection is activated by defining special input firewall - rules (using the ipfwadm utility) and/or by doing an appropriate + rules (using the ipchains utility) and/or by doing an appropriate bind() system call. IP: masquerading @@ -2226,7 +2389,7 @@ CONFIG_IP_MASQUERADE echo "1" > /proc/sys/net/ipv4/ip_forward - from a boot time script after the /proc filesystem has been mounted. + from a boot time script after the /proc filesystem has been mounted. Details on how to set things up are contained in the IP Masquerade mini-HOWTO, available via FTP (user: anonymous) from @@ -2234,33 +2397,56 @@ CONFIG_IP_MASQUERADE information on the WWW at http://www.tor.shaw.wave.ca/~ambrose/kernel21.html. - If you say Y here, you should also say Y to "IP: always defragment", - below. If you say Y here, then the modules ip_masq_ftp.o (for ftp - transfers through the firewall), ip_masq_irc.o (for irc chats - through the firewall), and ip_masq_raudio.o (for RealAudio downloads - through the firewall) will automatically be compiled. Modules are + If you say Y here, then the modules ip_masq_ftp.o (for ftp file + transfers), ip_masq_irc.o (for irc chats), ip_masq_quake.o (you + guessed it), ip_masq_vdolive.o (for VDOLive video connections), + ip_masq_cuseeme.o (for CU-SeeMe broadcasts) and ip_masq_raudio.o + (for RealAudio downloads) will automatically be compiled. They are + needed to make masquerading for these protocols work. Modules are pieces of code which can be inserted in and removed from the running kernel whenever you want; read Documentation/modules.txt for details. IP: ICMP masquerading CONFIG_IP_MASQUERADE_ICMP - The basic masquerade code described for "IP: masquerading" above only - handles TCP or UDP packets (and ICMP errors for existing - connections). This option adds additional support for masquerading + The basic masquerade code described for "IP: masquerading" above + only handles TCP or UDP packets (and ICMP errors for existing + connections). This option adds additional support for masquerading ICMP packets, such as ping or the probes used by the Windows 95 tracert program. If you want this, say Y. +IP: masquerading special modules support +CONFIG_IP_MASQUERADE_MOD + This provides support for special modules that can modify the + rewriting rules used when masquerading. Please not that this feature + adds a little overhead in the input packet processing chain. + + Examples of such modules are ipautofw (allowing the masquerading of + protocols which don't have their own protocol helpers) and port + forwarding (making an incoming port of a local computer visible + through the masquerading host). + + You will need the user space program "ipmasqadm" to use these + additional modules; you can download it from + http://juanjox.home.ml.org/ + + All this additional code is still under development and so is + currently marked EXPERIMENTAL. + + If you want to try, for example, PORT FORWARDING, say Y. + IP: ipautofw masquerade support (Experimental) CONFIG_IP_MASQUERADE_IPAUTOFW - ipautofw is a program by Richard Lynch allowing additional support - for masquerading protocols which do not (as yet) have their own - protocol helpers. Information and source for ipautofw is available - via FTP (user: anonymous) from + ipautofw is a program which allows the masquerading of protocols + which do not (as yet) have their own protocol helpers. Information + and source for ipautofw is available via FTP (user: anonymous) from ftp://ftp.netis.com/pub/members/rlynch/ + You will also need the ipmasqadm tool available from + http://juanjox.home.ml.org . + The ipautofw code is still under development and so is currently marked EXPERIMENTAL. If you want to try it, say Y. @@ -2271,23 +2457,26 @@ CONFIG_IP_MASQUERADE_IPAUTOFW IP: ipportfw masquerade support CONFIG_IP_MASQUERADE_IPPORTFW - Port Forwarding is an addition to IP Masquerading written by Steven - Clarke to allow some forwarding of packets from outside to inside a - firewall on given ports. This could be useful if, for example, you - want to run a web server behind the firewall or masquerading host - and this web server should be visible to the outside world. An - external client connects to port 80 of the firewall, the firewall - forwards requests to this port to the web server, the web server - handles the request and the results are sent through the firewall to - the original client. The client thinks that the firewall machine - itself is running the web server. + Port Forwarding is an addition to IP Masquerading which allows some + forwarding of packets from outside to inside a firewall on given + ports. This could be useful if, for example, you want to run a web + server behind the firewall or masquerading host and that web server + should be visible to the outside world. An external client connects + to port 80 of the firewall, the firewall forwards requests to this + port to the web server, the web server handles the request and the + results are sent through the firewall to the original client. The + client thinks that the firewall machine itself is running the web + server. This can also be used for load balancing if you have a farm + of identical web servers behind the firewall. Information about it is available from http://www.monmouth.demon.co.uk/ipsubs/portforwarding.html (to browse the WWW, you need to have access to a machine on the Internet - that has a program like lynx or netscape). You will need the user - space program ipportfw which can be downloaded from - ftp://ftp.compsoc.net/users/steve/ipportfw/linux21/ + that has a program like lynx or netscape). For general info, please + see ftp://ftp.compsoc.net/users/steve/ipportfw/linux21/ + + You will need the user space program "ipmasqadm" which can be + downloaded from http://juanjox.home.ml.org/ The portfw code is still under development and so is currently marked EXPERIMENTAL. If you want to try it, say Y. @@ -2297,44 +2486,56 @@ CONFIG_IP_MASQUERADE_IPPORTFW The module will be called ip_masq_portfw.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. -IP: always defragment +IP: ipmarkfw masquerade support +CONFIG_IP_MASQUERADE_IPMARKFW + This provides functionality equivalent to port forwarding, the + difference is that Mark Forwarding uses "firewalling mark" to select + which packets must forward (see ipchains(8), "-m" argument). + + The markfw code is still under development and so is currently + marked EXPERIMENTAL. If you want to try it, say Y. + + This code is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called ip_masq_markfw.o. If you want to compile + it as a module, say M here and read Documentation/modules.txt. + +IP: always defragment (required for masquerading) CONFIG_IP_ALWAYS_DEFRAG - This option means that all incoming fragments (= parts of IP packets + If you say Y here, then all incoming fragments (parts of IP packets that arose when some host between origin and destination decided - that the IP packets were too large and cut them into pieces) will be + that the packets were too large and cut them into pieces) will be reassembled (defragmented) before being processed, even if they are - about to be forwarded. - - This option is highly recommended if you have said Y to "IP: - masquerading" because that facility requires that second and further - fragments can be related to TCP or UDP port numbers, which are only - stored in the first fragment. When using "IP: firewalling" support , - you might also want to say Y here, to have a more reliable firewall - (otherwise second and further fragments will always be accepted by - the firewall). When using "IP: transparent proxying", this option is - implicit, although it is safe to say Y here. Only say Y here if - running either a firewall that is the sole link to your network or a - transparent proxy; never ever say Y here for a normal router or - host. + about to be forwarded. + + You must say Y here if you want to enable "IP: masquerading" or "IP: + transparent proxying". + + When using "IP: firewalling" support, you might also want to say Y + here, to have a more reliable firewall (otherwise second and further + fragments must be dealt with by the firewall, which can be tricky). + + Only say Y here if running either a firewall that is the sole link + to your network or a transparent proxy; never ever say Y here for a + normal router or host. IP: aliasing support CONFIG_IP_ALIAS Sometimes it is useful to give several IP addresses to a single - physical network interface (= serial port or Ethernet card). The - most common case is that you want to serve different WWW or ftp - documents to the outside according to which of your host names was - used to connect to you. This is called "multihosting" or "virtual - domains" or "virtual hosting services" and is explained in detail on - the WWW at http://www.thesphere.com/~dlp/TwoServers/ (to browse the - WWW, you need to have access to a machine on the Internet that has a - program like lynx or netscape) and also in the - Virtual-Hosting-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + physical network interface (serial port or Ethernet card). The most + common case is that you want to serve different WWW or ftp documents + to the outside according to which of your host names was used to + connect to you. This is called "multihosting" or "virtual domains" + or "virtual hosting services" and is explained in detail on the WWW + at http://www.thesphere.com/~dlp/TwoServers/ (to browse the WWW, you + need to have access to a machine on the Internet that has a program + like lynx or netscape) and also in the Virtual-Hosting-HOWTO, + available via FTP (user: anonymous) from + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. - Another scenario would be - that there are two logical networks living on your local Ethernet - and you want to access them both with the same Ethernet card. This - can be done if you say Y here. + Another scenario would be that there are two logical networks living + on your local Ethernet and you want to access them both with the + same Ethernet card. This can also be done if you say Y here. The configuration of these alias addresses is done with a special name syntax explained in Documentation/networking/alias.txt and in @@ -2356,27 +2557,31 @@ IP: PIM-SM version 1 support CONFIG_IP_PIMSM_V1 Kernel side support for Sparse Mode PIM (Protocol Independent Multicast) version 1. This multicast routing protocol is used widely - because Cisco supports it. You need special software to use it + because Cisco supports it. You need special software to use it (pimd-v1). Please see http://netweb.usc.edu/pim/ for more information about PIM (to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or - netscape). Say Y if you want to use PIM-SM v1. Note that you can say - N here if you just want to use Dense Mode PIM. + netscape). + + Say Y if you want to use PIM-SM v1. Note that you can say N here if + you just want to use Dense Mode PIM. IP: PIM-SM version 2 support CONFIG_IP_PIMSM_V2 Kernel side support for Sparse Mode PIM version 2. In order to use this, you need an experimental routing daemon supporting it (pimd or - gated-5). This routing protocol is not used widely, so say N unless + gated-5). This routing protocol is not used widely, so say N unless you want to play with it. PC/TCP compatibility mode CONFIG_INET_PCTCP - If you have been having difficulties telnetting to your Linux machine - from a DOS system that uses (broken) PC/TCP networking software (all - versions up to OnNet 2.0) over your local Ethernet try saying Y - here. Everyone else says N. People having problems with NCSA telnet - should see the file linux/Documentation/networking/ncsa-telnet. + If you have been having difficulties telnetting to your Linux + machine from a DOS system that uses (broken) PC/TCP networking + software (all versions up to OnNet 2.0) over your local Ethernet try + saying Y here. Everyone else says N. + + People having problems with NCSA telnet should see the file + linux/Documentation/networking/ncsa-telnet. Reverse ARP server CONFIG_INET_RARP @@ -2387,9 +2592,9 @@ CONFIG_INET_RARP addresses. Diskless Sun 3 machines use this procedure at boot time, and diskless Linux boxes can be configured to do it as well. - If you want your Linux box to be able to *answer* such requests, say - Y here; you'll then have to run the program rarp ("man rarp") on - your box. + If you want your Linux box to be able to *answer* such requests, + answer Y here; you'll then have to run the program rarp ("man rarp") + on your box. If you actually want to use a diskless Sun 3 machine as an X terminal to Linux, say Y here and fetch Linux-Xkernel from @@ -2415,8 +2620,9 @@ CONFIG_INET_SNARL Say Y if you are on a subnetted network with all machines connected by Ethernet segments only, as this option optimizes network access for this special case. If there are other connections, e.g. SLIP - links, between machines of your IP network, say N. If in doubt, say - N. The PATH mtu discovery facility will cover most cases anyway. + links, between machines of your IP network, say N. If in doubt, + answer N. The PATH mtu discovery facility will cover most cases + anyway. Path MTU Discovery (normally enabled) CONFIG_PATH_MTU_DISCOVERY @@ -2424,8 +2630,8 @@ CONFIG_PATH_MTU_DISCOVERY over the net. "Path MTU Discovery" means that, instead of always sending very small chunks, we start out sending big ones and if we then discover that some host along the way likes its chunks smaller, - we adjust to a smaller size. This is good, so most people say - Y here. + we adjust to a smaller size. This is good, so most people say Y + here. However, some DOS software (versions of DOS NCSA telnet and Trumpet Winsock in PPP mode) is broken and won't be able to connect to your @@ -2437,37 +2643,39 @@ CONFIG_PATH_MTU_DISCOVERY Disable NAGLE algorithm (normally enabled) CONFIG_TCP_NAGLE_OFF The NAGLE algorithm works by requiring an acknowledgment before - sending small IP frames (= packets). This keeps tiny telnet and - rlogin packets from congesting Wide Area Networks. Most people + sending small IP frames (packets). This keeps tiny telnet and + rlogin packets from congesting Wide Area Networks. Most people strongly recommend to say N here, thereby leaving NAGLE enabled. Those programs that would benefit from disabling this facility can do it on a per connection basis themselves. IP: Drop source routed frames CONFIG_IP_NOSR - Usually, the originator of an IP frame (= packet) specifies only the + Usually, the originator of an IP frame (packet) specifies only the destination, and the hosts along the way do the routing, i.e. they decide how to forward the frame. However, there is a feature of the IP protocol that allows to specify the full route for a given frame already at its origin. A frame with such a fully specified route is called "source routed". The question now is whether we should honour - these route requests when such frames arrive, or if we should - drop all those frames instead. Honouring them can introduce security - problems (and is rarely a useful feature), and hence it is recommended - that you say Y here unless you really know what you're doing. + these route requests when such frames arrive, or if we should drop + all those frames instead. Honouring them can introduce security + problems (and is rarely a useful feature), and hence it is + recommended that you say Y here unless you really know what you're + doing. -IP: Allow large windows (not recommended if <16Mb of memory) +IP: Allow large windows (not recommended if <16 MB of memory) CONFIG_SKB_LARGE - On high speed, long distance networks the performance limit on - networking becomes the amount of data a machine can buffer until the - other end confirms its reception. (At 45Mbit/second there are a lot - of bits between New York and London ..). This option allows larger - amounts of data to be "in flight" at a given time. It also means a user - process can require a lot more memory for network buffers and thus this - option is best only used on machines with 16Mb of memory or higher. - Unless you are using long links with end to end speeds of over 2Mbit - a second or satellite links this option will make no difference to - performance. + On high speed, long distance networks the performance limit on + networking becomes the amount of data the sending machine can buffer + until the other end confirms its reception. (At 45 Mbit/second there + are a lot of bits between New York and London ...). If you say Y + here, bigger buffers can be used which allows larger amounts of data + to be "in flight" at any given time. It also means a user process + can require a lot more memory for network buffers and thus this + option is best used only on machines with 16 MB of memory or higher. + Unless you are using long links with end to end speeds of over 2 + Mbit a second or satellite links this option will make no difference + to performance. Unix domain sockets CONFIG_UNIX @@ -2482,8 +2690,9 @@ CONFIG_UNIX be inserted in and removed from the running kernel whenever you want). The module will be called unix.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. If you - try building this as a module and you are running kerneld, be sure - to add 'alias net-pf-1 unix' to your /etc/conf.module file. + try building this as a module and you have said Y to "Kernel module + loader support" above, be sure to add 'alias net-pf-1 unix' to your + /etc/conf.modules file. If unsure, say Y. @@ -2501,13 +2710,15 @@ CONFIG_IPV6 and the file net/ipv6/README in the kernel source. If you want to use IPv6, please upgrade to the newest net-tools as - given in Documentation/Changes. + given in Documentation/Changes. You will still be able to do regular + IPv4 networking as well. - The IPv6 support is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called ipv6.o. If you want to compile it as a - module, say M here and read Documentation/modules.txt. It's safe to - say N for now. + This protocol support is also available as a module ( = code which + can be inserted in and removed from the running kernel whenever you + want). The module will be called ipv6.o. If you want to compile it + as a module, say M here and read Documentation/modules.txt. + + It is safe to say N here for now. IPv6: enable EUI-64 token format CONFIG_IPV6_EUI64 @@ -2539,7 +2750,7 @@ CONFIG_IPX to access Novell NetWare file or print servers using the Linux Novell client ncpfs (available via FTP (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/system/filesystems/) or from within - the Linux DOS emulator dosemu (read the DOSEMU-HOWTO, available in + the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO). In order to do the former, you'll also have to say Y to "NCP filesystem support", below. @@ -2550,9 +2761,9 @@ CONFIG_IPX To turn your Linux box into a fully featured NetWare file server and IPX router, say Y here and fetch either lwared from - ftp://sunsite.unc.edu/pub/Linux/system/network/daemons/ or mars_nwe from - ftp://ftp.gwdg.de/pub/linux/misc/ncpfs. For more information, read the - IPX-HOWTO in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://sunsite.unc.edu/pub/Linux/system/network/daemons/ or mars_nwe + from ftp://ftp.gwdg.de/pub/linux/misc/ncpfs. For more information, + read the IPX-HOWTO in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. General information about how to connect Linux, Windows machines and Macs is on the WWW at http://www.eats.com/linux_mac_win.html (to @@ -2570,12 +2781,12 @@ IPX: Full internal IPX network CONFIG_IPX_INTERN Every IPX network has an address that identifies it. Sometimes it is useful to give an IPX "network" address to your Linux box as well - (for example if your box is acting as a file server for different IPX - networks: it will then be accessible from everywhere using the same - address). The way this is done is to create a virtual internal + (for example if your box is acting as a file server for different + IPX networks: it will then be accessible from everywhere using the + same address). The way this is done is to create a virtual internal "network" inside your box and to assign an IPX address to this network. Say Y here if you want to do this; read the IPX-HOWTO at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO for details. + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO for details. The full internal IPX network enables you to allocate sockets on different virtual nodes of the internal network. This is done by @@ -2583,13 +2794,14 @@ CONFIG_IPX_INTERN bind call. So applications should always initialize the node field to 0 when binding a socket on the primary network. In this case the socket is assigned the default node that has been given to the - kernel when the internal network was created. By enabling the full + kernel when the internal network was created. By enabling the full internal IPX network the cross-forwarding of packets targeted at 'special' sockets to sockets listening on the primary network is disabled. This might break existing applications, especially RIP/SAP daemons. A RIP/SAP daemon that works well with the full internal net - can be found on ftp://ftp.gwdg.de/pub/linux/misc/ncpfs. If you don't - know what you are doing, say N. + can be found on ftp://ftp.gwdg.de/pub/linux/misc/ncpfs. + + If you don't know what you are doing, say N. IPX: SPX networking (EXPERIMENTAL) CONFIG_SPX @@ -2641,7 +2853,7 @@ CONFIG_ATALK AppleTalk-IP driver support CONFIG_IPDDP This allows IP networking for users who only have AppleTalk - networking available. This feature is experimental. With this + networking available. This feature is experimental. With this driver, you can either encapsulate IP inside AppleTalk (e.g. if your Linux box is stuck on an AppleTalk only network) or decapsulate (e.g. if you want your Linux box to act as an Internet gateway for a @@ -2676,7 +2888,7 @@ CONFIG_IPDDP_DECAP Apple/Farallon LocalTalk PC card support CONFIG_LTPC This allows you to use the AppleTalk PC card to connect to LocalTalk - networks. The card is also known as the Farallon PhoneNet PC card. + networks. The card is also known as the Farallon PhoneNet PC card. If you are in doubt, this card is the one with the 65C02 chip on it. You also need version 1.3.3 or later of the netatalk package. This driver is experimental, which means that it may not work. @@ -2686,8 +2898,8 @@ COPS LocalTalk PC card support CONFIG_COPS This allows you to use COPS AppleTalk cards to connect to LocalTalk networks. You also need version 1.3.3 or later of the netatalk - package. This driver is experimental, which means that it may not - work. This driver will only work if you choose "AppleTalk DDP" + package. This driver is experimental, which means that it may not + work. This driver will only work if you choose "AppleTalk DDP" networking support, above. Please read the file Documentation/networking/cops.txt. @@ -2704,15 +2916,16 @@ CONFIG_COPS_TANGENT Amateur Radio support CONFIG_HAMRADIO - If you want to connect your Linux computer to an amateur radio, say - Y here. You want to read http://www.tapr.org/tapr/html/pkthome.html + If you want to connect your Linux box to an amateur radio, answer Y + here. You want to read http://www.tapr.org/tapr/html/pkthome.html (to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape) and the HAM-HOWTO and the AX25-HOWTO, both available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that the answer to - this question won't directly affect the kernel: saying N will just - cause this configure script to skip all the questions about amateur - radio. + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + + Note that the answer to this question won't directly affect the + kernel: saying N will just cause this configure script to skip all + the questions about amateur radio. Amateur Radio AX.25 Level 2 CONFIG_AX25 @@ -2773,7 +2986,7 @@ CONFIG_NETROM ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. You also might want to check out the file Documentation/networking/ax25.txt. More information about digital amateur radio in general is on the WWW at - http://www.tapr.org/tapr/html/pkthome.html (To browse the WWW, you + http://www.tapr.org/tapr/html/pkthome.html (to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape). @@ -2791,10 +3004,10 @@ CONFIG_ROSE A comprehensive listing of all the software for Linux amateur radio users as well as information about how to configure an AX.25 port is contained in the AX25-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. You also might want to check - out the file Documentation/networking/ax25.txt. More information - about digital amateur radio in general is on the WWW at - http://www.tapr.org/tapr/html/pkthome.html (To browse the WWW, you + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. You also might want to + check out the file Documentation/networking/ax25.txt. More + information about digital amateur radio in general is on the WWW at + http://www.tapr.org/tapr/html/pkthome.html (to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape). @@ -2805,12 +3018,15 @@ CONFIG_ROSE Serial port KISS driver for AX.25 CONFIG_MKISS - KISS is a protocol used to send IP traffic over AX.25 radio - connections, somewhat similar to SLIP for telephone lines. Say Y - here if you intend to send Internet traffic over amateur radio, - using some device connected to your machine's serial port. In that - case, you also have to say Y to "Amateur Radio AX.25 Level 2" - support. + KISS is a protocol used for the exchange of data between a computer + and a Terminal Node Controller (a small embedded system commonly + used for networking over AX.25 amateur radio connections; it + connects the computer's serial port with the radio's microphone + input and speaker output). + + Although KISS is less advanced than the 6pack protocol, it has + the advantage that it is already supported by most modern TNCs + without the need for a firmware upgrade. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -2853,20 +3069,20 @@ CONFIG_DMASCC Currently, this driver supports Ottawa PI/PI2 (http://hydra.carleton.ca/info/pi2.html) and Gracilis PackeTwin - (http://www.paccomm.com/) boards. They are detected automatically. - If you have one of these cards, say Y here and read the HAM-HOWTO, - available via FTP (user: anonymous) in + (http://www.paccomm.com/gracilis.html) boards. They are detected + automatically. If you have one of these cards, say Y here and read + the AX25-HOWTO, available via FTP (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/. - This driver can operate multiple boards simultaneously. If you compile - it as a module (by saying M instead of Y), it will be called dmascc.o. - If you don't pass any parameter to the driver, all possible I/O - addresses are probed. This could irritate other devices that are - currently not in use. You may specify the list of addresses to be - probed by "dmascc=addr1,addr2,..." (when compiled into the kernel - image) or "io=addr1,addr2,..." (when loaded as a module). The network - interfaces will be called dmascc0 and dmascc1 for the board detected - first, dmascc2 and dmascc3 for the second one, and so on. + This driver can operate multiple boards simultaneously. If you + compile it as a module (by saying M instead of Y), it will be called + dmascc.o. If you don't pass any parameter to the driver, all + possible I/O addresses are probed. This could irritate other devices + that are currently not in use. You may specify the list of addresses + to be probed by "dmascc=addr1,addr2,..." (when compiled into the + kernel image) or "io=addr1,addr2,..." (when loaded as a module). The + network interfaces will be called dmascc0 and dmascc1 for the board + detected first, dmascc2 and dmascc3 for the second one, and so on. Before you configure each interface with ifconfig, you MUST set certain parameters, such as channel access timing, clock mode, and @@ -2879,11 +3095,11 @@ CONFIG_DMASCC Z8530 SCC driver for AX.25 CONFIG_SCC These cards are used to connect your Linux box to an amateur radio - in order to communicate with other computers. If you want to use + in order to communicate with other computers. If you want to use this, read Documentation/networking/z8530drv.txt and the - AX.25-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Also make sure to say Y to - "Amateur Radio AX.25 Level 2" support. + AX25-HOWTO, available via FTP (user: anonymous) at + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Also make sure to say Y + to "Amateur Radio AX.25 Level 2" support. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -2942,7 +3158,7 @@ CONFIG_BAYCOM_SER_FDX driver, "BAYCOM ser12 half duplex driver for AX.25" is the old driver and still provided in case this driver does not work with your serial interface chip. To configure the driver, use the sethdlc - utility available in the standard ax25 utilities package. For + utility available in the standard ax25 utilities package. For information on the modems, see http://www.baycom.de (to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape) and @@ -2957,9 +3173,9 @@ BAYCOM ser12 half duplex driver for AX.25 CONFIG_BAYCOM_SER_HDX This is one of two drivers for Baycom style simple amateur radio modems that connect to a serial interface. The driver supports the - ser12 design in full duplex mode. This is the old driver. It is + ser12 design in full duplex mode. This is the old driver. It is still provided in case your serial interface chip does not work with - the full duplex driver. This driver is depreciated. To configure + the full duplex driver. This driver is depreciated. To configure the driver, use the sethdlc utility available in the standard ax25 utilities package. For information on the modems, see http://www.baycom.de (to browse the WWW, you need to have access to @@ -2974,9 +3190,9 @@ CONFIG_BAYCOM_SER_HDX Sound card modem driver for AX.25 CONFIG_SOUNDMODEM This experimental driver allows a standard Sound Blaster or - WindowsSoundSystem compatible sound card to be used as a packet radio - modem (NOT as a telephone modem!), to send digital traffic over - amateur radio. + WindowsSoundSystem compatible sound card to be used as a packet + radio modem (NOT as a telephone modem!), to send digital traffic + over amateur radio. To configure the driver, use the sethdlc, smdiag and smmixer utilities available in the standard ax25 utilities package. For @@ -2997,8 +3213,8 @@ CONFIG_SOUNDMODEM_SBC compatible cards. If you have a dual mode card (i.e. a WSS cards with a Sound Blaster emulation) you should say N here and Y to "Sound card modem support for WSS and Crystal cards", below, because - this usually results in better performance. This option also supports - SB16/32/64 in full duplex mode. + this usually results in better performance. This option also + supports SB16/32/64 in full duplex mode. Sound card modem support for WSS and Crystal cards CONFIG_SOUNDMODEM_WSS @@ -3012,15 +3228,16 @@ CONFIG_SOUNDMODEM_WSS Sound card modem support for 1200 baud AFSK modulation CONFIG_SOUNDMODEM_AFSK1200 - This option enables the soundmodem driver 1200 baud AFSK modem, - compatible to popular modems using TCM3105 or AM7911. The demodulator - requires about 12% of the CPU power of a Pentium 75 CPU per channel. + This option enables the soundmodem driver 1200 baud AFSK modem, + compatible to popular modems using TCM3105 or AM7911. The + demodulator requires about 12% of the CPU power of a Pentium 75 CPU + per channel. Sound card modem support for 2400 baud AFSK modulation (7.3728MHz crystal) CONFIG_SOUNDMODEM_AFSK2400_7 This option enables the soundmodem driver 2400 baud AFSK modem, compatible to TCM3105 modems (over-)clocked with a 7.3728MHz - crystal. Note that the availability of this driver does _not_ imply + crystal. Note that the availability of this driver does _not_ imply that I recommend building such links. It is only here since users especially in eastern Europe have asked me to do so. In fact this modulation scheme has many disadvantages, mainly its incompatibility @@ -3055,7 +3272,7 @@ CONFIG_SOUNDMODEM_HAPN4800 This option enables the soundmodem driver 4800 baud HAPN-1 compatible modem. This modulation seems to be widely used 'down under' and in the Netherlands. Here, nobody uses it, so I could not - test if it works. It is compatible to itself, however :-) + test if it works. It is compatible to itself, however :-) Sound card modem support for 9600 baud FSK G3RUH modulation CONFIG_SOUNDMODEM_FSK9600 @@ -3074,7 +3291,7 @@ CONFIG_X25 (called "virtual circuits") to other computers connected to the X.25 network. Governments, banks, and other organizations tend to use it to connect to each other or to form Wide Area Networks (WANs). Many - countries have public X.25 networks. X.25 consists of two + countries have public X.25 networks. X.25 consists of two protocols: the higher level Packet Layer Protocol (PLP) (say Y here if you want that) and the lower level data link layer protocol LAPB (say Y to "LAPB Data Link Driver" below if you want that). @@ -3102,16 +3319,16 @@ CONFIG_X25 LAPB Data Link Driver (EXPERIMENTAL) CONFIG_LAPB - Link Access Procedure, Balanced (LAPB) is the data link layer - (i.e. the lower) part of the X.25 protocol. It offers a reliable + Link Access Procedure, Balanced (LAPB) is the data link layer (i.e. + the lower) part of the X.25 protocol. It offers a reliable connection service to exchange data frames with one other host, and it is used to transport higher level protocols (mostly X.25 Packet - Layer, the higher part of X.25, but others are possible as - well). Usually, LAPB is used with specialized X.21 network cards, but - Linux currently supports LAPB only over Ethernet connections. If you - want to use LAPB connections over Ethernet, say Y here and to "LAPB - over Ethernet driver" below. Read - Documentation/networking/lapb-module.txt for technical details. + Layer, the higher part of X.25, but others are possible as well). + Usually, LAPB is used with specialized X.21 network cards, but Linux + currently supports LAPB only over Ethernet connections. If you want + to use LAPB connections over Ethernet, say Y here and to "LAPB over + Ethernet driver" below. Read + Documentation/networking/lapb-module.txt for technical details. If you want to compile this driver as a module though ( = code which can be inserted in and removed from the running kernel whenever you @@ -3192,10 +3409,13 @@ CONFIG_SCSI because you will be asked for it. You also need to say Y here if you want support for the parallel - port version of the 100MB IOMEGA ZIP drive. + port version of the 100 MB IOMEGA ZIP drive. Please read the SCSI-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. The + SCSI-Programming-HOWTO contains information about how to add or + remove an SCSI device from a running Linux machine without + rebooting. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -3209,9 +3429,9 @@ SCSI disk support CONFIG_BLK_DEV_SD If you want to use a SCSI hard disk or the SCSI or parallel port version of the IOMEGA ZIP drive under Linux, say Y and read the - SCSI-HOWTO and the Disk-HOWTO, both available via FTP (user: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. This is - NOT for SCSI CDROMs. + SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available via + FTP (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + This is NOT for SCSI CDROMs. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -3240,8 +3460,8 @@ SCSI CDROM support CONFIG_BLK_DEV_SR If you want to use a SCSI CDROM under Linux, say Y and read the SCSI-HOWTO and the CDROM-HOWTO from - sunsite.unc.edu:/pub/Linux/docs/HOWTO. Also make sure to say Y or M - to "ISO 9660 CDROM filesystem support" later. + ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO. Also make sure to say Y + or M to "ISO 9660 CDROM filesystem support" later. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -3264,11 +3484,11 @@ CONFIG_CHR_DEV_SG directly, so you need some additional software which knows how to talk to these devices using the SCSI protocol. For CD-writers, you would need the program cdwrite, available via FTP (user: anonymous) - from ftp://sunsite.unc.edu/pub/Linux/utils/disk-management; for other - devices, it's possible that you'll have to write the driver software - yourself, so have a look at the SCSI-HOWTO and at the + from ftp://sunsite.unc.edu/pub/Linux/utils/disk-management; for + other devices, it's possible that you'll have to write the driver + software yourself, so have a look at the SCSI-HOWTO and at the SCSI-Programming-HOWTO, both available via FTP (user: anonymous) in - sunsite.unc.edu:/pub/Linux/docs/HOWTO. + ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -3282,7 +3502,7 @@ CONFIG_SCSI_MULTI_LUN Unit Number), e.g. a CD jukebox, and only one LUN is detected, you can say Y here to force the SCSI driver to probe for multiple LUNs. A SCSI device with multiple LUNs acts logically like multiple SCSI - devices. The vast majority of SCSI devices have only one LUN, and + devices. The vast majority of SCSI devices have only one LUN, and so most people can say N here and should in fact do so, because it is safer. @@ -3290,24 +3510,30 @@ Verbose SCSI error reporting (kernel size +=12K) CONFIG_SCSI_CONSTANTS The error messages regarding your SCSI hardware will be easier to understand if you say Y here; it will enlarge your kernel by about - 12KB. If in doubt, say Y. + 12 KB. If in doubt, say Y. SCSI logging facility CONFIG_SCSI_LOGGING This turns on a logging facility that can be used to debug a number - of problems. Normally no logging output will appear, but you can - enable logging with a shell command like: + of SCSI related problems. + + If you say Y here, no logging output will appear by default, but you + can enable logging by saying Y to "/proc filesystem support" and + "Sysctl support" below and executing the command echo "scsi log token [level]" > /proc/scsi/scsi + at boot time after the /proc filesystem has been mounted. + There are a number of things that can be used for 'token' (you can find them in the source: drivers/scsi/scsi.c), and this allows you to select the types of information you want, and the level allows - you to select the level of verbosity. If you say N here, it may be - harder to track down some types of SCSI problems. If you say Y here - your kernel will be somewhat larger, but there should be no - noticeable performance impact as long as you have logging turned - off. + you to select the level of verbosity. + + If you say N here, it may be harder to track down some types of SCSI + problems. If you say Y here your kernel will be somewhat larger, but + there should be no noticeable performance impact as long as you have + logging turned off. AdvanSys SCSI support CONFIG_SCSI_ADVANSYS @@ -3337,7 +3563,7 @@ Adaptec AHA1542 support CONFIG_SCSI_AHA1542 This is support for a SCSI host adapter. It is explained in section 3.4 of the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that Trantor was + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that Trantor was recently purchased by Adaptec, and some former Trantor products are being sold under the Adaptec name. If it doesn't work out of the box, you may have to change some settings in drivers/scsi/aha1542.h. @@ -3370,10 +3596,10 @@ CONFIG_SCSI_AIC7XXX found by checking the help file for each of the available configuration options. You also want to read drivers/scsi/README.aic7xxx and the SCSI-HOWTO, available via FTP - (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note - that the AHA2920 SCSI host adapter is *not* supported by this + (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + Note that the AHA2920 SCSI host adapter is *not* supported by this driver; choose "Future Domain 16xx SCSI support" instead if you have - one of those. + one of those. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -3400,9 +3626,9 @@ CONFIG_OVERRIDE_CMDS Maximum number of commands per LUN CONFIG_AIC7XXX_CMDS_PER_LUN Specify the maximum number of commands you would like to allocate - per LUN (a LUN is a Logical Unit Number - some physical SCSI devices, - e.g. CD jukeboxes, act logically as several separate units, each of - which gets its own number). + per LUN (a LUN is a Logical Unit Number -- some physical SCSI + devices, e.g. CD jukeboxes, act logically as several separate units, + each of which gets its own number). Reasonable figures are in the range of 14 to 32 commands per device, but depending on hardware could be increased or decreased from that @@ -3424,7 +3650,9 @@ CONFIG_AIC7XXX_PROC_STATS small amount of overhead to each and every SCSI command the aic7xxx driver handles, so if you aren't really interested in this information, it is best to leave it disabled. This will only work if - you also say Y to "/proc filesystem support", below. If unsure, say N. + you also say Y to "/proc filesystem support", below. + + If unsure, say N. Delay in seconds after SCSI bus reset CONFIG_AIC7XXX_RESET_DELAY @@ -3444,12 +3672,12 @@ CONFIG_AIC7XXX_RESET_DELAY BusLogic SCSI support CONFIG_SCSI_BUSLOGIC This is support for BusLogic MultiMaster and FlashPoint SCSI Host - Adapters. Consult the SCSI-HOWTO, available via anonymous FTP from + Adapters. Consult the SCSI-HOWTO, available via anonymous FTP from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO, and the files README.BusLogic and README.FlashPoint in drivers/scsi for more - information. If this driver does not work correctly without + information. If this driver does not work correctly without modification, please contact the author, Leonard N. Zubkoff, by - email to lnz@dandelion.com. + email to lnz@dandelion.com. You can also build this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -3460,18 +3688,18 @@ CONFIG_SCSI_BUSLOGIC Omit BusLogic SCSI FlashPoint support CONFIG_SCSI_OMIT_FLASHPOINT This option allows you to omit the FlashPoint support from the - BusLogic SCSI driver. The FlashPoint SCCB Manager code is + BusLogic SCSI driver. The FlashPoint SCCB Manager code is substantial, so users of MultiMaster Host Adapters may wish to omit it. DTC3180/3280 SCSI support CONFIG_SCSI_DTC3280 - This is support for DTC 3180/3280 SCSI Host Adapters. Please read + This is support for DTC 3180/3280 SCSI Host Adapters. Please read the SCSI-HOWTO, available via FTP (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO and the file - drivers/scsi/README.dtc3x80. + drivers/scsi/README.dtc3x80. - This driver is also available as a module (= code which can be + This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called dtc.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. @@ -3480,13 +3708,13 @@ EATA-DMA (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix) support CONFIG_SCSI_EATA_DMA This is support for the EATA-DMA protocol compliant SCSI Host Adapters like the SmartCache III/IV, SmartRAID controller families - and the DPT PM2011B and PM2012B controllers. Note that there is + and the DPT PM2011B and PM2012B controllers. Note that there is also another driver for the same hardware: "EATA ISA/EISA/PCI support". You should only say Y to one of them. Please read the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. - This driver is also available as a module (= code which can be + This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called eata_dma.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. @@ -3497,9 +3725,9 @@ CONFIG_SCSI_EATA_PIO Adapters like the DPT PM2001 and the PM2012A. EATA-DMA compliant host adapters could also use this driver but are discouraged from doing so, since this driver only supports hard disks and lacks - numerous features. You might want to have a look at the SCSI-HOWTO, + numerous features. You might want to have a look at the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -3511,11 +3739,11 @@ CONFIG_SCSI_U14_34F This is support for the UltraStor 14F and 34F SCSI-2 host adapters. The source at drivers/scsi/u14-34f.c contains some information about this hardware. If the driver doesn't work out of the box, you may - have to change some settings in drivers/scsi/u14-34f.c. Read the + have to change some settings in drivers/scsi/u14-34f.c. Read the SCSI-HOWTO, available via FTP (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that there is also another driver for the same hardware: "UltraStor SCSI support", - below. You should say Y to both only if you want 24F support as + below. You should say Y to both only if you want 24F support as well. This driver is also available as a module ( = code which can be @@ -3543,13 +3771,20 @@ CONFIG_SCSI_FUTURE_DOMAIN other adapters based on the Future Domain chipsets (Quantum ISA-200S, ISA-250MG; Adaptec AHA-2920; and at least one IBM board). It is explained in section 3.7 of the SCSI-HOWTO, available via FTP - (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called fdomain.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. +Future Domain MCS-600/700 SCSI support +CONFIG_SCSI_FD_MCS + This is support for Future Domain MCS 600/700 MCA SCSI adapters. Some + PS/2s are also equipped with IBM Fast SCSI Adapter/A which is an OEM + of the MCS 700. This driver also supports Reply SB16/SCSI card (the + SCSI part). It supports multiple adapters in the same system. + Generic NCR5380/53c400 SCSI support CONFIG_SCSI_GENERIC_NCR5380 This is the generic NCR family of SCSI controllers, not to be @@ -3588,6 +3823,12 @@ CONFIG_SCSI_NCR53C7xx of the box, you may have to change some settings in drivers/scsi/53c7,8xx.h. + Note: there is another driver for the 53c8xx family of controllers + ("NCR53C8XX SCSI support" below). You cannot say Y to both of them; + you can say M to both and build them as modules, but only one may be + active at a time. If you have a 53c8xx board, it's better to use the + other driver. + This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called 53c7,8xx.o. If you want to compile it as a @@ -3608,25 +3849,31 @@ CONFIG_SCSI_NCR53C7xx_FAST allow DISCONNECT CONFIG_SCSI_NCR53C7xx_DISCONNECT This enables the disconnect/reconnect feature of the NCR SCSI - controller. When you say Y here, a slow SCSI device will not lock + controller. When you say Y here, a slow SCSI device will not lock the SCSI bus while processing a request, allowing simultaneous use of e.g. a SCSI hard disk and SCSI tape or CD-ROM drive, and providing much better performance when using slow and fast SCSI devices at the same time. Some devices, however, do not operate properly with this option enabled, and will cause your SCSI system - to hang, which might cause a system crash. The safe answer + to hang, which might cause a system crash. The safe answer therefore is to say N. NCR53C8XX SCSI support CONFIG_SCSI_NCR53C8XX - This is the BSD ncr driver adapted to linux for the NCR53C8XX family + This is the BSD ncr driver adapted to Linux for the NCR53C8XX family of PCI-SCSI controllers. This driver supports parity checking, tagged command queuing and fast synchronous data transfers up to 80 MB/s with wide FAST-40 LVD devices and controllers. - The NCR53C860 and NCR53C875 support FAST-20 transfers. The NCR53C895 + The NCR53C860 and NCR53C875 support FAST-20 transfers. The NCR53C895 supports FAST-40 transfers with Ultra2 LVD devices. + Note: there is another driver for the 53c8xx family of controllers + ("NCR53c7,8xx SCSI support" above). You cannot say Y to both of + them; you can say M to both and build them as modules, but only one + may be active at a time. If you have a 53c8xx board, it's best to + use this driver. + Please read drivers/scsi/README.ncr53c8xx for more information. synchronous data transfers frequency @@ -3635,7 +3882,7 @@ CONFIG_SCSI_NCR53C8XX_SYNC rates: FAST-5, FAST-10, FAST-20 and FAST-40. The numbers are respectively the maximum data transfer rates in mega-transfers per second for each class. For example, a FAST-20 Wide 16 device is able - to transfer data at 40 million 16 bit packets per second for a total + to transfer data at 20 million 16 bit packets per second for a total rate of 40 MB/s. You may specify 0 if you want to only use asynchronous data @@ -3677,7 +3924,7 @@ CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT device of yours to not support properly the target-disconnect feature. In that case, you would say Y here. In general however, to not allow targets to disconnect is not reasonable if there is more - than 1 device on a SCSI bus. The normal answer therefore is N. + than 1 device on a SCSI bus. The normal answer therefore is N. default tagged command queue depth CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS @@ -3688,12 +3935,11 @@ CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS this feature, enter 0 or 1 here (it doesn't matter which). The default value is 8 and should be supported by most hard disks. - This option has no effect for adapters with NVRAM, since the driver - will get this information from the user set-up. It also can be - overridden using a boot setup option, as follows (example): - 'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to 4, - set queue depth to 16 for target 2 and target 3 on controller 0 and - set queue depth to 10 for target 0 / lun 2 on controller 1. + This value can be overridden from the boot command line using the + 'tags' option as follows (example): + 'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to + 4, set queue depth to 16 for target 2 and target 3 on controller 0 + and set queue depth to 10 for target 0 / lun 2 on controller 1. The normal answer therefore is to go with the default 8 and to use a boot command line option for devices that need to use a different @@ -3705,14 +3951,13 @@ maximum number of queued commands CONFIG_SCSI_NCR53C8XX_MAX_TAGS This option allows you to specify the maximum number of commands that can be queued to any device, when tagged command queuing is - possible. The default value is 32. Minimum is 2, maximum is 64. - For value less than 32, this option only saves a little memory - (8*7*(32-MAXTAGS) bytes), so using less than 32 isn't worth it. - For value greater than 32, latency on reselection will be increased - by 1 or 2 micro-seconds. So, the normal answer here is to go with the - default value 32 unless you are using very large hard disks with - large cache (>= 1MB) that are able to take advantage of more than - 32 tagged commands. + possible. The default value is 32. Minimum is 2, maximum is 64. + Modern hard disks are able to support 64 tags and even more, but + donnot seem to be faster when more than 32 tags are being used. + + So, the normal answer here is to go with the default value 32 unless + you are using very large hard disks with large cache (>= 1 MB) that + are able to take advantage of more than 32 tagged commands. There is no safe option and the default answer is recommended. @@ -3746,8 +3991,8 @@ CONFIG_SCSI_NCR53C8XX_PROFILE IBMMCA SCSI support CONFIG_SCSI_IBMMCA This is support for the IBM SCSI adapter found in many of the PS/2 - series computers. These machines have an MCA bus, so you need to say - Y to "MCA support" as well and read Documentation/mca.txt. + series computers. These machines have an MCA bus, so you need to + answer Y to "MCA support" as well and read Documentation/mca.txt. If the adapter isn't found during boot (a common problem for models 56, 57, 76, and 77) you'll need to use the 'ibmmcascsi=<pun>' kernel @@ -3770,31 +4015,32 @@ Standard SCSI-order CONFIG_IBMMCA_SCSI_ORDER_STANDARD In the PC-world and in most modern SCSI-BIOS-setups, SCSI-hard disks are assigned to the drive letters, starting with the lowest SCSI-id - (physical number - pun) to be drive C:, as seen from DOS and similar - operating systems. When looking into papers describing the + (physical number -- pun) to be drive C:, as seen from DOS and + similar operating systems. When looking into papers describing the ANSI-SCSI-standard, this assignment of drives appears to be wrong. - The SCSI-standard follows a hardware-hierarchy which says that - id 7 has the highest priority and id 0 the lowest. Therefore, the - host adapters are still today everywhere placed as SCSI-id 7 by - default. In the SCSI-standard, the drive letters express the priority - of the disk. C: should be the hard disk, or a partition on it, with the + The SCSI-standard follows a hardware-hierarchy which says that id 7 + has the highest priority and id 0 the lowest. Therefore, the host + adapters are still today everywhere placed as SCSI-id 7 by default. + In the SCSI-standard, the drive letters express the priority of the + disk. C: should be the hard disk, or a partition on it, with the highest priority. This must therefore be the disk with the highest SCSI-id (e.g. 6) and not the one with the lowest! IBM-BIOS kept the original definition of the SCSI-standard as also industrial- and process-control-machines, like VME-CPUs running under realtime-OSs (e.g. LynxOS, OS9) do. - If you like to run Linux on your MCA-machine with the same assignment - of hard disks as seen from e.g. DOS or OS/2 on your machine, which - is in addition conformant to the SCSI-standard, you must say Y here. - This is also necessary for MCA-Linux-users who want to keep downward- - compatibility to older releases of the IBM-MCA-SCSI-driver (older than - driver-release 2.00 and older than June 1997). + If you like to run Linux on your MCA-machine with the same + assignment of hard disks as seen from e.g. DOS or OS/2 on your + machine, which is in addition conformant to the SCSI-standard, you + must say Y here. This is also necessary for MCA-Linux users who want + to keep downward compatibility to older releases of the + IBM-MCA-SCSI-driver (older than driver-release 2.00 and older than + June 1997). If you like to have the lowest SCSI-id assigned as drive C:, as modern SCSI-BIOSes do, which does not conform to the standard, but is widespread and common in the PC-world of today, you must say N - here. If unsure, say Y. + here. If unsure, say Y. Reset SCSI-devices at boot time CONFIG_IBMMCA_SCSI_DEV_RESET @@ -3873,8 +4119,8 @@ CONFIG_SCSI_QLOGIC_FAS Qlogic FastSCSI! cards as well as any other card based on the FASXX chip (including the Control Concepts SCSI/IDE/SIO/PIO/FDC cards); it does NOT support the PCI version. The PCI versions are supported by - the Qlogic ISP driver though. Information about this driver is - contained in drivers/scsi/README.qlogicfas. You should also read + the Qlogic ISP driver though. Information about this driver is + contained in drivers/scsi/README.qlogicfas. You should also read the SCSI-HOWTO, available via FTP (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. @@ -3887,12 +4133,13 @@ Qlogic ISP SCSI support (EXPERIMENTAL) CONFIG_SCSI_QLOGIC_ISP This driver works for all QLogic PCI SCSI host adapters (IQ-PCI, IQ-PCI-10, IQ_PCI-D) except for the PCI-basic card. (This latter - card is supported by the "AM53/79C974 PCI SCSI" driver). If you say - Y here, make sure to say Y to "PCI BIOS support" as well. More - information is contained in the file - drivers/scsi/README.qlogicisp. You should also read the SCSI-HOWTO, - available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + card is supported by the "AM53/79C974 PCI SCSI" driver). + + If you say Y here, make sure to say Y to "PCI BIOS support" as well. + + Please read the file drivers/scsi/README.qlogicisp. You should also + read the SCSI-HOWTO, available via FTP (user: anonymous) at + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -3947,7 +4194,7 @@ CONFIG_SCSI_ULTRASTOR 7000FASST SCSI support CONFIG_SCSI_7000FASST This driver supports the Western Digital 7000 SCSI host adapter - family. Some information is in the source: drivers/scsi/wd7000.c. + family. Some information is in the source: drivers/scsi/wd7000.c. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you @@ -3957,12 +4204,12 @@ CONFIG_SCSI_7000FASST EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support CONFIG_SCSI_EATA This driver supports all the EATA/DMA-compliant SCSI host adapters - and does not need any BIOS32 service. DPT ISA and all EISA i/o + and does not need any BIOS32 service. DPT ISA and all EISA i/o addresses are probed looking for the "EATA" signature. If you said Y to "PCI BIOS support", the addresses of all the PCI SCSI controllers - reported by BIOS32 are probed as well. You want to read - the start of drivers/scsi/eata.c and the SCSI-HOWTO, available via - FTP (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + reported by BIOS32 are probed as well. You want to read the start of + drivers/scsi/eata.c and the SCSI-HOWTO, available via FTP (user: + anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that there is also another driver for the same hardware available: "EATA-DMA support". You should say Y to only one of them. @@ -3998,31 +4245,54 @@ CONFIG_SCSI_NCR53C406A This is support for the NCR53c406a SCSI host adapter. For user configurable parameters, check out drivers/scsi/NCR53c406.c in the kernel source. Also read the SCSI-HOWTO, available via FTP (user: - anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read Documentation/modules.txt. The module will be called NCR53c406.o. -Tekram DC390(T) (AMD PCscsi) SCSI support +Tekram DC390(T) and Am53/79C974 (PCscsi) SCSI support CONFIG_SCSI_DC390T - This driver supports the Tekram DC390(T) PCI SCSI host adapter with - the Am53C974A chip, and perhaps other cards using the same chip. - This driver does _not_ support the DC390W/U/F adaptor with the - NCR/Symbios chips; use "NCR53C8XX SCSI support" for that one. + This driver supports PCI SCSI host adapters based on the Am53C974A + chip, e.g. Tekram DC390(T), DawiControl 2974 and some onboard + PCscsi/PCnet (Am53/79C974) solutions. + + Documentation can be found in linux/drivers/scsi/README.tmscsim. + + Note that this driver does NOT support Tekram DC390W/U/F, which are + based on NCR/Symbios chips. Use "NCR53C8XX SCSI support" for those. + Also note that there is another generic Am53C974 driver. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read Documentation/modules.txt. The module will be called tmscsim.o. +Omit support for other Am53/79C974 based SCSI adapters +CONFIG_SCSI_DC390T_NOGENSUPP + If you say N here, the DC390(T) SCSI driver relies on the DC390 + EEPROM to get initial values for its settings, such as speed, + termination, etc. If it can't find this EEPROM, it will use defaults + or the user supplied boot/module parameters. For details on driver + configuration see linux/drivers/scsi/README.tmscsim. + + If you say Y here and if no EEPROM is found, the driver gives up and + thus only supports Tekram DC390(T) adapters. This can be useful if + you have a DC390(T) and another Am53C974 based adapter, which, for + some reason, you want to drive with the other AM53C974 driver. + + If unsure, say N. + AM53/79C974 PCI SCSI support CONFIG_SCSI_AM53C974 This is support for the AM53/79C974 SCSI host adapters. Please read drivers/scsi/README.AM53C974 for details. Also, the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO, is for you. + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO, is for you. + + Note that there is another driver for AM53C974 based adapters: + "Tekram DC390(T) and Am53/79C974 (PCscsi) SCSI support", above. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -4043,7 +4313,7 @@ CONFIG_SCSI_GDTH IOMEGA Parallel Port ZIP drive SCSI support CONFIG_SCSI_PPA This driver supports the parallel port version of IOMEGA's ZIP drive - (a 100Mb removable media device). For more information about this + (a 100 MB removable media device). For more information about this driver and how to use it you should read the file drivers/scsi/README.ppa. You should also read the SCSI-HOWTO, which is available via FTP (user: anonymous) from @@ -4066,17 +4336,13 @@ CONFIG_SCSI_PPA_HAVE_PEDANTIC EPP (Enhanced Parallel Port) is a standard for parallel ports which allows them to act as expansion buses that can handle up to 64 peripheral devices. Some parallel port chipsets are slower than - their motherboard, and so we have to control the state of the FIFO - every now and then to avoid data loss. The permitted values for - this option are 0 (don't check FIFO), 1 (check FIFO every 4 bytes), - 2 (check FIFO every other byte) and 3 (check FIFO every time). If - your EPP chipset is from the SMC series, you are likely to have to - set this value greater than 0. - -SGI wd93 Scsi Driver -CONFIG_SCSI_SGIWD93 - This is the SCSI driver for WD33C93 / WD33C95 SCSI chips used in many - SGI machines. + their motherboard, and so we have to control the state of the + chipset's FIFO queue every now and then to avoid data loss. This + will be done if you say Y here. + + If your EPP chipset is from the SMC series, you are likely to have + to say Y here. Generally, saying Y is the safe option and slows + things down a bit. SCSI Debug host simulator. CONFIG_SCSI_DEBUG @@ -4095,22 +4361,23 @@ CONFIG_FC4 support, as well as the drivers for the storage array itself and for the interface adapter such as SOC. This subsystem could even serve for IP networking, with some code extensions. + If unsure, say N. Sun SOC CONFIG_FC4_SOC - Serial Optical Channel is an interface card with one or two Fibre Optic - ports, each of which can be connected to a disk array. Only the SBus - incarnation of the adapter is supported at the moment. + Serial Optical Channel is an interface card with one or two Fibre + Optic ports, each of which can be connected to a disk array. Only + the SBus incarnation of the adapter is supported at the moment. SparcSTORAGE Array 100 and 200 series CONFIG_SCSI_PLUTO - If you never bought a disk array made by Sun, go with N. + If you never bought a disk array made by Sun, go with N. AcornSCSI support CONFIG_SCSI_ACORNSCSI_3 - This enables support for the Acorn SCSI card (aka30). If you have an - Acorn system with one of these, say Y. If unsure, say N. + This enables support for the Acorn SCSI card (aka30). If you have an + Acorn system with one of these, say Y. If unsure, say N. Acorn SCSI tagged queue support CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE @@ -4123,42 +4390,42 @@ CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE Acorn SCSI Synchronous transfers support CONFIG_SCSI_ACORNSCSI_SYNC - Say Y here to enable synchronous transfer negotiation with all targets - on the Acorn SCSI card. + Say Y here to enable synchronous transfer negotiation with all + targets on the Acorn SCSI card. In general, this improves performance; however some SCSI devices don't implement it properly, so the safe answer is N. Oak SCSI support CONFIG_SCSI_OAK1 - This enables support for the Oak SCSI card. If you have an Acorn system - with one of these, say Y. If unsure, say N. + This enables support for the Oak SCSI card. If you have an Acorn + system with one of these, say Y. If unsure, say N. Cumana SCSI I support CONFIG_SCSI_CUMANA_1 - This enables support for the Cumana SCSI I card. If you have an Acorn - system with one of these, say Y. If unsure, say N. + This enables support for the Cumana SCSI I card. If you have an + Acorn system with one of these, say Y. If unsure, say N. Cumana SCSI II support CONFIG_SCSI_CUMANA_2 - This enables support for the Cumana SCSI II card. If you have an Acorn - system with one of these, say Y. If unsure, say N. + This enables support for the Cumana SCSI II card. If you have an + Acorn system with one of these, say Y. If unsure, say N. EcoSCSI support CONFIG_SCSI_ECOSCSI - This enables support for the EcoSCSI card - a small card that sits in - the Econet socket. If you have an Acorn system with one of these, - say Y. If unsure, say N. + This enables support for the EcoSCSI card -- a small card that sits + in the Econet socket. If you have an Acorn system with one of these, + say Y. If unsure, say N. EESOX SCSI support CONFIG_SCSI_EESOXSCSI - This enables support for the EESOX SCSI card. If you have an Acorn + This enables support for the EESOX SCSI card. If you have an Acorn system with one of these, say Y, otherwise say N. Powertec SCSI support CONFIG_SCSI_POWERTECSCSI - This enables support for the Powertec SCSI card on Acorn systems. If - you have one of these, say Y. If unsure, say N. + This enables support for the Powertec SCSI card on Acorn systems. If + you have one of these, say Y. If unsure, say N. Network device support? CONFIG_NETDEVICES @@ -4179,8 +4446,8 @@ CONFIG_NETDEVICES you want to use under Linux (make sure you know its name because you will be asked for it and read the Ethernet-HOWTO (especially if you plan to use more than one network card under Linux), available from - sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini) or if you want to use - SLIP (Serial Line Internet Protocol is the protocol used to send + ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini) or if you want to + use SLIP (Serial Line Internet Protocol is the protocol used to send Internet traffic over telephone lines or null modem cables) or CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better and newer replacement for SLIP) or PLIP (Parallel Line Internet Protocol @@ -4190,7 +4457,7 @@ CONFIG_NETDEVICES Make sure to read the NET-2-HOWTO. Eventually, you will have to read Olaf Kirch's excellent and free book "Network Administrator's - Guide", to be found in sunsite.unc.edu:/pub/Linux/docs/LDP. If + Guide", to be found in ftp://sunsite.unc.edu:/pub/Linux/docs/LDP. If unsure, say Y. Dummy net driver support @@ -4217,10 +4484,11 @@ CONFIG_SLIP Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to connect to your Internet service provider or to connect to some other local Unix box or if you want to configure your Linux box as a - Slip/CSlip server for other people to dial in. SLIP (Serial Line - Internet Protocol) is a protocol used to send Internet traffic - over telephone lines or serial cables (also known as - null modems); nowadays, the PPP is a more common protocol than SLIP. + Slip/CSlip server for other people to dial in. SLIP (Serial Line + Internet Protocol) is a protocol used to send Internet traffic over + serial connections such as telephone lines or null modem cables; + nowadays, the protocol PPP is more commonly used for this same + purpose. Normally, your access provider has to support SLIP in order for you to be able to use it, but there is now a SLIP emulator called SLiRP @@ -4237,7 +4505,7 @@ CONFIG_SLIP http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html (to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape)). SLIP support will enlarge - your kernel by about 4kB. If unsure, say N. + your kernel by about 4 KB. If unsure, say N. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -4249,9 +4517,9 @@ CSLIP compressed headers CONFIG_SLIP_COMPRESSED This protocol is faster than SLIP because it uses compression on the TCP/IP headers (not on the data itself), but it has to be supported - on both ends. Ask your access provider if you are not sure and say - Y, just in case. You will still be able to use plain SLIP. If you - plan to use SLiRP, the SLIP emulator (available via FTP (user: + on both ends. Ask your access provider if you are not sure and + answer Y, just in case. You will still be able to use plain SLIP. If + you plan to use SLiRP, the SLIP emulator (available via FTP (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/system/network/serial/) which allows you to use SLIP over a regular dial up shell connection, you @@ -4295,9 +4563,9 @@ CONFIG_PPP To use PPP, you need an additional program called pppd as described in Documentation/networking/ppp.txt and in the PPP-HOWTO, available - from sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you upgrade from an - older kernel, you might need to upgrade pppd as well. The PPP option - enlarges your kernel by about 16kB. + from ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you upgrade + from an older kernel, you might need to upgrade pppd as well. The + PPP option enlarges your kernel by about 16 KB. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -4328,13 +4596,13 @@ CONFIG_NET_RADIO STRIP (Metricom Starmode radio IP) CONFIG_STRIP Say Y if you have a Metricom radio and intend to use Starmode Radio - IP. STRIP is a radio protocol developed for the MosquitoNet project + IP. STRIP is a radio protocol developed for the MosquitoNet project (On the WWW at http://mosquitonet.stanford.edu/; to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape) to send Internet traffic using - Metricom radios. Metricom radios are small, battery powered, + Metricom radios. Metricom radios are small, battery powered, 100kbit/sec packet radio transceivers, about the size and weight of - a cellular telephone. (You may also have heard them called + a cellular telephone. (You may also have heard them called "Metricom modems" but we avoid the term "modem" because it misleads many people into thinking that you can plug a Metricom modem into a phone line and use it as a modem.) @@ -4376,65 +4644,13 @@ CONFIG_WAVELAN module, say M here and read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. -AIMSlab RadioTrack (aka RadioReveal) support -CONFIG_RADIO_RTRACK - Choose Y here if you have one of these FM radio cards, and then fill - in the port address below. - - In order to control your radio card, you will need to use programs - that are compatible with the Video for Linux API. Information on - this API and pointers to "v4l" programs may be found on the WWW at - http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW, - you need to have access to a machine on the Internet that has a - program like lynx or netscape. - - If you want to compile this driver as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read Documentation/modules.txt. The module will be - called radio-aimslab.o. - -RadioTrack i/o port -CONFIG_RADIO_RTRACK_PORT - Enter either 0x30f or 0x20f here. The card default is 0x30f, if you - haven't changed the jumper setting on the card. - -Aztech/Packard Bell Radio -CONFIG_RADIO_AZTECH - Choose Y here if you have one of these FM radio cards, and then fill - in the port address below. - - If you want to compile this driver as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read Documentation/modules.txt. The module will be - called radio-aztech.o. - -Aztech/Packard Bell radio card i/o port -CONFIG_RADIO_AZTECH_PORT - Enter either 0x350 or 0x358 here. The card default is 0x350, if you - haven't changed the setting of jumper JP3 on the card. Removing the - jumper sets the card to 0x358. - -SF16FMI Radio -CONFIG_RADIO_SF16FMI - Choose Y here if you have one of these FM radio cards, and then fill - in the port address below. - - If you want to compile this driver as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read Documentation/modules.txt. The module will be - called radio-sf16fmi.o - -SF16FMI I/O port (0x284 or 0x384) -CONFIG_RADIO_SF16FMI_PORT - Enter the I/O port of your SF16FMI radio card. - LAPB over Ethernet driver CONFIG_LAPBETHER This is a driver for a pseudo device (typically called /dev/lapb0) which allows you to open an LAPB point-to-point connection to some other computer on your Ethernet network. In order to do this, you need to say Y or M to the driver for your Ethernet card as well as - to "LAPB Data Link Driver". + to "LAPB Data Link Driver". If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -4471,8 +4687,8 @@ Shortwave radio modem driver support for WSS and Crystal cards CONFIG_HFMODEM_WSS This option enables the hfmodem driver to use WindowsSoundSystem compatible cards. These cards feature a codec chip from either - Analog Devices (such as AD1848, AD1845) or Crystal - Semiconductors (such as CS4248, CS423x). + Analog Devices (such as AD1848, AD1845) or Crystal Semiconductors + (such as CS4248, CS423x). PLIP (parallel port) support CONFIG_PLIP @@ -4480,9 +4696,9 @@ CONFIG_PLIP reasonably fast mini network consisting of two (or, rarely, more) local machines. A PLIP link from a Linux box is a popular means to install a Linux distribution on a machine which doesn't have a CDROM - drive (a minimal system has to be transferred with floppies - first). The kernels on both machines need to have this PLIP option - enabled for this to work. + drive (a minimal system has to be transferred with floppies first). + The kernels on both machines need to have this PLIP option enabled + for this to work. The PLIP driver has two modes, mode 0 and mode 1. The parallel ports (the connectors at the computers with 25 holes) are connected with @@ -4503,9 +4719,9 @@ CONFIG_PLIP NET-2-HOWTO in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that the PLIP protocol was changed and this PLIP driver won't work together with the PLIP support in Linux versions 1.0.x. This option - enlarges your kernel by about 8kB. + enlarges your kernel by about 8 KB. - If you want to compile this as a module (= code which can be + If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. The module will be called @@ -4515,8 +4731,8 @@ EQL (serial line load balancing) support CONFIG_EQUALIZER If you have two serial connections to some other computer (this usually requires two modems and two telephone lines) and you use - SLIP (= the protocol for sending Internet traffic over telephone - lines) or PPP (= a better SLIP) on them, you can make them behave + SLIP (the protocol for sending Internet traffic over telephone + lines) or PPP (a better SLIP) on them, you can make them behave like one double speed connection using this driver. Naturally, this has to be supported at the other end as well, either with a similar EQL Linux driver or with a Livingston Portmaster 2e. Say Y if you @@ -4541,8 +4757,8 @@ CONFIG_ETHERTAP to the device tap0; everything the kernel wants to send out over the device tap0 can instead be read by the user from /dev/tap0: the user mode program replaces the LAN that would be attached to an ordinary - Ethernet device. Please read the file - Documentation/networking/ethertap.txt for more information. + Ethernet device. Please read the file + Documentation/networking/ethertap.txt for more information. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -4615,7 +4831,7 @@ CONFIG_ECONET AUN over UDP CONFIG_ECONET_AUNUDP - Say Y here if you want to send Econet/AUN traffic over a a UDP + Say Y here if you want to send Econet/AUN traffic over a UDP connection (UDP is a packet based protocol that runs on top of the Internet protocol IP) using an ordinary Ethernet network card. @@ -4645,7 +4861,7 @@ CONFIG_WAN_ROUTER WAN routing support is always built as a module ( = code which can be inserted in and removed from the running kernel whenever you - want). The module is called wanrouter.o. For general information + want). The module is called wanrouter.o. For general information about modules read Documentation/modules.txt. Fast switching (read help!) @@ -4667,11 +4883,11 @@ Forwarding between high speed interfaces CONFIG_NET_HW_FLOWCONTROL This option enables NIC (Network Interface Card) hardware throttling during periods of extremal congestion. At the moment only a couple - of device drivers support it (really only one ---tulip, modified + of device drivers support it (really only one -- tulip, modified 8390 can be found at ftp://ftp.inr.ac.ru/ip-routing/fastroute-8390.tar.gz). Really, this option is applicable to any machine attached to a fast enough - network, and even a 10Mb NIC is able to kill a not very slow box, + network, and even a 10 Mb NIC is able to kill a not very slow box, such as a 120MHz Pentium. However, do not say Y here if you did not experience any serious @@ -4688,20 +4904,20 @@ CONFIG_NET_SCHED When the kernel has several packets to send out over the network devices, it has to make a decision which one to send first. This is especially important if some of the network devices are real time - devices that need a certain minimum data flow rate. There are + devices that need a certain minimum data flow rate. There are several different algorithms for how to do this "fairly"; they are - called packet schedulers. You can attach different schedulers to - different network devices. If you want to stick to the default + called packet schedulers. If you want to stick to the default scheduling algorithm, say N here. If you want to experiment with a - couple of different algorithms, say Y. Currently, this is only + couple of different algorithms, say Y. You can then attach different + schedulers to different network devices. Currently, this is only recommended for experts. To administer these schedulers, you'll need the user-level utilities from the package iproute2+tc at ftp://ftp.inr.ac.ru/ip-routing/ If you say Y here and to "/proc filesystem" below, you will be able - to read status information about priority schedulers from - the file /proc/net/psched. + to read status information about priority schedulers from the file + /proc/net/psched. The available schedulers are listed in the following questions; you can say Y to as many as you like. If unsure, say N now. @@ -4849,18 +5065,25 @@ CONFIG_NET_PROFILE performance will be written to /proc/net/profile. If you don't know what it is about, you don't need it: say N. +Comtrol Hostess SV-11 support +CONFIG_HOSTESS_SV11 + This is a network card for low speed synchronous serial links, at + up to 256Kbits. It supports both PPP and Cisco HDLC + At this point, the driver can only be compiled as a module. + WAN Drivers CONFIG_WAN_DRIVERS Say Y to this option if your Linux box contains a WAN card and you - are planning to use the box as a WAN ( = Wide Area Network) router ( - = device used to interconnect local area networks over wide area - communication links, such as leased lines and public data networks, - e.g. X.25 and frame relay) and you will be offered a list of drivers + are planning to use the box as a WAN ( = Wide Area Network) router + ( = device used to interconnect local area networks over wide area + communication links, such as leased lines or public data networks, + e.g. X.25 or frame relay) and you will be offered a list of drivers for WAN cards currently available. For more information, read - Documentation/networking/wan-router.txt. Note that the answer to - this question won't directly affect the kernel: saying N will just - cause this configure script to skip all the questions about WAN - card drivers. If unsure, say N. + Documentation/networking/wan-router.txt. + + Note that the answer to this question won't directly affect the + kernel: saying N will just cause this configure script to skip all + the questions about WAN card drivers. If unsure, say N. Sangoma WANPIPE(tm) multiprotocol cards CONFIG_VENDOR_SANGOMA @@ -4868,12 +5091,12 @@ CONFIG_VENDOR_SANGOMA browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape) is a family of intelligent multiprotocol WAN adapters with data transfer rates up to T1 (1.544 - Mbps). They are also known as Synchronous Data Link Adapters (SDLA) + Mbps). They are also known as Synchronous Data Link Adapters (SDLA) and designated S502E(A), S503 or S508. These cards support the X.25, Frame Relay, and PPP protocols. If you have one or more of these - cards, say Y to this option and read - Documentation/networking/wanpipe.txt. The next questions will ask - you about the protocols you want the driver to support. + cards, say Y to this option; you may then also want to read the file + Documentation/networking/wanpipe.txt. The next questions will ask + you about the protocols you want the driver to support. The driver will be compiled as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -4882,8 +5105,8 @@ CONFIG_VENDOR_SANGOMA Maximum number of cards CONFIG_WANPIPE_CARDS - Enter number of WANPIPE adapters installed in your machine. The - driver can support up to 8 cards. You may enter more than you + Enter number of WANPIPE adapters installed in your machine. The + driver can support up to 8 cards. You may enter more than you actually have if you plan to add more cards in the future without re-compiling the driver, but remember that in this case you'll waste some kernel memory (about 1K per card). @@ -4893,15 +5116,15 @@ CONFIG_WANPIPE_X25 Say Y to this option if you are planning to connect a WANPIPE card to an X.25 network. You should then also have said Y to "CCITT X.25 Packet Layer" and "LAPB Data Link Driver", above. If you say N, the - X.25 support will not be included in the driver (saves about 16K of - kernel memory). + X.25 support will not be included in the driver (saves about 16 KB + of kernel memory). WANPIPE Frame Relay support CONFIG_WANPIPE_FR Say Y to this option if you are planning to connect a WANPIPE card to a frame relay network. You should then also have said Y to "Frame Relay (DLCI) support", above. If you say N, the frame relay - support will not be included in the driver (saves about 16K of + support will not be included in the driver (saves about 16 KB of kernel memory). WANPIPE PPP support @@ -4910,7 +5133,7 @@ CONFIG_WANPIPE_PPP to a leased line using Point-to-Point protocol (PPP). You should then also have said Y to "PPP (point-to-point) support", above. If you say N, the PPP support will not be included in the driver (saves - about 16K of kernel memory). + about 16 KB of kernel memory). Ethernet (10 or 100Mbit) CONFIG_NET_ETHERNET @@ -4950,8 +5173,8 @@ CONFIG_SUN_LANCE Sun Intel Ethernet support CONFIG_SUN_INTEL - This is support for the Intel Ethernet cards on some Sun workstations - (all those with a network interface 'ie0' under SunOS). + This is support for the Intel Ethernet cards on some Sun + workstations (all those with a network interface 'ie0' under SunOS). Western Digital/SMC cards CONFIG_NET_VENDOR_SMC @@ -5012,7 +5235,7 @@ SMC Ultra32 EISA support CONFIG_ULTRA32 If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -5039,8 +5262,9 @@ CONFIG_SMC9194 PCI NE2000 support CONFIG_NE2K_PCI This driver is for NE2000 compatible PCI cards. It will not work - with ISA NE2000 cards. If you have a PCI NE2000 network (Ethernet) - card, say Y and read the Ethernet-HOWTO, available via FTP (user: + with ISA NE2000 cards (they have their own driver, "NE2000/NE1000 + support" below). If you have a PCI NE2000 network (Ethernet) card, + say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module ( = code which can be @@ -5124,6 +5348,20 @@ CONFIG_YELLOWFIN say M here and read Documentation/modules.txt. This is recommended. The module will be called yellowfin.o. +Alteon AceNIC / 3Com 3C985 Gigabit Ethernet support. +CONFIG_ACENIC + Say Y here if you have an Alteon AceNIC or 3Com 3C985 PCI Gigabit + Ethernet adapter. The driver allows for using the Jumbo Frame + option (9000 bytes/frame) however it requires that your switches + can handle this as well. To enable Jumbo Frames, add `mtu 9000' to + your ifconfig line. + + If you want to compile this driver as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read Documentation/modules.txt. This is recommended. + The module will be called acenic.o. + + AMD LANCE and PCnet (AT1500 and NE2100) support CONFIG_LANCE If you have a network (Ethernet) card of this type, say Y and read @@ -5227,8 +5465,8 @@ CONFIG_EL3 CONFIG_VORTEX If you have a 3Com "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) or "Boomerang" series (EtherLink XL 3c900 or 3c905) network - (Ethernet) card, say Y and read the Ethernet-HOWTO, available via FTP - (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (Ethernet) card, say Y and read the Ethernet-HOWTO, available via + FTP (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. More specific information is in Documentation/networking/vortex.txt and in the comments at the beginning of drivers/net/3c59x.c. @@ -5257,9 +5495,9 @@ CONFIG_ARCNET (arguably) beautiful poetry in Documentation/networking/arcnet.txt. You need both this driver, and the driver for the particular ARCnet - chipset of your card. If you don't know, then it's probably a - COM90xx type card, so say Y (or M) to "ARCnet COM90xx chipset support" - below. + chipset of your card. If you don't know, then it's probably a + COM90xx type card, so say Y (or M) to "ARCnet COM90xx chipset + support" below. You might also want to have a look at the Ethernet-HOWTO, available via FTP (user: anonymous) in @@ -5275,25 +5513,25 @@ CONFIG_ARCNET Enable arc0e (ARCnet "ether-encap" packet format) CONFIG_ARCNET_ETH This allows you to use "Ethernet encapsulation" with your ARCnet - card via the virtual arc0e device. You only need arc0e if you want + card via the virtual arc0e device. You only need arc0e if you want to talk to nonstandard ARCnet software, specifically, - DOS/Windows-style "NDIS" drivers. You do not need to say Y here to + DOS/Windows-style "NDIS" drivers. You do not need to say Y here to communicate with industry-standard RFC1201 implementations, like the - arcether.com packet driver or most DOS/Windows ODI drivers. RFC1201 - is included automatically as the arc0 device. Please read the + arcether.com packet driver or most DOS/Windows ODI drivers. RFC1201 + is included automatically as the arc0 device. Please read the ARCnet documentation in Documentation/networking/arcnet.txt for more information about using arc0e and arc0s. Enable arc0s (ARCnet RFC1051 packet format) CONFIG_ARCNET_1051 This allows you to use RFC1051 with your ARCnet card via the virtual - arc0s device. You only need arc0s if you want to talk to ARCnet + arc0s device. You only need arc0s if you want to talk to ARCnet software complying with the "old" standard, specifically, the DOS arcnet.com packet driver, Amigas running AmiTCP, and some variants - of NetBSD. You do not need to say Y here to communicate with + of NetBSD. You do not need to say Y here to communicate with industry-standard RFC1201 implementations, like the arcether.com - packet driver or most DOS/Windows ODI drivers. RFC1201 is included - automatically as the arc0 device. Please read the ARCnet + packet driver or most DOS/Windows ODI drivers. RFC1201 is included + automatically as the arc0 device. Please read the ARCnet documentation in Documentation/networking/arcnet.txt for more information about using arc0e and arc0s. @@ -5313,7 +5551,7 @@ ARCnet COM90xx (IO mapped) chipset driver CONFIG_ARCNET_COM90xxIO This is the chipset driver for the COM90xx cards, using them in IO-mapped mode instead of memory-mapped mode. This is slower than - the normal driver. Only use it if your card doesn't support shared + the normal driver. Only use it if your card doesn't support shared memory. This driver is also available as a module ( = code which can be @@ -5327,7 +5565,7 @@ CONFIG_ARCNET_RIM_I This is yet another chipset driver for the COM90xx cards, but this time only using memory-mapped mode, and no IO ports at all. This driver is completely untested, so if you have one of these cards, - please mail dwmw2@cam.ac.uk, especially if it works! + please mail David.Woodhouse@mvhi.com, especially if it works! This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you @@ -5406,7 +5644,7 @@ CONFIG_SEEQ8005 is for you, read the Ethernet-HOWTO, available via FTP (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. -AT1700 support +AT1700/1720 support CONFIG_AT1700 If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in @@ -5503,7 +5741,13 @@ CONFIG_NE2000 If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Many Ethernet cards - without a specific driver are compatible with NE2000. + without a specific driver are compatible with NE2000. + + If you have a PCI NE2000 card however, say N here and Y to "PCI + NE2000 support", above. If you have a NE2000 card and are running on + an MCA system (a bus system used on some IBM PS/2 computers and + laptops), say N here and Y to "NE/2 (ne2000 MCA version) support", + below. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -5517,6 +5761,18 @@ CONFIG_SK_G16 the Ethernet-HOWTO, available via FTP (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. +NE/2 (ne2000 MCA version) support +CONFIG_NE2_MCA + If you have a network (Ethernet) card of this type, say Y and read + the Ethernet-HOWTO, available via FTP (user: anonymous) in + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called ne2.o. If you want to compile it as a + module, say M here and read Documentation/modules.txt as well as + Documentation/networking/net-modules.txt. + EISA, VLB, PCI and on board controllers CONFIG_NET_EISA This is another class of network cards which attach directly to the @@ -5532,8 +5788,8 @@ CONFIG_NET_EISA AMD PCnet32 (VLB and PCI) support CONFIG_PCNET32 - If you have a PCnet32 or PCnetPCI based network (Ethernet) card, say - Y here and read the Ethernet-HOWTO, available via FTP (user: + If you have a PCnet32 or PCnetPCI based network (Ethernet) card, + answer Y here and read the Ethernet-HOWTO, available via FTP (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module ( = code which can be @@ -5554,27 +5810,28 @@ CONFIG_AC3200 module, say M here and read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. -Racal-Interlan EISA ES3210 support -CONFIG_ES3210 +Mylex EISA LNE390A/LNE390B support +CONFIG_LNE390 If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called es3210.o. If you want to compile it as a + The module will be called lne390.o. If you want to compile it as a module, say M here and read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. -Mylex EISA LNE390A/LNE390B support -CONFIG_LNE390 +Novell/Eagle/Microdyne NE3210 EISA support +CONFIG_NE3210 If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that this driver + will NOT WORK for NE3200 cards as they are completely different. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called lne390.o. If you want to compile it as a + The module will be called ne3210.o. If you want to compile it as a module, say M here and read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. @@ -5672,7 +5929,7 @@ CONFIG_TLAN Devices currently supported by this driver are Compaq Netelligent, Compaq NetFlex and Olicom cards. Please read the file - Documentation/tlan.txt for details. + Documentation/networking/tlan.txt for more details. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -5682,6 +5939,29 @@ CONFIG_TLAN Please email feedback to james.banks@caldera.com. +VIA Rhine support +CONFIG_VIA_RHINE + If you have a VIA "rhine" based network card (Rhine-I (3043) or + Rhine-2 (VT86c100A)), say Y here. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called via-rhine.o. If you want to compile it as + a module, say M here and read Documentation/modules.txt as well as + Documentation/networking/net-modules.txt. + +Racal-Interlan EISA ES3210 support +CONFIG_ES3210 + If you have a network (Ethernet) card of this type, say Y and read + the Ethernet-HOWTO, available via FTP (user: anonymous) in + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called es3210.o. If you want to compile it as a + module, say M here and read Documentation/modules.txt as well as + Documentation/networking/net-modules.txt. + SMC EtherPower II (EXPERIMENTAL) CONFIG_EPIC100 If you have an SMC EtherPower II 9432 PCI Ethernet network card @@ -5695,6 +5975,11 @@ CONFIG_EPIC100 module, say M here and read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. +SGI Seeq ethernet controller support +CONFIG_SGISEEQ + Say Y here if you have an Seeq based Ethernet network card. This is + used in many Silicon Graphics machines. + Zenith Z-Note support CONFIG_ZNET The Zenith Z-Note notebook computer has a built-in network @@ -5810,9 +6095,9 @@ CONFIG_SHAPER The traffic shaper is a virtual network device that allows you to limit the rate of outgoing data flow over some other network device. See Documentation/networking/shaper.txt for more - information. To set up and configure shaper devices, you need the + information. To set up and configure shaper devices, you need the shapecfg program, available via FTP (user: anonymous) from - ftp://shadow.cabi.net/pub/Linux in the shaper package. + ftp://shadow.cabi.net/pub/Linux in the shaper package. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -5834,9 +6119,44 @@ CONFIG_DEFXX This is support for the DIGITAL series of EISA (DEFEA) and PCI (DEFPA) controllers which can connect you to a local FDDI network. -SGI Seeq ethernet controller support - This is a driver for the Seeq based Ethernet adapters used in many - Silicon Graphics machines. +HIgh Performance Parallel Interface support (EXPERIMENTAL) +CONFIG_HIPPI + HIgh Performance Parallel Interface (HIPPI) is a 800Mbit/sec and + 1600Mbit/sec dual-simplex switched or point-to-point network. HIPPI + can run over copper (25m) or fiber (300m on multi-mode or 10km on + single-mode). HIPPI networks are commonly used for clusters and to + connect to super computers. If you are connected to a HIPPI network + and have a HIPPI network card in your computer that you want to use + under Linux, say Y here (you must also remember to enable the driver + for your HIPPI card below). Most people will say N here. + +CERN HIPPI PCI adapter support +CONFIG_CERN_HIPPI + Say Y here if this is your PCI HIPPI network card. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called cern_hippi.o. If you want to compile it as + a module, say M here and read Documentation/modules.txt. If unsure, + say N. + +Essential RoadRunner HIPPI PCI adapter support +CONFIG_ROADRUNNER + Say Y here if this is your PCI HIPPI network card. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called rrunner.o. If you want to compile it as + a module, say M here and read Documentation/modules.txt. If unsure, + say N. + +Use large TX/RX rings +CONFIG_ROADRUNNER_LARGE_RINGS + If you say Y here, the RoadRunner driver will preallocate up to 2 MB + of additional memory to allow for fastest operation, both for + transmitting and receiving. This memory cannot be used by any other + kernel code or by user space programs. Say Y here only if you have + the memory. Acorn Ether1 card CONFIG_ARM_ETHER1 @@ -5876,20 +6196,20 @@ CONFIG_CD_NO_IDESCSI file drivers/cdrom/<driver_name>.h where you can define your interface parameters and switch some internal goodies. - All these CDROM drivers are also usable as a module (= code which + All these CDROM drivers are also usable as a module ( = code which can be inserted in and removed from the running kernel whenever you want). If you want to compile them as module, say M instead of Y and read Documentation/modules.txt. - If you want to use any of these CDROM drivers, you also have to say - Y or M to "ISO 9660 CDROM filesystem support" below (this answer will - get "defaulted" for you if you enable any of the Linux CDROM - drivers). + If you want to use any of these CDROM drivers, you also have to + answer Y or M to "ISO 9660 CDROM filesystem support" below (this + answer will get "defaulted" for you if you enable any of the Linux + CDROM drivers). Sony CDU31A/CDU33A CDROM support CONFIG_CDU31A These CDROM drives have a spring-pop-out caddyless drawer, and a - rectangular green LED centered beneath it. NOTE: these CDROM drives + rectangular green LED centered beneath it. NOTE: these CDROM drives will not be auto detected by the kernel at boot time; you have to provide the interface address as an option to the kernel at boot time as described in Documentation/cdrom/cdu31a or fill in your @@ -5915,13 +6235,13 @@ CONFIG_MCD IDE/ATAPI models). Please also the file Documentation/cdrom/mcd. With the old LU-005 model, the whole drive chassis slides out for cd - insertion. The FX-xxx models use a motorized tray type mechanism. + insertion. The FX-xxx models use a motorized tray type mechanism. Note that this driver does not support XA or MultiSession CDs - (PhotoCDs). There is a new driver (next question) which can do + (PhotoCDs). There is a new driver (next question) which can do this. If you want that one, say N here. If the driver doesn't work out of the box, you might want to have a - look at drivers/cdrom/mcd.h. + look at drivers/cdrom/mcd.h. If you say Y here, you should also say Y or M to "ISO 9660 CDROM filesystem support" below, because that's the filesystem used on @@ -5936,10 +6256,11 @@ Mitsumi [XA/MultiSession] support CONFIG_MCDX Use this driver if you want to be able to read XA or MultiSession CDs (PhotoCDs) as well as ordinary CDs with your Mitsumi LU-005, - FX-001 or FX-001D CDROM drive. In addition, this driver uses much less - kernel memory than the old one, if that is a concern. This driver is - able to support more than one drive, but each drive needs a separate - interface card. Please read the file Documentation/cdrom/mcdx. + FX-001 or FX-001D CDROM drive. In addition, this driver uses much + less kernel memory than the old one, if that is a concern. This + driver is able to support more than one drive, but each drive needs + a separate interface card. Please read the file + Documentation/cdrom/mcdx. If you say Y here, you should also say Y or M to "ISO 9660 CDROM filesystem support" below, because that's the filesystem used on @@ -6000,8 +6321,8 @@ Aztech/Orchid/Okano/Wearnes/TXC/CyDROM CDROM support CONFIG_AZTCD This is your driver if you have an Aztech CDA268-01A, Orchid CD-3110, Okano or Wearnes CDD110, Conrad TXC, or CyCDROM CR520 or - CR540 CDROM drive. This driver - just like all these CDROM drivers - - is NOT for CDROM drives with IDE/ATAPI interfaces, such as Aztech + CR540 CDROM drive. This driver -- just like all these CDROM drivers + -- is NOT for CDROM drives with IDE/ATAPI interfaces, such as Aztech CDA269-031SE. Please read the file Documentation/cdrom/aztcd. If you say Y here, you should also say Y or M to "ISO 9660 CDROM @@ -6029,7 +6350,7 @@ CONFIG_CDU535 Goldstar R420 CDROM support CONFIG_GSCD - If this is your CDROM drive, say Y here. As described in + If this is your CDROM drive, say Y here. As described in the file linux/Documentation/cdrom/gscd, you might have to change a setting in the file linux/drivers/cdrom/gscd.h before compiling the kernel. Please read the file Documentation/cdrom/gscd. @@ -6046,7 +6367,7 @@ CONFIG_GSCD Philips/LMS CM206 CDROM support CONFIG_CM206 If you have a Philips/LMS CDROM drive cm206 in combination with a - cm260 host adapter card, say Y here. Please also read the file + cm260 host adapter card, say Y here. Please also read the file Documentation/cdrom/cm206. If you say Y here, you should also say Y or M to "ISO 9660 CDROM @@ -6090,9 +6411,9 @@ CONFIG_SJCD Soft configurable cdrom interface card support CONFIG_CDI_INIT If you want to include boot-time initialization of any cdrom - interface card that is software configurable, say Y here. Currently + interface card that is software configurable, say Y here. Currently only the ISP16/MAD16/Mozart sound cards with built-in cdrom - interfaces are supported. + interfaces are supported. Note that the answer to this question doesn't directly affect the kernel: saying N will just cause this configure script to skip all @@ -6100,11 +6421,11 @@ CONFIG_CDI_INIT ISP16/MAD16/Mozart soft configurable cdrom interface support CONFIG_ISP16_CDI - These are sound cards with with built-in cdrom interfaces using the - OPTi 82C928 or 82C929 chips. Say Y here to have them detected and + These are sound cards with built-in cdrom interfaces using the OPTi + 82C928 or 82C929 chips. Say Y here to have them detected and possibly configured at boot time. In addition, You'll have to say Y to a driver for the particular cdrom drive you have attached to the - card. Read Documentation/cdrom/isp16 for details. + card. Read Documentation/cdrom/isp16 for details. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -6123,25 +6444,24 @@ CONFIG_QUOTA Minix fs support CONFIG_MINIX_FS - Minix is a simple operating system used in many classes about - OS's. The minix filesystem (= method to organize files on a hard disk + Minix is a simple operating system used in many classes about OS's. + The minix filesystem (method to organize files on a hard disk partition or a floppy disk) was the original filesystem for Linux, - has been superseded by the second extended filesystem ext2fs but is - still used for root/boot and other floppies or ram disks since it is - leaner. You don't want to use it on your hard disk because of certain - built-in restrictions. This option will enlarge your kernel by about - 25 kB. Everyone should say Y or M so that they are able to read this - common floppy format. + but has been superseded by the second extended filesystem ext2fs. + You don't want to use the minix filesystem on your hard disk because + of certain built-in restrictions, but it is sometimes found on older + Linux floppy disks. This option will enlarge your kernel by about + 25 kB. If unsure, say N. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read Documentation/modules.txt. The module will be - called minix.o. Note that the filesystem of your root partition - cannot be compiled as a module. + called minix.o. Note that the filesystem of your root partition (the + one containing the directory /) cannot be compiled as a module. Second extended fs support CONFIG_EXT2_FS - This is the de facto standard Linux filesystem (= method to organize + This is the de facto standard Linux filesystem (method to organize files on a storage device) for hard disks. You want to say Y here, unless you intend to use Linux exclusively @@ -6169,15 +6489,21 @@ CONFIG_EXT2_FS directories on ext2 filesystems, use chattr ("man chattr"). Ext2fs partitions can be read from within DOS using the ext2tool - package available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ext2. + command line tool package (available via FTP (user: anonymous) from + ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ext2) and from + within Windows NT using the ext2nt command line tool package from + ftp://sunsite.unc.edu/pub/Linux/utils/dos. Explore2fs is a graphical + explorer for ext2fs partitions which runs on Windows 95 and Windows + NT and includes experimental write support; it is available from + http://jnewbigin-pc.it.swin.edu.au/Linux/Explore2fs.htm. If you want to compile this filesystem as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read Documentation/modules.txt. The module will be called ext2.o. Be aware however that the filesystem of your - root partition cannot be compiled as a module, and so this could be - dangerous. Most everyone wants to say Y here. + root partition (the one containing the directory /) cannot be + compiled as a module, and so this could be dangerous. Most everyone + wants to say Y here. ISO 9660 CDROM filesystem support CONFIG_ISO9660_FS @@ -6212,21 +6538,37 @@ fat fs support CONFIG_FAT_FS If you want to use one of the FAT-based filesystems (the MS-DOS, VFAT (Windows 95) and UMSDOS (used to run Linux on top of an - ordinary DOS partition) filesystems), then you must include FAT - support. This is not a filesystem in itself, but it provides the - foundation for the other filesystems. It is now also becoming - possible to read and write compressed FAT filesystems; read - Documentation/filesystems/fat_cvf.txt for details. This option will - enlarge your kernel by about 24 kB. If unsure, say Y. + ordinary DOS partition) filesystems), then you must say Y or M here + to include FAT support. You will then be able to mount partitions or + diskettes with FAT-based filesystems and transparently access the + files on them, i.e. MSDOS files will look and behave just like all + other Unix files. + + This FAT support is not a filesystem in itself, it only provides the + foundation for the other filesystems. You will have to say Y or M to + at least one of "msdos fs support" or "vfat fs support" in order to + make use of it. + + Another way to read and write MSDOS floppies and hard drive + partitions from within Linux (but not transparently) is with the + mtools ("man mtools") program suite. This doesn't require the FAT + filesystem support. + + It is now also becoming possible to read and write compressed FAT + filesystems; read Documentation/filesystems/fat_cvf.txt for details. + + The FAT support will enlarge your kernel by about 24 kB. If unsure, + say Y. If you want to compile this as a module however ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read Documentation/modules.txt. The module will be called fat.o. Note that if you compile the FAT support as a module, you cannot compile any of the FAT-based filesystems into the - kernel - they will have to be modules as well. The filesystem of - your root partition cannot be a module, so don't say M here if you - intend to use UMSDOS as your root filesystem. + kernel -- they will have to be modules as well. The filesystem of + your root partition (the one containing the directory /) cannot be a + module, so don't say M here if you intend to use UMSDOS as your root + filesystem. msdos fs support CONFIG_MSDOS_FS @@ -6241,35 +6583,37 @@ CONFIG_MSDOS_FS transparent, i.e. the MSDOS files look and behave just like all other Unix files. - Another way to read and write MSDOS floppies from within Linux (but - not transparently) is with the mtools ("man mtools") program suite, - which doesn't require the msdos filesystem support. - If you want to use umsdos, the Unix-like filesystem on top of DOS, which allows you to run Linux from within a DOS partition without - repartitioning, you'll have to say Y or M here. If you have Windows - 95 or Windows NT installed on your MSDOS partitions, you should use - the VFAT filesystem instead, or you will not be able to see the long - filenames generated by Windows 95 / Windows NT. - - This option will enlarge your kernel by about 7 kB. If unsure, say - Y. This will only work if you said Y to "fat fs support" as well. If - you want to compile this as a module however ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read Documentation/modules.txt. The module will be - called msdos.o. + repartitioning, you'll have to say Y or M here. + + If you have Windows 95 or Windows NT installed on your MSDOS + partitions, you should use the VFAT filesystem (say Y to "vfat fs + support" below), or you will not be able to see the long filenames + generated by Windows 95 / Windows NT. + + This option will enlarge your kernel by about 7 kB. If unsure, + answer Y. This will only work if you said Y to "fat fs support" as + well. If you want to compile this as a module however ( = code which + can be inserted in and removed from the running kernel whenever you + want), say M here and read Documentation/modules.txt. The module + will be called msdos.o. vfat fs support CONFIG_VFAT_FS - This allows you to mount MSDOS partitions of your hard drive. It - will let you use filenames in a way compatible with the long - filenames used by Windows 95 and Windows NT fat-based (not NTFS) - partitions. It does not support Windows 95 compressed filesystems. - You cannot use the VFAT filesystem for your root partition; use - UMSDOS instead. This option enlarges your kernel by about 10 kB and - it only works if you said Y to the "fat fs support" above. Please read - the file Documentation/filesystems/vfat.txt for details. - If unsure, say N. + This option provides support for normal Windows filesystems with + long filenames. That includes noncompressed FAT-based filesystems + used by Windows 95, Windows 98, Windows NT 4.0, and mtools. + + You cannot use the VFAT filesystem for your Linux root partition + (the one containing the directory /); use UMSDOS instead if you + want to run Linux from within a DOS partition (i.e. say Y to + "umsdos: Unix like fs on top of std MSDOS fs", below). + + The VFAT support enlarges your kernel by about 10 kB and it only + works if you said Y to the "fat fs support" above. Please read the + file Documentation/filesystems/vfat.txt for details. If unsure, + say Y. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -6284,7 +6628,7 @@ CONFIG_UMSDOS_FS backing everything up and restoring afterwards) and hence you're able to quickly try out Linux or show it to your friends; the disadvantage is that Linux becomes susceptible to DOS viruses and - that UMSDOS is somewhat slower than ext2fs. Another use of umsdos + that UMSDOS is somewhat slower than ext2fs. Another use of UMSDOS is to write files with long unix filenames to MSDOS floppies; it also allows Unix-style softlinks and owner/permissions of files on MSDOS floppies. You will need a program called umssync in order to @@ -6295,8 +6639,9 @@ CONFIG_UMSDOS_FS you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read Documentation/modules.txt. The module will be called - umsdos.o. Note that the filesystem of your root partition cannot be - a module, so this could be dangerous. If unsure, say N. + umsdos.o. Note that the filesystem of your root partition (the one + containing the directory /) cannot be a module, so saying M could be + dangerous. If unsure, say N. /proc filesystem support CONFIG_PROC_FS @@ -6314,7 +6659,7 @@ CONFIG_PROC_FS It's totally cool; for example, "cat /proc/interrupts" gives information about what the different IRQs are used for at the moment (there is a small number of Interrupt ReQuest lines in your computer - that are used by the attached devices to gain the CPU's attention - + that are used by the attached devices to gain the CPU's attention -- often a source of trouble if two devices are mistakenly configured to use the same IRQ). This option will enlarge your kernel by about 18 kB. Several programs depend on this, so everyone should say Y @@ -6334,8 +6679,8 @@ CONFIG_NFS_FS ftp://sunsite.unc.edu/pub/Linux/docs/LDP, on its man page: "man nfs", and in the NFS-HOWTO. - An alternative to NFS is provided by the Coda filesystem; see "Coda - filesystem support" below. + A superior but less widely used alternative to NFS is provided by + the Coda filesystem; see "Coda filesystem support" below. If you say Y here, you should have said Y to TCP/IP networking also. This option would enlarge your kernel by about 27 kB. @@ -6357,12 +6702,13 @@ CONFIG_NFS_FS Root file system on NFS CONFIG_ROOT_NFS - If you want your Linux box to mount its whole root filesystem from - some other computer over the net via NFS (presumably because your - box doesn't have a hard disk), say Y. Read Documentation/nfsroot.txt - for details. It is likely that in this case, you also want to say Y - to "IP: kernel level autoconfiguration" so that your box can - discover its network address at boot time. + If you want your Linux box to mount its whole root filesystem (the + one containing the directory /) from some other computer over the + net via NFS (presumably because your box doesn't have a hard disk), + say Y. Read Documentation/nfsroot.txt for details. It is likely that + in this case, you also want to say Y to "IP: kernel level + autoconfiguration" so that your box can discover its network address + at boot time. Most people say N here. @@ -6378,13 +6724,19 @@ CONFIG_NFSD You will need the support software from the linux-nfs package available at ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir/. Please read the NFS-HOWTO, available via FTP (user: anonymous) from - sunsite.unc.edu:/pub/Linux/docs/HOWTO. + ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO. The NFS server is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module is called nfsd.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. If unsure, say N. +Emulate Sun NFS daemon +CONFIG_NFSD_SUN + If you would like for the server to allow clients to access + directories that are mount points on the local filesystem (this is + how nfsd behaves on Sun systems), say yes here. If unsure, say N. + OS/2 HPFS filesystem support (read only) CONFIG_HPFS_FS OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS @@ -6415,7 +6767,7 @@ CONFIG_NTFS_FS NTFS read-write support (experimental) CONFIG_NTFS_RW If you say Y here, you will (hopefully) be able to write to NTFS - file systems as well as read from them. The read-write support + file systems as well as read from them. The read-write support in NTFS is far from being complete and is not well tested. If you enable this, back up your NTFS volume first since it may get damaged. @@ -6425,34 +6777,36 @@ CONFIG_NTFS_RW System V and Coherent filesystem support CONFIG_SYSV_FS SCO, Xenix and Coherent are commercial Unix systems for Intel - machines. Saying Y here would allow you to read and write to and - from their floppies and hard disk partitions. + machines. Saying Y here would allow you to read to and write from + their floppies and hard disk partitions. - If you have a floppy or hard disk partition like that, it is likely + If you have floppies or hard disk partitions like that, it is likely that they contain binaries from those other Unix systems; in order - to run these binaries, you will want to install iBCS2 (iBCS2 [Intel - Binary Compatibility Standard] is a kernel module which lets you run - SCO, Xenix, Wyse, UnixWare, Dell Unix and System V programs under - Linux and is often needed to run commercial software that's only - available for those systems. It's available via FTP (user: - anonymous) from ftp://tsx-11.mit.edu/pub/linux/BETA). + to run these binaries, you will want to install iBCS2 (Intel Binary + Compatibility Standard is a kernel module which lets you run SCO, + Xenix, Wyse, UnixWare, Dell Unix and System V programs under Linux + and is often needed to run commercial software that's only available + for those systems. It's available via FTP (user: anonymous) from + ftp://tsx-11.mit.edu/pub/linux/BETA). If you only intend to mount files from some other Unix over the network using NFS, you don't need the System V filesystem support - (but you need NFS filesystem support obviously). Note that this - option is generally not needed for floppies, since a good portable - way to transport files and directories between unixes (and even - other operating systems) is given by the tar program ("man tar" or - preferably "info tar"). Note also that this option has nothing - whatsoever to do with the option "System V IPC". Read about the - System V filesystem in Documentation/filesystems/sysv-fs.txt. This - option will enlarge your kernel by about 34 kB. + (but you need NFS filesystem support obviously). + + Note that this option is generally not needed for floppies, since a + good portable way to transport files and directories between unixes + (and even other operating systems) is given by the tar program ("man + tar" or preferably "info tar"). Note also that this option has + nothing whatsoever to do with the option "System V IPC". Read about + the System V filesystem in Documentation/filesystems/sysv-fs.txt. + Saying Y here will enlarge your kernel by about 34 kB. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read Documentation/modules.txt. The module will be - called sysv.o. If you haven't heard about all of this before, it's - safe to say N. + called sysv.o. + + If you haven't heard about all of this before, it's safe to say N. Amiga FFS filesystem support CONFIG_AFFS_FS @@ -6501,13 +6855,13 @@ CONFIG_ROMFS_FS want). The module is called romfs.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. - If you don't know whether you need it, then you don't need it: say - N. + If you don't know whether you need it, then you don't need it: + answer N. QNX filesystem support (EXPERIMENTAL) CONFIG_QNX4FS_FS - This is the filesystem used by QNX 4. Say Y if you intend to mount - QNX hard disks and floppies. + This is the filesystem used by the operating system QNX 4. Say Y if + you intend to mount QNX hard disks or floppies. This filesystem support is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you @@ -6519,13 +6873,13 @@ CONFIG_QNX4FS_FS Kernel automounter support CONFIG_AUTOFS_FS The automounter is a tool to automatically mount remote filesystems - on demand. This implementation is partially kernel-based to reduce + on demand. This implementation is partially kernel-based to reduce overhead in the already-mounted case; this is unlike the BSD automounter (amd), which is a pure user space daemon. To use the automounter you need the user-space tools from - ftp://ftp.kernel.org/pub/linux/daemons/autofs; you also want to say Y to - "NFS filesystem support", above. + ftp://ftp.kernel.org/pub/linux/daemons/autofs; you also want to + answer Y to "NFS filesystem support", above. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -6535,31 +6889,33 @@ CONFIG_AUTOFS_FS If you are not a part of a fairly large, distributed network, you probably do not need an automounter, and can say N here. -UFS filesystem support (read only) +UFS filesystem support CONFIG_UFS_FS BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD, OpenBSD and NeXTstep) use a filesystem called UFS. Some System V Unixes can create and mount hard disk partitions and diskettes using - this filesystem as well. Saying Y here allows you to mount these - partitions and diskettes read-only. + this filesystem as well. Saying Y here will allow you to read from + and write to these partitions and diskettes. If you only intend to mount files from some other Unix over the network using NFS, you don't need the UFS filesystem support (but - you need NFS filesystem support obviously). Note that this option is - generally not needed for floppies, since a good portable way to - transport files and directories between unixes (and even other - operating systems) is given by the tar program ("man tar" or - preferably "info tar"). + you need NFS filesystem support obviously). + + Note that this option is generally not needed for floppies, since a + good portable way to transport files and directories between unixes + (and even other operating systems) is given by the tar program ("man + tar" or preferably "info tar"). When accessing NeXTstep files, you may need to convert them from the NeXT character set to the Latin1 character set; use the program recode ("info recode") for this purpose. - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read Documentation/modules.txt. The module will be - called ufs.o. If you haven't heard about all of this before, it's - safe to say N. + If you want to compile the UFS filesystem support as a module ( = + code which can be inserted in and removed from the running kernel + whenever you want), say M here and read Documentation/modules.txt. + The module will be called ufs.o. + + If you haven't heard about all of this before, it's safe to say N. BSD disklabel (FreeBSD partition tables) support CONFIG_BSD_DISKLABEL @@ -6614,18 +6970,22 @@ CONFIG_ADFS_FS /dev/pts filesystem (experimental) CONFIG_DEVPTS_FS - If you say Y here, you'll get a virtual filesystem which can be - mounted on /dev/pts with "mount -t devpts". This, together with the - pseudo terminal master multiplexer /dev/ptmx, is used for pseudo - terminal support as described in the Open Group's Unix98 standard: - in order to acquire a pseudo terminal, a process opens /dev/ptmx; - the number of the pseudo terminal is then made available to the - process and the pseudo terminal slave can be accessed as - /dev/pts/<number>. What was traditionally /dev/ttyp2 will then be - /dev/pts/2, for example. The GNU C library glibc 2.1 contains the - requisite support for this mode of operation. - - Say Y here if you have enabled support for Unix98 PTYs. + You should say Y here if you said Y to "Unix98 PTY support" above. + You'll then get a virtual filesystem which can be mounted on + /dev/pts with "mount -t devpts". This, together with the pseudo + terminal master multiplexer /dev/ptmx, is used for pseudo terminal + support as described in the Open Group's Unix98 standard: in order + to acquire a pseudo terminal, a process opens /dev/ptmx; the number + of the pseudo terminal is then made available to the process and the + pseudo terminal slave can be accessed as /dev/pts/<number>. What was + traditionally /dev/ttyp2 will then be /dev/pts/2, for example. The + GNU C library glibc 2.1 contains the requisite support for this mode + of operation. + + This code is also available as a module called devpts.o ( = code + which can be inserted in and removed from the running kernel + whenever you want). If you want to compile it as a module, say M + here and read Documentation/modules.txt. Macintosh partition map support CONFIG_MAC_PARTITION @@ -6633,15 +6993,15 @@ CONFIG_MAC_PARTITION partition tables of Macintosh hard drives, and thus use partitions on those drives. -SMB filesystem support (to mount WfW shares etc..) +SMB filesystem support (to mount Windows shares etc...) CONFIG_SMB_FS SMB (Server Message Block) is the protocol Windows for Workgroups - (WfW), Windows 95, Windows NT and Lan Manager use to share files and - printers over local networks. Saying Y here allows you to mount - their filesystems (often called "shares" in this context) and access - them just like any other Unix directory. Currently, this works only - if the Windows machines use TCP/IP as the underlying transport - protocol, and not NetBEUI. For details, read + (WfW), Windows 95, Windows NT and OS/2 Lan Manager use to share + files and printers over local networks. Saying Y here allows you to + mount their filesystems (often called "shares" in this context) and + access them just like any other Unix directory. Currently, this + works only if the Windows machines use TCP/IP as the underlying + transport protocol, and not NetBEUI. For details, read Documentation/filesystems/smbfs.txt and the SMB-HOWTO, available via FTP (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. @@ -6675,18 +7035,17 @@ CONFIG_CODA_FS enables you to mount filesystems of a remote server and access them with regular Unix commands as if they were sitting on your hard disk. Coda has several advantages over NFS: support for disconnected - operation for laptops, read/write server replication, security model - for authentication and encryption, persistent client caches and - write back caching. + operation (e.g. for laptops), read/write server replication, + security model for authentication and encryption, persistent client + caches and write back caching. If you say Y here, your Linux box will be able to act as a Coda *client*. You will need user level code as well, both for the client and server. Servers are currently user level, i.e. need no kernel - support. For technical information, read - Documentation/filesystems/coda.txt. For further information see - http://www.coda.cs.cmu.edu (to browse the WWW, you need to have - access to a machine on the Internet that has a program like lynx or - netscape) or contact Peter Braam <braam@cs.cmu.edu>. + support. Please read Documentation/filesystems/coda.txt and check + out the Coda home page http://www.coda.cs.cmu.edu (to browse the + WWW, you need to have access to a machine on the Internet that has a + program like lynx or netscape). If you want to compile the coda client support as a module ( = code which can be inserted in and removed from the running kernel @@ -6701,7 +7060,7 @@ CONFIG_NCP_FS mount NetWare file server volumes and to access them just like any other Unix directory. For details, please read the file Documentation/filesystems/ncpfs.txt in the kernel source and the - IPX-HOWTO on sunsite.unc.edu:/pub/Linux/docs/howto. + IPX-HOWTO on ftp://sunsite.unc.edu:/pub/Linux/docs/howto. You do not have to say Y here if you want your Linux box to act as a file *server* for Novell NetWare clients. @@ -6824,16 +7183,17 @@ CONFIG_NLS_CODEPAGE_775 nls codepage 850 CONFIG_NLS_CODEPAGE_850 The Microsoft fat filesystem family can deal with filenames in - native language character sets. These character sets are stored - in so-called DOS codepages. You need to include the appropriate + native language character sets. These character sets are stored in + so-called DOS codepages. You need to include the appropriate codepage if you want to be able to read/write these filenames on DOS/Windows partitions correctly. This does apply to the filenames only, not to the file contents. You can include several codepages; say Y here if you want to include the DOS codepage that is used for - much of Europe--United Kingdom, Germany, Spain, Italy, and [add more - countries here]. It has some characters useful to many European - languages that are not part of the US codepage 437. If unsure, say - Y. + much of Europe -- United Kingdom, Germany, Spain, Italy, and [add + more countries here]. It has some characters useful to many European + languages that are not part of the US codepage 437. + + If unsure, say Y. nls codepage 852 CONFIG_NLS_CODEPAGE_852 @@ -6844,7 +7204,7 @@ CONFIG_NLS_CODEPAGE_852 DOS/Windows partitions correctly. This does apply to the filenames only, not to the file contents. You can include several codepages; say Y here if you want to include the Latin 2 codepage used by DOS - for much of Central and Eastern Europe. It has all the required + for much of Central and Eastern Europe. It has all the required characters for these languages: Albanian, Croatian, Czech, English, Finnish, Hungarian, Irish, German, Polish, Romanian, Serbian (Latin transcription), Slovak, Slovenian, and Sorbian. @@ -7012,7 +7372,7 @@ CONFIG_NLS_ISO8859_5 correctly on the screen, you need to include the appropriate input/output character sets. Say Y here for ISO8859-5, a Cyrillic character set with which you can type Bulgarian, Byelorussian, - Macedonian, Russian, Serbian, and Ukrainian. Note that the charset + Macedonian, Russian, Serbian, and Ukrainian. Note that the charset KOI8-R is preferred in Russia. nls iso8859-6 @@ -7068,30 +7428,67 @@ CONFIG_NLS_KOI8_R Virtual terminal CONFIG_VT - If you say Y here, you will get support for a terminal device with + If you say Y here, you will get support for terminal devices with display and keyboard devices. These are called "virtual" because you - can run several virtual terminals on one physical terminal; however, - you need at least one virtual terminal device in order to make use - of a physical terminal. Only people using embedded systems want to - say N here; most everybody else says Y. If unsure, say Y, or else - you won't be able to do much with your new shiny Linux system :-) + can run several virtual terminals (also called virtual consoles) on + one physical terminal. This is rather useful, for example one + virtual terminal can collect system messages and warnings, another + one can be used for a text-mode user session, and a third could run + an X session, all in parallel. Switching between virtual terminals + is done with certain key combinations, usually Alt-<function key>. + + The setterm command ("man setterm") can be used to change the + properties (such as colors) of a virtual terminal. + + You need at least one virtual terminal device in order to make use + of your keyboard and monitor. Therefore, only people configuring an + embedded system would want to say N here in order to save some + memory; the only way to log into such a system is then via a serial + or network connection. + + If unsure, say Y, or else you won't be able to do much with your new + shiny Linux system :-) Support for console on virtual terminal CONFIG_VT_CONSOLE - If you say Y here, by default all kernel messages will be sent to - the device /dev/tty0 which corresponds to the virtual terminal that - is visible on your display. You should say Y here unless you only - want to have the kernel messages output to a serial port (in which - case you probably want to say Y to "Console on serial port", below). + The system console is the device which receives all kernel messages + and warnings and which allows logins in single user mode. If you + answer Y here, a virtual terminal (the device used to interact with + a physical terminal) can be used as system console. This is the most + common mode of operations, so you should say Y here unless you want + the kernel messages be output only to a serial port (in which case + you should say Y to "Console on serial port", below). + + If you do say Y here, by default the currently visible virtual + terminal (/dev/tty0) will be used as system console. You can change + that with a kernel command line option such as "console=tty3" which + would use the third virtual terminal as system console. (Try "man + bootparam" or see the documentation of your boot loader (lilo or + loadlin) about how to pass options to the kernel at boot time. The + lilo procedure is also explained in the SCSI-HOWTO, available via + FTP (user: anonymous) in + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO.) + + If unsure, say Y. Software generated cursor CONFIG_SOFTCURSOR If you say Y here, you'll be able to do lots of nice things with the cursors of your virtual consoles -- for example turn them into non-blinking block cursors which are more visible on laptop screens, - or change their color depending on the virtual console you're on. + or change their colors depending on the virtual console they're on. See Documentation/VGA-softcursor.txt for more information. +Support for PowerMac keyboard +CONFIG_MAC_KEYBOARD + This option allows you to use an ADB keyboard attached to your + machine. Note that this disables any other (ie. PS/2) keyboard + support, even if your machine is physically capable of using both at + the same time. + + If you use an ADB keyboard (4 pin connector), say Y here. + If you use a PS/2 keyboard (6 pin connector), say N here. + Standard/generic serial support CONFIG_SERIAL This selects whether you want to include the driver for the standard @@ -7106,38 +7503,54 @@ CONFIG_SERIAL Documentation/modules.txt. The module will be called serial.o. [WARNING: Do not compile this driver as a module if you are using non-standard serial ports, since the configuration information will - be lost when kerneld automatically unloads the driver. This - limitation may be lifted in the future.] + be lost when the driver is unloaded. This limitation may be lifted + in the future.] BTW1: If you have a mouseman serial mouse which is not recognized by the X window system, try running gpm first. BTW2: If you intend to connect a so-called Winmodem to your - machine's serial port, forget it. These modems require proprietary - drivers which are only available under Windows. + machine's serial port, forget it. These modems are crippled and + require proprietary drivers which are only available under Windows. Most people will say Y or M here, so that they can use serial mice, modems and similar devices connecting to the standard serial ports. Support for console on serial port CONFIG_SERIAL_CONSOLE - If you say Y here, it is possible to use a serial port as the - console. By default still the currently visible virtual console will - be used as the system console but you can alter that using a kernel - command line option such as "console=ttyS1". (Try "man bootparam" or - see the documentation of your boot loader (lilo or loadlin) about - how to pass options to the kernel at boot time. The lilo procedure - is also explained in the SCSI-HOWTO, available via FTP (user: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO.) If you - don't have a VGA card installed and you say Y here, the kernel will - automatically use /dev/ttyS0 as system console. + If you say Y here, it will be possible to use a serial port as the + system console (the system console is the device which receives all + kernel messages and warnings and which allows logins in single user + mode). This could be useful if some terminal or printer is connected + to that serial port. + + Even if you say Y here, the currently visible virtual console + (/dev/tty0) will still be used as the system console by default, but + you can alter that using a kernel command line option such as + "console=ttyS1". (Try "man bootparam" or see the documentation of + your boot loader (lilo or loadlin) about how to pass options to the + kernel at boot time. The lilo procedure is also explained in the + SCSI-HOWTO, available via FTP (user: anonymous) in + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO.) + + If you don't have a VGA card installed and you say Y here, the + kernel will automatically use the first serial line, /dev/ttyS0, as + system console. + + If unsure, say N. + +Support for PowerMac serial ports +CONFIG_MAC_SERIAL + If you have Macintosh style serial ports (8 pin mini-DIN), say Y + here. If you also have regular serial ports and enable the driver + for them, you can't currently use the serial console feature. Comtrol Rocketport support CONFIG_ROCKETPORT This is a driver for the Comtrol Rocketport cards which provide - multiple serial ports. You would need something like this to - connect more than two modems to your Linux box, for instance in - order to become a BBS. + multiple serial ports. You would need something like this to connect + more than two modems to your Linux box, for instance in order to + become a dial-in server. If you want to compile this driver as a module, say M here and read Documentation/modules.txt. The module will be called rocket.o. @@ -7145,12 +7558,12 @@ CONFIG_ROCKETPORT Digiboard Intelligent async support CONFIG_DIGIEPCA This is a driver for Digi International's Xx, Xeve, and Xem series - of cards which provide multiple serial ports. You would need + of cards which provide multiple serial ports. You would need something like this to connect more than two modems to your Linux - box, for instance in order to become a BBS. This driver supports the - original PC (ISA) boards as well as PCI, and EISA. If you have a - card like this, say Y here and read the file - Documentation/digiepca.txt. + box, for instance in order to become a dial-in server. This driver + supports the original PC (ISA) boards as well as PCI, and EISA. If + you have a card like this, say Y here and read the file + Documentation/digiepca.txt. NOTE: There is another, separate driver for the Digiboard PC boards: "Digiboard PC/Xx Support" below. You should (and can) only select @@ -7164,8 +7577,8 @@ CONFIG_DIGI This is a driver for the Digiboard PC/Xe, PC/Xi, and PC/Xeve cards that give you many serial ports. You would need something like this to connect more than two modems to your Linux box, for instance in - order to become a BBS. If you have a card like that, say Y here and - read the file Documentation/digiboard.txt. + order to become a dial-in server. If you have a card like that, say + Y here and read the file Documentation/digiboard.txt. If you want to compile this driver as a module, say M here and read Documentation/modules.txt. The module will be called pcxx.o. @@ -7175,18 +7588,18 @@ CONFIG_RISCOM8 This is a driver for the SDL Communications RISCom/8 multiport card, which gives you many serial ports. You would need something like this to connect more than two modems to your Linux box, for instance - in order to become a BBS. If you have a card like that, say Y here - and read the file Documentation/riscom8.txt. + in order to become a dial-in server. If you have a card like that, + say Y here and read the file Documentation/riscom8.txt. Also it's possible to say M here and compile this driver as kernel loadable module; the module will be called riscom8.o. Specialix IO8+ card support CONFIG_SPECIALIX - This is a driver for the Specialix IO8+ multiport card which gives - you many serial ports. You would need something like this to - connect more than two modems to your Linux box, for instance in - order to become a BBS. + This is a driver for the Specialix IO8+ multiport card (both the + ISA and the PCI version) which gives you many serial ports. You + would need something like this to connect more than two modems to + your Linux box, for instance in order to become a dial-in server. If you have a card like that, say Y here and read the file Documentation/specialix.txt. Also it's possible to say M here and @@ -7195,19 +7608,19 @@ CONFIG_SPECIALIX Specialix DTR/RTS pin is RTS CONFIG_SPECIALIX_RTSCTS - The Specialix card can only support either RTS or DTR. If you say - N here, the driver will use the pin as "DTR" when the tty is in - software handshake mode. If you say Y here or hardware handshake - is on, it will always be RTS. Read the file - Documentation/specialix.txt for more information. + The Specialix card can only support either RTS or DTR. If you say N + here, the driver will use the pin as "DTR" when the tty is in + software handshake mode. If you say Y here or hardware handshake is + on, it will always be RTS. Read the file Documentation/specialix.txt + for more information. Cyclades async mux support CONFIG_CYCLADES This is a driver for a card that gives you many serial ports. You would need something like this to connect more than two modems to - your Linux box, for instance in order to become a BBS. For - information about the Cyclades-Z card, read - drivers/char/README.cycladesZ. + your Linux box, for instance in order to become a dial-in server. + For information about the Cyclades-Z card, read + drivers/char/README.cycladesZ. As of 1.3.9x kernels, this driver's minor numbers start at 0 instead of 32. @@ -7223,10 +7636,10 @@ Stallion multiport serial support CONFIG_STALDRV Stallion cards give you many serial ports. You would need something like this to connect more than two modems to your Linux box, for - instance in order to become a BBS. If you say Y here, you will be - asked for your specific card model in the next questions. Make sure - to read drivers/char/README.stallion in this case. If you have never - heard about all this, it's safe to say N. + instance in order to become a dial-in server. If you say Y here, you + will be asked for your specific card model in the next questions. + Make sure to read drivers/char/README.stallion in this case. If you + have never heard about all this, it's safe to say N. Stallion EasyIO or EC8/32 support CONFIG_STALLION @@ -7252,8 +7665,8 @@ CONFIG_ISTALLION Hayes ESP serial port support CONFIG_ESPSERIAL - This is a driver which supports Hayes ESP serial ports. Both single - port cards and multiport cards are supported. Make sure to read + This is a driver which supports Hayes ESP serial ports. Both single + port cards and multiport cards are supported. Make sure to read Documentation/hayes-esp.txt. To compile this driver as a module ( = code which can be inserted in @@ -7261,6 +7674,43 @@ CONFIG_ESPSERIAL and read Documentation/modules.txt. The module will be called esp.o. If unsure, say N. +Unix98 PTY support +CONFIG_UNIX98_PTYS + A pseudo terminal (PTY) is a software device consisting of two + halves: a master and a slave. The slave device behaves identical to + a physical terminal; the master device is used by a process to + read data from and write data to the slave, thereby emulating a + terminal. Typical programs for the master side are xterm and telnet + servers. + + Linux has traditionally used the BSD-like names /dev/ptyxx for + masters and /dev/ttyxx for slaves of pseudo terminals. This scheme + has a number of problems. The GNU C library glibc 2.1 and later, + however, supports the Unix98 naming standard: in order to acquire a + pseudo terminal, a process opens /dev/ptmx; the number of the pseudo + terminal is then made available to the process and the pseudo + terminal slave can be accessed as /dev/pts/<number>. What was + traditionally /dev/ttyp2 will then be /dev/pts/2, for example. + + The entries in /dev/pts/ are created on the fly by a virtual + filesystem; therefore, if you say Y here you should say Y to + "/dev/pts filesystem for Unix98 PTYs" as well. + + You should say Y here only if your C library is glibc 2.1 or later + (equal to libc-6.1, check with "ls -l /lib/libc.so.*"). Read the + instructions in Documentation/Changes. + +Maximum number of Unix98 PTYs in use (0-2048) +CONFIG_UNIX98_PTY_COUNT + The maximum number of Unix98 PTYs that can be used at any one time. + The default is 256, and should be enough for desktop systems. Server + machines which support incoming telnet/rlogin/ssh connections and/or + serve several X terminals may want to increase this: every incoming + connection and every xterm uses up one PTY. + + When not in use, each additional set of 256 PTYs occupy + approximately 8 KB of kernel memory on 32-bit architectures. + Parallel printer support CONFIG_PRINTER If you intend to attach a printer to the parallel port of your Linux @@ -7293,7 +7743,7 @@ Support IEEE1284 status readback CONFIG_PRINTER_READBACK If your printer conforms to IEEE 1284, it may be able to provide a status indication when you read from it (for example, with `cat - /dev/lp1'). To use this feature, say Y here. + /dev/lp1'). To use this feature, say Y here. Mouse Support (not serial mice) CONFIG_MOUSE @@ -7337,20 +7787,16 @@ CONFIG_PSMOUSE AST and IBM all use this as their mouse port on currently shipping machines. The trackballs of some laptops are PS/2 mice also. In particular, the C&T 82C710 mouse on TI Travelmates is a PS/2 mouse. + Although PS/2 mice are not technically bus mice, they are explained in detail in the Busmouse-HOWTO, available via FTP (user: anonymous) - in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. When using a PS/2 - mouse, you can get problems if you want to use the mouse both on the - Linux console and under X. Using the "-R" option of the Linux mouse - managing program gpm (available from - sunsite.unc.edu:/pub/Linux/system/Daemons) solves this problem, or - you can get the "mconv" utility also from sunsite. - - If you want to compile this mouse driver as a module ( = code which - can be inserted in and removed from the running kernel whenever you - want), say M here and read Documentation/modules.txt. The module - will be called psaux.o. If you are unsure, say N and read the HOWTO - nevertheless: it will tell you what you have. + in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + + When using a PS/2 mouse, you can get problems if you want to use the + mouse both on the Linux console and under X. Using the "-R" option + of the Linux mouse managing program gpm (available from + ftp://sunsite.unc.edu:/pub/Linux/system/Daemons) solves this + problem, or you can get the "mconv" utility also from sunsite. C&T 82C710 mouse port support (as on TI Travelmate) CONFIG_82C710_MOUSE @@ -7365,7 +7811,7 @@ CONFIG_PC110_PAD http://toy.cabi.net; to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape). It can turn the digitizer pad into a PS/2 mouse emulation - with tap gestures or into an absolute pad. + with tap gestures or into an absolute pad. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -7381,7 +7827,7 @@ CONFIG_MS_BUSMOUSE If you are unsure, say N and read the HOWTO nevertheless: it will tell you what you have. Also be aware that several vendors talk - about 'Microsoft busmouse' and actually mean PS/2 busmouse - so + about 'Microsoft busmouse' and actually mean PS/2 busmouse -- so count the pins on the connector. If you want to compile this as a module ( = code which can be @@ -7404,13 +7850,10 @@ CONFIG_ATIXL_BUSMOUSE If you are unsure, say N and read the HOWTO nevertheless: it will tell you what you have. -Support for user miscellaneous modules -CONFIG_UMISC - This option forces generic miscellaneous minor device support in the - kernel, and allows later loading of user miscellaneous character - device modules, such as drivers for optic pens and touchscreens. - Unless you need such specific modules, or are willing to write/test - one, just say N. +Support for PowerMac ADB mouse +CONFIG_ADBMOUSE + If you have an ADB mouse (4 pin connector) as is common on + Macintoshes, say Y here. QIC-02 tape support CONFIG_QIC02_TAPE @@ -7426,7 +7869,7 @@ CONFIG_QIC02_DYNCONF header file (include/linux/tpqic02.h), in which case you should say N, or you can fetch a program via anonymous FTP which is able to configure this driver during runtime. The program to do this is - called 'qic02conf' and it is part of the 'tpqic02-support-X.Y.tar.gz' + called 'qic02conf' and it is part of the tpqic02-support-X.Y.tar.gz support package. If you want to use the qic02conf program, say Y. @@ -7508,7 +7951,7 @@ CONFIG_ZFTAPE Default block size for zftape CONFIG_ZFT_DFLT_BLK_SZ - If unsure leave this at its default value, i.e. 10240. Note that + If unsure leave this at its default value, i.e. 10240. Note that you specify only the default block size here. The block size can be changed at run time using the MTSETBLK tape operation with the MTIOCTOP ioctl (i.e. with "mt -f /dev/qft0 setblk #BLKSZ" from the @@ -7519,7 +7962,7 @@ CONFIG_ZFT_DFLT_BLK_SZ in multiples of a fixed block size. The block size defaults to 10240 which is what GNU tar uses. The values for the block size should be either 1 or multiples of 1024 up to a maximum value of - 63488 (i.e. 62k). If you specify `1' then zftape's builtin + 63488 (i.e. 62 K). If you specify `1' then zftape's builtin compression will be disabled. Reasonable values are `10240' (GNU tar's default block size), @@ -7529,12 +7972,12 @@ CONFIG_ZFT_DFLT_BLK_SZ Number of DMA buffers CONFIG_FT_NR_BUFFERS - Please leave this at `3' unless you REALLY know what you are - doing. It is not necessary to change this value. Values below 3 make - the proper use of ftape impossible, values greater than 3 are a waste - of memory. You can change the amount of DMA memory used by ftape at + Please leave this at `3' unless you REALLY know what you are doing. + It is not necessary to change this value. Values below 3 make the + proper use of ftape impossible, values greater than 3 are a waste of + memory. You can change the amount of DMA memory used by ftape at runtime with "mt -f /dev/qft0 setdrvbuffer #NUMBUFFERS". Each buffer - wastes 32kb of memory. Please note that this memory cannot be + wastes 32 KB of memory. Please note that this memory cannot be swapped out. Procfs entry for ftape @@ -7547,9 +7990,9 @@ CONFIG_FT_PROC_FS cartridge, the kernel driver, your tape drive, the floppy disk controller and the error history for the most recent use of the kernel driver. Saying Y will enlarge the size of the ftape driver - by approximately 2k. + by approximately 2 KB. - WARNING: When compiling ftape as a module (i.e. saying `M' to + WARNING: When compiling ftape as a module (i.e. saying M to "Floppy tape drive") it is dangerous to use ftape's proc file system interface. Accessing `/proc/ftape' while the module is unloaded will result in a kernel Oops. This cannot be fixed from inside ftape. @@ -7663,9 +8106,9 @@ CONFIG_FT_FDC_IRQ Note that this menu lets you specify only the default setting for the IRQ channel. The hardware configuration can be changed at boot - time (when ftape is compiled into the kernel, i.e. if you specified - Y to "Floppy tape drive") or module load time (i.e. if you have said M - to "Floppy tape drive"). + time (when ftape is compiled into the kernel, i.e. if you said Y to + "Floppy tape drive") or module load time (i.e. if you said M to + "Floppy tape drive"). Please read also the file Documentation/ftape.txt which contains a short description of the parameters that can be set at boot or load @@ -7689,9 +8132,9 @@ CONFIG_FT_FDC_DMA Note that this menu lets you specify only the default setting for the DMA channel. The hardware configuration can be changed at boot - time (when ftape is compiled into the kernel, i.e. if you specified - Y to "Floppy tape drive") or module load time (i.e. if you have said M - to "Floppy tape drive"). + time (when ftape is compiled into the kernel, i.e. if you said Y to + "Floppy tape drive") or module load time (i.e. if you said M to + "Floppy tape drive"). Please read also the file Documentation/ftape.txt which contains a short description of the parameters that can be set at boot or load @@ -7729,11 +8172,11 @@ CONFIG_MTRR PCI or AGP bus. Enabling write-combining allows bus write transfers to be combined into a larger transfer before bursting over the PCI/AGP bus. This can increase performance of image write operations - 2.5 times or more. - This option creates a /proc/mtrr file which may be used to manipulate - your MTRRs. Typically the X server should use this. This should have - a reasonably generic interface so that similar control registers on - other processors can be easily supported. + 2.5 times or more. This option creates a /proc/mtrr file which may + be used to manipulate your MTRRs. Typically the X server should use + this. This should have a reasonably generic interface so that + similar control registers on other processors can be easily + supported. Saying Y here also fixes a problem with buggy SMP BIOSes which only set the MTRRs for the boot CPU and not the secondary CPUs. This can @@ -7742,7 +8185,8 @@ CONFIG_MTRR In general you should compile this into the kernel, rather than as a loadable module, because the BIOS fix needs to be done early in the boot sequence. If you compile this as a module, the BIOS fix will be - delayed until when you load the module. You do this at your own risk. + delayed until when you load the module. You do this at your own + risk. See Documentation/mtrr.txt for more information. @@ -7754,8 +8198,8 @@ CONFIG_FT_ALPHA_CLOCK Zilog serial support CONFIG_SUN_ZS - This driver does not exist at this point, so you might as well say - N. + This driver does not exist at this point, so you might as well + say N. Advanced Power Management CONFIG_APM @@ -7793,61 +8237,65 @@ CONFIG_APM anything, try disabling/enabling this option (or disabling/enabling APM in your BIOS). - Some other things to try when experiencing seemingly random, "weird" - problems: - 1) passing the "no-hlt" option to the kernel - 2) switching on floating point emulation in the kernel and passing + Some other things you should try when experiencing seemingly random, + "weird" problems: + + 1) make sure that you have enough swap space and that it is + enabled. + 2) pass the "no-hlt" option to the kernel + 3) switch on floating point emulation in the kernel and pass the "no387" option to the kernel - 3) passing the "floppy=nodma" option to the kernel - 4) passing the "mem=4M" option to the kernel (thereby disabling - all but the first 4M of RAM) - 5) making sure that the CPU is not over clocked. - 6) reading the sig11 FAQ at http://www.bitwizard.nl/sig11/ - 7) disabling the cache from your BIOS settings - 8) installing a better fan - 9) exchanging RAM chips - 10) exchanging the motherboard. + 4) pass the "floppy=nodma" option to the kernel + 5) pass the "mem=4M" option to the kernel (thereby disabling + all but the first 4 MB of RAM) + 6) make sure that the CPU is not over clocked. + 7) read the sig11 FAQ at http://www.bitwizard.nl/sig11/ + 8) disable the cache from your BIOS settings + 9) install a fan for the video card or exchange video RAM + 10) install a better fan for the CPU + 11) exchange RAM chips + 12) exchange the motherboard. Ignore USER SUSPEND CONFIG_APM_IGNORE_USER_SUSPEND - This option will ignore USER SUSPEND requests. On machines with a - compliant APM BIOS, you want to say N. However, on the NEC Versa M + This option will ignore USER SUSPEND requests. On machines with a + compliant APM BIOS, you want to say N. However, on the NEC Versa M series notebooks, it is necessary to say Y because of a BIOS bug. Enable APM at boot time CONFIG_APM_DO_ENABLE - Enable APM features at boot time. From page 36 of the APM BIOS + Enable APM features at boot time. From page 36 of the APM BIOS specification: "When disabled, the APM BIOS does not automatically power manage devices, enter the Standby State, enter the Suspend State, or take power saving steps in response to CPU Idle calls." This driver will make CPU Idle calls when Linux is idle (unless this - feature is turned off -- see "Do CPU IDLE calls", below). This + feature is turned off -- see "Do CPU IDLE calls", below). This should always save battery power, but more complicated APM features - will be dependent on your BIOS implementation. You may need to turn + will be dependent on your BIOS implementation. You may need to turn this option off if your computer hangs at boot time when using APM - support, or if it beeps continuously instead of suspending. Turn + support, or if it beeps continuously instead of suspending. Turn this off if you have a NEC UltraLite Versa 33/C or a Toshiba - T400CDT. This is off by default since most machines do fine without + T400CDT. This is off by default since most machines do fine without this feature. Do CPU IDLE calls CONFIG_APM_CPU_IDLE Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop. - On some machines, this can activate improved power savings, such as a - slowed CPU clock rate, when the machine is idle. These idle calls are - made after the idle loop has run for some length of time (e.g., 333 - mS). On some machines, this will cause a hang at boot time or whenever - the CPU becomes idle. (On machines with more than one CPU, this option - does nothing.) + On some machines, this can activate improved power savings, such as + a slowed CPU clock rate, when the machine is idle. These idle calls + are made after the idle loop has run for some length of time (e.g., + 333 mS). On some machines, this will cause a hang at boot time or + whenever the CPU becomes idle. (On machines with more than one CPU, + this option does nothing.) Enable console blanking using APM CONFIG_APM_DISPLAY_BLANK - Enable console blanking using the APM. Some laptops can use this to + Enable console blanking using the APM. Some laptops can use this to turn off the LCD backlight when the screen blanker of the Linux - virtual console blanks the screen. Note that this is only used by + virtual console blanks the screen. Note that this is only used by the virtual console screen blanker, and won't turn off the backlight when using the X Window system. This also doesn't have anything to - do with your VESA-compliant power-saving monitor. Further, this + do with your VESA-compliant power-saving monitor. Further, this option doesn't work for all laptops -- it might not turn off your backlight at all, or it might print a lot of errors to the console, especially if you are using gpm. @@ -7855,13 +8303,14 @@ CONFIG_APM_DISPLAY_BLANK Power off on shutdown CONFIG_APM_POWER_OFF Enable the ability to power off the computer after the Linux kernel - is halted. You will need software (e.g., a suitable version of the + is halted. You will need software (e.g., a suitable version of the halt(8) command ("man 8 halt")) to cause the computer to power down. Recent versions of the sysvinit package available from ftp://sunsite.unc.edu/pub/Linux/system/daemons/init/ (user: anonymous) contain support for this ("halt -p" shuts down Linux and - powers off the computer). As with the other APM options, this - option may not work reliably with some APM BIOS implementations. + powers off the computer, if executed from runlevel 0). As with the + other APM options, this option may not work reliably with some APM + BIOS implementations. Ignore multiple suspend/standby events CONFIG_APM_IGNORE_MULTIPLE_SUSPEND @@ -7871,6 +8320,16 @@ CONFIG_APM_IGNORE_MULTIPLE_SUSPEND ignored. Without this the Thinkpad 560 has troubles with the user level daemon apmd, and with the PCMCIA package pcmcia-cs. +Ignore multiple suspend/resume cycles +CONFIG_APM_IGNORE_SUSPEND_BOUNCE + This option is necessary on the Dell Inspiron 3200, but should be + safe for all other laptops. When enabled, a system suspend event + that occurs within one second of a resume is ignored. Without this + the Inspiron will shut itself off a few seconds after you open the + lid, requiring you to press the power button to resume it a second + time. + Say Y. + Watchdog Timer Support CONFIG_WATCHDOG If you say Y here (and to one of the following options) and create a @@ -7886,8 +8345,8 @@ CONFIG_WATCHDOG your computer. For details, read Documentation/watchdog.txt in the kernel source. - The watchdog is usually used together with the watchdog daemon which - is available via FTP (user: anonymous) from + The watchdog is usually used together with the watchdog daemon + which is available via FTP (user: anonymous) from ftp://tsx-11.mit.edu/pub/linux/sources/sbin/. This daemon can also monitor NFS connections and can reboot the machine when the process table is full. @@ -7925,8 +8384,8 @@ CONFIG_WDT_501 Fan Tachometer CONFIG_WDT_501_FAN - Enable the Fan Tachometer on the WDT501. Only do this if you have a fan - tachometer actually set up. + Enable the Fan Tachometer on the WDT501. Only do this if you have a + fan tachometer actually set up. Software Watchdog CONFIG_SOFT_WATCHDOG @@ -7944,7 +8403,7 @@ CONFIG_PCWATCHDOG This is the driver for the Berkshire Products PC Watchdog card. This card simply watches your kernel to make sure it doesn't freeze, and if it does, it reboots your computer after a certain amount of - time. This driver is like the WDT501 driver but for different + time. This driver is like the WDT501 driver but for different hardware. Please read Documentation/pcwd-watchdog.txt. The PC watchdog cards can be ordered from http://www.berkprod.com. Some example rc.local files are available from ftp://ftp.bitgate.com. @@ -7952,8 +8411,9 @@ CONFIG_PCWATCHDOG This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module is called pcwd.o. If you want to compile it as a module, - say M here and read Documentation/modules.txt. Most people will say - N. + say M here and read Documentation/modules.txt. + + Most people will say N. Acquire SBC Watchdog Timer CONFIG_ACQUIRE_WDT @@ -7963,85 +8423,163 @@ CONFIG_ACQUIRE_WDT it does, it reboots your computer after a certain amount of time. This driver is like the WDT501 driver but for different hardware. - This driver is also available as a module ( = code which can be + This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module is called pscwdt.o. If you want to compile it as a module, - say M here and read Documentation/modules.txt. Most people will say N. + The module is called pscwdt.o. If you want to compile it as a + module, say M here and read Documentation/modules.txt. Most people + will say N. Enhanced Real Time Clock Support CONFIG_RTC If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you - will get access to the real time clock built into your - computer. Every PC has such a clock built in. It can be used to - generate signals from as low as 1Hz up to 8192Hz, and can also be - used as a 24 hour alarm. It reports status information via the file - /proc/rtc and its behaviour is set by various ioctls on - /dev/rtc. - - People running SMP (= multiprocessor) versions of Linux should say Y + will get access to the real time clock built into your computer. + Every PC has such a clock built in. It can be used to generate + signals from as low as 1Hz up to 8192Hz, and can also be used as a + 24 hour alarm. It reports status information via the file /proc/rtc + and its behaviour is set by various ioctls on /dev/rtc. + + People running SMP (multiprocessor) versions of Linux should say Y here to read and set the RTC clock in a SMP compatible fashion. (They should also read Documentation/smp and Documentation/IO-APIC.txt and the SMP-FAQ on the WWW at http://www.irisa.fr/prive/mentre/smp-faq/ (to browse the WWW, you need to have access to a machine on the Internet that has a program - like lynx or netscape)). + like lynx or netscape).) If you think you have a use for such a device (such as periodic data - sampling), then say Y here, and go read the file - Documentation/rtc.txt for details. + sampling), then say Y here, and read Documentation/rtc.txt for + details. Tadpole ANA H8 Support CONFIG_H8 The Hitachi H8/337 is a microcontroller used to deal with the power and thermal environment. If you say Y here, you will be able to - communicate with it via via a character special device. If unsure, - say N. + communicate with it via a character special device. + + If unsure, say N. /dev/nvram support CONFIG_NVRAM If you say Y here and create a character special file /dev/nvram with major number 10 and minor number 144 using mknod ("man mknod"), - you get access to the 50 bytes of non-volatile memory in the real - time clock (RTC), which is contained in every PC and most - Ataris. This memory is conventionally called "CMOS RAM" on PCs and - "NVRAM" on Ataris. /dev/nvram may be used to view settings there, or - to change them (with some utility). It could also be used to - frequently save a few bits of very important data that may not be - lost over power-off and for which writing to disk is too - insecure. On Atari machines, /dev/nvram is always configured and - does not need to be selected. + you get read and write access to the 50 bytes of non-volatile memory + in the real time clock (RTC), which is contained in every PC and + most Ataris. This memory is conventionally called "CMOS RAM" on PCs + and "NVRAM" on Ataris. /dev/nvram may be used to view settings + there, or to change them (with some utility). It could also be used + to frequently save a few bits of very important data that may not be + lost over power-off and for which writing to disk is too insecure. + On Atari machines, /dev/nvram is always configured and does not need + to be selected. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called nvram.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. -PC joystick support +Joystick support CONFIG_JOYSTICK - If you have a PC compatible analog or digital joystick, you can say - Y here. If you then create a character special file under /dev with - major number 15 and minor number 0 or 1 (for the two joystick ports) - using mknod ("man mknod"), you can read the status of the buttons - and the x and y coordinates from that file. Please read the file + If you have a joystick, you can say Y here to enable generic + joystick support. You will also need to say Y or M to at least one + of the hardware specific joystick drivers. This will make the + joysticks available as /dev/jsX devices. Please read the file Documentation/joystick.txt which contains more information and the - location of the joystick package that you'll need. + location of the joystick package that you'll need. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called joystick.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. +Classic PC analog joysticks and gamepads +CONFIG_JOY_ANALOG + Say Y here if you have an analog joystick or gamepad that connects + to the PC gameport. This supports many different types, including + joysticks with throttle control, with rudders, or with extensions + like additional hats and buttons compatible with CH Flightstick Pro, + ThrustMaster FCS or 6 and 8 button gamepads. For more information on + how to use the driver please read Documentation/joystick.txt + +FPGaming and MadCatz A3D controllers +CONFIG_JOY_ASSASIN + Say Y here if you have an FPGaming Assasin 3D, MadCatz Panther or + MadCatz Panther XL. For more information on how to use the driver + please read Documentation/joystick.txt + +Gravis GrIP joysticks and gamepads +CONFIG_JOY_GRAVIS + Say Y here if you have a Gravis GamePad Pro, Gravis Xterminator or + Gravis Blackhawk Digital. For more information on how to use the + driver please read Documentation/joystick.txt + +PDPI Lightning 4 gamecards +CONFIG_JOY_LIGHTNING + Say Y here if you have a PDPI Lightning 4 gamecard and an analog + joystick or gamepad connected to it. For more information on how to + use the driver please read Documentation/joystick.txt + +Logitech Digital joysticks and gamepads +CONFIG_JOY_LOGITECH + Say Y here if you have a Logitech WingMan Extreme Digital, + Logitech ThunderPad Digital or Logitech CyberMan 2. For more + information on how to use the driver please read + Documentation/joystick.txt + +Microsoft SideWinder, Genius Digital joysticks and gamepads +CONFIG_JOY_SIDEWINDER + Say Y here if you have a Microsoft SideWinder 3d Pro, Microsoft + SideWinder Precision Pro, Microsoft SideWinder Force Feedback Pro, + Microsoft Sidewinder GamePad or Genius Flight2000 F-23 Digital. For + more information on how to use the driver please read + Documentation/joystick.txt + +ThrustMaster DirectConnect joysticks and gamepads +CONFIG_JOY_THRUSTMASTER + Say Y here if you have a ThrustMaster Millenium 3D Inceptor or a + ThrustMaster 3D Rage Pad. For more information on how to use the + driver please read Documentation/joystick.txt + +NES, SNES, PSX, Multisystem joysticks and gamepads +CONFIG_JOY_CONSOLE + Say Y here if you have a Nintendo Entertainment System gamepad, + Super Nintendo Entertainment System gamepad, Sony PlayStation + gamepad or a Multisystem -- Atari, Amiga, Commodore, Amstrad CPC + joystick. For more information on how to use the driver please read + Documentation/joystick.txt and Documentation/joystick-parport.txt + +Sega, Multisystem joysticks and gamepads +CONFIG_JOY_DB9 + Say Y here if you have a Sega Master System gamepad, Sega Genesis + gamepad, Sega Saturn gamepad, or a Multisystem -- Atari, Amiga, + Commodore, Amstrad CPC joystick. For more information on how to use + the driver please read Documentation/joystick.txt and + Documentation/joystick-parport.txt + +TurboGraFX Multisystem joystick interface +CONFIG_JOY_TURBOGRAFX + Say Y here if you have the TurboGraFX interface by Steffen Schwenke, + and want to use it with Multiststem -- Atari, Amiga, Commodore, + Amstrad CPC joystick. For more information on how to use the driver + please read Documentation/joystick-parport.txt and + Documentation/joystick-parport.txt + +Amiga joysticks +CONFIG_JOY_AMIGA + Say Y here if you have an Amiga with a digital joystick connected + to it. For more information on how to use the driver please read + Documentation/joystick.txt + Atomwide Serial Support CONFIG_ATOMWIDE_SERIAL If you have an Atomwide Serial card for an Acorn system, say Y to - this option. The driver can handle 1, 2, or 3 port cards. + this option. The driver can handle 1, 2, or 3 port cards. If unsure, say N The Serial Port Dual Serial Port CONFIG_DUALSP_SERIAL If you have the Serial Port's dual serial card for an Acorn system, - say Y to this option. If unsure, say N + say Y to this option. If unsure, say N Sound card support CONFIG_SOUND @@ -8053,7 +8591,7 @@ CONFIG_SOUND from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. There is also some information in various README files in drivers/sound, esp. in Readme.cards which you should read first to find out whether your - card is supported by Linux. + card is supported by Linux, and, if yes, which driver to use. If you have a PnP sound card and you want to configure it at boot time using the ISA PnP tools (read @@ -8068,20 +8606,33 @@ CONFIG_SOUND I'm told that even without a sound card, you can make your computer say more than an occasional beep, by programming the PC speaker. - Kernel patches and programs to do that are in the pcsndrv package on - ftp://sunsite.unc.edu/pub/Linux/kernel/patches/console/ and in the - pcsp patch at ftp://dwmw2.robinson.cam.ac.uk/pub/kernel/ . - + Kernel patches and supporting utilities to do that are in the pcsp + package, available at http://www.imladris.demon.co.uk/pcsp/. + +OSS sound modules +CONFIG_SOUND_OSS + OSS is the Open Sound System suite of sound card drivers. They make + sound programming easier since they provide a common API. Say Y or M + here (the module will be called sound.o) if you haven't found a + driver for your sound card above, then pick your driver from the + list below. + Support for Aztech Sound Galaxy (non-PnP) cards CONFIG_SOUND_SGALAXY - This module initializes the older non Plug and Play sound galaxy cards - from Aztech. It supports the Waverider Pro 32 - 3D and the Galaxy - Washington 16. + This module initializes the older non Plug and Play sound galaxy + cards from Aztech. It supports the Waverider Pro 32 - 3D and the + Galaxy Washington 16. + +Yamaha OPL3-SA1 audio controller +CONFIG_SOUND_OPL3SA1 + Say Y or M if you have a Yamaha OPL3-SA1 sound chip, which is + usually built into motherboards. Read Documentation/sound/OPL3-SA + for details. ProAudioSpectrum 16 support CONFIG_SOUND_PAS Answer Y only if you have a Pro Audio Spectrum 16, ProAudio Studio - 16 or Logitech SoundMan 16 sound card. Don't answer Y if you have + 16 or Logitech SoundMan 16 sound card. Don't answer Y if you have some other card made by Media Vision or Logitech since they are not PAS16 compatible. @@ -8095,11 +8646,17 @@ CONFIG_SOUND_SB an unknown card you may answer Y if the card claims to be Sound Blaster-compatible. - Please read Documentation/sound/Soundblaster. + You can say M here to compile this driver as a module; the module is + called sb.o. - If you have an SB AWE 32 or SB AWE 64, say - Y here and to "Additional lowlevel drivers" and to "SB32/AWE - support" below. + You should also say Y here for cards based on the Avance Logic + ALS-007 chip (read Documentation/sound/ALS007) and for ESS1688 and + ESS1868 cards (read Documentation/sound/ESS1868). If you have an SB + AWE 32 or SB AWE 64, say Y here and also to "Additional lowlevel + drivers" and to "SB32/AWE support" below. If you have an IBM Mwave + card, say Y here and read Documentation/sound/mwave. + + Please read Documentation/sound/Soundblaster. Generic OPL2/OPL3 FM synthesizer support CONFIG_SOUND_ADLIB @@ -8107,7 +8664,13 @@ CONFIG_SOUND_ADLIB Answering Y is usually a safe and recommended choice, however some cards may have software (TSR) FM emulation. Enabling FM support with these cards may cause trouble (I don't currently know of any such - cards, however). If unsure, say Y. + cards, however). + + Please read the file Documentation/sound/OPL3 if your card has an + OPL3 chip. + + If unsure, say Y. + #Loopback MIDI device support #CONFIG_SOUND_VMIDI @@ -8132,37 +8695,51 @@ CONFIG_SOUND_MPU401 instructions in the drivers/sound/Readme.cards file. It's safe to answer Y if you have a true MPU401 MIDI interface card. -6850 UART Midi support +6850 UART support CONFIG_SOUND_UART6850 This option enables support for MIDI interfaces based on the 6850 - UART chip. This interface is rarely found on sound cards. It's safe + UART chip. This interface is rarely found on sound cards. It's safe to answer N to this question. +VIDC Sound +CONFIG_VIDC_SOUND + Say Y here for ARM systems with the VIDC video controller and 16-bit + Linear sound DACs. If unsure, say N. + PSS (AD1848, ADSP-2115, ESC614) support CONFIG_SOUND_PSS - Answer Y only if you have Orchid SW32, Cardinal DSP16 or some other - card based on the PSS chipset (AD1848 codec + ADSP-2115 DSP chip + - Echo ESC614 ASIC CHIP). + Answer Y or M if you have an Orchid SW32, Cardinal DSP16, Beethoven + ADSP-16 or some other card based on the PSS chipset (AD1848 codec + + ADSP-2115 DSP chip + Echo ESC614 ASIC CHIP). For more information on + how to compile it into the kernel or as a module see the file + Documentation/sound/PSS. + +Enable PSS mixer (Beethoven ADSP-16 and other compatible) +CONFIG_PSS_MIXER + Answer Y for Beethoven ADSP-16. You may try to say Y also for other + cards if they have master volume, bass, treble, and you can't + control it under Linux. If you answer N for Beethoven ADSP-16, you + can't control master volume, bass, treble and synth volume. + + If you said M to "PSS support" above, you may enable or disable this + PSS mixer with the module parameter pss_mixer. For more information + see the file Documentation/sound/PSS. -#Enable PSS mixer (Beethoven ADSP-16 and other compatible) -#CONFIG_PSS_MIXER -### -### Don't know what this is -### -# Have DSPxxx.LD firmware file CONFIG_PSS_HAVE_BOOT - If you want to emulate the Sound Blaster card and you have a DSPxxx.LD - file, then answer Y here to include this file. + If you have the DSPxxx.LD file or SYNTH.LD file for you card, say Y + to include this file. Without this file the synth device (OPL) may + not work. Full pathname of DSPxxx.LD firmware file CONFIG_PSS_BOOT_FILE - Enter the full pathname of your DSPxxx.LD file, starting from /. + Enter the full pathname of your DSPxxx.LD file or SYNTH.LD file, + starting from /. 16 bit sampling option of GUS (_NOT_ GUS MAX) CONFIG_SOUND_GUS16 Answer Y if you have installed the 16 bit sampling daughtercard on - your GUS. Answer N if you have a GUS MAX, since saying Y here + your GUS. Answer N if you have a GUS MAX, since saying Y here disables GUS MAX support. GUS MAX support @@ -8171,10 +8748,10 @@ CONFIG_SOUND_GUSMAX Microsoft Sound System support CONFIG_SOUND_MSS - Again think carefully before answering Y to this question. It's - safe to answer Y if you have the original Windows Sound System card - made by Microsoft or Aztech SG 16 Pro (or NX16 Pro). Also you may - answer Y in case your card is NOT among these: + Again think carefully before answering Y to this question. It's safe + to answer Y if you have the original Windows Sound System card made + by Microsoft or Aztech SG 16 Pro (or NX16 Pro). Also you may say Y + in case your card is NOT among these: ATI Stereo F/X, AdLib, Audio Excell DSP16, Cardinal DSP16, Ensoniq SoundScape (and compatibles made by Reveal and Spea), @@ -8226,32 +8803,48 @@ CONFIG_SOUND_MAD16 quite common so it's possible that many no-name cards have one of them. In addition the MAD16 chip is used in some cards made by known manufacturers such as Turtle Beach (Tropez), Reveal (some models) - and Diamond (latest ones). See also Documentation/sound/Opti for + and Diamond (latest ones). Note however that the Tropez sound cards + have their own driver; if you have one of those, say N here and Y or + M to "Full support for Turtle Beach WaveFront", below. + + See also Documentation/sound/Opti and Documentation/sound/MAD16 for more information on setting these cards up as modules. +Full support for Turtle Beach WaveFront synth/sound cards +CONFIG_SOUND_WAVEFRONT + Answer Y or M if you have a Tropez Plus, Tropez or Maui sound card + and read the files Documentation/sound/Wavefront and + Documentation/sound/Tropez+. + Support MIDI in older MAD16 based cards (requires SB) CONFIG_MAD16_OLDCARD - Answer Y (or M) if you have an older card based on the C928 - or Mozart chipset and you want to have MIDI support. If you - enable this option you also need to enable support for Sound Blaster. + Answer Y (or M) if you have an older card based on the C928 or + Mozart chipset and you want to have MIDI support. If you enable this + option you also need to enable support for Sound Blaster. Support for Crystal CS4232 based (PnP) cards CONFIG_SOUND_CS4232 Say Y here if you have a card based on the Crystal CS4232 chip set, - which uses its own Plug and Play protocol. See - Documentation/sound/CS4232 for more information on configuring this - card. + which uses its own Plug and Play protocol. + + See Documentation/sound/CS4232 for more information on configuring + this card. + +Support for Yamaha OPL3-SA[2,3,x] based (PnP) cards +CONFIG_SOUND_OPL3SA2 + Say Y or M here if you have such a sound card. Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers CONFIG_SOUND_MAUI - Say Y here if you have a Turtle Beach Wave Front, Maui, or - Tropez sound card. + Say Y here if you have a Turtle Beach Wave Front, Maui, or Tropez + sound card. Have OSWF.MOT firmware file CONFIG_MAUI_HAVE_BOOT - Turtle Beach Maui and Tropez sound cards have a microcontroller which - needs to be initialized prior to use. OSWF.MOT is a file distributed - with the card's DOS/Windows drivers. Answer Y if you have this file. + Turtle Beach Maui and Tropez sound cards have a microcontroller + which needs to be initialized prior to use. OSWF.MOT is a file + distributed with the card's DOS/Windows drivers. Answer Y if you + have this file. Full pathname of OSWF.MOT firmware file CONFIG_MAUI_BOOT_FILE @@ -8260,22 +8853,23 @@ CONFIG_MAUI_BOOT_FILE Support for Turtle Beach MultiSound Classic, Tahiti, Monterey CONFIG_SOUND_MSNDCLAS Say M here if you have a Turtle Beach MultiSound Classic, Tahiti or - Monterey (not for the Pinnacle or Fiji). See - Documentation/sound/MultiSound for important information about this - driver. + Monterey (not for the Pinnacle or Fiji). + + See Documentation/sound/MultiSound for important information about + this driver. Full pathname of MSNDINIT.BIN firmware file CONFIG_MSNDCLAS_INIT_FILE The MultiSound cards have two firmware files which are required for - operation, and are not currently included. These files can be - obtained from Turtle Beach. See Documentation/sound/MultiSound for + operation, and are not currently included. These files can be + obtained from Turtle Beach. See Documentation/sound/MultiSound for information on how to obtain this. Full pathname of MSNDPERM.BIN firmware file CONFIG_MSNDCLAS_PERM_FILE The MultiSound cards have two firmware files which are required for - operation, and are not currently included. These files can be - obtained from Turtle Beach. See Documentation/sound/MultiSound for + operation, and are not currently included. These files can be + obtained from Turtle Beach. See Documentation/sound/MultiSound for information on how to obtain this. Support for Turtle Beach MultiSound Pinnacle, Fiji @@ -8287,46 +8881,61 @@ CONFIG_SOUND_MSNDPIN Full pathname of PNDSPINI.BIN firmware file CONFIG_MSNDPIN_INIT_FILE The MultiSound cards have two firmware files which are required for - operation, and are not currently included. These files can be - obtained from Turtle Beach. See Documentation/sound/MultiSound for + operation, and are not currently included. These files can be + obtained from Turtle Beach. See Documentation/sound/MultiSound for information on how to obtain this. Full pathname of PNDSPERM.BIN firmware file CONFIG_MSNDPIN_PERM_FILE The MultiSound cards have two firmware files which are required for - operation, and are not currently included. These files can be - obtained from Turtle Beach. See Documentation/sound/MultiSound for + operation, and are not currently included. These files can be + obtained from Turtle Beach. See Documentation/sound/MultiSound for information on how to obtain this. -MSND Pinnacle Non-PnP Mode +MSND Pinnacle have S/PDIF I/O +CONFIG_MSNDPIN_DIGITAL + If you have the S/PDIF daughter board for the Pinnacle or Fiji, + answer Y here; otherwise, say N. If you have this, you will be able + to play and record from the S/PDIF port (digital signal). See + Documentation/sound/MultiSound for information on how to make use of + this capability. + +MSND Pinnacle non-PnP Mode CONFIG_MSNDPIN_NONPNP The Pinnacle and Fiji card resources can be configured either with - PnP, or through a configuration port. For the Pinnacle, - configuration in non-PnP mode allows use of the IDE and joystick - peripherals on the card as well, since they do not show up when the - card is in PnP mode. Specifying zero for any resource of a device - will disable the device. If you are running the card in PnP mode, - you must say N here and use isapnptools to configure the card's - resources. - -MSND Pinnacle Config Port + PnP, or through a configuration port. Say Y here if your card is NOT + in PnP mode. For the Pinnacle, configuration in non-PnP mode allows + use of the IDE and joystick peripherals on the card as well; these + do not show up when the card is in PnP mode. Specifying zero for any + resource of a device will disable the device. If you are running the + card in PnP mode, you must say N here and use isapnptools to + configure the card's resources. + +MSND Pinnacle config port CONFIG_MSNDPIN_CFG - This is the port which the Pinnacle and Fiji uses to configure - the card's resources when not in PnP mode. If your card is in - PnP mode, then be sure to say N to the previous option, - CONFIG_MSNDPIN_NONPNP. + This is the port which the Pinnacle and Fiji uses to configure the + card's resources when not in PnP mode. If your card is in PnP mode, + then be sure to say N to the previous option, "MSND Pinnacle Non-PnP + Mode". + +MSND buffer size (kB) +CONFIG_MSND_FIFOSIZE + Configures the size of each audio buffer, in kilobytes, for + recording and playing in the MultiSound drivers (both the Classic + and Pinnacle). Larger values reduce the chance of data overruns at + the expense of overall latency. If unsure, use the default. /dev/dsp and /dev/audio support CONFIG_SOUND_AUDIO - Answering N disables /dev/dsp and /dev/audio, the A/D and D/A - converter devices. Answer N only if you know you will not need - the option. They are usually required. Answer Y. + If you say Y here, you will get the /dev/dsp and /dev/audio devices; + these are the analog-digital and digital-analog converter devices + and are very useful, so say Y. MIDI interface support CONFIG_SOUND_MIDI Answering N disables /dev/midixx devices and access to any MIDI ports using /dev/sequencer and /dev/music. This option also affects - any MPU401 and/or General MIDI compatible devices. Answer Y. + any MPU401 and/or General MIDI compatible devices. Answer Y. FM synthesizer (YM3812/OPL-3) support CONFIG_SOUND_YM3812 @@ -8346,14 +8955,14 @@ CONFIG_LOWLEVEL_SOUND ACI mixer (miroPCM12) CONFIG_ACI_MIXER - Audio Command Interface (ACI) driver. ACI is a protocol used to - communicate with the microcontroller on some sound cards produced - by miro, e.g. the miroSOUND PCM12 and PCM20. The main function - of the ACI is to control the mixer and to get a product - identification. This Voxware ACI driver currently only supports - the ACI functions on the miroSOUND PCM12 card. On the PCM20, ACI - also controls the radio tuner on this card, however this is not - yet supported in this software. + Audio Command Interface (ACI) driver. ACI is a protocol used to + communicate with the microcontroller on some sound cards produced by + miro, e.g. the miroSOUND PCM12 and PCM20. The main function of the + ACI is to control the mixer and to get a product identification. + This Voxware ACI driver currently only supports the ACI functions on + the miroSOUND PCM12 card. On the PCM20, ACI also controls the radio + tuner on this card, however this is not yet supported in this + software. SB32/AWE support CONFIG_AWE32_SYNTH @@ -8365,18 +8974,22 @@ CONFIG_AWE32_SYNTH Gallant's Audio Excel DSP 16 support (SC-6000 and SC-6600) CONFIG_AEDSP16 - Answer Y if you have a Gallant's Audio Excel DSP 16 card. This card - can emulate either an SBPro or a Microsoft Sound System card, so you - should have said Y to either "Sound Blaster (SB, SBPro, SB16, clones) - support" or "Microsoft Sound System support", above, and you need to - answer the "MSS emulation" and "SBPro emulation" questions below + Answer Y if you have a Gallant's Audio Excel DSP 16 card. This + driver supports Audio Excel DSP 16 but not the III nor PnP versions + of this card. + + The Gallant's Audio Excel DSP 16 card can emulate either an SBPro or + a Microsoft Sound System card, so you should have said Y to either + "100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support" + or "Microsoft Sound System support", above, and you need to answer + the "MSS emulation" and "SBPro emulation" questions below accordingly. You should say Y to one and only one of these two - questions. Read the drivers/sound/lowlevel/README.aedsp16 file and - the head of drivers/sound/lowlevel/aedsp16.c to get more information - about this driver and its configuration. This driver supports Audio - Excel DSP 16 but not the III nor PnP versions of this card. Read - drivers/sound/lowlevel/README.aedsp16 if you want to know something - more on how to use the III version with this sound driver. + questions. + + Read the drivers/sound/lowlevel/README.aedsp16 file and the head of + drivers/sound/lowlevel/aedsp16.c as well as + Documentation/sound/AudioExcelDSP16 to get more information about + this driver and its configuration. SC-6600 based audio cards (new Audio Excel DSP 16) CONFIG_SC6600 @@ -8387,14 +9000,15 @@ CONFIG_SC6600 Audio Excel DSP 16 (MSS emulation) CONFIG_AEDSP16_MSS Answer Y if you want your audio card to emulate Microsoft Sound - System. You should then say Y to "Microsoft Sound System support" + System. You should then say Y to "Microsoft Sound System support" and say N to "Audio Excel DSP 16 (SBPro emulation)". Audio Excel DSP 16 (SBPro emulation) CONFIG_AEDSP16_SBPRO Answer Y if you want your audio card to emulate Sound Blaster Pro. - You should then say Y to "Sound Blaster (SB, SBPro, SB16, clones) - support" and N to "Audio Excel DSP 16 (MSS emulation)". + You should then say Y to "100% Sound Blaster compatibles + (SB16/32/64, ESS, Jazz16) support" and N to "Audio Excel DSP 16 (MSS + emulation)". Ensoniq ES1370 based PCI sound cards CONFIG_SOUND_ES1370 @@ -8407,6 +9021,10 @@ CONFIG_SOUND_ES1370 This driver differs slightly from OSS/Free, so PLEASE READ Documentation/sound/es1370. +Joystick support at boot time +CONFIG_SOUND_ES1370_JOYPORT_BOOT + Say Y here to use the joystick port of your sound card. + Ensoniq ES1371 based PCI sound cards CONFIG_SOUND_ES1371 Say Y or M if you have a PCI sound card utilizing the Ensoniq @@ -8426,15 +9044,34 @@ CONFIG_SOUND_SONICVIBES differs slightly from OSS/Free, so PLEASE READ Documentation/sound/sonicvibes. +Are you using a crosscompiler +CONFIG_CROSSCOMPILE + Say Y here if you are compiling the kernel on a different + architecture than the one it is intended to run on. + +Build fp exception handler module +CONFIG_MIPS_FPE_MODULE + Build the floating point exception handler module. This option is + only useful for people working on the floating point exception + handler. If you don't, say N. + +Remote GDB kernel debugging +CONFIG_REMOTE_DEBUG + If you say Y here, it will be possible to remotely debug the MIPS + kernel using gdb. This enlarges your kernel image disk size by + several megabytes and requires a machine with more than 16 MB, + better 32 MB RAM to avoid excessive linking time. This is only + useful for kernel hackers. If unsure, say N. + Magic System Request Key support CONFIG_MAGIC_SYSRQ If you say Y here, you will have some control over the system even if the system crashes for example during kernel debugging (e.g., you - will be able to flush the disks, reboot the system immediately or - dump some status information). This is accomplished by pressing - various keys while holding SysRq (Alt+PrintScreen). The keys are - documented in Documentation/sysrq.txt. Don't say Y unless you really - know what this hack does. + will be able to flush the buffer cache to disk, reboot the system + immediately or dump some status information). This is accomplished + by pressing various keys while holding SysRq (Alt+PrintScreen). The + keys are documented in Documentation/sysrq.txt. Don't say Y unless + you really know what this hack does. ISDN subsystem CONFIG_ISDN @@ -8445,10 +9082,10 @@ CONFIG_ISDN modem/telephone connections, and that you can have voice conversations while downloading stuff. It only works if your computer is equipped with an ISDN card and both you and your service - provider purchased an ISDN line from the phone company. For - details, read http://alumni.caltech.edu/~dank/isdn/ on the WWW. (To - browse the WWW, you need to have access to a machine on the Internet - that has a program like lynx or netscape.) + provider purchased an ISDN line from the phone company. For details, + read http://alumni.caltech.edu/~dank/isdn/ on the WWW. (To browse + the WWW, you need to have access to a machine on the Internet that + has a program like lynx or netscape.) This driver allows you to use an ISDN-card for networking connections and as dialin/out device. The isdn-tty's have a built in @@ -8511,7 +9148,7 @@ CONFIG_ISDN_DRV_ICN line with two B-channels, 4B supports two ISDN lines. For running this card, additional firmware is necessary, which has to be downloaded into the card using a utility which is distributed - separately. See Documentation/isdn/README and README.icn for more + separately. See Documentation/isdn/README and README.icn for more information. If you want to compile this as a module ( = code which can be @@ -8548,104 +9185,116 @@ CONFIG_ISDN_DRV_HISAX HiSax Support for Teles 16.0/8.0 CONFIG_HISAX_16_0 - This enables HiSax support for the Teles ISDN-cards S0-16.0, - S0-8 and many compatibles. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port/shmem settings. + This enables HiSax support for the Teles ISDN-cards S0-16.0, S0-8 + and many compatibles. + + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port/shmem settings. HiSax Support for Teles 16.3 or PNP or PCMCIA CONFIG_HISAX_16_3 - This enables HiSax support for the Teles ISDN-cards S0-16.3 - the Teles/Creatix PnP and the Teles PCMCIA. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + This enables HiSax support for the Teles ISDN-cards S0-16.3 the + Teles/Creatix PnP and the Teles PCMCIA. + + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for Teles 16.3c CONFIG_HISAX_TELES3C This enables HiSax support for the Teles ISDN-cards 16.3c. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for AVM A1 (Fritz) CONFIG_HISAX_AVM_A1 This enables HiSax support for the AVM A1 (aka "Fritz"). - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for Elsa ISA cards CONFIG_HISAX_ELSA - This enables HiSax support for the Elsa Mircolink ISA cards, - for the Elsa Quickstep series cards and Elsa PCMCIA. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + This enables HiSax support for the Elsa Mircolink ISA cards, for the + Elsa Quickstep series cards and Elsa PCMCIA. + + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for ITK ix1-micro Revision 2 CONFIG_HISAX_IX1MICROR2 This enables HiSax support for the ITK ix1-micro Revision 2 card. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for Eicon.Diehl Diva cards CONFIG_HISAX_DIEHLDIVA - This enables HiSax support for the Eicon.Diehl Diva none PRO versions - passive ISDN cards. + This enables HiSax support for the Eicon.Diehl Diva none PRO + versions passive ISDN cards. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for ASUSCOM cards CONFIG_HISAX_ASUSCOM This enables HiSax support for the AsusCom and their OEM versions passive ISDN cards. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for TELEINT cards CONFIG_HISAX_TELEINT This enables HiSax support for the TELEINT SA1 semiactiv ISDN card. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for Sedlbauer speed card/win-star CONFIG_HISAX_SEDLBAUER This enables HiSax support for the Sedlbauer passive ISDN cards. - See Documentation/isdn/README.HiSax on how to configure it - using the different cards, a different D-channel protocol, or - non-standard IRQ/port settings. + + See Documentation/isdn/README.HiSax on how to configure it using the + different cards, a different D-channel protocol, or non-standard + IRQ/port settings. HiSax Support for USR Sportster internal TA CONFIG_HISAX_SPORTSTER This enables HiSax support for the USR Sportster internal TA card. + See Documentation/isdn/README.HiSax on how to configure it using a different D-channel protocol, or non-standard IRQ/port settings. HiSax Support for MIC card CONFIG_HISAX_MIC - This enables HiSax support for the ITH MIC card. See - Documentation/isdn/README.HiSax on how to configure it using a + This enables HiSax support for the ITH MIC card. + + See Documentation/isdn/README.HiSax on how to configure it using a different D-channel protocol, or non-standard IRQ/port settings. HiSax Support for NETjet card CONFIG_HISAX_NETJET This enables HiSax support for the NetJet from Traverse - Technologies. See Documentation/isdn/README.HiSax on how to - configure it using a different D-channel protocol, or non-standard - IRQ/port settings. + Technologies. + + See Documentation/isdn/README.HiSax on how to configure it using a + different D-channel protocol, or non-standard IRQ/port settings. HiSax Support for Niccy PnP/PCI card CONFIG_HISAX_NICCY - This enables HiSax support for the Dr. Neuhaus Niccy PnP or PCI. See - Documentation/isdn/README.HiSax on how to configure it using a + This enables HiSax support for the Dr. Neuhaus Niccy PnP or PCI. + + See Documentation/isdn/README.HiSax on how to configure it using a different D-channel protocol, or non-standard IRQ/port settings. HiSax Support for Am7930 (EXPERIMENTAL) @@ -8666,10 +9315,10 @@ Support for German tariff info CONFIG_DE_AOC If you want that the HiSax hardware driver sends messages to the upper level of the isdn code on each AOCD (Advice Of Charge, During - the call - transmission of the fee information during a call) and on - each AOCE (Advice Of Charge, at the End of the call - transmission - of fee information at the end of the call), say Y here. This works - only in Germany. + the call -- transmission of the fee information during a call) and + on each AOCE (Advice Of Charge, at the End of the call -- + transmission of fee information at the end of the call), say Y here. + This works only in Germany. Support for Australian Microlink service (not for std. EURO) CONFIG_HISAX_ML @@ -8698,7 +9347,7 @@ CONFIG_ISDN_DRV_PCBIT This enables support for the PCBIT ISDN-card. This card is manufactured in Portugal by Octal. For running this card, additional firmware is necessary, which has to be downloaded into the card - using a utility which is distributed separately. See + using a utility which is distributed separately. See Documentation/isdn/README and Documentation/isdn/README.pcbit for more information. @@ -8713,7 +9362,7 @@ CONFIG_ISDN_DRV_SC driver currently builds only in a modularized version ( = code which can be inserted in and removed from the running kernel whenever you want, details in Documentation/modules.txt); the module will be - called sc.o. See Documentation/isdn/README.sc and + called sc.o. See Documentation/isdn/README.sc and http://www.spellcast.com for more information (to browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape). @@ -8728,7 +9377,7 @@ CONFIG_ISDN_DRV_AVMB1 interface for this card is provided. In order to use this card, additional firmware is necessary, which has to be downloaded into the card using a utility which is distributed separately. Please - read the file Documentation/isdn/README.avmb1. + read the file Documentation/isdn/README.avmb1. This code is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -8738,16 +9387,16 @@ CONFIG_ISDN_DRV_AVMB1 Verbose reason code reporting (kernel size +=7K) CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON If you say Y here, the AVM B1 driver will give verbose reasons for - disconnecting. This will increase the size of the kernel by 7K. If + disconnecting. This will increase the size of the kernel by 7 KB. If unsure, say Y. IBM Active 2000 support (EXPERIMENTAL) CONFIG_ISDN_DRV_ACT2000 Say Y here if you have an IBM Active 2000 ISDN card. In order to use this card, additional firmware is necessary, which has to be loaded - into the card using a utility which is part of the latest isdn4k-utils - package. Please read the file Documentation/isdn/README.act2000 for - more information. + into the card using a utility which is part of the latest + isdn4k-utils package. Please read the file + Documentation/isdn/README.act2000 for more information. Support for AP1000 multicomputer CONFIG_AP1000 @@ -8759,9 +9408,9 @@ CONFIG_AP1000 Support for Sun4 architecture CONFIG_SUN4 - Use this option if, and only if, your machine is sun4. Note that - kernel compiled with this option will run on sun4 only. - (And in current version, it will probably work on sun4/330, only.) + Say Y here if, and only if, your machine is a Sun4. Note that + a kernel compiled with this option will run only on Sun4. + (And the current version will probably work only on sun4/330.) SPARC ESP SCSI support CONFIG_SCSI_SUNESP @@ -8786,27 +9435,28 @@ CONFIG_SUN_OPENPROMIO ### ### Please someone fill these in. ### + # # m68k-specific kernel options # Documented by Chris Lawrence <quango@themall.net> et al. # Amiga support CONFIG_AMIGA - This option enables support for the Amiga series of computers. If + This option enables support for the Amiga series of computers. If you plan to use this kernel on an Amiga, say Y here and browse the material available in Documentation/m68k; otherwise say N. Atari support CONFIG_ATARI This option enables support for the 68000-based Atari series of - computers (including the TT, Falcon and Medusa). If you plan to use + computers (including the TT, Falcon and Medusa). If you plan to use this kernel on an Atari, say Y here and browse the material available in Documentation/m68k; otherwise say N. Hades support CONFIG_HADES - This option enables support for the Hades Atari clone. If you plan to - use this kernel on a Hades, say Y here; otherwise say N. + This option enables support for the Hades Atari clone. If you plan + to use this kernel on a Hades, say Y here; otherwise say N. Macintosh support CONFIG_MAC @@ -8822,69 +9472,69 @@ CONFIG_MAC 68020 support CONFIG_M68020 If you anticipate running this kernel on a computer with a MC68020 - processor, say Y. Otherwise, say N. Note that the 68020 requires a - 68851 MMU (= memory management unit) to run Linux/m68k. + processor, say Y. Otherwise, say N. Note that the 68020 requires a + 68851 MMU (Memory Management Unit) to run Linux/m68k. 68030 support CONFIG_M68030 If you anticipate running this kernel on a computer with a MC68030 - processor, say Y. Otherwise, say N. Note that a MC68EC030 will not - work, as it does not include an MMU (= memory management unit). + processor, say Y. Otherwise, say N. Note that a MC68EC030 will not + work, as it does not include an MMU (Memory Management Unit). 68040 support CONFIG_M68040 If you anticipate running this kernel on a computer with a MC68LC040 - or MC68040 processor, say Y. Otherwise, say N. Note that an - MC68EC040 will not work, as it does not include an MMU (= memory - management unit). + or MC68040 processor, say Y. Otherwise, say N. Note that an + MC68EC040 will not work, as it does not include an MMU (Memory + Management Unit). Use -m68040 flag for 68040 specific optimizations CONFIG_OPTIMIZE_040 If you will only be running this kernel on a 68040-series processor, - this will make the kernel run somewhat faster. However, it will no + this will make the kernel run somewhat faster. However, it will no longer run on a 68020 or 68030, no matter whether you included 68020 - and 68030 support or not. Say N unless the only processor you are + and 68030 support or not. Say N unless the only processor you are compiling support for is the 68040 (or 68LC040). 68060 support CONFIG_M68060 If you anticipate running this kernel on a computer with a MC68060 - processor, say Y. Otherwise, say N. + processor, say Y. Otherwise, say N. Use -m68060 flag for 68060 specific optimizations CONFIG_OPTIMIZE_060 If you will only be running this kernel on a 68060-series processor, - this will make the kernel run somewhat faster. However, it will no + this will make the kernel run somewhat faster. However, it will no longer run on a 68020, 68030 or 68040, no matter whether you - included support for those processors or not. Say N unless the only + included support for those processors or not. Say N unless the only processor you are compiling support for is the 68060. Advanced processor options CONFIG_ADVANCED_CPU - This gives you access to some advanced options for the CPU. The + This gives you access to some advanced options for the CPU. The defaults should be fine for most users, but these options may make it possible for you to improve performance somewhat if you know what - you are doing. Most users should say N to this question. + you are doing. Most users should say N to this question. Use read-modify-write instructions CONFIG_RMW_INSNS This allows to use certain instructions that work with indivisible read-modify-write bus cycles. While this is faster than the - workaround of disabling interrupts, it can conflict with DMA (= - direct memory access) on many Amiga systems, and it is also said to - destabilize other machines. It is very likely that this will cause - serious problems on any Amiga or Atari Medusa if set. The only + workaround of disabling interrupts, it can conflict with DMA + ( = direct memory access) on many Amiga systems, and it is also said + to destabilize other machines. It is very likely that this will + cause serious problems on any Amiga or Atari Medusa if set. The only configuration where it should work are 68030-based Ataris, where it apparently improves performance. But you've been warned! Unless you - really know what you are doing, say N. Try Y only if you're - quite adventurous. + really know what you are doing, say N. Try Y only if you're quite + adventurous. Amiga AutoConfig Identification CONFIG_ZORRO This enables support for automatic identification of Amiga expansion cards that obey the AutoConfig(tm) specification. Say Y if you want your expansion cards to be identified on bootup; - it will enlarge your kernel by about 10KB. The identification + it will enlarge your kernel by about 10 KB. The identification information is also available through /proc/zorro (say Y to "/proc filesystem support"!). @@ -8894,13 +9544,13 @@ CONFIG_ZORRO Amiga OCS chipset support CONFIG_AMIFB_OCS This enables support for the original Agnus and Denise video chips, - found in the Amiga 1000 and most A500's and A2000's. If you intend + found in the Amiga 1000 and most A500's and A2000's. If you intend to run Linux on any of these systems, say Y; otherwise say N. Amiga ECS chipset support CONFIG_AMIFB_ECS This enables support for the Enhanced Chip Set, found in later - A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If + A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If you intend to run Linux on any of these systems, say Y; otherwise say N. @@ -8908,50 +9558,41 @@ Amiga AGA chipset support CONFIG_AMIFB_AGA This enables support for the Advanced Graphics Architecture (also known as the AGA or AA) Chip Set, found in the A1200, A4000, A4000T - and CD32. If you intend to run Linux on any of these systems, say Y; + and CD32. If you intend to run Linux on any of these systems, say Y; otherwise say N. -Amiga Cybervision support -CONFIG_FB_CYBER - This enables support for the Cybervision 64 graphics card from Phase5. - Please note that its use is not all that intuitive (i.e. if you have - any questions, be sure to ask!). Say N unless you have a Cybervision - 64 or plan to get one before you next recompile the kernel. - Please note that this driver DOES NOT support the Cybervision 64 3D - card at present, as they use incompatible video chips. - Amiga GSP (TMS340x0) support CONFIG_AMIGA_GSP Include support for Amiga graphics cards that use the Texas - Instruments TMS340x0 GSP (= graphics signal processor) chips. Say Y + Instruments TMS340x0 GSP (Graphics Signal Processor) chips. Say Y if you want to use a DMI Resolver or Commodore A2410 (Lowell) graphics card on an Amiga; otherwise, say N. DMI Resolver support CONFIG_GSP_RESOLVER - Include support in the kernel for the DMI Resolver graphics card. If + Include support in the kernel for the DMI Resolver graphics card. If you have one, say Y; otherwise, say N. A2410 support CONFIG_GSP_A2410 Include support in the kernel for the Commodore/University of Lowell - A2410 graphics card. If you have one, say Y; otherwise, say N. + A2410 graphics card. If you have one, say Y; otherwise, say N. Amiga Zorro II ramdisk support CONFIG_AMIGA_Z2RAM This enables support for using Chip RAM and Zorro II RAM as a - ramdisk or as a swap partition. Say Y if you want to include this - driver in the kernel. This driver is also available as a module ( = - code which can be inserted in and removed from the running kernel - whenever you want). The module is called z2ram.o. If you want to - compile it as a module, say M here and read + ramdisk or as a swap partition. Say Y if you want to include this + driver in the kernel. This driver is also available as a module + ( = code which can be inserted in and removed from the running + kernel whenever you want). The module is called z2ram.o. If you want + to compile it as a module, say M here and read Documentation/modules.txt. Atari ST-RAM swap support CONFIG_STRAM_SWAP This enables support for using (parts of) ST-RAM as swap space, instead of as normal system memory. This can first enhance system - performace if you have lots of alternate RAM (compared to the size + performance if you have lots of alternate RAM (compared to the size of ST-RAM), because executable code always will reside in faster memory. ST-RAM will remain as ultra-fast swap space. On the other hand, it allows much improved dynamic allocations of ST-RAM buffers @@ -8990,13 +9631,13 @@ CONFIG_ATARI_SLM it in the kernel. Otherwise, say N. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called - acsi_slm.o. Be warned: the driver needs much ST-RAM and can cause + acsi_slm.o. Be warned: the driver needs much ST-RAM and can cause problems due to that fact! A3000 WD33C93A support CONFIG_A3000_SCSI If you have an Amiga 3000 and have SCSI devices connected to the - built-in SCSI controller, say Y. Otherwise, say N. This driver is + built-in SCSI controller, say Y. Otherwise, say N. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module is called wd33c93.o. If you want to compile it as a module, say M here @@ -9004,19 +9645,19 @@ CONFIG_A3000_SCSI A2091 WD33C93A support CONFIG_A2091_SCSI - If you have a Commodore A2091 SCSI controller, say Y. Otherwise, - say N. This driver is also available as a module ( = code which can + If you have a Commodore A2091 SCSI controller, say Y. Otherwise, + say N. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module is called wd33c93.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. GVP Series II WD33C93A support CONFIG_GVP11_SCSI - If you have a Great Valley Products Series II SCSI controller, say - Y. Also say Y if you have a later model of GVP SCSI controller - (such as the GVP A4008 or a Combo board). Otherwise, say N. - This driver does NOT work for the T-Rex series of accelerators from - TekMagic and GVP-M. + If you have a Great Valley Products Series II SCSI controller, + answer Y. Also say Y if you have a later model of GVP SCSI + controller (such as the GVP A4008 or a Combo board). Otherwise, + answer N. This driver does NOT work for the T-Rex series of + accelerators from TekMagic and GVP-M. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you @@ -9026,30 +9667,36 @@ CONFIG_GVP11_SCSI Cyberstorm SCSI support CONFIG_CYBERSTORM_SCSI If you have an Amiga with an original (MkI) Phase5 Cyberstorm - accelerator board and the optional Cyberstorm SCSI controller, say - Y. Otherwise, say N. + accelerator board and the optional Cyberstorm SCSI controller, + answer Y. Otherwise, say N. Cyberstorm II SCSI support CONFIG_CYBERSTORMII_SCSI If you have an Amiga with a Phase5 Cyberstorm MkII accelerator board - and the optional Cyberstorm SCSI controller, say Y. Otherwise, say N. + and the optional Cyberstorm SCSI controller, say Y. Otherwise, + answer N. Blizzard 2060 SCSI support CONFIG_BLZ2060_SCSI If you have an Amiga with a Phase5 Blizzard 2060 accelerator board - and want to use the onboard SCSI controller, say Y. Otherwise, say - N. + and want to use the onboard SCSI controller, say Y. Otherwise, + answer N. Blizzard 1230IV/1260 SCSI support CONFIG_BLZ1230_SCSI If you have an Amiga 1200 with a Phase5 Blizzard 1230IV or Blizzard - 1260 accelerator, and the optional SCSI module, say Y. Otherwise, + 1260 accelerator, and the optional SCSI module, say Y. Otherwise, say N. +Blizzard PowerUP 603e+ SCSI support +CONFIG_BLZ603EPLUS_SCSI + If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+ + accelerator, say Y. Otherwise, say N. + Fastlane SCSI support CONFIG_FASTLANE_SCSI If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use - one in the near future, say Y to this question. Otherwise, say N. + one in the near future, say Y to this question. Otherwise, say N. Atari native SCSI support CONFIG_ATARI_SCSI @@ -9059,7 +9706,7 @@ CONFIG_ATARI_SCSI available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module is called atari_scsi.o. If you want to compile it as a module, say M here and - read Documentation/modules.txt. This driver supports both styles of + read Documentation/modules.txt. This driver supports both styles of NCR integration into the system: the TT style (separate DMA), and the Falcon style (via ST-DMA, replacing ACSI). It does NOT support other schemes, like in the Hades (without DMA). @@ -9081,7 +9728,7 @@ CONFIG_TT_DMA_EMUL Ariadne support CONFIG_ARIADNE - If you have a VillageTronics Ariadne Ethernet adapter, say Y. + If you have a Village Tronic Ariadne Ethernet adapter, say Y. Otherwise, say N. This driver is also available as a module ( = code which can be @@ -9089,9 +9736,19 @@ CONFIG_ARIADNE want). The module is called ariadne.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. +Ariadne II support +CONFIG_ARIADNE2 + If you have a Village Tronic Ariadne II Ethernet adapter, say Y. + Otherwise, say N. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you + want). The module is called ariadne2.o. If you want to compile it as + a module, say M here and read Documentation/modules.txt. + A2065 support CONFIG_A2065 - If you have a Commodore A2065 Ethernet adapter, say Y. Otherwise, + If you have a Commodore A2065 Ethernet adapter, say Y. Otherwise, say N. This driver is also available as a module ( = code which can be @@ -9101,7 +9758,7 @@ CONFIG_A2065 Hydra support CONFIG_HYDRA - If you have a Hydra Ethernet adapter, say Y. Otherwise, say N. + If you have a Hydra Ethernet adapter, say Y. Otherwise, say N. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you @@ -9129,7 +9786,7 @@ CONFIG_ATARI_PAMSNET Multiface Card III parallel support CONFIG_MULTIFACE_III_LP If you have a Multiface III card for your Amiga, and want to use its - parallel port in Linux, say Y. Otherwise, say N. + parallel port in Linux, say Y. Otherwise, say N. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -9138,7 +9795,7 @@ CONFIG_MULTIFACE_III_LP Amiga mouse support CONFIG_AMIGAMOUSE - If you want to be able to use an Amiga mouse in Linux, say Y. + If you want to be able to use an Amiga mouse in Linux, say Y. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -9148,13 +9805,13 @@ CONFIG_AMIGAMOUSE Amiga Copper Console CONFIG_COPCON This configures the console to use the Amiga's graphics coprocessor - for scrolling, instead of using the CPU. This option markedly + for scrolling, instead of using the CPU. This option markedly improves response times in the high color modes (5 bitplanes and - up). If you would like to use this, say Y; otherwise, say N. + up). If you would like to use this, say Y; otherwise, say N. Atari mouse support CONFIG_ATARIMOUSE - If you want to be able to use an Atari mouse in Linux, say Y. + If you want to be able to use an Atari mouse in Linux, say Y. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -9181,7 +9838,7 @@ CONFIG_ATARI_SCC LAN) and like to use them under Linux, say Y. All built-in SCC's are supported (TT, MegaSTE, Falcon), and also the ST-ESCC. If you have two connectors for channel A (Serial2 and LAN), they are visible as - two separate devices. + two separate devices. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -9190,9 +9847,9 @@ CONFIG_ATARI_SCC Atari SCC serial DMA support CONFIG_ATARI_SCC_DMA - This enables DMA support for receiving data on channel A of the - SCC. If you have a TT you may say Y here and read - drivers/char/atari_SCC.README. All other users should say N here, + This enables DMA support for receiving data on channel A of the SCC. + If you have a TT you may say Y here and read + drivers/char/atari_SCC.README. All other users should say N here, because only the TT has SCC-DMA, even if your machine keeps claiming so at boot time. @@ -9207,19 +9864,19 @@ CONFIG_ATARI_MIDI Atari DSP56k Digital Signal Processor support CONFIG_ATARI_DSP56K - If you want to be able to use the DSP56001 in Falcons, say Y. - This driver is still experimental, and if you don't know what it is, - or if you don't have this processor, just say N. + If you want to be able to use the DSP56001 in Falcons, say Y. This + driver is still experimental, and if you don't know what it is, or + if you don't have this processor, just say N. - This driver is also available as a module ( = code which can be inserted - in and removed from the running kernel whenever you want). If you - want to compile it as a module, say M here and read + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + If you want to compile it as a module, say M here and read Documentation/modules.txt. Amiga builtin serial support CONFIG_AMIGA_BUILTIN_SERIAL - If you want to use your Amiga's built-in serial port in Linux, say - Y. + If you want to use your Amiga's built-in serial port in Linux, + answer Y. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you @@ -9233,8 +9890,8 @@ CONFIG_GVPIOEXT Multiface Card III serial support CONFIG_MULTIFACE_III_TTY - If you want to use a Multiface III card's serial port in Linux, say - Y. + If you want to use a Multiface III card's serial port in Linux, + answer Y. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -9244,8 +9901,8 @@ CONFIG_MULTIFACE_III_TTY Amiga or Atari DMA sound support CONFIG_DMASOUND If you want to use the internal audio of your Atari or Amiga in - Linux, answer Y to this question. This will provide a Sun-like - /dev/audio, compatible with the Linux/i386 sound system. Otherwise, + Linux, answer Y to this question. This will provide a Sun-like + /dev/audio, compatible with the Linux/i386 sound system. Otherwise, say N. This driver is also available as a module ( = code which can be @@ -9256,73 +9913,61 @@ CONFIG_DMASOUND MSDOS partition support CONFIG_MSDOS_PARTITION This option enables support for using hard disks that were - partitioned on an MS-DOS system. This may be useful if you are + partitioned on an MS-DOS system. This may be useful if you are sharing a hard disk between i386 and m68k Linux boxes, for example. Say Y if you need this feature; users who are only using their system-native partitioning scheme can say N here. -Board Type -CONFIG_PMAC - There are currently several different kinds of PowerPC-based machines - available: Apple Power Macintoshes and clones (such as the Motorola - Starmax series, PReP (PowerPC Reference Platform) machines such - as the Motorola PowerStack, Amiga Power-Up systems (APUS), CHRP and the - embedded MBX boards from Motorola. Currently, a single kernel binary - only supports one type or the other. However, there is very early work - on support CHRP, PReP and PowerMac's from a single binary. - - Processor Type CONFIG_6xx - There are two types of PowerPC chips supported. The more common + There are two types of PowerPC chips supported. The more common types (601,603,604,740,750) and the embedded versions (821 and 860). - Unless you are building a kernel for one of the embedded boards using - the 821 or 860 choose 6xx. + Unless you are building a kernel for one of the embedded boards + using the 821 or 860 choose 6xx. + +Machine Type +CONFIG_PMAC + Linux currently supports several different kinds of PowerPC-based + machines: Apple Power Macintoshes and clones (such as the Motorola + Starmax series), PReP (PowerPC Reference Platform) machines such as + the Motorola PowerStack, Amiga Power-Up systems (APUS), CHRP and the + embedded MBX boards from Motorola. Currently, a single kernel binary + only supports one type or the other. However, there is very early + work on support for CHRP, PReP and PowerMac's from a single binary. Support for Open Firmware device tree in /proc CONFIG_PROC_DEVICETREE This option adds a device-tree directory under /proc which contains an image of the device tree that the kernel copies from Open - Firmware. If unsure, say Y here. - -Support for ATI Mach64 display cards -CONFIG_ATY_VIDEO - Several of the newer Power Macintoshes and clones have a video - display interface based on the ATI Mach64 chipset. Say N here if - you are sure you don't need this functionality, otherwise Y. - -Support for IMS Twin Turbo display card -CONFIG_IMSTT_VIDEO - Some Power Macintosh clones have an IMS Twin Turbo video display - interface. Say Y to include support for this. + Firmware. If unsure, say Y here. MESH (Power Mac internal SCSI) support CONFIG_SCSI_MESH Many Power Macintoshes and clones have a MESH (Macintosh Enhanced SCSI Hardware) SCSI bus adaptor (the 7200 doesn't, but all of the - other Power Macintoshes do). Say Y to include support for this SCSI - adaptor. This driver is also available as a module called mesh.o ( - = code which can be inserted in and removed from the running kernel - whenever you want). If you want to compile it as a module, say M - here and read Documentation/modules.txt. + other Power Macintoshes do). Say Y to include support for this SCSI + adaptor. This driver is also available as a module called mesh.o + ( = code which can be inserted in and removed from the running + kernel whenever you want). If you want to compile it as a module, + say M here and read Documentation/modules.txt. Maximum synchronous transfer rate CONFIG_SCSI_MESH_SYNC_RATE On Power Macintoshes (and clones) where the MESH SCSI bus adaptor drives a bus which is entirely internal to the machine (such as the 7500, 7600, 8500, etc.), the MESH is capable of synchronous - operation at up to 10MB/s. On machines where the SCSI bus + operation at up to 10 MB/s. On machines where the SCSI bus controlled by the MESH can have external devices connected, it is - usually rated at 5MB/s. 5 is a safe value here unless you know the - MESH SCSI bus is internal only; in that case you can say 10. Say 0 + usually rated at 5 MB/s. 5 is a safe value here unless you know the + MESH SCSI bus is internal only; in that case you can say 10. Say 0 to disable synchronous operation. 53C94 (Power Mac external SCSI) support CONFIG_SCSI_MAC53C94 On Power Macintoshes (and clones) with two SCSI buses, the external - SCSI bus is usually controlled by a 53C94 SCSI bus adaptor. Older + SCSI bus is usually controlled by a 53C94 SCSI bus adaptor. Older machines which only have one SCSI bus, such as the 7200, also use - the 53C94. Say Y to include support for the 53C94. + the 53C94. Say Y to include support for the 53C94. This driver is also available as a module called mac53c94.o ( = code which can be inserted in and removed from the running kernel @@ -9333,7 +9978,12 @@ MACE (Power Mac Ethernet) support CONFIG_MACE Power Macintoshes and clones with Ethernet built-in on the motherboard will usually use a MACE (Medium Access Control for - Ethernet) interface. Say Y to include support for the MACE chip. + Ethernet) interface. Say Y to include support for the MACE chip. + +BMAC (G3 ethernet) support +CONFIG_BMAC + Say Y for support of BMAC Ethernet interfaces. These are used on G3 + computers. Video For Linux CONFIG_VIDEO_DEV @@ -9342,6 +9992,10 @@ CONFIG_VIDEO_DEV this are available from ftp://ftp.uk.linux.org/pub/linux/video4linux. + If you are interested in writing a driver for such an audio/video + device or user software interacting with such a driver, please read + the file Documentation/video4linux/API.html. + This driver is also available as a module called videodev.o ( = code which can be inserted in and removed from the running kernel whenever you want). If you want to compile it as a module, say M @@ -9352,16 +10006,17 @@ CONFIG_RADIO_RTRACK Choose Y here if you have one of these FM radio cards, and then fill in the port address below. - Note that newer AIMSlab RadioTrack cards have a different chipset, - not supported by this driver. For these cards, use the RadioTrack II - driver below. + Note that newer AIMSlab RadioTrack cards have a different chipset + and are not supported by this driver. For these cards, use the + RadioTrack II driver below. In order to control your radio card, you will need to use programs - that are compatible with the Video for Linux API. Information on + that are compatible with the Video for Linux API. Information on this API and pointers to "v4l" programs may be found on the WWW at http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW, you need to have access to a machine on the Internet that has a - program like lynx or netscape. + program like lynx or netscape. More information is contained in the + file Documentation/video4linux/radiotrack.txt. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -9370,7 +10025,7 @@ CONFIG_RADIO_RTRACK RadioTrack i/o port CONFIG_RADIO_RTRACK_PORT - Enter either 0x30f or 0x20f here. The card default is 0x30f, if you + Enter either 0x30f or 0x20f here. The card default is 0x30f, if you haven't changed the jumper setting on the card. AIMSlab RadioTrack II support @@ -9379,7 +10034,7 @@ CONFIG_RADIO_RTRACK2 port address below. In order to control your radio card, you will need to use programs - that are compatible with the Video for Linux API. Information on + that are compatible with the Video for Linux API. Information on this API and pointers to "v4l" programs may be found on the WWW at http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW, you need to have access to a machine on the Internet that has a @@ -9392,7 +10047,7 @@ CONFIG_RADIO_RTRACK2 RadioTrack II i/o port CONFIG_RADIO_RTRACK2_PORT - Enter either 0x30c or 0x20c here. The card default is 0x30c, if you + Enter either 0x30c or 0x20c here. The card default is 0x30c, if you haven't changed the jumper setting on the card. Aztech/Packard Bell Radio @@ -9401,7 +10056,7 @@ CONFIG_RADIO_AZTECH in the port address below. In order to control your radio card, you will need to use programs - that are compatible with the Video for Linux API. Information on + that are compatible with the Video for Linux API. Information on this API and pointers to "v4l" programs may be found on the WWW at http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW, you need to have access to a machine on the Internet that has a @@ -9414,8 +10069,8 @@ CONFIG_RADIO_AZTECH Aztech/Packard Bell radio card i/o port CONFIG_RADIO_AZTECH_PORT - Enter either 0x350 or 0x358 here. The card default is 0x350, if you - haven't changed the setting of jumper JP3 on the card. Removing the + Enter either 0x350 or 0x358 here. The card default is 0x350, if you + haven't changed the setting of jumper JP3 on the card. Removing the jumper sets the card to 0x358. SF16FMI Radio @@ -9424,7 +10079,7 @@ CONFIG_RADIO_SF16FMI in the port address below. In order to control your radio card, you will need to use programs - that are compatible with the Video for Linux API. Information on + that are compatible with the Video for Linux API. Information on this API and pointers to "v4l" programs may be found on the WWW at http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW, you need to have access to a machine on the Internet that has a @@ -9445,7 +10100,7 @@ CONFIG_RADIO_ZOLTRIX in the port address below. In order to control your radio card, you will need to use programs - that are compatible with the Video for Linux API. Information on + that are compatible with the Video for Linux API. Information on this API and pointers to "v4l" programs may be found on the WWW at http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW, you need to have access to a machine on the Internet that has a @@ -9460,10 +10115,28 @@ ZOLTRIX I/O port (0x20c or 0x30c) CONFIG_RADIO_ZOLTRIX_PORT Enter the I/O port of your Zoltrix radio card. +Miro PCM20 Radio +CONFIG_RADIO_MIROPCM20 + Choose Y here if you have one of these FM radio cards, and then fill + in the port address below. + + In order to control your radio card, you will need to use programs + that are compatible with the Video for Linux API. Information on + this API and pointers to "v4l" programs may be found on the WWW at + http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW, + you need to have access to a machine on the Internet that has a + program like lynx or netscape. + + If you want to compile this driver as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read Documentation/modules.txt. The module will be + called radio-miropcm20.o + BT848 Video For Linux CONFIG_VIDEO_BT848 Support for BT848 based frame grabber/overlay boards. This includes - the Miro, Hauppauge and STB boards. + the Miro, Hauppauge and STB boards. Please read the material in + Documentation/video4linux/bttv for more information. This driver is also available as a module called bttv.o ( = code which can be inserted in and removed from the running kernel @@ -9507,41 +10180,38 @@ CONFIG_VIDEO_PMS CPU Optimization CONFIG_CPU_ARM2 - This selects the processor type of your CPU. This is only used to + This selects the processor type of your CPU. This is only used to determine C compiler optimization options, and can affect the - compatibility of the kernel on other processors. If you specify - ARM6, the kernel should work on all 32-bit processors. If you + compatibility of the kernel on other processors. If you specify + ARM6, the kernel should work on all 32-bit processors. If you specify ARM2, ARM250 or ARM3, it should work on all 26-bit - processors. If you're not sure, set it to "None". + processors. If you're not sure, set it to "None". ARM System type CONFIG_ARCH_ARC - This selects what ARM system you wish to build the kernel for. It - also selects to some extent the CPU type. If you are unsure what + This selects what ARM system you wish to build the kernel for. It + also selects to some extent the CPU type. If you are unsure what to set this option to, please consult any information supplied with your system. Build Tools Selection CONFIG_BINUTILS_NEW - Say Y here if you're using GCC 2.8.1/EGCS with a binutils - version >= 2.8.1 to compile the kernel. Otherwise, say N. + Say Y here if and only if you're using GCC 2.8.1/EGCS with a + binutils version >= 2.8.1 to compile the kernel (check with "gcc + --version" and "ld -v"). Compile kernel with frame pointer CONFIG_FRAME_POINTER - In order to give useful debugging/error results, say Y here, otherwise - say N. - -VIDC Sound -CONFIG_VIDC_SOUND - Say 'Y' here for ARM systems with the VIDC video controller and 16-bit - Linear sound DACs. If unsure, say N. + If you say Y here, the resulting kernel will be slightly larger, but + it will give useful debugging/error results. If you don't debug the + kernel, you can say N. # # A couple of things I keep forgetting: # capitalize: AppleTalk, Ethernet, DMA, FTP, Internet, Intel, IRQ, # Linux, NetWare, NFS, PCI, SCSI, SPARC # two words: hard drive, hard disk, sound card, home page -# other: it's safe to save; daemon +# other: it's safe to save; daemon; use --, not - or --- # # This is used by Emacs' spell checker ispell.el: # @@ -9587,13 +10257,13 @@ CONFIG_VIDC_SOUND # LocalWords: RTNETLINK mknod xos MTU lwared Macs mac netatalk macs cs Wolff # LocalWords: dartmouth flowerpt MultiMaster FlashPoint tudelft etherexpress # LocalWords: ICL EtherTeam ETH IDESCSI TXC SmartRAID SmartCache httpd sjc dlp -# LocalWords: thesphere TwoServers BOOTP DHCP ncpfs BPQETHER BPQ chipsets MG +# LocalWords: thesphere TwoServers BOOTP DHCP ncpfs BPQETHER BPQ MG HIPPI cern # LocalWords: bsd comp SPARCstation le SunOS ie Gracilis PackeTwin PT pt LU FX # LocalWords: FX TEAC CR LCS mS ramdisk IDETAPE cmd fperllo encis tcfs unisa # LocalWords: Vertos Genoa Funai hsfs NCP NetWare tgz APM apm ioctls UltraLite # LocalWords: TravelMate CDT LCD backlight VC RPC Mips AXP barlow cdrecord pg # LocalWords: PMAX MILO Alphas Multia Tseng linuxelf endian mipsel mips drv HT -# LocalWords: KERNELD kerneld callouts AdvanSys advansys Admin WDT DataStor EP +# LocalWords: kerneld callouts AdvanSys advansys Admin WDT DataStor EP verden # LocalWords: wdt hdb hdc bugfix SiS vlb Acculogic CSA DTC dtc Holtek ht QDI # LocalWords: QD qd UMC umc ALI ali lena fnet fr azstarnet axplinux cdr fb MDA # LocalWords: Avanti XL AlphaStations Jensen DECpc AXPpci UDB Cabriolet MCA RC @@ -9631,7 +10301,7 @@ CONFIG_VIDC_SOUND # LocalWords: YAMADA tetsu cauchy nslab ntt nevod perm su doc kaf kheops wsc # LocalWords: traduc Bourgin dbourgin menuconfig kfill READMEs HOWTOs Virge WA # LocalWords: IDEDISK IDEFLOPPY EIDE firewalls QMAGIC ZMAGIC LocalWords opti -# LocalWords: SVGATextMode vga svga Xterminal Xkernel syr jmwobus comfaqs dhcp +# LocalWords: SVGATextMode vga svga Xkernel syr jmwobus comfaqs dhcp flakey GD # LocalWords: IPv IPng interoperability ipng ipv radio's tapr pkthome PLP nano # LocalWords: Ses Mhz sethdlc SOUNDMODEM WindowsSoundSystem smdiag pcf inka ES # LocalWords: smmixer ptt circ soundmodem MKISS FDDI DEFEA DEFPA DEFXX redhat @@ -9644,7 +10314,7 @@ CONFIG_VIDC_SOUND # LocalWords: INSNS Ataris AutoConfig ZORRO OCS AMIFB Agnus Denise ECS CDTV GB # LocalWords: AGA Cybervision CYBER GSP TMS DMI Zorro ACSI ROMs SLM BioNet GVP # LocalWords: PAMsNet TekMagic Cyberstorm MkI CYBERSTORMII MkII BLZ onboard cx -# LocalWords: VillageTronics ATARILANCE RieblCard PAMCard VME MFP sangoma LAPB +# LocalWords: Village Tronic ATARILANCE RieblCard PAMCard VME MFP sangoma LAPB # LocalWords: Rhotron BioData's Multiface AMIGAMOUSE COPCON Amiga's bitplanes # LocalWords: ATARIMOUSE MFPSER SCC's MegaSTE ESCC Atari's GVPIOEXT DMASOUND # LocalWords: fdutils cisco univercd rpcg htm iface lapb LAPBETHER tpqic qic @@ -9667,12 +10337,12 @@ CONFIG_VIDC_SOUND # LocalWords: zorro CAPI AVMB capi avmb VP SYN syncookies EM em pc Ethertalk # LocalWords: Dayna DL Daynatalk LT PhoneNET ATB Daystar queueing CMDS SCBs ls # LocalWords: SCB STATS Thinnet ThunderLAN TLAN Netelligent NetFlex tlan james -# LocalWords: caldera Preload dcache Preloading slowdowns schoebel uni NBD nbd +# LocalWords: caldera Preload Preloading slowdowns schoebel uni NBD nbd prog # LocalWords: stuttgart rdist TRANS hostnames mango jukeboxes ESS userland PD # LocalWords: hardlinked NAMETRANS env mtab fstab umount nologin runlevel gid # LocalWords: transname filespace adm Nodename hostname uname Kernelname bootp # LocalWords: KERNNAME kname ktype kernelname Kerneltype KERNTYPE Alt RX mdafb -# LocalWords: dataless kerneltype SYSNAME Comtrol Rocketport palmtop +# LocalWords: dataless kerneltype SYSNAME Comtrol Rocketport palmtop fbset EGS # LocalWords: nvram SYSRQ SysRq PrintScreen sysrq NVRAMs NvRAM Shortwave RTTY # LocalWords: HFMODEM shortwave Sitor Amtor Pactor GTOR hfmodem hayes TX TMOUT # LocalWords: IDEPCI IDEDMA idedma PDC pdc TRM trm raidtools luthien nuclecu @@ -9719,10 +10389,29 @@ CONFIG_VIDC_SOUND # LocalWords: AcornSCSI EcoSCSI EESOX EESOXSCSI Powertec POWERTECSCSI dec SF # LocalWords: RadioReveal gatekeeper aimslab aztech FMI sf fmi RTL rtl cesdis # LocalWords: Yellowfin gsfc nasa gov yellowfin pcnet Mylex LNE lne EtherH hs -# LocalWords: EBSA chattr RiscOS Winmodem AGP Atomwide DUALSP pcsp robinson +# LocalWords: EBSA chattr RiscOS Winmodem AGP Atomwide DUALSP pcsp robinson CT # LocalWords: SGALAXY Waverider DSPxxx TRXPRO AudioTrix OSWF MOT CFB DSY kbps # LocalWords: tuwien kkudielk LVD mega lun MAXTAGS Gbps arcnet Olicom SKTR SNA -# LocalWords: SysKonnect sktr sna etherboot ufs NetBEUI MultiSound MSNDCLAS -# LocalWords: MSNDINIT MSNDPERM MSNDPIN PNDSPINI PNDSPERM Ensoniq's -# LocalWords: AudioPCI lspci SonicVibes sonicvibes SPARCs roadrunner +# LocalWords: SysKonnect sktr sna etherboot ufs NetBEUI MultiSound MSNDCLAS GX +# LocalWords: MSNDINIT MSNDPERM MSNDPIN PNDSPINI PNDSPERM Ensoniq's RetinaZ SS +# LocalWords: AudioPCI lspci SonicVibes sonicvibes SPARCs roadrunner CLgen UPA # LocalWords: swansea shtml Zoltrix zoltrix BINUTILS EGCS binutils VIDC DACs +# LocalWords: CyberVision Cirrus PowerBooks Topcat SBUS CGsix TurboGX BWtwo SS +# LocalWords: CGthree TCX unswapable vfb fbcon hicolor truecolor AFB ILBM SOC +# LocalWords: IPLAN gracilis Fibre SBus SparcSTORAGE SV jnewbigin swin QNX qnx +# LocalWords: PTY PTYS ptyxx ttyxx PTYs ssh sb Avance ALS pss pvv kerneli hd +# LocalWords: synth WaveFront MSND NONPNP AudioExcelDSP STRAM APUS CHRP MBX Nx +# LocalWords: PowerMac's BMAC radiotrack rtrack miropcm OFFBOARD HPT UDMA DVD +# LocalWords: hpt fokus gmd Cyrix DXL SLC DLC NexGen MediaGX GXm IDT WinChip +# LocalWords: MMX MII valkyrie mdacon vdolive VDOLive cuseeme CU hippi rrunner +# LocalWords: SeeMe ipmasqadm juanjox ipmarkfw markfw TNCs Microdyne rhine lib +# LocalWords: libc jsX gamepad gameport CHF FCS FPGaming MadCatz ASSASIN GrIP +# LocalWords: Assasin gamepads GamePad PDPI gamecards gamecard WingMan BSP WCS +# LocalWords: ThunderPad CyberMan SideWinder ThrustMaster DirectConnect NES XF +# LocalWords: Millenium SNES PSX Multisystem Nintendo PlayStation Amstrad CPC +# LocalWords: Sega TurboGraFX Steffen Schwenke Multiststem PDIF FIFOSIZE EPLUS +# LocalWords: PowerUP RoadRunner tahallah dos functionkey setterm imladris Woz +# LocalWords: PowerMacs Winbond Algorithmics ALGOR algor ECOFF IRIX SGI SGI's +# LocalWords: gfx virtualized Xpmac mklinux XFree FBDev Woodhouse mvhi Seeq fp +# LocalWords: SGISEEQ HIgh ADB ADBMOUSE crosscompiler CROSSCOMPILE FPE GDB gdb +# LocalWords: JOYPORT rp spoofing DawiControl NOGENSUPP EEPROM HSSI diff --git a/Documentation/cdrom/ide-cd b/Documentation/cdrom/ide-cd index ee12e856d..5633ac80c 100644 --- a/Documentation/cdrom/ide-cd +++ b/Documentation/cdrom/ide-cd @@ -1,6 +1,8 @@ IDE-CD driver documentation Originally by scott snyder <snyder@fnald0.fnal.gov> (19 May 1996) Carrying on the torch is: Erik Andersen <andersee@debian.org> +New maintainers (19 Oct 1998): Jens Axboe <axboe@image.dk> + Chris Zwilling <chris@cloudnet.com> 1. Introduction --------------- diff --git a/Documentation/fb/framebuffer.txt b/Documentation/fb/framebuffer.txt index 7d9075012..644a007a5 100644 --- a/Documentation/fb/framebuffer.txt +++ b/Documentation/fb/framebuffer.txt @@ -2,7 +2,7 @@ ----------------------- Maintained by Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) -Last revised: June 10, 1998 +Last revised: November 7, 1998 0. Introduction @@ -114,7 +114,7 @@ much trouble... -------------------------------------- Frame buffer resolutions are maintained using the utility `fbset'. It can -change the video mode properties of the current resolution. Its main usage is +change the video mode properties of a frame buffer device. Its main usage is to change the current video mode, e.g. during boot up in one of your /etc/rc.* or /etc/init.d/* files. @@ -126,8 +126,8 @@ easily add your own modes and refer to them with a simple identifier. --------------- The X server (XF68_FBDev) is the most notable application program for the frame -buffer device. The current X server is part of the XFree86/XFree68 release -3.3.1 package and has 2 modes: +buffer device. Starting with XFree86 release 3.2, the X server is part of +XFree86 and has 2 modes: - If the `Display' subsection for the `fbdev' driver in the /etc/XF86Config file contains a @@ -135,19 +135,18 @@ buffer device. The current X server is part of the XFree86/XFree68 release Modes "default" line, the X server will use the scheme discussed above, i.e. it will start - up in the resolution determined by /dev/fb0current (or $FRAMEBUFFER, if - set). This is the default for the configuration file supplied with XFree68 - 3.2. It's the most simple configuration (and the only possible one if you - want to have a broadcast compatible display, e.g. PAL or NTSC), but it has - some limitations. + up in the resolution determined by /dev/fb0 (or $FRAMEBUFFER, if set). You + still have to specify the color depth (using the Depth keyword) and virtual + resolution (using the Virtual keyword) though. This is the default for the + configuration file supplied with XFree86. It's the most simple + configuration, but it has some limitations. - Therefore it's also possible to specify resolutions in the /etc/XF86Config file. This allows for on-the-fly resolution switching while retaining the same virtual desktop size. The frame buffer device that's used is still /dev/fb0current (or $FRAMEBUFFER), but the available resolutions are defined by /etc/XF86Config now. The disadvantage is that you have to - specify the timings in a different format (but `fbset -x' may help) and - that you can't have a broadcast compatible display (e.g. no PAL or NTSC). + specify the timings in a different format (but `fbset -x' may help). To tune a video mode, you can use fbset or xvidtune. Note that xvidtune doesn't work 100% with XF68_FBDev: the reported clock values are always incorrect. @@ -298,11 +297,11 @@ For more specific information about the frame buffer device and its applications, please refer to the following documentation: - The manual pages for fbset: fbset(8), fb.modes(5) - - The manual pages for XFree68: XF68_FBDev(1), XF86Config(4/5) + - The manual pages for XFree86: XF68_FBDev(1), XF86Config(4/5) - The mighty kernel sources: + o linux/drivers/video/ o linux/include/linux/fb.h - o linux/drivers/char/fbmem.c - o linux/drivers/video/*fb.c + o linux/include/video/ 8. Downloading diff --git a/Documentation/fb/internals.txt b/Documentation/fb/internals.txt index 6a77a7437..7a6b9e99c 100644 --- a/Documentation/fb/internals.txt +++ b/Documentation/fb/internals.txt @@ -2,7 +2,7 @@ This is a first start for some documentation about frame buffer device internals. -Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>, 10 June 1998 +Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>, 21 July 1998 -------------------------------------------------------------------------------- @@ -68,14 +68,13 @@ value, and that color is displayed. True color (FB_VISUAL_TRUECOLOR) -------------------------------- -The pixel value is broken up into red, green, and blue fields, each of which -are looked up in separate red, green, and blue lookup tables. +The pixel value is broken up into red, green, and blue fields. Direct color (FB_VISUAL_DIRECTCOLOR) ------------------------------------ -The pixel value is broken up into red, green, and blue fields. This is what -most people mean when then say `true color'. +The pixel value is broken up into red, green, and blue fields, each of which +are looked up in separate red, green, and blue lookup tables. Grayscale displays diff --git a/Documentation/fb/vesafb.txt b/Documentation/fb/vesafb.txt index ed58f7241..e6f52393d 100644 --- a/Documentation/fb/vesafb.txt +++ b/Documentation/fb/vesafb.txt @@ -30,37 +30,66 @@ How to use it? ============== Switching modes is done using the vga=... boot parameter. Read -Documentation/svga.txt for details. With vesafb both text and -graphics modes work. Text modes are handled by vgafb, graphic modes -by the new vesafb.c. +Documentation/svga.txt for details. -The graphic modes are not in the list which you get if you boot with -vga=ask and hit return. Here are some mode numbers: - - | 640x480 800x600 1024x768 -----+--------------------------- -256 | 0x101 0x103 0x105 -32k | 0x110 0x113 0x116 -64k | 0x111 0x114 0x117 -16M | 0x112 0x115 0x118 - -Note 1: this are the VESA mode numbers. The video mode select code - expects 0x200 + VESA mode number. -Note 2: lilo can't handle hex, for booting with "vga=??" you have to - transform the numbers to decimal. +You should compile in both vgacon (for text mode) and vesafb (for +graphics mode). Which of them takes over the console depends on +whenever the specified mode is text or graphics. +The graphic modes are NOT in the list which you get if you boot with +vga=ask and hit return. Here are some mode numbers: -Speed it up! -============ - -Check /usr/src/linux/Documentation/mtrr.txt, enabling write-combining -for the framebuffer memory gives a performance boost. - -There are two ways to do console scrolling: redraw the screen -completely, or by copying around the video memory. You can select one -of them using the kernel command line: video=vesa:redraw or -video=vesa:memmove. redraw is the default, becauce this one works -faster on my box. + | 640x480 800x600 1024x768 1280x1024 +----+------------------------------------- +256 | 0x101 0x103 0x105 0x107 +32k | 0x110 0x113 0x116 0x119 +64k | 0x111 0x114 0x117 0x11A +16M | 0x112 0x115 0x118 0x11B + +This are the VESA mode numbers. The video mode select code expects +0x200 + VESA mode number. Therefore you have to enter "305" at the +"vga=ask" prompt to boot into 1024x768x8. + +If this does'nt work, this might be becauce your BIOS does not support +linear framebuffers or becauce it does'nt support this mode at all. +Even if your board does, it might be the BIOS does not. VESA BIOS +Extentions v2.0 are required, 1.2 is NOT sufficient. You'll get a +"bad mode number" message if something goes wrong. + +Note: LILO can't handle hex, for booting directly with "vga=mode-number" + you have to transform the numbers to decimal. + + +X11 +=== + +XF68_FBDev should work just fine, but it is non-accelerated. Running +another (accelerated) X-Server like XF86_SVGA might or might not work. +It depends on X-Server and graphics board. + +The X-Server must restore the video mode correctly, else you end up +with a broken console (and vesafb can't do anything about this). + + +Configuration +============= + +You can pass kernel command line options to vesafb with +"video=vesa:option1". Multiple options should be separated +by comma. Accepted options: + +invers - no comment... +redraw - scroll by redrawing the affected part of the screen +ypan - enable display panning using the VESA protected mode + interface. This enables the Shift-PgUp scrollback + thing and greatly speeds up fullscreen scrolling. + It is slower than "redraw" when scrolling only a halve + screen. This is the default. +ywrap - If your gfx board supports wrap-around, use this one + instead of ypan. +nopal - Don't use the protected mode interface for palette + changes. vesafb will try the standard vga registers + instead. Have fun! diff --git a/Documentation/i386/zero-page.txt b/Documentation/i386/zero-page.txt new file mode 100644 index 000000000..fd77bfdb8 --- /dev/null +++ b/Documentation/i386/zero-page.txt @@ -0,0 +1,73 @@ +Summary of empty_zero_page layout (kernel point of view) + ( collected by Hans Lermen and Martin Mares ) + +The contents of empty_zero_page are used to pass parameters from the +16-bit realmode code of the kernel to the 32-bit part. References/settings +to it mainly are in: + + arch/i386/boot/setup.S + arch/i386/boot/video.S + arch/i386/kernel/head.S + arch/i386/kernel/setup.c + + +Offset Type Description +------ ---- ----------- + 0 32 bytes struct screen_info, SCREEN_INFO + ATTENTION, overlaps the following !!! + 2 unsigned short EXT_MEM_K, extended memory size in Kb (from int 0x15) + 0x20 unsigned short CL_MAGIC, commandline magic number (=0xA33F) + 0x22 unsigned short CL_OFFSET, commandline offset + Address of commandline is calculated: + 0x90000 + contents of CL_OFFSET + (only taken, when CL_MAGIC = 0xA33F) + 0x40 20 bytes struct apm_bios_info, APM_BIOS_INFO + 0x80 16 bytes hd0-disk-parameter from intvector 0x41 + 0x90 16 bytes hd1-disk-parameter from intvector 0x46 + + 0xa0 16 bytes System description table truncated to 16 bytes. + ( struct sys_desc_table_struct ) + 0xb0 - 0x1df Free. Add more parameters here if you really need them. + +0x1e0 unsigned long ALT_MEM_K, alternative mem check, in Kb +0x1f1 char size of setup.S, number of sectors +0x1f2 unsigned short MOUNT_ROOT_RDONLY (if !=0) +0x1f4 unsigned short size of compressed kernel-part in the + (b)zImage-file (in 16 byte units, rounded up) +0x1f6 unsigned short swap_dev (unused AFAIK) +0x1f8 unsigned short RAMDISK_FLAGS +0x1fa unsigned short VGA-Mode (old one) +0x1fc unsigned short ORIG_ROOT_DEV (high=Major, low=minor) +0x1ff char AUX_DEVICE_INFO + +0x200 short jump to start of setup code aka "reserved" field. +0x202 4 bytes Signature for SETUP-header, ="HdrS" +0x206 unsigned short Version number of header format + Current version is 0x0201... +0x208 8 bytes (used by setup.S for communication with boot loaders, + look there) +0x210 char LOADER_TYPE, = 0, old one + else it is set by the loader: + 0xTV: T=0 for LILO + 1 for Loadlin + 2 for bootsect-loader + 3 for SYSLINUX + 4 for ETHERBOOT + V = version +0x211 char loadflags: + bit0 = 1: kernel is loaded high (bzImage) + bit7 = 1: Heap and pointer (see below) set by boot + loader. +0x212 unsigned short (setup.S) +0x214 unsigned long KERNEL_START, where the loader started the kernel +0x218 unsigned long INITRD_START, address of loaded ramdisk image +0x21c unsigned long INITRD_SIZE, size in bytes of ramdisk image +0x220 4 bytes (setup.S) +0x224 unsigned short setup.S heap end pointer +0x226 - 0x7ff setup.S code. + +0x800 string, 2K max COMMAND_LINE, the kernel commandline as + copied using CL_OFFSET. + Note: this will be copied once more by setup.c + into a local buffer which is only 256 bytes long. + ( #define COMMAND_LINE_SIZE 256 ) diff --git a/Documentation/joystick-api.txt b/Documentation/joystick-api.txt new file mode 100644 index 000000000..6b7b34129 --- /dev/null +++ b/Documentation/joystick-api.txt @@ -0,0 +1,311 @@ + Joystick API Documentation -*-Text-*- + + Ragnar Hojland Espinosa + <ragnar@lightside.ddns.org> + + 7 Aug 1998 + + +1. Initialization +~~~~~~~~~~~~~~~~~ + +Open the joystick device following the usual semantics (that is, with open). +Since the driver now reports events instead of polling for changes, +immediately after the open it will issue a series of synthetic events +(JS_EVENT_INIT) that you can read to check the initial state of the +joystick. + +By default, the device is opened in blocking mode. + + int fd = open ("/dev/js0", O_RDONLY); + + +2. Event Reading +~~~~~~~~~~~~~~~~ + + struct js_event e; + read (fd, &e, sizeof(struct js_event)); + +where js_event is defined as + + struct js_event { + __u32 time; /* event timestamp in miliseconds */ + __s16 value; /* value */ + __u8 type; /* event type */ + __u8 number; /* axis/button number */ + }; + +If the read is successfull, it will return sizeof(struct js_event), unless +you wanted to read more than one event per read as described in section 3.1. + + +2.1 js_event.type +~~~~~~~~~~~~~~~~~ + +The possible values of ``type'' are + + #define JS_EVENT_BUTTON 0x01 /* button pressed/released */ + #define JS_EVENT_AXIS 0x02 /* joystick moved */ + #define JS_EVENT_INIT 0x80 /* initial state of device */ + +As mentioned above, the driver will issue synthetic JS_EVENT_INIT ORed +events on open. That is, if it's issuing a INIT BUTTON event, the +current type value will be + + int type = JS_EVENT_BUTTON | JS_EVENT_INIT; /* 0x81 */ + +If you choose not to differentiate between synthetic or real events +you can turn off the JS_EVENT_INIT bits + + type &= ~JS_EVENT_INIT; /* 0x01 */ + + +2.2 js_event.number +~~~~~~~~~~~~~~~~~~~ + +The values of ``number'' correspond to the axis or button that +generated the event. Note that they carry separate numeration (that +is, you have both an axis 0 and a button 0). Generally, + + number + 1st Axis X 0 + 1st Axis Y 1 + 2nd Axis X 2 + 2nd Axis Y 3 + ...and so on + +Hats vary from one joystick type to another. Some can be moved in 8 +directions, some only in 4, however, the driver always reports a hat as two +independent axis, even if the hardware doesn't allow independent movement. + + +2.3 js_event.value +~~~~~~~~~~~~~~~~~~ + +For an axis, ``value'' is a signed integer between -32767 and +32767 +representing the position of the joystick along that axis. If you +don't read a 0 when the joystick is `dead', or if it doesn't span the +full range, you should recalibrate (with, for example, jscal). + +For a button, ``value'' for a press button event is 1 and for a release +button event is 0. + +Though this + + if (js_event.type == JS_EVENT_BUTTON) { + buttons_state ^= (1 << js_event.number); + } + +may work well if you handle JS_EVENT_INIT events separately, + + if ((js_event.type & ~JS_EVENT_INIT) == JS_EVENT_BUTTON) { + if (js_event.value) + buttons_state |= (1 << js_event.number); + else + buttons_state &= ~(1 << js_event.number); + } + +is much safer since it can't lose sync with the driver. As you would +have to write a separate handler for JS_EVENT_INIT events in the first +snippet, this ends up being shorter. + + +2.4 js_event.time +~~~~~~~~~~~~~~~~~ +The time an event was generated is stored in ``js_event.time''. It's a time +in miliseconds since ... well, since sometime in the past. This eases the +task of detecting double clicks, figuring out if movement of axis and button +presses happened at the same time, and similar. + + +3. Reading +~~~~~~~~~~ + +If you open the device in blocking mode, a read will block (that is, +wait) forever until an event is generated and effectively read. There +are two alternatives if you can't afford to wait forever (which is, +admittedly, a long time;) + + a) use select to wait until there's data to be read on fd, or + until it timeouts. There's a good example on the select(2) + man page. + + b) open the device in non-blocking mode (O_NONBLOCK) + + +3.1 O_NONBLOCK +~~~~~~~~~~~~~~ + +If read returns -1 when reading in O_NONBLOCK mode, this isn't +necessarily a "real" error (check errno(3)); it can just mean there +are no events pending to be read on the driver queue. You should read +all events on the queue (that is, until you get a -1). + +For example, + + while (1) { + while (read (fd, &e, sizeof(struct js_event)) > 0) { + process_event (e); + } + /* EAGAIN is returned when the queue is empty */ + if (errno != EAGAIN) { + /* error */ + } + /* do something interesting with processed events */ + } + +One reason for emptying the queue is that if it gets full you'll start +missing events since the queue is finite, and older events will get +overwritten. + +The other reason is that you want to know all what happened, and not +delay the processing till later. + +Why can get the queue full? Because you don't empty the queue as +mentioned, or because too much time elapses from one read to another +and too many events to store in the queue get generated. Note that +high system load may contribute to space those reads even more. + +If time between reads is enough to fill the queue and loose an event, +the driver will switch to startup mode and next time you read it, +synthetic events (JS_EVENT_INIT) will be generated to inform you of +the actual state of the joystick. + +[As for version 1.2.8, the queue is circular and able to hold 64 + events. You can increment this size bumping up JS_BUFF_SIZE in + joystick.h and recompiling the driver.] + + +In the above code, you might as well want to read more than one event +at a time using the typical read(2) functionality. For that, you would +replace the read above with something like + + struct js_event mybuffer[0xff]; + int i = read (fd, mybuffer, sizeof(struct mybuffer)); + +In this case, read would return -1 if the queue was empty, or some +other value in which the number of events read would be i / +sizeof(js_event) Again, if the buffer was full, it's a good idea to +process the events and keep reading it until you empty the driver queue. + + +4. IOCTLs +~~~~~~~~~ + +The joystick driver defines the following ioctl(2) operations. + + /* function 3rd arg */ + #define JSIOCGAXES /* get number of axes char */ + #define JSIOCGBUTTONS /* get number of buttons char */ + #define JSIOCGVERSION /* get driver version int */ + #define JSIOCGNAME(len) /* get identifier string char */ + #define JSIOCSCORR /* set correction values &js_corr */ + #define JSIOCGCORR /* get correction values &js_corr */ + +For example, to read the number of axes + + char number_of_axes; + ioctl (fd, JSIOCGAXES, &number_of_axes); + + +4.1 JSIOGCVERSION +~~~~~~~~~~~~~~~~~ + +JSIOGCVERSION is a good way to check in run-time whether the running +driver is 1.0+ and supports the event interface. If it is not, the +IOCTL will fail. For a compile-time decision, you can test the +JS_VERSION symbol + + #ifdef JS_VERSION + #if JS_VERSION > 0xsomething + +4.2 JSIOCGNAME +~~~~~~~~~~~~~~ + +JSIOCGNAME(len) allows you to get the name string of the joystick - the same +as is being printed at boot time. The 'len' argument is the lenght of the +buffer provided by the application asking for the name. It is used to avoid +possible overrun should the name be too long. + + char name[128]; + if (ioctl(fd, JSIOCGNAME(sizeof(name)), name) < 0) + strncpy(name, "Unknown", sizeof(name)); + printf("Name: %s\n", name); + +4.3 JSIOC[SG]CORR +~~~~~~~~~~~~~~~~~ + +For usage on JSIOC[SG]CORR I suggest you to look into jscal.c They are +not needed in a normal program, only in joystick calibration software +such as jscal or kcmjoy. These IOCTLs and data types aren't considered +to be in the stable part of the API, and therefore may change without +warning in following releases of the driver. + +Both JSIOCSCORR and JSIOCGCORR expect &js_corr to be able to hold +information for all axis. That is, struct js_corr corr[MAX_AXIS]; + +struct js_corr is defined as + + struct js_corr { + __s32 coef[8]; + __u16 prec; + __u16 type; + }; + +and ``type'' + + #define JS_CORR_NONE 0x00 /* returns raw values */ + #define JS_CORR_BROKEN 0x01 /* broken line */ + + +5. Backward compatibility +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The 0.x joystick driver API is quite limited and its usage is deprecated. +The driver offers backward compatibility, though. Here's a quick summary: + + struct JS_DATA_TYPE js; + while (1) { + if (read (fd, &js, JS_RETURN) != JS_RETURN) { + /* error */ + } + usleep (1000); + } + +As you can figure out from the example, the read returns immediately, +with the actual state of the joystick. + + struct JS_DATA_TYPE { + int buttons; /* immediate button state */ + int x; /* immediate x axis value */ + int y; /* immediate y axis value */ + }; + +and JS_RETURN is defined as + + #define JS_RETURN sizeof(struct JS_DATA_TYPE) + +To test the state of the buttons, + + first_button_state = js.buttons & 1; + second_button_state = js.buttons & 2; + +The axis values do not have a defined range in the original 0.x driver, +except for that the values are non-negative. The 1.2.8+ drivers use a +fixed range for reporting the values, 1 being the minimum, 128 the +center, and 255 maximum value. + +The v0.8.0.2 driver also had an interface for 'digital joysticks', (now +called Multisystem joystick in this driver), under /dev/djsX. This driver +doesn't try to be compatible with that interface. + +6. Final Notes +~~~~~~~~~~~~~~ + +____/| Comments, additions, and specially corrections are welcome. +\ o.O| Documentation valid for at least version 1.2.8 of the joystick + =(_)= driver and as usual, the ultimate source for documentation is + U to "Use The Source Luke" or, at your convenience, Vojtech ;) + + - Ragnar +EOF diff --git a/Documentation/joystick-parport.txt b/Documentation/joystick-parport.txt new file mode 100644 index 000000000..6bf2cd9c2 --- /dev/null +++ b/Documentation/joystick-parport.txt @@ -0,0 +1,524 @@ + Linux Joystick parport drivers v1.2 BETA + (c) 1998 Vojtech Pavlik <vojtech@ucw.cz> + (c) 1998 Andree Borrmann <a.borrmann@tu-bs.de> +---------------------------------------------------------------------------- + +0. Disclaimer +~~~~~~~~~~~~~ + Any information in this file is provided as-is, without any guarantee that +it will be true. So, use it at your own risk. The possible damages that can +happen include burning your parallel port, and/or the sticks and joystick +and maybe even more. Like when a lightning kills you it is not our problem. + +1. Intro +~~~~~~~~ + The joystick parport drivers are used for joysticks and gamepads not +originally designed for PCs and other computers Linux runs on. Because of +that, PCs usually lack the right ports to connect these devices to. Parallel +port, because of its ability to change single bits at will, and providing +both output and input bits is the most suitable port on the PC for +connecting such devices. + +2. Devices supported +~~~~~~~~~~~~~~~~~~~~ + Many console and 8-bit coputer gamepads and joysticks are supported. The +following subsections discuss usage of each. + +2.1 NES and SNES +~~~~~~~~~~~~~~~~ + The Nintendo Entertainment System and Super Nintendo Entertainment System +gamepads are widely available, and easy to get. Also, they are quite easy to +connect to a PC, and don't need much processing speed (108 us for NES and +165 us for SNES, compared to about 1000 us for PC gamepads) to communicate +with them. + + All NES and SNES use the same synchronous serial protocol, clocked from +the computer's side (and thus timing insensitive). To allow up to 5 NES +and/or SNES gamepads connected to the parallel port at once, the output +lines of the parallel port are shared, while one of 5 available input lines +is assigned to each gamepad. + + This protocol is handled by the joy-console.c driver, so that's the one +you'll use for NES and SNES gamepads. + + The main problem with PC parallel ports is that they don't have +5V power +source on any of their pins. So, if you want a reliable source of power +for your pads, use either keyboard or joystick port, and make a pass-through +cable. + + If you want to use the parallel port only, you can take the power is from +some data pin. For most gamepad and parport implementations only one pin is +needed, and I'd recommend pin 9 for that, the highest data bit. On the other +hand, if you are not planning to use anything else than NES / SNES on the +port, anything between and including pin 4 and pin 9 will work. + +(pin 9) -----> Power + + Unfortunately, there are pads that need a lot more of power, and parallel +ports that can't give much current through the data pins. If this is your +case, you'll need to use diodes (as a prevention of destroying your parallel +port), and combine the currents of two or more data bits together. + + Diodes +(pin 9) ----|>|-------+------> Power + | +(pin 8) ----|>|-------+ + | +(pin 7) ----|>|-------+ + | + <and so on> : + | +(pin 4) ----|>|-------+ + + Ground is quite easy. On PC's parallel port the ground is on any of the +pins from pin 18 to pin 25. So use any pin of these you like for the ground. + +(pin 18) -----> Ground + + NES and SNES pads have two input bits, Clock and Latch, which drive the +serial transfer. These are connected to pins 2 and 3 of the parallel port, +respectively. + +(pin 2) -----> Clock +(pin 3) -----> Latch + + And the last thing is the NES / SNES data wire. Only that isn't shared and +each pad needs its own data pin. The parallel port pins are: + +(pin 10) -----> Pad 1 data +(pin 11) -----> Pad 2 data +(pin 12) -----> Pad 3 data +(pin 13) -----> Pad 4 data +(pin 15) -----> Pad 5 data + + Note that pin 14 is not used, since it is not an input pin on the parallel +port. + + This is everything you need on the PC's side of the connection, now on to +the gamepads side. The NES and SNES have different connectors. Also, there +are quite a lot of NES clones, and because Nintendo used proprietary +connectors for their machines, the cloners couldn't and used standard D-Cannon +connectors. Anyway, if you've got a gamepad, and it has buttons A, B, Turbo +A, Turbo B, Select and Start, and is connected through 5 wires, then it is +either a NES or NES clone and will work with this connection. SNES gamepads +also use 5 wires, but have more buttons. They will work as well, of course. + +Pinout for NES gamepads Pinout for SNES gamepads + + +----> Power +-----------------------\ + | 7 | o o o o | x x o | 1 + 5 +---------+ 7 +-----------------------/ + | x x o \ | | | | | + | o o o o | | | | | +-> Ground + 4 +------------+ 1 | | | +------------> Data + | | | | | | +---------------> Latch + | | | +-> Ground | +------------------> Clock + | | +----> Clock +---------------------> Power + | +-------> Latch + +----------> Data + +Pinout for NES clone (db9) gamepads Pinout for NES clone (db15) gamepads + + +---------> Clock +-----------------> Data + | +-------> Latch | +---> Ground + | | +-----> Data | | + | | | ___________________ + _____________ 8 \ o x x x x x x o / 1 + 5 \ x o o o x / 1 \ o x x o x x o / + \ x o x o / 15 `~~~~~~~~~~~~~' 9 + 9 `~~~~~~~' 6 | | | + | | | | +----> Clock + | +----> Power | +----------> Latch + +--------> Ground +----------------> Power + +2.2 Multisystem joysticks +~~~~~~~~~~~~~~~~~~~~~~~~~ + In the era of 8-bit machines, there was something like de-facto standard +for joystick ports. They were all digital, and all used D-Cannon 9 pin +connectors (db9). Because of that, a single joystick could be used without +hassle on Atari (130, 800XE, 800XL, 2600, 7200), Amiga, Commodore C64, +Amstrad CPC, Sinclair ZX Spectrum and many other machines. That's why these +joysticks are called "Multisystem". + + Now their pinout: + + +---------> Right + | +-------> Left + | | +-----> Down + | | | +---> Up + | | | | + _____________ +5 \ x o o o o / 1 + \ x o x o / + 9 `~~~~~~~' 6 + | | + | +----> Button + +--------> Ground + + However, as time passed, extension to this standard developed, and these +were not compatible with each other: + + + Atari 130, 800(XL/XE) MSX + + +-----------> Power + +---------> Right | +---------> Right + | +-------> Left | | +-------> Left + | | +-----> Down | | | +-----> Down + | | | +---> Up | | | | +---> Up + | | | | | | | | | + _____________ _____________ +5 \ x o o o o / 1 5 \ o o o o o / 1 + \ x o o o / \ o o o o / + 9 `~~~~~~~' 6 9 `~~~~~~~' 6 + | | | | | | | + | | +----> Button | | | +----> Button 1 + | +------> Power | | +------> Button 2 + +--------> Ground | +--------> Output 3 + +----------> Ground + + Amstrad CPC Commodore C64 + + +-----------> Analog Y + +---------> Right | +---------> Right + | +-------> Left | | +-------> Left + | | +-----> Down | | | +-----> Down + | | | +---> Up | | | | +---> Up + | | | | | | | | | + _____________ _____________ +5 \ x o o o o / 1 5 \ o o o o o / 1 + \ x o o o / \ o o o o / + 9 `~~~~~~~' 6 9 `~~~~~~~' 6 + | | | | | | | + | | +----> Button 1 | | | +----> Button + | +------> Button 2 | | +------> Power + +--------> Ground | +--------> Ground + +----------> Analog X + + And there were many others. + +2.2.1 Multisystem joysticks using joy-db9.c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + For the Multisystem joysticks, and their derivatives, the joy-db9.c driver +was written. It allows only one joystick / gamepad per parallel port, but +the interface is easy to build and works with almost anything. + + For the basic 1-button Multisystem joystick you connect its wires to the +parallel port like this: + +(pin 1) -----> Power +(pin 18) -----> Ground + +(pin 2) -----> Up +(pin 3) -----> Down +(pin 4) -----> Left +(pin 5) -----> Right +(pin 6) -----> Button 1 + + However, if the joystick is switch based (eg. clicks when you move it), +you might or might not, depending on your parallel port, need 10 kOhm pullup +resistors on each of the direction and button signals, like this: + +(pin 2) ------------+------> Up + Resistor | +(pin 1) --[10kOhm]--+ + + Try without, and if it doesn't work, add them. For TTL based joysticks / +gamepads the pullups are not needed. + + For joysticks with two buttons you connect the second button to pin 7 on +the parallel port. + +(pin 7) -----> Button 2 + + And that's it. + + On a side note, if you have already built a different adapter for use with +the digital joystick driver 0.8.0.2, this is also supported by the joy-db9.c +driver, as device type 8. (See section 3.2) + +2.2.2 Multisystem joysticks using joy-console.c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + For some people just one joystick per parallel port is not enough, and/or +want to use them on one parallel port together with NES/SNES/PSX pads. This +is possible using the joy-console.c. It supports up to 5 devices of the +above types, including 1 and 2 buttons Multisystem joysticks. + + However, there is nothing for free. To allow more sticks to be used at +once, you need the sticks to be purely switch based (that is non-TTL), and +not to need power. Just a plain simple six switches inside. If your +joystick can do more (eg. turbofire) you'll need to disable it totally first +if you want to use joy-console.c. + + Also, the connection is a bit more complex. You'll need a bunch of diodes, +and one pullup resistor. First, you connect the Directions and the button +the same as for joy-db9, however with the diodes inbetween. + + Diodes +(pin 2) -----|<|----> Up +(pin 3) -----|<|----> Down +(pin 4) -----|<|----> Left +(pin 5) -----|<|----> Right +(pin 6) -----|<|----> Button 1 + + For two button sticks you also connect the other button. + +(pin 7) -----|<|----> Button 2 + + And finally, you connect the Ground wire of the joystick, like done in +this little schematic to Power and Data on the parallel port, as described +for the NES / SNES pads in section 2.1 of this file - that is, one data pin +for each joystick. The power source is shared. + +Data ------------+-----> Ground + Resistor | +Power --[10kOhm]--+ + + And that's all, here we go! + +2.2.3 Multisystem joysticks using joy-turbografx.c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + The TurboGraFX interface, designed by + + Steffen Schwenke <schwenke@burg-halle.de> + + allows up to 7 Multisystem joysticks connected to the parallel port. In +Steffen's version, there is support for up to 5 buttons per joystick. +However, since this doesn't work reliably on all parallel ports, the +joy-turbografx.c driver supports only one button per joystick. For more +information on how to build the interface, see + + http://www2.burg-halle.de/~schwenke/parport.html + +2.3 Sony Playstation +~~~~~~~~~~~~~~~~~~~~ + + WARNING: PSX support is experimental, and at the moment doesn't seem to +work for most people. If you like adventure, you can try yourself. + + The PSX controller is supported by the joy-console.c. + +Pinout of the PSX controller: + + +---------+---------+---------+ +9 | o o o | o o o | o o o | 1 parallel + \________|_________|________/ port pins + | | | | | | + | | | | | +--------> Clock --- (1) + | | | | +------------> Select --- (17) + | | | +---------------> Power --- (16) + | | +------------------> Ground --- (18-25) + | +-------------------------> Command --- (14) + +----------------------------> Data --- (10,11,12,13,15) one only... + + You may have to add pull up/down resistors. Maybe your pad also won't like +the 5V (PSX uses 3.7V). + + Currently the driver supports only ONE psx pad and only one type of +controller: The normal PSX controller. NEGCON support is planned for the +next release. ANALOG controller may be too (I do not recommend to connect +the "force feedback"/"rumble pack" version... it (may) use too much +power...) + +2.4 Sega +~~~~~~~~ + All the Sega controllers are more or less based on the standard 2-button +Multisystem joystick. However, since they don't use switches and use TTL +logic, the only driver useable with them is the joy-db9.c driver. + +2.4.1 Sega Master System +~~~~~~~~~~~~~~~~~~~~~~~~ + The SMS gamepads are almost exactly the same as normal 2-button +Multisystem joysticks. Set the driver to Multi2 mode, use the corresponding +parallel port pins, and the following schematic: + + +-----------> Power + | +---------> Right + | | +-------> Left + | | | +-----> Down + | | | | +---> Up + | | | | | + _____________ +5 \ o o o o o / 1 + \ o o x o / + 9 `~~~~~~~' 6 + | | | + | | +----> Button 1 + | +--------> Ground + +----------> Button 2 + +2.4.2 Sega Genesis aka MegaDrive +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + The Sega Genesis (in Europe sold as Sega MegaDrive) pads are an extension +to the Sega Master System pads. They use more buttons (3+1, 5+1, 6+1). Use +the following schematic: + + +-----------> Power + | +---------> Right + | | +-------> Left + | | | +-----> Down + | | | | +---> Up + | | | | | + _____________ +5 \ o o o o o / 1 + \ o o o o / + 9 `~~~~~~~' 6 + | | | | + | | | +----> Button 1 + | | +------> Select + | +--------> Ground + +----------> Button 2 + + The Select pin goes to pin 14 on the parallel port. + +(pin 14) -----> Select + + The rest is the same as for Multi2 joysticks using joy-db9.c + +2.4.3 Sega Saturn +~~~~~~~~~~~~~~~~~ + Sega Saturn has eight buttons, and to transfer that, without hacks like +Genesis 6 pads use, it needs one more select pin. Anyway, it is still +handled by the joy-db9.c driver. Its pinout is very different from anything +else. Use this schematic: + + +-----------> Select 1 + | +---------> Power + | | +-------> Up + | | | +-----> Down + | | | | +---> Ground + | | | | | + _____________ +5 \ o o o o o / 1 + \ o o o o / + 9 `~~~~~~~' 6 + | | | | + | | | +----> Select 2 + | | +------> Right + | +--------> Left + +----------> Power + + Select 1 is pin 14 on the parallel port, Select 2 is pin 16 on the +parallel port. + +(pin 14) -----> Select 1 +(pin 16) -----> Select 2 + + The other pins (Up, Down, Right, Left, Power, Ground) are the same as for +Multi joysticks using joy-db9.c + +3. The drivers +~~~~~~~~~~~~~~ + There are three drivers for the parallel port interfaces. Each, as +described above, allows to connect a different group of joysticks and pads. +Here are described their command lines: + +3.1 joy-console.c +~~~~~~~~~~~~~~~~~ + Using joy-console.c you can connect up to five devices to one parallel +port. It uses the following kernel/module command line: + + js_console=port,pad1,pad2,pad3,pad4,pad5 + + Where 'port' is either the address of the parallel port the joystick/pad +is connected to (eg. 0x378), or, if you are using the parport driver of 2.1+ +Linux kernels, the number of the parport interface (eg. 0 for parport0). + + And 'pad1' to 'pad5' are pad types connected to different data input pins +(10,11,12,13,15), as described in section 2.1 of this file. + + The types are: + + Type | Joystick/Pad + -------------------- + 0 | None + 1 | SNES pad + 2 | NES pad + 4 | Multisystem 1-button joystick + 5 | Multisystem 2-button joystick + 6 | Sony PSX controller + + The exact type of the PSX controller type is autoprobed, so you must have +your controller plugged in before initializing. + + Should you want to use more than one of parallel ports at once, you can +use js_console_2 and js_db9_3 as additional command line parameters for two +more parallel ports. + + Changes: + v0.1 : First version (SNES only) + v0.2 : X/Y directions were exchanged... + v0.3 : Adaptation for kernel 2.1 + v0.4 : Adaptation for joystick-1.2.6 + - added open/close callbacks + v0.5 : Renamed to "joy-console" because I have added + PSX controller support. + v0.6 : NES support + v0.7V : Added "multi system" support + v0.8 : Bugfixed PSX driver... + v0.9V : Changed multi system support + Added Multi2 support + Fixed parport handling + Cleaned up + v0.10 : Fixed PSX buttons 8 and 9 + v0.11V: Switched to EXCL mode + Removed wakeup + +3.2 joy-db9.c +~~~~~~~~~~~~~ + Apart from making an interface, there is nothing difficult on using the +joy-db9.c driver. It uses the following kernel/module command line: + + js_db9=port,type + + Where 'port' is either the address of the parallel port the joystick/pad +is connected to (eg. 0x378), or, if you are using the parport driver of 2.1+ +Linux kernels, the number of the parport interface (eg. 0 for parport0). + + 'Type' is the type of joystick or pad attached: + + Type | Joystick/Pad + -------------------- + 0 | None + 1 | Multisystem 1-button joystick + 2 | Multisystem 2-button joystick + 3 | Genesis pad (3+1 buttons) + 5 | Genesis pad (5+1 buttons) + 6 | Genesis pad (6+1 buttons) + 7 | Saturn pad + 8 | Multisystem 1-button joystick (v0.8.0.2 pin-out) + + Should you want to use more than one of these joysticks/pads at once, you +can use js_db9_2 and js_db9_3 as additional command line parameters for two +more joysticks/pads. + + Changes: + v0.1 : First version + v0.2 : Changed kernel parameter format + v0.3V: Added Sega Saturn support + Fixed parport and PS/2 mode handling + Cleaned up + v0.4V: Switched to EXCL mode + Removed wakeup + v0.5V: Added 0.8.0.2 HW compatibility for Multi sticks + +3.3 joy-turbografx.c +~~~~~~~~~~~~~~~~~~~~ + The joy-turbografx.c driver uses a very simple kernel/module command line: + + js_tg=port,js1,js2,js3,js4,js5,js6,js7 + + Where 'port' is either the address of the parallel port the interface is +connected to (eg. 0x378), or, if you are using the parport driver of 2.1+ +Linux kernels, the number of the parport interface (eg. 0 for parport0). + + 'jsX' is the number of buttons the Multisystem joysticks connected to the +interface ports 1-7 have. For a standard multisystem joystick, this is 1. + + Should you want to use more than one of these interfaces at once, you can +use js_tg_2 and js_tg_3 as additional command line parameters for two more +interfaces. + +3.4 End +~~~~~~~ + That's all, folks! Have fun! diff --git a/Documentation/joystick.txt b/Documentation/joystick.txt index 672d0ecfa..9e3a2320a 100644 --- a/Documentation/joystick.txt +++ b/Documentation/joystick.txt @@ -1,213 +1,651 @@ - PC Joystick driver v1.0.9 - (c) 1997 Vojtech Pavlik <vojtech@atrey.karlin.mff.cuni.cz> + Linux Joystick driver v1.2.13 + (c) 1996-1998 Vojtech Pavlik <vojtech@ucw.cz> ---------------------------------------------------------------------------- +0. Disclaimer +~~~~~~~~~~~~~ + This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) +any later version. + + This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. + + You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Should you need to contact me, the author, you can do so either by e-mail +- mail your message to <vojtech@ucw.cz>, or by paper mail: Vojtech Pavlik, +Ucitelska 1576, Prague 8, 182 00 Czech Republic + + For your convenience, the GNU General Public License version 2 is included +in the package: See the file COPYING. + 1. Intro ~~~~~~~~ - The PC Joystick driver for Linux provides support for analog (variable -resistor based) and digital (switch based) joysticks connected via the PC -game port. It can support up to 2 joysticks. + The joystick driver for Linux provides support for a variety of joysticks +and similar devices. + + These currently include various analog joysticks and gamepads (both +variable resistor based and microswitch+resistor based), following IBM PC +joystick standard, with extensions like additional hats and buttons +compatible with CH Flightstick Pro, ThrustMaster FCS or 6 and 8 button +gamepads. + + In addition to these it also supports some of the new PC joysticks that +use proprietary digital protocols to communicate over the gameport, +currently by FPGaming, Genius, Gravis, Logitech, MadCatz, Microsoft and +ThrustMaster. Creative Labs protocol support is still to be done. + + The driver also includes support for many gamepads and joysticks that were +used by various non-PC computers and game consoles. These include Multi +system joysticks (Atari, Amiga, Commodore, Amstrad), Sega gamepads (Master +System, Genesis, Saturn), Nintendo gamepads (NES, SNES), Sony gamepads (PSX). +Support for N64, Atari Jaguar, Atari 2600, NES FourScore, SNES MultiTap, +PSX NegCon and others might be added later. + + Last, but not least there is also native Amiga joystick support for the +Amiga linux port. Should you encounter any problems while using the driver, or joysticks this driver can't make complete use of, I'm very interested in hearing about them. Bug reports and success stories are also welcome. + The joystick package is available at the following FTP sites: + + ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick/ + ftp://artax.karlin.mff.cuni.cz/pub/linux/joystick/ + + The joystick driver is also included in the Linux 2.1 kernels: + + ftp://linux.kernel.org/pub/linux/kernel/v2.1/ + + And a homepage of the driver is at: + + http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/ + http://artax.karlin.mff.cuni.cz/~vojtech/joystick/ + + A mirror of the homepage is at: + + http://www.trylinux.com/projects/joystick/ + + There is also a mailing list for the driver at: + + listproc@atrey.karlin.mff.cuni.cz + +send "subscribe linux-joystick Your Name" to subscribe to it. + 2. Usage ~~~~~~~~ - If you enable the joystick driver in the kernel configuration, all -connected joysticks should be found automatically. The driver can detect -standard two-axis two-button, and three-axis four-button joysticks only. If -that isn't your case, you can pass the joystick driver the following kernel -command line arguments: + You could have obtained this driver in two different ways - either in the +joystick package or in the kernel. Because, for successful usage of the +joysticks, the utilities in the package are useful, maybe necessary, and +definitely recommended, I suggest you getting the package at some of the +above mentioned locations. The rest of this file assumes you have it. + +2.1 Compiling the driver package +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + To compile the utilities in the joystick package, and the driver itself, +as a standalone module, you first unpack the package, and then edit the +Makefile to meet your needs (namely whether are you using versioned +modules). Then you compile it + + make + + And after that you install it + + make install + + In case you have not used the driver before, you'll need to create the +joystick device files in /dev so that applications can use them: + + make devs + + For manual creation of the joystick devices, check the +Documentation/devices.txt file in the Linux source tree. + + Should you not want to mess with the kernel, and just use the driver +standalone, as modules, skip the next two sections, proceeding right to 2.4, +because all you need is already done. + +2.2 Patching the kernel +~~~~~~~~~~~~~~~~~~~~~~~ + If you already have the most recent joystick driver in your kernel, skip +this section. If not, you need to patch the kernel, so that it contains the +current driver version. You do that with a command: + + patch -Esp1 < /usr/src/joystick-1.2.x/kernel-2.x.y.diff + +in + + /usr/src/linux + +2.3 Compiling the kernel +~~~~~~~~~~~~~~~~~~~~~~~~ + To compile joystick support into the kernel, use the kernel configuration +scripts, and answer 'Y' to Joystick support and also to at least one of the +hardware specific options. After doing something like + + make bzlilo + + you are done with the driver installation. Just reboot and the driver +should find all the connected joysticks. Read the notes about the hardware +specific drivers later in this file, though. + + You can also compile the driver as modules, answering 'M' to all joystick +support you want to have modules for. It is possible to have the main +joystick driver compiled into the kernel and the hardware dependent drivers +as modules. After you compile the modules + + make modules + + And install them + + make modules_install + + you're set, and can proceed to the next step. + +2.4 Inserting the modules into the kernel +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + After installing the modules you'll first need to insert the generic +joystick driver module into the kernel + + insmod joystick + + and then one or more of the hardware specific modules + + insmod joy-something + + where 'something' is the type of your joystick. See below for more precise +explanation. + +2.5 Verifying that it works +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + For testing the joystick driver functionality, there is the jstest +program. You run it by typing: + + jstest /dev/js0 + + And it should show a line with the joystick values, which update as you +move the stick, and press its buttons. The axes should all be zero when the +joystick is in the center position. They should not jitter by themselves to +other close values, and they also should be steady in any other position of +the stick. They should have the full range from -32767 to 32767. If all this +is met, then it's all fine, and you can play the games. :) + + If it's not, then there might be a problem. Try to calibrate the joystick, +and if it still doesn't work, read the drivers section of this file, the +troubleshooting section, and the FAQ. + +2.6. Calibration +~~~~~~~~~~~~~~~~ + For most joysticks you won't need any manual calibration, since the +joystick should be autocalibrated by the driver automagically. However, with +some analog joysticks, that either do not use linear resistors, or if you +want better precision, you can use the jscal program + + jscal -c /dev/js0 + + included in the joystick package to set better correction coefficients than +what the driver would choose itself. + + After calibrating the joystick you can verify if you like the new +calibration using the jstest command, and if you do, you then can save the +correction coefficients into a file + + jscal -s /dev/js0 > /etc/joystick.cal + + And add a line to your rc script executing that file + + source /etc/joystick.cal + + This way, after the next reboot your joystick will remain calibrated. You +can also add the jscal -s line to your shutdown script. + + +3. HW specific driver information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In this section each of the separate hardware specific drivers is described. + +3.1 Analog joysticks +~~~~~~~~~~~~~~~~~~~~ + The joy-analog.c uses the standard analog inputs of the gameport, and thus +supports all standard joysticks and gamepads. It also supports extensions +like additional hats and buttons compatible with CH Flightstick Pro, +ThrustMaster FCS or 6 and 8 button gamepads. + + However the only types that can be autodetected are: + +* 2-axis, 4-button joystick +* 3-axis, 4-button joystick +* Two 2-axis, 2-button joysticks on an Y-cable -js=0xXX,0xYY + For other joystick types (more/less axes, hats, and buttons) support +you'll need to specify the types either on the kernel command line or on the +module command line, when inserting joy-analog.o into the kernel. The +parameters are: - Where XX and YY are bit masks for the two joysticks, with the bits -representing which buttons and axes of the joystick are present: + js_an=p0,m0,n0,p1,m1,n1 ... -Bit | Explanation ------------------ - 0 | Axis 0 - 1 | Axis 1 - 2 | Axis 2 - 3 | Axis 3 - 4 | Button 0 - 5 | Button 1 - 6 | Button 2 - 7 | Button 3 + Where 'p' is the port number, eg. 0x201, which is the standard address. +'m' and 'n' are joystick 0 and joystick 1 bitmasks for the specified +joystick port. The bits in the bitmasks mean: - Another method of using the driver is loading it as a module. For that, -select `M' for this driver in the kernel configuration and insert the -module: + Bit | 2^n | Meaning + ---------------------------------- + 0 | 1 | Axis X1 + 1 | 2 | Axis Y1 + 2 | 4 | Axis X2 + 3 | 8 | Axis Y2 + 4 | 16 | Button A + 5 | 32 | Button B + 6 | 64 | Button C + 7 | 128 | Button D + 8 | 256 | CHF Buttons X and Y + 9 | 512 | CHF Hat 1 + 10 | 1024 | CHF Hat 2 + 11 | 2048 | FCS Hat + 12 | 4096 | Pad Button X + 13 | 8192 | Pad Button Y + 14 | 16384 | Pad Button U + 15 | 32768 | Pad Button V -insmod joystick.o js=0xXX,0xYY +(CHF = CH Flightstick Pro, FCS = ThrustMaster FCS) - To enable autoloading/-unloading of the joystick module, you have to add -these lines to /etc/conf.modules: + Following is a table of joysticks for which the 'm' values are known. If +you have any additions/corrections to it, e-mail me. -alias char-major-15 joystick -options joystick js=0xXX,0xYY + Joystick | 'm' value + ---------------------------------------------------- + Genius Flight2000 F-12 | 0x00f3 + Genius Flight2000 F-21 | 0x08f7 + Genius Flight2000 F-22 | 0x02ff + Genius GameHunter G-06 | 0xf0f3 + Genius MaxFire G-07 | 0xf0f3 + Genius PowerStation | 0xf0f3 + Laing #1 PC SuperPad | 0xf0f3 + Microsoft SideWinder Standard | 0x003b + QuickShot QS-201 SuperWarrior | 0x00fb + Saitek Megapad XII | 0x30f3 - To enable the user space programs to read the joystick device, you have to -create the device files using mknod (man mknod for more info): + In case you have one of the joystick in the table below, and it doesn't +work with a specific driver in digital mode for some reason, you can use +them in analog mode with the joy-analog driver as well. However, digital +operation is always better. -mknod /dev/js0 c 15 0 -mknod /dev/js1 c 15 1 + Joystick | 'm' value + ---------------------------------------------------- + Gravis GamePad Pro - analog mode | 0x00f3 + Genius Flight2000 F-23 - CHF mode | 0x02ff + Genius Flight2000 F-23 - FCS mode | 0x08f7 + Microsoft SideWinder 3D Pro - CHF mode | 0x02ff + Microsoft SideWinder 3D Pro - FCS mode | 0x08f7 -3. Calibration -~~~~~~~~~~~~~~ - As of version 1.0 the calibration routines used in the joystick driver are -worth using. The idea of calibration is that you have to calibrate the -joystick only once, and then set the calibration at boot-time, thus removing -the need of re-calibrating it in each program that uses it. + An example that would configure the driver to use two two axis, two button +joysticks connected to port 0x201, a single four button four axis joystick +connected to port 0x202, a four axis, six button and two hat CHF compatible +joystick on 0x203, and a two axis four button FCS compatible joystick with a +single hat on 0x207: - For calibration, use the jscal program, contained in the joystick package -which is available at: + js_an=0x201,0x33,0xcc,0x202,0xff,0,0x203,0x7ff,0,0x207,0x8f3,0 -ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick/joystick-1.0.9.tar.gz + If you can't sum bits into hex numbers in your head easily, you can simply +sum the values in the 2^n column decimally and use that number instead. +Using this method you'd get a command line: -4. Programming Interface + js_an=0x201,51,204,0x202,255,0,0x203,2047,0,0x207,2291,0 + + And it would do the same as the above explained command line. Use +whichever way you like best. + +3.2 Microsoft SideWinder and Genius Digital joysticks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SideWinder and Genius Digital joysticks are supported by the +joy-sidewinder.c module. All currently supported joysticks: + +* SideWinder 3d Pro +* SideWinder Precision Pro +* SideWinder Force Feedback Pro +* SideWinder Game Pad (up to four, chained together) +* Genius Flight2000 Digital F-23 + + are autodetected, and thus no module parameters are needed. + + The SideWinder Standard is not a digital joystick, and thus is supported +by the analog driver described above. SideWinder FreeStyle Pro and +SideWinder Force Feedback Wheel are not supported yet. + +3.3 Logitech Digital joysticks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Logitech Digital joysticks are supported by the joy-logitech.c module. It +currently supports these devices: + +* Logitech Wingman Extreme Digital +* Logitech CyberMan 2 +* Logitech ThunderPad Digital + + All three are autodetected, and thus no parameters to the module are +needed. + + Logitech Wingman is not a digital joystick and is handled by the analog +driver described above. Logitech Wingman Warrior communicates through a +serial port and is not supported yet. Logitech Wingman Force, Wingman +Formula, Wingman Formula Force, Wingman Gamepad, Wingman Interceptor are USB +joysticks, with optional serial port connection, and are not supported yet. + +3.4 Gravis GrIP +~~~~~~~~~~~~~~~ + Gravis GrIP gamepads are supported by the joy-gravis.c module. It +currently supports: + +* Gravis GamePad Pro +* Gravis Xterminator +* Gravis Blackhawk Digital + + All these pads are autodetected, and you can even use any combination of +up to two of these pads either chained together or using an Y-cable on a single +gameport. + +GrIP MultiPort support is in the works. Gravis Xcalibur, ArcadeXtreme, +GamePad Pro/M are joysticks/pads that probably never reached mass +production. Gravis Stinger is a serial device and hopefully will be +supported in the future. + +3.5 FPGaming A3D and MadCatz A3D +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + The Assasin 3D protocol created by FPGaming, is used both by FPGaming +themselves and is licensed to MadCatz. A3D devices are supported by the +joy-assasin.c module. It currently supports: + +* FPGaming Assasin 3D +* MadCatz Panther +* MadCatz Panther XL + + All these devices are autodetected. Because the Assasin 3D and the Panther +allow connecting analog joysticks to them, these are supported in this +driver, too. The driver uses the js_as parameter for the analog joysticks, +which has the same syntax as js_an for the analog driver. + + The trackball support is far from perfect at this stage of development, +but should be well usable. + +3.6 ThrustMaster DirectConnect (BSP) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + The TM DirectConnect (BSP) protocol is supported by the joy-thrustmaster.c +module. It currently supports: + +* ThrustMaster Millenium 3D Inceptor +* ThrustMaster 3D Rage Pad + + Both these drvices are autodetected, and thus no parameters to the module +are needed. + + The Millenium and Rage Pad should work fine now. TM WCS III won't work, +because important parts of code for that are missing. I'm not sure if it was +ever mass produced. + +3.7 PDPI Lightning 4 gamecards +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + PDPI Lightning 4 gamecards are supported by the joy-lightning.c module. +This driver is only for analog joysticks connected to the card - if you want +to use some of the digital devices, you need to use its specific driver. The +card will work in legacy mode with them, though. + + Since all features of analog joysticks can't be detected, this driver +needs a command line: + + js_l4=p0,m0,n0,p1,m1,n1,.... + + As you can see, it's very similar to the analog drivers command line. +Actually it is the same except for the meaning of p0. p0 in this case is the +port the joystick is attached to: + + p | Port + ---------------------------- + 0 | Primary card, port 1 + 1 | Primary card, port 2 + 2 | Primary card, port 3 + 3 | Primary card, port 4 + 4 | Secondary card, port 1 + 5 | Secondary card, port 2 + 6 | Secondary card, port 3 + 7 | Secondary card, port 4 + + Two cards maximum are allowed in one system, because of the card's design. + + See the description of analog joystick driver for explanations of m0 and +n0 values. + +3.8 Amiga +~~~~~~~~~ + Amiga joysticks, connected to an Amiga, are supported by the joy-amiga.c +driver. Since they can't be autodetected, the driver has a command line. + + js_am=a,b + + a and b define the joysticks connected to the JOY0DAT and JOY1DAT ports of +the Amiga. + + Value | Joystick type + --------------------- + 0 | None + 1 | 1-button digital joystick + + No more joystick types are supported now, but that should change in the +future if I get an Amiga in the reach of my fingers. + +3.9 Game console and 8-bit pads and joysticks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +See joystick-parport.txt for more info. + +4. Troubleshooting +~~~~~~~~~~~~~~~~~~ + There is quite a high probability that you run into some problems. For +testing whether the driver works, if in doubt, use the jstest utility in +some of its modes. The most useful modes are "normal" - for the 1.x +interface, and "old" for the "0.x" interface. You run it by typing: + + jstest --normal /dev/js0 + jstest --old /dev/js0 + + If your trouble stems from the fact the drivers can't detect the attached +joystick, and/or you decide you need my help (which I will gladly provide), +please use the joydump utility first. It's created just by typing + + make joydump.o + + in the directory where you unpacked the joystick package. It is run then +by typing + + insmod joydump.o + + in the same directory. It will return a 'device busy' or 'initialization +failed' error. This is perfectly okay. It has already done it's job. The +results can be found in the system log. Please send me the results along +with your problem report. + + Oh, and read the FAQ! :) + +5. FAQ +~~~~~~ + Q: The driver doesn't find any joysticks connected to my soundcard with the +message "joy-something: no joysticks found" and "joy-something.o: +init_module: Device or resource busy." or "Initialization of joy-something +failed" What could be the cause? + A: The most common cause is that the joystick port on your soundcard is +not enabled. If it is an ISA PnP card, you'll need isapnptools to configure +the gameport. Non-PnP cards usually use some option to the sound driver - +see the sound driver docs and source and enable the port. + + Q: Any access to the joystick devices gives me "Operation not supported by +device". What am I doing wrong? + A: You're running a 2.0 kernel and you forgot to insmod the hardware +specific module. You not only need the joystick.o, but also one of the other +joy-*.o files (most usually joy-analog.o), as described in this document, +section 2. If you are not using modules, then you didn't say 'Y' to any of +the hardware-specific questions. Again, see section 2. If you did select +the specific support, and you still get this message, check that you +selected the right one, and if it still doesn't work, go to the previous +FAQ. + + Q: Everything is fine, except I get "No such device" error when I try to +do anything with /dev/js0. What's the cause? + A: You're running a 2.1 kernel and you want to read the previous FAQ. + + Q: Upon 'insmod joystick.o' I get a LOT of unresolved symbols, including +printk and others. Why? + A: You either don't have your kernel compiled with module support. If +that's the cause, re-compile your kernel with module support switched on. +Or, you use versioned symbols, and don't have -DMODVERSIONS in the joystick +driver Makefile, or vice versa. Correct the situation by either removing or +adding -DMODVERSIONS to the Makefile. + + Q: Running 'jstest 1' or 'jscal 1' doesn't work, and returns with "File +not found" error. What is the problem? + A: The command line interface for these tools is different from what +version 0.8.0 used. You have to specify the whole device name, eg. 'jstest +/dev/js0'. + + Q: Running 'jstest /dev/js0' results in "File not found" error. What's the +cause? + A: The device files don't exist. Run 'make devs'. + + Q: Is it possible to connect my old Atari/Commodore/Amiga/console joystick +or pad that uses a 9-pin D-type cannon connector to the serial port of my +PC? + A: Yes, it is possible, but it'll burn your serial port or the pad. It +won't work, of course. + + Q: My joystick doesnt work with Quake / Quake 2. What's the cause? + A: Quake / Quake 2 don't support joystick. Use joy2key to simulate keypresses +for them. + +6. Programming Interface ~~~~~~~~~~~~~~~~~~~~~~~~ The 1.0 driver uses a new, event based approach to the joystick driver. Instead of the user program polling for the joystick values, the joystick -driver now reports only any changes of its state. See joystick.h and -jstest.c included in the joystick package for more information. The joystick -device can be used in either blocking or nonblocking mode and supports -select() calls. +driver now reports only any changes of its state. See joystick-api.txt, +joystick.h and jstest.c included in the joystick package for more +information. The joystick device can be used in either blocking or +nonblocking mode and supports select() calls. - For backward compatibility the old interface is still included, but will -be dropped in the future. + For backward compatibility the old (v0.x) interface is still included. +Any call to the joystick driver using the old interface will return values +that are compatible to the old interface. This interface is still limited +to 2 axes, and applications using it usually decode only 2 buttons, although +the driver provides up to 32. -5. Credits +7. Credits ~~~~~~~~~~ - Thanks to the following authors that contributed to the joystick driver -development: - - 0.1-0.5 Arthur C. Smith <asmith@cbnewsd.att.com> - 0.5 Eyal Lebedinsky <eyal@eyal.emu.id.au> - 0.6 Jeff Tranter <tranter@software.mitel.com> - 0.7 Carlos Puchol <cpg@cs.utexas.edu> - 0.7.1-0.8 Matt Rhoten <mrhoten@oz.net> - 0.7.3 Dan Fandrich <dan@fch.wimsey.bc.ca> - 0.7.3 Sverker Wilberg <sverkerw@manila.docs.uu.se> - 0.8 Hal Maney <maney@norden.com> - 0.8 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> - 0.9 Alan Cox <alan@lxorguk.ukuu.org.uk> - 0.9.0-1.0.9 Vojtech Pavlik <vojtech@atrey.karlin.mff.cuni.cz> - -6. Change Log -~~~~~~~~~~~~~ - The current (1.0.x) version was originally based on the 0.7.3 version of -the joystick driver, which caused some inconsistencies in version numbering. -The following log documents all changes done to the driver by the above -contributors: - -Version 0.1 Original version - Works but lacks multi-joystick support -Version 0.2 Added multi-joystick support (minor 0 and 1) - Added delay between measuring joystick axis - Added scaling ioctl -Version 0.3 Modified scaling to use ints to prevent kernel - panics 8-) -Version 0.4 Linux 0.99.6 and fixed race condition in js_read. - After looking at a schematic of a joystick card - it became apparent that any write to the joystick - port started ALL the joystick one shots. If the - one that we are reading is short enough and the - first one to be read, the second one will return - bad data if its one shot has not expired when - the joystick port is written for the second time. - Thus solves the mystery delay problem in 0.2! -Version 0.5 Upgraded the driver to the 0.99.9 kernel, added - joystick support to the make config options, - updated the driver to return the buttons as - positive logic, and read both axis at once - and added some new ioctls. -Version 0.6 Made necessary changes to work with 0.99.15 - kernel (and hopefully 1.0). Also did some - cleanup: indented code, fixed some typos, wrote - man page, etc ... -Version 0.7 Support for modules -Version 0.7.1 Fix bug in reading button state of js1 - Add include so module compiles under recent kernels -Version 0.7.3 Include directives changed for joystick.h - Separated out joystick detection/counting, cleanup - Fix for detection of 3-axis joysticks - Better detection announcement - Added I/O port registration, cleaned up code -Version 0.8 New read loop - Cleaned up #includes to allow #include of joystick.h with - gcc -Wall and from g++ - Made js_init fail if it finds zero joysticks - General source/comment cleanup - Use of MOD_(INC|DEC)_USE_COUNT - Changes to compile correctly under 1.3 in kernel or as module -Version 0.9 Ported to 2.1.x - Reformatted to resemble Linux coding standard - Removed semaphore bug (we can dump the lot I think) - Fixed xntp timer adjust during joystick timer0 bug - Changed variable names to lower case. Kept binary compatibility. - Better ioctl names. Kept binary compatibility. - Removed 'save_busy'. Just set busy to 1. -Version 0.9.0 Based on 0.7.3 - New read function that allows two axes to have the same value - New joystick calibration code - Real support for 3-axis joysticks - CPU speed independent timeouts - Reads may happen even for unwhole record size => cat /dev/js0 works - Correct error for lseek - /dev/js? can be read simultaneously by several processes -Version 0.9.1 IOCTLs now obey general Linux IOCTL rules ('j' letter assigned) - Use of verify_area result codes - Fuzz correction added - Semaphore and many cli()'s removed - Fix for TurboFire joysticks - read buttons always - Fix for broken joysticks - return with -ENODEV only if joystick - completely disconnected - Fix in read function to allow zero results - Broken line correction added for broken joysticks (eg. JB-500) - Timeouts back separated for easier setting - Some fixes and cleanups in read function -Version 0.9.2 Fixed a typo causing nothing to be working -Version 1.0.0 Event approach started -Version 1.0.1 Complete rewrite - Compiles but doesn't work -Version 1.0.2 Works, many bugs fixed, more yet to come -Version 1.0.3 Tail cutting logic changes & fixes - Fix in js_do_bh - no more zero values for axes - Lost event changes & fixes -Version 1.0.4 Kernel command line & module configuration support - Better cli()/sti() handling - Linux 2.1.25 select => poll changes -Version 1.0.5 Fixes in calibration routines - Better jscal -Version 1.0.6 Backward compatibility with old js driver added - Init value after recalibration bug fixed - Using KERN_* printk() codes - Finally leaving ALPHA and going beta - Cosmetic changes -Version 1.0.7 Readme update - Linux 2.1.89 poll update - Compatibility mode fix - refresh data after open - Cosmetic changes & cleanup -Version 1.0.8 Changing the __u16 data to __s16 in event packet - The range is now -32727..0..32767 - Broken line correction needs 2 coefs less - Fix to report number of buttons correctly - Removed various trailing spaces -Version 1.0.9 Fix for compatibility mode - don't do correction - Fix max number of module parameters - -7. To do + Thanks to the following people who contributed code, ideas or specifications +to the joystick driver development: + + Arthur C. Smith <asmith@cbnewsd.att.com> + Eyal Lebedinsky <eyal@eyal.emu.id.au> + Jeff Tranter <tranter@software.mitel.com> + Carlos Puchol <cpg@cs.utexas.edu> + Matt Rhoten <mrhoten@oz.net> + Dan Fandrich <dan@fch.wimsey.bc.ca> + Sverker Wilberg <sverkerw@manila.docs.uu.se> + Hal Maney <maney@norden.com> + Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> + Alan Cox <alan@lxorguk.ukuu.org.uk> + John Markus Bjorndalen <johnm@cs.uit.no> + Boris Muehmer <mhs@cybernet-ag.de> + Robert W. Grubbs <rwgrubbs@vt.edu> + Pete Chown <pete.chown@skygate.co.uk> + Benji York <benji@cookeville.com> + Leslie F. Donaldson <donaldlf@cs.rose-hulman.edu> + Eng-Jon Ong <ongej@dcs.qmw.ac.uk> + Ragnar Hojland Espinosa <ragnar@lightside.ddns.org> + Brian Gerst <bgerst@quark.vpplus.com> + Andree Borrmann <a.borrmann@tu-bs.de> + Martin Giguere <zefrench@hotmail.com> + + If you think you should be in this list and are not, it's possible that +I forgot to include you - contact me and I'll correct the error. :) + + Thanks to KYE Systems Europe, who provided me with driver sources for the +Genius Flight2000 Digital F-23, which happens to be compatible with +Microsoft SideWinder 3d Pro. + + Thanks to ThrustMaster Inc. who provided me with docs for their digital +protocol, and to Trystan A Larey-williams <axe@mail.wsu.edu>, who wrote an +attempt of a driver for them. + + Thanks to Creative Labs Europe, and Ifor Powell <ipowell@cle.creaf.com>, +who provided me with docs for their first generation gamepad. + + Special thanks go to FP-Gaming, Inc. and James C Barnes <james@fpgaming.com>, +who provided me with help and detailed information about the Assasin 3D +protocol and devices, and even sent me a Panther and Panther XL for testing, +along with cool T-shirts. + + Special thanks to PDPI, Mike Pelkey <pdpi@email.msn.com> and Brand Kvavle +<BrandK@blackdiamond.com>, for providing me with documentation and example +code for their L4 gamecard, and sending me the card to test my driver with +it. + + Thanks to everyone else who helped me develop this package of drivers! + + No thanks to Microsoft, Logitech, and Gravis, who don't release a word +about their hardware .... :( + +8. ChangeLog +~~~~~~~~~~~~ + See the ChangeLog file for the log of changes. + +9. To do ~~~~~~~~ - Sooner or later I'll get to these: + See the TODO file for the list of things planned. + +10. Current driver status +~~~~~~~~~~~~~~~~~~~~~~~~~ + OK means tested and not touched till this driver revision, unknown means +that the driver was changed since last test, broken means doesn't work, +incomplete means can't work, because vital parts of support are missing. - Make an optional read routine using Pentium timers for better precision (*) - Support for hats and more buttons ala CH Flightstick (*) - Support for hats ala TM FCS (*) - Include support for MS SideWinder digital mode (*) - Create patches for most common programs using joystick - Support for cards with HW speed compensation - Support for more than one joystick port +joystick.c: 2.1.x kernel interface - OK +joy-amiga.c: Multi1 stick - unknown +joy-analog.c: standard joysticks - OK + FCS hats - OK + CHF hats & buttons - OK + XY buttons - OK + UV buttons - OK +joy-assasin.c: MadCatz Panther XL - OK + MadCatz PXL rudder - OK + MadCatz Panther - OK + FPG Assasin 3D - OK +joy-console.c: NES pad - OK + SNES pad - OK + Multi1 stick - OK + Multi2 stick - OK + PSX - SW OK, HW unreliable +joy-db9.c: Multi1 stick - OK + Multi2 stick - OK + Sega Genesis pad - OK + Sega Genesis 5 pad - OK + Sega Genesis 6 pad - OK + Sega Saturn pad - unknown +joy-gravis.c Gravis GamePad Pro - OK + Gravis Xterminator - OK + Gravis Blackhawk Digital- OK +joy-lightning.c PDPI Lightning 4 - OK +joy-logitech.c WingMan Extreme Digital - OK + CyberMan 2 - OK + Thunder Pad Digital - unknown +joy-sidewinder.c SW 3D Pro - OK + Genius F-23 - OK + SW GP - OK + SW PP - OK + SW FFP - OK +joy-thrustmaster.c Millenium 3D Inceptor - OK + 3D-Rage Pad - OK +joy-turbografx.c Multi1 stick - OK - (*) - Already in the development 1.1 version. +Please help me and send me success / failure reports for the drivers, +I need to know what works, and what needs to be debugged. Thank you. diff --git a/Documentation/mca.txt b/Documentation/mca.txt index 75facdf98..9de804532 100644 --- a/Documentation/mca.txt +++ b/Documentation/mca.txt @@ -31,8 +31,7 @@ this. The typical probe code looks like the following: mca_set_adapter_name( slot, "adapter name & description" ); mca_set_adapter_procfn( slot, dev_getinfo, dev ); - /* read the POS registers. Most devices only need - 2 and 3 */ + /* read the POS registers. Most devices only use 2 and 3 */ pos2 = mca_read_stored_pos( slot, 2 ); pos3 = mca_read_stored_pos( slot, 3 ); pos4 = mca_read_stored_pos( slot, 4 ); @@ -45,7 +44,8 @@ this. The typical probe code looks like the following: Loadable modules should modify this to test that the specified IRQ and IO ports (plus whatever other stuff) match. See 3c523.c for example -code. +code (actually, smc-mca.c has a slightly more complex example that can +handle a list of adapter ids). Keep in mind that devices should never directly access the POS registers (via inb(), outb(), etc). While it's generally safe, there is a small @@ -57,11 +57,11 @@ into memory. mca_read_stored_pos() accesses that data. mca_read_pos() and mca_write_pos() are also available for (safer) direct POS access, but their use is _highly_ discouraged. mca_write_pos() is particularly dangerous, as it is possible for adapters to be put in inconsistent -states (e.g. sharing IO address, etc) and may result in crashes, toasted -hardware, and operator injury. +states (i.e. sharing IO address, etc) and may result in crashes, toasted +hardware, and blindness. -User level drivers (such as the AGX X server) can use /proc/mca to find -adapters (see below). +User level drivers (such as the AGX X server) can use /proc/mca/pos to +find adapters (see below). Some MCA adapters can also be detected via the usual ISA-style device probing (many SCSI adapters, for example). This sort of thing is highly @@ -91,8 +91,8 @@ with shared IRQs in mind. /proc/mca ========= -I did a major rewrite of /proc/mca. It is now a directory containing -various files for adapters and other stuff. +/proc/mca is a directory containing various files for adapters and +other stuff. /proc/mca/pos Straight listing of POS registers /proc/mca/slot[1-8] Information on adapter in specific slot @@ -100,6 +100,8 @@ various files for adapters and other stuff. /proc/mca/scsi Same for integrated SCSI /proc/mca/machine Machine information +See Appendix A for a sample. + Device drivers can easily add their own information function for specific slots (including integrated ones) via the mca_set_adapter_procfn() call. Drivers that support this are ESDI, IBM @@ -132,10 +134,9 @@ Enable this function with: Disable it with: mca_set_adapter_procfn( slot, NULL, NULL ); -It is also recommended, even if you don't write a proc function, to -set the name of the adapter (e.g. "PS/2 ESDI Controller") via -mca_set_adapter_name( int slot, char* name ). Up to 30 characters are -used. +It is also recommended that, even if you don't write a proc function, to +set the name of the adapter (i.e. "PS/2 ESDI Controller") via +mca_set_adapter_name( int slot, char* name ). MCA Device Drivers ================== @@ -146,65 +147,174 @@ Currently, there are a number of MCA-specific device drivers. drivers/block/ps2esdi.c include/linux/ps2esdi.h Uses major number 36, and should use /dev files /dev/eda, /dev/edb. - Supports two drives, but only one controller. Usually requires the - command-line args ed=cyl,head,sec + Supports two drives, but only one controller. May use the + command-line args "ed=cyl,head,sec" and "tp720". 2) PS/2 SCSI drivers/scsi/ibmmca.c drivers/scsi/ibmmca.h The driver for the IBM SCSI subsystem. Includes both integrated controllers and adapter cards. May require command-line arg - ibmmcascsi=pun to force detection of an adapter. + "ibmmcascsi=io_port" to force detection of an adapter. If you have a + machine with a front-panel display (i.e. model 95), you can use + "ibmmcascsi=display" to enable a drive activity indicator. 3) 3c523 drivers/net/3c523.c drivers/net/3c523.h - 3Com 3c523 Etherlink/MC Ethernet driver. + 3Com 3c523 Etherlink/MC ethernet driver. -4) SMC Ultra/MCA +4) SMC Ultra/MCA and IBM Adapter/A drivers/net/smc-mca.c drivers/net/smc-mca.h - Elite/A (8013EP/A) and Elite10T/A (8013WP/A) Ethernet driver - -As well, drivers/char/psaux.c was modified to support IRQ sharing (it's -#ifdef CONFIG_MCA'ed, for your convenience, although PCI users might be -able to use it...) + Driver for the MCA version of the SMC Ultra and various other + OEM'ed and work-alike cards (Elite, Adapter/A, etc). + +5) NE/2 + driver/net/ne2.c + driver/net/ne2.h + The NE/2 is the MCA version of the NE2000. This may not work + with clones that have a different adapter id than the original + NE/2. + +6) Future Domain MCS-600/700, OEM'd IBM Fast SCSI Aapter/A and + Reply Sound Blaster/SCSI (SCSI part) + Better support for these cards than the driver for ISA. + Supports multiple cards with IRQ sharing. + +Also added boot time option of scsi-probe, which can do reordering of +SCSI host adapters. This will direct the kernel on the order which +SCSI adapter should be detected. Example: + scsi-probe=ibmmca,fd_mcs,adaptec1542,buslogic The serial drivers were modified to support the extended IO port range of the typical MCA system (also #ifdef CONFIG_MCA). The following devices work with existing drivers: 1) Token-ring -2) Future Domain SCSI (MCS-600, MCS-700, not MCS-350) -3) Adaptec 1640 SCSI (aha1542 driver) -4) Buslogic SCSI (various) +2) Future Domain SCSI (MCS-600, MCS-700, not MCS-350, OEM'ed IBM SCSI) +3) Adaptec 1640 SCSI (using the aha1542 driver) +4) Bustek/Buslogic SCSI (various) +5) Probably all Arcnet cards. +6) Some, possibly all, MCA IDE controllers. +7) 3Com 3c529 (MCA version of 3c509) (patched) + +8) Intel EtherExpressMC (patched version) + You need to have CONFIG_MCA defined to have EtherExpressMC support. +9) Reply Sound Blaster/SCSI (SB part) (patched version) Bugs & Other Weirdness ====================== NMIs tend to occur with MCA machines because of various hardware -weirdness, bus timeouts, and many other non-critical things. Those of -you who have NMI problems should probably set the CONFIG_IGNORE_NMI flag -somewhere. NMIs seem to be particularly common on the model 70. - -Various Pentium machines have serious problems with the FPU test in -bugs.h. You may need to comment out the FPU test before you can even -boot. This occurs, as far as we know, on the Pentium-equipped 85s, 95s, -and some servers. The PCI/MCA PC 750s are fine as far as I can tell. +weirdness, bus timeouts, and many other non-critical things. Some basic +code to handle them (inspired by the NetBSD MCA code) has been added to +detect the guilty device, but it's pretty incomplete. If NMIs are a +persistent problem (on some model 70 or 80s, they occur every couple +shell commands), the CONFIG_IGNORE_NMI flag will take care of that. + +Various Pentium machines have had serious problems with the FPU test in +bugs.h. Basically, the machine hangs after the HLT test. This occurs, +as far as we know, on the Pentium-equipped 85s, 95s, and some PC Servers. +The PCI/MCA PC 750s are fine as far as I can tell. The ``mca-pentium'' +boot-prompt flag will disable the FPU bug check if this is a problem +with your machine. The model 80 has a raft of problems that are just too weird and unique to get into here. Some people have no trouble while others have nothing -but problems. I'd suspect the problems are related to the age of the -average 80 and accompanying hardware deterioration. +but problems. I'd suspect some problems are related to the age of the +average 80 and accompanying hardware deterioration, although others +are definitely design problems with the hardware. Among the problems +include SCSI controller problems, ESDI controller problems, and serious +screw-ups in the floppy controller. Oh, and the parallel port is also +pretty flaky. There were about 5 or 6 different model 80 motherboards +produced to fix various obscure problems. As far as I know, it's pretty +much impossible to tell which bugs a particular model 80 has (other than +triggering them, that is). + +Drivers are required for some MCA memory adapters. If you're suddenly +short a few megs of RAM, this might be the reason. The (I think) Enhanced +Memory Adapter commonly found on the model 70 is one. There's a very +alpha driver floating around, but it's pretty ugly (disassembled from +the DOS driver, actually). See the MCA Linux web page (URL below) +for more current memory info. + +The Thinkpad 700 and 720 will work, but various components are either +non-functional, flaky, or we don't know anything about them. The +graphics controller is supposed to be some WD, but we can't get things +working properly. The PCMCIA slots don't seem to work. Ditto for APM. +The serial ports work, but detection seems to be flaky. Credits ======= A whole pile of people have contributed to the MCA code. I'd include their names here, but I don't have a list handy. Check the MCA Linux -home page (URL below) for an out-of-date list. +home page (URL below) for a perpetually out-of-date list. ===================================================================== -http://glycerine.cetmm.uni.edu/mca +MCA Linux Home Page: http://glycerine.itsmm.uni.edu/mca/ -Chris Beauregard +Christophe Beauregard chrisb@truespectra.com +cpbeaure@calum.csclub.uwaterloo.ca + +===================================================================== +Appendix A: Sample /proc/mca + +This is from my model 8595. Slot 1 contains the standard IBM SCSI +adapter, slot 3 is an Adaptec AHA-1640, slot 5 is a XGA-1 video adapter, +and slot 7 is the 3c523 Etherlink/MC. + +/proc/mca/machine: +Model Id: 0xf8 +Submodel Id: 0x14 +BIOS Revision: 0x5 + +/proc/mca/pos: +Slot 1: ff 8e f1 fc a0 ff ff ff IBM SCSI Adapter w/Cache +Slot 2: ff ff ff ff ff ff ff ff +Slot 3: 1f 0f 81 3b bf b6 ff ff +Slot 4: ff ff ff ff ff ff ff ff +Slot 5: db 8f 1d 5e fd c0 00 00 +Slot 6: ff ff ff ff ff ff ff ff +Slot 7: 42 60 ff 08 ff ff ff ff 3Com 3c523 Etherlink/MC +Slot 8: ff ff ff ff ff ff ff ff +Video : ff ff ff ff ff ff ff ff +SCSI : ff ff ff ff ff ff ff ff + +/proc/mca/slot1: +Slot: 1 +Adapter Name: IBM SCSI Adapter w/Cache +Id: 8eff +Enabled: Yes +POS: ff 8e f1 fc a0 ff ff ff +Subsystem PUN: 7 +Detected at boot: Yes + +/proc/mca/slot3: +Slot: 3 +Adapter Name: Unknown +Id: 0f1f +Enabled: Yes +POS: 1f 0f 81 3b bf b6 ff ff + +/proc/mca/slot5: +Slot: 5 +Adapter Name: Unknown +Id: 8fdb +Enabled: Yes +POS: db 8f 1d 5e fd c0 00 00 + +/proc/mca/slot7: +Slot: 7 +Adapter Name: 3Com 3c523 Etherlink/MC +Id: 6042 +Enabled: Yes +POS: 42 60 ff 08 ff ff ff ff +Revision: 0xe +IRQ: 9 +IO Address: 0x3300-0x3308 +Memory: 0xd8000-0xdbfff +Transceiver: External +Device: eth0 +Hardware Address: 02 60 8c 45 c4 2a diff --git a/Documentation/networking/arcnet-hardware.txt b/Documentation/networking/arcnet-hardware.txt index ce623ed5c..ffebd188e 100644 --- a/Documentation/networking/arcnet-hardware.txt +++ b/Documentation/networking/arcnet-hardware.txt @@ -10,8 +10,8 @@ Because so many people (myself included) seem to have obtained ARCnet cards without manuals, this file contains a quick introduction to ARCnet hardware, some cabling tips, and a listing of all jumper settings I can find. Please -e-mail apenwarr@bond.net with any settings for your particular card, or any -other information you have! +e-mail apenwarr@worldvisions.ca with any settings for your particular card, +or any other information you have! INTRODUCTION TO ARCNET @@ -80,7 +80,7 @@ CABLING ARCNET NETWORKS This section was rewritten by Vojtech Pavlik <Vojtech.Pavlik@st.mff.cuni.cz> using information from several people, including: - Avery Pennraun <apenwarr@bond.net> + Avery Pennraun <apenwarr@worldvisions.ca> Stephen A. Wood <saw@hallc1.cebaf.gov> John Paul Morrison <jmorriso@bogomips.ee.ubc.ca> Joachim Koenig <jojo@repas.de> @@ -438,8 +438,8 @@ Unclassified Stuff PC100, PC110, PC120, PC130 (8-bit cards) PC500, PC600 (16-bit cards) --------------------------------- - - mainly from Avery Pennarun <apenwarr@foxnet.net>. Values depicted are - from Avery's setup. + - mainly from Avery Pennarun <apenwarr@worldvisions.ca>. Values depicted + are from Avery's setup. - special thanks to Timo Hilbrink <timoh@xs4all.nl> for noting that PC120, 130, 500, and 600 all have the same switches as Avery's PC100. PC500/600 have several extra, undocumented pins though. (?) @@ -3129,6 +3129,6 @@ Other Cards I have no information on other models of ARCnet cards at the moment. Please send any and all info to: - apenwarr@bond.net + apenwarr@worldvisions.ca Thanks. diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt index 17f40fb53..3bb2f6d96 100644 --- a/Documentation/networking/arcnet.txt +++ b/Documentation/networking/arcnet.txt @@ -37,7 +37,7 @@ If you think so, why not flame me in a quick little e-mail? Please also include the type of card(s) you're using, software, size of network, and whether it's working or not.) -My e-mail address is: apenwarr@bond.net +My e-mail address is: apenwarr@worldvisions.ca --------------------------------------------------------------------------- @@ -79,9 +79,8 @@ may not work right in the first place. Other Drivers and Info ---------------------- -You can (could - foxnet.net is no more - DW.) try my ARCNET page on the -World Wide Web at: - http://www.foxnet.net/~apenwarr/arcnet/ +You can try my ARCNET page on the World Wide Web at: + http://www.worldvisions.ca/~apenwarr/arcnet/ Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you might be interested in, which includes several drivers for various cards @@ -494,7 +493,7 @@ It works: what now? Send mail describing your setup, preferably including driver version, kernel version, ARCnet card model, CPU type, number of systems on your network, and list of software in use to me at the following address: - apenwarr@bond.net + apenwarr@worldvisions.ca I do send (sometimes automated) replies to all messages I receive. My email can be weird (and also usually gets forwarded all over the place along the diff --git a/Documentation/networking/cs89x0.txt b/Documentation/networking/cs89x0.txt index 78561b9f4..839db8ece 100644 --- a/Documentation/networking/cs89x0.txt +++ b/Documentation/networking/cs89x0.txt @@ -612,7 +612,7 @@ software-update notification. 6.3.1 CRYSTAL'S WEB SITE Crystal Semiconductor maintains a web page at http://www.crystal.com with the -the latest drivers and technical publications. +latest drivers and technical publications. 6.3.2 CRYSTAL'S BULLETIN BOARD SERVICE diff --git a/Documentation/networking/ip_masq/ip_masq-API-ex.c b/Documentation/networking/ip_masq/ip_masq-API-ex.c new file mode 100644 index 000000000..4b6999d55 --- /dev/null +++ b/Documentation/networking/ip_masq/ip_masq-API-ex.c @@ -0,0 +1,77 @@ +/* + There is only 1 optname (see setsockopt(2)), IP_FW_MASQ_CTL that + must be used. + Funcionality depends on your kernel CONFIG options, here is + an example you can use to create an ``incoming'' tunnel: + + See "user.c" module under ipmasqadm tree for a generic example + */ +#undef __KERNEL__ /* Makefile lazyness ;) */ +#include <stdio.h> +#include <stdlib.h> +#include <netinet/in.h> +#include <sys/socket.h> +#include <sys/types.h> +#include <arpa/inet.h> + +#include <asm/types.h> /* For __uXX types */ +#include <net/if.h> +#include <netinet/ip_icmp.h> +#include <netinet/udp.h> +#include <netinet/tcp.h> +#include <linux/ip_fw.h> /* For IP_FW_MASQ_CTL */ +#include <linux/ip_masq.h> /* For specific masq defs */ + + +int create_listening_masq(struct ip_masq_ctl *masq, int proto, u_int32_t src_addr, u_int16_t src_port, u_int32_t dst_addr) +{ + int sockfd; + + sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + + if (sockfd<0) { + perror("socket(RAW)"); + return -1; + } + + memset (masq, 0, sizeof (*masq)); + + /* + * Want user tunnel control + */ + masq->m_target = IP_MASQ_TARGET_USER; + + /* + * Want to insert new + */ + masq->m_cmd = IP_MASQ_CMD_INSERT; + + masq->u.user.protocol = proto; + masq->u.user.saddr = src_addr; + masq->u.user.sport = src_port; + masq->u.user.rt_daddr = inet_addr("192.168.21.239"); + + if (setsockopt(sockfd, IPPROTO_IP, + IP_FW_MASQ_CTL, (char *)masq, sizeof(*masq))) { + perror("setsockopt()"); + return -1; + } + /* masq struct now contains tunnel details */ + fprintf(stderr, "PROTO=%d SRC=0x%X:%x - MASQ=0x%X:%x - DST=0x%X:%x\n", + masq->u.user.protocol, + ntohl(masq->u.user.saddr), ntohs(masq->u.user.sport), + ntohl(masq->u.user.maddr), ntohs(masq->u.user.mport), + ntohl(masq->u.user.daddr), ntohs(masq->u.user.dport)); + return 0; +} + +int main(void) { + struct ip_masq_ctl masq_buf; + + return create_listening_masq(&masq_buf, + IPPROTO_TCP, + inet_addr("192.168.1.4"), + htons(23), + inet_addr("192.168.21.3")); +} + diff --git a/Documentation/networking/ltpc.txt b/Documentation/networking/ltpc.txt index 50a39ea88..ed9983f07 100644 --- a/Documentation/networking/ltpc.txt +++ b/Documentation/networking/ltpc.txt @@ -6,18 +6,37 @@ There are a number of different LocalTalk cards for the PC; this driver applies only to the one with the 65c02 processor chip on it. To include it in the kernel, select the CONFIG_LTPC switch in the -configuration dialog; at this time (kernel 2.1.23) compiling it as -a module will not work. +configuration dialog. You can also compile it as a module. + +While the driver will attempt to autoprobe the I/O port address, IRQ +line, and DMA channel of the card, this does not always work. For +this reason, you should be prepared to supply these parameters +yourself. (see "Card Configuration" below for how to determine or +change the settings on your card) + +When the driver is compiled into the kernel, you can add a line such +as the following to your /etc/lilo.conf: + + append="ltpc=0x240,9,1" + +where the parameters (in order) are the port address, IRQ, and DMA +channel. The second and third values can be omitted, in which case +the driver will try to determine them itself. + +If you load the driver as a module, you can pass the parameters "io=", +"irq=", and "dma=" on the command line with insmod or modprobe, or add +them as options in /etc/conf.modules: + + alias lt0 ltpc # autoload the module when the interface is configured + options ltpc io=0x240 irq=9 dma=1 Before starting up the netatalk demons (perhaps in rc.local), you need to add a line such as: -/sbin/ifconfig ltalk0 127.0.0.42 + /sbin/ifconfig lt0 127.0.0.42 - -The driver will autoprobe, and you should see a message like: -"LocalTalk card found at 240, IR9, DMA1." -at bootup. +The address is unimportant - however, the card needs to be configured +with ifconfig so that Netatalk can find it. The appropriate netatalk configuration depends on whether you are attached to a network that includes AppleTalk routers or not. If, @@ -25,22 +44,22 @@ like me, you are simply connecting to your home Macintoshes and printers, you need to set up netatalk to "seed". The way I do this is to have the lines -dummy -seed -phase 2 -net 2000 -addr 2000.26 -zone "1033" -ltalk0 -seed -phase 1 -net 1033 -addr 1033.27 -zone "1033" + dummy -seed -phase 2 -net 2000 -addr 2000.26 -zone "1033" + lt0 -seed -phase 1 -net 1033 -addr 1033.27 -zone "1033" in my atalkd.conf. What is going on here is that I need to fool netatalk into thinking that there are two AppleTalk interfaces -present -- otherwise it refuses to seed. This is a hack, and a -more permanent solution would be to alter the netatalk code. -Note that the dummy driver needs to accept multicasts also -- earlier -versions of dummy.c may need to be patched. - +present; otherwise, it refuses to seed. This is a hack, and a more +permanent solution would be to alter the netatalk code. Also, make +sure you have the correct name for the dummy interface - If it's +compiled as a module, you will need to refer to it as "dummy0" or some +such. If you are attached to an extended AppleTalk network, with routers on it, then you don't need to fool around with this -- the appropriate line in atalkd.conf is -ltalk0 -phase 1 + lt0 -phase 1 -------------------------------------- @@ -74,19 +93,32 @@ board. Set the switches so as not to conflict with other hardware. -------------------------------------- IP: - Many people are interested in this driver in order to use IP -when LocalTalk, but no Ethernet, is available. While the code to do -this is not strictly speaking part of this driver, an experimental -version is available which seems to work under kernel 2.0.xx. It is -not yet functional in the 2.1.xx kernels. + +Yes, it is possible to do IP over LocalTalk. However, you can't just +treat the LocalTalk device like an ordinary Ethernet device, even if +that's what it looks like to Netatalk. + +Instead, you follow the same procedure as for doing IP in EtherTalk. +See Documentation/networking/ipddp.txt for more information about the +kernel driver and userspace tools needed. -------------------------------------- BUGS: -2.0.xx: +IRQ autoprobing often doesn't work on a cold boot. To get around +this, either compile the driver as a module, or pass the parameters +for the card to the kernel as described above. + +Also, as usual, autoprobing is not recommended when you use the driver +as a module. (though it usually works at boot time, at least) + +Polled mode is *really* slow sometimes, but this seems to depend on +the configuration of the network. -2.1.xx: The module support doesn't work yet. +It may theoretically be possible to use two LTPC cards in the same +machine, but this is unsupported, so if you really want to do this, +you'll probably have to hack the initialization code a bit. ______________________________________ @@ -96,3 +128,4 @@ work, and to Denis Hainsworth for doing the bleeding-edge testing. -- Bradford Johnson <bradford@math.umn.edu> +-- Updated 11/09/1998 by David Huggins-Daines <dhd@debian.org> diff --git a/Documentation/paride.txt b/Documentation/paride.txt index 47141f7a3..4eb9a1855 100644 --- a/Documentation/paride.txt +++ b/Documentation/paride.txt @@ -1,7 +1,7 @@ Linux and parallel port IDE devices -PARIDE v1.02 (c) 1997-8 Grant Guenther <grant@torque.net> +PARIDE v1.03 (c) 1997-8 Grant Guenther <grant@torque.net> 1. Introduction @@ -42,8 +42,8 @@ parallel port IDE subsystem, including: SyQuest EZ-135, EZ-230 & SparQ drives Avatar Shark Imation Superdisk LS-120 - FreeCom Power CD - Hewlett-Packard 5GB tape drive + FreeCom Power CD + Hewlett-Packard 5GB and 8GB tape drives Hewlett-Packard 7100 and 7200 CD-RW drives as well as most of the clone and no-name products on the market. @@ -52,7 +52,7 @@ To support such a wide range of devices, PARIDE, the parallel port IDE subsystem, is actually structured in three parts. There is a base paride module which provides a registry and some common methods for accessing the parallel ports. The second component is a set of -high-level drivers for each of the different type of supported device: +high-level drivers for each of the different types of supported devices: pd IDE disk pcd ATAPI CD-ROM @@ -176,7 +176,7 @@ It is much faster and simpler to get to understand the PARIDE drivers if you use them as loadable kernel modules. Note 1: using these drivers with the "kerneld" automatic module loading -system is not recommended, and is not documented here. +system is not recommended for beginners, and is not documented here. Note 2: if you build PARPORT support as a loadable module, PARIDE must also be built as loadable modules, and PARPORT must be loaded before the @@ -290,14 +290,57 @@ floppy that you could share with a DOS system: mkdosfs /dev/pf0 mount /dev/pf0 /mnt -2.4 Using the pg driver + +2.4 The pf driver + +The pf driver is intended for use with parallel port ATAPI disk +devices. The most common devices in this category are PD drives +and LS-120 drives. Traditionally, media for these devices are not +partitioned. Consequently, the pf driver does not support partitioned +media. This may be changed in a future version of the driver. + + +2.5 Using the pt driver + +The pt driver for parallel port ATAPI tape drives is a minimal driver. +It does not yet support many of the standard tape ioctl operations. +For best performance, a block size of 32KB should be used. You will +probably want to set the parallel port delay to 0, if you can. + + +2.6 Using the pg driver The pg driver can be used in conjunction with the cdrecord program -to create CD-ROMs. For more information, and the required patches -to cdrecord, please visit http://www.torque.net/parport/cdr.html . +to create CD-ROMs. Please get cdrecord version 1.6.1a3 or later +from ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ (you may have to look +in the alpha subdirectory). To record CD-R media your parallel port +should ideally be set to EPP mode, and the "port delay" should be +set to 0. With those settings it is possible to record at 2x speed +without any buffer underruns. If you cannot get the driver to work +in EPP mode, try to use "bidirectional" or "PS/2" mode and 1x speeds only. + 3. Troubleshooting +The most common problems that people report with the PARIDE drivers +concern the parallel port CMOS settings. At this time, none of the +PARIDE protocol modules support ECP mode, or any ECP combination modes. +If you are able to do so, please set your parallel port into EPP mode +using your CMOS setup procedure. + +Some parallel ports cannot reliably transfer data at full speed. To +offset the errors, the PARIDE protocol modules introduce a "port +delay" between each access to the i/o ports. Each protocol sets +a default value for this delay. In most cases, the user can override +the default and set it to 0 - resulting in somewhat higher transfer +rates. In some rare cases (especially with older 486 systems) the +default delays are not long enough. if you experience corrupt data +transfers, or unexpected failures, you may wish to increase the +port delay. The delay can be programmed using the "driveN" parameters +to each of the high-level drivers. Please see the notes above, or +read the comments at the beginning of the driver source files in +linux/drivers/block/paride. + While a lot of testing has gone into these drivers to make them work as smoothly as possible, problems will arise. If you do have problems, please check all the obvious things first: does the drive work in diff --git a/Documentation/powerpc/00-INDEX b/Documentation/powerpc/00-INDEX index 6cd33d720..d4ed9cabe 100644 --- a/Documentation/powerpc/00-INDEX +++ b/Documentation/powerpc/00-INDEX @@ -11,4 +11,5 @@ smp.txt - use and state info about Linux/PPC on MP machines sound.txt - info on sound support under Linux/PPC - +zImage_layout.txt + - info on the kernel images for Linux/PPC diff --git a/Documentation/powerpc/smp.txt b/Documentation/powerpc/smp.txt index d65dfae19..e7b078e54 100644 --- a/Documentation/powerpc/smp.txt +++ b/Documentation/powerpc/smp.txt @@ -5,7 +5,7 @@ This document and the related code was written by me (Cort Dougan, cort@cs.nmt.edu) please email me if you have questions, comments or corrections. -Last Change: 4.1.98 +Last Change: 10.8.98 SMP support for Linux/PPC is still in its early stages and likely to be buggy for a while. If you want to help by writing code or testing @@ -13,7 +13,7 @@ different hardware please email me! 1. State of Supported Hardware - PowerSurge Architecture - UMAX s900, Apple 9500/9600/8500/8600/7500/7600 + PowerSurge Architecture - tested on UMAX s900, Apple 9600 The second processor on this machine boots up just fine and enters its idle loop. Hopefully a completely working SMP kernel on this machine will be done shortly. @@ -22,7 +22,9 @@ different hardware please email me! necessary to work with any number would not be overly difficult but I don't have any machines with >2 processors so it's not high on my list of priorities. If anyone else would like do to the work email - me and I can point out the places that need changed. + me and I can point out the places that need changed. If you have >2 + processors and don't want to add support yourself let me know and I + can take a look into it. BeBox BeBox support hasn't been added to the 2.1.X kernels from 2.0.X diff --git a/Documentation/powerpc/sound.txt b/Documentation/powerpc/sound.txt index 8f4a44034..c028e35f1 100644 --- a/Documentation/powerpc/sound.txt +++ b/Documentation/powerpc/sound.txt @@ -1,7 +1,7 @@ Information about PowerPC Sound support ===================================================================== -Please mail me me (Cort Dougan, cort@cs.nmt.edu) if you have questions, +Please mail me (Cort Dougan, cort@cs.nmt.edu) if you have questions, comments or corrections. Last Change: 3.24.98 diff --git a/Documentation/powerpc/zImage_layout.txt b/Documentation/powerpc/zImage_layout.txt new file mode 100644 index 000000000..a96517ede --- /dev/null +++ b/Documentation/powerpc/zImage_layout.txt @@ -0,0 +1,47 @@ + Information about the Linux/PPC kernel images +===================================================================== + +Please mail me me (Cort Dougan, cort@cs.nmt.edu) if you have questions, +comments or corrections. + +This document is meant to answer several questions I've had about how +the PReP system boots and how Linux/PPC interacts with that mechanism. +It would be nice if we could have information on how other architectures +boot here as well. If you have anything to contribute, please +let me know. + + +1. PReP boot file + + This is the file necessary to boot PReP systems from floppy or + hard drive. The firmware reads the PReP partition table entry + and will load the image accordingly. + + To boot the zImage, copy it onto a floppy with dd if=zImage of=/dev/fd0h1440 + or onto a PReP hard drive partition with dd if=zImage of=/dev/sda4 + assuming you've created a PReP partition (type 0x41) with fdisk on + /dev/sda4. + + The layout of the image format is: + + 0x0 +------------+ + | | PReP partition table entry + | | + 0x400 +------------+ + | | Bootstrap program code + data + | | + | | + +------------+ + | | compressed kernel, elf header removed + +------------+ + | | initrd (if loaded) + +------------+ + | | Elf section table for bootstrap program + +------------+ + + +2. MBX boot file + + The MBX boards can load an elf image, and relocate it to the + proper location in memory - it copies the image to the location it was + linked at. diff --git a/Documentation/sound/AWE32 b/Documentation/sound/AWE32 index a21b46bc6..25e04e209 100644 --- a/Documentation/sound/AWE32 +++ b/Documentation/sound/AWE32 @@ -51,7 +51,7 @@ Then WaveTable goes. For some reason Plug-n-Play detects only one I/O port, but the wavetable needs THREE! My working string is: "(CONFIGURE CTL044/1132685 (LD 2 (IO 0 (BASE 0x0620)) (IO 1 (BASE 0x0A20)) -(IO 3 (BASE 0x0E20)) (ACT Y) ))" +(IO 2 (BASE 0x0E20)) (ACT Y) ))" Resources 0x0620, 0x0A20 and 0x0E20 should work. Other on-board devices: Gameport and StereoEnhance are not required to be inited. diff --git a/Documentation/sound/ChangeLog.multisound b/Documentation/sound/ChangeLog.multisound index fcd5b19f4..d1053392d 100644 --- a/Documentation/sound/ChangeLog.multisound +++ b/Documentation/sound/ChangeLog.multisound @@ -1,3 +1,66 @@ +1998-09-10 Andrew Veliath <andrewtv@usa.net> + + * Update version to 0.8.2 + + * Add SNDCTL_DSP_GETOSPACE and SNDCTL_DSP_GETISPACE ioctls. + +1998-09-09 Andrew Veliath <andrewtv@usa.net> + + * Update version to 0.8.1 + + * msnd_pinnacle.c: Fix resetting of default audio parameters. Turn + flush code from dsp_halt into dsp_write_flush, and use that for + SNDCTL_DSP_SYNC. + +1998-09-07 Andrew Veliath <andrewtv@usa.net> + + * Update version to 0.8.0 + + * Provide separate signal parameters for play and record. + + * Cleanups to locking and interrupt handling, change default + fifosize to 128kB. + + * Update version to 0.7.15 + + * Interprocess full-duplex support (ie `cat /dev/dsp > /dev/dsp'). + + * More mutex sections for read and write fifos (read + write locks + added). + +1998-09-05 Andrew Veliath <andrewtv@usa.net> + + * msnd_pinnacle.c: (chk_send_dsp_cmd) Do full DSP reset upon DSP + timeout (when not in interrupt; maintains mixer settings). Fixes + to flushing and IRQ ref counting. Rewrote queuing for smoother + playback and fixed initial playback cutoff problem. + +1998-09-03 Andrew Veliath <andrewtv@usa.net> + + * Replaced packed structure accesses with standard C equivalents. + +1998-09-01 Andrew Veliath <andrewtv@usa.net> + + * msnd_pinnacle.c: Add non-PnP configuration to driver code, which + will facilitate compiled-in operation. + +1998-08-29 Andrew Veliath <andrewtv@usa.net> + + * Update version to 0.7.6 + + * msnd_pinnacle.c (dsp_ioctl): Add DSP_GETFMTS, change SAMPLESIZE + to DSP_SETFMT. + + * Update version to 0.7.5 + + * Create pinnaclecfg.c and turn MultiSound doc into a shell + archive with pinnaclecfg.c included. pinnaclecfg.c can + now fully configure the card in non-PnP mode, including the + joystick and IDE controller. Also add an isapnp conf + example. + + * Reduce DSP reset timeout from 20000 to 100 + 1998-08-06 Andrew Veliath <andrewtv@usa.net> * Update version to 0.7.2 diff --git a/Documentation/sound/MultiSound b/Documentation/sound/MultiSound index 4d4313134..20284de9f 100644 --- a/Documentation/sound/MultiSound +++ b/Documentation/sound/MultiSound @@ -1,180 +1,476 @@ -Getting Firmware -~~~~~~~~~~~~~~~~ - -See the end of this document on how to obtain and create the necessary -firmware files. - - -Supported Features -~~~~~~~~~~~~~~~~~~ - -Currently digital audio and mixer functionality is supported. (memory -mapped digital audio is not yet supported). Modular MultiSound -support is composed of the following modules: - -msnd - MultiSound base (requires soundcore) -msnd_classic - Base audio/mixer support for Classic, Monetery and - Tahiti cards -msnd_pinnacle - Base audio/mixer support for Pinnacle and Fiji cards - - -Important Notes - Read Before Using -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* The firmware files are not included (may change in future). You -must obtain these images from Turtle Beach (they are included in the -MultiSound Development Kits), and place them in /etc/sound for -example, and give the full paths in the Linux configuration. Please -note these files must be binary files, not assembler. - -* You need the following information to use this driver: the card's -I/O base (i.e. 0x250), the IRQ (i.e. 5), and the shared memory area -(i.e. 0xd8000). - -* Probing is not currently implemented, and only the msnd_classic -driver will actually program the card's IRQ and SMA locations; the -msnd_pinnacle is primarily for use with the card in PnP mode, however -it should work if you know what the card's resource values are (this -will change in the future). - -* Note the Turtle Beach Pinnacle card contains a Kurzweil MA-1 -synthesizer with an MPU compatible interface, which should work with -the mpu401 module. You must know the resource values of the MA-1. - - -Examples -~~~~~~~~ - -* If you have a MultiSound Classic/Monterey/Tahiti: - -insmod soundcore -insmod msnd -insmod msnd_classic io=0x290 irq=7 mem=0xd0000 - -* If you have a MultiSound Pinnacle: - -insmod soundcore -insmod msnd -insmod msnd_pinnacle io=0x210 irq=5 mem=0xd8000 - -* To use the MPU-compatible Kurzweil synth on the Pinnacle, add the -following: - -insmod sound -insmod mpu401 io=0x330 irq=9 - - -msnd_classic, msnd_pinnacle Required Options -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If the following options are not given, the module will not load. -Examine the kernel message log for informative error messages. -WARNING--probing isn't supported so try to make sure you have the -correct shared memory area, otherwise you may experience problems. - -io I/O base of DSP, e.g. io=0x210 -irq IRQ number, e.g. irq=5 -mem Shared memory area, e.g. mem=0xd8000 - - -msnd_classic, msnd_pinnacle Additional Options -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -fifosize The digital audio FIFOs, in kilobytes. The - default is 64kB (two FIFOs are allocated, so - this uses up 128kB). - -calibrate_signal Setting this to one calibrates the ADCs to the - signal, zero calibrates to the card (defaults - to zero). - - -msnd_pinnacle Additional Options -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -digital Specify digital=1 to enable the S/PDIF input - if you have the digital daughterboard - adapter. This will enable access to the - DIGITAL1 input for the soundcard in the mixer. - Some mixer programs might have trouble setting - the DIGITAL1 source as an input. If you have - trouble, you can try the setdigital.c program - at the bottom of this document. - - -Obtaining and Creating Firmware Files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - For the Classic/Tahiti/Monterey - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Download to /tmp and unzip the following file from Turtle Beach: - - ftp://ftp.tbeach.com/pub/tbs/pinn/msndvkit.zip - -When unzipped, unzip the file named MsndFiles.zip. Then copy the -following firmware files to /etc/sound (note the file renaming): - - cp DSPCODE/MSNDINIT.BIN /etc/sound/msndinit.bin - cp DSPCODE/MSNDPERM.REB /etc/sound/msndperm.bin - -When configuring the Linux kernel, specify /etc/sound/msndinit.bin and -/etc/sound/msndperm.bin for the two firmware files (Linux kernel -versions older than 2.2 do not ask for firmware paths, and are -hardcoded to /etc/sound). - - - For the Pinnacle/Fiji - ~~~~~~~~~~~~~~~~~~~~~ - -Download to /tmp and unzip the following file from Turtle Beach (be -sure to use the entire URL; some have had trouble navigating to the -URL): - - ftp://ftp.tbeach.com/oldpub/tbs/pinn/pnddk100.zip - -Put the following lines into a file named conv.l (between the start -and end lines): - --- conv.l start -- -%% -[ \n\t,\r] -\;.* -DB -[0-9A-Fa-f]+H { int n; sscanf(yytext, "%xH", &n); printf("%c", n); } --- conv.l end -- - -Then, compile the conv program with GNU make with the following -command: - - make LEX=flex LOADLIBES=-lfl conv - -This should give you an executable named conv. Now, we create the -binary firmware files by doing the following conversion (assuming the -archive unpacked into a directory named PINNDDK): - - ./conv < PINNDDK/dspcode/pndspini.asm > /etc/sound/pndspini.bin - ./conv < PINNDDK/dspcode/pndsperm.asm > /etc/sound/pndsperm.bin - -The conv (and conv.l) program is not needed after conversion and can -be safely deleted. Then, when configuring the Linux kernel, specify -/etc/sound/pndspini.bin and /etc/sound/pndsperm.bin for the two -firmware files (Linux kernel versions older than 2.2 do not ask for -firmware paths, and are hardcoded to /etc/sound). - - -Recording from the S/PDIF Input -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you have a Pinnacle or Fiji with S/PDIF input and want to set it as -the input source, you can use this program if you have trouble trying -to do it with a mixer program (be sure to insert the module with the -digital=1 option). - -Compile with: -cc -O setdigital.c -o setdigital - --- start setdigital.c -- +#! /bin/sh +# +# Turtle Beach MultiSound Driver Notes +# -- Andrew Veliath <andrewtv@usa.net> +# +# Last update: September 10, 1998 +# Corresponding msnd driver: 0.8.2 +# +# ** This file is a README (top part) and shell archive (bottom part). +# The corresponding archived utility sources can be unpacked by +# running `sh MultiSound' (the utilities are only needed for the +# Pinnacle and Fiji cards). ** +# +# +# -=-=- Getting Firmware -=-=- +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# See the section `Obtaining and Creating Firmware Files' in this +# document for instructions on obtaining the necessary firmware +# files. +# +# +# Supported Features +# ~~~~~~~~~~~~~~~~~~ +# +# Currently, full-duplex digital audio (/dev/dsp only, /dev/audio is +# not currently available) and mixer functionality (/dev/mixer) are +# supported (memory mapped digital audio is not yet supported). +# Digital transfers and monitoring can be done as well if you have +# the digital daughterboard (see the section on using the S/PDIF port +# for more information). +# +# Support for the Turtle Beach MultiSound Hurricane architecture is +# composed of the following modules (these can also operate compiled +# into the kernel): +# +# msnd - MultiSound base (requires soundcore) +# +# msnd_classic - Base audio/mixer support for Classic, Monetery and +# Tahiti cards +# +# msnd_pinnacle - Base audio/mixer support for Pinnacle and Fiji cards +# +# +# Important Notes - Read Before Using +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# The firmware files are not included (may change in future). You +# must obtain these images from Turtle Beach (they are included in +# the MultiSound Development Kits), and place them in /etc/sound for +# example, and give the full paths in the Linux configuration. If +# you are compiling in support for the MultiSound driver rather than +# using it as a module, these firmware files must be accessible +# during kernel compilation. +# +# Please note these files must be binary files, not assembler. See +# the section later in this document for instructions to obtain these +# files. +# +# +# Configuring Card Resources +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# ** This section is very important, as your card may not work at all +# or your machine may crash if you do not do this correctly. ** +# +# * Classic/Monterey/Tahiti +# +# These cards are configured through the driver msnd_classic. You must +# know the io port, then the driver will select the irq and memory resources +# on the card. It is up to you to know if these are free locations or now, +# a conflict can lock the machine up. +# +# * Pinnacle/Fiji +# +# The Pinnacle and Fiji cards have an extra config port, either +# 0x250, 0x260 or 0x270. This port can be disabled to have the card +# configured strictly through PnP, however you lose the ability to +# access the IDE controller and joystick devices on this card when +# using PnP. The included pinnaclecfg program in this shell archive +# can be used to configure the card in non-PnP mode, and in PnP mode +# you can use isapnptools. These are described briefly here. +# +# pinnaclecfg is not required; you can use the msnd_pinnacle module +# to fully configure the card as well. However, pinnaclecfg can be +# used to change the resource values of a particular device after the +# msnd_pinnacle module has been loaded. If you are compiling the +# driver into the kernel, you must set these values during compile +# time, however other peripheral resource values can be changed with +# the pinnaclecfg program after the kernel is loaded. +# +# +# *** PnP mode +# +# Use pnpdump to obtain a sample configuration if you can; I was able +# to obtain one with the command `pnpdump 1 0x203' -- this may vary +# for you (running pnpdump by itself did not work for me). Then, +# edit this file and use isapnp to uncomment and set the card values. +# Use these values when inserting the msnd_pinnacle module. Using +# this method, you can set the resources for the DSP and the Kurzweil +# synth (Pinnacle). Since Linux does not directly support PnP +# devices, you may have difficulty when using the card in PnP mode +# when it the driver is compiled into the kernel. Using non-PnP mode +# is preferable in this case. +# +# Here is an example mypinnacle.conf for isapnp that sets the card to +# io base 0x210, irq 5 and mem 0xd8000, and also sets the Kurzweil +# synth to 0x330 and irq 9 (may need editing for your system): +# +# (READPORT 0x0203) +# (CSN 2) +# (IDENTIFY *) +# +# # DSP +# (CONFIGURE BVJ0440/-1 (LD 0 +# (INT 0 (IRQ 5 (MODE +E))) (IO 0 (BASE 0x0210)) (MEM 0 (BASE 0x0d8000)) +# (ACT Y))) +# +# # Kurzweil Synth (Pinnacle Only) +# (CONFIGURE BVJ0440/-1 (LD 1 +# (IO 0 (BASE 0x0330)) (INT 0 (IRQ 9 (MODE +E))) +# (ACT Y))) +# +# (WAITFORKEY) +# +# +# *** Non-PnP mode +# +# The second way is by running the card in non-PnP mode. This +# actually has some advantages in that you can access some other +# devices on the card, such as the joystick and IDE controller. To +# configure the card, unpack this shell archive and build the +# pinnaclecfg program. Using this program, you can assign the +# resource values to the card's devices, or disable the devices. As +# an alternative to using pinnaclecfg, you can specify many of the +# configuration values when loading the msnd_pinnacle module (or +# during kernel configuration when compiling the driver into the +# kernel). +# +# If you specify cfg=0x250 for the msnd_pinnacle module, it +# automatically configure the card to the given io, irq and memory +# values using that config port (the config port is jumper selectable +# on the card to 0x250, 0x260 or 0x270). +# +# See the `msnd_pinnacle Additional Options' section below for more +# information on these parameters (also, if you compile the driver +# directly into the kernel, these extra parameters can be useful +# here). +# +# +# ** It is very easy to cause problems in your machine if you choose a +# resource value which is incorrect. ** +# +# +# Examples +# ~~~~~~~~ +# +# * MultiSound Classic/Monterey/Tahiti: +# +# insmod soundcore +# insmod msnd +# insmod msnd_classic io=0x290 irq=7 mem=0xd0000 +# +# * MultiSound Pinnacle in PnP mode: +# +# insmod soundcore +# insmod msnd +# isapnp mypinnacle.conf +# insmod msnd_pinnacle io=0x210 irq=5 mem=0xd8000 <-- match mypinnacle.conf values +# +# * MultiSound Pinnacle in non-PnP mode (replace 0x250 with your configuration port, +# one of 0x250, 0x260 or 0x270): +# +# insmod soundcore +# insmod msnd +# insmod msnd_pinnacle cfg=0x250 io=0x290 irq=5 mem=0xd0000 +# +# * To use the MPU-compatible Kurzweil synth on the Pinnacle in PnP +# mode, add the following (assumes you did `isapnp mypinnacle.conf'): +# +# insmod sound +# insmod mpu401 io=0x330 irq=9 <-- match mypinnacle.conf values +# +# * To use the MPU-compatible Kurzweil synth on the Pinnacle in non-PnP +# mode, add the following. Note how we first configure the peripheral's +# resources, _then_ install a Linux driver for it: +# +# insmod sound +# pinnaclecfg 0x250 mpu 0x330 9 +# insmod mpu401 io=0x330 irq=9 +# +# -- OR you can use the following sequence without pinnaclecfg in non-PnP mode: +# +# insmod soundcore +# insmod msnd +# insmod msnd_pinnacle cfg=0x250 io=0x290 irq=5 mem=0xd0000 mpu_io=0x330 mpu_irq=9 +# insmod sound +# insmod mpu401 io=0x330 irq=9 +# +# * To setup the joystick port on the Pinnacle in non-PnP mode (though +# you have to find the actual Linux joystick driver elsewhere), you +# can use pinnaclecfg: +# +# pinnaclecfg 0x250 joystick 0x200 +# +# -- OR you can configure this using msnd_pinnacle with the following: +# +# insmod soundcore +# insmod msnd +# insmod msnd_pinnacle cfg=0x250 io=0x290 irq=5 mem=0xd0000 joystick_io=0x200 +# +# +# msnd_classic, msnd_pinnacle Required Options +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# If the following options are not given, the module will not load. +# Examine the kernel message log for informative error messages. +# WARNING--probing isn't supported so try to make sure you have the +# correct shared memory area, otherwise you may experience problems. +# +# io I/O base of DSP, e.g. io=0x210 +# irq IRQ number, e.g. irq=5 +# mem Shared memory area, e.g. mem=0xd8000 +# +# +# msnd_classic, msnd_pinnacle Additional Options +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# fifosize The digital audio FIFOs, in kilobytes. If not +# specified, the default will be used. Increasing +# this value will reduce the chance of a FIFO +# underflow at the expense of increasing overall +# latency. For example, fifosize=512 will +# allocate 512kB read and write FIFOs (1MB total). +# While this may reduce dropouts, a heavy machine +# load will undoubtedly starve the FIFO of data +# and you will eventually get dropouts. One +# option is to alter the scheduling priority of +# the playback process, using `nice' or some form +# of POSIX soft real-time scheduling. +# +# calibrate_signal Setting this to one calibrates the ADCs to the +# signal, zero calibrates to the card (defaults +# to zero). +# +# +# msnd_pinnacle Additional Options +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# digital Specify digital=1 to enable the S/PDIF input +# if you have the digital daughterboard +# adapter. This will enable access to the +# DIGITAL1 input for the soundcard in the mixer. +# Some mixer programs might have trouble setting +# the DIGITAL1 source as an input. If you have +# trouble, you can try the setdigital.c program +# at the bottom of this document. +# +# cfg Non-PnP configuration port for the Pinnacle +# and Fiji (typically 0x250, 0x260 or 0x270, +# depending on the jumper configuration). If +# this option is omitted, then it is assumed +# that the card is in PnP mode, and that the +# specified DSP resource values are already +# configured with PnP (i.e. it won't attempt to +# do any sort of configuration). +# +# When the Pinnacle is in non-PnP mode, you can use the following +# options to configure particular devices. If a full specification +# for a device is not given, then the device is not configured. Note +# that you still must use a Linux driver for any of these devices +# once their resources are setup (such as the Linux joystick driver, +# or the MPU401 driver from OSS for the Kurzweil synth). +# +# mpu_io I/O port of MPU (on-board Kurzweil synth) +# mpu_irq IRQ of MPU (on-board Kurzweil synth) +# ide_io0 First I/O port of IDE controller +# ide_io1 Second I/O port of IDE controller +# ide_irq IRQ IDE controller +# joystick_io I/O port of joystick +# +# +# Obtaining and Creating Firmware Files +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# For the Classic/Tahiti/Monterey +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Download to /tmp and unzip the following file from Turtle Beach: +# +# ftp://ftp.voyetra.com/pub/tbs/msndcl/msndvkit.zip +# +# When unzipped, unzip the file named MsndFiles.zip. Then copy the +# following firmware files to /etc/sound (note the file renaming): +# +# cp DSPCODE/MSNDINIT.BIN /etc/sound/msndinit.bin +# cp DSPCODE/MSNDPERM.REB /etc/sound/msndperm.bin +# +# When configuring the Linux kernel, specify /etc/sound/msndinit.bin and +# /etc/sound/msndperm.bin for the two firmware files (Linux kernel +# versions older than 2.2 do not ask for firmware paths, and are +# hardcoded to /etc/sound). +# +# If you are compiling the driver into the kernel, these files must +# be accessible during compilation, but will not be needed later. +# The files must remain, however, if the driver is used as a module. +# +# +# For the Pinnacle/Fiji +# ~~~~~~~~~~~~~~~~~~~~~ +# +# Download to /tmp and unzip the following file from Turtle Beach (be +# sure to use the entire URL; some have had trouble navigating to the +# URL): +# +# ftp://ftp.voyetra.com/pub/tbs/pinn/pnddk100.zip +# +# Unpack this shell archive, and run make in the created directory +# (you need a C compiler and flex to build the utilities). This +# should give you the executables conv, pinnaclecfg and setdigital. +# conv is only used temporarily here to create the firmware files, +# while pinnaclecfg is used to configure the Pinnacle or Fiji card in +# non-PnP mode, and setdigital can be used to set the S/PDIF input on +# the mixer (pinnaclecfg and setdigital should be copied to a +# convenient place, possibly run during system initialization). +# +# To generating the firmware files with the `conv' program, we create +# the binary firmware files by doing the following conversion +# (assuming the archive unpacked into a directory named PINNDDK): +# +# ./conv < PINNDDK/dspcode/pndspini.asm > /etc/sound/pndspini.bin +# ./conv < PINNDDK/dspcode/pndsperm.asm > /etc/sound/pndsperm.bin +# +# The conv (and conv.l) program is not needed after conversion and can +# be safely deleted. Then, when configuring the Linux kernel, specify +# /etc/sound/pndspini.bin and /etc/sound/pndsperm.bin for the two +# firmware files (Linux kernel versions older than 2.2 do not ask for +# firmware paths, and are hardcoded to /etc/sound). +# +# If you are compiling the driver into the kernel, these files must +# be accessible during compilation, but will not be needed later. +# The files must remain, however, if the driver is used as a module. +# +# +# Using Digital I/O with the S/PDIF Port +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# If you have a Pinnacle or Fiji with the digital daughterboard and +# want to set it as the input source, you can use this program if you +# have trouble trying to do it with a mixer program (be sure to +# insert the module with the digital=1 option, or say Y to the option +# during compiled-in kernel operation). Upon selection of the S/PDIF +# port, you should be able monitor and record from it. +# +# There is something to note about using the S/PDIF port. Digital +# timing is taken from the digital signal, so if a signal is not +# connected to the port and it is selected as recording input, you +# will find PCM playback to be distorted in playback rate. Also, +# attempting to record at a sampling rate other than the DAT rate may +# be problematic (i.e. trying to record at 8000Hz when the DAT signal +# is 44100Hz). If you have a problem with this, set the recording +# input to the line in if you need to record at a rate other than +# that of the DAT rate. +# +# +# -- Shell archive attached below, just run `sh MultiSound' to extract. +# Contains Pinnacle/Fiji utilities to convert firmware, configure +# in non-PnP mode, and select the DIGITAL1 input for the mixer. +# +# +#!/bin/sh +# This is a shell archive (produced by GNU sharutils 4.2). +# To extract the files from this archive, save it to some FILE, remove +# everything before the `!/bin/sh' line above, then type `sh FILE'. +# +# Made on 1998-09-05 08:26 EDT by <andrewtv@ztransform.velsoft.com>. +# Source directory was `/home/andrewtv/programming/pinnacle/pinnacle'. +# +# Existing files will *not* be overwritten unless `-c' is specified. +# +# This shar contains: +# length mode name +# ------ ---------- ------------------------------------------ +# 2111 -rw-rw-r-- MultiSound.d/setdigital.c +# 10301 -rw-rw-r-- MultiSound.d/pinnaclecfg.c +# 96 -rw-rw-r-- MultiSound.d/Makefile +# 141 -rw-rw-r-- MultiSound.d/conv.l +# +save_IFS="${IFS}" +IFS="${IFS}:" +gettext_dir=FAILED +locale_dir=FAILED +first_param="$1" +for dir in $PATH +do + if test "$gettext_dir" = FAILED && test -f $dir/gettext \ + && ($dir/gettext --version >/dev/null 2>&1) + then + set `$dir/gettext --version 2>&1` + if test "$3" = GNU + then + gettext_dir=$dir + fi + fi + if test "$locale_dir" = FAILED && test -f $dir/shar \ + && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) + then + locale_dir=`$dir/shar --print-text-domain-dir` + fi +done +IFS="$save_IFS" +if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED +then + echo=echo +else + TEXTDOMAINDIR=$locale_dir + export TEXTDOMAINDIR + TEXTDOMAIN=sharutils + export TEXTDOMAIN + echo="$gettext_dir/gettext -s" +fi +touch -am 1231235999 $$.touch >/dev/null 2>&1 +if test ! -f 1231235999 && test -f $$.touch; then + shar_touch=touch +else + shar_touch=: + echo + $echo 'WARNING: not restoring timestamps. Consider getting and' + $echo "installing GNU \`touch', distributed in GNU File Utilities..." + echo +fi +rm -f 1231235999 $$.touch +# +if mkdir _sh21233; then + $echo 'x -' 'creating lock directory' +else + $echo 'failed to create lock directory' + exit 1 +fi +# ============= MultiSound.d/setdigital.c ============== +if test ! -d 'MultiSound.d'; then + $echo 'x -' 'creating directory' 'MultiSound.d' + mkdir 'MultiSound.d' +fi +if test -f 'MultiSound.d/setdigital.c' && test "$first_param" != -c; then + $echo 'x -' SKIPPING 'MultiSound.d/setdigital.c' '(file already exists)' +else + $echo 'x -' extracting 'MultiSound.d/setdigital.c' '(text)' + sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/setdigital.c' && +/********************************************************************* +X * +X * setdigital.c - sets the DIGITAL1 input for a mixer +X * +X * Copyright (C) 1998 Andrew Veliath +X * +X * This program is free software; you can redistribute it and/or modify +X * it under the terms of the GNU General Public License as published by +X * the Free Software Foundation; either version 2 of the License, or +X * (at your option) any later version. +X * +X * This program is distributed in the hope that it will be useful, +X * but WITHOUT ANY WARRANTY; without even the implied warranty of +X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +X * GNU General Public License for more details. +X * +X * You should have received a copy of the GNU General Public License +X * along with this program; if not, write to the Free Software +X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +X * +X * $Id: setdigital.c,v 1.1 1998/08/29 03:32:33 andrewtv Exp $ +X * +X ********************************************************************/ +X #include <stdio.h> #include <unistd.h> #include <fcntl.h> @@ -182,53 +478,586 @@ cc -O setdigital.c -o setdigital #include <sys/stat.h> #include <sys/ioctl.h> #include <sys/soundcard.h> - +X int main(int argc, char *argv[]) { - int fd; - unsigned long recmask, recsrc; - - if (argc != 2) { - fprintf(stderr, "usage: setdigital <mixer device>\n"); - exit(1); - } else - - if ((fd = open(argv[1], O_RDWR)) < 0) { - perror(argv[1]); - exit(1); - } - - if (ioctl(fd, SOUND_MIXER_READ_RECMASK, &recmask) < 0) { - fprintf(stderr, "error: ioctl read recmask failed\n"); - perror("ioctl"); - close(fd); - exit(1); - } - - if (!(recmask & SOUND_MASK_DIGITAL1)) { - fprintf(stderr, "error: cannot find DIGITAL1 device in mixer\n"); - close(fd); - exit(1); - } - - if (ioctl(fd, SOUND_MIXER_READ_RECSRC, &recsrc) < 0) { - fprintf(stderr, "error: ioctl read recsrc failed\n"); - perror("ioctl"); - close(fd); - exit(1); - } - - recsrc |= SOUND_MASK_DIGITAL1; - - if (ioctl(fd, SOUND_MIXER_WRITE_RECSRC, &recsrc) < 0) { - fprintf(stderr, "error: ioctl write recsrc failed\n"); - perror("ioctl"); - close(fd); - exit(1); - } - - close(fd); - - return 0; -} --- end setdigital.c -- +X int fd; +X unsigned long recmask, recsrc; +X +X if (argc != 2) { +X fprintf(stderr, "usage: setdigital <mixer device>\n"); +X exit(1); +X } +X +X if ((fd = open(argv[1], O_RDWR)) < 0) { +X perror(argv[1]); +X exit(1); +X } +X +X if (ioctl(fd, SOUND_MIXER_READ_RECMASK, &recmask) < 0) { +X fprintf(stderr, "error: ioctl read recording mask failed\n"); +X perror("ioctl"); +X close(fd); +X exit(1); +X } +X +X if (!(recmask & SOUND_MASK_DIGITAL1)) { +X fprintf(stderr, "error: cannot find DIGITAL1 device in mixer\n"); +X close(fd); +X exit(1); +X } +X +X if (ioctl(fd, SOUND_MIXER_READ_RECSRC, &recsrc) < 0) { +X fprintf(stderr, "error: ioctl read recording source failed\n"); +X perror("ioctl"); +X close(fd); +X exit(1); +X } +X +X recsrc |= SOUND_MASK_DIGITAL1; +X +X if (ioctl(fd, SOUND_MIXER_WRITE_RECSRC, &recsrc) < 0) { +X fprintf(stderr, "error: ioctl write recording source failed\n"); +X perror("ioctl"); +X close(fd); +X exit(1); +X } +X +X close(fd); +X +X return 0; +} +SHAR_EOF + $shar_touch -am 0828233298 'MultiSound.d/setdigital.c' && + chmod 0664 'MultiSound.d/setdigital.c' || + $echo 'restore of' 'MultiSound.d/setdigital.c' 'failed' + if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ + && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then + md5sum -c << SHAR_EOF >/dev/null 2>&1 \ + || $echo 'MultiSound.d/setdigital.c:' 'MD5 check failed' +47720746d4367bae9954787c311c56fd MultiSound.d/setdigital.c +SHAR_EOF + else + shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/setdigital.c'`" + test 2111 -eq "$shar_count" || + $echo 'MultiSound.d/setdigital.c:' 'original size' '2111,' 'current size' "$shar_count!" + fi +fi +# ============= MultiSound.d/pinnaclecfg.c ============== +if test -f 'MultiSound.d/pinnaclecfg.c' && test "$first_param" != -c; then + $echo 'x -' SKIPPING 'MultiSound.d/pinnaclecfg.c' '(file already exists)' +else + $echo 'x -' extracting 'MultiSound.d/pinnaclecfg.c' '(text)' + sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/pinnaclecfg.c' && +/********************************************************************* +X * +X * pinnaclecfg.c - Pinnacle/Fiji Device Configuration Program +X * +X * This is for NON-PnP mode only. For PnP mode, use isapnptools. +X * +X * This is Linux-specific, and must be run with root permissions. +X * +X * Part of the Turtle Beach MultiSound Sound Card Driver for Linux +X * +X * Copyright (C) 1998 Andrew Veliath +X * +X * This program is free software; you can redistribute it and/or modify +X * it under the terms of the GNU General Public License as published by +X * the Free Software Foundation; either version 2 of the License, or +X * (at your option) any later version. +X * +X * This program is distributed in the hope that it will be useful, +X * but WITHOUT ANY WARRANTY; without even the implied warranty of +X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +X * GNU General Public License for more details. +X * +X * You should have received a copy of the GNU General Public License +X * along with this program; if not, write to the Free Software +X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +X * +X * $Id: pinnaclecfg.c,v 1.3 1998/08/29 03:32:32 andrewtv Exp $ +X * +X ********************************************************************/ +X +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <unistd.h> +#include <asm/io.h> +#include <asm/types.h> +X +#define IREG_LOGDEVICE 0x07 +#define IREG_ACTIVATE 0x30 +#define LD_ACTIVATE 0x01 +#define LD_DISACTIVATE 0x00 +#define IREG_EECONTROL 0x3F +#define IREG_MEMBASEHI 0x40 +#define IREG_MEMBASELO 0x41 +#define IREG_MEMCONTROL 0x42 +#define IREG_MEMRANGEHI 0x43 +#define IREG_MEMRANGELO 0x44 +#define MEMTYPE_8BIT 0x00 +#define MEMTYPE_16BIT 0x02 +#define MEMTYPE_RANGE 0x00 +#define MEMTYPE_HIADDR 0x01 +#define IREG_IO0_BASEHI 0x60 +#define IREG_IO0_BASELO 0x61 +#define IREG_IO1_BASEHI 0x62 +#define IREG_IO1_BASELO 0x63 +#define IREG_IRQ_NUMBER 0x70 +#define IREG_IRQ_TYPE 0x71 +#define IRQTYPE_HIGH 0x02 +#define IRQTYPE_LOW 0x00 +#define IRQTYPE_LEVEL 0x01 +#define IRQTYPE_EDGE 0x00 +X +#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF)) +#define LOBYTE(w) ((BYTE)(w)) +#define MAKEWORD(low,hi) ((WORD)(((BYTE)(low))|(((WORD)((BYTE)(hi)))<<8))) +X +typedef __u8 BYTE; +typedef __u16 USHORT; +typedef __u16 WORD; +X +static int config_port = -1; +X +static int msnd_write_cfg(int cfg, int reg, int value) +{ +X outb(reg, cfg); +X outb(value, cfg + 1); +X if (value != inb(cfg + 1)) { +X fprintf(stderr, "error: msnd_write_cfg: I/O error\n"); +X return -EIO; +X } +X return 0; +} +X +static int msnd_read_cfg(int cfg, int reg) +{ +X outb(reg, cfg); +X return inb(cfg + 1); +} +X +static int msnd_write_cfg_io0(int cfg, int num, WORD io) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_IO0_BASEHI, HIBYTE(io))) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_IO0_BASELO, LOBYTE(io))) +X return -EIO; +X return 0; +} +X +static int msnd_read_cfg_io0(int cfg, int num, WORD *io) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X +X *io = MAKEWORD(msnd_read_cfg(cfg, IREG_IO0_BASELO), +X msnd_read_cfg(cfg, IREG_IO0_BASEHI)); +X +X return 0; +} +X +static int msnd_write_cfg_io1(int cfg, int num, WORD io) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_IO1_BASEHI, HIBYTE(io))) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_IO1_BASELO, LOBYTE(io))) +X return -EIO; +X return 0; +} +X +static int msnd_read_cfg_io1(int cfg, int num, WORD *io) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X +X *io = MAKEWORD(msnd_read_cfg(cfg, IREG_IO1_BASELO), +X msnd_read_cfg(cfg, IREG_IO1_BASEHI)); +X +X return 0; +} +X +static int msnd_write_cfg_irq(int cfg, int num, WORD irq) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_IRQ_NUMBER, LOBYTE(irq))) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_IRQ_TYPE, IRQTYPE_EDGE)) +X return -EIO; +X return 0; +} +X +static int msnd_read_cfg_irq(int cfg, int num, WORD *irq) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X +X *irq = msnd_read_cfg(cfg, IREG_IRQ_NUMBER); +X +X return 0; +} +X +static int msnd_write_cfg_mem(int cfg, int num, int mem) +{ +X WORD wmem; +X +X mem >>= 8; +X mem &= 0xfff; +X wmem = (WORD)mem; +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_MEMBASEHI, HIBYTE(wmem))) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_MEMBASELO, LOBYTE(wmem))) +X return -EIO; +X if (wmem && msnd_write_cfg(cfg, IREG_MEMCONTROL, (MEMTYPE_HIADDR | MEMTYPE_16BIT))) +X return -EIO; +X return 0; +} +X +static int msnd_read_cfg_mem(int cfg, int num, int *mem) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X +X *mem = MAKEWORD(msnd_read_cfg(cfg, IREG_MEMBASELO), +X msnd_read_cfg(cfg, IREG_MEMBASEHI)); +X *mem <<= 8; +X +X return 0; +} +X +static int msnd_activate_logical(int cfg, int num) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X if (msnd_write_cfg(cfg, IREG_ACTIVATE, LD_ACTIVATE)) +X return -EIO; +X return 0; +} +X +static int msnd_write_cfg_logical(int cfg, int num, WORD io0, WORD io1, WORD irq, int mem) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X if (msnd_write_cfg_io0(cfg, num, io0)) +X return -EIO; +X if (msnd_write_cfg_io1(cfg, num, io1)) +X return -EIO; +X if (msnd_write_cfg_irq(cfg, num, irq)) +X return -EIO; +X if (msnd_write_cfg_mem(cfg, num, mem)) +X return -EIO; +X if (msnd_activate_logical(cfg, num)) +X return -EIO; +X return 0; +} +X +static int msnd_read_cfg_logical(int cfg, int num, WORD *io0, WORD *io1, WORD *irq, int *mem) +{ +X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) +X return -EIO; +X if (msnd_read_cfg_io0(cfg, num, io0)) +X return -EIO; +X if (msnd_read_cfg_io1(cfg, num, io1)) +X return -EIO; +X if (msnd_read_cfg_irq(cfg, num, irq)) +X return -EIO; +X if (msnd_read_cfg_mem(cfg, num, mem)) +X return -EIO; +X return 0; +} +X +static void usage(void) +{ +X fprintf(stderr, +X "\n" +X "pinnaclecfg 1.0\n" +X "\n" +X "usage: pinnaclecfg <config port> [device config]\n" +X "\n" +X "This is for use with the card in NON-PnP mode only.\n" +X "\n" +X "Available devices (not all available for Fiji):\n" +X "\n" +X " Device Description\n" +X " -------------------------------------------------------------------\n" +X " reset Reset all devices (i.e. disable)\n" +X " show Display current device configurations\n" +X "\n" +X " dsp <io> <irq> <mem> Audio device\n" +X " mpu <io> <irq> Internal Kurzweil synth\n" +X " ide <io0> <io1> <irq> On-board IDE controller\n" +X " joystick <io> Joystick port\n" +X "\n"); +X exit(1); +} +X +static int cfg_reset(void) +{ +X int i; +X +X for (i = 0; i < 4; ++i) +X msnd_write_cfg_logical(config_port, i, 0, 0, 0, 0); +X +X return 0; +} +X +static int cfg_show(void) +{ +X int i; +X int count = 0; +X +X for (i = 0; i < 4; ++i) { +X WORD io0, io1, irq; +X int mem; +X msnd_read_cfg_logical(config_port, i, &io0, &io1, &irq, &mem); +X switch (i) { +X case 0: +X if (io0 || irq || mem) { +X printf("dsp 0x%x %d 0x%x\n", io0, irq, mem); +X ++count; +X } +X break; +X case 1: +X if (io0 || irq) { +X printf("mpu 0x%x %d\n", io0, irq); +X ++count; +X } +X break; +X case 2: +X if (io0 || io1 || irq) { +X printf("ide 0x%x 0x%x %d\n", io0, io1, irq); +X ++count; +X } +X break; +X case 3: +X if (io0) { +X printf("joystick 0x%x\n", io0); +X ++count; +X } +X break; +X } +X } +X +X if (count == 0) +X fprintf(stderr, "no devices configured\n"); +X +X return 0; +} +X +static int cfg_dsp(int argc, char *argv[]) +{ +X int io, irq, mem; +X +X if (argc < 3 || +X sscanf(argv[0], "0x%x", &io) != 1 || +X sscanf(argv[1], "%d", &irq) != 1 || +X sscanf(argv[2], "0x%x", &mem) != 1) +X usage(); +X +X if (!(io == 0x290 || +X io == 0x260 || +X io == 0x250 || +X io == 0x240 || +X io == 0x230 || +X io == 0x220 || +X io == 0x210 || +X io == 0x3e0)) { +X fprintf(stderr, "error: io must be one of " +X "210, 220, 230, 240, 250, 260, 290, or 3E0\n"); +X usage(); +X } +X +X if (!(irq == 5 || +X irq == 7 || +X irq == 9 || +X irq == 10 || +X irq == 11 || +X irq == 12)) { +X fprintf(stderr, "error: irq must be one of " +X "5, 7, 9, 10, 11 or 12\n"); +X usage(); +X } +X +X if (!(mem == 0xb0000 || +X mem == 0xc8000 || +X mem == 0xd0000 || +X mem == 0xd8000 || +X mem == 0xe0000 || +X mem == 0xe8000)) { +X fprintf(stderr, "error: mem must be one of " +X "0xb0000, 0xc8000, 0xd0000, 0xd8000, 0xe0000 or 0xe8000\n"); +X usage(); +X } +X +X return msnd_write_cfg_logical(config_port, 0, io, 0, irq, mem); +} +X +static int cfg_mpu(int argc, char *argv[]) +{ +X int io, irq; +X +X if (argc < 2 || +X sscanf(argv[0], "0x%x", &io) != 1 || +X sscanf(argv[1], "%d", &irq) != 1) +X usage(); +X +X return msnd_write_cfg_logical(config_port, 1, io, 0, irq, 0); +} +X +static int cfg_ide(int argc, char *argv[]) +{ +X int io0, io1, irq; +X +X if (argc < 3 || +X sscanf(argv[0], "0x%x", &io0) != 1 || +X sscanf(argv[0], "0x%x", &io1) != 1 || +X sscanf(argv[1], "%d", &irq) != 1) +X usage(); +X +X return msnd_write_cfg_logical(config_port, 2, io0, io1, irq, 0); +} +X +static int cfg_joystick(int argc, char *argv[]) +{ +X int io; +X +X if (argc < 1 || +X sscanf(argv[0], "0x%x", &io) != 1) +X usage(); +X +X return msnd_write_cfg_logical(config_port, 3, io, 0, 0, 0); +} +X +int main(int argc, char *argv[]) +{ +X char *device; +X int rv = 0; +X +X --argc; ++argv; +X +X if (argc < 2) +X usage(); +X +X sscanf(argv[0], "0x%x", &config_port); +X if (config_port != 0x250 && config_port != 0x260 && config_port != 0x270) { +X fprintf(stderr, "error: <config port> must be 0x250, 0x260 or 0x270\n"); +X exit(1); +X } +X if (ioperm(config_port, 2, 1)) { +X perror("ioperm"); +X fprintf(stderr, "note: pinnaclecfg must be run as root\n"); +X exit(1); +X } +X device = argv[1]; +X +X argc -= 2; argv += 2; +X +X if (strcmp(device, "reset") == 0) +X rv = cfg_reset(); +X else if (strcmp(device, "show") == 0) +X rv = cfg_show(); +X else if (strcmp(device, "dsp") == 0) +X rv = cfg_dsp(argc, argv); +X else if (strcmp(device, "mpu") == 0) +X rv = cfg_mpu(argc, argv); +X else if (strcmp(device, "ide") == 0) +X rv = cfg_ide(argc, argv); +X else if (strcmp(device, "joystick") == 0) +X rv = cfg_joystick(argc, argv); +X else { +X fprintf(stderr, "error: unknown device %s\n", device); +X usage(); +X } +X +X if (rv) +X fprintf(stderr, "error: device configuration failed\n"); +X +X return 0; +} +SHAR_EOF + $shar_touch -am 0905082598 'MultiSound.d/pinnaclecfg.c' && + chmod 0664 'MultiSound.d/pinnaclecfg.c' || + $echo 'restore of' 'MultiSound.d/pinnaclecfg.c' 'failed' + if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ + && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then + md5sum -c << SHAR_EOF >/dev/null 2>&1 \ + || $echo 'MultiSound.d/pinnaclecfg.c:' 'MD5 check failed' +71f99b834a2845daae8ae034623e313e MultiSound.d/pinnaclecfg.c +SHAR_EOF + else + shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/pinnaclecfg.c'`" + test 10301 -eq "$shar_count" || + $echo 'MultiSound.d/pinnaclecfg.c:' 'original size' '10301,' 'current size' "$shar_count!" + fi +fi +# ============= MultiSound.d/Makefile ============== +if test -f 'MultiSound.d/Makefile' && test "$first_param" != -c; then + $echo 'x -' SKIPPING 'MultiSound.d/Makefile' '(file already exists)' +else + $echo 'x -' extracting 'MultiSound.d/Makefile' '(text)' + sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/Makefile' && +CC = gcc +CFLAGS = -O +PROGS = setdigital pinnaclecfg conv +X +all: $(PROGS) +X +clean: +X rm -f $(PROGS) +SHAR_EOF + $shar_touch -am 0828231798 'MultiSound.d/Makefile' && + chmod 0664 'MultiSound.d/Makefile' || + $echo 'restore of' 'MultiSound.d/Makefile' 'failed' + if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ + && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then + md5sum -c << SHAR_EOF >/dev/null 2>&1 \ + || $echo 'MultiSound.d/Makefile:' 'MD5 check failed' +ab95a049d10611a5e5d559a56965b33f MultiSound.d/Makefile +SHAR_EOF + else + shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/Makefile'`" + test 96 -eq "$shar_count" || + $echo 'MultiSound.d/Makefile:' 'original size' '96,' 'current size' "$shar_count!" + fi +fi +# ============= MultiSound.d/conv.l ============== +if test -f 'MultiSound.d/conv.l' && test "$first_param" != -c; then + $echo 'x -' SKIPPING 'MultiSound.d/conv.l' '(file already exists)' +else + $echo 'x -' extracting 'MultiSound.d/conv.l' '(text)' + sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/conv.l' && +%% +[ \n\t,\r] +\;.* +DB +[0-9A-Fa-f]+H { int n; sscanf(yytext, "%xH", &n); printf("%c", n); } +%% +int yywrap() { return 1; } +main() { yylex(); } +SHAR_EOF + $shar_touch -am 0828231798 'MultiSound.d/conv.l' && + chmod 0664 'MultiSound.d/conv.l' || + $echo 'restore of' 'MultiSound.d/conv.l' 'failed' + if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ + && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then + md5sum -c << SHAR_EOF >/dev/null 2>&1 \ + || $echo 'MultiSound.d/conv.l:' 'MD5 check failed' +d2411fc32cd71a00dcdc1f009e858dd2 MultiSound.d/conv.l +SHAR_EOF + else + shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/conv.l'`" + test 141 -eq "$shar_count" || + $echo 'MultiSound.d/conv.l:' 'original size' '141,' 'current size' "$shar_count!" + fi +fi +rm -fr _sh21233 +exit 0 diff --git a/Documentation/sound/Wavefront b/Documentation/sound/Wavefront index aadbfd23f..58cd7f14f 100644 --- a/Documentation/sound/Wavefront +++ b/Documentation/sound/Wavefront @@ -3,15 +3,15 @@ Paul Barton-Davis, July 1998 - VERSION 0.2.4 + VERSION 0.2.5 Driver Status ------------- -Requires: Kernel 2.1.106 or later (a version of the driver is included -with kernels 2.1.109 and above) +Requires: Kernel 2.1.106 or later (the driver is included with kernels +2.1.109 and above) -As of 7/20/1998, this driver is currently in *BETA* state. This means +As of 7/22/1998, this driver is currently in *BETA* state. This means that it compiles and runs, and that I use it on my system (Linux 2.1.106) with some reasonably demanding applications and uses. I believe the code is approaching an initial "finished" state that diff --git a/Documentation/specialix.txt b/Documentation/specialix.txt index 158699b1a..75e80cde8 100644 --- a/Documentation/specialix.txt +++ b/Documentation/specialix.txt @@ -17,7 +17,10 @@ written by Dmitry Gorodchanin. The specialix IO8+ card programming information was obtained from the CL-CD1865 Data Book, and Specialix document number 6200059: IO8+ Hardware - Functional Specification. + Functional Specification, augmented by document number 6200088: + Merak Hardware Functional Specification. (IO8+/PCI is also + called Merak) + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -67,6 +70,9 @@ haven't the foggiest why. My Specialix card is now at 0x180. My other computer runs just fine with the Specialix card at 0x100.... The card occupies 4 addresses, but actually only two are really used. +The PCI version doesn't have any dip switches. The BIOS assigns +an IO address. + The driver now still autoprobes at 0x100, 0x180, 0x250 and 0x260. If that causes trouble for you, please report that. I'll remove autoprobing then. @@ -75,6 +81,9 @@ The driver will tell the card what IRQ to use, so you don't have to change any jumpers to change the IRQ. Just use a command line argument (irq=xx) to the insmod program to set the interrupt. +The BIOS assigns the IRQ on the PCI version. You have no say in what +IRQ to use in that case. + If your specialix cards are not at the default locations, you can use the kernel command line argument "specialix=io0,irq0,io1,irq1...". Here "io0" is the io address for the first card, and "irq0" is the @@ -99,6 +108,32 @@ to the command line. This would become in your /etc/lilo.conf file if you use lilo. +The Specialix driver is slightly odd: It allows you to have the second +or third card detected without having a first card. This has +advantages and disadvantages. A slot that isn't filled by an ISA card, +might be filled if a PCI card is detected. Thus if you have an ISA +card at 0x250 and a PCI card, you would get: + +sx0: specialix IO8+ Board at 0x100 not found. +sx1: specialix IO8+ Board at 0x180 not found. +sx2: specialix IO8+ board detected at 0x250, IRQ 12, CD1865 Rev. B. +sx3: specialix IO8+ Board at 0x260 not found. +sx0: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B. + +This would happen if you don't give any probe hints to the driver. +If you would specify: + + specialix=0x250,11 + +you'd get the following messages: + +sx0: specialix IO8+ board detected at 0x250, IRQ 11, CD1865 Rev. B. +sx1: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B. + +ISA probing is aborted after the IO address you gave is exhausted, and +the PCI card is now detected as the second card. The ISA card is now +also forced to IRQ11.... + Baud rates ========== @@ -118,20 +153,26 @@ limit to the number of -=bits=- per second that the chip can handle.) If you near the "limit" you will first start to see a graceful degradation in that the chip cannot keep the transmitter busy at all times. However with a central clock this slow, you can also get it to -miss incoming characters. +miss incoming characters. The driver will print a warning message when +you are outside the official specs. The messages usually show up in +the file /var/log/messages . The specialix card cannot reliably do 115k2. If you use it, you have to do "extensive testing" (*) to verify if it actually works. When "mgetty" communicates with my modem at 115k2 it reports: got: +++[0d]ATQ0V1H0[0d][0d][8a]O[cb][0d][8a] - ^^^^ ^^^^ ^^^^ + ^^^^ ^^^^ ^^^^ The three characters that have the "^^^" under them have suffered a bit error in the highest bit. In conclusion: I've tested it, and found that it simply DOESN'T work for me. I also suspect that this is also caused by the baud rate being just a little bit out of tune. +I upgraded the crystal to 66Mhz on one of my Specialix cards. Works +great! Contact me for details. (Voids warranty, requires a steady hand +and more such restrictions....) + (*) Cirrus logic CD1864 databook, page 40. @@ -248,7 +289,7 @@ for this. Ports and devices ================= -Port 0 is the one furthest from the ISA connector. +Port 0 is the one furthest from the card-edge connector. Devices: @@ -265,11 +306,21 @@ do done echo "" +If your system doesn't come with these devices preinstalled, bug your +linux-vendor about this. They have had ample time to get this +implemented by now. You cannot have more than 4 boards in one computer. The card only supports 4 different interrupts. If you really want this, contact me about this and I'll give you a few tips (requires soldering iron).... +If you have enough PCI slots, you can probably use more than 4 PCI +versions of the card though.... + +The PCI version of the card cannot adhere to the mechanical part of +the PCI spec because the 8 serial connectors are simply too large. If +it doesn't fit in your computer, bring back the card. + ------------------------------------------------------------------------ diff --git a/Documentation/stallion.txt b/Documentation/stallion.txt index c80d39bc0..5a1a30320 100644 --- a/Documentation/stallion.txt +++ b/Documentation/stallion.txt @@ -4,8 +4,8 @@ Stallion Multiport Serial Driver Readme Copyright (C) 1994-1998, Stallion Technologies (support@stallion.com). -Version: 5.4.6 -Date: 23JUN98 +Version: 5.4.7 +Date: 23OCT98 diff --git a/Documentation/sysctl/README b/Documentation/sysctl/README index ca08da9da..11d3f3f0b 100644 --- a/Documentation/sysctl/README +++ b/Documentation/sysctl/README @@ -1,4 +1,4 @@ -Documentation for /proc/sys/*/* version 0.1 +Documentation for /proc/sys/ kernel version 2.1.128 (c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl> 'Why', I hear you ask, 'would anyone even _want_ documentation @@ -12,6 +12,9 @@ have the time or knowledge to read the source code. Furthermore, the programmers who built sysctl have built it to be actually used, not just for the fun of programming it :-) +If you prefer HTML, feel free to visit the Linux-MM homepage +<http://www.phys.uu.nl/~riel/mm-patch/>... + ============================================================== Legal blurb: @@ -58,9 +61,9 @@ The subdirs are about: debug/ <empty> dev/ device specific information (eg dev/cdrom/info) fs/ specific filesystems + filehandle, inode, dentry and quota tuning binfmt_misc <linux/Documentation/binfmt_misc.txt> kernel/ global kernel info / tuning - open file / inode tuning miscellaneous stuff net/ networking stuff, for documentation look in: <linux/Documentation/networking/> diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt new file mode 100644 index 000000000..425e23f73 --- /dev/null +++ b/Documentation/sysctl/fs.txt @@ -0,0 +1,116 @@ +Documentation for /proc/sys/fs/* kernel version 2.1.128 + (c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl> + +For general info and legal blurb, please look in README. + +============================================================== + +This file contains documentation for the sysctl files in +/proc/sys/fs/ and is valid for Linux kernel version 2.1. + +The files in this directory can be used to tune and monitor +miscellaneous and general things in the operation of the Linux +kernel. Since some of the files _can_ be used to screw up your +system, it is advisable to read both documentation and source +before actually making adjustments. + +Currently, these files are in /proc/sys/fs: +- dentry-state +- dquot-max +- dquot-nr +- file-max +- file-nr +- inode-max +- inode-nr +- inode-state + +Documentation for the files in /proc/sys/fs/binfmt_misc is +in Documentation/binfmt_misc.txt. + +============================================================== + +dentry-state: + +From linux/fs/dentry.c: +-------------------------------------------------------------- +struct { + int nr_dentry; + int nr_unused; + int age_limit; /* age in seconds */ + int want_pages; /* pages requested by system */ + int dummy[2]; +} dentry_stat = {0, 0, 45, 0,}; +-------------------------------------------------------------- + +Dentries are dynamically allocated and deallocated, and +nr_dentry seems to be 0 all the time. Hence it's safe to +assume that only nr_unused, age_limit and want_pages are +used. Nr_unused seems to be exactly what its name says. +Age_limit is the age in seconds after which dcache entries +can be reclaimed when memory is short and want_pages is +nonzero when shrink_dcache_pages() has been called and the +dcache isn't pruned yet. + +============================================================== + +dquot-max & dquot-nr: + +The file dquot-max shows the maximum number of cached disk +quota entries. + +The file dquot-nr shows the number of allocated disk quota +entries and the number of free disk quota entries. + +If the number of free cached disk quotas is very low and +you have some awesome number of simultaneous system users, +you might want to raise the limit. + +============================================================== + +file-max & file-nr: + +The kernel allocates file handles dynamically, but as yet it +doesn't free them again. + +The value in file-max denotes the maximum number of file- +handles that the Linux kernel will allocate. When you get lots +of error messages about running out of file handles, you might +want to increase this limit. + +The three values in file-nr denote the number of allocated +file handles, the number of used file handles and the maximum +number of file handles. When the allocated file handles come +close to the maximum, but the number of actually used ones is +far behind, you've encountered a peak in your usage of file +handles and you don't need to increase the maximum. + +============================================================== + +inode-max, inode-nr & inode-state: + +As with file handles, the kernel allocates the inode structures +dynamically, but can't free them yet. + +The value in inode-max denotes the maximum number of inode +handlers. This value should be 3-4 times larger than the value +in file-max, since stdin, stdout and network sockets also +need an inode struct to handle them. When you regularly run +out of inodes, you need to increase this value. + +The file inode-nr contains the first two items from +inode-state, so we'll skip to that file... + +Inode-state contains three actual numbers and four dummies. +The actual numbers are, in order of appearance, nr_inodes, +nr_free_inodes and preshrink. + +Nr_inodes stands for the number of inodes the system has +allocated, this can be slightly more than inode-max because +Linux allocates them one pageful at a time. + +Nr_free_inodes represents the number of free inodes (?) and +preshrink is nonzero when the nr_inodes > inode-max and the +system needs to prune the inode list instead of allocating +more. + + diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 5525e236a..c47f7e1c2 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -1,4 +1,4 @@ -Documentation for /proc/sys/kernel/* version 0.1 +Documentation for /proc/sys/kernel/* kernel version 2.1.128 (c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl> For general info and legal blurb, please look in README. @@ -14,25 +14,44 @@ kernel. Since some of the files _can_ be used to screw up your system, it is advisable to read both documentation and source before actually making adjustments. -Currently, these files are in /proc/sys/kernel: +Currently, these files might (depending on your configuration) +show up in /proc/sys/kernel: +- acct - ctrl-alt-del - dentry-state - domainname -- file-max -- file-nr - hostname -- inode-max -- inode-nr -- inode-state +- htab-reclaim [ PPC only ] +- java-appletviewer [ binfmt_java, obsolete ] +- java-interpreter [ binfmt_java, obsolete ] - modprobe ==> Documentation/kmod.txt - osrelease - ostype - panic +- powersave-nap [ PPC only ] - printk - real-root-dev ==> Documentation/initrd.txt -- reboot-cmd ==> SPARC specific -- securelevel +- reboot-cmd [ SPARC only ] +- sg-big-buff [ generic SCSI device (sg) ] - version +- zero-paged [ PPC only ] + +============================================================== + +acct: + +highwater lowwater frequency + +If BSD-style process accounting is enabled these values control +its behaviour. If free space on filesystem where the log lives +goes below <lowwater>% accounting suspends. If free space gets +above <highwater>% accounting resumes. <Frequency> determines +how often do we check the amount of free space (value is in +seconds). Default: +4 2 30 +That is, suspend accounting if there left <= 2% free; resume it +if we got >=4%; consider information about amount of free space +valid for 30 seconds. ============================================================== @@ -51,30 +70,6 @@ to decide what to do with it. ============================================================== -dentry-state: - -From linux/fs/dentry.c: --------------------------------------------------------------- -struct { - int nr_dentry; - int nr_unused; - int age_limit; /* age in seconds */ - int want_pages; /* pages requested by system */ - int dummy[2]; -} dentry_stat = {0, 0, 45, 0,}; --------------------------------------------------------------- - -Dentries are dynamically allocated and deallocated, and -nr_dentry seems to be 0 all the time. Hence it's safe to -assume that only nr_unused, age_limit and want_pages are -used. Nr_unused seems to be exactly what its name says. -Age_limit is the age in seconds after which dcache entries -can be reclaimed when memory is short and want_pages is -nonzero when shrink_dcache_pages() has been called and the -dcache isn't pruned yet. - -============================================================== - domainname & hostname: These files can be controlled to set the domainname and @@ -86,52 +81,12 @@ would suffice to set your hostname and domainname. ============================================================== -file-max & file-nr: - -The kernel allocates file handles dynamically, but as yet it -doesn't free them again. - -The value in file-max denotes the maximum number of file- -handles that the Linux kernel will allocate. When you get lots -of error messages about running out of file handles, you might -want to increase this limit. - -The three values in file-nr denote the number of allocated -file handles, the number of used file handles and the maximum -number of file handles. When the allocated file handles come -close to the maximum, but the number of actually used ones is -far behind, you've encountered a peak in your usage of file -handles and you don't need to increase the maximum. - -============================================================== - -inode-max, inode-nr & inode-state: - -As with file handles, the kernel allocates the inode structures -dynamically, but can't free them yet. - -The value in inode-max denotes the maximum number of inode -handlers. This value should be 3-4 times larger than the value -in file-max, since stdin, stdout and network sockets also -need an inode struct to handle them. When you regularly run -out of inodes, you need to increase this value. - -The file inode-nr contains the first two items from -inode-state, so we'll skip to that file... - -Inode-state contains three actual numbers and four dummies. -The actual numbers are, in order of appearance, nr_inodes, -nr_free_inodes and preshrink. - -Nr_inodes stands for the number of inodes the system has -allocated, this can be slightly more than inode-max because -Linux allocates them one pageful at a time. - -Nr_free_inodes represents the number of free inodes (?) and -preshrink is nonzero when the nr_inodes > inode-max and the -system needs to prune the inode list instead of allocating -more. +htab-reclaim: (PPC only) +Setting this to a non-zero value, the PowerPC htab +(see Documentation/powerpc/ppc_htab.txt) is pruned +each time the system hits the idle loop. + ============================================================== osrelease, ostype & version: @@ -159,6 +114,13 @@ software watchdog, the recommended setting is 60. ============================================================== +powersave-nap: (PPC only) + +If set, Linux-PPC will use the 'nap' mode of powersaving, +otherwise the 'doze' mode will be used. + +============================================================== + printk: The four values in printk denote: console_loglevel, @@ -184,27 +146,30 @@ occur when the compiler changes. (???) ============================================================== -securelevel: +reboot-cmd: (Sparc only) -When the value in this file is nonzero, root is prohibited -from: -- changing the immutable and append-only flags on files -- changing sysctl things (limited ???) +??? This seems to be a way to give an argument to the Sparc +ROM/Flash boot loader. Maybe to tell it what to do after +rebooting. ??? ============================================================== -real-root-dev: (CONFIG_INITRD only) +sg-big-buff: -This file is used to configure the real root device when using -an initial ramdisk to configure the system before switching to -the 'real' root device. See linux/Documentation/initrd.txt for -more info. +This file shows the size of the generic SCSI (sg) buffer. +You can't tune it just yet, but you could change it on +compile time by editing include/scsi/sg.h and changing +the value of SG_BIG_BUFF. -============================================================== +There shouldn't be any reason to change this value. If +you can come up with one, you probably know what you +are doing anyway :) -reboot-cmd: (Sparc only) +============================================================== -??? This seems to be a way to give an argument to the Sparc -ROM/Flash boot loader. Maybe to tell it what to do after -rebooting. ??? +zero-paged: (PPC only) +When enabled (non-zero), Linux-PPC will pre-zero pages in +the idle loop, possibly speeding up get_free_pages. Since +this only affects what the idle loop is doing, you should +enable this and see if anything changes. diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index c49a2fe43..359478216 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt @@ -1,4 +1,4 @@ -Documentation for /proc/sys/vm/* version 0.1 +Documentation for /proc/sys/vm/* kernel version 2.1.128 (c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl> For general info and legal blurb, please look in README. @@ -20,8 +20,8 @@ Currently, these files are in /proc/sys/vm: - kswapd - overcommit_memory - pagecache +- pagetable_cache - swapctl -- swapout_interval ============================================================== @@ -56,7 +56,7 @@ union bdflush_param{ } bdf_prm = {{40, 500, 64, 256, 15, 30*HZ, 5*HZ, 1884, 2}}; -------------------------------------------------------------- -The first parameter governs the maximum number of of dirty +The first parameter governs the maximum number of dirty buffers in the buffer cache. Dirty means that the contents of the buffer still have to be written to disk (as opposed to a clean buffer, which can just be forgotten about). @@ -101,8 +101,9 @@ The values are: min_percent -- this is the minimum percentage of memory that should be spent on buffer memory borrow_percent -- when Linux is short on memory, and the - buffer cache uses more memory, free pages - are stolen from it + buffer cache uses more memory than this, + the MM subsystem will prune the buffercache + more heavily than other memory max_percent -- this is the maximum amount of memory that can be used for buffer memory @@ -112,25 +113,17 @@ freepages: This file contains the values in the struct freepages. That struct contains three members: min, low and high. -Although the goal of the Linux memory management subsystem -is to avoid fragmentation and make large chunks of free -memory (so that we can hand out DMA buffers and such), there -still are some page-based limits in the system, mainly to -make sure we don't waste too much memory trying to get large -free area's. - The meaning of the numbers is: freepages.min When the number of free pages in the system reaches this number, only the kernel can allocate more memory. -freepages.low If memory is too fragmented, the swapout - daemon is started, except when the number - of free pages is larger than freepages.low. -freepages.high The swapping daemon exits when memory is - sufficiently defragmented, when the number - of free pages reaches freepages.high or when - it has tried the maximum number of times. +freepages.low If the number of free pages gets below this + point, the kernel starts swapping agressively. +freepages.high The kernel tries to keep up to this amount of + memory free; if memory comes below this point, + the kernel gently starts swapping in the hopes + that it never has to do real agressive swapping. ============================================================== @@ -210,7 +203,8 @@ pagecache: This file does exactly the same as buffermem, only this file controls the struct page_cache, and thus controls -the amount of memory allowed for memory mapping of files. +the amount of memory allowed for memory mapping and generic +caching of files. You don't want the minimum level to be too low, otherwise your system might thrash when memory is tight or fragmentation @@ -218,6 +212,23 @@ is high... ============================================================== +pagetable_cache: + +The kernel keeps a number of page tables in a per-processor +cache (this helps a lot on SMP systems). The cache size for +each processor will be between the low and the high value. + +On a low-memory, single CPU system you can safely set these +values to 0 so you don't waste the memory. On SMP systems it +is used so that the system can do fast pagetable allocations +without having to aquire the kernel memory lock. + +For large systems, the settings are probably OK. For normal +systems they won't hurt a bit. For small systems (<16MB ram) +it might be advantageous to set both values to 0. + +============================================================== + swapctl: This file contains no less than 8 variables. @@ -274,14 +285,4 @@ process pages in order to satisfy buffer memory demands, you might want to either increase sc_bufferout_weight, or decrease the value of sc_pageout_weight. -============================================================== - -swapout_interval: - -The single value in this file controls the amount of time -between successive wakeups of kswapd when nr_free_pages is -between free_pages_low and free_pages_high. The default value -of HZ/4 is usually right, but when kswapd can't keep up with -the number of allocations in your system, you might want to -decrease this number. diff --git a/Documentation/video4linux/bttv/INSTALL b/Documentation/video4linux/bttv/INSTALL index 52cac1e6c..9b5de6cb6 100644 --- a/Documentation/video4linux/bttv/INSTALL +++ b/Documentation/video4linux/bttv/INSTALL @@ -20,6 +20,7 @@ 5: Philips PAL tuner 6: Temic NTSC tuner 7: Temic PAL tuner + 8: Temic 4036 FY5 NTSC tuner The number corresponds to the number (-1) given at the GPIO port of the Bt848 on Miro cards. @@ -34,7 +35,12 @@ 4: Intel 5: Diamond 6: AVerMedia - + 7: Matrix Vision MV-Delta + 8: Fly Video II + 9: TurboTV + 10: Newer Hauppage (Bt878) + 11: Miro PCTV Pro + 12: ADS Tech Channel Surfer TV (and maybe TV+FM) - You may have to adjust BTTV_MAJOR to a different number depending on your kernel version. The official number 81 does not work on some setups. diff --git a/MAINTAINERS b/MAINTAINERS index 322063663..bafcd3165 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16,7 +16,8 @@ trivial patch so apply some common sense. SMC etherpower for that.) 3. Make sure your changes compile correctly in multiple - configurations. + configurations. In paticular check changes work both as a module + and built into the kernel. 4. When you are happy with a change make it generally available for testing and await feedback. @@ -28,7 +29,8 @@ trivial patch so apply some common sense. job the maintainers (and especially Linus) do is to keep things looking the same. Sometimes this means that the clever hack in your driver to get around a problem actual needs to become a - generalized kernel feature ready for next time. + generalized kernel feature ready for next time. See + Documentation/CodingStyle for guidance here. PLEASE try to include any credit lines you want added with the patch. It avoids people being missed off by mistake and makes @@ -57,8 +59,7 @@ L: Mailing list that is relevant to this area W: Web-page with status/info S: Status, one of the following: - Supported: Someone is actually paid to look after this (wildly - improbable). + Supported: Someone is actually paid to look after this. Maintained: Someone actually looks after it. Odd Fixes: It has a maintainer but they don't have time to do much other than throw the odd patch in. See below.. @@ -142,8 +143,8 @@ W: http://www.arm.uk.linux.org/~rmk/armlinux.html S: Maintained AX.25 NETWORK LAYER -P: Jon Naylor -M: jsn@cs.nott.ac.uk +P: Matthias Welwarsky +M: dg2fef@afthd.tu-darmstadt.de L: linux-hams@vger.rutgers.edu S: Maintained @@ -185,6 +186,12 @@ W: http://qsl.net/dl1bke/ L: linux-hams@vger.rutgers.edu S: Maintained +DC390/AM53C974 SCSI driver +P: Kurt Garloff +M: K.Garloff@ping.de +W: ftp://student.physik.uni-dortmund.de/pub/linux/kernel/dc390/ +S: Maintained + DECnet NETWORK LAYER P: Steven Whitehouse M: SteveW@ACM.org @@ -197,7 +204,7 @@ M: hpa@zytor.com L: linux-kernel@vger.rutgers.edu S: Maintained -DIGI INTL. EPCA DRIVER: +DIGI INTL. EPCA DRIVER P: Daniel Taylor M: support@dgii.com M: digilnux@dgii.com @@ -241,6 +248,11 @@ M: Philip.Blundell@pobox.com L: linux-net@vger.rutgers.edu S: Maintained +ETHERTEAM 16I DRIVER +P: Mika Kuoppala +M: miku@iki.fi +S: Maintained + EXT2 FILE SYSTEM P: Remy Card M: Remy.Card@linux.org @@ -265,7 +277,7 @@ M: mike.mclagan@linux.org L: linux-net@vger.rutgers.edu S: Maintained -FTAPE/QIC-117: +FTAPE/QIC-117 P: Claus-Justus Heine M: claus@momo.math.rwth-aachen.de L: linux-tape@vger.rutgers.edu @@ -285,19 +297,31 @@ L: linux-scsi@vger.rutgers.edu W: http://www.icp-vortex.com/ S: Supported -HAYES ESP SERIAL DRIVER: +HAYES ESP SERIAL DRIVER P: Andrew J. Robinson M: arobinso@nyx.net L: linux-kernel@vger.rutgers.edu W: http://www.nyx.net/~arobinso S: Maintainted +HFS FILESYSTEM +P: Adrian Sun +M: asun@u.washington.edu +L: linux-kernel@vger.rutgers.edu +S: Maintained + HIGH-SPEED SCC DRIVER FOR AX.25 P: Klaus Kudielka M: oe1kib@oe1kib.ampr.org L: linux-hams@vger.rutgers.edu S: Maintained +HIPPI +P: Jes Sorensen +M: Jes.Sorensen@cern.ch +L: linux-hippi@sunsite.auc.dk +S: Maintained + HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series P: Jaroslav Kysela M: perex@jcu.cz @@ -310,8 +334,10 @@ L: linux-kernel@vger.rutgers.edu S: Odd Fixes IDE/ATAPI CDROM DRIVER -P: Erik Andersen -M: andersee@debian.org +P: Jens Axboe +M: axboe@image.dk +P: Chris Zwilling +M: chris@cloudnet.com L: linux-kernel@vger.rutgers.edu S: Maintained @@ -325,13 +351,7 @@ IP FIREWALL P: Paul Russell M: Paul.Russell@rustcorp.com.au W: http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html -S: Maintained - -IP FIREWALL -P: Paul Russell -M: Paul.Russell@rustcorp.com.au -W: http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html -S: Maintained +S: Supported IPX/SPX NETWORK LAYER P: Jay Schulist @@ -358,10 +378,16 @@ M: hpa@zytor.com L: autofs@linux.kernel.org S: Maintained +LAPB module +P: Henner Eisen +M: eis@baty.hanse.de +L: linux-x25@vger.rutgers.edu +S: Maintained + LINUX FOR POWERPC (PREP) P: Cort Dougan M: cort@cs.nmt.edu -W: http://www.cs.nmt.edu/~linuxppc/ +W: http://linuxppc.cs.nmt.edu/ S: Maintained LINUX FOR POWER MACINTOSH @@ -370,33 +396,46 @@ M: paulus@cs.anu.edu.au L: linux-pmac@samba.anu.edu.au S: Maintained -M68K: +M68K P: Jes Sorensen M: Jes.Sorensen@cern.ch W: http://www.clark.net/pub/lawrencc/linux/index.html L: linux-m68k@lists.linux-m68k.org S: Maintained -M68K ON APPLE MACINTOSH: +M68K ON APPLE MACINTOSH P: Alan Cox M: Alan.Cox@linux.org W: http://www.mac.linux-m68k.org/home.html L: linux-mac68k@wave.lm.com S: As time permits [Michael confess, you are the mac68k maintainer 8)] -MENUCONFIG: +M68K ON HP9000/300 +P: Philip Blundell +M: philb@gnu.org +W: http://www.tazenda.demon.co.uk/phil/linux-hp +S: Maintained + +MENUCONFIG P: Michael Elizabeth Chastain M: mec@shout.net L: linux-kernel@vger.rutgers.edu S: Maintained -MIPS: +MIPS P: Ralf Baechle M: ralf@gnu.ai.mit.edu W: http://lena.fnet.fr/ L: linux-mips@fnet.fr S: Maintained +MISCELLANEOUS MCA-SUPPORT +P: David Weinehall +M: mcalinux@acc.umu.se (project MCA-team) +M: tao@acc.umu.se (personal) +L: linux-kernel@vger.rutgers.edu +S: Maintained + MODULE SUPPORT [GENERAL], KERNELD P: Richard Henderson M: richard@gnu.ai.mit.edu @@ -414,7 +453,7 @@ P: Andrew Veliath M: andrewtv@usa.net S: Maintained -NCP FILESYSTEM: +NCP FILESYSTEM P: Petr Vandrovec M: vandrove@vc.cvut.cz P: Volker Lendecke @@ -423,8 +462,8 @@ L: linware@sh.cvut.cz S: Maintained NETROM NETWORK LAYER -P: Jon Naylor -M: jsn@cs.nott.ac.uk +P: Tomi Manninen +M: Tomi.Manninen@hut.fi L: linux-hams@vger.rutgers.edu S: Maintained @@ -433,14 +472,14 @@ P: Pavel Machek M: pavel@atrey.karlin.mff.cuni.cz S: Maintained -NETWORKING [GENERAL]: +NETWORKING [GENERAL] P: Networking Teak M: netdev@nuclecu.unam.mx L: linux-net@vger.rutgers.edu W: http://www.uk.linux.org/NetNews.html (2.0 only) S: Maintained -NETWORKING [IPv4/IPv6]: +NETWORKING [IPv4/IPv6] P: David S. Miller M: davem@caip.rutgers.edu P: Eric Schenk @@ -473,9 +512,7 @@ M: campbell@torque.net P: Andrea Arcangeli M: andrea@e-mind.com L: linux-parport@torque.net -L: pnp-list@redhat.com W: http://www.cyberelk.demon.co.uk/parport.html -W: http://www.cage.curtin.edu.au/~campbell/parbus/ S: Maintained PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES @@ -529,7 +566,13 @@ M gpg109@rsphy1.anu.edu.au L: linux-kernel@vger.rutgers.edu S: Maintained -RISCOM8 DRIVER: +ROSE NETWORK LAYER +P: Frederic Rible +M: frible@teaser.fr +L: linux-hams@vger.rutgers.edu +S: Maintained + +RISCOM8 DRIVER P: Dmitry Gorodchanin M: pgmdsg@ibi.com L: linux-kernel@vger.rutgers.edu @@ -551,7 +594,7 @@ M: Kai.Makisara@metla.fi L: linux-scsi@vger.rutgers.edu S: Maintained -SMB FILESYSTEM: +SMB FILESYSTEM P: Volker Lendecke M: lendecke@Math.Uni-Goettingen.de L: samba@listproc.anu.edu.au @@ -593,12 +636,6 @@ M: Jay.Schulist@spacs.k12.wi.us L: linux-net@vger.rutgers.edu S: Supported -SPX NETWORK LAYER -P: Jay Schulist -M: Jay.Schulist@spacs.k12.wi.us -L: linux-net@vger.rutgers.edu -S: Supported - STALLION TECHNOLOGIES MULTIPORT SERIAL BOARDS P: Greg Ungerer M: support@stallion.oz.au @@ -612,7 +649,7 @@ M: cheshire@cs.stanford.edu W: http://mosquitonet.Stanford.EDU/strip.html S: Maintained -SVGA HANDLING: +SVGA HANDLING P: Martin Mares M: mj@atrey.karlin.mff.cuni.cz L: linux-video@atrey.karlin.mff.cuni.cz @@ -631,7 +668,7 @@ S: Maintained TOKEN-RING NETWORK DRIVER P: Paul Norton -M: p.norton@computer.org +M: pnorton@ieee.org L: linux-net@vger.rutgers.edu L: linux-tr@emissary.aus-etc.com S: Maintained @@ -649,8 +686,10 @@ L: linux-kernel@vger.rutgers.edu S: Maintained UNIFORM CDROM DRIVER -P: Erik Andersen -M: andersee@debian.org +P: Jens Axboe +M: axboe@image.dk +P: Chris Zwilling +M: chris@cloudnet.com L: linux-kernel@vger.rutgers.edu S: Maintained @@ -685,6 +724,18 @@ M: zaga@fly.cc.fer.hr L: linux-scsi@vger.rutgers.edu S: Maintained +X.25 NETWORK LAYER +P: Henner Eisen +M: eis@baty.hanse.de +L: linux-x25@vger.rutgers.edu +S: Maintained + +Z85230 SYNCHRONOUS DRIVER +P: Alan Cox +M: alan@redhat.com +W: http://roadrunner.swansea.linux.org.uk/synchronous.shtml +S: Maintained + Z8530 DRIVER FOR AX.25 P: Joerg Reuter M: jreuter@poboxes.com @@ -693,7 +744,6 @@ W: http://qsl.net/dl1bke/ L: linux-hams@vger.rutgers.edu S: Maintained - -REST: +THE REST P: Linus Torvalds S: Buried alive in diapers @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 1 -SUBLEVEL = 121 +SUBLEVEL = 131 ARCH = mips @@ -159,6 +159,10 @@ ifdef CONFIG_ZORRO DRIVERS := $(DRIVERS) drivers/zorro/zorro.a endif +ifeq ($(CONFIG_FC4),y) +DRIVERS := $(DRIVERS) drivers/fc4/fc4.a +endif + ifdef CONFIG_PPC DRIVERS := $(DRIVERS) drivers/macintosh/macintosh.a endif @@ -324,10 +328,10 @@ modules_install: if [ -f VIDEO_MODULES ]; then inst_mod VIDEO_MODULES video; fi; \ if [ -f FC4_MODULES ]; then inst_mod FC4_MODULES fc4; fi; \ \ - ls *.o > .allmods; \ - echo $$MODULES | tr ' ' '\n' | sort | comm -23 .allmods - > .misc; \ - if [ -s .misc ]; then inst_mod .misc misc; fi; \ - rm -f .misc .allmods; \ + ls *.o > $$MODLIB/.allmods; \ + echo $$MODULES | tr ' ' '\n' | sort | comm -23 $$MODLIB/.allmods - > $$MODLIB/.misc; \ + if [ -s $$MODLIB/.misc ]; then inst_mod $$MODLIB/.misc misc; fi; \ + rm -f $$MODLIB/.misc $$MODLIB/.allmods; \ ) # modules disabled.... @@ -393,7 +397,7 @@ sums: dep-files: scripts/mkdep archdep include/linux/version.h scripts/mkdep init/*.c > .depend - find $(FINDHPATH) -follow -name \*.h ! -name modversions.h -print | env -i xargs scripts/mkdep > .hdepend + find $(FINDHPATH) -follow -name \*.h ! -name modversions.h -print | xargs scripts/mkdep > .hdepend # set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i fastdep; done # let this be made through the fastdep rule in Rules.make $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" @@ -96,15 +96,6 @@ INSTALLING the kernel: the current directory, but an alternative directory can be specified as the second argument. - - Make sure your /usr/include/asm, /usr/include/linux, and /usr/include/scsi - directories are just symlinks to the kernel sources: - - cd /usr/include - rm -rf asm linux scsi - ln -s /usr/src/linux/include/asm-i386 asm - ln -s /usr/src/linux/include/linux linux - ln -s /usr/src/linux/include/scsi scsi - - Make sure you have no stale .o files and dependencies lying around: cd /usr/src/linux diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile index 4c8fb58bf..bcdf3d5e2 100644 --- a/arch/alpha/Makefile +++ b/arch/alpha/Makefile @@ -19,17 +19,23 @@ old_gas := $(shell if $(AS) --version 2>&1 | grep 'version 2.7' > /dev/null; the # Determine if GCC understands the -mcpu= option. have_mcpu := $(shell if $(CC) -mcpu=ev5 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi) -# If GENERIC, make sure to turn off any instruction set extensions that -# the host compiler might have on by default. Given that EV4 and EV5 -# have the same instruction set, prefer EV5 because an EV5 schedule is -# more likely to keep an EV4 processor busy than vice-versa. -ifeq ($(CONFIG_ALPHA_GENERIC)$(have_mcpu),yy) - CFLAGS := $(CFLAGS) -mcpu=ev5 -endif - -# If EV6, turn on the proper optimizations. -ifeq ($(CONFIG_ALPHA_EV6)$(have_mcpu),yy) - CFLAGS := $(CFLAGS) -mcpu=ev6 +# Turn on the proper cpu optimizations. +ifeq ($(have_mcpu),y) + # If GENERIC, make sure to turn off any instruction set extensions that + # the host compiler might have on by default. Given that EV4 and EV5 + # have the same instruction set, prefer EV5 because an EV5 schedule is + # more likely to keep an EV4 processor busy than vice-versa. + ifeq ($(CONFIG_ALPHA_GENERIC),y) + CFLAGS := $(CFLAGS) -mcpu=ev5 + endif + ifeq ($(CONFIG_ALPHA_EV4),y) + CFLAGS := $(CFLAGS) -mcpu=ev4 + endif + # Leave out EV5, since it is too hard to figure out whether we + # should use EV56 insns or not. + ifeq ($(CONFIG_ALPHA_EV6),y) + CFLAGS := $(CFLAGS) -mcpu=ev6 + endif endif # For TSUNAMI, we must have the assembler not emulate our instructions. diff --git a/arch/alpha/boot/Makefile b/arch/alpha/boot/Makefile index 13d9f514c..ee3460463 100644 --- a/arch/alpha/boot/Makefile +++ b/arch/alpha/boot/Makefile @@ -36,7 +36,10 @@ bootimage: tools/mkbb tools/lxboot tools/bootlx vmlinux.nh tools/mkbb bootimage tools/lxboot bootpfile: tools/bootph vmlinux.nh - ( cat tools/bootph vmlinux.nh ) > bootpfile + cat tools/bootph vmlinux.nh > bootpfile +ifdef INITRD + cat $(INITRD) >> bootpfile +endif srmboot: bootdevice bootimage dd if=bootimage of=$(BOOTDEV) bs=512 seek=1 skip=1 @@ -48,15 +51,18 @@ bootdevice: vmlinux.gz: vmlinux gzip -fv9 vmlinux -# -# A raw binary without header. Used by raw boot. -# main.o: ksize.h bootp.o: ksize.h -ksize.h: $(OBJSTRIP) vmlinux.nh - echo "#define KERNEL_SIZE `$(OBJSTRIP) -p vmlinux.nh /dev/null`" > $@ +ksize.h: vmlinux.nh dummy + echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T +ifdef INITRD + [ -f $(INITRD) ] || exit 1 + echo "#define INITRD_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T +endif + cmp -s $@T $@ || mv -f $@T $@ + rm -f $@T vmlinux.nh: $(VMLINUX) $(OBJSTRIP) $(OBJSTRIP) -v $(VMLINUX) vmlinux.nh @@ -91,3 +97,5 @@ clean: rm -f vmlinux.nh ksize.h dep: + +dummy: diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c index 2dc8b6a4d..34645a643 100644 --- a/arch/alpha/boot/bootp.c +++ b/arch/alpha/boot/bootp.c @@ -22,74 +22,30 @@ #include "ksize.h" -extern int vsprintf(char *, const char *, va_list); extern unsigned long switch_to_osf_pal(unsigned long nr, struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa, - unsigned long vptb, unsigned long *kstk); + unsigned long *vptb); -extern long dispatch(long code, ...); - -static void -puts(const char *str, int len) -{ - long written; - - while (len > 0) { - written = dispatch(CCB_PUTS, 0, str, len); - if (written < 0) - break; - len -= (unsigned int) written; - str += (unsigned int) written; - } -} - -int printk(const char * fmt, ...) -{ - va_list args; - int i, j, remaining, num_nl; - static char buf[1024]; - - va_start(args, fmt); - i = vsprintf(buf, fmt, args); - va_end(args); - - /* expand \n into \r\n: */ - - num_nl = 0; - for (j = 0; j < i; ++j) { - if (buf[j] == '\n') - ++num_nl; - } - remaining = i + num_nl; - for (j = i - 1; j >= 0; --j) { - buf[j + num_nl] = buf[j]; - if (buf[j] == '\n') { - --num_nl; - buf[j + num_nl] = '\r'; - } - } - - puts(buf, remaining); - return i; -} - -#define hwrpb (*INIT_HWRPB) +struct hwrpb_struct *hwrpb = INIT_HWRPB; +static struct pcb_struct pcb_va[1]; /* * Find a physical address of a virtual object.. * * This is easy using the virtual page table address. */ -struct pcb_struct * find_pa(unsigned long *vptb, struct pcb_struct * pcb) + +static inline void * +find_pa(unsigned long *vptb, void *ptr) { - unsigned long address = (unsigned long) pcb; + unsigned long address = (unsigned long) ptr; unsigned long result; result = vptb[address >> 13]; result >>= 32; result <<= 13; result |= address & 0x1fff; - return (struct pcb_struct *) result; + return (void *) result; } /* @@ -101,31 +57,19 @@ struct pcb_struct * find_pa(unsigned long *vptb, struct pcb_struct * pcb) * code has the L1 page table identity-map itself in the second PTE * in the L1 page table. Thus the L1-page is virtually addressable * itself (through three levels) at virtual address 0x200802000. - * - * As we don't want it there anyway, we also move the L1 self-map - * up as high as we can, so that the last entry in the L1 page table - * maps the page tables. - * - * As a result, the OSF/1 pal-code will instead use a virtual page table - * map located at 0xffffffe00000000. */ -#define pcb_va ((struct pcb_struct *) 0x20000000) -#define old_vptb (0x0000000200000000UL) -#define new_vptb (0xfffffffe00000000UL) -void pal_init(void) + +#define VPTB ((unsigned long *) 0x200000000) +#define L1 ((unsigned long *) 0x200802000) + +void +pal_init(void) { - unsigned long i, rev, sum; - unsigned long *L1, *l; + unsigned long i, rev; struct percpu_struct * percpu; struct pcb_struct * pcb_pa; - /* Find the level 1 page table and duplicate it in high memory */ - L1 = (unsigned long *) 0x200802000UL; /* (1<<33 | 1<<23 | 1<<13) */ - L1[1023] = L1[1]; - - percpu = (struct percpu_struct *) - (hwrpb.processor_offset + (unsigned long) &hwrpb), - + /* Create the dummy PCB. */ pcb_va->ksp = 0; pcb_va->usp = 0; pcb_va->ptbr = L1[1] >> 32; @@ -133,58 +77,45 @@ void pal_init(void) pcb_va->pcc = 0; pcb_va->unique = 0; pcb_va->flags = 1; - pcb_pa = find_pa((unsigned long *) old_vptb, pcb_va); - printk("Switching to OSF PAL-code .. "); + pcb_va->res1 = 0; + pcb_va->res2 = 0; + pcb_pa = find_pa(VPTB, pcb_va); + /* * a0 = 2 (OSF) * a1 = return address, but we give the asm the vaddr of the PCB * a2 = physical addr of PCB * a3 = new virtual page table pointer - * a4 = KSP (but we give it 0, asm sets it) + * a4 = KSP (but the asm sets it) */ - i = switch_to_osf_pal( - 2, - pcb_va, - pcb_pa, - new_vptb, - 0); + srm_printk("Switching to OSF PAL-code .. "); + + i = switch_to_osf_pal(2, pcb_va, pcb_pa, VPTB); if (i) { - printk("failed, code %ld\n", i); + srm_printk("failed, code %ld\n", i); halt(); } - rev = percpu->pal_revision = percpu->palcode_avail[2]; - hwrpb.vptb = new_vptb; - - /* update checksum: */ - sum = 0; - for (l = (unsigned long *) &hwrpb; - l < (unsigned long *) &hwrpb.chksum; - ++l) - sum += *l; - hwrpb.chksum = sum; + percpu = (struct percpu_struct *) + (INIT_HWRPB->processor_offset + (unsigned long) INIT_HWRPB); + rev = percpu->pal_revision = percpu->palcode_avail[2]; - printk("Ok (rev %lx)\n", rev); - /* remove the old virtual page-table mapping */ - L1[1] = 0; + srm_printk("Ok (rev %lx)\n", rev); tbia(); /* do it directly in case we are SMP */ } -static inline long load(unsigned long dst, - unsigned long src, - unsigned long count) +static inline void +load(unsigned long dst, unsigned long src, unsigned long count) { - extern void * memcpy(void *, const void *, size_t); - memcpy((void *)dst, (void *)src, count); - return count; } /* * Start the kernel. */ -static void runkernel(void) +static inline void +runkernel(void) { __asm__ __volatile__( "bis %1,%1,$30\n\t" @@ -199,65 +130,82 @@ extern char _end; #define KERNEL_ORIGIN \ ((((unsigned long)&_end) + 511) & ~511) -void start_kernel(void) +void +start_kernel(void) { - static long i; - static int nbytes; /* - * note that this crufty stuff with static and envval and envbuf - * is because: + * Note that this crufty stuff with static and envval + * and envbuf is because: * - * 1. frequently, the stack is is short, and we don't want to overrun; - * 2. frequently the stack is where we are going to copy the kernel to; - * 3. a certain SRM console required the GET_ENV output to stack. + * 1. Frequently, the stack is short, and we don't want to overrun; + * 2. Frequently the stack is where we are going to copy the kernel to; + * 3. A certain SRM console required the GET_ENV output to stack. + * ??? A comment in the aboot sources indicates that the GET_ENV + * destination must be quadword aligned. Might this explain the + * behaviour, rather than requiring output to the stack, which + * seems rather far-fetched. */ - static char envval[256]; - char envbuf[256]; + static long nbytes; + static char envval[256] __attribute__((aligned(8))); +#ifdef INITRD_SIZE + static unsigned long initrd_start; +#endif - printk("Linux/AXP bootp loader for Linux " UTS_RELEASE "\n"); - if (hwrpb.pagesize != 8192) { - printk("Expected 8kB pages, got %ldkB\n", - hwrpb.pagesize >> 10); + srm_printk("Linux/AXP bootp loader for Linux " UTS_RELEASE "\n"); + if (INIT_HWRPB->pagesize != 8192) { + srm_printk("Expected 8kB pages, got %ldkB\n", + INIT_HWRPB->pagesize >> 10); + return; + } + if (INIT_HWRPB->vptb != (unsigned long) VPTB) { + srm_printk("Expected vptb at %p, got %p\n", + VPTB, (void *)INIT_HWRPB->vptb); return; } pal_init(); - nbytes = dispatch(CCB_GET_ENV, ENV_BOOTED_OSFLAGS, - envbuf, sizeof(envbuf)); - if (nbytes < 0 || nbytes >= sizeof(envbuf)) { +#ifdef INITRD_SIZE + /* The initrd must be page-aligned. See below for the + cause of the magic number 5. */ + initrd_start = ((START_ADDR + 5*KERNEL_SIZE) | (PAGE_SIZE-1)) + 1; + srm_printk("Initrd positioned at %#lx\n", initrd_start); +#endif + + nbytes = srm_dispatch(CCB_GET_ENV, ENV_BOOTED_OSFLAGS, + envval, sizeof(envval)); + if (nbytes < 0 || nbytes >= sizeof(envval)) { nbytes = 0; } - envbuf[nbytes] = '\0'; - memcpy(envval, envbuf, nbytes+1); - printk("Loading the kernel...'%s'\n", envval); + envval[nbytes] = '\0'; + srm_printk("Loading the kernel...'%s'\n", envval); /* NOTE: *no* callbacks or printouts from here on out!!! */ -#if 1 /* - * this is a hack, as some consoles seem to get virtual 20000000 + * This is a hack, as some consoles seem to get virtual 20000000 * (ie where the SRM console puts the kernel bootp image) memory * overlapping physical 310000 memory, which causes real problems * when attempting to copy the former to the latter... :-( * - * so, we first move the kernel virtual-to-physical way above where + * So, we first move the kernel virtual-to-physical way above where * we physically want the kernel to end up, then copy it from there * to its final resting place... ;-} * - * sigh... + * Sigh... */ - i = load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE); - i = load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE); -#else - i = load(START_ADDR, KERNEL_ORIGIN, KERNEL_SIZE); +#ifdef INITRD_SIZE + load(initrd_start, KERNEL_ORIGIN+KERNEL_SIZE, INITRD_SIZE); #endif + load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE); + load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE); + memset((char*)ZERO_PAGE, 0, PAGE_SIZE); strcpy((char*)ZERO_PAGE, envval); +#ifdef INITRD_SIZE + ((long *)(ZERO_PAGE+256))[0] = initrd_start; + ((long *)(ZERO_PAGE+256))[1] = INITRD_SIZE; +#endif runkernel(); - - for (i = 0 ; i < 0x100000000 ; i++) - /* nothing */; - halt(); } diff --git a/arch/alpha/boot/head.S b/arch/alpha/boot/head.S index 9fae5301a..e3159d69d 100644 --- a/arch/alpha/boot/head.S +++ b/arch/alpha/boot/head.S @@ -6,28 +6,22 @@ #include <asm/system.h> -#define halt .long PAL_halt - .set noreorder .globl __start .ent __start __start: - bis $31,$31,$31 - br 1f - /* room for the initial PCB, which comes here */ - .quad 0,0,0,0,0,0,0,0 -1: br $27,2f -2: ldgp $29,0($27) - lda $27,start_kernel - jsr $26,($27),start_kernel - halt + br $29,2f +2: ldgp $29,0($29) + jsr $26,start_kernel + call_pal PAL_halt .end __start .align 5 .globl wrent .ent wrent wrent: - .long PAL_wrent + .prologue 0 + call_pal PAL_wrent ret ($26) .end wrent @@ -35,7 +29,8 @@ wrent: .globl wrkgp .ent wrkgp wrkgp: - .long PAL_wrkgp + .prologue 0 + call_pal PAL_wrkgp ret ($26) .end wrkgp @@ -44,6 +39,7 @@ wrkgp: .ent switch_to_osf_pal switch_to_osf_pal: subq $30,128,$30 + .frame $30,128,$26 stq $26,0($30) stq $1,8($30) stq $2,16($30) @@ -60,11 +56,12 @@ switch_to_osf_pal: stq $13,104($30) stq $14,112($30) stq $15,120($30) + .prologue 0 stq $30,0($17) /* save KSP in PCB */ bis $30,$30,$20 /* a4 = KSP */ - br $17,__do_swppal + br $17,1f ldq $26,0($30) ldq $1,8($30) @@ -84,56 +81,22 @@ switch_to_osf_pal: ldq $15,120($30) addq $30,128,$30 ret ($26) - -__do_swppal: - .long PAL_swppal +1: call_pal PAL_swppal .end switch_to_osf_pal -.globl dispatch -.ent dispatch -dispatch: - subq $30,80,$30 - stq $26,0($30) - stq $29,8($30) - - stq $8,16($30) - stq $9,24($30) - stq $10,32($30) - stq $11,40($30) - stq $12,48($30) - stq $13,56($30) - stq $14,64($30) - stq $15,72($30) - - lda $1,0x10000000 /* hwrpb */ - ldq $2,0xc0($1) /* crb offset */ - addq $2,$1,$2 /* crb */ - ldq $27,0($2) /* dispatch procedure value */ - - ldq $2,8($27) /* dispatch call address */ - jsr $26,($2) /* call it (weird VMS call seq) */ - - ldq $26,0($30) - ldq $29,8($30) - - ldq $8,16($30) - ldq $9,24($30) - ldq $10,32($30) - ldq $11,40($30) - ldq $12,48($30) - ldq $13,56($30) - ldq $14,64($30) - ldq $15,72($30) - - addq $30,80,$30 - ret $31,($26) -.end dispatch - .align 3 .globl tbi .ent tbi tbi: - .long PAL_tbi + .prologue 0 + call_pal PAL_tbi ret ($26) .end tbi + .align 3 + .globl halt + .ent halt +halt: + .prologue 0 + call_pal PAL_halt + .end halt diff --git a/arch/alpha/config.in b/arch/alpha/config.in index 9d0f5769e..48e924fd7 100644 --- a/arch/alpha/config.in +++ b/arch/alpha/config.in @@ -22,14 +22,6 @@ endmenu mainmenu_option next_comment comment 'General setup' -unset CONFIG_CROSSCOMPILE CONFIG_NATIVE - -if [ "`uname`" != "Linux" ]; then - define_bool CONFIG_CROSSCOMPILE y -else - define_bool CONFIG_NATIVE y -fi - choice 'Alpha system type' \ "Generic CONFIG_ALPHA_GENERIC \ Alcor/Alpha-XLT CONFIG_ALPHA_ALCOR \ @@ -175,8 +167,6 @@ then define_bool CONFIG_ALPHA_AVANTI y fi -#bool 'Echo console messages on /dev/ttyS0 (COM1)' CONFIG_SERIAL_ECHO - if [ "$CONFIG_PCI" = "y" ]; then bool 'PCI quirks' CONFIG_PCI_QUIRKS if [ "$CONFIG_PCI_QUIRKS" = "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then diff --git a/arch/alpha/defconfig b/arch/alpha/defconfig index 9f946743e..96666ced7 100644 --- a/arch/alpha/defconfig +++ b/arch/alpha/defconfig @@ -241,7 +241,6 @@ CONFIG_PSMOUSE=y # CONFIG_PC110_PAD is not set # CONFIG_UMISC is not set # CONFIG_QIC02_TAPE is not set -# CONFIG_APM is not set # CONFIG_WATCHDOG is not set # CONFIG_RTC is not set # CONFIG_VIDEO_DEV is not set diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index a7047dd1f..175df318b 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c @@ -15,6 +15,7 @@ #include <linux/in6.h> #include <linux/pci.h> #include <linux/tty.h> +#include <linux/mm.h> #include <asm/io.h> #include <asm/hwrpb.h> @@ -26,6 +27,7 @@ #include <asm/fpu.h> #include <asm/irq.h> #include <asm/machvec.h> +#include <asm/pgtable.h> #define __KERNEL_SYSCALLS__ #include <asm/unistd.h> @@ -136,6 +138,37 @@ EXPORT_SYMBOL_NOVERS(__do_clear_user); EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strlen_user); +/* + * SMP-specific symbols. + */ + +#ifdef __SMP__ +EXPORT_SYMBOL(synchronize_irq); +EXPORT_SYMBOL(flush_tlb_all); +EXPORT_SYMBOL(flush_tlb_mm); +EXPORT_SYMBOL(flush_tlb_page); +EXPORT_SYMBOL(flush_tlb_range); +EXPORT_SYMBOL(cpu_data); +EXPORT_SYMBOL(cpu_number_map); +EXPORT_SYMBOL(global_bh_lock); +EXPORT_SYMBOL(global_bh_count); +EXPORT_SYMBOL(synchronize_bh); +EXPORT_SYMBOL(global_irq_holder); +EXPORT_SYMBOL(__global_cli); +EXPORT_SYMBOL(__global_sti); +EXPORT_SYMBOL(__global_save_flags); +EXPORT_SYMBOL(__global_restore_flags); +#if DEBUG_SPINLOCK +EXPORT_SYMBOL(spin_unlock); +EXPORT_SYMBOL(spin_lock); +EXPORT_SYMBOL(spin_trylock); +#endif +#if DEBUG_RWLOCK +EXPORT_SYMBOL(write_lock); +EXPORT_SYMBOL(read_lock); +#endif +#endif /* __SMP__ */ + /* * The following are special because they're not called * explicitly (the C compiler or assembler generates them in diff --git a/arch/alpha/kernel/bios32.c b/arch/alpha/kernel/bios32.c index efeb1c556..1c7823397 100644 --- a/arch/alpha/kernel/bios32.c +++ b/arch/alpha/kernel/bios32.c @@ -296,60 +296,82 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn, * on SRM. It is more trouble than it iw worth to conditionalize this. */ -static struct { - struct reset_irq { - struct pci_dev *dev; - u8 irq; - } irq[16]; - int irq_count; - - struct reset_io { - struct pci_dev *dev; - u8 reg; - u32 io; - } io[16]; - int io_count; -} srm_resets; +struct srm_irq_reset { + struct srm_irq_reset *next; + struct pci_dev *dev; + u8 irq; +} *srm_irq_resets; + +struct srm_io_reset { + struct srm_io_reset *next; + struct pci_dev *dev; + u32 io; + u8 reg; +} *srm_io_resets; /* Apply the collected reset modifications. */ void reset_for_srm(void) { - struct pci_dev *dev; - int i; + struct srm_irq_reset *qreset; + struct srm_io_reset *ireset; /* Reset any IRQs that we changed. */ - for (i = 0; i < srm_resets.irq_count; i++) { - dev = srm_resets.irq[i].dev; - - pcibios_write_config_byte(dev->bus->number, dev->devfn, + for (qreset = srm_irq_resets; qreset ; qreset = qreset->next) { + pcibios_write_config_byte(qreset->dev->bus->number, + qreset->dev->devfn, PCI_INTERRUPT_LINE, - srm_resets.irq[i].irq); + qreset->irq); #if 1 printk("reset_for_srm: bus %d slot 0x%x " "SRM IRQ 0x%x changed back from 0x%x\n", - dev->bus->number, PCI_SLOT(dev->devfn), - srm_resets.irq[i].irq, dev->irq); + qreset->dev->bus->number, + PCI_SLOT(qreset->dev->devfn), + qreset->irq, qreset->dev->irq); #endif } /* Reset any IO addresses that we changed. */ - for (i = 0; i < srm_resets.io_count; i++) { - dev = srm_resets.io[i].dev; - - pcibios_write_config_byte(dev->bus->number, dev->devfn, - srm_resets.io[i].reg, - srm_resets.io[i].io); + for (ireset = srm_io_resets; ireset ; ireset = ireset->next) { + pcibios_write_config_dword(ireset->dev->bus->number, + ireset->dev->devfn, + ireset->reg, ireset->io); #if 1 printk("reset_for_srm: bus %d slot 0x%x " - "SRM IO restored to 0x%x\n", - dev->bus->number, PCI_SLOT(dev->devfn), - srm_resets.io[i].io); + "SRM MEM/IO restored to 0x%x\n", + ireset->dev->bus->number, + PCI_SLOT(ireset->dev->devfn), + ireset->io); #endif } } +static void +new_irq_reset(struct pci_dev *dev, u8 irq) +{ + struct srm_irq_reset *n; + n = kmalloc(sizeof(*n), GFP_KERNEL); + + n->next = srm_irq_resets; + n->dev = dev; + n->irq = irq; + srm_irq_resets = n; +} + +static void +new_io_reset(struct pci_dev *dev, u8 reg, u32 io) +{ + struct srm_io_reset *n; + n = kmalloc(sizeof(*n), GFP_KERNEL); + + n->next = srm_io_resets; + n->dev = dev; + n->reg = reg; + n->io = io; + srm_io_resets = n; +} + /* * Disable PCI device DEV so that it does not respond to I/O or memory @@ -426,6 +448,7 @@ layout_dev(struct pci_dev *dev) struct pci_bus *bus; unsigned short cmd; unsigned int base, mask, size, off, idx; + unsigned int orig_base; unsigned int alignto; unsigned long handle; @@ -467,6 +490,8 @@ layout_dev(struct pci_dev *dev) * Figure out how much space and of what type this * device wants. */ + pcibios_read_config_dword(bus->number, dev->devfn, off, + &orig_base); pcibios_write_config_dword(bus->number, dev->devfn, off, 0xffffffff); pcibios_read_config_dword(bus->number, dev->devfn, off, &base); @@ -504,8 +529,10 @@ layout_dev(struct pci_dev *dev) alignto = MAX(0x800, size); base = ALIGN(io_base, alignto); io_base = base + size; + pcibios_write_config_dword(bus->number, dev->devfn, off, base | 0x1); + new_io_reset(dev, off, orig_base); handle = PCI_HANDLE(bus->number) | base | 1; dev->base_address[idx] = handle; @@ -524,16 +551,8 @@ layout_dev(struct pci_dev *dev) size = (mask & base) & 0xffffffff; switch (type) { case PCI_BASE_ADDRESS_MEM_TYPE_32: - break; - case PCI_BASE_ADDRESS_MEM_TYPE_64: - printk("bios32 WARNING: " - "ignoring 64-bit device in " - "slot %d, function %d: \n", - PCI_SLOT(dev->devfn), - PCI_FUNC(dev->devfn)); - idx++; /* skip extra 4 bytes */ - continue; + break; case PCI_BASE_ADDRESS_MEM_TYPE_1M: /* @@ -590,10 +609,43 @@ layout_dev(struct pci_dev *dev) } } mem_base = base + size; + pcibios_write_config_dword(bus->number, dev->devfn, off, base); + new_io_reset(dev, off, orig_base); + handle = PCI_HANDLE(bus->number) | base; dev->base_address[idx] = handle; + + /* + * Currently for 64-bit cards, we simply do the usual + * for setup of the first register (low) of the pair, + * and then clear out the second (high) register, as + * we are not yet able to do 64-bit addresses, and + * setting the high register to 0 allows 32-bit SAC + * addresses to be used. + */ + if (type == PCI_BASE_ADDRESS_MEM_TYPE_64) { + unsigned int orig_base2; + pcibios_read_config_dword(bus->number, + dev->devfn, + off+4, &orig_base2); + if (0 != orig_base2) { + pcibios_write_config_dword(bus->number, + dev->devfn, + off+4, 0); + new_io_reset (dev, off+4, orig_base2); + } + /* Bypass hi reg in the loop. */ + dev->base_address[++idx] = 0; + + printk("bios32 WARNING: " + "handling 64-bit device in " + "slot %d, function %d: \n", + PCI_SLOT(dev->devfn), + PCI_FUNC(dev->devfn)); + } + DBG_DEVS(("layout_dev: dev 0x%x MEM @ 0x%lx (0x%x)\n", dev->device, handle, size)); } @@ -692,44 +744,70 @@ layout_bus(struct pci_bus *bus) struct pci_dev *bridge = bus->self; DBG_DEVS(("layout_bus: config bus %d bridge\n", bus->number)); + /* * Set up the top and bottom of the PCI I/O segment * for this bus. */ pcibios_read_config_dword(bridge->bus->number, bridge->devfn, - 0x1c, &l); + PCI_IO_BASE, &l); l &= 0xffff0000; l |= ((bio >> 8) & 0x00f0) | ((tio - 1) & 0xf000); pcibios_write_config_dword(bridge->bus->number, bridge->devfn, - 0x1c, l); + PCI_IO_BASE, l); + /* - * Set up the top and bottom of the PCI Memory segment + * Clear out the upper 16 bits of IO base/limit. + * Clear out the upper 32 bits of PREF base/limit. + */ + pcibios_write_config_dword(bridge->bus->number, bridge->devfn, + PCI_IO_BASE_UPPER16, 0); + pcibios_write_config_dword(bridge->bus->number, bridge->devfn, + PCI_PREF_BASE_UPPER32, 0); + pcibios_write_config_dword(bridge->bus->number, bridge->devfn, + PCI_PREF_LIMIT_UPPER32, 0); + + /* + * Set up the top and bottom of the PCI Memory segment * for this bus. */ l = ((bmem & 0xfff00000) >> 16) | ((tmem - 1) & 0xfff00000); pcibios_write_config_dword(bridge->bus->number, bridge->devfn, - 0x20, l); + PCI_MEMORY_BASE, l); + /* - * Turn off downstream PF memory address range: + * Turn off downstream PF memory address range, unless + * there is a VGA behind this bridge, in which case, we + * enable the PREFETCH range to include BIOS ROM at C0000. + * + * NOTE: this is a bit of a hack, done with PREFETCH for + * simplicity, rather than having to add it into the above + * non-PREFETCH range, which could then be bigger than we want. + * We might assume that we could relocate the BIOS ROM, but + * that would depend on having it found by those who need it + * (the DEC BIOS emulator would find it, but I do not know + * about the Xservers). So, we do it this way for now... ;-} */ + l = (found_vga) ? 0 : 0x0000ffff; pcibios_write_config_dword(bridge->bus->number, bridge->devfn, - 0x24, 0x0000ffff); + PCI_PREF_MEMORY_BASE, l); + /* * Tell bridge that there is an ISA bus in the system, * and (possibly) a VGA as well. */ - l = 0x00040000; /* ISA present */ - if (found_vga) l |= 0x00080000; /* VGA present */ - pcibios_write_config_dword(bridge->bus->number, bridge->devfn, - 0x3c, l); + l = (found_vga) ? 0x0c : 0x04; + pcibios_write_config_byte(bridge->bus->number, bridge->devfn, + PCI_BRIDGE_CONTROL, l); + /* - * Clear status bits, enable I/O (for downstream I/O), - * turn on master enable (for upstream I/O), turn on - * memory enable (for downstream memory), turn on - * master enable (for upstream memory and I/O). + * Clear status bits, + * turn on I/O enable (for downstream I/O), + * turn on memory enable (for downstream memory), + * turn on master enable (for upstream memory and I/O). */ pcibios_write_config_dword(bridge->bus->number, bridge->devfn, - 0x4, 0xffff0007); + PCI_COMMAND, 0xffff0007); } DBG_DEVS(("layout_bus: bus %d finished\n", bus->number)); return found_vga; @@ -781,12 +859,15 @@ void __init enable_ide(long ide_base) { int data; + unsigned long flags; + __save_and_cli(flags); outb(0, ide_base); /* set the index register for reg #0 */ data = inb(ide_base+1); /* read the current contents */ outb(0, ide_base); /* set the index register for reg #0 */ outb(data | 0x40, ide_base+1); /* turn on IDE */ outb(data | 0x40, ide_base+1); /* turn on IDE, really! */ + __restore_flags(flags); } /* Look for mis-configured devices' I/O space addresses behind bridges. */ @@ -795,7 +876,6 @@ check_behind_io(struct pci_dev *dev) { struct pci_bus *bus = dev->bus; unsigned int reg, orig_base, new_base, found_one = 0; - struct reset_io *ior; for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) { /* Read the current setting, check for I/O space and >= 64K */ @@ -826,10 +906,7 @@ printk("check_behind_io: ALERT! bus %d slot %d old 0x%x new 0x%x\n", pcibios_write_config_dword(bus->number, dev->devfn, reg, new_base); - ior = &srm_resets.io[srm_resets.io_count++]; - ior->dev = dev; - ior->reg = reg; - ior->io = orig_base; + new_io_reset(dev, reg, orig_base); found_one++; } @@ -946,8 +1023,6 @@ common_pci_fixup(int (*map_irq)(struct pci_dev *dev, int slot, int pin), &irq_orig); if (irq_orig != dev->irq) { - struct reset_irq *r; - DBG_DEVS(("common_pci_fixup: bus %d " "slot 0x%x SRM IRQ 0x%x " "changed to 0x%x\n", @@ -955,9 +1030,7 @@ common_pci_fixup(int (*map_irq)(struct pci_dev *dev, int slot, int pin), PCI_SLOT(dev->devfn), irq_orig, dev->irq)); - r = &srm_resets.irq[srm_resets.irq_count++]; - r->dev = dev; - r->irq = irq_orig; + new_irq_reset(dev, irq_orig); } } diff --git a/arch/alpha/kernel/core_pyxis.c b/arch/alpha/kernel/core_pyxis.c index dc14cfaaa..f0a5c3eb8 100644 --- a/arch/alpha/kernel/core_pyxis.c +++ b/arch/alpha/kernel/core_pyxis.c @@ -99,33 +99,13 @@ static int mk_conf_addr(u8 bus, u8 device_fn, u8 where, unsigned long *pci_addr, unsigned char *type1) { - unsigned long addr; + *type1 = (bus == 0) ? 0 : 1; + *pci_addr = (bus << 16) | (device_fn << 8) | (where); DBG_CNF(("mk_conf_addr(bus=%d ,device_fn=0x%x, where=0x%x," - " pci_addr=0x%p, type1=0x%p)\n", - bus, device_fn, where, pci_addr, type1)); - - if (bus == 0) { - int device; - - device = device_fn >> 3; - /* Type 0 configuration cycle. */ -#if NOT_NOW - if (device > 20) { - DBG_CNF(("mk_conf_addr: device (%d) > 20, return -1\n", - device)); - return -1; - } -#endif - *type1 = 0; - addr = (device_fn << 8) | (where); - } else { - /* Type 1 configuration cycle. */ - *type1 = 1; - addr = (bus << 16) | (device_fn << 8) | (where); - } - *pci_addr = addr; - DBG_CNF(("mk_conf_addr: returning pci_addr 0x%lx\n", addr)); + " returning address 0x%p\n" + bus, device_fn, where, *pci_addr)); + return 0; } @@ -142,12 +122,11 @@ conf_read(unsigned long addr, unsigned char type1) stat0 = *(vuip)PYXIS_ERR; *(vuip)PYXIS_ERR = stat0; mb(); temp = *(vuip)PYXIS_ERR; /* re-read to force write */ - DBG_CNF(("conf_read: PYXIS ERR was 0x%x\n", stat0)); /* If Type1 access, must set PYXIS CFG. */ if (type1) { pyxis_cfg = *(vuip)PYXIS_CFG; - *(vuip)PYXIS_CFG = pyxis_cfg | 1; mb(); + *(vuip)PYXIS_CFG = (pyxis_cfg & ~3L) | 1; mb(); temp = *(vuip)PYXIS_CFG; /* re-read to force write */ } @@ -172,14 +151,15 @@ conf_read(unsigned long addr, unsigned char type1) /* If Type1 access, must reset IOC CFG so normal IO space ops work. */ if (type1) { - *(vuip)PYXIS_CFG = pyxis_cfg & ~1; mb(); + *(vuip)PYXIS_CFG = pyxis_cfg & ~3L; mb(); temp = *(vuip)PYXIS_CFG; /* re-read to force write */ } + __restore_flags(flags); + DBG_CNF(("conf_read(addr=0x%lx, type1=%d) = %#x\n", addr, type1, value)); - __restore_flags(flags); return value; } @@ -190,9 +170,6 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1) unsigned int stat0, temp; unsigned int pyxis_cfg = 0; - DBG_CNF(("conf_write(addr=%#lx, value=%#x, type1=%d)\n", - addr, value, type1)); - __save_and_cli(flags); /* avoid getting hit by machine check */ /* Reset status register to avoid losing errors. */ @@ -203,7 +180,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1) /* If Type1 access, must set PYXIS CFG. */ if (type1) { pyxis_cfg = *(vuip)PYXIS_CFG; - *(vuip)PYXIS_CFG = pyxis_cfg | 1; mb(); + *(vuip)PYXIS_CFG = (pyxis_cfg & ~3L) | 1; mb(); temp = *(vuip)PYXIS_CFG; /* re-read to force write */ } @@ -216,18 +193,20 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1) /* Access configuration space. */ *(vuip)addr = value; mb(); - mb(); /* magic */ - temp = *(vuip)PYXIS_ERR; /* do a PYXIS read to force the write */ + temp = *(vuip)addr; /* read back to force the write */ PYXIS_mcheck_expected = 0; mb(); /* If Type1 access, must reset IOC CFG so normal IO space ops work. */ if (type1) { - *(vuip)PYXIS_CFG = pyxis_cfg & ~1; mb(); + *(vuip)PYXIS_CFG = pyxis_cfg & ~3L; mb(); temp = *(vuip)PYXIS_CFG; /* re-read to force write */ } __restore_flags(flags); + + DBG_CNF(("conf_write(addr=%#lx, value=%#x, type1=%d)\n", + addr, value, type1)); } int diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 82e0c71b9..f349ebd6b 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -552,7 +552,6 @@ entSys: ret_from_sys_call: cmovne $26,0,$19 /* $19 = 0 => non-restartable */ /* check bottom half interrupts */ - bne $1,ret_from_handle_bh ldq $3,bh_active ldq $4,bh_mask and $3,$4,$2 @@ -678,7 +677,7 @@ signal_return: bis $30,$30,$18 bis $31,$31,$16 jsr $26,do_signal - lda $30,SWITCH_STACK_SIZE($30) + bsr $1,undo_switch_stack br $31,restore_all .end entSys diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S index 92e11a82e..8ba50462b 100644 --- a/arch/alpha/kernel/head.S +++ b/arch/alpha/kernel/head.S @@ -9,8 +9,6 @@ #include <asm/system.h> -#define halt call_pal PAL_halt - .globl swapper_pg_dir .globl _stext swapper_pg_dir=SWAPPER_PGD @@ -29,28 +27,28 @@ __start: lda $30,0x4000($8) /* ... and then we can start the kernel. */ jsr $26,start_kernel - halt + call_pal PAL_halt .end __start #ifdef __SMP__ .align 3 .globl __start_cpu .ent __start_cpu - /* on entry here from SRM console, the HWPCB of this processor */ - /* has been loaded, and $27 contains the task pointer */ + /* On entry here from SRM console, the HWPCB of this processor + has been loaded, and $27 contains the task pointer */ __start_cpu: .prologue 0 - /* first order of business, load the GP */ + /* First order of business, load the GP */ br $26,1f 1: ldgp $29,0($26) /* We need to get current loaded up with our first task... */ - lda $8,0($27) - /* set FEN */ + mov $27,$8 + /* Set FEN */ lda $16,1($31) call_pal PAL_wrfen /* ... and then we can start the processor. */ jsr $26,start_secondary - halt + call_pal PAL_halt .end __start_cpu #endif /* __SMP__ */ @@ -121,10 +119,20 @@ whami: .globl wripir .ent wripir wripir: + .prologue 0 call_pal PAL_wripir ret ($26) .end wripir + .align 3 + .globl wrvptptr + .ent wrvptptr +wrvptptr: + .prologue 0 + call_pal PAL_wrvptptr + ret ($26) + .end wrvptptr + # # The following two functions are needed for supporting SRM PALcode # on the PC164 (at least), since that PALcode manages the interrupt @@ -152,3 +160,17 @@ cserve_dis: call_pal PAL_cserve ret ($26) .end cserve_dis + + # + # It is handy, on occasion, to make halt actually just loop. + # Putting it here means we dont have to recompile the whole + # kernel. + # + + .align 3 + .globl halt + .ent halt +halt: + .prologue 0 + call_pal PAL_halt + .end halt diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index e8fee6a0d..8f6afc14b 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c @@ -311,26 +311,41 @@ free_irq(unsigned int irq, void *dev_id) int get_irq_list(char *buf) { - int i, len = 0; + int i, j; struct irqaction * action; - int cpu = smp_processor_id(); + char *p = buf; + +#ifdef __SMP__ + p += sprintf(p, " "); + for (j = 0; j < smp_num_cpus; j++) + p += sprintf(p, "CPU%d ", j); + *p++ = '\n'; +#endif for (i = 0; i < NR_IRQS; i++) { action = irq_action[i]; if (!action) continue; - len += sprintf(buf+len, "%2d: %10u %c %s", - i, kstat.irqs[cpu][i], - (action->flags & SA_INTERRUPT) ? '+' : ' ', - action->name); + p += sprintf(p, "%3d: ",i); +#ifndef __SMP__ + p += sprintf(p, "%10u ", kstat_irqs(i)); +#else + for (j = 0; j < smp_num_cpus; j++) + p += sprintf(p, "%10u ", + kstat.irqs[cpu_logical_map(j)][i]); +#endif + p += sprintf(p, " %c%s", + (action->flags & SA_INTERRUPT)?'+':' ', + action->name); + for (action=action->next; action; action = action->next) { - len += sprintf(buf+len, ", %s%s", - (action->flags & SA_INTERRUPT) ? "+":"", - action->name); + p += sprintf(p, ", %c%s", + (action->flags & SA_INTERRUPT)?'+':' ', + action->name); } - len += sprintf(buf+len, "\n"); + *p++ = '\n'; } - return len; + return p - buf; } #ifdef __SMP__ @@ -427,8 +442,10 @@ get_irqlock(int cpu, void* where) /* * Finally. */ +#if DEBUG_SPINLOCK global_irq_lock.task = current; global_irq_lock.previous = where; +#endif global_irq_holder = cpu; previous_irqholder = where; } diff --git a/arch/alpha/kernel/irq.h b/arch/alpha/kernel/irq.h index d604b6eac..c46d5df4e 100644 --- a/arch/alpha/kernel/irq.h +++ b/arch/alpha/kernel/irq.h @@ -11,12 +11,8 @@ #define STANDARD_INIT_IRQ_PROLOG \ outb(0, DMA1_RESET_REG); \ outb(0, DMA2_RESET_REG); \ - outb(0, DMA1_MASK_REG); \ - outb(0, DMA2_MASK_REG); \ outb(0, DMA1_CLR_MASK_REG); \ - outb(0, DMA2_CLR_MASK_REG); \ - outb(DMA_MODE_CASCADE, DMA2_MODE_REG) - + outb(0, DMA2_CLR_MASK_REG) extern unsigned long alpha_irq_mask; diff --git a/arch/alpha/kernel/machvec.h b/arch/alpha/kernel/machvec.h index 645791060..70c85c451 100644 --- a/arch/alpha/kernel/machvec.h +++ b/arch/alpha/kernel/machvec.h @@ -27,8 +27,7 @@ #define CAT1(x,y) x##y #define CAT(x,y) CAT1(x,y) -#define DO_DEFAULT_RTC \ - rtc_port: 0x70, rtc_addr: 0x80, rtc_bcd: 0 +#define DO_DEFAULT_RTC rtc_port: 0x70 #define DO_EV4_MMU \ max_asn: EV4_MAX_ASN, \ diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index a8e2f8761..4c540f696 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -253,9 +253,11 @@ asmlinkage unsigned long osf_mmap(unsigned long addr, unsigned long len, unsigned long ret = -EBADF; lock_kernel(); +#if 0 if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED)) printk("%s: unimplemented OSF mmap flags %04lx\n", current->comm, flags); +#endif if (!(flags & MAP_ANONYMOUS)) { file = fget(fd); if (!file) @@ -1134,7 +1136,7 @@ osf_select(int n, fd_set *inp, fd_set *outp, fd_set *exp, unsigned long timeout; int ret; - timeout = ~0UL; + timeout = MAX_SCHEDULE_TIMEOUT; if (tvp) { time_t sec, usec; @@ -1145,8 +1147,6 @@ osf_select(int n, fd_set *inp, fd_set *outp, fd_set *exp, timeout = (usec + 1000000/HZ - 1) / (1000000/HZ); timeout += sec * HZ; - if (timeout) - timeout += jiffies + 1; } ret = -ENOMEM; @@ -1166,7 +1166,7 @@ osf_select(int n, fd_set *inp, fd_set *outp, fd_set *exp, zero_fd_set(n, fds->res_out); zero_fd_set(n, fds->res_ex); - ret = do_select(n, fds, timeout); + ret = do_select(n, fds, &timeout); /* OSF does not copy back the remaining time. */ @@ -1304,6 +1304,7 @@ asmlinkage int osf_usleep_thread(struct timeval32 *sleep, struct timeval32 *rema { struct timeval tmp; unsigned long ticks; + unsigned long tmp_timeout; if (get_tv32(&tmp, sleep)) goto fault; @@ -1311,18 +1312,11 @@ asmlinkage int osf_usleep_thread(struct timeval32 *sleep, struct timeval32 *rema ticks = tmp.tv_usec; ticks = (ticks + (1000000 / HZ) - 1) / (1000000 / HZ); ticks += tmp.tv_sec * HZ; - current->timeout = ticks + jiffies; - current->state = TASK_INTERRUPTIBLE; - schedule(); + current->state = TASK_INTERRUPTIBLE; + ticks = schedule_timeout(ticks); if (remain) { - ticks = jiffies; - if (ticks < current->timeout) - ticks = current->timeout - ticks; - else - ticks = 0; - current->timeout = 0; tmp.tv_sec = ticks / HZ; tmp.tv_usec = ticks % HZ; if (put_tv32(remain, &tmp)) diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 6162e3375..562778366 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -133,18 +133,15 @@ generic_kill_arch (int mode, char *restart_cmd) strncpy((char *)cpup->ipc_buffer, restart_cmd, sizeof(cpup->ipc_buffer)); } - } - else { + } else { flags |= 0x00040000UL; /* "remain halted" */ } cpup->flags = flags; mb(); - if (alpha_use_srm_setup) { - reset_for_srm(); - set_hae(srm_hae); - } + reset_for_srm(); + set_hae(srm_hae); #ifdef CONFIG_DUMMY_CONSOLE /* This has the effect of reseting the VGA video origin. */ @@ -156,10 +153,8 @@ generic_kill_arch (int mode, char *restart_cmd) /* Reset rtc to defaults. */ { unsigned char control; - unsigned long flags; - /* I'm not sure if i really need to disable interrupts here. */ - save_and_cli(flags); + cli(); /* Reset periodic interrupt frequency. */ CMOS_WRITE(0x26, RTC_FREQ_SELECT); @@ -170,7 +165,7 @@ generic_kill_arch (int mode, char *restart_cmd) CMOS_WRITE(control, RTC_CONTROL); CMOS_READ(RTC_INTR_FLAGS); - restore_flags(flags); + sti(); } #endif @@ -181,6 +176,9 @@ generic_kill_arch (int mode, char *restart_cmd) return; } + if (alpha_using_srm) + srm_paging_stop(); + halt(); } diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h index 43f5c18a4..15096703d 100644 --- a/arch/alpha/kernel/proto.h +++ b/arch/alpha/kernel/proto.h @@ -143,6 +143,7 @@ extern void reset_for_srm(void); /* time.c */ extern void timer_interrupt(int irq, void *dev, struct pt_regs * regs); +extern unsigned long est_cycle_freq; /* smc37c93x.c */ extern void SMC93x_Init(void); @@ -172,5 +173,12 @@ extern void entSys(void); extern void entUna(void); /* process.c */ -void generic_kill_arch (int mode, char *reboot_cmd); -void cpu_idle(void *) __attribute__((noreturn)); +extern void generic_kill_arch (int mode, char *reboot_cmd); +extern void cpu_idle(void *) __attribute__((noreturn)); + +/* ptrace.c */ +extern int ptrace_set_bpt (struct task_struct *child); +extern int ptrace_cancel_bpt (struct task_struct *child); + +/* ../mm/init.c */ +void srm_paging_stop(void); diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 55f171327..b6194defa 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c @@ -12,27 +12,26 @@ #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> +#include <linux/malloc.h> #include <asm/uaccess.h> #include <asm/pgtable.h> #include <asm/system.h> +#include "proto.h" + +#define DEBUG DBG_MEM #undef DEBUG #ifdef DEBUG - enum { DBG_MEM = (1<<0), DBG_BPT = (1<<1), DBG_MEM_ALL = (1<<2) }; - -int debug_mask = DBG_BPT; - -# define DBG(fac,args) {if ((fac) & debug_mask) printk args;} - +#define DBG(fac,args) {if ((fac) & DEBUG) printk args;} #else -# define DBG(fac,args) +#define DBG(fac,args) #endif #define BREAKINST 0x00000080 /* call_pal bpt */ @@ -45,33 +44,26 @@ int debug_mask = DBG_BPT; /* * Processes always block with the following stack-layout: * - * +================================+ -------------------------- - * | PALcode saved frame (ps, pc, | ^ ^ - * | gp, a0, a1, a2) | | | - * +================================+ | struct pt_regs | - * | | | | - * | frame generated by SAVE_ALL | | | - * | | v | P - * +================================+ | A - * | | ^ | G - * | frame saved by do_switch_stack | | struct switch_stack | E - * | | v | _ - * +================================+ | S - * | | | I - * | | | Z - * / / | E - * / / | - * | | | - * | | | - * | | v - * +================================+ <------------------------- - * task + PAGE_SIZE + * +================================+ <---- task + 2*PAGE_SIZE + * | PALcode saved frame (ps, pc, | ^ + * | gp, a0, a1, a2) | | + * +================================+ | struct pt_regs + * | | | + * | frame generated by SAVE_ALL | | + * | | v + * +================================+ + * | | ^ + * | frame saved by do_switch_stack | | struct switch_stack + * | | v + * +================================+ */ -#define PT_REG(reg) (PAGE_SIZE - sizeof(struct pt_regs) \ +#define PT_REG(reg) (PAGE_SIZE*2 - sizeof(struct pt_regs) \ + (long)&((struct pt_regs *)0)->reg) -#define SW_REG(reg) (PAGE_SIZE - sizeof(struct pt_regs) \ - - sizeof(struct switch_stack) \ + +#define SW_REG(reg) (PAGE_SIZE*2 - sizeof(struct pt_regs) \ + - sizeof(struct switch_stack) \ + (long)&((struct switch_stack *)0)->reg) + /* * The following table maps a register index into the stack offset at * which the register is saved. Register indices are 0-31 for integer @@ -80,10 +72,10 @@ int debug_mask = DBG_BPT; * get_reg/put_reg below). */ enum { - REG_R0 = 0, REG_F0 = 32, REG_PC = 64 + REG_R0 = 0, REG_F0 = 32, REG_FPCR = 63, REG_PC = 64 }; -static unsigned short regoff[] = { +static int regoff[] = { PT_REG( r0), PT_REG( r1), PT_REG( r2), PT_REG( r3), PT_REG( r4), PT_REG( r5), PT_REG( r6), PT_REG( r7), PT_REG( r8), SW_REG( r9), SW_REG( r10), SW_REG( r11), @@ -106,38 +98,40 @@ static unsigned short regoff[] = { static long zero; /* - * Get contents of register REGNO in task TASK. + * Get address of register REGNO in task TASK. */ -static inline long get_reg(struct task_struct * task, long regno) +static long * +get_reg_addr(struct task_struct * task, unsigned long regno) { long *addr; if (regno == 30) { addr = &task->tss.usp; - } else if (regno == 31) { + } else if (regno == 31 || regno > 64) { zero = 0; addr = &zero; } else { - addr = (long *) (regoff[regno] + PAGE_SIZE + (long)task); + addr = (long *)((long)task + regoff[regno]); } - return *addr; + return addr; } /* - * Write contents of register REGNO in task TASK. + * Get contents of register REGNO in task TASK. */ -static inline int put_reg(struct task_struct *task, long regno, long data) +static inline long +get_reg(struct task_struct * task, unsigned long regno) { - long *addr, zero; + return *get_reg_addr(task, regno); +} - if (regno == 30) { - addr = &task->tss.usp; - } else if (regno == 31) { - addr = &zero; - } else { - addr = (long *) (regoff[regno] + PAGE_SIZE + (long)task); - } - *addr = data; +/* + * Write contents of register REGNO in task TASK. + */ +static inline int +put_reg(struct task_struct *task, unsigned long regno, long data) +{ + *get_reg_addr(task, regno) = data; return 0; } @@ -147,8 +141,9 @@ static inline int put_reg(struct task_struct *task, long regno, long data) * and that it is in the task area before calling this: this routine does * no checking. */ -static unsigned long get_long(struct task_struct * tsk, - struct vm_area_struct * vma, unsigned long addr) +static unsigned long +get_long(struct task_struct * tsk, struct vm_area_struct * vma, + unsigned long addr) { pgd_t * pgdir; pmd_t * pgmiddle; @@ -199,8 +194,9 @@ static unsigned long get_long(struct task_struct * tsk, * Now keeps R/W state of page so that a text page stays readonly * even if a debugger scribbles breakpoints into it. -M.U- */ -static void put_long(struct task_struct * tsk, struct vm_area_struct * vma, - unsigned long addr, unsigned long data) +static void +put_long(struct task_struct * tsk, struct vm_area_struct * vma, + unsigned long addr, unsigned long data) { pgd_t *pgdir; pmd_t *pgmiddle; @@ -250,8 +246,8 @@ static void put_long(struct task_struct * tsk, struct vm_area_struct * vma, flush_tlb(); } -static struct vm_area_struct * find_extend_vma(struct task_struct * tsk, - unsigned long addr) +static struct vm_area_struct * +find_extend_vma(struct task_struct * tsk, unsigned long addr) { struct vm_area_struct * vma; @@ -274,8 +270,8 @@ static struct vm_area_struct * find_extend_vma(struct task_struct * tsk, * This routine checks the page boundaries, and that the offset is * within the task area. It then calls get_long() to read a long. */ -static int read_long(struct task_struct * tsk, unsigned long addr, - unsigned long * result) +static int +read_long(struct task_struct * tsk, unsigned long addr, unsigned long * result) { struct vm_area_struct * vma = find_extend_vma(tsk, addr); @@ -315,8 +311,8 @@ static int read_long(struct task_struct * tsk, unsigned long addr, * This routine checks the page boundaries, and that the offset is * within the task area. It then calls put_long() to write a long. */ -static int write_long(struct task_struct * tsk, unsigned long addr, - unsigned long data) +static int +write_long(struct task_struct * tsk, unsigned long addr, unsigned long data) { struct vm_area_struct * vma = find_extend_vma(tsk, addr); @@ -349,8 +345,8 @@ static int write_long(struct task_struct * tsk, unsigned long addr, /* * Read a 32bit int from address space TSK. */ -static int read_int(struct task_struct * tsk, unsigned long addr, - unsigned int *data) +static int +read_int(struct task_struct * tsk, unsigned long addr, unsigned int *data) { unsigned long l, align; int res; @@ -376,8 +372,8 @@ static int read_int(struct task_struct * tsk, unsigned long addr, * For simplicity, do a read-modify-write of the 64bit word that * contains the 32bit word that we are about to write. */ -static int write_int(struct task_struct * tsk, unsigned long addr, - unsigned int data) +static int +write_int(struct task_struct * tsk, unsigned long addr, unsigned int data) { unsigned long l, align; int res; @@ -400,7 +396,8 @@ static int write_int(struct task_struct * tsk, unsigned long addr, /* * Set breakpoint. */ -int ptrace_set_bpt(struct task_struct * child) +int +ptrace_set_bpt(struct task_struct * child) { int displ, i, res, reg_b, nsaved = 0; u32 insn, op_code; @@ -422,31 +419,31 @@ int ptrace_set_bpt(struct task_struct * child) * branch (emulation can be tricky for fp branches). */ displ = ((s32)(insn << 11)) >> 9; - child->tss.debugreg[nsaved++] = pc + 4; + child->tss.bpt_addr[nsaved++] = pc + 4; if (displ) /* guard against unoptimized code */ - child->tss.debugreg[nsaved++] = pc + 4 + displ; + child->tss.bpt_addr[nsaved++] = pc + 4 + displ; DBG(DBG_BPT, ("execing branch\n")); } else if (op_code == 0x1a) { reg_b = (insn >> 16) & 0x1f; - child->tss.debugreg[nsaved++] = get_reg(child, reg_b); + child->tss.bpt_addr[nsaved++] = get_reg(child, reg_b); DBG(DBG_BPT, ("execing jump\n")); } else { - child->tss.debugreg[nsaved++] = pc + 4; + child->tss.bpt_addr[nsaved++] = pc + 4; DBG(DBG_BPT, ("execing normal insn\n")); } /* install breakpoints: */ for (i = 0; i < nsaved; ++i) { - res = read_int(child, child->tss.debugreg[i], &insn); + res = read_int(child, child->tss.bpt_addr[i], &insn); if (res < 0) return res; - child->tss.debugreg[i + 2] = insn; - DBG(DBG_BPT, (" -> next_pc=%lx\n", child->tss.debugreg[i])); - res = write_int(child, child->tss.debugreg[i], BREAKINST); + child->tss.bpt_insn[i] = insn; + DBG(DBG_BPT, (" -> next_pc=%lx\n", child->tss.bpt_addr[i])); + res = write_int(child, child->tss.bpt_addr[i], BREAKINST); if (res < 0) return res; } - child->tss.debugreg[4] = nsaved; + child->tss.bpt_nsaved = nsaved; return 0; } @@ -454,11 +451,12 @@ int ptrace_set_bpt(struct task_struct * child) * Ensure no single-step breakpoint is pending. Returns non-zero * value if child was being single-stepped. */ -int ptrace_cancel_bpt(struct task_struct * child) +int +ptrace_cancel_bpt(struct task_struct * child) { - int i, nsaved = child->tss.debugreg[4]; + int i, nsaved = child->tss.bpt_nsaved; - child->tss.debugreg[4] = 0; + child->tss.bpt_nsaved = 0; if (nsaved > 2) { printk("ptrace_cancel_bpt: bogus nsaved: %d!\n", nsaved); @@ -466,16 +464,18 @@ int ptrace_cancel_bpt(struct task_struct * child) } for (i = 0; i < nsaved; ++i) { - write_int(child, child->tss.debugreg[i], - child->tss.debugreg[i + 2]); + write_int(child, child->tss.bpt_addr[i], + child->tss.bpt_insn[i]); } return (nsaved != 0); } -asmlinkage long sys_ptrace(long request, long pid, long addr, long data, - int a4, int a5, struct pt_regs regs) +asmlinkage long +sys_ptrace(long request, long pid, long addr, long data, + int a4, int a5, struct pt_regs regs) { struct task_struct *child; + unsigned long tmp; long ret; lock_kernel(); @@ -540,9 +540,7 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data, switch (request) { /* When I and D space are separate, these will need to be fixed. */ case PTRACE_PEEKTEXT: /* read word at location addr. */ - case PTRACE_PEEKDATA: { - unsigned long tmp; - + case PTRACE_PEEKDATA: ret = read_long(child, addr, &tmp); DBG(DBG_MEM, ("peek %#lx->%#lx\n", addr, tmp)); if (ret < 0) @@ -550,13 +548,12 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data, regs.r0 = 0; /* special return: no errors */ ret = tmp; goto out; - } - /* read register number ADDR. */ + /* Read register number ADDR. */ case PTRACE_PEEKUSR: regs.r0 = 0; /* special return: no errors */ - DBG(DBG_MEM, ("peek $%ld=%#lx\n", addr, regs.r0)); ret = get_reg(child, addr); + DBG(DBG_MEM, ("peek $%ld->%#lx\n", addr, ret)); goto out; /* When I and D space are separate, this will have to be fixed. */ @@ -573,7 +570,7 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data, case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ - case PTRACE_CONT: { /* restart after signal. */ + case PTRACE_CONT: /* restart after signal. */ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; @@ -587,14 +584,13 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data, ptrace_cancel_bpt(child); ret = data; goto out; - } /* * Make the child exit. Best I can do is send it a sigkill. * perhaps it should be put in the status that it wants to * exit. */ - case PTRACE_KILL: { + case PTRACE_KILL: if (child->state != TASK_ZOMBIE) { wake_up_process(child); child->exit_code = SIGKILL; @@ -603,22 +599,20 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data, ptrace_cancel_bpt(child); ret = 0; goto out; - } - case PTRACE_SINGLESTEP: { /* execute single instruction. */ + case PTRACE_SINGLESTEP: /* execute single instruction. */ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->tss.debugreg[4] = -1; /* mark single-stepping */ + child->tss.bpt_nsaved = -1; /* mark single-stepping */ child->flags &= ~PF_TRACESYS; wake_up_process(child); child->exit_code = data; /* give it a chance to run. */ ret = 0; goto out; - } - case PTRACE_DETACH: { /* detach a process that was attached. */ + case PTRACE_DETACH: /* detach a process that was attached. */ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; @@ -632,7 +626,6 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data, ptrace_cancel_bpt(child); ret = 0; goto out; - } default: ret = -EIO; @@ -643,7 +636,8 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data, return ret; } -asmlinkage void syscall_trace(void) +asmlinkage void +syscall_trace(void) { if ((current->flags & (PF_PTRACED|PF_TRACESYS)) != (PF_PTRACED|PF_TRACESYS)) diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index ba816ac05..f357830e3 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -43,12 +43,6 @@ #include "proto.h" -#if 1 -# define DBG_SRM(args) printk args -#else -# define DBG_SRM(args) -#endif - struct hwrpb_struct *hwrpb; unsigned long srm_hae; @@ -114,6 +108,7 @@ extern struct alpha_machine_vector lx164_mv; extern struct alpha_machine_vector miata_mv; extern struct alpha_machine_vector mikasa_mv; extern struct alpha_machine_vector mikasa_primo_mv; +extern struct alpha_machine_vector monet_mv; extern struct alpha_machine_vector noname_mv; extern struct alpha_machine_vector noritake_mv; extern struct alpha_machine_vector noritake_primo_mv; @@ -127,6 +122,34 @@ extern struct alpha_machine_vector sx164_mv; extern struct alpha_machine_vector takara_mv; extern struct alpha_machine_vector xl_mv; extern struct alpha_machine_vector xlt_mv; +#pragma weak alcor_mv +#pragma weak alphabook1_mv +#pragma weak avanti_mv +#pragma weak cabriolet_mv +#pragma weak dp264_mv +#pragma weak eb164_mv +#pragma weak eb64p_mv +#pragma weak eb66_mv +#pragma weak eb66p_mv +#pragma weak jensen_mv +#pragma weak lx164_mv +#pragma weak miata_mv +#pragma weak mikasa_mv +#pragma weak mikasa_primo_mv +#pragma weak monet_mv +#pragma weak noname_mv +#pragma weak noritake_mv +#pragma weak noritake_primo_mv +#pragma weak p2k_mv +#pragma weak pc164_mv +#pragma weak rawhide_mv +#pragma weak ruffian_mv +#pragma weak sable_mv +#pragma weak sable_gamma_mv +#pragma weak sx164_mv +#pragma weak takara_mv +#pragma weak xl_mv +#pragma weak xlt_mv void __init @@ -197,26 +220,18 @@ setup_arch(char **cmdline_p, unsigned long * memory_start_p, cpu->type); } -#ifdef CONFIG_ALPHA_GENERIC if (!vec) { panic("Unsupported system type: %s%s%s (%ld %ld)\n", type_name, (*var_name ? " variation " : ""), var_name, hwrpb->sys_type, hwrpb->sys_variation); } - alpha_mv = *vec; + if (vec != &alpha_mv) + alpha_mv = *vec; +#ifdef CONFIG_ALPHA_GENERIC /* Assume that we've booted from SRM if we havn't booted from MILO. Detect the later by looking for "MILO" in the system serial nr. */ alpha_using_srm = strncmp((const char *)hwrpb->ssn, "MILO", 4) != 0; -#else - /* Once we're sure we can reliably identify systems, we should - simply panic as we do above. */ - if (vec != &alpha_mv) { - printk("WARNING: Not configured for system type: %s%s%s " - "(%ld %ld)\nContinuing with trepidation...\n", - type_name, (*var_name ? " variation " : ""), var_name, - hwrpb->sys_type, hwrpb->sys_variation); - } #endif printk("Booting on %s%s%s using machine vector %s\n", @@ -351,11 +366,16 @@ static char rawhide_names[][16] = { }; static int rawhide_indices[] = {0,0,0,1,1,2,2,3,3,4,4}; +static char tsunami_names[][16] = { + "0", "DP264", "Warhol", "Windjammer", "Monet", "Clipper", + "Goldrush", "Webbrick", "Catamaran" +}; +static int tsunami_indices[] = {0,1,2,3,4,5,6,7,8}; + static struct alpha_machine_vector * __init get_sysvec(long type, long variation, long cpu) { -#ifdef CONFIG_ALPHA_GENERIC static struct alpha_machine_vector *systype_vecs[] __initlocaldata = { NULL, /* 0 */ @@ -392,7 +412,7 @@ get_sysvec(long type, long variation, long cpu) NULL, /* XXM */ &takara_mv, NULL, /* Yukon */ - &dp264_mv, + NULL, /* Tsunami -- see variation. */ NULL, /* Wildfire */ NULL, /* CUSCO */ }; @@ -426,6 +446,19 @@ get_sysvec(long type, long variation, long cpu) &eb66p_mv }; + static struct alpha_machine_vector *tsunami_vecs[] __initlocaldata = + { + NULL, + &dp264_mv, /* dp164 */ + &dp264_mv, /* warhol */ + &dp264_mv, /* windjammer */ + &monet_mv, /* monet */ + &dp264_mv, /* clipper */ + &dp264_mv, /* goldrush */ + &dp264_mv, /* webbrick */ + &dp264_mv, /* catamaran */ + }; + /* ??? Do we need to distinguish between Rawhides? */ struct alpha_machine_vector *vec; @@ -466,20 +499,27 @@ get_sysvec(long type, long variation, long cpu) if (member < N(eb66_indices)) vec = eb66_vecs[eb66_indices[member]]; break; + case ST_DEC_TSUNAMI: + if (member < N(tsunami_indices)) + vec = tsunami_vecs[tsunami_indices[member]]; + break; case ST_DEC_1000: - if (cpu == EV5_CPU) + cpu &= 0xffffffff; + if (cpu == EV5_CPU || cpu == EV56_CPU) vec = &mikasa_primo_mv; else vec = &mikasa_mv; break; case ST_DEC_NORITAKE: - if (cpu == EV5_CPU) + cpu &= 0xffffffff; + if (cpu == EV5_CPU || cpu == EV56_CPU) vec = &noritake_primo_mv; else vec = &noritake_mv; break; case ST_DEC_2100_A500: - if (cpu == EV5_CPU) + cpu &= 0xffffffff; + if (cpu == EV5_CPU || cpu == EV56_CPU) vec = &sable_gamma_mv; else vec = &sable_mv; @@ -487,17 +527,11 @@ get_sysvec(long type, long variation, long cpu) } } return vec; -#else - /* TODO: verify that the system is of the type for which we - were configured. For now, cop out and return success. */ - return &alpha_mv; -#endif /* GENERIC */ } static struct alpha_machine_vector * __init get_sysvec_byname(const char *name) { -#ifdef CONFIG_ALPHA_GENERIC static struct alpha_machine_vector *all_vecs[] __initlocaldata = { &alcor_mv, @@ -514,6 +548,7 @@ get_sysvec_byname(const char *name) &miata_mv, &mikasa_mv, &mikasa_primo_mv, + &monet_mv, &noname_mv, &noritake_mv, &noritake_primo_mv, @@ -536,11 +571,6 @@ get_sysvec_byname(const char *name) return mv; } return NULL; -#else - if (strcasecmp(alpha_mv.vector_name, name) == 0) - return &alpha_mv; - return NULL; -#endif } static void @@ -597,6 +627,10 @@ get_sysnames(long type, long variation, if (member < N(rawhide_indices)) *variation_name = rawhide_names[rawhide_indices[member]]; break; + case ST_DEC_TSUNAMI: + if (member < N(tsunami_indices)) + *variation_name = tsunami_names[tsunami_indices[member]]; + break; } } @@ -648,8 +682,8 @@ int get_cpuinfo(char *buffer) } unaligned[2]; static char cpu_names[][8] = { - "EV3", "EV4", "Unknown", "LCA4", "EV5", "EV45", "EV56", - "EV6", "PCA56", "PCA57" + "EV3", "EV4", "Simulate", "LCA4", "EV5", "EV45", "EV56", + "EV6", "PCA56", "PCA57", "EV67" }; struct percpu_struct *cpu; @@ -678,7 +712,7 @@ int get_cpuinfo(char *buffer) "system variation\t: %s\n" "system revision\t\t: %ld\n" "system serial number\t: %s\n" - "cycle frequency [Hz]\t: %lu\n" + "cycle frequency [Hz]\t: %lu %s\n" "timer frequency [Hz]\t: %lu.%02lu\n" "page size [bytes]\t: %ld\n" "phys. address bits\t: %ld\n" @@ -691,7 +725,8 @@ int get_cpuinfo(char *buffer) (char*)cpu->serial_no, systype_name, sysvariation_name, hwrpb->sys_revision, (char*)hwrpb->ssn, - hwrpb->cycle_freq, + hwrpb->cycle_freq ? : est_cycle_freq, + hwrpb->cycle_freq ? "" : "est.", hwrpb->intr_freq / 4096, (100 * hwrpb->intr_freq / 4096) % 100, hwrpb->pagesize, @@ -703,8 +738,8 @@ int get_cpuinfo(char *buffer) platform_string()); #ifdef __SMP__ - return len + smp_info(buffer+len); -#else - return len; + len += smp_info(buffer+len); #endif + + return len; } diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 22f8742e1..99bd36785 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c @@ -33,9 +33,6 @@ asmlinkage void ret_from_sys_call(void); asmlinkage int do_signal(sigset_t *, struct pt_regs *, struct switch_stack *, unsigned long, unsigned long); -extern int ptrace_set_bpt (struct task_struct *child); -extern int ptrace_cancel_bpt (struct task_struct *child); - /* * The OSF/1 sigprocmask calling sequence is different from the diff --git a/arch/alpha/kernel/smc37c669.c b/arch/alpha/kernel/smc37c669.c index d92fc281e..1202b7b90 100644 --- a/arch/alpha/kernel/smc37c669.c +++ b/arch/alpha/kernel/smc37c669.c @@ -2519,10 +2519,10 @@ SMC37c669_dump_registers(void) void __init SMC669_Init ( void ) { SMC37c669_CONFIG_REGS *SMC_base; + unsigned long flags; + __save_and_cli(flags); if ( ( SMC_base = SMC37c669_detect( ) ) != NULL ) { - printk( "SMC37c669 Super I/O Controller found @ 0x%lx\n", - (unsigned long) SMC_base ); #if SMC_DEBUG SMC37c669_config_mode( TRUE ); SMC37c669_dump_registers( ); @@ -2573,8 +2573,12 @@ void __init SMC669_Init ( void ) SMC37c669_config_mode( FALSE ); SMC37c669_display_device_info( ); #endif + __restore_flags(flags); + printk( "SMC37c669 Super I/O Controller found @ 0x%lx\n", + (unsigned long) SMC_base ); } else { + __restore_flags(flags); #if SMC_DEBUG printk( "No SMC37c669 Super I/O Controller found\n" ); #endif diff --git a/arch/alpha/kernel/smc37c93x.c b/arch/alpha/kernel/smc37c93x.c index 7d62ba553..5448305a3 100644 --- a/arch/alpha/kernel/smc37c93x.c +++ b/arch/alpha/kernel/smc37c93x.c @@ -8,6 +8,7 @@ #include <linux/malloc.h> #include <linux/mm.h> #include <linux/init.h> +#include <linux/delay.h> #include <asm/hwrpb.h> #include <asm/io.h> @@ -86,21 +87,28 @@ static unsigned long __init SMCConfigState(unsigned long baseAddr) unsigned long indexPort; unsigned long dataPort; + int i; + configPort = indexPort = baseAddr; dataPort = configPort + 1; - outb(CONFIG_ON_KEY, configPort); - outb(CONFIG_ON_KEY, configPort); - outb(DEVICE_ID, indexPort); - devId = inb(dataPort); - if ( devId == VALID_DEVICE_ID ) { - outb(DEVICE_REV, indexPort); - devRev = inb(dataPort); - } - else { - baseAddr = 0; +#define NUM_RETRIES 5 + + for (i = 0; i < NUM_RETRIES; i++) + { + outb(CONFIG_ON_KEY, configPort); + outb(CONFIG_ON_KEY, configPort); + outb(DEVICE_ID, indexPort); + devId = inb(dataPort); + if (devId == VALID_DEVICE_ID) { + outb(DEVICE_REV, indexPort); + devRev = inb(dataPort); + break; + } + else + udelay(100); } - return baseAddr; + return (i != NUM_RETRIES) ? baseAddr : 0L; } static void __init SMCRunState(unsigned long baseAddr) @@ -233,10 +241,10 @@ static void __init SMCReportDeviceStatus(unsigned long baseAddr) int __init SMC93x_Init(void) { unsigned long SMCUltraBase; + unsigned long flags; + __save_and_cli(flags); if ((SMCUltraBase = SMCDetectUltraIO()) != 0UL) { - printk("SMC FDC37C93X Ultra I/O Controller found @ 0x%lx\n", - SMCUltraBase); #if SMC_DEBUG SMCReportDeviceStatus(SMCUltraBase); #endif @@ -256,9 +264,13 @@ int __init SMC93x_Init(void) SMCReportDeviceStatus(SMCUltraBase); #endif SMCRunState(SMCUltraBase); + __restore_flags(flags); + printk("SMC FDC37C93X Ultra I/O Controller found @ 0x%lx\n", + SMCUltraBase); return 1; } else { + __restore_flags(flags); DBG_DEVS(("No SMC FDC37C93X Ultra I/O Controller found\n")); return 0; } diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 02ebc65e0..19aa9a682 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -39,6 +39,7 @@ spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED; unsigned int boot_cpu_id = 0; static int smp_activated = 0; +static unsigned long ipicnt[NR_CPUS] = {0,}; /* IPI counts */ int smp_found_config = 0; /* Have we found an SMP box */ static int max_cpus = -1; @@ -619,7 +620,6 @@ local_flush_tlb_all(unsigned int this_cpu) { tbia(); clear_bit(this_cpu, &ipi_msg_flush_tb.flush_tb_mask); - mb(); return 0; } @@ -627,12 +627,9 @@ static int local_flush_tlb_mm(unsigned int this_cpu) { struct mm_struct * mm = ipi_msg_flush_tb.p.flush_mm; - if (mm != current->mm) - flush_tlb_other(mm); - else + if (mm == current->mm) flush_tlb_current(mm); clear_bit(this_cpu, &ipi_msg_flush_tb.flush_tb_mask); - mb(); return 0; } @@ -642,12 +639,9 @@ local_flush_tlb_page(unsigned int this_cpu) struct vm_area_struct * vma = ipi_msg_flush_tb.p.flush_vma; struct mm_struct * mm = vma->vm_mm; - if (mm != current->mm) - flush_tlb_other(mm); - else + if (mm == current->mm) flush_tlb_current_page(mm, vma, ipi_msg_flush_tb.flush_addr); clear_bit(this_cpu, &ipi_msg_flush_tb.flush_tb_mask); - mb(); return 0; } @@ -701,7 +695,7 @@ handle_ipi(struct pt_regs *regs) volatile int * pending_ipis = &ipi_bits[this_cpu]; int ops; - mb(); + mb(); /* Order bit setting and interrupt. */ #if 0 printk("handle_ipi: on CPU %d ops 0x%x PC 0x%lx\n", this_cpu, *pending_ipis, regs->pc); @@ -711,10 +705,10 @@ handle_ipi(struct pt_regs *regs) for (first = 0; (ops & 1) == 0; ++first, ops >>= 1) ; /* look for the first thing to do */ clear_bit(first, pending_ipis); - mb(); + mb(); /* Order bit clearing and data access. */ if ((*ipi_func[first])(this_cpu)) - printk("%d\n", first); - mb(); + printk("%d\n", first); + mb(); /* Order data access and bit clearing. */ } if (hwrpb->txrdy) secondary_console_message(); @@ -726,19 +720,26 @@ send_ipi_message(long to_whom, enum ipi_message_type operation) int i; unsigned int j; + mb(); /* Order out-of-band data and bit setting. */ for (i = 0, j = 1; i < NR_CPUS; ++i, j += j) { if ((to_whom & j) == 0) continue; set_bit(operation, &ipi_bits[i]); - mb(); + mb(); /* Order bit setting and interrupt. */ wripir(i); } } -int smp_info(char *buffer) +int +smp_info(char *buffer) { - return sprintf(buffer, "CPUs probed %d active %d map 0x%x\n", - smp_num_probed, smp_num_cpus, cpu_present_map); + int i; + unsigned long sum = 0; + for (i = 0; i < NR_CPUS; i++) + sum += ipicnt[i]; + + return sprintf(buffer, "CPUs probed %d active %d map 0x%x IPIs %ld\n", + smp_num_probed, smp_num_cpus, cpu_present_map, sum); } /* wrapper for call from panic() */ @@ -763,19 +764,22 @@ flush_tlb_all(void) unsigned int to_whom = cpu_present_map ^ (1 << smp_processor_id()); int timeout = 10000; + spin_lock_own(&kernel_flag, "flush_tlb_all"); + ipi_msg_flush_tb.flush_tb_mask = to_whom; send_ipi_message(to_whom, TLB_ALL); tbia(); while (ipi_msg_flush_tb.flush_tb_mask) { - if (--timeout < 0) { - printk("flush_tlb_all: STUCK on CPU %d mask 0x%x\n", - smp_processor_id(), ipi_msg_flush_tb.flush_tb_mask); - ipi_msg_flush_tb.flush_tb_mask = 0; - break; - } - udelay(100); - ; /* Wait for all clear from other CPUs. */ + if (--timeout < 0) { + printk("flush_tlb_all: STUCK on CPU %d mask 0x%x\n", + smp_processor_id(), + ipi_msg_flush_tb.flush_tb_mask); + ipi_msg_flush_tb.flush_tb_mask = 0; + break; + } + /* Wait for all clear from other CPUs. */ + udelay(100); } } @@ -785,6 +789,8 @@ flush_tlb_mm(struct mm_struct *mm) unsigned int to_whom = cpu_present_map ^ (1 << smp_processor_id()); int timeout = 10000; + spin_lock_own(&kernel_flag, "flush_tlb_mm"); + ipi_msg_flush_tb.p.flush_mm = mm; ipi_msg_flush_tb.flush_tb_mask = to_whom; send_ipi_message(to_whom, TLB_MM); @@ -814,6 +820,8 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) struct mm_struct * mm = vma->vm_mm; int timeout = 10000; + spin_lock_own(&kernel_flag, "flush_tlb_page"); + ipi_msg_flush_tb.p.flush_vma = vma; ipi_msg_flush_tb.flush_addr = addr; ipi_msg_flush_tb.flush_tb_mask = to_whom; @@ -849,6 +857,8 @@ flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) timeout = 10000; to_whom = cpu_present_map ^ (1 << smp_processor_id()); + spin_lock_own(&kernel_flag, "flush_tlb_range"); + ipi_msg_flush_tb.p.flush_mm = mm; ipi_msg_flush_tb.flush_tb_mask = to_whom; send_ipi_message(to_whom, TLB_MM); @@ -871,11 +881,51 @@ flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) } #if DEBUG_SPINLOCK -void spin_lock(spinlock_t * lock) + +#ifdef MANAGE_SPINLOCK_IPL + +static inline long +spinlock_raise_ipl(spinlock_t * lock) +{ + long min_ipl = lock->target_ipl; + long last_ipl = swpipl(7); + if (last_ipl < 7 && min_ipl < 7) + setipl(min_ipl < last_ipl ? last_ipl : min_ipl); + return last_ipl; +} + +static inline void +spinlock_restore_ipl(long prev) +{ + setipl(prev); +} + +#else + +#define spinlock_raise_ipl(LOCK) 0 +#define spinlock_restore_ipl(PREV) ((void)0) + +#endif /* MANAGE_SPINLOCK_IPL */ + +void +spin_unlock(spinlock_t * lock) +{ + long old_ipl = lock->saved_ipl; + mb(); + lock->lock = 0; + spinlock_restore_ipl(old_ipl); +} + +void +spin_lock(spinlock_t * lock) { long tmp; - long stuck; + long stuck = 1<<27; void *inline_pc = __builtin_return_address(0); + unsigned long started = jiffies; + int printed = 0; + int cpu = smp_processor_id(); + long old_ipl = spinlock_raise_ipl(lock); try_again: @@ -885,15 +935,15 @@ void spin_lock(spinlock_t * lock) of this object file's text section so as to perfect branch prediction. */ __asm__ __volatile__( - "1: ldq_l %0,%1\n" + "1: ldl_l %0,%1\n" " subq %2,1,%2\n" " blbs %0,2f\n" " or %0,1,%0\n" - " stq_c %0,%1\n" + " stl_c %0,%1\n" " beq %0,3f\n" "4: mb\n" ".section .text2,\"ax\"\n" - "2: ldq %0,%1\n" + "2: ldl %0,%1\n" " subq %2,1,%2\n" "3: blt %2,4b\n" " blbs %0,2b\n" @@ -905,13 +955,43 @@ void spin_lock(spinlock_t * lock) : "2" (stuck)); if (stuck < 0) { - printk("spinlock stuck at %p (cur=%p, own=%p, prev=%p)\n", - inline_pc, current, lock->task, lock->previous); + if (!printed) { + printk("spinlock stuck at %p(%d) owner %s at %p\n", + inline_pc, cpu, lock->task->comm, + lock->previous); + printed = 1; + } + stuck = 1<<30; goto try_again; - } else { - lock->previous = inline_pc; + } + + /* Exiting. Got the lock. */ + lock->saved_ipl = old_ipl; + lock->on_cpu = cpu; + lock->previous = inline_pc; + lock->task = current; + + if (printed) { + printk("spinlock grabbed at %p(%d) %ld ticks\n", + inline_pc, cpu, jiffies - started); + } +} + +int +spin_trylock(spinlock_t * lock) +{ + long old_ipl = spinlock_raise_ipl(lock); + int ret; + if ((ret = !test_and_set_bit(0, lock))) { + mb(); + lock->saved_ipl = old_ipl; + lock->on_cpu = smp_processor_id(); + lock->previous = __builtin_return_address(0); lock->task = current; + } else { + spinlock_restore_ipl(old_ipl); } + return ret; } #endif /* DEBUG_SPINLOCK */ @@ -930,22 +1010,21 @@ void write_lock(rwlock_t * lock) __asm__ __volatile__( "1: ldl_l %1,%0\n" " blbs %1,6f\n" - " or %1,1,%2\n" - " stl_c %2,%0\n" - " beq %2,6f\n" " blt %1,8f\n" + " mov 1,%1\n" + " stl_c %1,%0\n" + " beq %1,6f\n" "4: mb\n" ".section .text2,\"ax\"\n" - "6: ldl %1,%0\n" - " blt %3,4b # debug\n" + "6: blt %3,4b # debug\n" " subl %3,1,%3 # debug\n" + " ldl %1,%0\n" " blbs %1,6b\n" - " br 1b\n" - "8: ldl %1,%0\n" - " blt %4,4b # debug\n" + "8: blt %4,4b # debug\n" " subl %4,1,%4 # debug\n" + " ldl %1,%0\n" " blt %1,8b\n" - " br 4b\n" + " br 1b\n" ".previous" : "=m" (__dummy_lock(lock)), "=&r" (regx), "=&r" (regy) , "=&r" (stuck_lock), "=&r" (stuck_reader) diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 1d751054f..9ac7abb36 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c @@ -25,12 +25,14 @@ #include <asm/pci.h> #include <asm/pgtable.h> #include <asm/core_tsunami.h> +#include <asm/hwrpb.h> #include "proto.h" #include "irq.h" #include "bios32.h" #include "machvec.h" +#define dev2hose(d) (bus2hose[(d)->bus->number]->pci_hose_index) /* * HACK ALERT! only CPU#0 is used currently @@ -217,11 +219,74 @@ dp264_map_irq(struct pci_dev *dev, int slot, int pin) }; const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5; int irq = COMMON_TABLE_LOOKUP; + if (irq >= 0) - irq += 16 * bus2hose[dev->bus->number]->pci_hose_index; + irq += 16 * dev2hose(dev); + + return irq; +} + +static int __init +monet_map_irq(struct pci_dev *dev, int slot, int pin) +{ + static char irq_tab[13][5] __initlocaldata = { + /*INT INTA INTB INTC INTD */ + { 45, 45, 45, 45, 45}, /* IdSel 3 21143 PCI1 */ + { -1, -1, -1, -1, -1}, /* IdSel 4 unused */ + { -1, -1, -1, -1, -1}, /* IdSel 5 unused */ + { 47, 47, 47, 47, 47}, /* IdSel 6 SCSI PCI1 */ + { -1, -1, -1, -1, -1}, /* IdSel 7 ISA Bridge */ + { -1, -1, -1, -1, -1}, /* IdSel 8 P2P PCI1 */ +#if 1 + { 28, 28, 29, 30, 31}, /* IdSel 14 slot 4 PCI2*/ + { 24, 24, 25, 26, 27}, /* IdSel 15 slot 5 PCI2*/ +#else + { -1, -1, -1, -1, -1}, /* IdSel 9 unused */ + { -1, -1, -1, -1, -1}, /* IdSel 10 unused */ +#endif + { 40, 40, 41, 42, 43}, /* IdSel 11 slot 1 PCI0*/ + { 36, 36, 37, 38, 39}, /* IdSel 12 slot 2 PCI0*/ + { 32, 32, 33, 34, 35}, /* IdSel 13 slot 3 PCI0*/ + { 28, 28, 29, 30, 31}, /* IdSel 14 slot 4 PCI2*/ + { 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/ +}; + const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5; + int irq = COMMON_TABLE_LOOKUP; + return irq; } +static int __init +monet_swizzle(struct pci_dev *dev, int *pinp) +{ + int slot, pin = *pinp; + + /* Check first for the built-in bridge on hose 1. */ + if (dev2hose(dev) == 1 && PCI_SLOT(dev->bus->self->devfn) == 8) { + slot = PCI_SLOT(dev->devfn); + } + else + { + /* Must be a card-based bridge. */ + do { + /* Check for built-in bridge on hose 1. */ + if (dev2hose(dev) == 1 && + PCI_SLOT(dev->bus->self->devfn) == 8) { + slot = PCI_SLOT(dev->devfn); + break; + } + pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)) ; + + /* Move up the chain of bridges. */ + dev = dev->bus->self; + /* Slot of the next bridge. */ + slot = PCI_SLOT(dev->devfn); + } while (dev->bus->self); + } + *pinp = pin; + return slot; +} + static void __init dp264_pci_fixup(void) { @@ -230,9 +295,18 @@ dp264_pci_fixup(void) SMC669_Init(); } +static void __init +monet_pci_fixup(void) +{ + layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE); + common_pci_fixup(monet_map_irq, monet_swizzle); + /* es1888_init(); */ /* later? */ + SMC669_Init(); +} + /* - * The System Vector + * The System Vectors */ struct alpha_machine_vector dp264_mv __initmv = { @@ -257,3 +331,27 @@ struct alpha_machine_vector dp264_mv __initmv = { kill_arch: generic_kill_arch, }; ALIAS_MV(dp264) + +struct alpha_machine_vector monet_mv __initmv = { + vector_name: "Monet", + DO_EV6_MMU, + DO_DEFAULT_RTC, + DO_TSUNAMI_IO, + DO_TSUNAMI_BUS, + machine_check: tsunami_machine_check, + max_dma_address: ALPHA_MAX_DMA_ADDRESS, + + nr_irqs: 64, + irq_probe_mask: _PROBE_MASK(64), + update_irq_hw: dp264_update_irq_hw, + ack_irq: generic_ack_irq, + device_interrupt: dp264_device_interrupt, + + init_arch: tsunami_init_arch, + init_irq: dp264_init_irq, + init_pit: generic_init_pit, + pci_fixup: monet_pci_fixup, + kill_arch: generic_kill_arch, +}; +/* No alpha_mv alias for monet, since we compile it in unconditionally + with DP264; setup_arch knows how to cope. */ diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c index 9053b0085..93a65e76e 100644 --- a/arch/alpha/kernel/sys_jensen.c +++ b/arch/alpha/kernel/sys_jensen.c @@ -128,7 +128,7 @@ struct alpha_machine_vector jensen_mv __initmv = { BUS(jensen), machine_check: jensen_machine_check, max_dma_address: ALPHA_MAX_DMA_ADDRESS, - rtc_port: 0x170, rtc_addr: 0, rtc_bcd: 1, + rtc_port: 0x170, nr_irqs: 16, irq_probe_mask: _PROBE_MASK(16), diff --git a/arch/alpha/kernel/sys_miata.c b/arch/alpha/kernel/sys_miata.c index 106050a0c..c6f908618 100644 --- a/arch/alpha/kernel/sys_miata.c +++ b/arch/alpha/kernel/sys_miata.c @@ -36,7 +36,7 @@ miata_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p) if (irq >= 16) { /* Make CERTAIN none of the bogus ints get enabled... */ *(vulp)PYXIS_INT_MASK = - ~((long)mask >> 16) & ~0x4000000000000e3bUL; + ~((long)mask >> 16) & ~0x400000000000063bUL; mb(); /* ... and read it back to make sure it got written. */ *(vulp)PYXIS_INT_MASK; @@ -62,7 +62,7 @@ miata_device_interrupt(unsigned long vector, struct pt_regs *regs) * then all the PCI slots/INTXs (12-31). */ /* Maybe HALT should only be used for SRM console boots? */ - pld &= 0x00000000fffff1c4UL; + pld &= 0x00000000fffff9c4UL; /* * Now for every possible bit set, work through them and call @@ -101,8 +101,8 @@ miata_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) * used for this purpose, as PIC interrupts are delivered as the * vectors 0x800-0x8f0). * But I really don't want to change the fixup code for allocation - * of IRQs, nor the alpha_irq_mask maintenance stuff, both of which look - * nice and clean now. + * of IRQs, nor the alpha_irq_mask maintenance stuff, both of which + * look nice and clean now. * So, here's this grotty hack... :-( */ if (irq >= 16) @@ -120,14 +120,15 @@ miata_init_irq(void) alpha_mv.device_interrupt = miata_srm_device_interrupt; /* Note invert on MASK bits. */ - *(vulp)PYXIS_INT_MASK = ~((long)alpha_irq_mask >> 16); mb(); + *(vulp)PYXIS_INT_MASK = + ~((long)alpha_irq_mask >> 16) & ~0x400000000000063bUL; mb(); #if 0 /* These break on MiataGL so we'll try not to do it at all. */ *(vulp)PYXIS_INT_HILO = 0x000000B2UL; mb(); /* ISA/NMI HI */ *(vulp)PYXIS_RT_COUNT = 0UL; mb(); /* clear count */ #endif /* Clear upper timer. */ - *(vulp)PYXIS_INT_REQ = 0x4000000000000000UL; mb(); + *(vulp)PYXIS_INT_REQ = 0x4000000000000180UL; mb(); enable_irq(16 + 2); /* enable HALT switch - SRM only? */ enable_irq(16 + 6); /* enable timer */ @@ -209,22 +210,21 @@ miata_map_irq(struct pci_dev *dev, int slot, int pin) { -1, -1, -1, -1, -1}, /* IdSel 15, EIDE */ { -1, -1, -1, -1, -1}, /* IdSel 16, none */ { -1, -1, -1, -1, -1}, /* IdSel 17, none */ - /* {16+11, 16+11, 16+11, 16+11, 16+11},*//* IdSel 17, USB ?? */ { -1, -1, -1, -1, -1}, /* IdSel 18, PCI-ISA */ { -1, -1, -1, -1, -1}, /* IdSel 19, PCI-PCI */ { -1, -1, -1, -1, -1}, /* IdSel 20, none */ { -1, -1, -1, -1, -1}, /* IdSel 21, none */ {16+12, 16+12, 16+13, 16+14, 16+15}, /* IdSel 22, slot 4 */ {16+16, 16+16, 16+17, 16+18, 16+19}, /* IdSel 23, slot 5 */ - /* The following are actually on bus 1, which is - across the builtin PCI-PCI bridge. */ - {16+20, 16+20, 16+21, 16+22, 16+23}, /* IdSel 24, slot 1 */ - {16+24, 16+24, 16+25, 16+26, 16+27}, /* IdSel 25, slot 2 */ - {16+28, 16+28, 16+29, 16+30, 16+31}, /* IdSel 26, slot 3 */ + /* the next 7 are actually on PCI bus 1, across the bridge */ + {16+11, 16+11, 16+11, 16+11, 16+11}, /* IdSel 24, QLISP/GL*/ + { -1, -1, -1, -1, -1}, /* IdSel 25, none */ + { -1, -1, -1, -1, -1}, /* IdSel 26, none */ { -1, -1, -1, -1, -1}, /* IdSel 27, none */ - { -1, -1, -1, -1, -1}, /* IdSel 28, none */ - { -1, -1, -1, -1, -1}, /* IdSel 29, none */ - { -1, -1, -1, -1, -1}, /* IdSel 30, none */ + {16+20, 16+20, 16+21, 16+22, 16+23}, /* IdSel 28, slot 1 */ + {16+24, 16+24, 16+25, 16+26, 16+27}, /* IdSel 29, slot 2 */ + {16+28, 16+28, 16+29, 16+30, 16+31}, /* IdSel 30, slot 3 */ + /* this bridge is on the main bus of the later original MIATA */ { -1, -1, -1, -1, -1}, /* IdSel 31, PCI-PCI */ }; const long min_idsel = 3, max_idsel = 20, irqs_per_slot = 5; @@ -239,7 +239,7 @@ miata_swizzle(struct pci_dev *dev, int *pinp) /* Check first for the built-in bridge. */ if ((PCI_SLOT(dev->bus->self->devfn) == 8) || (PCI_SLOT(dev->bus->self->devfn) == 20)) { - slot = PCI_SLOT(dev->devfn) + 5; + slot = PCI_SLOT(dev->devfn) + 9; } else { @@ -247,7 +247,7 @@ miata_swizzle(struct pci_dev *dev, int *pinp) do { if ((PCI_SLOT(dev->bus->self->devfn) == 8) || (PCI_SLOT(dev->bus->self->devfn) == 20)) { - slot = PCI_SLOT(dev->devfn) + 5; + slot = PCI_SLOT(dev->devfn) + 9; break; } pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)); diff --git a/arch/alpha/kernel/sys_ruffian.c b/arch/alpha/kernel/sys_ruffian.c index e34b68952..a7ae730d8 100644 --- a/arch/alpha/kernel/sys_ruffian.c +++ b/arch/alpha/kernel/sys_ruffian.c @@ -62,7 +62,7 @@ ruffian_ack_irq(unsigned long irq) outb(0x20, 0x20); } else { /* Ack PYXIS PCI interrupt. */ - *(vulp)PYXIS_INT_REQ = (1UL << (irq - 16)); + *(vulp)PYXIS_INT_REQ = (1UL << (irq - 16)); mb(); /* ... and read it back to make sure it got written. */ *(vulp)PYXIS_INT_REQ; } @@ -91,8 +91,8 @@ ruffian_device_interrupt(unsigned long vector, struct pt_regs *regs) while (pld) { i = ffz(~pld); pld &= pld - 1; /* clear least bit set */ - if (i == 7) { - /* Copy this bit from isa_device_interrupt cause + if (i == 7) { /* if ISA int */ + /* Copy this code from isa_device_interrupt because we need to hook into int 0 for the timer. I refuse to soil device_interrupt with ifdefs. */ @@ -107,13 +107,12 @@ ruffian_device_interrupt(unsigned long vector, struct pt_regs *regs) if (j == 7 && !(inb(0x20) & 0x80)) { /* It's only a passive release... */ } else if (j == 0) { - timer_interrupt(0, NULL, regs); + handle_irq(8, -1, regs); /* fake it */ ruffian_ack_irq(0); } else { handle_irq(j, j, regs); } - } else { - /* if not timer int */ + } else { /* if not an ISA int */ handle_irq(16 + i, 16 + i, regs); } @@ -171,6 +170,7 @@ ruffian_pci_fixup(void) } +#ifdef BUILDING_FOR_MILO /* * The DeskStation Ruffian motherboard firmware does not place * the memory size in the PALimpure area. Therefore, we use @@ -207,6 +207,7 @@ ruffian_get_bank_size(unsigned long offset) return ret; } +#endif /* BUILDING_FOR_MILO */ static void __init ruffian_init_arch(unsigned long *mem_start, unsigned long *mem_end) @@ -232,10 +233,12 @@ ruffian_init_pit (void) static void ruffian_kill_arch (int mode, char *reboot_cmd) { +#if 0 + /* this only causes re-entry to ARCSBIOS */ /* Perhaps this works for other PYXIS as well? */ *(vuip) PYXIS_RESET = 0x0000dead; mb(); - +#endif generic_kill_arch(mode, reboot_cmd); } @@ -247,8 +250,7 @@ ruffian_kill_arch (int mode, char *reboot_cmd) struct alpha_machine_vector ruffian_mv __initmv = { vector_name: "Ruffian", DO_EV5_MMU, - /* RUFFIAN always uses BCD, like a PeeCee. */ - rtc_port: 0x70, rtc_addr: 0x80, rtc_bcd: 1, + DO_DEFAULT_RTC, /* For the moment, do not use BWIO on RUFFIAN. */ IO(PYXIS,pyxis,pyxis), DO_PYXIS_BUS, diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c index dfd6adaa7..b5aaf5d81 100644 --- a/arch/alpha/kernel/sys_sio.c +++ b/arch/alpha/kernel/sys_sio.c @@ -110,6 +110,9 @@ alphabook1_init_arch(unsigned long *mem_start, unsigned long *mem_end) * * This probably ought to be configurable via MILO. For * example, sound boards seem to like using IRQ 9. + * + * This is NOT how we should do it. PIRQ0-X should have + * their own IRQ's, the way intel uses the IO-APIC irq's. */ static unsigned long sio_route_tab __initdata = 0; @@ -238,7 +241,7 @@ static inline void __init avanti_pci_fixup(void) { layout_all_busses(DEFAULT_IO_BASE, APECS_AND_LCA_DEFAULT_MEM_BASE); - sio_pci_fixup(noname_map_irq, 0x0b0a090f); + sio_pci_fixup(noname_map_irq, 0x0b0a0e0f); sio_fixup_irq_levels(sio_collect_irq_levels()); enable_ide(0x26e); } diff --git a/arch/alpha/kernel/sys_sx164.c b/arch/alpha/kernel/sys_sx164.c index 722b4f1a9..a03f451d0 100644 --- a/arch/alpha/kernel/sys_sx164.c +++ b/arch/alpha/kernel/sys_sx164.c @@ -103,7 +103,10 @@ sx164_device_interrupt(unsigned long vector, struct pt_regs *regs) static void sx164_init_irq(void) { - STANDARD_INIT_IRQ_PROLOG; + outb(0, DMA1_RESET_REG); + outb(0, DMA2_RESET_REG); + outb(DMA_MODE_CASCADE, DMA2_MODE_REG); + outb(0, DMA2_MASK_REG); if (alpha_using_srm) { alpha_mv.update_irq_hw = sx164_srm_update_irq_hw; diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index e0a7e1153..acbb76896 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c @@ -60,13 +60,17 @@ static struct { unsigned long scaled_ticks_per_cycle; /* last time the CMOS clock got updated */ time_t last_rtc_update; + /* partial unused tick */ + unsigned long partial_tick; } state; +unsigned long est_cycle_freq; + static inline __u32 rpcc(void) { __u32 result; - asm volatile ("rpcc %0" : "r="(result)); + asm volatile ("rpcc %0" : "=r"(result)); return result; } @@ -77,8 +81,6 @@ static inline __u32 rpcc(void) */ void timer_interrupt(int irq, void *dev, struct pt_regs * regs) { - const unsigned long half = 1UL << (FIX_SHIFT - 1); - const unsigned long mask = (1UL << (FIX_SHIFT + 1)) - 1; unsigned long delta; __u32 now; long nticks; @@ -94,22 +96,21 @@ void timer_interrupt(int irq, void *dev, struct pt_regs * regs) #endif /* - * Estimate how many ticks have passed since the last update. - * Round the result, .5 to even. When we loose ticks due to - * say using IDE, the clock has been seen to run up to 15% slow - * if we truncate. + * Calculate how many ticks have passed since the last update, + * including any previous partial leftover. Save any resulting + * fraction for the next pass. */ now = rpcc(); delta = now - state.last_time; state.last_time = now; - delta = delta * state.scaled_ticks_per_cycle; - if ((delta & mask) != half) - delta += half; + delta = delta * state.scaled_ticks_per_cycle + state.partial_tick; + state.partial_tick = delta & ((1UL << FIX_SHIFT) - 1); nticks = delta >> FIX_SHIFT; - do { + while (nticks > 0) { do_timer(regs); - } while (--nticks > 0); + nticks--; + } /* * If we have an externally synchronized Linux clock, then update @@ -162,7 +163,7 @@ static inline unsigned long mktime(unsigned int year, unsigned int mon, * drivers depend on them being initialized (e.g., joystick driver). */ -/* It is (normally) only counter 1 that presents config problems, so +/* It is (normally) only counter 0 that presents config problems, so provide this support function to do the rest of the job. */ void inline @@ -184,12 +185,20 @@ init_pit_rest(void) static inline void rtc_init_pit (void) { + unsigned char control; + /* Setup interval timer if /dev/rtc is being used */ outb(0x34, 0x43); /* binary, mode 2, LSB/MSB, ch 0 */ outb(LATCH & 0xff, 0x40); /* LSB */ outb(LATCH >> 8, 0x40); /* MSB */ request_region(0x40, 0x20, "timer"); /* reserve pit */ + /* Turn off RTC interrupts before /dev/rtc is initialized */ + control = CMOS_READ(RTC_CONTROL); + control &= ~(RTC_PIE | RTC_AIE | RTC_UIE); + CMOS_WRITE(control, RTC_CONTROL); + CMOS_READ(RTC_INTR_FLAGS); + init_pit_rest(); } #endif @@ -197,11 +206,25 @@ rtc_init_pit (void) void generic_init_pit (void) { - int x; - if ((x = (CMOS_READ(RTC_FREQ_SELECT) & 0x3f)) != 0x26) { + unsigned char x; + + /* Reset periodic interrupt frequency. */ + x = CMOS_READ(RTC_FREQ_SELECT) & 0x3f; + if (x != 0x26 && x != 0x19 && x != 0x06) { printk("Setting RTC_FREQ to 1024 Hz (%x)\n", x); CMOS_WRITE(0x26, RTC_FREQ_SELECT); } + + /* Turn on periodic interrupts. */ + x = CMOS_READ(RTC_CONTROL); + if (!(x & RTC_PIE)) { + printk("Turning on RTC interrupts.\n"); + x |= RTC_PIE; + x &= ~(RTC_AIE | RTC_UIE); + CMOS_WRITE(x, RTC_CONTROL); + } + CMOS_READ(RTC_INTR_FLAGS); + request_region(RTC_PORT(0), 0x10, "timer"); /* reserve rtc */ /* Turn off the PIT. */ @@ -223,11 +246,9 @@ generic_init_pit (void) void time_init(void) { -#ifdef CONFIG_RTC - unsigned char save_control; -#endif void (*irq_handler)(int, void *, struct pt_regs *); unsigned int year, mon, day, hour, min, sec, cc1, cc2; + unsigned long cycle_freq; /* Initialize the timers. */ init_pit(); @@ -246,16 +267,17 @@ time_init(void) /* If our cycle frequency isn't valid, go another round and give a guess at what it should be. */ - if (hwrpb->cycle_freq == 0) { + cycle_freq = hwrpb->cycle_freq; + if (cycle_freq == 0) { printk("HWRPB cycle frequency bogus. Estimating... "); do { } while (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)); do { } while (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP); cc2 = rpcc(); - hwrpb->cycle_freq = cc2 - cc1; + est_cycle_freq = cycle_freq = cc2 - cc1; cc1 = cc2; - printk("%lu Hz\n", hwrpb->cycle_freq); + printk("%lu Hz\n", cycle_freq); } /* From John Bowman <bowman@math.ualberta.ca>: allow the values @@ -300,18 +322,9 @@ time_init(void) state.last_time = cc1; state.scaled_ticks_per_cycle - = ((unsigned long) HZ << FIX_SHIFT) / hwrpb->cycle_freq; + = ((unsigned long) HZ << FIX_SHIFT) / cycle_freq; state.last_rtc_update = 0; - -#ifdef CONFIG_RTC - /* turn off RTC interrupts before /dev/rtc is initialized */ - save_control = CMOS_READ(RTC_CONTROL); - save_control &= ~RTC_PIE; - save_control &= ~RTC_AIE; - save_control &= ~RTC_UIE; - CMOS_WRITE(save_control, RTC_CONTROL); - CMOS_READ(RTC_INTR_FLAGS); -#endif + state.partial_tick = 0L; /* setup timer */ irq_handler = timer_interrupt; @@ -353,7 +366,7 @@ do_gettimeofday(struct timeval *tv) */ delta_usec = delta_cycles * state.scaled_ticks_per_cycle * 15625; - delta_usec = ((delta_usec / ((1UL << (FIX_SHIFT-6)) * HZ)) + 1) / 2; + delta_usec = ((delta_usec / ((1UL << (FIX_SHIFT-6-1)) * HZ)) + 1) / 2; usec += delta_usec; if (usec >= 1000000) { diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index c2fc4c8e6..e925cf6ff 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c @@ -149,8 +149,6 @@ asmlinkage void do_entIF(unsigned long type, unsigned long a1, unsigned long a2, unsigned long a3, unsigned long a4, unsigned long a5, struct pt_regs regs) { - extern int ptrace_cancel_bpt (struct task_struct *who); - lock_kernel(); die_if_kernel("Instruction fault", ®s, type, 0); switch (type) { @@ -558,11 +556,12 @@ s_reg_to_mem (unsigned long s_reg) #define OP_INT_MASK ( 1L << 0x28 | 1L << 0x2c /* ldl stl */ \ | 1L << 0x29 | 1L << 0x2d /* ldq stq */ \ - | 1L << 0x0c | 1L << 0x0d ) /* ldwu stw */ + | 1L << 0x0c | 1L << 0x0d /* ldwu stw */ \ + | 1L << 0x0a | 1L << 0x0e ) /* ldbu stb */ #define OP_WRITE_MASK ( 1L << 0x26 | 1L << 0x27 /* sts stt */ \ | 1L << 0x2c | 1L << 0x2d /* stl stq */ \ - | 1L << 0xd ) /* stw */ + | 1L << 0x0d | 1L << 0x0e ) /* stw stb */ #define R(x) ((size_t) &((struct pt_regs *)0)->x) diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile index 4dd7d591d..e87f8b903 100644 --- a/arch/alpha/lib/Makefile +++ b/arch/alpha/lib/Makefile @@ -7,7 +7,8 @@ OBJS = __divqu.o __remqu.o __divlu.o __remlu.o memset.o memcpy.o io.o \ strcat.o strcpy.o strncat.o strncpy.o stxcpy.o stxncpy.o \ strchr.o strrchr.o \ copy_user.o clear_user.o strncpy_from_user.o strlen_user.o \ - csum_ipv6_magic.o strcasecmp.o + csum_ipv6_magic.o strcasecmp.o \ + srm_dispatch.o srm_fixup.o srm_puts.o srm_printk.o lib.a: $(OBJS) $(AR) rcs lib.a $(OBJS) diff --git a/arch/alpha/lib/srm_dispatch.S b/arch/alpha/lib/srm_dispatch.S new file mode 100644 index 000000000..2bcea3073 --- /dev/null +++ b/arch/alpha/lib/srm_dispatch.S @@ -0,0 +1,43 @@ +/* + * arch/alpha/lib/srm_dispatch.S + */ + +.globl srm_dispatch +.ent srm_dispatch +srm_dispatch: + .frame $30,30,$26 + subq $30,80,$30 + stq $26,0($30) + stq $8,8($30) + stq $9,16($30) + stq $10,24($30) + stq $11,32($30) + stq $12,40($30) + stq $13,48($30) + stq $14,56($30) + stq $15,64($30) + stq $29,72($30) + .mask 0x2400FF00, -80 + .prologue 0 + + ldq $1,hwrpb + ldq $2,0xc0($1) /* crb offset */ + addq $2,$1,$2 /* crb */ + ldq $27,0($2) /* dispatch procedure value */ + + ldq $2,8($27) /* dispatch call address */ + jsr $26,($2) /* call it (weird VMS call seq) */ + + ldq $26,0($30) + ldq $8,8($30) + ldq $9,16($30) + ldq $10,24($30) + ldq $11,32($30) + ldq $12,40($30) + ldq $13,48($30) + ldq $14,56($30) + ldq $15,64($30) + ldq $29,72($30) + addq $30,80,$30 + ret $31,($26),1 +.end srm_dispatch diff --git a/arch/alpha/lib/srm_fixup.S b/arch/alpha/lib/srm_fixup.S new file mode 100644 index 000000000..9cf2d78c2 --- /dev/null +++ b/arch/alpha/lib/srm_fixup.S @@ -0,0 +1,42 @@ +/* + * arch/alpha/lib/srm_fixup.S + */ + +.globl srm_fixup +.ent srm_fixup +srm_fixup: + .frame $30,30,$26 + subq $30,80,$30 + stq $26,0($30) + stq $8,8($30) + stq $9,16($30) + stq $10,24($30) + stq $11,32($30) + stq $12,40($30) + stq $13,48($30) + stq $14,56($30) + stq $15,64($30) + stq $29,72($30) + .mask 0x2400FF00, -80 + .prologue 0 + + ldq $2,0xc0($17) /* crb offset */ + addq $2,$1,$2 /* crb */ + ldq $27,16($2) /* fixup procedure value */ + + ldq $2,8($27) /* dispatch call address */ + jsr $26,($2) /* call it (weird VMS call seq) */ + + ldq $26,0($30) + ldq $8,8($30) + ldq $9,16($30) + ldq $10,24($30) + ldq $11,32($30) + ldq $12,40($30) + ldq $13,48($30) + ldq $14,56($30) + ldq $15,64($30) + ldq $29,72($30) + addq $30,80,$30 + ret $31,($26),1 +.end srm_fixup diff --git a/arch/alpha/lib/srm_printk.c b/arch/alpha/lib/srm_printk.c new file mode 100644 index 000000000..b5baee15f --- /dev/null +++ b/arch/alpha/lib/srm_printk.c @@ -0,0 +1,21 @@ +/* + * arch/alpha/lib/srm_printk.c + */ + +#include <linux/kernel.h> +#include <asm/console.h> + +long +srm_printk(const char *fmt, ...) +{ + static char buf[1024]; + va_list args; + long i; + + va_start(args, fmt); + i = vsprintf(buf,fmt,args); + va_end(args); + + srm_puts(buf); + return i; +} diff --git a/arch/alpha/lib/srm_puts.c b/arch/alpha/lib/srm_puts.c new file mode 100644 index 000000000..87b1d1155 --- /dev/null +++ b/arch/alpha/lib/srm_puts.c @@ -0,0 +1,34 @@ +/* + * arch/alpha/lib/srm_puts.c + */ + +#include <linux/string.h> +#include <asm/console.h> + +void +srm_puts(const char *str) +{ + /* Expand \n to \r\n as we go. */ + + while (*str) { + long len; + const char *e = str; + + if (*str == '\n') { + if (srm_dispatch(CCB_PUTS, 0, "\r", 1) < 0) + return; + ++e; + } + + e = strchr(e, '\n') ? : strchr(e, '\0'); + len = e - str; + + while (len > 0) { + long written = srm_dispatch(CCB_PUTS, 0, str, len); + if (written < 0) + return; + len -= written & 0xffffffff; + str += written & 0xffffffff; + } + } +} diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 4d85adb36..2e67deb8a 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c @@ -30,7 +30,7 @@ extern void die_if_kernel(char *,struct pt_regs *,long); extern void show_net_buffers(void); -struct thread_struct * original_pcb_ptr; +struct thread_struct original_pcb; #ifndef __SMP__ struct pgtable_cache_struct quicklists; @@ -193,47 +193,66 @@ paging_init(unsigned long start_mem, unsigned long end_mem) unsigned long newptbr; struct memclust_struct * cluster; struct memdesc_struct * memdesc; + struct thread_struct *original_pcb_ptr; /* initialize mem_map[] */ start_mem = free_area_init(start_mem, end_mem); /* find free clusters, update mem_map[] accordingly */ memdesc = (struct memdesc_struct *) - (INIT_HWRPB->mddt_offset + (unsigned long) INIT_HWRPB); + (hwrpb->mddt_offset + (unsigned long) hwrpb); cluster = memdesc->cluster; for (i = memdesc->numclusters ; i > 0; i--, cluster++) { unsigned long pfn, nr; - if (cluster->usage & 1) + + /* Bit 0 is console/PALcode reserved. Bit 1 is + non-volatile memory -- we might want to mark + this for later */ + if (cluster->usage & 3) continue; pfn = cluster->start_pfn; nr = cluster->numpages; - /* non-volatile memory. We might want to mark this for later */ - if (cluster->usage & 2) - continue; - while (nr--) clear_bit(PG_reserved, &mem_map[pfn++].flags); } - /* unmap the console stuff: we don't need it, and we don't want it */ - /* Also set up the real kernel PCB while we're at it.. */ + /* Initialize the kernel's page tables. Linux puts the vptb in + the last slot of the L1 page table. */ memset((void *) ZERO_PAGE, 0, PAGE_SIZE); memset(swapper_pg_dir, 0, PAGE_SIZE); newptbr = ((unsigned long) swapper_pg_dir - PAGE_OFFSET) >> PAGE_SHIFT; pgd_val(swapper_pg_dir[1023]) = (newptbr << 32) | pgprot_val(PAGE_KERNEL); + + /* Set the vptb. This is often done by the bootloader, but + shouldn't be required. */ + if (hwrpb->vptb != 0xfffffffe00000000) { + wrvptptr(0xfffffffe00000000); + hwrpb->vptb = 0xfffffffe00000000; + hwrpb_update_checksum(hwrpb); + } + + /* Also set up the real kernel PCB while we're at it. */ init_task.tss.ptbr = newptbr; init_task.tss.pal_flags = 1; /* set FEN, clear everything else */ init_task.tss.flags = 0; - original_pcb_ptr = - phys_to_virt((unsigned long)load_PCB(&init_task.tss)); -#if 0 -printk("OKSP 0x%lx OPTBR 0x%lx\n", - original_pcb_ptr->ksp, original_pcb_ptr->ptbr); -#endif - + original_pcb_ptr = load_PCB(&init_task.tss); tbia(); + + /* Save off the contents of the original PCB so that we can + restore the original console's page tables for a clean reboot. + + Note that the PCB is supposed to be a physical address, but + since KSEG values also happen to work, folks get confused. + Check this here. */ + + if ((unsigned long)original_pcb_ptr < PAGE_OFFSET) { + original_pcb_ptr = (struct thread_struct *) + phys_to_virt((unsigned long) original_pcb_ptr); + } + original_pcb = *original_pcb_ptr; + return start_mem; } @@ -250,12 +269,6 @@ paging_init_secondary(void) current->tss.ptbr = init_task.tss.ptbr; current->tss.pal_flags = 1; current->tss.flags = 0; - -#if 0 -printk("paging_init_secondary: KSP 0x%lx PTBR 0x%lx\n", - current->tss.ksp, current->tss.ptbr); -#endif - load_PCB(¤t->tss); tbia(); @@ -263,6 +276,23 @@ printk("paging_init_secondary: KSP 0x%lx PTBR 0x%lx\n", } #endif /* __SMP__ */ +#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM) +void +srm_paging_stop (void) +{ + /* Move the vptb back to where the SRM console expects it. */ + swapper_pg_dir[1] = swapper_pg_dir[1023]; + tbia(); + wrvptptr(0x200000000); + hwrpb->vptb = 0x200000000; + hwrpb_update_checksum(hwrpb); + + /* Reload the page tables that the console had in use. */ + load_PCB(&original_pcb); + tbia(); +} +#endif + #if DEBUG_POISON static void kill_page(unsigned long pg) diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index fc5717e87..51e6bcb17 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -21,17 +21,6 @@ #include <asm/uaccess.h> #include <asm/pgtable.h> -void checksignals(void) -{ - sigset_t *blocked = ¤t->blocked; - unsigned long mask = blocked->sig[0] | sigmask(SIGKILL) | sigmask(SIGINT) | sigmask(SIGQUIT); - mask &= blocked->sig[1]; - if (~mask) { - printk("Bad signal mask\n"); - __backtrace(); - } -} - #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn)) diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S index 22fca192c..a2c8ecb37 100644 --- a/arch/i386/boot/setup.S +++ b/arch/i386/boot/setup.S @@ -145,7 +145,7 @@ start_of_setup: jne bad_sig jmp good_sig1 -! Routine to print ASCII string at DS:SI +! Routine to print ASCIIz string at DS:SI prtstr: lodsb and al,al @@ -345,7 +345,7 @@ is_disk1: mov ds,ax mov ds,ax xor ax,ax - mov [0x220], ax ! set table length to 0 + mov [0xa0], ax ! set table length to 0 mov ah, #0xc0 stc int 0x15 ! puts feature table at es:bx @@ -357,9 +357,13 @@ is_disk1: sub ax, #DELTA_INITSEG ! aka #INITSEG mov es,ax mov si,bx - mov di,#0x220 + mov di,#0xa0 mov cx,(si) add cx,#2 ! table length is a short + cmp cx,#0x10 + jc sysdesc_ok + mov cx,#0x10 ! we keep only first 16 bytes +sysdesc_ok: rep movsb pop ds @@ -392,8 +396,6 @@ no_psmouse: cmp bx,#0x0504d ! check for "PM" signature jne done_apm_bios ! no signature -> no APM BIOS - mov [64],ax ! record the APM BIOS version - mov [76],cx ! and flags and cx,#0x02 ! Is 32 bit supported? je done_apm_bios ! no ... @@ -412,6 +414,26 @@ no_psmouse: mov [74],dx ! BIOS data segment mov [78],esi ! BIOS code segment length mov [82],di ! BIOS data segment length +! +! Redo the installation check as the 32 bit connect +! modifies the flags returned on some BIOSs +! + mov ax,#0x05300 ! APM BIOS installation check + xor bx,bx + int 0x15 + jc apm_disconnect ! error -> should not happen, tidy up + + cmp bx,#0x0504d ! check for "PM" signature + jne apm_disconnect ! no signature -> should not happen, tidy up + + mov [64],ax ! record the APM BIOS version + mov [76],cx ! and flags + jmp done_apm_bios + +apm_disconnect: + mov ax,#0x05304 ! Disconnect + xor bx,bx + int 0x15 ! ignore return code jmp done_apm_bios no_32_apm_bios: diff --git a/arch/i386/boot/tools/build.c b/arch/i386/boot/tools/build.c index b5faf665c..25f783520 100644 --- a/arch/i386/boot/tools/build.c +++ b/arch/i386/boot/tools/build.c @@ -151,7 +151,7 @@ int main(int argc, char ** argv) if (setup_sectors < SETUP_SECTS) setup_sectors = SETUP_SECTS; fprintf(stderr, "Setup is %d bytes.\n", i); - memset(buf, sizeof(buf), 0); + memset(buf, 0, sizeof(buf)); while (i < setup_sectors * 512) { c = setup_sectors * 512 - i; if (c > sizeof(buf)) diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S index 648076589..879f0aa30 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S @@ -24,7 +24,7 @@ #undef CONFIG_VIDEO_LOCAL ! Force 400 scan lines for standard modes (hack to fix bad behaviour -! of certain broken BIOS'es -- don't use unless needed) +! of certain broken BIOSes -- don't use unless needed) #undef CONFIG_VIDEO_400_HACK ! A special hack allowing to force specific BIOS mode ID along with specific @@ -85,6 +85,9 @@ #define PARAM_LFB_SIZE 0x1c #define PARAM_LFB_LINELENGTH 0x24 #define PARAM_LFB_COLORS 0x26 +#define PARAM_VESAPM_SEG 0x2e +#define PARAM_VESAPM_OFF 0x30 +#define PARAM_LFB_PAGES 0x32 ! Define DO_STORE according to CONFIG_VIDEO_RETAIN #ifdef CONFIG_VIDEO_RETAIN @@ -236,13 +239,14 @@ mopar_gr: seg fs mov [PARAM_LFB_DEPTH],ax - mov eax,(di+40) + mov al,(di+29) + mov ah,#0 seg fs - mov [PARAM_LFB_BASE],eax + mov [PARAM_LFB_PAGES],ax - mov eax,(di+44) + mov eax,(di+40) seg fs - mov [PARAM_LFB_SIZE],eax + mov [PARAM_LFB_BASE],eax mov eax,(di+31) seg fs @@ -251,7 +255,30 @@ mopar_gr: mov eax,(di+35) seg fs mov [PARAM_LFB_COLORS+4],eax - + + ! get video mem size + lea di,modelist+1024 + mov ax,#0x4f00 + int 0x10 + + xor eax,eax + mov ax,(di+18) + seg fs + mov [PARAM_LFB_SIZE],eax + + ! get protected mode interface informations + mov ax,#0x4f0a + xor bx,bx + xor di,di + int 0x10 + cmp ax,#0x004f + jnz no_pm + seg fs + mov [PARAM_VESAPM_SEG],es + seg fs + mov [PARAM_VESAPM_OFF],di + +no_pm: ret ! @@ -619,7 +646,7 @@ st80: cmpb [adapter],#0 ! CGA/MDA/HGA => mode 3/7 is always 80x25 jz set80 seg gs ! This is EGA+ -- beware of 80x50 etc. mov al,[0x0484] - or al,al ! Some buggy BIOSs set 0 rows + or al,al ! Some buggy BIOSes set 0 rows jz set80 cmp al,#24 ! Let's hope this is correct jz set80 diff --git a/arch/i386/config.in b/arch/i386/config.in index ff8450ca8..a22692bca 100644 --- a/arch/i386/config.in +++ b/arch/i386/config.in @@ -64,6 +64,17 @@ if [ "$CONFIG_PARPORT" != "n" ]; then fi fi +bool 'Advanced Power Management BIOS support' CONFIG_APM +if [ "$CONFIG_APM" = "y" ]; then + bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND + bool ' Enable PM at boot time' CONFIG_APM_DO_ENABLE + bool ' Make CPU Idle calls when idle' CONFIG_APM_CPU_IDLE + bool ' Enable console blanking using APM' CONFIG_APM_DISPLAY_BLANK + bool ' Power off on shutdown' CONFIG_APM_POWER_OFF + bool ' Ignore multiple suspend' CONFIG_APM_IGNORE_MULTIPLE_SUSPEND + bool ' Ignore multiple suspend/resume cycles' CONFIG_APM_IGNORE_SUSPEND_BOUNCE +fi + endmenu source drivers/pnp/Config.in @@ -125,8 +136,9 @@ if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment comment 'Console drivers' bool 'VGA text console' CONFIG_VGA_CONSOLE + bool 'Video mode selection support' CONFIG_VIDEO_SELECT if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - bool 'Video mode selection support' CONFIG_VIDEO_SELECT + tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE bool 'Support for frame buffer devices (EXPERIMENTAL)' CONFIG_FB fi source drivers/video/Config.in diff --git a/arch/i386/defconfig b/arch/i386/defconfig index eda0b2bcb..78351e2d5 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig @@ -40,6 +40,7 @@ CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y # CONFIG_PARPORT is not set +# CONFIG_APM is not set # # Plug and Play support @@ -66,6 +67,7 @@ CONFIG_BLK_DEV_CMD640=y CONFIG_BLK_DEV_RZ1000=y CONFIG_BLK_DEV_IDEPCI=y CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_IDEDMA_AUTO=y # CONFIG_IDE_CHIPSETS is not set @@ -144,8 +146,7 @@ CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set # CONFIG_SCSI_AM53C974 is not set -CONFIG_SCSI_BUSLOGIC=y -CONFIG_SCSI_OMIT_FLASHPOINT=y +# CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DTC3280 is not set # CONFIG_SCSI_EATA_DMA is not set # CONFIG_SCSI_EATA_PIO is not set @@ -155,7 +156,12 @@ CONFIG_SCSI_OMIT_FLASHPOINT=y # CONFIG_SCSI_GENERIC_NCR5380 is not set # CONFIG_SCSI_NCR53C406A is not set # CONFIG_SCSI_NCR53C7xx is not set -# CONFIG_SCSI_NCR53C8XX is not set +CONFIG_SCSI_NCR53C8XX=y +CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=4 +CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 +CONFIG_SCSI_NCR53C8XX_SYNC=20 +# CONFIG_SCSI_NCR53C8XX_PROFILE is not set +# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set # CONFIG_SCSI_PAS16 is not set # CONFIG_SCSI_PCI2000 is not set # CONFIG_SCSI_PCI2220I is not set @@ -191,6 +197,7 @@ CONFIG_NET_EISA=y CONFIG_EEXPRESS_PRO100=y # CONFIG_NE2K_PCI is not set # CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set # CONFIG_NET_POCKET is not set # CONFIG_FDDI is not set # CONFIG_DLCI is not set @@ -236,9 +243,7 @@ CONFIG_MOUSE=y CONFIG_PSMOUSE=y CONFIG_82C710_MOUSE=y # CONFIG_PC110_PAD is not set -# CONFIG_UMISC is not set # CONFIG_QIC02_TAPE is not set -# CONFIG_APM is not set # CONFIG_WATCHDOG is not set # CONFIG_RTC is not set # CONFIG_VIDEO_DEV is not set @@ -265,10 +270,12 @@ CONFIG_ISO9660_FS=y CONFIG_PROC_FS=y CONFIG_NFS_FS=y CONFIG_NFSD=y +# CONFIG_NFSD_SUN is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y # CONFIG_CODA_FS is not set # CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_NTFS_FS is not set # CONFIG_SYSV_FS is not set @@ -277,6 +284,9 @@ CONFIG_LOCKD=y # CONFIG_ROMFS_FS is not set CONFIG_AUTOFS_FS=y # CONFIG_UFS_FS is not set +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_SMD_DISKLABEL is not set +# CONFIG_SOLARIS_X86_PARTITION is not set CONFIG_DEVPTS_FS=y # CONFIG_MAC_PARTITION is not set # CONFIG_NLS is not set @@ -285,6 +295,7 @@ CONFIG_DEVPTS_FS=y # Console drivers # CONFIG_VGA_CONSOLE=y +# CONFIG_VIDEO_SELECT is not set # # Sound diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 917e7abdf..b8a94af18 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile @@ -34,6 +34,10 @@ else endif endif +ifdef CONFIG_APM +OX_OBJS += apm.o +endif + ifdef SMP O_OBJS += io_apic.o smp.o trampoline.o endif diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c new file mode 100644 index 000000000..1cbc824f5 --- /dev/null +++ b/arch/i386/kernel/apm.c @@ -0,0 +1,1433 @@ +/* -*- linux-c -*- + * APM BIOS driver for Linux + * Copyright 1994-1998 Stephen Rothwell + * (Stephen.Rothwell@canb.auug.org.au) + * Development of this driver was funded by NEC Australia P/L + * and NEC Corporation + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * October 1995, Rik Faith (faith@cs.unc.edu): + * Minor enhancements and updates (to the patch set) for 1.3.x + * Documentation + * January 1996, Rik Faith (faith@cs.unc.edu): + * Make /proc/apm easy to format (bump driver version) + * March 1996, Rik Faith (faith@cs.unc.edu): + * Prohibit APM BIOS calls unless apm_enabled. + * (Thanks to Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>) + * April 1996, Stephen Rothwell (Stephen.Rothwell@canb.auug.org.au) + * Version 1.0 and 1.1 + * May 1996, Version 1.2 + * Feb 1998, Version 1.3 + * Feb 1998, Version 1.4 + * Aug 1998, Version 1.5 + * Sep 1998, Version 1.6 + * Nov 1998, Version 1.7 + * + * History: + * 0.6b: first version in official kernel, Linux 1.3.46 + * 0.7: changed /proc/apm format, Linux 1.3.58 + * 0.8: fixed gcc 2.7.[12] compilation problems, Linux 1.3.59 + * 0.9: only call bios if bios is present, Linux 1.3.72 + * 1.0: use fixed device number, consolidate /proc/apm into this file, + * Linux 1.3.85 + * 1.1: support user-space standby and suspend, power off after system + * halted, Linux 1.3.98 + * 1.2: When resetting RTC after resume, take care so that the time + * is only incorrect by 30-60mS (vs. 1S previously) (Gabor J. Toth + * <jtoth@princeton.edu>); improve interaction between + * screen-blanking and gpm (Stephen Rothwell); Linux 1.99.4 + * 1.2a:Simple change to stop mysterious bug reports with SMP also added + * levels to the printk calls. APM is not defined for SMP machines. + * The new replacment for it is, but Linux doesn't yet support this. + * Alan Cox Linux 2.1.55 + * 1.3: Set up a valid data descriptor 0x40 for buggy BIOS's + * 1.4: Upgraded to support APM 1.2. Integrated ThinkPad suspend patch by + * Dean Gaudet <dgaudet@arctic.org>. + * C. Scott Ananian <cananian@alumni.princeton.edu> Linux 2.1.87 + * 1.5: Fix segment register reloading (in case of bad segments saved + * across BIOS call). + * Stephen Rothwell + * 1.6: Cope with complier/assembler differences. + * Only try to turn off the first display device. + * Fix OOPS at power off with no APM BIOS by Jan Echternach + * <echter@informatik.uni-rostock.de> + * Stephen Rothwell + * 1.7: Modify driver's cached copy of the disabled/disengaged flags + * to reflect current state of APM BIOS. + * Chris Rankin <rankinc@bellsouth.net> + * Reset interrupt 0 timer to 100Hz after suspend + * Chad Miller <cmiller@surfsouth.com> + * Add CONFIG_APM_IGNORE_SUSPEND_BOUNCE + * Richard Gooch <rgooch@atnf.csiro.au> + * Allow boot time disabling of APM + * Make boot messages far less verbose by default + * Make asm safer + * Stephen Rothwell + * + * APM 1.1 Reference: + * + * Intel Corporation, Microsoft Corporation. Advanced Power Management + * (APM) BIOS Interface Specification, Revision 1.1, September 1993. + * Intel Order Number 241704-001. Microsoft Part Number 781-110-X01. + * + * [This document is available free from Intel by calling 800.628.8686 (fax + * 916.356.6100) or 800.548.4725; or via anonymous ftp from + * ftp://ftp.intel.com/pub/IAL/software_specs/apmv11.doc. It is also + * available from Microsoft by calling 206.882.8080.] + * + * APM 1.2 Reference: + * Intel Corporation, Microsoft Corporation. Advanced Power Management + * (APM) BIOS Interface Specification, Revision 1.2, February 1996. + * + * [This document is available from Intel at: + * http://www.intel.com/IAL/powermgm + * or Microsoft at + * http://www.microsoft.com/windows/thirdparty/hardware/pcfuture.htm + * ] + */ + +#include <linux/config.h> +#include <linux/module.h> + +#include <linux/poll.h> +#include <linux/types.h> +#include <linux/stddef.h> +#include <linux/timer.h> +#include <linux/fcntl.h> +#include <linux/malloc.h> +#include <linux/linkage.h> +#ifdef CONFIG_PROC_FS +#include <linux/stat.h> +#include <linux/proc_fs.h> +#endif +#include <linux/miscdevice.h> +#include <linux/apm_bios.h> +#include <linux/init.h> + +#include <asm/system.h> +#include <asm/uaccess.h> +#include <asm/desc.h> + +EXPORT_SYMBOL(apm_register_callback); +EXPORT_SYMBOL(apm_unregister_callback); + +extern unsigned long get_cmos_time(void); + +/* + * The apm_bios device is one of the misc char devices. + * This is its minor number. + */ +#define APM_MINOR_DEV 134 + +/* Configurable options: + * + * CONFIG_APM_IGNORE_USER_SUSPEND: define to ignore USER SUSPEND requests. + * This is necessary on the NEC Versa M series, which generates these when + * resuming from SYSTEM SUSPEND. However, enabling this on other laptops + * will cause the laptop to generate a CRITICAL SUSPEND when an appropriate + * USER SUSPEND is ignored -- this may prevent the APM driver from updating + * the system time on a RESUME. + * + * CONFIG_APM_DO_ENABLE: enable APM features at boot time. From page 36 of + * the specification: "When disabled, the APM BIOS does not automatically + * power manage devices, enter the Standby State, enter the Suspend State, + * or take power saving steps in response to CPU Idle calls." This driver + * will make CPU Idle calls when Linux is idle (unless this feature is + * turned off -- see below). This should always save battery power, but + * more complicated APM features will be dependent on your BIOS + * implementation. You may need to turn this option off if your computer + * hangs at boot time when using APM support, or if it beeps continuously + * instead of suspending. Turn this off if you have a NEC UltraLite Versa + * 33/C or a Toshiba T400CDT. This is off by default since most machines + * do fine without this feature. + * + * CONFIG_APM_CPU_IDLE: enable calls to APM CPU Idle/CPU Busy inside the + * idle loop. On some machines, this can activate improved power savings, + * such as a slowed CPU clock rate, when the machine is idle. These idle + * call is made after the idle loop has run for some length of time (e.g., + * 333 mS). On some machines, this will cause a hang at boot time or + * whenever the CPU becomes idle. + * + * CONFIG_APM_DISPLAY_BLANK: enable console blanking using the APM. Some + * laptops can use this to turn of the LCD backlight when the VC screen + * blanker blanks the screen. Note that this is only used by the VC screen + * blanker, and probably won't turn off the backlight when using X11. Some + * problems have been reported when using this option with gpm (if you'd + * like to debug this, please do so). + * + * CONFIG_APM_IGNORE_MULTIPLE_SUSPEND: The IBM TP560 bios seems to insist + * on returning multiple suspend/standby events whenever one occurs. We + * really only need one at a time, so just ignore any beyond the first. + * This is probably safe on most laptops. + * + * If you are debugging the APM support for your laptop, note that code for + * all of these options is contained in this file, so you can #define or + * #undef these on the next line to avoid recompiling the whole kernel. + * + */ + +/* KNOWN PROBLEM MACHINES: + * + * U: TI 4000M TravelMate: BIOS is *NOT* APM compliant + * [Confirmed by TI representative] + * ?: ACER 486DX4/75: uses dseg 0040, in violation of APM specification + * [Confirmed by BIOS disassembly] + * [This may work now ...] + * P: Toshiba 1950S: battery life information only gets updated after resume + * P: Midwest Micro Soundbook Elite DX2/66 monochrome: screen blanking + * broken in BIOS [Reported by Garst R. Reese <reese@isn.net>] + * + * Legend: U = unusable with APM patches + * P = partially usable with APM patches + */ + +/* + * Define to have debug messages. + */ +#undef APM_DEBUG + +/* + * Define to always call the APM BIOS busy routine even if the clock was + * not slowed by the idle routine. + */ +#define ALWAYS_CALL_BUSY + +/* + * Define to disable interrupts in APM BIOS calls (the CPU Idle BIOS call + * should turn interrupts on before it does a 'hlt'). + * This reportedly needs undefining for the ThinkPad 600. + */ +#define APM_NOINTS + +/* + * Define to make the APM BIOS calls zero all data segment registers (so + * that an incorrect BIOS implementation will cause a kernel panic if it + * tries to write to arbitrary memory). + */ +#define APM_ZERO_SEGS + +/* + * Define to make all set_limit calls use 64k limits. The APM 1.1 BIOS is + * supposed to provide limit information that it recognizes. Many machines + * do this correctly, but many others do not restrict themselves to their + * claimed limit. When this happens, they will cause a segmentation + * violation in the kernel at boot time. Most BIOS's, however, will + * respect a 64k limit, so we use that. If you want to be pedantic and + * hold your BIOS to its claims, then undefine this. + */ +#define APM_RELAX_SEGMENTS + +/* + * Define to re-initialize the interrupt 0 timer to 100 Hz after a suspend. + * This patched by Chad Miller <cmiller@surfsouth.com>, orig code by David + * Chen <chen@ctpa04.mit.edu> + */ +#undef INIT_TIMER_AFTER_SUSPEND + +#ifdef INIT_TIMER_AFTER_SUSPEND +#include <linux/timex.h> +#include <asm/io.h> +#include <linux/delay.h> +#endif + +/* + * Need to poll the APM BIOS every second + */ +#define APM_CHECK_TIMEOUT (HZ) + +/* + * Save a segment register away + */ +#define savesegment(seg, where) \ + __asm__ __volatile__("movl %%" #seg ",%0" : "=m" (where)) + +/* + * Forward declarations + */ +static void suspend(void); +static void standby(void); +static void set_time(void); + +static void check_events(void); +static void do_apm_timer(unsigned long); + +static int do_open(struct inode *, struct file *); +static int do_release(struct inode *, struct file *); +static ssize_t do_read(struct file *, char *, size_t , loff_t *); +static unsigned int do_poll(struct file *, poll_table *); +static int do_ioctl(struct inode *, struct file *, u_int, u_long); + +#ifdef CONFIG_PROC_FS +static int apm_get_info(char *, char **, off_t, int, int); +#endif + +extern int apm_register_callback(int (*)(apm_event_t)); +extern void apm_unregister_callback(int (*)(apm_event_t)); + +/* + * Local variables + */ +static asmlinkage struct { + unsigned long offset; + unsigned short segment; +} apm_bios_entry; +static int apm_enabled = 0; +#ifdef CONFIG_APM_CPU_IDLE +static int clock_slowed = 0; +#endif +static int suspends_pending = 0; +static int standbys_pending = 0; +#ifdef CONFIG_APM_IGNORE_MULTIPLE_SUSPEND +static int waiting_for_resume = 0; +#endif + +static long clock_cmos_diff; +static int got_clock_diff = 0; +static int debug = 0; +static int apm_disabled = 0; + +static struct wait_queue * process_list = NULL; +static struct apm_bios_struct * user_list = NULL; + +static struct timer_list apm_timer; + +static char driver_version[] = "1.7"; /* no spaces */ + +#ifdef APM_DEBUG +static char * apm_event_name[] = { + "system standby", + "system suspend", + "normal resume", + "critical resume", + "low battery", + "power status change", + "update time", + "critical suspend", + "user standby", + "user suspend", + "system standby resume", + "capabilities change" +}; +#define NR_APM_EVENT_NAME \ + (sizeof(apm_event_name) / sizeof(apm_event_name[0])) +#endif + +static struct file_operations apm_bios_fops = { + NULL, /* lseek */ + do_read, + NULL, /* write */ + NULL, /* readdir */ + do_poll, + do_ioctl, + NULL, /* mmap */ + do_open, + NULL, /* flush */ + do_release, + NULL, /* fsync */ + NULL /* fasync */ +}; + +static struct miscdevice apm_device = { + APM_MINOR_DEV, + "apm", + &apm_bios_fops +}; + +typedef struct callback_list_t { + int (* callback)(apm_event_t); + struct callback_list_t * next; +} callback_list_t; + +static callback_list_t * callback_list = NULL; + +typedef struct lookup_t { + int key; + char * msg; +} lookup_t; + +static const lookup_t error_table[] = { +/* N/A { APM_SUCCESS, "Operation succeeded" }, */ + { APM_DISABLED, "Power management disabled" }, + { APM_CONNECTED, "Real mode interface already connected" }, + { APM_NOT_CONNECTED, "Interface not connected" }, + { APM_16_CONNECTED, "16 bit interface already connected" }, +/* N/A { APM_16_UNSUPPORTED, "16 bit interface not supported" }, */ + { APM_32_CONNECTED, "32 bit interface already connected" }, + { APM_32_UNSUPPORTED, "32 bit interface not supported" }, + { APM_BAD_DEVICE, "Unrecognized device ID" }, + { APM_BAD_PARAM, "Parameter out of range" }, + { APM_NOT_ENGAGED, "Interface not engaged" }, + { APM_BAD_FUNCTION, "Function not supported" }, + { APM_RESUME_DISABLED, "Resume timer disabled" }, + { APM_BAD_STATE, "Unable to enter requested state" }, +/* N/A { APM_NO_EVENTS, "No events pending" }, */ + { APM_NOT_PRESENT, "No APM present" } +}; +#define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t)) + +/* + * These are the actual BIOS calls. Depending on APM_ZERO_SEGS + * and APM_NOINTS, we are being really paranoid here! Not only are + * interrupts disabled, but all the segment registers (except SS) are + * saved and zeroed this means that if the BIOS tries to reference any + * data without explicitly loading the segment registers, the kernel will + * fault immediately rather than have some unforeseen circumstances for + * the rest of the kernel. And it will be very obvious! :-) Doing this + * depends on CS referring to the same physical memory as DS so that DS + * can be zeroed before the call. Unfortunately, we can't do anything + * about the stack segment/pointer. Also, we tell the compiler that + * everything could change. + * + * Also, we KNOW that for the non error case of apm_bios_call, there + * is no useful data returned in the low order 8 bits of eax. + */ +#ifdef APM_NOINTS +# define APM_DO_CLI __cli() +#else +# define APM_DO_CLI +#endif +#ifdef APM_ZERO_SEGS +# define APM_DO_SAVE_SEGS \ + savesegment(fs, saved_fs); \ + savesegment(gs, saved_gs) +# define APM_DO_ZERO_SEGS \ + "pushl %%ds\n\t" \ + "pushl %%es\n\t" \ + "xorl %%edx, %%edx\n\t" \ + "mov %%dx, %%ds\n\t" \ + "mov %%dx, %%es\n\t" \ + "mov %%dx, %%fs\n\t" \ + "mov %%dx, %%gs\n\t" +# define APM_DO_POP_SEGS \ + "popl %%es\n\t" \ + "popl %%ds\n\t" +# define APM_DO_RESTORE_SEGS \ + loadsegment(fs, saved_fs); \ + loadsegment(gs, saved_gs) +#else +# define APM_DO_SAVE_SEGS +# define APM_DO_ZERO_SEGS +# define APM_DO_POP_SEGS +# define APM_DO_RESTORE_SEGS +#endif + +static u8 apm_bios_call(u32 eax_in, u32 ebx_in, u32 ecx_in, + u32 *eax, u32 *ebx, u32 *ecx, u32 *edx, u32 *esi) +{ + unsigned int saved_fs; + unsigned int saved_gs; + unsigned long flags; + + __save_flags(flags); + APM_DO_CLI; + APM_DO_SAVE_SEGS; + __asm__ __volatile__(APM_DO_ZERO_SEGS + "pushl %%edi\n\t" + "pushl %%ebp\n\t" + "lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t" + "setc %%al\n\t" + "popl %%ebp\n\t" + "popl %%edi\n\t" + APM_DO_POP_SEGS + : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx), + "=S" (*esi) + : "a" (eax_in), "b" (ebx_in), "c" (ecx_in) + : "memory", "cc"); + APM_DO_RESTORE_SEGS; + __restore_flags(flags); + return *eax & 0xff; +} + +/* + * This version only returns one value (usually an error code) + */ + +static u8 apm_bios_call_simple(u32 eax_in, u32 ebx_in, u32 ecx_in, + u32 *eax) +{ + u8 error; + unsigned int saved_fs; + unsigned int saved_gs; + unsigned long flags; + + __save_flags(flags); + APM_DO_CLI; + APM_DO_SAVE_SEGS; + { + int cx, dx, si; + + __asm__ __volatile__(APM_DO_ZERO_SEGS + "pushl %%edi\n\t" + "pushl %%ebp\n\t" + "lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t" + "setc %%bl\n\t" + "popl %%ebp\n\t" + "popl %%edi\n\t" + APM_DO_POP_SEGS + : "=a" (*eax), "=b" (error), "=c" (cx), "=d" (dx), + "=S" (si) + : "a" (eax_in), "b" (ebx_in), "c" (ecx_in) + : "memory", "cc"); + } + APM_DO_RESTORE_SEGS; + __restore_flags(flags); + return error; +} + +static int apm_driver_version(u_short *val) +{ + u32 eax; + + if (apm_bios_call_simple(0x530e, 0, *val, &eax)) + return (eax >> 8) & 0xff; + *val = eax; + return APM_SUCCESS; +} + +static int apm_get_event(apm_event_t *event, apm_eventinfo_t *info) +{ + u32 eax; + u32 ebx; + u32 ecx; + u32 dummy; + + if (apm_bios_call(0x530b, 0, 0, &eax, &ebx, &ecx, &dummy, &dummy)) + return (eax >> 8) & 0xff; + *event = ebx; + if (apm_bios_info.version < 0x0102) + *info = ~0; /* indicate info not valid */ + else + *info = ecx; + return APM_SUCCESS; +} + +static int set_power_state(u_short what, u_short state) +{ + u32 eax; + + if (apm_bios_call_simple(0x5307, what, state, &eax)) + return (eax >> 8) & 0xff; + return APM_SUCCESS; +} + +static int apm_set_power_state(u_short state) +{ + return set_power_state(0x0001, state); +} + +void apm_power_off(void) +{ + if (apm_enabled) + (void) apm_set_power_state(APM_STATE_OFF); +} + +#ifdef CONFIG_APM_DISPLAY_BLANK +/* Called by apm_display_blank and apm_display_unblank when apm_enabled. */ +static int apm_set_display_power_state(u_short state) +{ + return set_power_state(0x0100, state); +} +#endif + +#ifdef CONFIG_APM_DO_ENABLE +static int apm_enable_power_management(void) +{ + u32 eax; + + if (apm_bios_call_simple(0x5308, + (apm_bios_info.version > 0x100) ? 0x0001 : 0xffff, + 1, &eax)) + return (eax >> 8) & 0xff; + apm_bios_info.flags &= ~APM_BIOS_DISABLED; + return APM_SUCCESS; +} +#endif + +static int apm_get_power_status(u_short *status, u_short *bat, u_short *life) +{ + u32 eax; + u32 ebx; + u32 ecx; + u32 edx; + u32 dummy; + + if (apm_bios_call(0x530a, 1, 0, &eax, &ebx, &ecx, &edx, &dummy)) + return (eax >> 8) & 0xff; + *status = ebx; + *bat = ecx; + *life = edx; + return APM_SUCCESS; +} + +#if 0 +/* not used anywhere */ +static int apm_get_battery_status(u_short which, + u_short *bat, u_short *life, u_short *nbat) +{ + u_short status; + u32 eax; + u32 ebx; + u32 ecx; + u32 edx; + u32 esi; + + if (apm_bios_info.version < 0x0102) { + /* pretend we only have one battery. */ + if (which != 1) + return APM_BAD_DEVICE; + *nbat = 1; + return apm_get_power_status(&status, bat, life); + } + + if (apm_bios_call(0x530a, (0x8000 | (which)), 0, &eax, + &ebx, &ecx, &edx, &esi)) + return (eax >> 8) & 0xff; + *bat = ecx; + *life = edx; + *nbat = esi; + return APM_SUCCESS; +} +#endif + +static int apm_engage_power_management(u_short device) +{ + u32 eax; + + if (apm_bios_call_simple(0x530f, device, 1, &eax)) + return (eax >> 8) & 0xff; + return APM_SUCCESS; +} + +static void apm_error(char *str, int err) +{ + int i; + + for (i = 0; i < ERROR_COUNT; i++) + if (error_table[i].key == err) break; + if (i < ERROR_COUNT) + printk(KERN_NOTICE "apm: %s: %s\n", str, error_table[i].msg); + else + printk(KERN_NOTICE "apm: %s: unknown error code %#2.2x\n", + str, err); +} + +/* Called from console driver -- must make sure apm_enabled. */ +int apm_display_blank(void) +{ +#ifdef CONFIG_APM_DISPLAY_BLANK + int error; + + if (!apm_enabled) + return 0; + error = apm_set_display_power_state(APM_STATE_STANDBY); + if (error == APM_SUCCESS) + return 1; + apm_error("set display standby", error); +#endif + return 0; +} + +/* Called from console driver -- must make sure apm_enabled. */ +int apm_display_unblank(void) +{ +#ifdef CONFIG_APM_DISPLAY_BLANK + int error; + + if (!apm_enabled) + return 0; + error = apm_set_display_power_state(APM_STATE_READY); + if (error == APM_SUCCESS) + return 1; + apm_error("set display ready", error); +#endif + return 0; +} + +int apm_register_callback(int (*callback)(apm_event_t)) +{ + callback_list_t * new; + + new = kmalloc(sizeof(callback_list_t), GFP_KERNEL); + if (new == NULL) + return -ENOMEM; + new->callback = callback; + new->next = callback_list; + callback_list = new; + return 0; +} + +void apm_unregister_callback(int (*callback)(apm_event_t)) +{ + callback_list_t ** ptr; + callback_list_t * old; + + for (ptr = &callback_list; *ptr != NULL; ptr = &(*ptr)->next) + if ((*ptr)->callback == callback) + break; + old = *ptr; + *ptr = old->next; + kfree_s(old, sizeof(callback_list_t)); +} + +static int queue_empty(struct apm_bios_struct * as) +{ + return as->event_head == as->event_tail; +} + +static apm_event_t get_queued_event(struct apm_bios_struct * as) +{ + as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; + return as->events[as->event_tail]; +} + +static int queue_event(apm_event_t event, struct apm_bios_struct *sender) +{ + struct apm_bios_struct * as; + + if (user_list == NULL) + return 0; + for (as = user_list; as != NULL; as = as->next) { + if (as == sender) + continue; + as->event_head = (as->event_head + 1) % APM_MAX_EVENTS; + if (as->event_head == as->event_tail) { + static int notified; + + if (notified == 0) { + printk(KERN_ERR "apm: an event queue overflowed\n"); + notified = 1; + } + as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; + } + as->events[as->event_head] = event; + if (!as->suser) + continue; + switch (event) { + case APM_SYS_SUSPEND: + case APM_USER_SUSPEND: + as->suspends_pending++; + suspends_pending++; + break; + + case APM_SYS_STANDBY: + case APM_USER_STANDBY: + as->standbys_pending++; + standbys_pending++; + break; + } + } + wake_up_interruptible(&process_list); + return 1; +} + +static void set_time(void) +{ + unsigned long flags; + + if (!got_clock_diff) /* Don't know time zone, can't set clock */ + return; + + save_flags(flags); + cli(); + CURRENT_TIME = get_cmos_time() + clock_cmos_diff; + restore_flags(flags); +} + +static void suspend(void) +{ + unsigned long flags; + int err; + + /* Estimate time zone so that set_time can + update the clock */ + save_flags(flags); + clock_cmos_diff = -get_cmos_time(); + cli(); + clock_cmos_diff += CURRENT_TIME; + got_clock_diff = 1; + restore_flags(flags); + + err = apm_set_power_state(APM_STATE_SUSPEND); + if (err) + apm_error("suspend", err); +#ifdef INIT_TIMER_AFTER_SUSPEND + save_flags(flags); + cli(); + /* set the clock to 100 Hz */ + outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ + udelay(10); + outb_p(LATCH & 0xff , 0x40); /* LSB */ + udelay(10); + outb(LATCH >> 8 , 0x40); /* MSB */ + udelay(10); + restore_flags(flags); +#endif + set_time(); +} + +static void standby(void) +{ + int err; + + err = apm_set_power_state(APM_STATE_STANDBY); + if (err) + apm_error("standby", err); +} + +static apm_event_t get_event(void) +{ + int error; + apm_event_t event; + apm_eventinfo_t info; + + static int notified = 0; + + /* we don't use the eventinfo */ + error = apm_get_event(&event, &info); + if (error == APM_SUCCESS) + return event; + + if ((error != APM_NO_EVENTS) && (notified++ == 0)) + apm_error("get_event", error); + + return 0; +} + +static void send_event(apm_event_t event, apm_event_t undo, + struct apm_bios_struct *sender) +{ + callback_list_t * call; + callback_list_t * fix; + + for (call = callback_list; call != NULL; call = call->next) { + if (call->callback(event) && undo) { + for (fix = callback_list; fix != call; fix = fix->next) + fix->callback(undo); + if (apm_bios_info.version > 0x100) + apm_set_power_state(APM_STATE_REJECT); + return; + } + } + + queue_event(event, sender); +} + +static void check_events(void) +{ + apm_event_t event; +#ifdef CONFIG_APM_IGNORE_SUSPEND_BOUNCE + static unsigned long last_resume = 0; + static int did_resume = 0; +#endif + + while ((event = get_event()) != 0) { +#ifdef APM_DEBUG + if (event <= NR_APM_EVENT_NAME) + printk(KERN_DEBUG "apm: received %s notify\n", + apm_event_name[event - 1]); + else + printk(KERN_DEBUG "apm: received unknown " + "event 0x%02x\n", event); +#endif + switch (event) { + case APM_SYS_STANDBY: + case APM_USER_STANDBY: +#ifdef CONFIG_APM_IGNORE_MULTIPLE_SUSPEND + if (waiting_for_resume) + return; + waiting_for_resume = 1; +#endif + send_event(event, APM_STANDBY_RESUME, NULL); + if (standbys_pending <= 0) + standby(); + break; + + case APM_USER_SUSPEND: +#ifdef CONFIG_APM_IGNORE_USER_SUSPEND + if (apm_bios_info.version > 0x100) + apm_set_power_state(APM_STATE_REJECT); + break; +#endif + case APM_SYS_SUSPEND: +#ifdef CONFIG_APM_IGNORE_SUSPEND_BOUNCE + if (did_resume && ((jiffies - last_resume) < HZ)) + break; +#endif +#ifdef CONFIG_APM_IGNORE_MULTIPLE_SUSPEND + if (waiting_for_resume) + return; + waiting_for_resume = 1; +#endif + send_event(event, APM_NORMAL_RESUME, NULL); + if (suspends_pending <= 0) + suspend(); + break; + + case APM_NORMAL_RESUME: + case APM_CRITICAL_RESUME: + case APM_STANDBY_RESUME: +#ifdef CONFIG_APM_IGNORE_MULTIPLE_SUSPEND + waiting_for_resume = 0; +#endif +#ifdef CONFIG_APM_IGNORE_SUSPEND_BOUNCE + last_resume = jiffies; + did_resume = 1; +#endif + set_time(); + send_event(event, 0, NULL); + break; + + case APM_LOW_BATTERY: + case APM_POWER_STATUS_CHANGE: + case APM_CAPABILITY_CHANGE: + send_event(event, 0, NULL); + break; + + case APM_UPDATE_TIME: + set_time(); + break; + + case APM_CRITICAL_SUSPEND: + suspend(); + break; + } + } +} + +static void do_apm_timer(unsigned long unused) +{ + int err; + + static int pending_count = 0; + + if (((standbys_pending > 0) || (suspends_pending > 0)) + && (apm_bios_info.version > 0x100) + && (pending_count-- <= 0)) { + pending_count = 4; + + err = apm_set_power_state(APM_STATE_BUSY); + if (err) + apm_error("busy", err); + } + + if (!(((standbys_pending > 0) || (suspends_pending > 0)) + && (apm_bios_info.version == 0x100))) + check_events(); + + init_timer(&apm_timer); + apm_timer.expires = APM_CHECK_TIMEOUT + jiffies; + add_timer(&apm_timer); +} + +/* Called from sys_idle, must make sure apm_enabled. */ +int apm_do_idle(void) +{ +#ifdef CONFIG_APM_CPU_IDLE + u32 dummy; + + if (!apm_enabled) + return 0; + + if (apm_bios_call_simple(0x5305, 0, 0, &dummy)) + return 0; + + clock_slowed = (apm_bios_info.flags & APM_IDLE_SLOWS_CLOCK) != 0; + return 1; +#else + return 0; +#endif +} + +/* Called from sys_idle, must make sure apm_enabled. */ +void apm_do_busy(void) +{ +#ifdef CONFIG_APM_CPU_IDLE + u32 dummy; + + if (apm_enabled +#ifndef ALWAYS_CALL_BUSY + && clock_slowed +#endif + ) { + (void) apm_bios_call_simple(0x5306, 0, 0, &dummy); + clock_slowed = 0; + } +#endif +} + +static int check_apm_bios_struct(struct apm_bios_struct *as, const char *func) +{ + if ((as == NULL) || (as->magic != APM_BIOS_MAGIC)) { + printk(KERN_ERR "apm: %s passed bad filp", func); + return 1; + } + return 0; +} + +static ssize_t do_read(struct file *fp, char *buf, size_t count, loff_t *ppos) +{ + struct apm_bios_struct * as; + int i; + apm_event_t event; + struct wait_queue wait = { current, NULL }; + + as = fp->private_data; + if (check_apm_bios_struct(as, "read")) + return -EIO; + if (count < sizeof(apm_event_t)) + return -EINVAL; + if (queue_empty(as)) { + if (fp->f_flags & O_NONBLOCK) + return -EAGAIN; + add_wait_queue(&process_list, &wait); +repeat: + current->state = TASK_INTERRUPTIBLE; + if (queue_empty(as) && !signal_pending(current)) { + schedule(); + goto repeat; + } + current->state = TASK_RUNNING; + remove_wait_queue(&process_list, &wait); + } + i = count; + while ((i >= sizeof(event)) && !queue_empty(as)) { + event = get_queued_event(as); + copy_to_user(buf, &event, sizeof(event)); + switch (event) { + case APM_SYS_SUSPEND: + case APM_USER_SUSPEND: + as->suspends_read++; + break; + + case APM_SYS_STANDBY: + case APM_USER_STANDBY: + as->standbys_read++; + break; + } + buf += sizeof(event); + i -= sizeof(event); + } + if (i < count) + return count - i; + if (signal_pending(current)) + return -ERESTARTSYS; + return 0; +} + +static unsigned int do_poll(struct file *fp, poll_table * wait) +{ + struct apm_bios_struct * as; + + as = fp->private_data; + if (check_apm_bios_struct(as, "select")) + return 0; + poll_wait(fp, &process_list, wait); + if (!queue_empty(as)) + return POLLIN | POLLRDNORM; + return 0; +} + +static int do_ioctl(struct inode * inode, struct file *filp, + u_int cmd, u_long arg) +{ + struct apm_bios_struct * as; + + as = filp->private_data; + if (check_apm_bios_struct(as, "ioctl")) + return -EIO; + if (!as->suser) + return -EPERM; + switch (cmd) { + case APM_IOC_STANDBY: + if (as->standbys_read > 0) { + as->standbys_read--; + as->standbys_pending--; + standbys_pending--; + } + else + send_event(APM_USER_STANDBY, APM_STANDBY_RESUME, as); + if (standbys_pending <= 0) + standby(); + break; + case APM_IOC_SUSPEND: + if (as->suspends_read > 0) { + as->suspends_read--; + as->suspends_pending--; + suspends_pending--; + } + else + send_event(APM_USER_SUSPEND, APM_NORMAL_RESUME, as); + if (suspends_pending <= 0) + suspend(); + break; + default: + return -EINVAL; + } + return 0; +} + +static int do_release(struct inode * inode, struct file * filp) +{ + struct apm_bios_struct * as; + + as = filp->private_data; + filp->private_data = NULL; + if (check_apm_bios_struct(as, "release")) + return 0; + if (as->standbys_pending > 0) { + standbys_pending -= as->standbys_pending; + if (standbys_pending <= 0) + standby(); + } + if (as->suspends_pending > 0) { + suspends_pending -= as->suspends_pending; + if (suspends_pending <= 0) + suspend(); + } + if (user_list == as) + user_list = as->next; + else { + struct apm_bios_struct * as1; + + for (as1 = user_list; + (as1 != NULL) && (as1->next != as); + as1 = as1->next) + ; + if (as1 == NULL) + printk(KERN_ERR "apm: filp not in user list"); + else + as1->next = as->next; + } + kfree_s(as, sizeof(*as)); + return 0; +} + +static int do_open(struct inode * inode, struct file * filp) +{ + struct apm_bios_struct * as; + + as = (struct apm_bios_struct *)kmalloc(sizeof(*as), GFP_KERNEL); + if (as == NULL) { + printk(KERN_ERR "apm: cannot allocate struct of size %d bytes", + sizeof(*as)); + return -ENOMEM; + } + as->magic = APM_BIOS_MAGIC; + as->event_tail = as->event_head = 0; + as->suspends_pending = as->standbys_pending = 0; + as->suspends_read = as->standbys_read = 0; + /* + * XXX - this is a tiny bit broken, when we consider BSD + * process accounting. If the device is opened by root, we + * instantly flag that we used superuser privs. Who knows, + * we might close the device immediately without doing a + * privileged operation -- cevans + */ + as->suser = capable(CAP_SYS_ADMIN); + as->next = user_list; + user_list = as; + filp->private_data = as; + return 0; +} + +#ifdef CONFIG_PROC_FS +int apm_get_info(char *buf, char **start, off_t fpos, int length, int dummy) +{ + char * p; + unsigned short bx; + unsigned short cx; + unsigned short dx; + unsigned short error; + unsigned short ac_line_status = 0xff; + unsigned short battery_status = 0xff; + unsigned short battery_flag = 0xff; + int percentage = -1; + int time_units = -1; + char *units = "?"; + + if (!apm_enabled) + return 0; + p = buf; + + if (!(error = apm_get_power_status(&bx, &cx, &dx))) { + ac_line_status = (bx >> 8) & 0xff; + battery_status = bx & 0xff; + if ((cx & 0xff) != 0xff) + percentage = cx & 0xff; + + if (apm_bios_info.version > 0x100) { + battery_flag = (cx >> 8) & 0xff; + if (dx != 0xffff) { + if ((dx & 0x8000) == 0x8000) { + units = "min"; + time_units = dx & 0x7ffe; + } else { + units = "sec"; + time_units = dx & 0x7fff; + } + } + } + } + /* Arguments, with symbols from linux/apm_bios.h. Information is + from the Get Power Status (0x0a) call unless otherwise noted. + + 0) Linux driver version (this will change if format changes) + 1) APM BIOS Version. Usually 1.0 or 1.1. + 2) APM flags from APM Installation Check (0x00): + bit 0: APM_16_BIT_SUPPORT + bit 1: APM_32_BIT_SUPPORT + bit 2: APM_IDLE_SLOWS_CLOCK + bit 3: APM_BIOS_DISABLED + bit 4: APM_BIOS_DISENGAGED + 3) AC line status + 0x00: Off-line + 0x01: On-line + 0x02: On backup power (APM BIOS 1.1 only) + 0xff: Unknown + 4) Battery status + 0x00: High + 0x01: Low + 0x02: Critical + 0x03: Charging + 0xff: Unknown + 5) Battery flag + bit 0: High + bit 1: Low + bit 2: Critical + bit 3: Charging + bit 7: No system battery + 0xff: Unknown + 6) Remaining battery life (percentage of charge): + 0-100: valid + -1: Unknown + 7) Remaining battery life (time units): + Number of remaining minutes or seconds + -1: Unknown + 8) min = minutes; sec = seconds */ + + p += sprintf(p, "%s %d.%d 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n", + driver_version, + (apm_bios_info.version >> 8) & 0xff, + apm_bios_info.version & 0xff, + apm_bios_info.flags, + ac_line_status, + battery_status, + battery_flag, + percentage, + time_units, + units); + + return p - buf; +} +#endif + +void __init apm_setup(char *str, int *dummy) +{ + int invert; + + while ((str != NULL) && (*str != '\0')) { + if (strncmp(str, "off", 3) == 0) + apm_disabled = 1; + if (strncmp(str, "on", 2) == 0) + apm_disabled = 0; + invert = (strncmp(str, "no-", 3) == 0); + if (invert) + str += 3; + if (strncmp(str, "debug", 5) == 0) + debug = !invert; + str = strchr(str, ','); + if (str != NULL) + str += strspn(str, ", \t"); + } +} + +void __init apm_bios_init(void) +{ + unsigned short bx; + unsigned short cx; + unsigned short dx; + unsigned short error; + char * power_stat; + char * bat_stat; + static struct proc_dir_entry *ent; + + if (apm_bios_info.version == 0) { + printk(KERN_INFO "apm: BIOS not found.\n"); + return; + } + printk(KERN_INFO + "apm: BIOS version %d.%d Flags 0x%02x (Driver version %s)\n", + ((apm_bios_info.version >> 8) & 0xff), + (apm_bios_info.version & 0xff), + apm_bios_info.flags, + driver_version); + if ((apm_bios_info.flags & APM_32_BIT_SUPPORT) == 0) { + printk(KERN_INFO "apm: no 32 bit BIOS support\n"); + return; + } + + /* + * Fix for the Compaq Contura 3/25c which reports BIOS version 0.1 + * but is reportedly a 1.0 BIOS. + */ + if (apm_bios_info.version == 0x001) + apm_bios_info.version = 0x100; + + /* BIOS < 1.2 doesn't set cseg_16_len */ + if (apm_bios_info.version < 0x102) + apm_bios_info.cseg_16_len = 0xFFFF; /* 64k */ + + if (debug) { + printk(KERN_INFO "apm: entry %x:%lx cseg16 %x dseg %x", + apm_bios_info.cseg, apm_bios_info.offset, + apm_bios_info.cseg_16, apm_bios_info.dseg); + if (apm_bios_info.version > 0x100) + printk(" cseg len %x, cseg16 len %x, dseg len %x", + apm_bios_info.cseg_len, + apm_bios_info.cseg_16_len, + apm_bios_info.dseg_len); + printk("\n"); + } + + if (apm_disabled) { + printk(KERN_NOTICE "apm: disabled on user request.\n"); + return; + } +#ifdef __SMP__ + if (smp_num_cpus > 1) { + printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n"); + return; + } +#endif + + /* + * Set up a segment that references the real mode segment 0x40 + * that extends up to the end of page zero (that we have reserved). + * This is for buggy BIOS's that refer to (real mode) segment 0x40 + * even though they are called in protected mode. + */ + set_base(gdt[APM_40 >> 3], + __va((unsigned long)0x40 << 4)); + set_limit(gdt[APM_40 >> 3], 4096 - (0x40 << 4)); + + apm_bios_entry.offset = apm_bios_info.offset; + apm_bios_entry.segment = APM_CS; + set_base(gdt[APM_CS >> 3], + __va((unsigned long)apm_bios_info.cseg << 4)); + set_base(gdt[APM_CS_16 >> 3], + __va((unsigned long)apm_bios_info.cseg_16 << 4)); + set_base(gdt[APM_DS >> 3], + __va((unsigned long)apm_bios_info.dseg << 4)); + if (apm_bios_info.version == 0x100) { + set_limit(gdt[APM_CS >> 3], 64 * 1024); + set_limit(gdt[APM_CS_16 >> 3], 64 * 1024); + set_limit(gdt[APM_DS >> 3], 64 * 1024); + } else { +#ifdef APM_RELAX_SEGMENTS + /* For ASUS motherboard, Award BIOS rev 110 (and others?) */ + set_limit(gdt[APM_CS >> 3], 64 * 1024); + /* For some unknown machine. */ + set_limit(gdt[APM_CS_16 >> 3], 64 * 1024); + /* For the DEC Hinote Ultra CT475 (and others?) */ + set_limit(gdt[APM_DS >> 3], 64 * 1024); +#else + set_limit(gdt[APM_CS >> 3], apm_bios_info.cseg_len); + set_limit(gdt[APM_CS_16 >> 3], apm_bios_info.cseg_16_len); + set_limit(gdt[APM_DS >> 3], apm_bios_info.dseg_len); +#endif + /* + * We only support BIOSs up to version 1.2 + */ + if (apm_bios_info.version > 0x0102) + apm_bios_info.version = 0x0102; + if (apm_driver_version(&apm_bios_info.version) != APM_SUCCESS) { + /* Fall back to an APM 1.0 connection. */ + apm_bios_info.version = 0x100; + } + } + if (debug) { + printk(KERN_INFO "apm: onnection version %d.%d\n", + (apm_bios_info.version >> 8) & 0xff, + apm_bios_info.version & 0xff ); + + error = apm_get_power_status(&bx, &cx, &dx); + if (error) + printk(KERN_INFO "apm: power status not available\n"); + else { + switch ((bx >> 8) & 0xff) { + case 0: power_stat = "off line"; break; + case 1: power_stat = "on line"; break; + case 2: power_stat = "on backup power"; break; + default: power_stat = "unknown"; break; + } + switch (bx & 0xff) { + case 0: bat_stat = "high"; break; + case 1: bat_stat = "low"; break; + case 2: bat_stat = "critical"; break; + case 3: bat_stat = "charging"; break; + default: bat_stat = "unknown"; break; + } + printk(KERN_INFO "apm: AC %s, battery status %s, battery life ", + power_stat, bat_stat); + if ((cx & 0xff) == 0xff) + printk("unknown\n"); + else + printk("%d%%\n", cx & 0xff); + if (apm_bios_info.version > 0x100) { + printk("apm: battery flag 0x%02x, battery life ", + (cx >> 8) & 0xff); + if (dx == 0xffff) + printk("unknown\n"); + else { + if ((dx & 0x8000)) + printk("%d minutes\n", dx & 0x7ffe ); + else + printk("%d seconds\n", dx & 0x7fff ); + } + } + } + } + +#ifdef CONFIG_APM_DO_ENABLE + if (apm_bios_info.flags & APM_BIOS_DISABLED) { + /* + * This call causes my NEC UltraLite Versa 33/C to hang if it + * is booted with PM disabled but not in the docking station. + * Unfortunate ... + */ + error = apm_enable_power_management(); + if (error) { + apm_error("enable power management", error); + return; + } + } +#endif + if (((apm_bios_info.flags & APM_BIOS_DISABLED) == 0) + && (apm_bios_info.version > 0x0100)) { + if (apm_engage_power_management(0x0001) == APM_SUCCESS) + apm_bios_info.flags &= ~APM_BIOS_DISENGAGED; + } + + init_timer(&apm_timer); + apm_timer.function = do_apm_timer; + apm_timer.expires = APM_CHECK_TIMEOUT + jiffies; + add_timer(&apm_timer); + +#ifdef CONFIG_PROC_FS + ent = create_proc_entry("apm", 0, 0); + ent->get_info = apm_get_info; +#endif + + misc_register(&apm_device); + + apm_enabled = 1; +} diff --git a/arch/i386/kernel/bios32.c b/arch/i386/kernel/bios32.c index 31049ec2a..9543fc7ba 100644 --- a/arch/i386/kernel/bios32.c +++ b/arch/i386/kernel/bios32.c @@ -1,7 +1,7 @@ /* * bios32.c - Low-Level PCI Access * - * $Id: bios32.c,v 1.45 1998/08/15 10:41:04 mj Exp $ + * $Id: bios32.c,v 1.48 1998/09/26 08:06:55 mj Exp $ * * Copyright 1993, 1994 Drew Eckhardt * Visionary Computing @@ -170,6 +170,7 @@ PCI_STUB(write, dword, u32) #define PCI_PROBE_CONF2 4 #define PCI_NO_SORT 0x100 #define PCI_BIOS_SORT 0x200 +#define PCI_NO_CHECKS 0x400 static unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2; @@ -343,14 +344,21 @@ static struct pci_access pci_direct_conf2 = { * whether bus 00 contains a host bridge (this is similar to checking * techniques used in XFree86, but ours should be more reliable since we * attempt to make use of direct access hints provided by the PCI BIOS). + * + * This should be close to trivial, but it isn't, because there are buggy + * chipsets (yes, you guessed it, by Intel and Compaq) that have no class ID. */ __initfunc(int pci_sanity_check(struct pci_access *a)) { - u16 dfn, class; + u16 dfn, x; + if (pci_probe & PCI_NO_CHECKS) + return 1; for(dfn=0; dfn < 0x100; dfn++) - if (!a->read_config_word(0, dfn, PCI_CLASS_DEVICE, &class) && - class == PCI_CLASS_BRIDGE_HOST) + if ((!a->read_config_word(0, dfn, PCI_CLASS_DEVICE, &x) && + (x == PCI_CLASS_BRIDGE_HOST || x == PCI_CLASS_DISPLAY_VGA)) || + (!a->read_config_word(0, dfn, PCI_VENDOR_ID, &x) && + (x == PCI_VENDOR_ID_INTEL || x == PCI_VENDOR_ID_COMPAQ))) return 1; DBG("PCI: Sanity check failed\n"); return 0; @@ -945,7 +953,7 @@ __initfunc(void pcibios_fixup_ghosts(struct pci_bus *b)) __initfunc(void pcibios_fixup_peer_bridges(void)) { struct pci_bus *b = &pci_root; - int i, cnt=-1; + int i, n, cnt=-1; struct pci_dev *d; #ifdef CONFIG_PCI_DIRECT @@ -960,8 +968,8 @@ __initfunc(void pcibios_fixup_peer_bridges(void)) for(d=b->devices; d; d=d->sibling) if ((d->class >> 8) == PCI_CLASS_BRIDGE_HOST) cnt++; - do { - int n = b->subordinate+1; + n = b->subordinate + 1; + while (n <= 0xff) { int found = 0; u16 l; for(i=0; i<256; i += 8) @@ -973,8 +981,9 @@ __initfunc(void pcibios_fixup_peer_bridges(void)) l == PCI_CLASS_BRIDGE_HOST) cnt++; } - if (found && cnt > 0) { - cnt--; + if (cnt-- <= 0) + break; + if (found) { printk("PCI: Discovered primary peer bus %02x\n", n); b = kmalloc(sizeof(*b), GFP_KERNEL); memset(b, 0, sizeof(*b)); @@ -983,9 +992,10 @@ __initfunc(void pcibios_fixup_peer_bridges(void)) b->number = b->secondary = n; b->subordinate = 0xff; b->subordinate = pci_scan_bus(b); - break; + n = b->subordinate; } - } while (i < 256); + n++; + } } /* @@ -1053,6 +1063,16 @@ __initfunc(void pcibios_fixup_devices(void)) if (pin) { pin--; /* interrupt pins are numbered starting from 1 */ irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin); + if (irq < 0 && dev->bus->parent) { /* go back to the bridge */ + struct pci_dev * bridge = dev->bus->self; + + pin = (pin + PCI_SLOT(dev->devfn)) % 4; + irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, + PCI_SLOT(bridge->devfn), pin); + if (irq >= 0) + printk(KERN_WARNING "PCI: using PPB(B%d,I%d,P%d) to get irq %d\n", + bridge->bus->number, PCI_SLOT(bridge->devfn), pin, irq); + } if (irq >= 0) { printk("PCI->APIC IRQ transform: (B%d,I%d,P%d) -> %d\n", dev->bus->number, PCI_SLOT(dev->devfn), pin, irq); @@ -1146,11 +1166,11 @@ __initfunc(char *pcibios_setup(char *str)) #endif #ifdef CONFIG_PCI_DIRECT else if (!strcmp(str, "conf1")) { - pci_probe = PCI_PROBE_CONF1; + pci_probe = PCI_PROBE_CONF1 | PCI_NO_CHECKS; return NULL; } else if (!strcmp(str, "conf2")) { - pci_probe = PCI_PROBE_CONF2; + pci_probe = PCI_PROBE_CONF2 | PCI_NO_CHECKS; return NULL; } #endif diff --git a/arch/i386/kernel/desc.h b/arch/i386/kernel/desc.h deleted file mode 100644 index e91580e04..000000000 --- a/arch/i386/kernel/desc.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef __ARCH_DESC_H -#define __ARCH_DESC_H - -struct desc_struct { - unsigned long a,b; -}; - -extern struct desc_struct gdt_table[]; -extern struct desc_struct *idt, *gdt; - -struct Xgt_desc_struct { - unsigned short size; - unsigned long address __attribute__((packed)); -}; - -#define idt_descr (*(struct Xgt_desc_struct *)((char *)&idt - 2)) -#define gdt_descr (*(struct Xgt_desc_struct *)((char *)&gdt - 2)) - -/* - * Entry into gdt where to find first TSS. GDT layout: - * 0 - null - * 1 - not used - * 2 - kernel code segment - * 3 - kernel data segment - * 4 - user code segment - * 5 - user data segment - * 6 - not used - * 7 - not used - * 8 - APM BIOS support - * 9 - APM BIOS support - * 10 - APM BIOS support - * 11 - APM BIOS support - * 12 - TSS #0 - * 13 - LDT #0 - * 14 - TSS #1 - * 15 - LDT #1 - */ -#define FIRST_TSS_ENTRY 12 -#define FIRST_LDT_ENTRY (FIRST_TSS_ENTRY+1) -#define _TSS(n) ((((unsigned long) n)<<4)+(FIRST_TSS_ENTRY<<3)) -#define _LDT(n) ((((unsigned long) n)<<4)+(FIRST_LDT_ENTRY<<3)) -#define load_TR(n) __asm__ __volatile__("ltr %%ax": /* no output */ :"a" (_TSS(n))) -#define load_ldt(n) __asm__ __volatile__("lldt %%ax": /* no output */ :"a" (_LDT(n))) -#define store_TR(n) \ -__asm__("str %%ax\n\t" \ - "subl %2,%%eax\n\t" \ - "shrl $4,%%eax" \ - :"=a" (n) \ - :"0" (0),"i" (FIRST_TSS_ENTRY<<3)) - -extern void set_intr_gate(unsigned int irq, void * addr); -extern void set_ldt_desc(unsigned int n, void *addr, unsigned int size); -extern void set_tss_desc(unsigned int n, void *addr); - -/* - * This is the ldt that every process will get unless we need - * something other than this. - */ -extern struct desc_struct default_ldt; - -#endif diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 0261ae24b..390c10c1f 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -107,12 +107,16 @@ ENOSYS = 38 2: popl %es; \ addl $4,%esp; \ 3: iret; \ -.section fixup,"ax"; \ +.section .fixup,"ax"; \ 4: movl $0,(%esp); \ jmp 1b; \ 5: movl $0,(%esp); \ jmp 2b; \ -6: pushl $11; \ +6: pushl %ss; \ + popl %ds; \ + pushl %ss; \ + popl %es; \ + pushl $11; \ call do_exit; \ .previous; \ .section __ex_table,"a";\ @@ -146,14 +150,14 @@ ENTRY(lcall7) jmp ret_from_sys_call -#ifdef __SMP__ ALIGN - .globl ret_from_smpfork -ret_from_smpfork: + .globl ret_from_fork +ret_from_fork: GET_CURRENT(%ebx) +#ifdef __SMP__ btrl $0, SYMBOL_NAME(scheduler_lock) - jmp ret_from_sys_call #endif /* __SMP__ */ + jmp ret_from_sys_call /* * Return to user mode is not as complex as all this looks, @@ -184,25 +188,26 @@ ret_with_reschedule: jne reschedule cmpl $0,sigpending(%ebx) jne signal_return +restore_all: RESTORE_ALL + ALIGN signal_return: testl $(VM_MASK),EFLAGS(%esp) - pushl %esp + movl %esp,%eax jne v86_signal_return - pushl $0 + xorl %edx,%edx call SYMBOL_NAME(do_signal) - addl $8,%esp - RESTORE_ALL + jmp restore_all + ALIGN v86_signal_return: call SYMBOL_NAME(save_v86_state) movl %eax,%esp - pushl %eax - pushl $0 + xorl %edx,%edx call SYMBOL_NAME(do_signal) - addl $8,%esp - RESTORE_ALL + jmp restore_all + ALIGN tracesys: movl $-ENOSYS,EAX(%esp) @@ -228,18 +233,17 @@ ret_from_intr: movb CS(%esp),%al testl $(VM_MASK | 3),%eax # return to VM86 mode or non-supervisor? jne ret_with_reschedule - RESTORE_ALL + jmp restore_all ALIGN handle_bottom_half: - pushl $ret_from_intr - jmp SYMBOL_NAME(do_bottom_half) + call SYMBOL_NAME(do_bottom_half) + jmp ret_from_intr ALIGN reschedule: - pushl $ret_from_sys_call - jmp SYMBOL_NAME(schedule) # test - + call SYMBOL_NAME(schedule) # test + jmp ret_from_sys_call ENTRY(divide_error) pushl $0 # no error code diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c index 6d11e2121..e1833f43c 100644 --- a/arch/i386/kernel/i386_ksyms.c +++ b/arch/i386/kernel/i386_ksyms.c @@ -39,6 +39,7 @@ EXPORT_SYMBOL(local_bh_count); EXPORT_SYMBOL(local_irq_count); EXPORT_SYMBOL(enable_irq); EXPORT_SYMBOL(disable_irq); +EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL_NOVERS(__down_failed); EXPORT_SYMBOL_NOVERS(__down_failed_interruptible); @@ -98,6 +99,9 @@ EXPORT_SYMBOL(mca_get_adapter_name); EXPORT_SYMBOL(mca_set_adapter_procfn); EXPORT_SYMBOL(mca_isenabled); EXPORT_SYMBOL(mca_isadapter); +EXPORT_SYMBOL(mca_mark_as_used); +EXPORT_SYMBOL(mca_mark_as_unused); +EXPORT_SYMBOL(mca_find_unused_adapter); #endif #ifdef CONFIG_VT diff --git a/arch/i386/kernel/init_task.c b/arch/i386/kernel/init_task.c index 4381719ae..d3b395732 100644 --- a/arch/i386/kernel/init_task.c +++ b/arch/i386/kernel/init_task.c @@ -3,8 +3,7 @@ #include <asm/uaccess.h> #include <asm/pgtable.h> - -#include "desc.h" +#include <asm/desc.h> static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index e2e107c9e..fa8ef26bb 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -103,8 +103,10 @@ int mpc_default_type = 0; /* non-0 if default (table-less) /* * This is performance-critical, we want to do it O(1) + * + * the indexing order of this array favors 1:1 mappings + * between pins and IRQs. */ -static int irq_2_pin[NR_IRQS]; static inline unsigned int io_apic_read(unsigned int reg) { @@ -119,6 +121,15 @@ static inline void io_apic_write(unsigned int reg, unsigned int value) } /* + * Re-write a value: to be used for read-modify-write + * cycles where the read already set up the index register. + */ +static inline void io_apic_modify(unsigned int value) +{ + *(IO_APIC_BASE+4) = value; +} + +/* * Synchronize the IO-APIC and the CPU by doing * a dummy read from the IO-APIC */ @@ -128,59 +139,69 @@ static inline void io_apic_sync(void) } /* - * We disable IO-APIC IRQs by setting their 'destination CPU mask' to - * zero. Trick, trick. + * Rough estimation of how many shared IRQs there are, can + * be changed anytime. */ -static inline void disable_IO_APIC_irq(unsigned int irq) -{ - int pin = irq_2_pin[irq]; - struct IO_APIC_route_entry entry; +#define MAX_PLUS_SHARED_IRQS NR_IRQS +#define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + NR_IRQS) - if (pin != -1) { - *(((int *)&entry) + 1) = io_apic_read(0x11 + pin * 2); - entry.dest.logical.logical_dest = 0x0; - io_apic_write(0x11 + 2 * pin, *(((int *)&entry) + 1)); - io_apic_sync(); - } -} +static struct irq_pin_list { + int pin, next; +} irq_2_pin[PIN_MAP_SIZE]; -static inline void enable_IO_APIC_irq(unsigned int irq) +/* + * The common case is 1:1 IRQ<->pin mappings. Sometimes there are + * shared ISA-space IRQs, so we have to support them. We are super + * fast in the common case, and fast for shared ISA-space IRQs. + */ +static void add_pin_to_irq(unsigned int irq, int pin) { - int pin = irq_2_pin[irq]; - struct IO_APIC_route_entry entry; - - if (pin != -1) { - *(((int *)&entry) + 1) = io_apic_read(0x11 + pin * 2); - entry.dest.logical.logical_dest = 0xff; - io_apic_write(0x11 + 2 * pin, *(((int *)&entry) + 1)); - } -} + static int first_free_entry = NR_IRQS; + struct irq_pin_list *entry = irq_2_pin + irq; -static inline void mask_IO_APIC_irq(unsigned int irq) -{ - int pin = irq_2_pin[irq]; - struct IO_APIC_route_entry entry; + while (entry->next) + entry = irq_2_pin + entry->next; - if (pin != -1) { - *(((int *)&entry) + 0) = io_apic_read(0x10 + pin * 2); - entry.mask = 1; - io_apic_write(0x10 + 2 * pin, *(((int *)&entry) + 0)); - io_apic_sync(); + if (entry->pin != -1) { + entry->next = first_free_entry; + entry = irq_2_pin + entry->next; + if (++first_free_entry >= PIN_MAP_SIZE) + panic("io_apic.c: whoops"); } + entry->pin = pin; } -static inline void unmask_IO_APIC_irq(unsigned int irq) -{ - int pin = irq_2_pin[irq]; - struct IO_APIC_route_entry entry; - - if (pin != -1) { - *(((int *)&entry) + 0) = io_apic_read(0x10 + pin * 2); - entry.mask = 0; - io_apic_write(0x10 + 2 * pin, *(((int *)&entry) + 0)); - } +#define DO_ACTION(name,R,ACTION, FINAL) \ + \ +static void name##_IO_APIC_irq(unsigned int irq) \ +{ \ + int pin; \ + struct irq_pin_list *entry = irq_2_pin + irq; \ + \ + for (;;) { \ + unsigned int reg; \ + pin = entry->pin; \ + if (pin == -1) \ + break; \ + reg = io_apic_read(0x10 + R + pin*2); \ + reg ACTION; \ + io_apic_modify(reg); \ + if (!entry->next) \ + break; \ + entry = irq_2_pin + entry->next; \ + } \ + FINAL; \ } +/* + * We disable IO-APIC IRQs by setting their 'destination CPU mask' to + * zero. Trick by Ramesh Nalluri. + */ +DO_ACTION( disable, 1, &= 0x00ffffff, io_apic_sync()) /* destination = 0x00 */ +DO_ACTION( enable, 1, |= 0xff000000, ) /* destination = 0xff */ +DO_ACTION( mask, 0, |= 0x00010000, io_apic_sync()) /* mask = 1 */ +DO_ACTION( unmask, 0, &= 0xfffeffff, ) /* mask = 0 */ + static void __init clear_IO_APIC_pin(unsigned int pin) { struct IO_APIC_route_entry entry; @@ -291,12 +312,40 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pci_pin) } /* - * There are broken mptables which register ISA+high-active+level IRQs, - * these are illegal and are converted here to ISA+high-active+edge - * IRQ sources. Careful, ISA+low-active+level is another broken entry - * type, it represents PCI IRQs 'embedded into an ISA bus', they have - * to be accepted. Yes, ugh. + * Unclear documentation on what a "conforming ISA interrupt" means. + * + * Should we, or should we not, take the ELCR register into account? + * It's part of the EISA specification, but maybe it should only be + * used if the interrupt is actually marked as EISA? + * + * Oh, well. Don't do it until somebody tells us what the right thing + * to do is.. + */ +#undef USE_ELCR_TRIGGER_LEVEL +#ifdef USE_ELCR_TRIGGER_LEVEL + +/* + * ISA Edge/Level control register, ELCR */ +static int __init EISA_ELCR(unsigned int irq) +{ + if (irq < 16) { + unsigned int port = 0x4d0 + (irq >> 3); + return (inb(port) >> (irq & 7)) & 1; + } + printk("Broken MPtable reports ISA irq %d\n", irq); + return 0; +} + +#define default_ISA_trigger(idx) (EISA_ELCR(mp_irqs[idx].mpc_dstirq)) +#define default_ISA_polarity(idx) (0) + +#else + +#define default_ISA_trigger(idx) (0) +#define default_ISA_polarity(idx) (0) + +#endif static int __init MPBIOS_polarity(int idx) { @@ -314,7 +363,7 @@ static int __init MPBIOS_polarity(int idx) { case MP_BUS_ISA: /* ISA pin */ { - polarity = 0; + polarity = default_ISA_polarity(idx); break; } case MP_BUS_PCI: /* PCI pin */ @@ -371,9 +420,9 @@ static int __init MPBIOS_trigger(int idx) { switch (mp_bus_id_to_type[bus]) { - case MP_BUS_ISA: /* ISA pin, edge */ + case MP_BUS_ISA: { - trigger = 0; + trigger = default_ISA_trigger(idx); break; } case MP_BUS_PCI: /* PCI pin, level */ @@ -416,36 +465,14 @@ static int __init MPBIOS_trigger(int idx) return trigger; } -static int __init trigger_flag_broken(int idx) -{ - int bus = mp_irqs[idx].mpc_srcbus; - int polarity = MPBIOS_polarity(idx); - int trigger = MPBIOS_trigger(idx); - - if ( (mp_bus_id_to_type[bus] == MP_BUS_ISA) && - (polarity == 0) /* active-high */ && - (trigger == 1) /* level */ ) - - return 1; /* broken */ - - return 0; -} - static inline int irq_polarity(int idx) { - /* - * There are no known BIOS bugs wrt polarity. yet. - */ return MPBIOS_polarity(idx); } static inline int irq_trigger(int idx) { - int trigger = MPBIOS_trigger(idx); - - if (trigger_flag_broken(idx)) - trigger = 0; - return trigger; + return MPBIOS_trigger(idx); } static int __init pin_2_irq(int idx, int pin) @@ -549,7 +576,7 @@ void __init setup_IO_APIC_irqs(void) entry.delivery_mode = dest_LowestPrio; entry.dest_mode = 1; /* logical delivery */ entry.mask = 0; /* enable IRQ */ - entry.dest.logical.logical_dest = 0xff; /* all CPUs */ + entry.dest.logical.logical_dest = 0; /* but no route */ idx = find_irq_entry(pin,mp_INT); if (idx == -1) { @@ -564,8 +591,14 @@ void __init setup_IO_APIC_irqs(void) entry.trigger = irq_trigger(idx); entry.polarity = irq_polarity(idx); + if (irq_trigger(idx)) { + entry.trigger = 1; + entry.mask = 1; + entry.dest.logical.logical_dest = 0xff; + } + irq = pin_2_irq(idx,pin); - irq_2_pin[irq] = pin; + add_pin_to_irq(irq, pin); if (!IO_APIC_IRQ(irq)) continue; @@ -574,40 +607,14 @@ void __init setup_IO_APIC_irqs(void) bus = mp_irqs[idx].mpc_srcbus; - if (trigger_flag_broken (idx)) - printk("broken BIOS, changing pin %d to edge\n", pin); - - io_apic_write(0x10+2*pin, *(((int *)&entry)+0)); io_apic_write(0x11+2*pin, *(((int *)&entry)+1)); + io_apic_write(0x10+2*pin, *(((int *)&entry)+0)); } if (!first_notcon) printk(" not connected.\n"); } -void __init setup_IO_APIC_irq_ISA_default(unsigned int irq) -{ - struct IO_APIC_route_entry entry; - - /* - * add it to the IO-APIC irq-routing table: - */ - memset(&entry,0,sizeof(entry)); - - entry.delivery_mode = dest_LowestPrio; /* lowest prio */ - entry.dest_mode = 1; /* logical delivery */ - entry.mask = 0; /* unmask IRQ now */ - entry.dest.logical.logical_dest = 0xff; /* all CPUs */ - - entry.vector = assign_irq_vector(irq); - - entry.polarity = 0; - entry.trigger = 0; - - io_apic_write(0x10+2*irq, *(((int *)&entry)+0)); - io_apic_write(0x11+2*irq, *(((int *)&entry)+1)); -} - /* * Set up a certain pin as ExtINT delivered interrupt */ @@ -623,7 +630,7 @@ void __init setup_ExtINT_pin(unsigned int pin) entry.delivery_mode = dest_ExtINT; entry.dest_mode = 1; /* logical delivery */ entry.mask = 0; /* unmask IRQ now */ - entry.dest.logical.logical_dest = 0x01; /* all CPUs */ + entry.dest.logical.logical_dest = 0x01; /* logical CPU #0 */ entry.vector = 0; /* it's ignored */ @@ -716,10 +723,20 @@ void __init print_IO_APIC(void) ); } - printk("IRQ to pin mappings:\n"); - for (i = 0; i < NR_IRQS; i++) - printk("%d->%d ", i, irq_2_pin[i]); - printk("\n"); + printk(KERN_DEBUG "IRQ to pin mappings:\n"); + for (i = 0; i < NR_IRQS; i++) { + struct irq_pin_list *entry = irq_2_pin + i; + if (entry->pin < 0) + continue; + printk(KERN_DEBUG "IRQ%d ", i); + for (;;) { + printk("-> %d", entry->pin); + if (!entry->next) + break; + entry = irq_2_pin + entry->next; + } + printk("\n"); + } printk(".................................... done.\n"); @@ -730,8 +747,10 @@ static void __init init_sym_mode(void) { int i, pin; - for (i = 0; i < NR_IRQS; i++) - irq_2_pin[i] = -1; + for (i = 0; i < PIN_MAP_SIZE; i++) { + irq_2_pin[i].pin = -1; + irq_2_pin[i].next = 0; + } if (!pirqs_enabled) for (i = 0; i < MAX_PIRQS; i++) pirq_entries[i] =- 1; @@ -862,9 +881,9 @@ static void __init construct_default_ISA_mptable(void) if (!IO_APIC_IRQ(i)) continue; - mp_irqs[pos].mpc_irqtype = 0; - mp_irqs[pos].mpc_irqflag = 0; - mp_irqs[pos].mpc_srcbus = 0; + mp_irqs[pos].mpc_irqtype = mp_INT; + mp_irqs[pos].mpc_irqflag = 0; /* default */ + mp_irqs[pos].mpc_srcbus = MP_BUS_ISA; mp_irqs[pos].mpc_srcbusirq = i; mp_irqs[pos].mpc_dstapic = 0; mp_irqs[pos].mpc_dstirq = i; @@ -905,7 +924,7 @@ static int __init timer_irq_works(void) unsigned int t1 = jiffies; sti(); - udelay(10*10000); + mdelay(100); if (jiffies-t1>1) return 1; @@ -947,18 +966,37 @@ static void disable_edge_ioapic_irq(unsigned int irq) } /* - * Level triggered interrupts can just be masked. + * Starting up a edge-triggered IO-APIC interrupt is + * nasty - we need to make sure that we get the edge. + * If it is already asserted for some reason, we need + * to fake an edge by marking it IRQ_PENDING.. + * + * This is not complete - we should be able to fake + * an edge even if it isn't on the 8259A... */ -static void enable_level_ioapic_irq(unsigned int irq) -{ - unmask_IO_APIC_irq(irq); -} -static void disable_level_ioapic_irq(unsigned int irq) +static void startup_edge_ioapic_irq(unsigned int irq) { - mask_IO_APIC_irq(irq); + if (irq < 16) { + disable_8259A_irq(irq); + if (i8259A_irq_pending(irq)) + irq_desc[irq].status |= IRQ_PENDING; + } + enable_edge_ioapic_irq(irq); } +#define shutdown_edge_ioapic_irq disable_edge_ioapic_irq + +/* + * Level triggered interrupts can just be masked, + * and shutting down and starting up the interrupt + * is the same as enabling and disabling them. + */ +#define startup_level_ioapic_irq unmask_IO_APIC_irq +#define shutdown_level_ioapic_irq mask_IO_APIC_irq +#define enable_level_ioapic_irq unmask_IO_APIC_irq +#define disable_level_ioapic_irq mask_IO_APIC_irq + static void do_edge_ioapic_IRQ(unsigned int irq, struct pt_regs * regs) { irq_desc_t *desc = irq_desc + irq; @@ -1065,6 +1103,8 @@ static void do_level_ioapic_IRQ(unsigned int irq, struct pt_regs * regs) static struct hw_interrupt_type ioapic_edge_irq_type = { "IO-APIC-edge", + startup_edge_ioapic_irq, + shutdown_edge_ioapic_irq, do_edge_ioapic_IRQ, enable_edge_ioapic_irq, disable_edge_ioapic_irq @@ -1072,6 +1112,8 @@ static struct hw_interrupt_type ioapic_edge_irq_type = { static struct hw_interrupt_type ioapic_level_irq_type = { "IO-APIC-level", + startup_level_ioapic_irq, + shutdown_level_ioapic_irq, do_level_ioapic_IRQ, enable_level_ioapic_irq, disable_level_ioapic_irq @@ -1118,8 +1160,9 @@ static inline void check_timer(void) pin1 = find_timer_pin(mp_INT); pin2 = find_timer_pin(mp_ExtINT); - + enable_IO_APIC_irq(0); if (!timer_irq_works()) { + if (pin1 != -1) printk("..MP-BIOS bug: 8254 timer not connected to IO-APIC\n"); printk("...trying to set up timer as ExtINT... "); @@ -1162,20 +1205,11 @@ static inline void check_timer(void) * directly from the FPU to the old PIC. Linux doesn't * really care, because Linux doesn't want to use IRQ13 * anyway (exception 16 is the proper FPU error signal) - * - IRQ9 is broken on PIIX4 motherboards: - * - * "IRQ9 cannot be re-assigned" * - * IRQ9 is not available to assign to - * ISA add-in cards because it is - * dedicated to the power - * management function of the PIIX4 - * controller on the motherboard. - * This is true for other motherboards - * which use the 82371AB PIIX4 - * component. + * Additionally, something is definitely wrong with irq9 + * on PIIX4 boards. */ -#define PIC_IRQS ((1<<2)|(1<<9)|(1<<13)) +#define PIC_IRQS ((1<<2)|(1<<13)) void __init setup_IO_APIC(void) { @@ -1224,7 +1258,6 @@ void __init setup_IO_APIC(void) setup_IO_APIC_irqs(); init_IRQ_SMP(); check_timer(); - + print_IO_APIC(); } - diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index 1baf19aea..e0fd62653 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c @@ -37,9 +37,9 @@ #include <asm/smp.h> #include <asm/pgtable.h> #include <asm/delay.h> +#include <asm/desc.h> #include "irq.h" -#include "desc.h" unsigned int local_bh_count[NR_CPUS]; unsigned int local_irq_count[NR_CPUS]; @@ -84,6 +84,10 @@ static void do_8259A_IRQ(unsigned int irq, struct pt_regs * regs); static void enable_8259A_irq(unsigned int irq); void disable_8259A_irq(unsigned int irq); +/* startup is the same as "enable", shutdown is same as "disable" */ +#define startup_8259A_irq enable_8259A_irq +#define shutdown_8259A_irq disable_8259A_irq + /* * Dummy controller type for unused interrupts */ @@ -91,8 +95,14 @@ static void do_none(unsigned int irq, struct pt_regs * regs) { } static void enable_none(unsigned int irq) { } static void disable_none(unsigned int irq) { } +/* startup is the same as "enable", shutdown is same as "disable" */ +#define startup_none enable_none +#define shutdown_none disable_none + static struct hw_interrupt_type no_irq_type = { "none", + startup_none, + shutdown_none, do_none, enable_none, disable_none @@ -100,6 +110,8 @@ static struct hw_interrupt_type no_irq_type = { static struct hw_interrupt_type i8259A_irq_type = { "XT-PIC", + startup_8259A_irq, + shutdown_8259A_irq, do_8259A_IRQ, enable_8259A_irq, disable_8259A_irq @@ -683,7 +695,8 @@ void disable_irq(unsigned int irq) irq_desc[irq].handler->disable(irq); spin_unlock_irqrestore(&irq_controller_lock, flags); - synchronize_irq(); + if (irq_desc[irq].status & IRQ_INPROGRESS) + synchronize_irq(); } void enable_irq(unsigned int irq) @@ -699,7 +712,7 @@ void enable_irq(unsigned int irq) * install a handler for this interrupt (make irq autodetection * work by just looking at the status field for the irq) */ - irq_desc[irq].status = 0; + irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS); irq_desc[irq].handler->enable(irq); spin_unlock_irqrestore(&irq_controller_lock, flags); } @@ -785,22 +798,8 @@ int setup_x86_irq(unsigned int irq, struct irqaction * new) *p = new; if (!shared) { - irq_desc[irq].status = 0; -#ifdef __SMP__ - if (IO_APIC_IRQ(irq)) { - /* - * If it was on a 8259, disable it there - * and move the "pendingness" onto the - * new irq descriptor. - */ - if (irq < 16) { - disable_8259A_irq(irq); - if (i8259A_irq_pending(irq)) - irq_desc[irq].status = IRQ_PENDING; - } - } -#endif - irq_desc[irq].handler->enable(irq); + irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS); + irq_desc[irq].handler->startup(irq); } spin_unlock_irqrestore(&irq_controller_lock,flags); return 0; @@ -857,7 +856,7 @@ void free_irq(unsigned int irq, void *dev_id) kfree(action); if (!irq_desc[irq].action) { irq_desc[irq].status |= IRQ_DISABLED; - irq_desc[irq].handler->disable(irq); + irq_desc[irq].handler->shutdown(irq); } goto out; } @@ -886,8 +885,8 @@ unsigned long probe_irq_on(void) for (i = NR_IRQS-1; i > 0; i--) { if (!irq_desc[i].action) { unsigned int status = irq_desc[i].status | IRQ_AUTODETECT; - irq_desc[i].status = status & ~(IRQ_INPROGRESS | IRQ_PENDING); - irq_desc[i].handler->enable(i); + irq_desc[i].status = status & ~IRQ_INPROGRESS; + irq_desc[i].handler->startup(i); } } spin_unlock_irq(&irq_controller_lock); @@ -911,7 +910,7 @@ unsigned long probe_irq_on(void) /* It triggered already - consider it spurious. */ if (status & IRQ_INPROGRESS) { irq_desc[i].status = status & ~IRQ_AUTODETECT; - irq_desc[i].handler->disable(i); + irq_desc[i].handler->shutdown(i); } } spin_unlock_irq(&irq_controller_lock); @@ -941,7 +940,7 @@ int probe_irq_off(unsigned long unused) nr_irqs++; } irq_desc[i].status = status & ~IRQ_AUTODETECT; - irq_desc[i].handler->disable(i); + irq_desc[i].handler->shutdown(i); } spin_unlock_irq(&irq_controller_lock); diff --git a/arch/i386/kernel/irq.h b/arch/i386/kernel/irq.h index d9f32ff94..9f0b3e457 100644 --- a/arch/i386/kernel/irq.h +++ b/arch/i386/kernel/irq.h @@ -9,6 +9,8 @@ */ struct hw_interrupt_type { const char * typename; + void (*startup)(unsigned int irq); + void (*shutdown)(unsigned int irq); void (*handle)(unsigned int irq, struct pt_regs * regs); void (*enable)(unsigned int irq); void (*disable)(unsigned int irq); diff --git a/arch/i386/kernel/ldt.c b/arch/i386/kernel/ldt.c index 4f41b8a33..25e8deec4 100644 --- a/arch/i386/kernel/ldt.c +++ b/arch/i386/kernel/ldt.c @@ -15,8 +15,7 @@ #include <asm/uaccess.h> #include <asm/system.h> #include <asm/ldt.h> - -#include "desc.h" +#include <asm/desc.h> static int read_ldt(void * ptr, unsigned long bytecount) { diff --git a/arch/i386/kernel/mca.c b/arch/i386/kernel/mca.c index de6efd1e2..de5a47e72 100644 --- a/arch/i386/kernel/mca.c +++ b/arch/i386/kernel/mca.c @@ -3,11 +3,29 @@ * Written by Martin Kolinek, February 1996 * * Changes: - * July 28, 1996: fixed up integrated SCSI detection. Chris Beauregard - * August 3rd, 1996: made mca_info local, made integrated registers - * accessible through standard function calls, added name field, - * more sanity checking. Chris Beauregard - * August 9, 1996: Rewrote /proc/mca. cpbeaure + * + * Chris Beauregard July 28th, 1996 + * - Fixed up integrated SCSI detection + * + * Chris Beauregard August 3rd, 1996 + * - Made mca_info local + * - Made integrated registers accessible through standard function calls + * - Added name field + * - More sanity checking + * + * Chris Beauregard August 9th, 1996 + * - Rewrote /proc/mca + * + * Chris Beauregard January 7th, 1997 + * - Added basic NMI-processing + * - Added more information to mca_info structure + * + * David Weinehall October 12th, 1998 + * - Made a lot of cleaning up in the source + * - Added use of save_flags / restore_flags + * - Added the 'driver_loaded' flag in MCA_adapter + * - Added an alternative implemention of ZP Gu's mca_find_unused_adapter + * */ #include <linux/types.h> @@ -29,19 +47,38 @@ * eight POS registers. Then the machine may have integrated video and * SCSI subsystems, which also have eight POS registers. * Other miscellaneous information follows. -*/ + */ + +typedef enum { + MCA_ADAPTER_NORMAL = 0, + MCA_ADAPTER_NONE = 1, + MCA_ADAPTER_DISABLED = 2, + MCA_ADAPTER_ERROR = 3 +} MCA_AdapterStatus; + struct MCA_adapter { - unsigned char pos[8]; /* POS registers */ - char name[32]; /* name of the device - provided by driver */ - char procname[8]; /* name of /proc/mca file */ - MCA_ProcFn procfn; /* /proc info callback */ - void* dev; /* device/context info for callback */ + MCA_AdapterStatus status; /* is there a valid adapter? */ + int id; /* adapter id value */ + unsigned char pos[8]; /* POS registers */ + int driver_loaded; /* is there a driver installed? */ + /* 0 - No, 1 - Yes */ + char name[48]; /* adapter-name provided by driver */ + char procname[8]; /* name of /proc/mca file */ + MCA_ProcFn procfn; /* /proc info callback */ + void* dev; /* device/context info for callback */ }; struct MCA_info { - /* one for each of the 8 possible slots, plus one for integrated SCSI - and one for integrated video. */ +/* one for each of the 8 possible slots, plus one for integrated SCSI + and one for integrated video. */ + struct MCA_adapter slot[MCA_NUMADAPTERS]; + +/* two potential addresses for integrated SCSI adapter - this will + * track which one we think it is + */ + + unsigned char which_scsi; }; /* The mca_info structure pointer. If MCA bus is present, the function @@ -49,70 +86,145 @@ struct MCA_info { * adapters into setup mode, allocates and fills an MCA_info structure, * and points this pointer to the structure. Otherwise the pointer * is set to zero. -*/ + */ + static struct MCA_info* mca_info = 0; -/*MCA registers*/ -#define MCA_MOTHERBOARD_SETUP_REG 0x94 -#define MCA_ADAPTER_SETUP_REG 0x96 -#define MCA_POS_REG(n) (0x100+(n)) +/* MCA registers */ + +#define MCA_MOTHERBOARD_SETUP_REG 0x94 +#define MCA_ADAPTER_SETUP_REG 0x96 +#define MCA_POS_REG(n) (0x100+(n)) #define MCA_ENABLED 0x01 /* POS 2, set if adapter enabled */ /*--------------------------------------------------------------------*/ #ifdef CONFIG_PROC_FS + static void mca_do_proc_init( void ); static int mca_default_procfn( char* buf, int slot ); static ssize_t proc_mca_read( struct file*, char*, size_t, loff_t *); + static struct file_operations proc_mca_operations = { - NULL, proc_mca_read, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, /* array_lseek */ + proc_mca_read, /* array_read */ + NULL, /* array_write */ + NULL, /* array_readdir */ + NULL, /* array_poll */ + NULL, /* array_ioctl */ + NULL, /* mmap */ + NULL, /* no special open code */ + NULL, /* flush */ + NULL, /* no special release code */ + NULL /* can't fsync */ }; + static struct inode_operations proc_mca_inode_operations = { - &proc_mca_operations, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + &proc_mca_operations, /* default base directory file-ops */ + NULL, /* create */ + NULL, /* lookup */ + NULL, /* link */ + NULL, /* unlink */ + NULL, /* symlink */ + NULL, /* mkdir */ + NULL, /* rmdir */ + NULL, /* mknod */ + NULL, /* rename */ + NULL, /* readlink */ + NULL, /* follow_link */ + NULL, /* readpage */ + NULL, /* writepage */ + NULL, /* bmap */ + NULL, /* truncate */ + NULL /* permission */ }; #endif /*--------------------------------------------------------------------*/ +/* Build the status info for the adapter */ + +static void mca_configure_adapter_status( int slot ) { + mca_info->slot[slot].status = MCA_ADAPTER_NONE; + + mca_info->slot[slot].id = mca_info->slot[slot].pos[0] + + (mca_info->slot[slot].pos[1] << 8); + + if( !mca_info->slot[slot].id ) { + + /* id = 0x0000 usually indicates hardware failure, + * however, ZP Gu (zpg@castle.net> reports that his 9556 + * has 0x0000 as id and everything still works. + */ + + mca_info->slot[slot].status = MCA_ADAPTER_ERROR; + + return; + } else if( mca_info->slot[slot].id != 0xffff ) { + + /* 0xffff usually indicates that there's no adapter, + * however, some integrated adapters may have 0xffff as + * their id and still be valid. Examples are on-board + * VGA of the 55sx, the integrated SCSI of the 56 & 57, + * and possibly also the 95 ULTIMEDIA. + */ + + mca_info->slot[slot].status = MCA_ADAPTER_NORMAL; + } + + if( (mca_info->slot[slot].id == 0xffff || + mca_info->slot[slot].id == 0x0000) && slot >= MCA_MAX_SLOT_NR ) { + int j; + + for( j = 2; j < 8; j++ ) { + if( mca_info->slot[slot].pos[j] != 0xff ) { + mca_info->slot[slot].status = MCA_ADAPTER_NORMAL; + break; + } + } + } + + if( !(mca_info->slot[slot].pos[2] & MCA_ENABLED) ) { + + /* enabled bit is in pos 2 */ + + mca_info->slot[slot].status = MCA_ADAPTER_DISABLED; + } +} /* mca_configure_adapter_status */ + +/*--------------------------------------------------------------------*/ + __initfunc(void mca_init(void)) { unsigned int i, j; - int foundscsi = 0; + unsigned long flags; /* WARNING: Be careful when making changes here. Putting an adapter * and the motherboard simultaneously into setup mode may result in * damage to chips (according to The Indispensible PC Hardware Book * by Hans-Peter Messmer). Also, we disable system interrupts (so * that we are not disturbed in the middle of this). - */ - - /* - * Make sure the MCA bus is present */ + + /* Make sure the MCA bus is present */ if (!MCA_bus) return; + printk( "Micro Channel bus detected.\n" ); + save_flags( flags ); cli(); - /* - * Allocate MCA_info structure (at address divisible by 8) - */ + /* Allocate MCA_info structure (at address divisible by 8) */ mca_info = kmalloc(sizeof(struct MCA_info), GFP_ATOMIC); - /* - * Make sure adapter setup is off - */ + /* Make sure adapter setup is off */ outb_p(0, MCA_ADAPTER_SETUP_REG); - /* - * Put motherboard into video setup mode, read integrated video + /* Put motherboard into video setup mode, read integrated video * pos registers, and turn motherboard setup off. */ @@ -121,6 +233,7 @@ __initfunc(void mca_init(void)) for (j=0; j<8; j++) { mca_info->slot[MCA_INTEGVIDEO].pos[j] = inb_p(MCA_POS_REG(j)); } + mca_configure_adapter_status(MCA_INTEGVIDEO); /* Put motherboard into scsi setup mode, read integrated scsi * pos registers, and turn motherboard setup off. @@ -132,51 +245,57 @@ __initfunc(void mca_init(void)) * a good bet that only one could be valid at a time. This could * screw up though if one is used for something else on the other * machine. - */ + */ outb_p(0xf7, MCA_MOTHERBOARD_SETUP_REG); mca_info->slot[MCA_INTEGSCSI].name[0] = 0; for (j=0; j<8; j++) { if( (mca_info->slot[MCA_INTEGSCSI].pos[j] = inb_p(MCA_POS_REG(j))) != 0xff ) { - /* 0xff all across means no device. 0x00 means something's - broken, but a device is probably there. However, if you get - 0x00 from a motherboard register it won't matter what we - find. For the record, on the 57SLC, the integrated SCSI - adapter has 0xffff for the adapter ID, but nonzero for - other registers. */ - foundscsi = 1; + /* 0xff all across means no device. 0x00 means something's + * broken, but a device is probably there. However, if you get + * 0x00 from a motherboard register it won't matter what we + * find. For the record, on the 57SLC, the integrated SCSI + * adapter has 0xffff for the adapter ID, but nonzero for + * other registers. + */ + + mca_info->which_scsi = 0xf7; } } - if( !foundscsi ) - { - /* - * Didn't find it at 0xfd, try somewhere else... - */ + if( !mca_info->which_scsi ) { + + /* Didn't find it at 0xf7, try somewhere else... */ + mca_info->which_scsi = 0xfd; + outb_p(0xfd, MCA_MOTHERBOARD_SETUP_REG); for (j=0; j<8; j++) mca_info->slot[MCA_INTEGSCSI].pos[j] = inb_p(MCA_POS_REG(j)); } - + mca_configure_adapter_status(MCA_INTEGSCSI); + /* turn off motherboard setup */ + outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG); - /* - * Now loop over MCA slots: put each adapter into setup mode, and - * read its pos registers. Then put adapter setup off. + /* Now loop over MCA slots: put each adapter into setup mode, and + * read its pos registers. Then put adapter setup off. */ for (i=0; i<MCA_MAX_SLOT_NR; i++) { outb_p(0x8|(i&0xf), MCA_ADAPTER_SETUP_REG); - for (j=0; j<8; j++) mca_info->slot[i].pos[j]=inb_p(MCA_POS_REG(j)); + for (j=0; j<8; j++) { + mca_info->slot[i].pos[j]=inb_p(MCA_POS_REG(j)); + } mca_info->slot[i].name[0] = 0; + mca_info->slot[i].driver_loaded = 0; + mca_configure_adapter_status(i); } outb_p(0, MCA_ADAPTER_SETUP_REG); - /* - * Enable interrupts and return memory start - */ - sti(); + /* Enable interrupts and return memory start */ + + restore_flags( flags ); request_region(0x60,0x01,"system control port B (MCA)"); request_region(0x90,0x01,"arbitration (MCA)"); @@ -193,29 +312,89 @@ __initfunc(void mca_init(void)) /*--------------------------------------------------------------------*/ -int mca_find_adapter( int id, int start ) +static void mca_handle_nmi_slot( int slot, int check_flag ) +{ + if( slot < MCA_MAX_SLOT_NR ) { + printk( "NMI: caused by MCA adapter in slot %d (%s)\n", slot+1, + mca_info->slot[slot].name ); + } else if( slot == MCA_INTEGSCSI ) { + printk( "NMI: caused by MCA integrated SCSI adapter (%s)\n", + mca_info->slot[slot].name ); + } else if( slot == MCA_INTEGVIDEO ) { + printk( "NMI: caused by MCA integrated video adapter (%s)\n", + mca_info->slot[slot].name ); + } + + /* more info available in pos 6 and 7? */ + + if( check_flag ) { + unsigned char pos6, pos7; + + pos6 = mca_read_pos( slot, 6 ); + pos7 = mca_read_pos( slot, 7 ); + + printk( "NMI: POS 6 = 0x%x, POS 7 = 0x%x\n", pos6, pos7 ); + } + +} /* mca_handle_nmi_slot */ + +/*--------------------------------------------------------------------*/ + +void mca_handle_nmi( void ) { - int slot_id = 0; - unsigned char status = 0; + int i; + unsigned char pos5; + + /* First try - scan the various adapters and see if a specific + * adapter was responsible for the error + */ + + for( i = 0; i < MCA_NUMADAPTERS; i += 1 ) { + + /* bit 7 of POS 5 is reset when this adapter has a hardware + * error. bit 7 it reset if there's error information + * available in pos 6 and 7. */ + + pos5 = mca_read_pos( i, 5 ); + + if( !(pos5 & 0x80) ) { + mca_handle_nmi_slot( i, !(pos5 & 0x40) ); + return; + } + } + + /* if I recall correctly, there's a whole bunch of other things that + * we can do to check for NMI problems, but that's all I know about + * at the moment. + */ + + printk( "NMI generated from unknown source!\n" ); +} /* mca_handle_nmi */ + +/*--------------------------------------------------------------------*/ + +int mca_find_adapter( int id, int start ) +{ if( mca_info == 0 || id == 0 || id == 0xffff ) { return MCA_NOTFOUND; } for( ; start >= 0 && start < MCA_NUMADAPTERS; start += 1 ) { - slot_id = (mca_info->slot[start].pos[1] << 8) - + mca_info->slot[start].pos[0]; - status = mca_info->slot[start].pos[2]; /* not sure about this. There's no point in returning - adapters that aren't enabled, since they can't actually - be used. However, they might be needed for statistical - purposes or something... */ - if( !(status & MCA_ENABLED) ) { + * adapters that aren't enabled, since they can't actually + * be used. However, they might be needed for statistical + * purposes or something... But if that is the case, the + * user is free to write a routine that manually iterates + * through the adapters. + */ + + if( mca_info->slot[start].status == MCA_ADAPTER_DISABLED ) { continue; } - if( id == slot_id ) { + if( id == mca_info->slot[start].id ) { return start; } } @@ -225,6 +404,37 @@ int mca_find_adapter( int id, int start ) /*--------------------------------------------------------------------*/ +int mca_find_unused_adapter( int id, int start ) +{ + if( mca_info == 0 || id == 0 || id == 0xffff ) { + return MCA_NOTFOUND; + } + + for( ; start >= 0 && start < MCA_NUMADAPTERS; start += 1 ) { + + /* not sure about this. There's no point in returning + * adapters that aren't enabled, since they can't actually + * be used. However, they might be needed for statistical + * purposes or something... But if that is the case, the + * user is free to write a routine that manually iterates + * through the adapters. + */ + + if( mca_info->slot[start].status == MCA_ADAPTER_DISABLED || + mca_info->slot[start].driver_loaded ) { + continue; + } + + if( id == mca_info->slot[start].id ) { + return start; + } + } + + return MCA_NOTFOUND; +} /* mca_find_unused_adapter() */ + +/*--------------------------------------------------------------------*/ + unsigned char mca_read_stored_pos( int slot, int reg ) { if( slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == 0 ) return 0; @@ -237,57 +447,97 @@ unsigned char mca_read_stored_pos( int slot, int reg ) unsigned char mca_read_pos( int slot, int reg ) { unsigned int byte = 0; + unsigned long flags; - if( slot < 0 || slot >= MCA_MAX_SLOT_NR || mca_info == 0 ) return 0; + if( slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == 0 ) return 0; if( reg < 0 || reg >= 8 ) return 0; + save_flags( flags ); cli(); - /*make sure motherboard setup is off*/ + /* make sure motherboard setup is off */ + outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG); /* read in the appropriate register */ - outb_p(0x8|(slot&0xf), MCA_ADAPTER_SETUP_REG); - byte = inb_p(MCA_POS_REG(reg)); - outb_p(0, MCA_ADAPTER_SETUP_REG); - sti(); + if( slot == MCA_INTEGSCSI && mca_info->which_scsi ) { + + /* disable adapter setup, enable motherboard setup */ + + outb_p(0, MCA_ADAPTER_SETUP_REG); + outb_p(mca_info->which_scsi, MCA_MOTHERBOARD_SETUP_REG); + + byte = inb_p(MCA_POS_REG(reg)); + outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG); + } else if( slot == MCA_INTEGVIDEO ) { + + /* disable adapter setup, enable motherboard setup */ + + outb_p(0, MCA_ADAPTER_SETUP_REG); + outb_p(0xdf, MCA_MOTHERBOARD_SETUP_REG); + + byte = inb_p(MCA_POS_REG(reg)); + outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG); + } else if( slot < MCA_MAX_SLOT_NR ) { + + /* make sure motherboard setup is off */ + + outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG); + + /* read the appropriate register */ + + outb_p(0x8|(slot&0xf), MCA_ADAPTER_SETUP_REG); + byte = inb_p(MCA_POS_REG(reg)); + outb_p(0, MCA_ADAPTER_SETUP_REG); + } /* make sure the stored values are consistent, while we're here */ + mca_info->slot[slot].pos[reg] = byte; + restore_flags( flags ); + return byte; } /* mca_read_pos() */ /*--------------------------------------------------------------------*/ + /* Note that this a technically a Bad Thing, as IBM tech stuff says - you should only set POS values through their utilities. - However, some devices such as the 3c523 recommend that you write - back some data to make sure the configuration is consistent. - I'd say that IBM is right, but I like my drivers to work. - This function can't do checks to see if multiple devices end up - with the same resources, so you might see magic smoke if someone - screws up. */ + * you should only set POS values through their utilities. + * However, some devices such as the 3c523 recommend that you write + * back some data to make sure the configuration is consistent. + * I'd say that IBM is right, but I like my drivers to work. + * This function can't do checks to see if multiple devices end up + * with the same resources, so you might see magic smoke if someone + * screws up. + */ void mca_write_pos( int slot, int reg, unsigned char byte ) { + unsigned long flags; + if( slot < 0 || slot >= MCA_MAX_SLOT_NR ) return; if( reg < 0 || reg >= 8 ) return; if (mca_info == 0 ) return; + save_flags( flags ); cli(); - /*make sure motherboard setup is off*/ + /* make sure motherboard setup is off */ + outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG); /* read in the appropriate register */ + outb_p(0x8|(slot&0xf), MCA_ADAPTER_SETUP_REG); outb_p( byte, MCA_POS_REG(reg) ); outb_p(0, MCA_ADAPTER_SETUP_REG); - sti(); + restore_flags( flags ); /* update the global register list, while we have the byte */ + mca_info->slot[slot].pos[reg] = byte; } /* mca_write_pos() */ @@ -298,8 +548,14 @@ void mca_set_adapter_name( int slot, char* name ) if( mca_info == 0 ) return; if( slot >= 0 && slot < MCA_NUMADAPTERS ) { - strncpy( mca_info->slot[slot].name, name, - sizeof(mca_info->slot[slot].name) ); + if( name != NULL ) { + strncpy( mca_info->slot[slot].name, name, + sizeof(mca_info->slot[slot].name)-1 ); + mca_info->slot[slot].name[ + sizeof(mca_info->slot[slot].name)-1] = 0; + } else { + mca_info->slot[slot].name[0] = 0; + } } } @@ -313,6 +569,23 @@ void mca_set_adapter_procfn( int slot, MCA_ProcFn procfn, void* dev) } } +int mca_is_adapter_used( int slot ) +{ + return mca_info->slot[slot].driver_loaded; +} + +int mca_mark_as_used( int slot ) +{ + if(mca_info->slot[slot].driver_loaded) return 1; + mca_info->slot[slot].driver_loaded = 1; + return 0; +} + +void mca_mark_as_unused( int slot ) +{ + mca_info->slot[slot].driver_loaded = 0; +} + char *mca_get_adapter_name( int slot ) { if( mca_info == 0 ) return 0; @@ -328,19 +601,9 @@ int mca_isadapter( int slot ) { if( mca_info == 0 ) return 0; - if( slot >= MCA_MAX_SLOT_NR ) { - /* some integrated adapters have 0xffff for an ID, but - are still there. VGA, for example. */ - int i; - for( i = 0; i < 8; i ++ ) { - if( mca_info->slot[slot].pos[i] != 0xff ) { - return 1; - } - } - return 0; - } else if( slot >= 0 && slot < MCA_NUMADAPTERS ) { - return (mca_info->slot[slot].pos[0] != 0xff || - mca_info->slot[slot].pos[1] != 0xff); + if( slot >= 0 && slot < MCA_NUMADAPTERS ) { + return (( mca_info->slot[slot].status == MCA_ADAPTER_NORMAL ) + || (mca_info->slot[slot].status == MCA_ADAPTER_DISABLED ) ); } return 0; @@ -351,7 +614,7 @@ int mca_isenabled( int slot ) if( mca_info == 0 ) return 0; if( slot >= 0 && slot < MCA_NUMADAPTERS ) { - return (mca_info->slot[slot].pos[2] & MCA_ENABLED); + return (mca_info->slot[slot].status == MCA_ADAPTER_NORMAL); } return 0; @@ -367,9 +630,8 @@ int get_mca_info(char *buf) if( MCA_bus && mca_info != 0 ) { - /* - * Format pos registers of eight MCA slots - */ + /* Format pos registers of eight MCA slots */ + for (i=0; i<MCA_MAX_SLOT_NR; i++) { len += sprintf(buf+len, "Slot %d: ", i+1); @@ -378,29 +640,24 @@ int get_mca_info(char *buf) len += sprintf( buf+len, " %s\n", mca_info->slot[i].name ); } - /* - * Format pos registers of integrated video subsystem - */ + /* Format pos registers of integrated video subsystem */ - len += sprintf(buf+len, "Video: "); + len += sprintf(buf+len, "Video : "); for (j=0; j<8; j++) len += sprintf(buf+len, "%02x ", mca_info->slot[MCA_INTEGVIDEO].pos[j]); len += sprintf( buf+len, " %s\n", mca_info->slot[MCA_INTEGVIDEO].name ); - /* - * Format pos registers of integrated SCSI subsystem - */ + /* Format pos registers of integrated SCSI subsystem */ - len += sprintf(buf+len, "SCSI: "); + len += sprintf(buf+len, "SCSI : "); for (j=0; j<8; j++) len += sprintf(buf+len, "%02x ", mca_info->slot[MCA_INTEGSCSI].pos[j]); len += sprintf( buf+len, " %s\n", mca_info->slot[MCA_INTEGSCSI].name ); } else { - /* - * Leave it empty if MCA not detected - * this should never happen + /* Leave it empty if MCA not detected - this should *never* + * happen! */ } @@ -409,12 +666,13 @@ int get_mca_info(char *buf) /*--------------------------------------------------------------------*/ + __initfunc(void mca_do_proc_init( void )) { int i = 0; struct proc_dir_entry* node = 0; - if( mca_info == 0 ) return; /* never happens */ + if( mca_info == 0 ) return; /* should never happen */ proc_register( &proc_mca, &(struct proc_dir_entry) { PROC_MCA_REGISTERS, 3, "pos", S_IFREG|S_IRUGO, @@ -424,7 +682,8 @@ __initfunc(void mca_do_proc_init( void )) PROC_MCA_MACHINE, 7, "machine", S_IFREG|S_IRUGO, 1, 0, 0, 0, &proc_mca_inode_operations,} ); - /* initialize /proc entries for existing adapters */ + /* initialize /proc/mca entries for existing adapters */ + for( i = 0; i < MCA_NUMADAPTERS; i += 1 ) { mca_info->slot[i].procfn = 0; mca_info->slot[i].dev = 0; @@ -460,6 +719,7 @@ int mca_default_procfn( char* buf, int slot ) int len = 0, i; /* this really shouldn't happen... */ + if( mca_info == 0 ) { *buf = 0; return 0; @@ -475,7 +735,9 @@ int mca_default_procfn( char* buf, int slot ) len += sprintf( buf+len, "Integrated Video Adapter\n" ); } if( mca_info->slot[slot].name[0] ) { + /* drivers might register a name without /proc handler... */ + len += sprintf( buf+len, "Adapter Name: %s\n", mca_info->slot[slot].name ); } else { @@ -485,6 +747,8 @@ int mca_default_procfn( char* buf, int slot ) mca_info->slot[slot].pos[1], mca_info->slot[slot].pos[0] ); len += sprintf( buf+len, "Enabled: %s\nPOS: ", mca_isenabled(slot) ? "Yes" : "No" ); + len += sprintf( buf+len, "Driver Installed: %s\n", + mca_is_adapter_used(slot) ? "Yes" : "No" ); for (i=0; i<8; i++) { len += sprintf(buf+len, "%02x ", mca_info->slot[slot].pos[i]); } @@ -505,13 +769,6 @@ static int get_mca_machine_info( char* buf ) return len; } -/* -static int mca_not_implemented( char* buf ) -{ - return sprintf( buf, "Sorry, not implemented yet...\n" ); -} -*/ - static int mca_fill( char* page, int pid, int type, char** start, loff_t *offset, int length) { @@ -540,9 +797,11 @@ static int mca_fill( char* page, int pid, int type, char** start, /* if we made it here, we better have a valid slot */ /* get the standard info */ + len = mca_default_procfn( page, slot ); /* do any device-specific processing, if there is any */ + if( mca_info->slot[slot].procfn ) { len += mca_info->slot[slot].procfn( page+len, slot, mca_info->slot[slot].dev ); @@ -551,9 +810,7 @@ static int mca_fill( char* page, int pid, int type, char** start, return len; } /* mca_fill() */ -/* - * Blatantly stolen from fs/proc/array.c, and thus is probably overkill - */ +/* Blatantly stolen from fs/proc/array.c, and thus is probably overkill */ #define PROC_BLOCK_SIZE (3*1024) @@ -587,11 +844,13 @@ static ssize_t proc_mca_read( struct file* file, } if (start != 0) { /* We have had block-adjusting processing! */ + copy_to_user(buf, start, length); *ppos += length; count = length; } else { /* Static 4kB (or whatever) block capacity */ + if (*ppos >= length) { free_page(page); return 0; diff --git a/arch/i386/kernel/mtrr.c b/arch/i386/kernel/mtrr.c index f56bcdfa1..324e8cec7 100644 --- a/arch/i386/kernel/mtrr.c +++ b/arch/i386/kernel/mtrr.c @@ -117,6 +117,21 @@ 19980611 Richard Gooch <rgooch@atnf.csiro.au> Always define <main_lock>. v1.22 + 19980901 Richard Gooch <rgooch@atnf.csiro.au> + Removed module support in order to tidy up code. + Added sanity check for <mtrr_add>/<mtrr_del> before <mtrr_init>. + Created addition queue for prior to SMP commence. + v1.23 + 19980902 Richard Gooch <rgooch@atnf.csiro.au> + Ported patch to kernel 2.1.120-pre3. + v1.24 + 19980910 Richard Gooch <rgooch@atnf.csiro.au> + Removed sanity checks and addition queue: Linus prefers an OOPS. + v1.25 + 19981001 Richard Gooch <rgooch@atnf.csiro.au> + Fixed harmless compiler warning in include/asm-i386/mtrr.h + Fixed version numbering and history for v1.23 -> v1.24. + v1.26 */ #include <linux/types.h> #include <linux/errno.h> @@ -149,7 +164,7 @@ #include <asm/bitops.h> #include <asm/atomic.h> -#define MTRR_VERSION "1.22 (19980611)" +#define MTRR_VERSION "1.26 (19981001)" #define TRUE 1 #define FALSE 0 @@ -658,13 +673,8 @@ static void set_mtrr_smp (unsigned int reg, unsigned long base, } /* End Function set_mtrr_smp */ -/* A warning that is common to the module and non-module cases. */ /* Some BIOS's are fucked and don't set all MTRRs the same! */ -#ifdef MODULE -static void mtrr_state_warn (unsigned long mask) -#else __initfunc(static void mtrr_state_warn (unsigned long mask)) -#endif { if (!mask) return; if (mask & MTRR_CHANGE_MASK_FIXED) @@ -676,37 +686,6 @@ __initfunc(static void mtrr_state_warn (unsigned long mask)) printk ("mtrr: probably your BIOS does not setup all CPUs\n"); } /* End Function mtrr_state_warn */ -#ifdef MODULE -/* As a module, copy the MTRR state using an IPI handler. */ - -static volatile unsigned long smp_changes_mask = 0; - -static void copy_mtrr_state_handler (struct set_mtrr_context *ctxt, void *info) -{ - unsigned long mask, count; - struct mtrr_state *smp_mtrr_state = info; - - mask = set_mtrr_state (smp_mtrr_state, ctxt); - /* Use the atomic bitops to update the global mask */ - for (count = 0; count < sizeof mask * 8; ++count) - { - if (mask & 0x01) set_bit (count, &smp_changes_mask); - mask >>= 1; - } -} /* End Function copy_mtrr_state_handler */ - -/* Copies the entire MTRR state of this CPU to all the others. */ -static void copy_mtrr_state (void) -{ - struct mtrr_state ms; - - get_mtrr_state (&ms); - do_all_cpus (copy_mtrr_state_handler, &ms, FALSE); - finalize_mtrr_state (&ms); - mtrr_state_warn (smp_changes_mask); -} /* End Function copy_mtrr_state */ - -#endif /* MODULE */ #endif /* __SMP__ */ static char *attrib_to_str (int x) @@ -1163,7 +1142,7 @@ static void compute_ascii (void) EXPORT_SYMBOL(mtrr_add); EXPORT_SYMBOL(mtrr_del); -#if defined(__SMP__) && !defined(MODULE) +#ifdef __SMP__ static volatile unsigned long smp_changes_mask __initdata = 0; static struct mtrr_state smp_mtrr_state __initdata = {0, 0}; @@ -1196,26 +1175,18 @@ __initfunc(void mtrr_init_secondary_cpu (void)) } } /* End Function mtrr_init_secondary_cpu */ -#endif +#endif /* __SMP__ */ -#ifdef MODULE -int init_module (void) -#else __initfunc(int mtrr_init(void)) -#endif { if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return 0; -# if !defined(__SMP__) || defined(MODULE) +# ifndef __SMP__ printk("mtrr: v%s Richard Gooch (rgooch@atnf.csiro.au)\n", MTRR_VERSION); # endif # ifdef __SMP__ -# ifdef MODULE - copy_mtrr_state (); -# else /* MODULE */ finalize_mtrr_state (&smp_mtrr_state); mtrr_state_warn (smp_changes_mask); -# endif /* MODULE */ # endif /* __SMP__ */ # ifdef CONFIG_PROC_FS @@ -1224,17 +1195,4 @@ __initfunc(int mtrr_init(void)) init_table (); return 0; -} - -#ifdef MODULE -void cleanup_module (void) -{ - if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return; -# ifdef CONFIG_PROC_FS - proc_unregister (&proc_root, PROC_MTRR); -# endif -# ifdef __SMP__ - mtrr_hook = NULL; -# endif -} -#endif +} /* End Function mtrr_init */ diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index bd6113cbb..00f39d4ed 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -41,20 +41,16 @@ #include <asm/io.h> #include <asm/ldt.h> #include <asm/processor.h> +#include <asm/desc.h> #ifdef CONFIG_MATH_EMULATION #include <asm/math_emu.h> #endif #include "irq.h" -#include "desc.h" spinlock_t semaphore_wake_lock = SPIN_LOCK_UNLOCKED; -#ifdef __SMP__ -asmlinkage void ret_from_fork(void) __asm__("ret_from_smpfork"); -#else -asmlinkage void ret_from_fork(void) __asm__("ret_from_sys_call"); -#endif +asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); #ifdef CONFIG_APM extern int apm_do_idle(void); @@ -106,44 +102,25 @@ static void hard_idle(void) /* * The idle loop on a uniprocessor i386.. - */ - -asmlinkage int sys_idle(void) + */ +static int cpu_idle(void *unused) { - unsigned long start_idle = 0; - int ret = -EPERM; + unsigned long start_idle = jiffies; - lock_kernel(); - if (current->pid != 0) - goto out; /* endless idle loop with no priority at all */ - current->priority = 0; - current->counter = 0; for (;;) { - /* - * We are locked at this point. So we can safely call - * the APM bios knowing only one CPU at a time will do - * so. - */ - if (!start_idle) { - check_pgt_cache(); - start_idle = jiffies; - } if (jiffies - start_idle > HARD_IDLE_TIMEOUT) hard_idle(); else { if (boot_cpu_data.hlt_works_ok && !hlt_counter && !current->need_resched) __asm__("hlt"); } - run_task_queue(&tq_scheduler); if (current->need_resched) - start_idle = 0; + start_idle = jiffies; + current->policy = SCHED_YIELD; schedule(); + check_pgt_cache(); } - ret = 0; -out: - unlock_kernel(); - return ret; } #else @@ -154,21 +131,19 @@ out: int cpu_idle(void *unused) { - current->priority = 0; - while(1) - { - if(current_cpu_data.hlt_works_ok && - !hlt_counter && !current->need_resched) - __asm("hlt"); - check_pgt_cache(); - run_task_queue(&tq_scheduler); - /* endless idle loop with no priority at all */ - current->counter = 0; + /* endless idle loop with no priority at all */ + while(1) { + if (current_cpu_data.hlt_works_ok && !hlt_counter && !current->need_resched) + __asm__("hlt"); + current->policy = SCHED_YIELD; schedule(); + check_pgt_cache(); } } +#endif + asmlinkage int sys_idle(void) { if (current->pid != 0) @@ -177,8 +152,6 @@ asmlinkage int sys_idle(void) return 0; } -#endif - /* * This routine reboots the machine by asking the keyboard * controller to pulse the reset-line low. We try that for a while, @@ -398,7 +371,7 @@ void machine_halt(void) void machine_power_off(void) { #if defined(CONFIG_APM) && defined(CONFIG_APM_POWER_OFF) - apm_set_power_state(APM_STATE_OFF); + apm_power_off(); #endif } @@ -509,6 +482,35 @@ void release_segments(struct mm_struct *mm) } /* + * Create a kernel thread + */ +int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) +{ + long retval, d0; + + __asm__ __volatile__( + "movl %%esp,%%esi\n\t" + "int $0x80\n\t" /* Linux/i386 system call */ + "cmpl %%esp,%%esi\n\t" /* child or parent? */ + "je 1f\n\t" /* parent - jump */ + /* Load the argument into eax, and push it. That way, it does + * not matter whether the called function is compiled with + * -mregparm or not. */ + "movl %4,%%eax\n\t" + "pushl %%eax\n\t" + "call *%5\n\t" /* call fn */ + "movl %3,%0\n\t" /* exit */ + "int $0x80\n" + "1:\t" + :"=&a" (retval), "=&S" (d0) + :"0" (__NR_clone), "i" (__NR_exit), + "r" (arg), "r" (fn), + "b" (flags | CLONE_VM) + : "memory"); + return retval; +} + +/* * Free current thread data structures etc.. */ void exit_thread(void) @@ -519,34 +521,22 @@ void exit_thread(void) void flush_thread(void) { int i; + struct task_struct *tsk = current; for (i=0 ; i<8 ; i++) - current->tss.debugreg[i] = 0; + tsk->tss.debugreg[i] = 0; /* * Forget coprocessor state.. */ - if (current->flags & PF_USEDFPU) { - current->flags &= ~PF_USEDFPU; - stts(); - } - current->used_math = 0; + clear_fpu(tsk); + tsk->used_math = 0; } void release_thread(struct task_struct *dead_task) { } -static inline void unlazy_fpu(struct task_struct *tsk) -{ - if (tsk->flags & PF_USEDFPU) { - tsk->flags &= ~PF_USEDFPU; - __asm__("fnsave %0":"=m" (tsk->tss.i387)); - stts(); - asm volatile("fwait"); - } -} - /* * If new_mm is NULL, we're being called to set up the LDT descriptor * for a clone task. Each clone must have a separate entry in the GDT. @@ -621,11 +611,12 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, int dump_fpu (struct pt_regs * regs, struct user_i387_struct* fpu) { int fpvalid; + struct task_struct *tsk = current; - fpvalid = current->used_math; + fpvalid = tsk->used_math; if (fpvalid) { - unlazy_fpu(current); - memcpy(fpu,¤t->tss.i387.hard,sizeof(*fpu)); + unlazy_fpu(tsk); + memcpy(fpu,&tsk->tss.i387.hard,sizeof(*fpu)); } return fpvalid; @@ -737,8 +728,11 @@ void __switch_to(struct task_struct *prev, struct task_struct *next) asm volatile("lldt %0": :"g" (*(unsigned short *)&next->tss.ldt)); /* Re-load page tables */ - if (next->tss.cr3 != prev->tss.cr3) - asm volatile("movl %0,%%cr3": :"r" (next->tss.cr3)); + { + unsigned long new_cr3 = next->tss.cr3; + if (new_cr3 != prev->tss.cr3) + asm volatile("movl %0,%%cr3": :"r" (new_cr3)); + } /* * Restore %fs and %gs. @@ -790,6 +784,8 @@ asmlinkage int sys_execve(struct pt_regs regs) if (IS_ERR(filename)) goto out; error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, ®s); + if (error == 0) + current->flags &= ~PF_DTRACE; putname(filename); out: unlock_kernel(); diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index dfa3b9848..52a1543c3 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c @@ -476,7 +476,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if(addr == (long) &dummy->u_debugreg[4]) return -EIO; if(addr == (long) &dummy->u_debugreg[5]) return -EIO; if(addr < (long) &dummy->u_debugreg[4] && - ((unsigned long) data) >= 0xbffffffd) return -EIO; + ((unsigned long) data) >= TASK_SIZE-3) return -EIO; ret = -EIO; if(addr == (long) &dummy->u_debugreg[7]) { @@ -507,10 +507,10 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) else child->flags &= ~PF_TRACESYS; child->exit_code = data; - wake_up_process(child); /* make sure the single step bit is not set. */ tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; put_stack_long(child, EFL_OFFSET,tmp); + wake_up_process(child); ret = 0; goto out; } @@ -526,11 +526,11 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) ret = 0; if (child->state == TASK_ZOMBIE) /* already dead */ goto out; - wake_up_process(child); child->exit_code = SIGKILL; /* make sure the single step bit is not set. */ tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; put_stack_long(child, EFL_OFFSET, tmp); + wake_up_process(child); goto out; } @@ -541,11 +541,15 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if ((unsigned long) data > _NSIG) goto out; child->flags &= ~PF_TRACESYS; + if ((child->flags & PF_DTRACE) == 0) { + /* Spurious delayed TF traps may occur */ + child->flags |= PF_DTRACE; + } tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG; put_stack_long(child, EFL_OFFSET, tmp); - wake_up_process(child); child->exit_code = data; /* give it a chance to run. */ + wake_up_process(child); ret = 0; goto out; } @@ -558,16 +562,16 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if ((unsigned long) data > _NSIG) goto out; child->flags &= ~(PF_PTRACED|PF_TRACESYS); - wake_up_process(child); child->exit_code = data; write_lock_irqsave(&tasklist_lock, flags); REMOVE_LINKS(child); child->p_pptr = child->p_opptr; SET_LINKS(child); write_unlock_irqrestore(&tasklist_lock, flags); - /* make sure the single step bit is not set. */ + /* make sure the single step bit is not set. */ tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; put_stack_long(child, EFL_OFFSET, tmp); + wake_up_process(child); ret = 0; goto out; } @@ -647,8 +651,6 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) #endif __copy_from_user(&child->tss.i387.hard, (void *)data, sizeof(struct user_i387_struct)); - child->flags &= ~PF_USEDFPU; - stts(); #ifdef CONFIG_MATH_EMULATION } else { restore_i387_soft(&child->tss.i387.soft, diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 498820ec8..490c4db82 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -81,18 +81,18 @@ extern int rd_image_start; /* starting block # of image */ extern int root_mountflags; extern int _etext, _edata, _end; +extern unsigned long cpu_hz; /* * This is set up by the setup-routine at boot-time */ #define PARAM ((unsigned char *)empty_zero_page) +#define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) #define EXT_MEM_K (*(unsigned short *) (PARAM+2)) #define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0)) -#ifdef CONFIG_APM -#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+64)) -#endif +#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40)) #define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80)) -#define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) +#define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0xa0)) #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) #define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC)) @@ -101,7 +101,6 @@ extern int _etext, _edata, _end; #define KERNEL_START (*(unsigned long *) (PARAM+0x214)) #define INITRD_START (*(unsigned long *) (PARAM+0x218)) #define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c)) -#define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0x220)) #define COMMAND_LINE ((char *) (PARAM+2048)) #define COMMAND_LINE_SIZE 256 @@ -433,9 +432,9 @@ static struct cpu_model_info cpu_models[] __initdata = { "486 SX/2", NULL, "486 DX/2-WB", "486 DX/4", "486 DX/4-WB", NULL, NULL, NULL, NULL, NULL, NULL }}, { X86_VENDOR_INTEL, 5, - { "Pentium 60/66 A-step", "Pentium 60/66", "Pentium 75+", + { "Pentium 60/66 A-step", "Pentium 60/66", "Pentium 75 - 200", "OverDrive PODP5V83", "Pentium MMX", NULL, NULL, - "Mobile Pentium 75+", "Mobile Pentium MMX", NULL, NULL, NULL, + "Mobile Pentium 75 - 200", "Mobile Pentium MMX", NULL, NULL, NULL, NULL, NULL, NULL, NULL }}, { X86_VENDOR_INTEL, 6, { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)", @@ -493,6 +492,7 @@ __initfunc(void identify_cpu(struct cpuinfo_x86 *c)) switch (edx) { case 0x40: cache_size = 0; + break; case 0x41: cache_size = 128; @@ -532,7 +532,7 @@ __initfunc(void identify_cpu(struct cpuinfo_x86 *c)) && (cpu_models[i].x86 == 6) && (c->x86_model == 5) && (c->x86_cache_size == 0)) { - p = "Celeron"; + p = "Celeron (Covington)"; } } @@ -619,6 +619,11 @@ int get_cpuinfo(char * buffer) } else p += sprintf(p, "stepping\t: unknown\n"); + if (c->x86_capability & X86_FEATURE_TSC) { + p += sprintf(p, "cpu MHz\t\t: %lu.%06lu\n", + cpu_hz / 1000000, (cpu_hz % 1000000)); + } + /* Cache size */ if (c->x86_cache_size >= 0) p += sprintf(p, "cache size\t: %d KB\n", c->x86_cache_size); diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 231356d90..c0aa02d66 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -28,7 +28,7 @@ asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr, int options, unsigned long *ru); -asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); +asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset)); /* * Atomically swap in the new signal mask, and wait for a signal. @@ -50,7 +50,7 @@ sys_sigsuspend(int history0, int history1, old_sigset_t mask) while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (do_signal(&saveset, regs)) + if (do_signal(regs, &saveset)) return -EINTR; } } @@ -79,7 +79,7 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize) while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (do_signal(&saveset, regs)) + if (do_signal(regs, &saveset)) return -EINTR; } } @@ -153,11 +153,9 @@ struct rt_sigframe static inline int restore_i387_hard(struct _fpstate *buf) { - if (current->flags & PF_USEDFPU) { - current->flags &= ~PF_USEDFPU; - stts(); - } - return __copy_from_user(¤t->tss.i387.hard, buf, sizeof(*buf)); + struct task_struct *tsk = current; + clear_fpu(tsk); + return __copy_from_user(&tsk->tss.i387.hard, buf, sizeof(*buf)); } static inline int restore_i387(struct _fpstate *buf) @@ -307,14 +305,11 @@ badframe: static inline int save_i387_hard(struct _fpstate * buf) { - if (current->flags & PF_USEDFPU) { - current->flags &= ~PF_USEDFPU; - __asm__ __volatile__("fnsave %0":"=m"(current->tss.i387.hard)); - stts(); - } - asm volatile("fwait"); - current->tss.i387.hard.status = current->tss.i387.hard.swd; - if (__copy_to_user(buf, ¤t->tss.i387.hard, sizeof(*buf))) + struct task_struct *tsk = current; + + unlazy_fpu(tsk); + tsk->tss.i387.hard.status = tsk->tss.i387.hard.swd; + if (__copy_to_user(buf, &tsk->tss.i387.hard, sizeof(*buf))) return -1; return 1; } @@ -597,7 +592,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, * the kernel can handle, and then we build all the user-level signal handling * stack-frames in one go after that. */ -asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) +int do_signal(struct pt_regs *regs, sigset_t *oldset) { siginfo_t info; struct k_sigaction *ka; diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c index ca9a34bdd..a5f1f2de0 100644 --- a/arch/i386/kernel/smp.c +++ b/arch/i386/kernel/smp.c @@ -752,6 +752,13 @@ void __init initialize_secondary(void) struct thread_struct * p = ¤t->tss; /* + * Load up the LDT and the task register. + */ + asm volatile("lldt %%ax": :"a" (p->ldt)); + asm volatile("ltr %%ax": :"a" (p->tr)); + stts(); + + /* * We don't actually need to load the full TSS, * basically just the stack pointer and the eip. * @@ -759,8 +766,7 @@ void __init initialize_secondary(void) * to release it as part of the "reschedule" return. */ spin_lock(&scheduler_lock); - asm volatile("lldt %%ax": :"a" (p->ldt)); - asm volatile("ltr %%ax": :"a" (p->tr)); + asm volatile( "movl %0,%%esp\n\t" "jmp *%1" @@ -1751,8 +1757,8 @@ void __init setup_APIC_clock(void) static volatile int calibration_lock; - save_flags(flags); - cli(); + __save_flags(flags); + __cli(); SMP_PRINTK(("setup_APIC_clock() called.\n")); @@ -1790,8 +1796,7 @@ void __init setup_APIC_clock(void) ack_APIC_irq (); - - restore_flags(flags); + __restore_flags(flags); } /* diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index df9a1f6ed..dbd6e1942 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c @@ -12,7 +12,29 @@ * precision CMOS clock update * 1996-05-03 Ingo Molnar * fixed time warps in do_[slow|fast]_gettimeoffset() + * 1998-09-05 (Various) + * More robust do_fast_gettimeoffset() algorithm implemented + * (works with APM, Cyrix 6x86MX and Centaur C6), + * monotonic gettimeofday() with fast_get_timeoffset(), + * drift-proof precision TSC calibration on boot + * (C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D. + * Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>; + * ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>). */ + +/* What about the "updated NTP code" stuff in 2.0 time.c? It's not in + * 2.1, perhaps it should be ported, too. + * + * What about the BUGGY_NEPTUN_TIMER stuff in do_slow_gettimeoffset()? + * Whatever it fixes, is it also fixed in the new code from the Jumbo + * patch, so that that code can be used instead? + * + * The CPU Hz should probably be displayed in check_bugs() together + * with the CPU vendor and type. Perhaps even only in MHz, though that + * takes away some of the fun of the new code :) + * + * - Michael Krause */ + #include <linux/errno.h> #include <linux/sched.h> #include <linux/kernel.h> @@ -41,100 +63,51 @@ #include "irq.h" extern int setup_x86_irq(int, struct irqaction *); -extern volatile unsigned long lost_ticks; -/* change this if you have some constant time drift */ -#define USECS_PER_JIFFY (1000020/HZ) +unsigned long cpu_hz; /* Detected as we calibrate the TSC */ + +/* Number of usecs that the last interrupt was delayed */ +static int delay_at_last_interrupt; + +static unsigned long last_tsc_low; /* lsb 32 bits of Time Stamp Counter */ -#ifndef CONFIG_APM /* cycle counter may be unreliable */ -/* Cycle counter value at the previous timer interrupt.. */ -static struct { - unsigned long low; - unsigned long high; -} init_timer_cc, last_timer_cc; +/* Cached *multiplier* to convert TSC counts to microseconds. + * (see the equation below). + * Equal to 2^32 * (1 / (clocks per usec) ). + * Initialized in time_init. + */ +static unsigned long fast_gettimeoffset_quotient=0; static unsigned long do_fast_gettimeoffset(void) { register unsigned long eax asm("ax"); register unsigned long edx asm("dx"); - unsigned long tmp, quotient, low_timer; - - /* Last jiffy when do_fast_gettimeoffset() was called. */ - static unsigned long last_jiffies=0; - - /* - * Cached "1/(clocks per usec)*2^32" value. - * It has to be recalculated once each jiffy. - */ - static unsigned long cached_quotient=0; - - tmp = jiffies; - - quotient = cached_quotient; - low_timer = last_timer_cc.low; - - if (last_jiffies != tmp) { - last_jiffies = tmp; - - /* Get last timer tick in absolute kernel time */ - eax = low_timer; - edx = last_timer_cc.high; - __asm__("subl "SYMBOL_NAME_STR(init_timer_cc)",%0\n\t" - "sbbl "SYMBOL_NAME_STR(init_timer_cc)"+4,%1" - :"=a" (eax), "=d" (edx) - :"0" (eax), "1" (edx)); - - /* - * Divide the 64-bit time with the 32-bit jiffy counter, - * getting the quotient in clocks. - * - * Giving quotient = "1/(average internal clocks per usec)*2^32" - * we do this '1/...' trick to get the 'mull' into the critical - * path. 'mull' is much faster than divl (10 vs. 41 clocks) - */ - __asm__("divl %2" - :"=a" (eax), "=d" (edx) - :"r" (tmp), - "0" (eax), "1" (edx)); - - edx = USECS_PER_JIFFY; - tmp = eax; - eax = 0; - - __asm__("divl %2" - :"=a" (eax), "=d" (edx) - :"r" (tmp), - "0" (eax), "1" (edx)); - cached_quotient = eax; - quotient = eax; - } - /* Read the time counter */ - __asm__("rdtsc" : "=a" (eax), "=d" (edx)); + /* Read the Time Stamp Counter */ + __asm__("rdtsc" + :"=a" (eax), "=d" (edx)); /* .. relative to previous jiffy (32 bits is enough) */ edx = 0; - eax -= low_timer; + eax -= last_tsc_low; /* tsc_low delta */ /* - * Time offset = (USECS_PER_JIFFY * time_low) * quotient. - */ + * Time offset = (tsc_low delta) * fast_gettimeoffset_quotient. + * = (tsc_low delta) / (clocks_per_usec) + * = (tsc_low delta) / (clocks_per_jiffy / usecs_per_jiffy) + * + * Using a mull instead of a divl saves up to 31 clock cycles + * in the critical path. + */ __asm__("mull %2" :"=a" (eax), "=d" (edx) - :"r" (quotient), + :"r" (fast_gettimeoffset_quotient), "0" (eax), "1" (edx)); - /* - * Due to possible jiffies inconsistencies, we need to check - * the result so that we'll get a timer that is monotonic. - */ - if (edx >= USECS_PER_JIFFY) - edx = USECS_PER_JIFFY-1; - - return edx; + /* our adjusted time offset in microseconds */ + return edx + delay_at_last_interrupt; } -#endif /* This function must be called with interrupts disabled * It was inspired by Steve McCanne's microtime-i386 for BSD. -- jrs @@ -249,20 +222,11 @@ static unsigned long do_slow_gettimeoffset(void) return count; } -#ifndef CONFIG_APM -/* - * this is only used if we have fast gettimeoffset: - */ -static void do_x86_get_fast_time(struct timeval * tv) -{ - do_gettimeofday(tv); -} -#endif - static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset; /* - * This version of gettimeofday has near microsecond resolution. + * This version of gettimeofday has microsecond resolution + * and better than microsecond precision on fast x86 machines with TSC. */ void do_gettimeofday(struct timeval *tv) { @@ -272,20 +236,11 @@ void do_gettimeofday(struct timeval *tv) cli(); *tv = xtime; tv->tv_usec += do_gettimeoffset(); - - /* - * xtime is atomically updated in timer_bh. lost_ticks is - * nonzero if the timer bottom half hasnt executed yet. - */ - if (lost_ticks) - tv->tv_usec += USECS_PER_JIFFY; - - restore_flags(flags); - if (tv->tv_usec >= 1000000) { tv->tv_usec -= 1000000; tv->tv_sec++; } + restore_flags(flags); } void do_settimeofday(struct timeval *tv) @@ -311,13 +266,15 @@ void do_settimeofday(struct timeval *tv) sti(); } - /* * In order to set the CMOS clock precisely, set_rtc_mmss has to be * called 500 ms after the second nowtime has started, because when * nowtime is written into the registers of the CMOS clock, it will * jump to the next second precisely 500 ms later. Check the Motorola * MC146818A or Dallas DS12887 data sheet for details. + * + * BUG: This routine does not handle hour overflow properly; it just + * sets the minutes. Usually you'll only notice that after reboot! */ static int set_rtc_mmss(unsigned long nowtime) { @@ -354,8 +311,12 @@ static int set_rtc_mmss(unsigned long nowtime) } CMOS_WRITE(real_seconds,RTC_SECONDS); CMOS_WRITE(real_minutes,RTC_MINUTES); - } else + } else { + printk(KERN_WARNING + "set_rtc_mmss: can't update from %d to %d\n", + cmos_minutes, real_minutes); retval = -1; + } /* The following flags have to be released exactly in this order, * otherwise the DS12887 (popular MC146818A clone with integrated @@ -431,21 +392,37 @@ static inline void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) #endif } -#ifndef CONFIG_APM /* cycle counter may be unreliable */ /* * This is the same as the above, except we _also_ save the current - * cycle counter value at the time of the timer interrupt, so that + * Time Stamp Counter value at the time of the timer interrupt, so that * we later on can estimate the time of day more exactly. */ static void pentium_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { + int count, flags; + + /* It is important that these two operations happen almost at the + * same time. We do the RDTSC stuff first, since it's faster. To + * avoid any inconsistencies, we disable interrupts locally. + */ + + __save_flags(flags); + __cli(); /* read Pentium cycle counter */ __asm__("rdtsc" - :"=a" (last_timer_cc.low), - "=d" (last_timer_cc.high)); + :"=a" (last_tsc_low):: "eax", "edx"); + + outb_p(0x00, 0x43); /* latch the count ASAP */ + + count = inb_p(0x40); /* read the latched count */ + count |= inb(0x40) << 8; + + count = ((LATCH-1) - count) * TICK_SIZE; + delay_at_last_interrupt = (count + LATCH/2) / LATCH; + __restore_flags(flags); + timer_interrupt(irq, NULL, regs); } -#endif /* Converts Gregorian date to seconds since 1970-01-01 00:00:00. * Assumes input in normal date format, i.e. 1980-12-31 23:59:59 @@ -520,6 +497,80 @@ unsigned long get_cmos_time(void) static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL}; +/* ------ Calibrate the TSC ------- + * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset(). + * Too much 64-bit arithmetic here to do this cleanly in C, and for + * accuracy's sake we want to keep the overhead on the CTC speaker (channel 2) + * output busy loop as low as possible. We avoid reading the CTC registers + * directly because of the awkward 8-bit access mechanism of the 82C54 + * device. + */ + +__initfunc(static unsigned long calibrate_tsc(void)) +{ + unsigned long retval; + + __asm__( /* set the Gate high, program CTC channel 2 for mode 0 + * (interrupt on terminal count mode), binary count, + * load 5 * LATCH count, (LSB and MSB) + * to begin countdown, read the TSC and busy wait. + * BTW LATCH is calculated in timex.h from the HZ value + */ + + /* Set the Gate high, disable speaker */ + "inb $0x61, %%al\n\t" /* Read port */ + "andb $0xfd, %%al\n\t" /* Turn off speaker Data */ + "orb $0x01, %%al\n\t" /* Set Gate high */ + "outb %%al, $0x61\n\t" /* Write port */ + + /* Now let's take care of CTC channel 2 */ + "movb $0xb0, %%al\n\t" /* binary, mode 0, LSB/MSB, ch 2*/ + "outb %%al, $0x43\n\t" /* Write to CTC command port */ + "movl %1, %%eax\n\t" + "outb %%al, $0x42\n\t" /* LSB of count */ + "shrl $8, %%eax\n\t" + "outb %%al, $0x42\n\t" /* MSB of count */ + + /* Read the TSC; counting has just started */ + "rdtsc\n\t" + /* Move the value for safe-keeping. */ + "movl %%eax, %%ebx\n\t" + "movl %%edx, %%ecx\n\t" + + /* Busy wait. Only 50 ms wasted at boot time. */ + "0: inb $0x61, %%al\n\t" /* Read Speaker Output Port */ + "testb $0x20, %%al\n\t" /* Check CTC channel 2 output (bit 5) */ + "jz 0b\n\t" + + /* And read the TSC. 5 jiffies (50.00077ms) have elapsed. */ + "rdtsc\n\t" + + /* Great. So far so good. Store last TSC reading in + * last_tsc_low (only 32 lsb bits needed) */ + "movl %%eax, last_tsc_low\n\t" + /* And now calculate the difference between the readings. */ + "subl %%ebx, %%eax\n\t" + "sbbl %%ecx, %%edx\n\t" /* 64-bit subtract */ + /* but probably edx = 0 at this point (see below). */ + /* Now we have 5 * (TSC counts per jiffy) in eax. We want + * to calculate TSC->microsecond conversion factor. */ + + /* Note that edx (high 32-bits of difference) will now be + * zero iff CPU clock speed is less than 85 GHz. Moore's + * law says that this is likely to be true for the next + * 12 years or so. You will have to change this code to + * do a real 64-by-64 divide before that time's up. */ + "movl %%eax, %%ecx\n\t" + "xorl %%eax, %%eax\n\t" + "movl %2, %%edx\n\t" + "divl %%ecx\n\t" /* eax= 2^32 / (1 * TSC counts per microsecond) */ + /* Return eax for the use of fast_gettimeoffset */ + "movl %%eax, %0\n\t" + : "=r" (retval) + : "r" (5 * LATCH), "r" (5 * 1000020/HZ) + : /* we clobber: */ "ax", "bx", "cx", "dx", "cc", "memory"); + return retval; +} __initfunc(void time_init(void)) { @@ -527,36 +578,36 @@ __initfunc(void time_init(void)) xtime.tv_usec = 0; /* - * If we have APM enabled we can't currently depend - * on the cycle counter, because a suspend to disk - * will reset it. Somebody should come up with a - * better solution than to just disable the fast time - * code.. + * If we have APM enabled or the CPU clock speed is variable + * (CPU stops clock on HLT or slows clock to save power) + * then the TSC timestamps may diverge by up to 1 jiffy from + * 'real time' but nothing will break. + * The most frequent case is that the CPU is "woken" from a halt + * state by the timer interrupt itself, so we get 0 error. In the + * rare cases where a driver would "wake" the CPU and request a + * timestamp, the maximum error is < 1 jiffy. But timestamps are + * still perfectly ordered. + * Note that the TSC counter will be reset if APM suspends + * to disk; this won't break the kernel, though, 'cuz we're + * smart. See arch/i386/kernel/apm.c. */ -#ifndef CONFIG_APM - /* If we have the CPU hardware time counters, use them */ - if (boot_cpu_data.x86_capability & X86_FEATURE_TSC) { + if (boot_cpu_data.x86_capability & X86_FEATURE_TSC) { do_gettimeoffset = do_fast_gettimeoffset; - do_get_fast_time = do_x86_get_fast_time; - - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && - boot_cpu_data.x86 == 5 && - boot_cpu_data.x86_model == 0) { - /* turn on cycle counters during power down */ - __asm__ __volatile__ (" movl $0x83, %%ecx \n \ - rdmsr \n \ - orl $1,%%eax \n \ - wrmsr \n " - : : : "ax", "cx", "dx" ); - udelay(500); - } - - /* read Pentium cycle counter */ - __asm__("rdtsc" - :"=a" (init_timer_cc.low), - "=d" (init_timer_cc.high)); + do_get_fast_time = do_gettimeofday; irq0.handler = pentium_timer_interrupt; + fast_gettimeoffset_quotient = calibrate_tsc(); + + /* report CPU clock rate in Hz. + * The formula is (10^6 * 2^32) / (2^32 * 1 / (clocks/us)) = + * clock/second. Our precision is about 100 ppm. + */ + { unsigned long eax=0, edx=1000000; + __asm__("divl %2" + :"=a" (cpu_hz), "=d" (edx) + :"r" (fast_gettimeoffset_quotient), + "0" (eax), "1" (edx)); + printk("Detected %ld Hz processor.\n", cpu_hz); + } } -#endif setup_x86_irq(0, &irq0); } diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 6d60aeb40..6e9a95423 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -21,14 +21,18 @@ #include <linux/init.h> #include <linux/delay.h> +#ifdef CONFIG_MCA +#include <linux/mca.h> +#include <asm/processor.h> +#endif + #include <asm/system.h> #include <asm/uaccess.h> #include <asm/io.h> #include <asm/spinlock.h> #include <asm/atomic.h> #include <asm/debugreg.h> - -#include "desc.h" +#include <asm/desc.h> asmlinkage int system_call(void); asmlinkage void lcall7(void); @@ -192,7 +196,7 @@ void die(const char * str, struct pt_regs * regs, long err) do_exit(SIGSEGV); } -static void die_if_kernel(const char * str, struct pt_regs * regs, long err) +static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err) { if (!(regs->eflags & VM_MASK) && !(3 & regs->xcs)) die(str, regs, err); @@ -296,6 +300,14 @@ static void io_check_error(unsigned char reason, struct pt_regs * regs) static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs) { +#ifdef CONFIG_MCA + /* Might actually be able to figure out what the guilty party + * is. */ + if( MCA_bus ) { + mca_handle_nmi(); + return; + } +#endif printk("Uhhuh. NMI received for unknown reason %02x.\n", reason); printk("Dazed and confused, but trying to continue\n"); printk("Do you have a strange power saving mode enabled?\n"); @@ -340,7 +352,16 @@ asmlinkage void do_debug(struct pt_regs * regs, long error_code) /* Mask out spurious TF errors due to lazy TF clearing */ if (condition & DR_STEP) { - if ((tsk->flags & PF_PTRACED) == 0) + /* + * The TF error should be masked out only if the current + * process is not traced and if the TRAP flag has been set + * previously by a tracing process (condition detected by + * the PF_DTRACE flag); remember that the i386 TRAP flag + * can be modified by the process itself in user mode, + * allowing programs to debug themselves without the ptrace() + * interface. + */ + if ((tsk->flags & (PF_DTRACE|PF_PTRACED)) == PF_DTRACE) goto clear_TF; } @@ -386,20 +407,15 @@ void math_error(void) { struct task_struct * task; - lock_kernel(); - clts(); - task = current; /* - * Save the info for the exception handler + * Save the info for the exception handler + * (this will also clear the error) */ - __asm__ __volatile__("fnsave %0":"=m" (task->tss.i387.hard)); - task->flags&=~PF_USEDFPU; - stts(); - + task = current; + save_fpu(task); task->tss.trap_no = 16; task->tss.error_code = 0; force_sig(SIGFPE, task); - unlock_kernel(); } asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code) @@ -424,19 +440,9 @@ asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs, * Careful.. There are problems with IBM-designed IRQ13 behaviour. * Don't touch unless you *really* know how it works. */ -asmlinkage void math_state_restore(void) +asmlinkage void math_state_restore(struct pt_regs regs) { __asm__ __volatile__("clts"); /* Allow maths ops (or we recurse) */ - -/* - * SMP is actually simpler than uniprocessor for once. Because - * we can't pull the delayed FPU switching trick Linus does - * we simply have to do the restore each context switch and - * set the flag. switch_to() will always save the state in - * case we swap processors. We also don't use the coprocessor - * timer - IRQ 13 mode isn't used with SMP machines (thank god). - */ - if(current->used_math) __asm__("frstor %0": :"m" (current->tss.i387)); else diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index e477e3713..d181dc699 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c @@ -62,7 +62,8 @@ ( (unsigned)( & (((struct kernel_vm86_regs *)0)->VM86_REGS_PART2) ) ) #define VM86_REGS_SIZE2 (sizeof(struct kernel_vm86_regs) - VM86_REGS_SIZE1) -asmlinkage struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs) +asmlinkage struct pt_regs * FASTCALL(save_v86_state(struct kernel_vm86_regs * regs)); +struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs) { struct pt_regs *ret; unsigned long tmp; diff --git a/arch/i386/lib/checksum.c b/arch/i386/lib/checksum.c index e52362c4b..51a9219db 100644 --- a/arch/i386/lib/checksum.c +++ b/arch/i386/lib/checksum.c @@ -16,6 +16,12 @@ * * Changes: Ingo Molnar, converted csum_partial_copy() to 2.1 exception * handling. + * Andi Kleen, add zeroing on error, fix constraints. + * + * To fix: + * Convert to pure asm, because this file is too hard + * for gcc's register allocator and it is not clear if the + * contraints are correct. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -98,7 +104,7 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) 7: " : "=a"(sum) : "0"(sum), "c"(len), "S"(buff) - : "bx", "cx", "dx", "si"); + : "bx", "dx", "si", "cx", "memory"); return(sum); } @@ -191,7 +197,7 @@ unsigned int csum_partial(const unsigned char * buf, int len, unsigned int sum) 80: " : "=a"(sum) : "0"(sum), "c"(len), "S"(buf) - : "bx", "cx", "dx", "si"); + : "bx", "dx", "cx", "si", "memory"); return(sum); } @@ -228,6 +234,7 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, __u32 tmp_var; __asm__ __volatile__ ( " + movl %6,%%edi testl $2, %%edi # Check alignment. jz 2f # Jump if alignment is ok. subl $2, %%ecx # Alignment uses up two bytes. @@ -318,7 +325,12 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, # movl %7, (%%ebx) # # -# FIXME: do zeroing of rest of the buffer here. # +# zero the complete destination - computing the rest +# is too much work + movl %6, %%edi + movl %9, %%ecx + xorl %%eax,%%eax + rep ; stosb # jmp 5000b # # @@ -337,9 +349,10 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, " : "=a" (sum) : "m" (src_err_ptr), "m" (dst_err_ptr), - "0" (sum), "c" (len), "S" (src), "D" (dst), - "i" (-EFAULT), "m"(tmp_var) - : "bx", "cx", "dx", "si", "di" ); + "0" (sum), "c" (len), "S" (src), "m" (dst), + "i" (-EFAULT), "m"(tmp_var), + "m" (len) + : "bx", "dx", "si", "di", "cx", "memory" ); return(sum); } @@ -360,6 +373,7 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, int len, int sum, int *src_err_ptr, int *dst_err_ptr) { __asm__ __volatile__ (" + movl %4,%%ecx movl %%ecx, %%edx movl %%ecx, %%ebx shrl $6, %%ecx @@ -396,7 +410,11 @@ ROUND (-16) ROUND(-12) ROUND(-8) ROUND(-4) 7: .section .fixup, \"ax\" 6000: movl %7, (%%ebx) -# FIXME: do zeroing of rest of the buffer here. +# zero the complete destination (computing the rest is too much work) + movl %8,%%edi + movl %4,%%ecx + xorl %%eax,%%eax + rep ; stosb jmp 7b 6001: movl %1, %%ebx jmp 6000b @@ -404,10 +422,12 @@ ROUND (-16) ROUND(-12) ROUND(-8) ROUND(-4) jmp 6000b .previous " - : "=a"(sum), "=m"(src_err_ptr), "=m"(dst_err_ptr) - : "0"(sum), "c"(len), "S"(src), "D" (dst), - "i" (-EFAULT) - : "bx", "cx", "dx", "si", "di" ); + : "=a"(sum) + : "m"(src_err_ptr), "m"(dst_err_ptr), + "0"(sum), "m"(len), "S"(src), "D" (dst), + "i" (-EFAULT), + "m" (dst) + : "bx", "cx", "si", "di", "dx", "memory" ); return(sum); } diff --git a/arch/i386/lib/delay.c b/arch/i386/lib/delay.c index 12b6b4683..ae8aec636 100644 --- a/arch/i386/lib/delay.c +++ b/arch/i386/lib/delay.c @@ -5,7 +5,9 @@ * Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz> * * The __delay function must _NOT_ be inlined as its execution time - * depends wildly on alignment on many x86 processors. + * depends wildly on alignment on many x86 processors. The additional + * jump magic is needed to get the timing stable on all the CPU's + * we have to worry about. */ #include <linux/sched.h> @@ -18,7 +20,11 @@ void __delay(unsigned long loops) { __asm__ __volatile__( - "1:\tdecl %0\n\tjns 1b" + "\tjmp 1f\n" + ".align 16\n" + "1:\tjmp 2f\n" + ".align 16\n" + "2:\tdecl %0\n\tjns 2b" :/* no outputs */ :"a" (loops) :"ax"); diff --git a/arch/i386/math-emu/fpu_entry.c b/arch/i386/math-emu/fpu_entry.c index 9be6cc0fc..1c5d30e1d 100644 --- a/arch/i386/math-emu/fpu_entry.c +++ b/arch/i386/math-emu/fpu_entry.c @@ -27,6 +27,7 @@ #include <linux/signal.h> #include <asm/uaccess.h> +#include <asm/desc.h> #include "fpu_system.h" #include "fpu_emu.h" diff --git a/arch/i386/math-emu/get_address.c b/arch/i386/math-emu/get_address.c index 1e7009a23..6462f0fa2 100644 --- a/arch/i386/math-emu/get_address.c +++ b/arch/i386/math-emu/get_address.c @@ -21,6 +21,7 @@ #include <linux/stddef.h> #include <asm/uaccess.h> +#include <asm/desc.h> #include "fpu_system.h" #include "exception.h" diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 358ff5033..5a1f363bd 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c @@ -103,8 +103,13 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code) tsk = current; mm = tsk->mm; - if (in_interrupt()) - die("page fault from irq handler",regs,error_code); + + /* + * If we're in an interrupt or have no user + * context, we must not take the fault.. + */ + if (in_interrupt() || mm == &init_mm) + goto no_context; down(&mm->mmap_sem); @@ -119,7 +124,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code) /* * accessing the stack below %esp is always a bug. * The "+ 32" is there due to some instructions (like - * pusha) doing pre-decrement on the stack and that + * pusha) doing post-decrement on the stack and that * doesn't show up until later.. */ if (address + 32 < regs->esp) @@ -151,7 +156,14 @@ good_area: if (!(vma->vm_flags & (VM_READ | VM_EXEC))) goto bad_area; } - handle_mm_fault(tsk, vma, address, write); + + /* + * If for any reason at all we couldn't handle the fault, + * make sure we exit gracefully rather than endlessly redo + * the fault. + */ + if (!handle_mm_fault(tsk, vma, address, write)) + goto do_sigbus; /* * Did it hit the DOS screen memory VA from vm86 mode? @@ -194,6 +206,7 @@ bad_area: } } +no_context: /* Are we prepared to handle this kernel fault? */ if ((fixup = search_exception_table(regs->eip)) != 0) { regs->eip = fixup; @@ -235,8 +248,26 @@ bad_area: page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; printk(KERN_ALERT "*pte = %08lx\n", page); } - lock_kernel(); die("Oops", regs, error_code); do_exit(SIGKILL); - unlock_kernel(); + +/* + * We ran out of memory, or some other thing happened to us that made + * us unable to handle the page fault gracefully. + */ +do_sigbus: + up(&mm->mmap_sem); + + /* + * Send a sigbus, regardless of whether we were in kernel + * or user mode. + */ + tsk->tss.cr2 = address; + tsk->tss.error_code = error_code; + tsk->tss.trap_no = 14; + force_sig(SIGBUS, tsk); + + /* Kernel mode? Handle exceptions or die */ + if (!(error_code & 4)) + goto no_context; } diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index aed7ecc55..693072b1a 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -293,11 +293,18 @@ __initfunc(unsigned long paging_init(unsigned long start_mem, unsigned long end_ * extended bios data area. * * there is a real-mode segmented pointer pointing to the - * 4K EBDA area at 0x40E, calculate and scan it here: + * 4K EBDA area at 0x40E, calculate and scan it here. + * + * NOTE! There are Linux loaders that will corrupt the EBDA + * area, and as such this kind of SMP config may be less + * trustworthy, simply because the SMP table may have been + * stomped on during early boot. */ address = *(unsigned short *)phys_to_virt(0x40E); address<<=4; smp_scan_config(address, 0x1000); + if (smp_found_config) + printk(KERN_WARNING "WARNING: MP table in the EBDA can be UNSAFE, contact linux-smp@vger.rutgers.edu if you experience SMP problems!\n"); } #endif start_mem = PAGE_ALIGN(start_mem); diff --git a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c index 740f4551f..28250b0bd 100644 --- a/arch/i386/mm/ioremap.c +++ b/arch/i386/mm/ioremap.c @@ -84,11 +84,16 @@ static int remap_area_pages(unsigned long address, unsigned long phys_addr, * Remap an arbitrary physical address space into the kernel virtual * address space. Needed when the kernel wants to access high addresses * directly. + * + * NOTE! We need to allow non-page-aligned mappings too: we will obviously + * have to convert them into an offset in a page-aligned mapping, but the + * caller shouldn't need to know that small detail. */ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) { void * addr; struct vm_struct * area; + unsigned long offset; /* * Don't remap the low PCI/ISA area, it's always mapped.. @@ -105,9 +110,9 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag /* * Mappings have to be page-aligned */ - if (phys_addr & ~PAGE_MASK) - return NULL; - size = PAGE_ALIGN(size); + offset = phys_addr & ~PAGE_MASK; + phys_addr &= PAGE_MASK; + size = PAGE_ALIGN(size + offset); /* * Don't allow mappings that wrap.. @@ -126,11 +131,11 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag vfree(addr); return NULL; } - return addr; + return (void *) (offset + (char *)addr); } void iounmap(void *addr) { if (addr > high_memory) - return vfree(addr); + return vfree((void *) (PAGE_MASK & (unsigned long) addr)); } diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index 9aa47cf7c..25955213e 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c @@ -288,12 +288,14 @@ void amiga_enable_irq(unsigned int irq) } if (irq >= IRQ_AMIGA_CIAB) { + cia_set_irq(&ciab_base, (1 << (irq - IRQ_AMIGA_CIAB))); cia_able_irq(&ciab_base, CIA_ICR_SETCLR | (1 << (irq - IRQ_AMIGA_CIAB))); return; } if (irq >= IRQ_AMIGA_CIAA) { + cia_set_irq(&ciaa_base, (1 << (irq - IRQ_AMIGA_CIAA))); cia_able_irq(&ciaa_base, CIA_ICR_SETCLR | (1 << (irq - IRQ_AMIGA_CIAA))); return; diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index 9483c97b3..63cb5265c 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c @@ -398,6 +398,28 @@ __initfunc(void config_amiga(void)) /* ensure that the DMA master bit is set */ custom.dmacon = DMAF_SETCLR | DMAF_MASTER; + /* don't use Z2 RAM as system memory on Z3 capable machines */ + if (AMIGAHW_PRESENT(ZORRO3)) { + int i, j; + u32 disabled_z2mem = 0; + for (i = 0; i < m68k_num_memory; i++) + if (m68k_memory[i].addr < 16*1024*1024) { + if (i == 0) { + /* don't cut off the branch we're sitting on */ + printk("Warning: kernel runs in Zorro II memory\n"); + continue; + } + disabled_z2mem += m68k_memory[i].size; + m68k_num_memory--; + for (j = i; j < m68k_num_memory; j++) + m68k_memory[j] = m68k_memory[j+1]; + i--; + } + if (disabled_z2mem) + printk("%dK of Zorro II memory will not be used as system memory\n", + disabled_z2mem>>10); + } + /* initialize chipram allocator */ amiga_chip_init (); diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 15e4c2d09..0f6ddf111 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c @@ -419,6 +419,7 @@ int atari_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_r unsigned long flags, const char *devname, void *dev_id) { int vector; + unsigned long oflags = flags; /* * The following is a hack to make some PCI card drivers work, @@ -427,9 +428,14 @@ int atari_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_r flags &= ~SA_SHIRQ; + if (flags == SA_INTERRUPT) { + printk ("%s: SA_INTERRUPT changed to IRQ_TYPE_SLOW for %s\n", + __FUNCTION__, devname); + flags = IRQ_TYPE_SLOW; + } if (flags < IRQ_TYPE_SLOW || flags > IRQ_TYPE_PRIO) { - printk ("%s: Bad irq type %ld requested from %s\n", - __FUNCTION__, flags, devname); + printk ("%s: Bad irq type 0x%lx <0x%lx> requested from %s\n", + __FUNCTION__, flags, oflags, devname); return -EINVAL; } if (!IS_VALID_INTNO(irq)) { diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c index b3741ed96..cade2173a 100644 --- a/arch/m68k/atari/stram.c +++ b/arch/m68k/atari/stram.c @@ -19,6 +19,8 @@ #include <linux/malloc.h> #include <linux/vmalloc.h> #include <linux/pagemap.h> +#include <linux/shm.h> + #include <asm/setup.h> #include <asm/machdep.h> #include <asm/page.h> @@ -26,6 +28,7 @@ #include <asm/atarihw.h> #include <asm/atari_stram.h> #include <asm/io.h> +#include <asm/semaphore.h> #ifdef CONFIG_STRAM_SWAP @@ -116,6 +119,10 @@ * since the freeing algorithms are also blind to DMA capability of pages. */ +/* 1998-10-20: ++andreas + unswap_by_move disabled because it does not handle swapped shm pages. +*/ + #ifdef CONFIG_STRAM_SWAP #define ALIGN_IF_SWAP(x) PAGE_ALIGN(x) #else @@ -192,6 +199,9 @@ static struct swap_info_struct *stram_swap_info; /* The ST-RAM's swap type */ static int stram_swap_type; +/* Semaphore for get_stram_region. */ +static struct semaphore stram_swap_sem = MUTEX; + /* major and minor device number of the ST-RAM device; for the major, we use * the same as Amiga z2ram, which is really similar and impossible on Atari, * and for the minor a relatively odd number to avoid the user creating and @@ -215,25 +225,6 @@ static unsigned stat_swap_force = 0; #ifdef CONFIG_STRAM_SWAP static int swap_init( unsigned long start_mem, unsigned long swap_data ); -static inline int unswap_pte( struct vm_area_struct * vma, unsigned long - address, pte_t *dir, unsigned long entry, - unsigned long page, int isswap ); -static inline int unswap_pmd( struct vm_area_struct * vma, pmd_t *dir, - unsigned long address, unsigned long size, - unsigned long offset, unsigned long entry, - unsigned long page, int isswap ); -static inline int unswap_pgd( struct vm_area_struct * vma, pgd_t *dir, - unsigned long address, unsigned long size, - unsigned long entry, unsigned long page, int - isswap ); -static int unswap_vma( struct vm_area_struct * vma, pgd_t *pgdir, unsigned - long entry, unsigned long page, int isswap ); -static int unswap_process( struct mm_struct * mm, unsigned long entry, - unsigned long page, int isswap ); -static int unswap_by_move(unsigned short *, unsigned long, unsigned long, - unsigned long); -static int unswap_by_read(unsigned short *, unsigned long, unsigned long, - unsigned long); static void *get_stram_region( unsigned long n_pages ); static void free_stram_region( unsigned long offset, unsigned long n_pages ); @@ -263,7 +254,7 @@ static int remove_region( BLOCK *block ); * This init function is called very early by atari/config.c * It initializes some internal variables needed for stram_alloc() */ -__initfunc(void atari_stram_init( void )) +void __init atari_stram_init(void) { int i; @@ -273,7 +264,7 @@ __initfunc(void atari_stram_init( void )) /* determine whether kernel code resides in ST-RAM (then ST-RAM is the * first memory block at virtual 0x0) */ - stram_start = phys_to_virt( 0 ); + stram_start = (unsigned long)phys_to_virt(0); kernel_in_stram = (stram_start == 0); for( i = 0; i < m68k_num_memory; ++i ) { @@ -294,7 +285,7 @@ __initfunc(void atari_stram_init( void )) * This function is called from mem_init() to reserve the pages needed for * ST-RAM management. */ -__initfunc(void atari_stram_reserve_pages( unsigned long start_mem )) +void __init atari_stram_reserve_pages(unsigned long start_mem) { #ifdef CONFIG_STRAM_SWAP /* if max_swap_size is negative (i.e. no stram_swap= option given), @@ -573,8 +564,7 @@ void atari_stram_free( void *addr ) * Initialize ST-RAM swap device * (lots copied and modified from sys_swapon() in mm/swapfile.c) */ -__initfunc(static int swap_init( unsigned long start_mem, - unsigned long swap_data )) +static int __init swap_init(unsigned long start_mem, unsigned long swap_data) { static struct dentry fake_dentry[3]; struct swap_info_struct *p; @@ -691,75 +681,64 @@ __initfunc(static int swap_init( unsigned long start_mem, /* * The swap entry has been read in advance, and we return 1 to indicate * that the page has been used or is no longer needed. + * + * Always set the resulting pte to be nowrite (the same as COW pages + * after one process has exited). We don't know just how many PTEs will + * share this swap entry, so be cautious and let do_wp_page work out + * what to do if a write is requested later. */ -static inline int unswap_pte( struct vm_area_struct * vma, unsigned long - address, pte_t *dir, unsigned long entry, - unsigned long page, int isswap ) +static inline void unswap_pte(struct vm_area_struct * vma, unsigned long + address, pte_t *dir, unsigned long entry, + unsigned long page /*, int isswap */) { pte_t pte = *dir; if (pte_none(pte)) - return 0; + return; if (pte_present(pte)) { - struct page *pg; - unsigned long page_nr = MAP_NR(pte_page(pte)); - unsigned long pg_swap_entry; - - if (page_nr >= max_mapnr) - return 0; - pg = mem_map + page_nr; - if (!(pg_swap_entry = in_swap_cache(pg))) - return 0; - if (pg_swap_entry != entry) - return 0; - if (isswap) { - DPRINTK( "unswap_pte: page %08lx = entry %08lx was in swap cache; " - "exchanging to %08lx\n", - page_address(pg), entry, page ); - pg->offset = page; - swap_free(entry); - return 1; - } - else { - DPRINTK( "unswap_pte: page %08lx = entry %08lx was in swap cache; " - "deleted there\n", page_address(pg), entry ); - delete_from_swap_cache(pg); + /* If this entry is swap-cached, then page must already + hold the right address for any copies in physical + memory */ + if (pte_page(pte) != page) + return; + if (0 /* isswap */) + mem_map[MAP_NR(pte_page(pte))].offset = page; + else + /* We will be removing the swap cache in a moment, so... */ set_pte(dir, pte_mkdirty(pte)); - free_page(page); - return 1; - } + return; } if (pte_val(pte) != entry) - return 0; + return; - if (isswap) { + if (0 /* isswap */) { DPRINTK( "unswap_pte: replacing entry %08lx by %08lx", entry, page ); set_pte(dir, __pte(page)); } else { DPRINTK( "unswap_pte: replacing entry %08lx by new page %08lx", entry, page ); - set_pte(dir, pte_mkwrite(pte_mkdirty(mk_pte(page,vma->vm_page_prot)))); + set_pte(dir, pte_mkdirty(mk_pte(page,vma->vm_page_prot))); + atomic_inc(&mem_map[MAP_NR(page)].count); ++vma->vm_mm->rss; } swap_free(entry); - return 1; } -static inline int unswap_pmd( struct vm_area_struct * vma, pmd_t *dir, - unsigned long address, unsigned long size, - unsigned long offset, unsigned long entry, - unsigned long page, int isswap ) +static inline void unswap_pmd(struct vm_area_struct * vma, pmd_t *dir, + unsigned long address, unsigned long size, + unsigned long offset, unsigned long entry, + unsigned long page /* , int isswap */) { pte_t * pte; unsigned long end; if (pmd_none(*dir)) - return 0; + return; if (pmd_bad(*dir)) { printk("unswap_pmd: bad pmd (%08lx)\n", pmd_val(*dir)); pmd_clear(dir); - return 0; + return; } pte = pte_offset(dir, address); offset += address & PMD_MASK; @@ -768,29 +747,27 @@ static inline int unswap_pmd( struct vm_area_struct * vma, pmd_t *dir, if (end > PMD_SIZE) end = PMD_SIZE; do { - if (unswap_pte( vma, offset+address-vma->vm_start, pte, entry, - page, isswap )) - return 1; + unswap_pte(vma, offset+address-vma->vm_start, pte, entry, + page /* , isswap */); address += PAGE_SIZE; pte++; } while (address < end); - return 0; } -static inline int unswap_pgd( struct vm_area_struct * vma, pgd_t *dir, - unsigned long address, unsigned long size, - unsigned long entry, unsigned long page, - int isswap ) +static inline void unswap_pgd(struct vm_area_struct * vma, pgd_t *dir, + unsigned long address, unsigned long size, + unsigned long entry, unsigned long page + /* , int isswap */) { pmd_t * pmd; unsigned long offset, end; if (pgd_none(*dir)) - return 0; + return; if (pgd_bad(*dir)) { printk("unswap_pgd: bad pgd (%08lx)\n", pgd_val(*dir)); pgd_clear(dir); - return 0; + return; } pmd = pmd_offset(dir, address); offset = address & PGDIR_MASK; @@ -799,53 +776,45 @@ static inline int unswap_pgd( struct vm_area_struct * vma, pgd_t *dir, if (end > PGDIR_SIZE) end = PGDIR_SIZE; do { - if (unswap_pmd( vma, pmd, address, end - address, offset, entry, - page, isswap )) - return 1; + unswap_pmd(vma, pmd, address, end - address, offset, entry, + page /* , isswap */); address = (address + PMD_SIZE) & PMD_MASK; pmd++; } while (address < end); - return 0; } -static int unswap_vma( struct vm_area_struct * vma, pgd_t *pgdir, - unsigned long entry, unsigned long page, int isswap ) +static void unswap_vma(struct vm_area_struct * vma, pgd_t *pgdir, + unsigned long entry, unsigned long page + /* , int isswap */) { unsigned long start = vma->vm_start, end = vma->vm_end; - while( start < end ) { - if (unswap_pgd( vma, pgdir, start, end - start, entry, page, isswap )) - return 1; + while (start < end) { + unswap_pgd(vma, pgdir, start, end - start, entry, page + /* , isswap */); start = (start + PGDIR_SIZE) & PGDIR_MASK; pgdir++; } - return 0; } -static int unswap_process( struct mm_struct * mm, unsigned long entry, - unsigned long page, int isswap ) +static void unswap_process(struct mm_struct * mm, unsigned long entry, + unsigned long page /* , int isswap */) { struct vm_area_struct* vma; - int retval = 0; /* * Go through process' page directory. */ if (!mm || mm == &init_mm) - return 0; - down(&mm->mmap_sem); - for( vma = mm->mmap; vma; vma = vma->vm_next ) { + return; + for (vma = mm->mmap; vma; vma = vma->vm_next) { pgd_t * pgd = pgd_offset(mm, vma->vm_start); - if (unswap_vma( vma, pgd, entry, page, isswap )) { - retval = 1; - break; - } + unswap_vma(vma, pgd, entry, page /* , isswap */); } - up(&mm->mmap_sem); - return retval; } +#if 0 static int unswap_by_move(unsigned short *map, unsigned long max, unsigned long start, unsigned long n_pages) { @@ -899,14 +868,17 @@ static int unswap_by_move(unsigned short *map, unsigned long max, #endif while( map[i] ) { + read_lock(&tasklist_lock); for_each_task(p) { if (unswap_process( p->mm, SWP_ENTRY( stram_swap_type, i ), entry, 1 )) { + read_unlock(&tasklist_lock); map[j]++; goto repeat; } } - if (map[i] && map[i] != 127) { + read_unlock(&tasklist_lock); + if (map[i] && map[i] != SWAP_MAP_MAX) { printk( KERN_ERR "get_stram_region: ST-RAM swap page %lu " "not used by any process\n", i ); /* quit while loop and overwrite bad map entry */ @@ -932,13 +904,15 @@ static int unswap_by_move(unsigned short *map, unsigned long max, } return( 0 ); } +#endif static int unswap_by_read(unsigned short *map, unsigned long max, unsigned long start, unsigned long n_pages) { struct task_struct *p; - unsigned long entry, page = 0; + unsigned long entry, page; unsigned long i; + struct page *page_map; DPRINTK( "unswapping %lu..%lu by reading in\n", start, start+n_pages-1 ); @@ -949,43 +923,35 @@ static int unswap_by_read(unsigned short *map, unsigned long max, "reserved??\n", i ); continue; } - entry = SWP_ENTRY( stram_swap_type, i ); - DPRINTK( "unswap: map[i=%lu]=%u nr_swap=%u\n", - i, map[i], nr_swap_pages ); - while( map[i] ) { - if (!page && !(page = __get_free_page(GFP_KERNEL))) { - printk( KERN_NOTICE "get_stram_region: out of memory\n" ); - return( -ENOMEM ); - } - DPRINTK( "unswap: reading swap page %lu to %08lx\n", i, page ); - rw_swap_page( READ, entry, (char *)page, 1 ); - - for_each_task(p) { - if (unswap_process( p->mm, entry, page, 0 )) { - page = 0; -#ifdef DO_PROC - stat_swap_force++; -#endif - break; - } - } - if (page) { - /* - * If we couldn't find an entry, there are several - * possible reasons: someone else freed it first, - * we freed the last reference to an overflowed entry, - * or the system has lost track of the use counts. - */ - if (map[i] && map[i] != SWAP_MAP_MAX) - printk( KERN_ERR "get_stram_region: swap entry %08lx " - "not used by any process\n", entry ); - /* quit while loop and overwrite bad map entry */ - if (!map[i]) { - DPRINTK( "unswap: map[i] became 0\n" ); - } - break; + if (map[i]) { + entry = SWP_ENTRY(stram_swap_type, i); + DPRINTK("unswap: map[i=%lu]=%u nr_swap=%u\n", + i, map[i], nr_swap_pages); + + /* Get a page for the entry, using the existing + swap cache page if there is one. Otherwise, + get a clean page and read the swap into it. */ + page_map = read_swap_cache(entry); + if (page_map) { + page = page_address(page_map); + read_lock(&tasklist_lock); + for_each_task(p) + unswap_process(p->mm, entry, page + /* , 0 */); + read_unlock(&tasklist_lock); + shm_unuse(entry, page); + /* Now get rid of the extra reference to + the temporary page we've been using. */ + if (PageSwapCache(page_map)) + delete_from_swap_cache(page_map); + __free_page(page_map); + #ifdef DO_PROC + stat_swap_force++; + #endif } + else if (map[i]) + return -ENOMEM; } DPRINTK( "unswap: map[i=%lu]=%u nr_swap=%u\n", @@ -998,9 +964,7 @@ static int unswap_by_read(unsigned short *map, unsigned long max, --nr_swap_pages; } - if (page) - free_page(page); - return( 0 ); + return 0; } /* @@ -1015,7 +979,9 @@ static void *get_stram_region( unsigned long n_pages ) void *ret = NULL; DPRINTK( "get_stram_region(n_pages=%lu)\n", n_pages ); - + + down(&stram_swap_sem); + /* disallow writing to the swap device now */ stram_swap_info->flags = SWP_USED; @@ -1026,9 +992,14 @@ static void *get_stram_region( unsigned long n_pages ) DPRINTK( "get_stram_region: region starts at %lu, has %lu free pages\n", start, region_free ); +#if 0 err = ((total_free-region_free >= n_pages-region_free) ? unswap_by_move( map, max, start, n_pages ) : unswap_by_read( map, max, start, n_pages )); +#else + err = unswap_by_read(map, max, start, n_pages); +#endif + if (err) goto end; @@ -1036,6 +1007,7 @@ static void *get_stram_region( unsigned long n_pages ) end: /* allow using swap device again */ stram_swap_info->flags = SWP_WRITEOK; + up(&stram_swap_sem); DPRINTK( "get_stram_region: returning %p\n", ret ); return( ret ); } @@ -1110,7 +1082,7 @@ static unsigned long find_free_region(unsigned long n_pages, start_over: /* increment tail until final window size reached, and count free pages */ nfree = 0; - for( tail = head; tail-head < n_pages && tail < max-n_pages; ++tail ) { + for( tail = head; tail-head < n_pages && tail < max; ++tail ) { if (map[tail] == SWAP_MAP_BAD) { head = tail+1; goto start_over; @@ -1165,7 +1137,7 @@ static unsigned long find_free_region(unsigned long n_pages, /* setup parameters from command line */ -__initfunc(void stram_swap_setup(char *str, int *ints)) +void __init stram_swap_setup(char *str, int *ints) { if (ints[0] >= 1) max_swap_size = ((ints[1] < 0 ? 0 : ints[1]) * 1024) & PAGE_MASK; @@ -1262,7 +1234,7 @@ static struct file_operations stram_fops = { block_fsync /* fsync */ }; -__initfunc(int stram_device_init(void)) +int __init stram_device_init(void) { if (!MACH_IS_ATARI) @@ -1465,9 +1437,10 @@ int get_stram_list( char *buf ) for( p = alloc_list; p; p = p->next ) { if (len + 50 >= PAGE_SIZE) break; - PRINT_PROC( "0x%08lx-0x%08lx: %s (", - virt_to_phys(p->start), - virt_to_phys(p->start+p->size-1), p->owner ); + PRINT_PROC("0x%08lx-0x%08lx: %s (", + virt_to_phys((void *)p->start), + virt_to_phys((void *)p->start+p->size-1), + p->owner); if (p->flags & BLOCK_STATIC) PRINT_PROC( "static)\n" ); else if (p->flags & BLOCK_GFP) diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c index 79c4f48f2..0fd3795a5 100644 --- a/arch/m68k/atari/time.c +++ b/arch/m68k/atari/time.c @@ -279,8 +279,7 @@ int atari_tt_hwclk( int op, struct hwclk_time *t ) while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) { current->state = TASK_INTERRUPTIBLE; - current->timeout = jiffies + HWCLK_POLL_INTERVAL; - schedule(); + schedule_timeout(HWCLK_POLL_INTERVAL); } save_flags(flags); diff --git a/arch/m68k/config.in b/arch/m68k/config.in index 21ac9badc..8fe84aecd 100644 --- a/arch/m68k/config.in +++ b/arch/m68k/config.in @@ -32,6 +32,7 @@ fi bool 'Macintosh support' CONFIG_MAC if [ "$CONFIG_MAC" = "y" ]; then define_bool CONFIG_NUBUS y + define_bool CONFIG_M68K_L2_CACHE y fi bool 'Apollo support' CONFIG_APOLLO bool 'VME (Motorola and BVM) support' CONFIG_VME @@ -155,6 +156,7 @@ if [ "$CONFIG_ZORRO" = "y" ]; then if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then bool 'A4091 SCSI support' CONFIG_A4091_SCSI bool 'WarpEngine SCSI support' CONFIG_WARPENGINE_SCSI + bool 'Blizzard PowerUP 603e+ SCSI' CONFIG_BLZ603EPLUS_SCSI bool 'Cyberstorm Mk III SCSI support' CONFIG_CYBERSTORMIII_SCSI # bool 'GVP Turbo 040/060 SCSI support' CONFIG_GVP_TURBO_SCSI fi @@ -171,6 +173,7 @@ if [ "$CONFIG_ATARI" = "y" ]; then fi if [ "$CONFIG_MAC" = "y" ]; then bool 'MAC NCR5380 SCSI' CONFIG_MAC_SCSI + bool 'MAC NCR53c9[46] SCSI' CONFIG_SCSI_MAC_ESP fi #dep_tristate 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG $CONFIG_SCSI @@ -211,6 +214,7 @@ fi tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER if [ "$CONFIG_ZORRO" = "y" ]; then tristate 'Ariadne support' CONFIG_ARIADNE + tristate 'Ariadne II support' CONFIG_ARIADNE2 tristate 'A2065 support' CONFIG_A2065 tristate 'Hydra support' CONFIG_HYDRA fi @@ -222,6 +226,8 @@ if [ "$CONFIG_APOLLO" = "y" ] ; then fi if [ "$CONFIG_MAC" = "y" ]; then bool 'Mac NS 8390 based ethernet cards' CONFIG_DAYNAPORT + bool 'AV Macintosh onboard MACE ethernet' CONFIG_MACMACE + bool 'Macintosh onboard SONIC ethernet' CONFIG_MACSONIC fi if [ "$CONFIG_VME" = "y" -a "$CONFIG_MVME16x" = "y" ]; then bool 'MVME16x Ethernet support' CONFIG_MVME16x_NET @@ -260,7 +266,7 @@ fi tristate 'Parallel printer support' CONFIG_M68K_PRINTER if [ "$CONFIG_ZORRO" = "y" ]; then - dep_tristate 'Multiface Card III parallel support' CONFIG_MULTIFACE_III_LP $CONFIG_PRINTER + dep_tristate 'Multiface Card III parallel support' CONFIG_MULTIFACE_III_LP $CONFIG_M68K_PRINTER fi if [ "$CONFIG_AMIGA" = "y" ]; then tristate 'Amiga mouse support' CONFIG_AMIGAMOUSE @@ -328,11 +334,6 @@ if [ "$CONFIG_WATCHDOG" != "n" ]; then bool ' Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT bool ' Software Watchdog' CONFIG_SOFT_WATCHDOG fi -if [ "$CONFIG_VME" = "y" ]; then - define_bool CONFIG_UMISC y -else - bool 'Support for user misc device modules' CONFIG_UMISC -fi if [ "$CONFIG_ATARI" = "y" ]; then bool 'Enhanced Real Time Clock Support' CONFIG_RTC fi diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index f4c1343ca..b3e15387c 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S @@ -396,7 +396,7 @@ SYMBOL_NAME_LABEL(resume) .data ALIGN SYMBOL_NAME_LABEL(sys_call_table) - .long SYMBOL_NAME(sys_setup) /* 0 */ + .long SYMBOL_NAME(sys_ni_syscall) /* 0 - old "setup()" system call*/ .long SYMBOL_NAME(sys_exit) .long SYMBOL_NAME(sys_fork) .long SYMBOL_NAME(sys_read) diff --git a/arch/m68k/kernel/m68k_defs.h b/arch/m68k/kernel/m68k_defs.h index b32e6a1c9..992d390c7 100644 --- a/arch/m68k/kernel/m68k_defs.h +++ b/arch/m68k/kernel/m68k_defs.h @@ -3,6 +3,6 @@ */ #define TS_MAGICKEY 0x5a5a5a5a -#define TS_TSS 482 -#define TS_ESP0 502 -#define TS_FPU 506 +#define TS_TSS 478 +#define TS_ESP0 498 +#define TS_FPU 502 diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index ee73b3ff2..40b692e0c 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c @@ -7,6 +7,7 @@ #include <linux/elfcore.h> #include <linux/in6.h> #include <linux/interrupt.h> +#include <linux/config.h> #include <asm/setup.h> #include <asm/machdep.h> @@ -30,9 +31,13 @@ EXPORT_SYMBOL(m68k_cputype); EXPORT_SYMBOL(m68k_is040or060); EXPORT_SYMBOL(cache_push); EXPORT_SYMBOL(cache_clear); +#ifndef CONFIG_SINGLE_MEMORY_CHUNK EXPORT_SYMBOL(mm_vtop); EXPORT_SYMBOL(mm_ptov); EXPORT_SYMBOL(mm_end_of_chunk); +#endif +EXPORT_SYMBOL(mm_vtop_fallback); +EXPORT_SYMBOL(m68k_memory); EXPORT_SYMBOL(kernel_map); EXPORT_SYMBOL(m68k_debug_device); EXPORT_SYMBOL(dump_fpu); diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index da91d32de..9888d83c1 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c @@ -450,10 +450,10 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) else child->flags &= ~PF_TRACESYS; child->exit_code = data; - wake_up_process(child); /* make sure the single step bit is not set. */ tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); put_reg(child, PT_SR, tmp); + wake_up_process(child); ret = 0; goto out; } @@ -469,11 +469,11 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) ret = 0; if (child->state == TASK_ZOMBIE) /* already dead */ goto out; - wake_up_process(child); child->exit_code = SIGKILL; /* make sure the single step bit is not set. */ tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); put_reg(child, PT_SR, tmp); + wake_up_process(child); goto out; } @@ -487,9 +487,9 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); put_reg(child, PT_SR, tmp); - wake_up_process(child); child->exit_code = data; /* give it a chance to run. */ + wake_up_process(child); ret = 0; goto out; } @@ -502,7 +502,6 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if ((unsigned long) data > _NSIG) goto out; child->flags &= ~(PF_PTRACED|PF_TRACESYS); - wake_up_process(child); child->exit_code = data; write_lock_irqsave(&tasklist_lock, flags); REMOVE_LINKS(child); @@ -512,6 +511,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) /* make sure the single step bit is not set. */ tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); put_reg(child, PT_SR, tmp); + wake_up_process(child); ret = 0; goto out; } diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index ff73709b7..1f07014b2 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c @@ -452,7 +452,7 @@ static inline void bus_error030 (struct frame *fp) #endif errorcode = (mmusr & MMU_I) ? 0 : 1; - if (!(ssw & RW) || ssw & RM) + if (!(ssw & RW) || (ssw & RM)) errorcode |= 2; if (mmusr & (MMU_I | MMU_WP)) { diff --git a/arch/m68k/mac/adb-bus.c b/arch/m68k/mac/adb-bus.c index 642164314..b466ce533 100644 --- a/arch/m68k/mac/adb-bus.c +++ b/arch/m68k/mac/adb-bus.c @@ -245,13 +245,16 @@ void adb_bus_init(void) via_write(via1, vIFR, SR_INT); /* get those pesky clock ticks we missed while booting */ - for ( i = 0; i < 30; i++) { + for ( i = 0; i < 60; i++) { udelay(ADB_DELAY); adb_hw_setup_IIsi(); udelay(ADB_DELAY); if (via_read(via1, vBufB) & TREQ) break; } + if (i == 60) + printk("adb_IIsi: maybe bus jammed ??\n"); + /* * Ok we probably ;) have a ready to use adb bus. Its also */ diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index fe77ded05..f410182e0 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -83,9 +83,9 @@ extern int mac_get_irq_list (char *); /* Mac specific timer functions */ extern unsigned long mac_gettimeoffset (void); -extern void mac_gettod (int *, int *, int *, int *, int *, int *); -extern int mac_hwclk (int, struct hwclk_time *); -extern int mac_set_clock_mmss (unsigned long); +static void mac_gettod (int *, int *, int *, int *, int *, int *); +static int mac_hwclk (int, struct hwclk_time *); +static int mac_set_clock_mmss (unsigned long); extern void via_init_clock(void (*func)(int, void *, struct pt_regs *)); extern void (*kd_mksound)(unsigned int, unsigned int); @@ -123,7 +123,7 @@ void mac_bang(int irq, void *vector, struct pt_regs *p) mac_reset(); } -void mac_sched_init(void (*vector)(int, void *, struct pt_regs *)) +static void mac_sched_init(void (*vector)(int, void *, struct pt_regs *)) { via_init_clock(vector); } @@ -135,7 +135,7 @@ extern int console_loglevel; * the system time. */ -void mac_gettod (int *yearp, int *monp, int *dayp, +static void mac_gettod (int *yearp, int *monp, int *dayp, int *hourp, int *minp, int *secp) { unsigned long time; @@ -192,7 +192,7 @@ void mac_gettod (int *yearp, int *monp, int *dayp, * TBI: read and write hwclock */ -int mac_hwclk( int op, struct hwclk_time *t ) +static int mac_hwclk( int op, struct hwclk_time *t ) { return 0; } @@ -201,7 +201,7 @@ int mac_hwclk( int op, struct hwclk_time *t ) * TBI: set minutes/seconds in hwclock */ -int mac_set_clock_mmss (unsigned long nowtime) +static int mac_set_clock_mmss (unsigned long nowtime) { short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60; @@ -280,10 +280,26 @@ __initfunc(int mac_parse_bootinfo(const struct bi_record *record)) return(unknown); } +/* + * Flip into 24bit mode for an instant - flushes the L2 cache card. We + * have to disable interrupts for this. Our IRQ handlers will crap + * themselves if they take an IRQ in 24bit mode! + */ + +static void mac_cache_card_flush(int writeback) +{ + unsigned long flags; + save_flags(flags); + cli(); + via_write(via2, vBufB, via_read(via2,vBufB)&~VIA2B_vMode32); + via_write(via2, vBufB, via_read(via2,vBufB)|VIA2B_vMode32); + restore_flags(flags); +} + __initfunc(void config_mac(void)) { - if (MACH_IS_ATARI || MACH_IS_AMIGA) { + if (!MACH_IS_MAC) { printk("ERROR: no Mac, but config_mac() called!! \n"); } @@ -338,7 +354,17 @@ __initfunc(void config_mac(void)) mac_identify(); mac_report_hardware(); - + + if( + /* Cache cards */ + macintosh_config->ident == MAC_MODEL_IICI|| + macintosh_config->ident == MAC_MODEL_IISI|| + macintosh_config->ident == MAC_MODEL_IICX|| + /* On board L2 cache */ + macintosh_config->ident == MAC_MODEL_IIFX) + { + mach_l2_flush = mac_cache_card_flush; + } /* goes on forever if timers broken */ #ifdef MAC_DEBUG_SOUND mac_mksound(1000,10); @@ -349,7 +375,6 @@ __initfunc(void config_mac(void)) */ nubus_sweep_video(); - } @@ -411,23 +436,23 @@ static struct mac_model mac_data_table[]= { MAC_MODEL_LCIII,"LC III", MAC_ADB_IISI, MAC_VIA_IIci, MAC_SCSI_OLD, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, /* - * Quadra (only 68030 ones will actually work!). Not much odd. Video is at - * 0xF9000000, via is like a MacII. We label it differently as some of the - * stuff connected to VIA2 seems different. Better SCSI chip and ???? onboard ethernet - * in all cases using a NatSemi SONIC. The 700, 900 and 950 have some I/O chips in the wrong - * place to confuse us. The 840AV seems to have a scsi location of its own + * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently + * as some of the stuff connected to VIA2 seems different. Better SCSI chip and + * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an + * AMD 79C940 (MACE). + * The 700, 900 and 950 have some I/O chips in the wrong place to + * confuse us. The 840AV has a SCSI location of its own (same as + * the 660AV). */ - - { MAC_MODEL_Q605, "Quadra 605", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_SONIC, MAC_NUBUS}, + + { MAC_MODEL_Q605, "Quadra 605", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_Q610, "Quadra 610", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_SONIC, MAC_NUBUS}, { MAC_MODEL_Q630, "Quadra 630", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_QUADRA, MAC_SCC_QUADRA, MAC_ETHER_SONIC, MAC_NUBUS}, { MAC_MODEL_Q650, "Quadra 650", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_SONIC, MAC_NUBUS}, /* The Q700 does have a NS Sonic */ - { MAC_MODEL_Q700, "Quadra 700", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA2, MAC_IDE_NONE, MAC_SCC_QUADRA2, MAC_ETHER_SONIC, MAC_NUBUS}, + { MAC_MODEL_Q700, "Quadra 700", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA2, MAC_IDE_NONE, MAC_SCC_QUADRA2, MAC_ETHER_SONIC, MAC_NUBUS}, { MAC_MODEL_Q800, "Quadra 800", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_SONIC, MAC_NUBUS}, - /* Does the 840AV have ethernet ??? documents seem to indicate its not quite a - Quadra in this respect ? */ - { MAC_MODEL_Q840, "Quadra 840AV", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA3, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, + { MAC_MODEL_Q840, "Quadra 840AV", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA3, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_MACE, MAC_NUBUS}, /* These might have IOP problems */ { MAC_MODEL_Q900, "Quadra 900", MAC_ADB_IISI, MAC_VIA_QUADRA, MAC_SCSI_QUADRA2, MAC_IDE_NONE, MAC_SCC_IOP, MAC_ETHER_SONIC, MAC_NUBUS}, { MAC_MODEL_Q950, "Quadra 950", MAC_ADB_IISI, MAC_VIA_QUADRA, MAC_SCSI_QUADRA2, MAC_IDE_NONE, MAC_SCC_IOP, MAC_ETHER_SONIC, MAC_NUBUS}, @@ -440,7 +465,7 @@ static struct mac_model mac_data_table[]= { MAC_MODEL_P475, "Performa 475", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_P475F, "Performa 475", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_P520, "Performa 520", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, - { MAC_MODEL_P550, "Performa 550", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, + { MAC_MODEL_P550, "Performa 550", MAC_ADB_CUDA, MAC_VIA_IIci, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_P575, "Performa 575", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_P588, "Performa 588", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_TV, "TV", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_OLD, MAC_IDE_NONE, MAC_SCC_II, MAC_ETHER_NONE, MAC_NUBUS}, @@ -452,8 +477,8 @@ static struct mac_model mac_data_table[]= * Centris - just guessing again; maybe like Quadra */ - { MAC_MODEL_C610, "Centris 610", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, - { MAC_MODEL_C650, "Centris 650", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, + { MAC_MODEL_C610, "Centris 610", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, + { MAC_MODEL_C650, "Centris 650", MAC_ADB_II, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_C660, "Centris 660AV", MAC_ADB_CUDA, MAC_VIA_QUADRA, MAC_SCSI_QUADRA3, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, /* @@ -467,10 +492,10 @@ static struct mac_model mac_data_table[]= { MAC_MODEL_PB160, "PowerBook 160", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_PB165, "PowerBook 165", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_PB165C, "PowerBook 165c", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, - { MAC_MODEL_PB170, "PowerBook 170", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, + { MAC_MODEL_PB170, "PowerBook 170", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_OLD, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_PB180, "PowerBook 180", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_PB180C, "PowerBook 180c", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, - { MAC_MODEL_PB190, "PowerBook 190cs", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_PB, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, + { MAC_MODEL_PB190, "PowerBook 190", MAC_ADB_PB1, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_PB, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, { MAC_MODEL_PB520, "PowerBook 520", MAC_ADB_PB2, MAC_VIA_QUADRA, MAC_SCSI_QUADRA, MAC_IDE_NONE, MAC_SCC_QUADRA, MAC_ETHER_NONE, MAC_NUBUS}, /* @@ -535,8 +560,8 @@ void mac_identify(void) printk (" Penguin bootinfo data:\n"); printk (" Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n", mac_bi_data.videoaddr, mac_bi_data.videorow, - mac_bi_data.videodepth, (int) (mac_bi_data.dimensions & 0xFFFF), - (int) (mac_bi_data.dimensions >> 16)); + mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF, + mac_bi_data.dimensions >> 16); printk (" Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n", mac_bi_data.videological, mac_orig_videoaddr, mac_bi_data.sccbase); @@ -576,8 +601,7 @@ void mac_identify(void) break; } - - + via_configure_base(); } void mac_report_hardware(void) @@ -589,6 +613,8 @@ static void mac_get_model(char *str) { strcpy(str,"Macintosh "); strcat(str, macintosh_config->name); + if(mach_l2_flush && !(via_read(via2, vBufB)&VIA2B_vCDis)) + strcat(str, "(+L2 cache)"); } /* diff --git a/arch/m68k/mac/debug.c b/arch/m68k/mac/debug.c index 6fc3ac52d..62a8a6187 100644 --- a/arch/m68k/mac/debug.c +++ b/arch/m68k/mac/debug.c @@ -249,7 +249,6 @@ void mac_boom(int booms) * TODO: serial debug code */ -#define SCC_BAS (0x50F04000) struct SCC { u_char cha_b_ctrl; @@ -260,7 +259,8 @@ struct SCC u_char char_dummy3; u_char cha_a_data; }; -# define scc ((*(volatile struct SCC*)SCC_BAS)) + +# define scc (*((volatile struct SCC*)mac_bi_data.sccbase)) /* Flag that serial port is already initialized and used */ int mac_SCC_init_done = 0; @@ -268,6 +268,8 @@ int mac_SCC_init_done = 0; * not be repeated; used by kgdb */ int mac_SCC_reset_done = 0; +static int scc_port = -1; + static struct console mac_console_driver = { "debug", NULL, /* write */ @@ -282,20 +284,18 @@ static struct console mac_console_driver = { NULL }; -static int scc_port; - /* Mac: loops_per_sec min. 1900000 ^= .5 us; MFPDELAY was 0.6 us*/ -#define US 1 +#define uSEC 1 static inline void mac_sccb_out (char c) { int i; do { - for( i = US; i > 0; --i ) + for( i = uSEC; i > 0; --i ) barrier(); } while (!(scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */ - for( i = US; i > 0; --i ) + for( i = uSEC; i > 0; --i ) barrier(); scc.cha_b_data = c; } @@ -304,10 +304,10 @@ static inline void mac_scca_out (char c) { int i; do { - for( i = US; i > 0; --i ) + for( i = uSEC; i > 0; --i ) barrier(); } while (!(scc.cha_a_ctrl & 0x04)); /* wait for tx buf empty */ - for( i = US; i > 0; --i ) + for( i = uSEC; i > 0; --i ) barrier(); scc.cha_a_data = c; } @@ -337,10 +337,10 @@ int mac_sccb_console_wait_key(struct console *co) { int i; do { - for( i = US; i > 0; --i ) + for( i = uSEC; i > 0; --i ) barrier(); } while( !(scc.cha_b_ctrl & 0x01) ); /* wait for rx buf filled */ - for( i = US; i > 0; --i ) + for( i = uSEC; i > 0; --i ) barrier(); return( scc.cha_b_data ); } @@ -349,10 +349,10 @@ int mac_scca_console_wait_key(struct console *co) { int i; do { - for( i = US; i > 0; --i ) + for( i = uSEC; i > 0; --i ) barrier(); } while( !(scc.cha_a_ctrl & 0x01) ); /* wait for rx buf filled */ - for( i = US; i > 0; --i ) + for( i = uSEC; i > 0; --i ) barrier(); return( scc.cha_a_data ); } @@ -365,10 +365,10 @@ int mac_scca_console_wait_key(struct console *co) do { \ int i; \ scc.cha_b_ctrl = (reg); \ - for( i = US; i > 0; --i ) \ + for( i = uSEC; i > 0; --i ) \ barrier(); \ scc.cha_b_ctrl = (val); \ - for( i = US; i > 0; --i ) \ + for( i = uSEC; i > 0; --i ) \ barrier(); \ } while(0) @@ -376,10 +376,10 @@ int mac_scca_console_wait_key(struct console *co) do { \ int i; \ scc.cha_a_ctrl = (reg); \ - for( i = US; i > 0; --i ) \ + for( i = uSEC; i > 0; --i ) \ barrier(); \ scc.cha_a_ctrl = (val); \ - for( i = US; i > 0; --i ) \ + for( i = uSEC; i > 0; --i ) \ barrier(); \ } while(0) @@ -389,7 +389,7 @@ int mac_scca_console_wait_key(struct console *co) #define LONG_DELAY() \ do { \ int i; \ - for( i = 60*US; i > 0; --i ) \ + for( i = 60*uSEC; i > 0; --i ) \ barrier(); \ } while(0) @@ -399,19 +399,21 @@ __initfunc(static void mac_init_scc_port( int cflag, int port )) void mac_init_scc_port( int cflag, int port ) #endif { - extern int mac_SCC_reset_done; - static int clksrc_table[9] = - /* reg 11: 0x50 = BRG, 0x00 = RTxC, 0x28 = TRxC */ - { 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00 }; - static int brgsrc_table[9] = - /* reg 14: 0 = RTxC, 2 = PCLK */ - { 2, 2, 2, 2, 2, 2, 0, 2, 2 }; - static int clkmode_table[9] = - /* reg 4: 0x40 = x16, 0x80 = x32, 0xc0 = x64 */ - { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80 }; - static int div_table[9] = - /* reg12 (BRG low) */ - { 208, 138, 103, 50, 24, 11, 1, 0, 0 }; + extern int mac_SCC_reset_done; + + /* + * baud rates: 1200, 1800, 2400, 4800, 9600, 19.2k, 38.4k, 57.6k, 115.2k + */ + + static int clksrc_table[9] = + /* reg 11: 0x50 = BRG, 0x00 = RTxC, 0x28 = TRxC */ + { 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00 }; + static int clkmode_table[9] = + /* reg 4: 0x40 = x16, 0x80 = x32, 0xc0 = x64 */ + { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80 }; + static int div_table[9] = + /* reg12 (BRG low) */ + { 94, 62, 46, 22, 10, 4, 1, 0, 0 }; int baud = cflag & CBAUD; int clksrc, clkmode, div, reg3, reg5; @@ -426,12 +428,10 @@ void mac_init_scc_port( int cflag, int port ) clkmode = clkmode_table[baud]; div = div_table[baud]; - reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40; - reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */; + reg3 = (((cflag & CSIZE) == CS8) ? 0xc0 : 0x40); + reg5 = (((cflag & CSIZE) == CS8) ? 0x60 : 0x20) | 0x82 /* assert DTR/RTS */; -#if 0 - if (port) { -#endif + if (port == 1) { (void)scc.cha_b_ctrl; /* reset reg pointer */ SCCB_WRITE( 9, 0xc0 ); /* reset */ LONG_DELAY(); /* extra delay after WR9 access */ @@ -442,17 +442,14 @@ void mac_init_scc_port( int cflag, int port ) SCCB_WRITE( 5, reg5 ); SCCB_WRITE( 9, 0 ); /* no interrupts */ LONG_DELAY(); /* extra delay after WR9 access */ - SCCB_WRITE( 10, 0 ); /* NRZ mode */ + SCCB_WRITE( 10, 0 ); /* NRZ mode */ SCCB_WRITE( 11, clksrc ); /* main clock source */ SCCB_WRITE( 12, div ); /* BRG value */ SCCB_WRITE( 13, 0 ); /* BRG high byte */ - SCCB_WRITE( 14, brgsrc_table[baud] ); - SCCB_WRITE( 14, brgsrc_table[baud] | (div ? 1 : 0) ); + SCCB_WRITE( 14, 1 ); SCCB_WRITE( 3, reg3 | 1 ); SCCB_WRITE( 5, reg5 | 8 ); -#if 0 - } else { -#endif + } else if (port == 0) { (void)scc.cha_a_ctrl; /* reset reg pointer */ SCCA_WRITE( 9, 0xc0 ); /* reset */ LONG_DELAY(); /* extra delay after WR9 access */ @@ -463,17 +460,15 @@ void mac_init_scc_port( int cflag, int port ) SCCA_WRITE( 5, reg5 ); SCCA_WRITE( 9, 0 ); /* no interrupts */ LONG_DELAY(); /* extra delay after WR9 access */ - SCCA_WRITE( 10, 0 ); /* NRZ mode */ + SCCA_WRITE( 10, 0 ); /* NRZ mode */ SCCA_WRITE( 11, clksrc ); /* main clock source */ SCCA_WRITE( 12, div ); /* BRG value */ SCCA_WRITE( 13, 0 ); /* BRG high byte */ - SCCA_WRITE( 14, brgsrc_table[baud] ); - SCCA_WRITE( 14, brgsrc_table[baud] | (div ? 1 : 0) ); + SCCA_WRITE( 14, 1 ); SCCA_WRITE( 3, reg3 | 1 ); SCCA_WRITE( 5, reg5 | 8 ); -#if 0 } -#endif + mac_SCC_reset_done = 1; mac_SCC_init_done = 1; } @@ -486,18 +481,20 @@ __initfunc(void mac_debug_init(void)) return; #endif #ifdef DEBUG_SERIAL - if (!strcmp( m68k_debug_device, "ser" )) { - strcpy( m68k_debug_device, "ser1" ); - } - if (!strcmp( m68k_debug_device, "ser1" )) { - /* ST-MFP Modem1 serial port */ + if ( !strcmp( m68k_debug_device, "ser" ) + || !strcmp( m68k_debug_device, "ser1" )) { + /* Mac modem port */ mac_init_scc_port( B9600|CS8, 0 ); mac_console_driver.write = mac_scca_console_write; + mac_console_driver.wait_key = mac_scca_console_wait_key; + scc_port = 0; } else if (!strcmp( m68k_debug_device, "ser2" )) { - /* SCC Modem2 serial port */ + /* Mac printer port */ mac_init_scc_port( B9600|CS8, 1 ); mac_console_driver.write = mac_sccb_console_write; + mac_console_driver.wait_key = mac_sccb_console_wait_key; + scc_port = 1; } if (mac_console_driver.write) register_console(&mac_console_driver); diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c index d24c5ae16..95078a384 100644 --- a/arch/m68k/mac/macboing.c +++ b/arch/m68k/mac/macboing.c @@ -27,12 +27,52 @@ void mac_mksound( unsigned int hz, unsigned int ticks ) unsigned long flags; int samples=512; + if (macintosh_config->ident == MAC_MODEL_C660 + || macintosh_config->ident == MAC_MODEL_Q840) + { + /* + * The Quadra 660AV and 840AV use the "Singer" custom ASIC for sound I/O. + * It appears to be similar to the "AWACS" custom ASIC in the Power Mac + * [678]100. Because Singer and AWACS may have a similar hardware + * interface, this would imply that the code in drivers/sound/dmasound.c + * for AWACS could be used as a basis for Singer support. All we have to + * do is figure out how to do DMA on the 660AV/840AV through the PSC and + * figure out where the Singer hardware sits in memory. (I'd look in the + * vicinity of the AWACS location in a Power Mac [678]100 first, or the + * current location of the Apple Sound Chip--ASC--in other Macs.) The + * Power Mac [678]100 info can be found in MkLinux Mach kernel sources. + * + * Quoted from Apple's Tech Info Library, article number 16405: + * "Among desktop Macintosh computers, only the 660AV, 840AV, and Power + * Macintosh models have 16-bit audio input and output capability + * because of the AT&T DSP3210 hardware circuitry and the 16-bit Singer + * codec circuitry in the AVs. The Audio Waveform Amplifier and + * Converter (AWAC) chip in the Power Macintosh performs the same + * 16-bit I/O functionality. The PowerBook 500 series computers + * support 16-bit stereo output, but only mono input." + * + * http://til.info.apple.com/techinfo.nsf/artnum/n16405 + * + * --David Kilzer + */ + + return; + } + if(!inited) { int i=0; int j=0; int k=0; int l=0; + + /* + * The IIfx strikes again! + */ + + if(macintosh_config->ident==MAC_MODEL_IIFX) + asc_base=(void *)0x50010000; + for(i=0;i<samples;i++) { asc_base[i]=sine_data[j]; diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c index d2ea26e05..b703cb275 100644 --- a/arch/m68k/mac/macints.c +++ b/arch/m68k/mac/macints.c @@ -216,7 +216,10 @@ void mac_debug_handler(int irq, void *dev_id, struct pt_regs *regs); static void via_do_nubus(int slot, void *via, struct pt_regs *regs); -/*#define DEBUG_VIA*/ +/* #define DEBUG_MACINTS */ +/* #define DEBUG_NUBUS_INT */ +/* #define DEBUG_VIA */ +/* #define DEBUG_VIA_NUBUS */ void mac_init_IRQ(void) { @@ -273,13 +276,8 @@ void mac_init_IRQ(void) * Currently, one interrupt per channel is used, solely * to pass the correct async_info as parameter! */ -#if 0 /* want to install debug/SCC shutup routine until SCC init */ - sys_request_irq(4, mac_SCC_handler, IRQ_FLG_STD, "INT4", mac_SCC_handler); -#else + sys_request_irq(4, mac_debug_handler, IRQ_FLG_STD, "INT4", mac_debug_handler); -#endif - /* Alan uses IRQ 5 for SCC ?? */ - sys_request_irq(5, mac_debug_handler, IRQ_FLG_STD, "INT5", mac_debug_handler); /* level 6 */ sys_request_irq(6, mac_bang, IRQ_FLG_LOCK, "offswitch", mac_bang); @@ -289,25 +287,25 @@ void mac_init_IRQ(void) /* initialize the handler tables for VIAs */ for (i = 0; i < 8; i++) { - via1_handler[i].handler = mac_default_handler; - via1_handler[i].dev_id = NULL; - via1_param[i].flags = IRQ_FLG_STD; - via1_param[i].devname = NULL; - - via2_handler[i].handler = mac_default_handler; - via2_handler[i].dev_id = NULL; - via2_param[i].flags = IRQ_FLG_STD; - via2_param[i].devname = NULL; - - rbv_handler[i].handler = mac_default_handler; - rbv_handler[i].dev_id = NULL; - rbv_param[i].flags = IRQ_FLG_STD; - rbv_param[i].devname = NULL; - - scc_handler[i].handler = mac_default_handler; - scc_handler[i].dev_id = NULL; - scc_param[i].flags = IRQ_FLG_STD; - scc_param[i].devname = NULL; + via1_handler[i].handler = mac_default_handler; + via1_handler[i].dev_id = NULL; + via1_param[i].flags = IRQ_FLG_STD; + via1_param[i].devname = NULL; + + via2_handler[i].handler = mac_default_handler; + via2_handler[i].dev_id = NULL; + via2_param[i].flags = IRQ_FLG_STD; + via2_param[i].devname = NULL; + + rbv_handler[i].handler = mac_default_handler; + rbv_handler[i].dev_id = NULL; + rbv_param[i].flags = IRQ_FLG_STD; + rbv_param[i].devname = NULL; + + scc_handler[i].handler = mac_default_handler; + scc_handler[i].dev_id = NULL; + scc_param[i].flags = IRQ_FLG_STD; + scc_param[i].devname = NULL; /* NUBUS interrupts routed through VIA2 slot 2 - special */ nubus_handler[i].handler = nubus_wtf; @@ -337,16 +335,16 @@ void mac_init_IRQ(void) via_table[2] = NULL; via_table[3] = NULL; - handler_table[2] = &rbv_handler[0]; + handler_table[2] = &rbv_handler[0]; handler_table[3] = &scc_handler[0]; handler_table[4] = NULL; handler_table[5] = NULL; handler_table[6] = NULL; - handler_table[7] = &nubus_handler[0]; + handler_table[7] = &nubus_handler[0]; - param_table[2] = &rbv_param[0]; + param_table[2] = &rbv_param[0]; param_table[3] = &scc_param[0]; - param_table[7] = &nubus_param[0]; + param_table[7] = &nubus_param[0]; mac_irqs[2] = &rbv_irqs[0]; mac_irqs[3] = &scc_irqs[0]; @@ -356,7 +354,8 @@ void mac_init_IRQ(void) * AV Macs: shutup the PSC ints */ if (macintosh_config->ident == MAC_MODEL_C660 - || macintosh_config->ident == MAC_MODEL_Q840) { + || macintosh_config->ident == MAC_MODEL_Q840) + { psc_init(); handler_table[2] = &psc3_handler[0]; @@ -463,9 +462,15 @@ int mac_request_irq (unsigned int irq, void (*handler)(int, void *, struct pt_re * 980429 MS: RBV is ok, OSS seems to be differentt */ if (!via2_is_oss) - /* CB2 (IRQ) indep. interrupt input, positive edge */ - /* CA2 (DRQ) indep. interrupt input, positive edge */ - via_write(via, vPCR, 0x66); + if (macintosh_config->scsi_type == MAC_SCSI_OLD) { + /* CB2 (IRQ) indep. interrupt input, positive edge */ + /* CA2 (DRQ) indep. interrupt input, positive edge */ + via_write(via, vPCR, 0x66); + } else { + /* CB2 (IRQ) indep. interrupt input, negative edge */ + /* CA2 (DRQ) indep. interrupt input, negative edge */ + via_write(via, vPCR, 0x22); + } #if 0 else /* CB2 (IRQ) indep. interrupt input, negative edge */ @@ -614,7 +619,7 @@ void mac_turnon_irq( unsigned int irq ) via_write(via, rIER, via_read(via, rIER)|0x80|(1<<(irqidx))); else if (srcidx == SRC_VIA2 && via2_is_oss) via_write(oss_regp, oss_map[irqidx]+8, 2); - else if (srcidx >= SRC_VIA2) + else if (srcidx > SRC_VIA2) via_write(via, (0x104 + 0x10*srcidx), via_read(via, (0x104 + 0x10*srcidx))|0x80|(1<<(irqidx))); else @@ -636,7 +641,11 @@ void mac_turnoff_irq( unsigned int irq ) via_write(via, rIER, (via_read(via, rIER)&(1<<irqidx))); else if (srcidx == SRC_VIA2 && via2_is_oss) via_write(oss_regp, oss_map[irqidx]+8, 0); - else if (srcidx >= SRC_VIA2) + /* + * VIA2 is fixed. The stuff above VIA2 is for later + * macintoshes only. + */ + else if (srcidx > SRC_VIA2) via_write(via, (0x104 + 0x10*srcidx), via_read(via, (0x104 + 0x10*srcidx))|(1<<(irqidx))); else @@ -677,7 +686,7 @@ int mac_irq_pending( unsigned int irq ) pending |= via_read(via, rIFR)&(1<<irqidx); else if (srcidx == SRC_VIA2 && via2_is_oss) pending |= via_read(via, oIFR)&0x03&(1<<oss_map[irqidx]); - else if (srcidx >= SRC_VIA2) + else if (srcidx > SRC_VIA2) pending |= via_read(via, (0x100 + 0x10*srcidx))&(1<<irqidx); else pending |= via_read(via, vIFR)&(1<<irqidx); @@ -1159,7 +1168,7 @@ void oss_irq(int irq, void *dev_id, struct pt_regs *regs) * limited verbosity for RBV interrupts (add more if needed) */ if ( events != 1<<3 ) /* SCSI IRQ */ - printk("oss_irq: irq %d events %x %x %x !\n", irq, srcidx+1, + printk("oss_irq: irq %d srcidx+1 %d events %x %x %x !\n", irq, srcidx+1, events, adb_ev, nub_ev); #endif @@ -1313,7 +1322,7 @@ void psc_irq(int irq, void *dev_id, struct pt_regs *regs) * limited verbosity for RBV interrupts (add more if needed) */ if ( srcidx == 1 && events != 1<<3 && events != 1<<1 ) /* SCSI IRQ */ - printk("psc_irq: irq %d events %x !\n", irq, srcidx+1, events); + printk("psc_irq: irq %d srcidx+1 %d events %x !\n", irq, srcidx+1, events); #endif /* to be changed, possibly: for each non'masked', enabled IRQ, read diff --git a/arch/m68k/mac/mackeyb.c b/arch/m68k/mac/mackeyb.c index fa529e29e..64cd5e1f8 100644 --- a/arch/m68k/mac/mackeyb.c +++ b/arch/m68k/mac/mackeyb.c @@ -51,6 +51,7 @@ static void input_keycode(int, int); extern struct kbd_struct kbd_table[]; +extern void adb_bus_init(void); extern void handle_scancode(unsigned char); extern void put_queue(int); @@ -59,9 +60,9 @@ static void mac_leds_done(struct adb_request *); static void keyboard_input(unsigned char *, int, struct pt_regs *); static void mouse_input(unsigned char *, int, struct pt_regs *); /* Hook for mouse driver */ -void (*adb_mouse_interrupt_hook) (unsigned char *, int); +void (*adb_mouse_interrupt_hook) (char *, int); /* The mouse driver - for debugging */ -extern void mac_mouse_interrupt(char *); +extern void adb_mouse_interrupt(char *, int); /* end keyb */ /* this map indicates which keys shouldn't autorepeat. */ @@ -652,6 +653,8 @@ __initfunc(int mac_keyb_init(void)) printk("Configuring keyboard:\n"); + udelay(3000); + /* * turn on all leds - the keyboard driver will turn them back off * via mac_kbd_leds if everything works ok! @@ -676,6 +679,8 @@ __initfunc(int mac_keyb_init(void)) #if 1 printk("configuring coding mode ...\n"); + udelay(3000); + /* * get the keyboard to send separate codes for * left and right shift, control, option keys. @@ -697,6 +702,8 @@ __initfunc(int mac_keyb_init(void)) #if 0 /* seems to hurt, at least Geert's Mac */ printk("Configuring mouse (3-button mode) ...\n"); + udelay(3000); + /* * XXX: taken from the PPC driver again ... * Try to switch the mouse (id 3) to handler 4, for three-button @@ -738,8 +745,3 @@ __initfunc(int mac_keyb_init(void)) __initfunc(void mac_kbd_reset_setup(char *str, int *ints)) { } - -/* for "kbd-reset" cmdline param */ -__initfunc(void mac_kbd_reset_setup(char *str, int *ints)) -{ -} diff --git a/arch/m68k/mac/psc.h b/arch/m68k/mac/psc.h deleted file mode 100644 index 964f6547c..000000000 --- a/arch/m68k/mac/psc.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Apple Peripheral System Controller (PSC) - * - * The PSC is used on the AV Macs to control IO functions not handled - * by the VIAs (Ethernet, DSP, SCC). - */ - -#define PSCBASE 0x50F31000 - -#define pIFR3 0x130 -#define pIFR4 0x140 -#define pIFR5 0x150 -#define pIFR6 0x160 - -#define pIER3 0x134 -#define pIER4 0x144 -#define pIER5 0x154 -#define pIER6 0x164 diff --git a/arch/m68k/mac/via6522.c b/arch/m68k/mac/via6522.c index c867bc96d..08ca49071 100644 --- a/arch/m68k/mac/via6522.c +++ b/arch/m68k/mac/via6522.c @@ -8,16 +8,21 @@ #include <linux/types.h> #include <linux/kernel.h> #include <linux/mm.h> +#include <linux/delay.h> +#include <asm/adb.h> +#include <asm/bootinfo.h> #include <asm/macintosh.h> #include <asm/macints.h> #include "via6522.h" -#include "psc.h" +#include <asm/mac_psc.h> volatile unsigned char *via1=(unsigned char *)VIABASE; volatile unsigned char *via2=(unsigned char *)VIABASE2; volatile unsigned char *psc=(unsigned char *)PSCBASE; +volatile long *via_memory_bogon=(long *)&via_memory_bogon; + unsigned char via1_clock, via1_datab; static int rbv=0; @@ -38,9 +43,8 @@ static void (*rom_reset)(void); #define MAC_CLOCK_HIGH (MAC_CLOCK_TICK>>8) -void via_init_clock(void (*func)(int, void *, struct pt_regs *)) +void via_configure_base(void) { - unsigned char c; switch(macintosh_config->via_type) { @@ -66,6 +70,13 @@ void via_init_clock(void (*func)(int, void *, struct pt_regs *)) break; default: } +} + + +void via_init_clock(void (*func)(int, void *, struct pt_regs *)) +{ + unsigned char c; + via1_clock=via_read(via1, vACR); via1_datab=via_read(via1, vBufB); @@ -179,29 +190,28 @@ void via_init_clock(void (*func)(int, void *, struct pt_regs *)) } /* - * get time offset between scheduling timer ticks - * Code stolen from arch/m68k/atari/time.c; underflow check probably - * wrong. + * TBI: get time offset between scheduling timer ticks */ #define TICK_SIZE 10000 /* This is always executed with interrupts disabled. */ + unsigned long mac_gettimeoffset (void) { - unsigned long ticks, offset = 0; + unsigned long ticks, offset = 0; - /* read VIA1 timer 2 current value */ - ticks = via_read(via1, vT1CL) + (via_read(via1, vT1CH)<<8); - /* The probability of underflow is less than 2% */ - if (ticks > MAC_CLOCK_TICK - MAC_CLOCK_TICK / 50) - /* Check for pending timer interrupt in VIA1 IFR */ - if (via_read(via1, vIFR) & 0x40) - offset = TICK_SIZE; + /* read VIA1 timer 2 current value */ + ticks = via_read(via1, vT1CL) + (via_read(via1, vT1CH)<<8); + /* The probability of underflow is less than 2% */ + if (ticks > MAC_CLOCK_TICK - MAC_CLOCK_TICK / 50) + /* Check for pending timer interrupt in VIA1 IFR */ + if (via_read(via1, vIFR) & 0x40) + offset = TICK_SIZE; - ticks = MAC_CLOCK_TICK - ticks; - ticks = ticks * 10000L / MAC_CLOCK_TICK; + ticks = MAC_CLOCK_TICK - ticks; + ticks = ticks * 10000L / MAC_CLOCK_TICK; - return ticks + offset; + return ticks + offset; } /* @@ -218,27 +228,64 @@ void psc_init(void) } /* - * The power switch - yes its software! + * The power switch - yes it's software! */ - + void mac_poweroff(void) { -#if 0 + /* - * Powerdown, for the Macs that support it + * MAC_ADB_IISI may need to be moved up here if it doesn't actually + * work using the ADB packet method. --David Kilzer */ - if(rbv) { - via_write(via2, rBufB, via_read(via2, rBufB)&~0x04); - } else { - /* Direction of vDirB is output */ - via_write(via2,vDirB,via_read(via2,vDirB)|0x04); - /* Send a value of 0 on that line */ - via_write(via2,vBufB,via_read(via2,vBufB)&~0x04); + + if (macintosh_config->adb_type == MAC_ADB_II) + { + if(rbv) { + via_write(via2, rBufB, via_read(via2, rBufB)&~0x04); + } else { + /* Direction of vDirB is output */ + via_write(via2,vDirB,via_read(via2,vDirB)|0x04); + /* Send a value of 0 on that line */ + via_write(via2,vBufB,via_read(via2,vBufB)&~0x04); + /* Otherwise it prints "It is now.." then shuts off */ + mdelay(1000); + } + + /* We should never make it this far... */ + printk ("It is now safe to switch off your machine.\n"); + + /* XXX - delay do we need to spin here ? */ + while(1); /* Just in case .. */ + } + + /* + * Initially discovered this technique in the Mach kernel of MkLinux in + * osfmk/src/mach_kernel/ppc/POWERMAC/cuda_power.c. Found equivalent LinuxPPC + * code in arch/ppc/kernel/setup.c, which also has a PMU technique for PowerBooks! + * --David Kilzer + */ + + else if (macintosh_config->adb_type == MAC_ADB_IISI + || macintosh_config->adb_type == MAC_ADB_CUDA) + { + struct adb_request req; + + /* + * Print our "safe" message before we send the request + * just in case the request never returns. + */ + + printk ("It is now safe to switch off your machine.\n"); + + adb_request (&req, NULL, 2, CUDA_PACKET, CUDA_POWERDOWN); + + printk ("ADB powerdown request sent.\n"); + for (;;) + { + adb_poll(); + } } -#endif - /* We should never make it this far... */ - /* XXX - delay do we need to spin here ? */ - while(1); /* Just in case .. */ } /* @@ -247,28 +294,65 @@ void mac_poweroff(void) */ void mac_reset(void) { - unsigned long flags; - unsigned long *reset_hook; - - save_flags(flags); - cli(); - -#if 0 /* need ROMBASE in booter */ -#if 0 /* works on some */ - rom_reset = (boot_info.bi_mac.rombase + 0xa); -#else /* testing, doesn't work on SE/30 either */ - reset_hook = (unsigned long *) (boot_info.bi_mac.rombase + 0x4); - printk("ROM reset hook: %p\n", *reset_hook); - rom_reset = *reset_hook; -#endif - rom_reset(); + /* + * MAC_ADB_IISI may need to be moved up here if it doesn't actually + * work using the ADB packet method. --David Kilzer + */ + + if (macintosh_config->adb_type == MAC_ADB_II) + { + unsigned long flags; + unsigned long *reset_hook; + + save_flags(flags); + cli(); + + /* need ROMBASE in booter */ + + /* works on some */ + rom_reset = (void *) (mac_bi_data.rombase + 0xa); + +#if 0 + /* testing, doesn't work on SE/30 either */ + reset_hook = (unsigned long *) (mac_bi_data.rombase + 0x4); + printk("ROM reset hook: %p\n", *reset_hook); + rom_reset = *reset_hook; #endif - restore_flags(flags); - /* We never make it this far... */ - printk(" reboot failed, reboot manually!\n"); - /* XXX - delay do we need to spin here ? */ - while(1); /* Just in case .. */ + rom_reset(); + + restore_flags(flags); + + /* We never make it this far... */ + printk ("Restart failed. Please restart manually.\n"); + + /* XXX - delay do we need to spin here ? */ + while(1); /* Just in case .. */ + } + + /* + * Initially discovered this technique in the Mach kernel of MkLinux in + * osfmk/src/mach_kernel/ppc/POWERMAC/cuda_power.c. Found equivalent LinuxPPC + * code in arch/ppc/kernel/setup.c, which also has a PMU technique! + * --David Kilzer + * + * I suspect the MAC_ADB_CUDA code might work with other ADB types of machines + * but have no way to test this myself. --DDK + */ + + else if (macintosh_config->adb_type == MAC_ADB_IISI + || macintosh_config->adb_type == MAC_ADB_CUDA) + { + struct adb_request req; + + adb_request (&req, NULL, 2, CUDA_PACKET, CUDA_RESET_SYSTEM); + + printk ("Restart failed. Please restart manually.\n"); + for (;;) + { + adb_poll(); + } + } } /* diff --git a/arch/m68k/mac/via6522.h b/arch/m68k/mac/via6522.h index fa8a3ff76..91ba1d58e 100644 --- a/arch/m68k/mac/via6522.h +++ b/arch/m68k/mac/via6522.h @@ -6,6 +6,9 @@ * is a bit incomplete as the Mac documentation doesnt cover this well */ +#ifndef _ASM_VIA6522_H_ +#define _ASM_VIA6522_H_ + #define VIABASE 0x50F00000 #define VIABASE2 0x50F02000 @@ -45,17 +48,32 @@ * Register B has the fun stuff in it */ +#define VIA2B_vMode32 0x08 /* 24/32bit switch - doubles as cache flush */ #define VIA2B_vPower 0x04 /* Off switch */ -#define VIA2B_vBusLk 0x02 -#define VIA2B_vCDis 0x01 +#define VIA2B_vBusLk 0x02 /* Nubus in use ?? */ +#define VIA2B_vCDis 0x01 /* Cache disable */ + +/* + * The 6522 via is a 2MHz part, and needs a delay. MacOS seems to + * execute MOV (Ax),(Ax) for this... Oh and we can't use udelay + * here... see we need the via to calibrate the udelay loop ... + */ +extern volatile long *via_memory_bogon; + extern __inline__ void via_write(volatile unsigned char *via,int reg, int v) { + *via_memory_bogon; + *via_memory_bogon; + *via_memory_bogon; via[reg]=v; } extern __inline__ int via_read(volatile unsigned char *via,int reg) { + *via_memory_bogon; + *via_memory_bogon; + *via_memory_bogon; return (int)via[reg]; } @@ -109,3 +127,5 @@ extern void via1_irq(int, void *, struct pt_regs *); extern void via2_irq(int, void *, struct pt_regs *); extern void via_setup_keyboard(void); + +#endif /* _ASM_VIA6522_H_ */ diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index fb13d8257..39cc1d1a9 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c @@ -18,6 +18,7 @@ #include <asm/system.h> #include <asm/traps.h> #include <asm/io.h> +#include <asm/machdep.h> #ifdef CONFIG_AMIGA #include <asm/amigahw.h> #endif @@ -554,6 +555,14 @@ unsigned long mm_ptov (unsigned long paddr) * this?). So we have to push first and then additionally to invalidate. */ +#ifdef CONFIG_M68K_L2_CACHE +/* + * Jes was worried about performance (urhh ???) so its optional + */ + +extern void (*mach_l2_flush)(int) = NULL; +#endif + /* * cache_clear() semantics: Clear any cache entries for the area in question, * without writing back dirty entries first. This is useful if the data will @@ -593,6 +602,10 @@ void cache_clear (unsigned long paddr, int len) "movec %/d0,%/cacr" : : "i" (FLUSH_I_AND_D) : "d0"); +#ifdef CONFIG_M68K_L2_CACHE + if(mach_l2_flush) + mach_l2_flush(0); +#endif } @@ -641,6 +654,10 @@ void cache_push (unsigned long paddr, int len) "movec %/d0,%/cacr" : : "i" (FLUSH_I) : "d0"); +#ifdef CONFIG_M68K_L2_CACHE + if(mach_l2_flush) + mach_l2_flush(1); +#endif } diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 906e85e9b..0ba78bf90 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -1,11 +1,10 @@ -# -# arch/mips/boot/Makefile +# $Id: Makefile,v 1.3 1998/11/02 09:15:59 ralf Exp $ # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive # for more details. # -# Copyright (C) 1995 by Ralf Baechle +# Copyright (C) 1995, 1998 by Ralf Baechle # .S.s: @@ -34,11 +33,12 @@ mkboot: mkboot.c $(HOSTCC) -o $@ $^ zdisk: zImage - if [ -f /etc/remote-mcopy ]; then \ - ssh rio mcopy -o - a:vmlinux <zImage; \ - else \ - mcopy -o zImage a:vmlinux; \ - fi +# if [ -f /etc/remote-mcopy ]; then \ +# ssh rio mcopy -o - a:vmlinux <zImage; \ +# else \ +# mcopy -o zImage a:vmlinux; \ +# fi + cp zImage /boot/vmlinux # Don't build dependencies, this may die if $(CC) isn't gcc dep: diff --git a/arch/mips/config.in b/arch/mips/config.in index f93a026dd..6cb3e2a0b 100644 --- a/arch/mips/config.in +++ b/arch/mips/config.in @@ -40,7 +40,6 @@ if [ "$CONFIG_ACER_PICA_61" = "y" ]; then define_bool CONFIG_MIPS_JAZZ y fi if [ "$CONFIG_SNI_RM200_PCI" = "y" ]; then - define_bool CONFIG_VGA_CONSOLE y define_bool CONFIG_PCI y fi endmenu @@ -61,6 +60,15 @@ endmenu mainmenu_option next_comment comment 'General setup' + +if [ "$CONFIG_PCI" = "y" ]; then + bool ' PCI quirks' CONFIG_PCI_QUIRKS + if [ "$CONFIG_PCI_QUIRKS" = "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then + bool ' PCI bridge optimization (experimental)' CONFIG_PCI_OPTIMIZE + fi + bool ' Backward-compatible /proc/pci' CONFIG_PCI_OLD_PROC +fi + if [ "$CONFIG_DECSTATION" = "y" ]; then bool 'Compile the kernel into the ECOFF object format' CONFIG_ECOFF_KERNEL define_bool CONFIG_CPU_LITTLE_ENDIAN y @@ -194,7 +202,14 @@ source fs/Config.in source fs/nls/Config.in -source drivers/video/Config.in +if [ "$CONFIG_VT" = "y" ]; then + mainmenu_option next_comment + comment 'Console drivers' + bool 'VGA text console' CONFIG_VGA_CONSOLE + bool 'Support for frame buffer devices' CONFIG_FB + source drivers/video/Config.in + endmenu +fi mainmenu_option next_comment comment 'Sound' diff --git a/arch/mips/defconfig b/arch/mips/defconfig index 039f36605..1b9ec2d0d 100644 --- a/arch/mips/defconfig +++ b/arch/mips/defconfig @@ -10,14 +10,12 @@ # # Machine selection # -CONFIG_ACER_PICA_61=y +# CONFIG_ACER_PICA_61 is not set # CONFIG_COBALT_MICRO_SERVER is not set # CONFIG_MIPS_MAGNUM_4000 is not set # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI is not set CONFIG_SNI_RM200_PCI=y -CONFIG_MIPS_JAZZ=y -CONFIG_VGA_CONSOLE=y CONFIG_PCI=y # @@ -35,6 +33,8 @@ CONFIG_CPU_R4X00=y # # General setup # +CONFIG_PCI_QUIRKS=y +CONFIG_PCI_OLD_PROC=y CONFIG_ELF_KERNEL=y CONFIG_CPU_LITTLE_ENDIAN=y # CONFIG_BINFMT_AOUT is not set @@ -50,21 +50,21 @@ CONFIG_SYSCTL=y # Loadable module support # CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set +CONFIG_MODVERSIONS=y CONFIG_KMOD=y # # Block devices # -CONFIG_BLK_DEV_FD=y -CONFIG_BLK_DEV_IDE=y +CONFIG_BLK_DEV_FD=m +CONFIG_BLK_DEV_IDE=m # # Please see Documentation/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_IDEDISK=m +CONFIG_BLK_DEV_IDECD=m # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set @@ -76,10 +76,10 @@ CONFIG_BLK_DEV_IDECD=y # # Additional Block Devices # -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_MD is not set -# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM=m # CONFIG_BLK_DEV_XD is not set CONFIG_PARIDE_PARPORT=y # CONFIG_PARIDE is not set @@ -126,8 +126,8 @@ CONFIG_SCSI=y # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_ST=m +CONFIG_BLK_DEV_SR=m # CONFIG_BLK_DEV_SR_VENDOR is not set # CONFIG_CHR_DEV_SG is not set @@ -136,7 +136,7 @@ CONFIG_BLK_DEV_SR=y # # CONFIG_SCSI_MULTI_LUN is not set CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y +# CONFIG_SCSI_LOGGING is not set # # SCSI low-level drivers @@ -161,8 +161,8 @@ CONFIG_SCSI_LOGGING=y # CONFIG_SCSI_NCR53C7xx is not set CONFIG_SCSI_NCR53C8XX=y CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 -CONFIG_SCSI_NCR53C8XX_MAX_TAGS=4 -CONFIG_SCSI_NCR53C8XX_SYNC=5 +CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 +CONFIG_SCSI_NCR53C8XX_SYNC=20 # CONFIG_SCSI_NCR53C8XX_PROFILE is not set # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set # CONFIG_SCSI_PAS16 is not set @@ -176,8 +176,6 @@ CONFIG_SCSI_NCR53C8XX_SYNC=5 # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set # CONFIG_SCSI_ULTRASTOR is not set -CONFIG_JAZZ_ESP=y -CONFIG_JAZZ_ESP=y # # Network device support @@ -187,7 +185,6 @@ CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_EQUALIZER is not set CONFIG_NET_ETHERNET=y -CONFIG_MIPS_JAZZ_SONIC=y # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set @@ -204,6 +201,7 @@ CONFIG_PCNET32=y # CONFIG_EEXPRESS_PRO100 is not set # CONFIG_NE2K_PCI is not set # CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set # CONFIG_NET_POCKET is not set # CONFIG_FDDI is not set # CONFIG_DLCI is not set @@ -245,17 +243,14 @@ CONFIG_PCNET32=y # CONFIG_VT=y CONFIG_VT_CONSOLE=y -CONFIG_SERIAL=y -# CONFIG_SERIAL_CONSOLE is not set +CONFIG_SERIAL=m # CONFIG_SERIAL_EXTENDED is not set # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_UNIX98_PTYS is not set # CONFIG_MOUSE is not set -# CONFIG_UMISC is not set # CONFIG_QIC02_TAPE is not set -# CONFIG_APM is not set # CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set +CONFIG_RTC=y # CONFIG_VIDEO_DEV is not set # CONFIG_NVRAM is not set # CONFIG_JOYSTICK is not set @@ -268,62 +263,73 @@ CONFIG_SERIAL=y # # Filesystems # -# CONFIG_QUOTA is not set -# CONFIG_MINIX_FS is not set +CONFIG_QUOTA=y +CONFIG_MINIX_FS=m CONFIG_EXT2_FS=y -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_UMSDOS_FS=m +CONFIG_VFAT_FS=m CONFIG_PROC_FS=y -CONFIG_NFS_FS=y -CONFIG_NFSD=y -CONFIG_SUNRPC=y -CONFIG_LOCKD=y +CONFIG_NFS_FS=m +CONFIG_NFSD=m +# CONFIG_NFSD_SUN is not set +CONFIG_SUNRPC=m +CONFIG_LOCKD=m # CONFIG_CODA_FS is not set # CONFIG_SMB_FS is not set -# CONFIG_HPFS_FS is not set +# CONFIG_NCP_FS is not set +CONFIG_HPFS_FS=m # CONFIG_NTFS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_AUTOFS_FS is not set +CONFIG_ROMFS_FS=m +CONFIG_AUTOFS_FS=m # CONFIG_UFS_FS is not set +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_SMD_DISKLABEL is not set +# CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_MAC_PARTITION is not set CONFIG_NLS=y # # Native Language Support # -# CONFIG_NLS_CODEPAGE_437 is not set -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=y -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_KOI8_R is not set +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_KOI8_R=m + +# +# Console drivers +# +CONFIG_VGA_CONSOLE=y +# CONFIG_FB is not set # # Sound @@ -333,7 +339,7 @@ CONFIG_NLS_ISO8859_1=y # # Kernel hacking # -CONFIG_CROSSCOMPILE=y +# CONFIG_CROSSCOMPILE is not set # CONFIG_MIPS_FPE_MODULE is not set # CONFIG_REMOTE_DEBUG is not set # CONFIG_MAGIC_SYSRQ is not set diff --git a/arch/mips/jazz/Makefile b/arch/mips/jazz/Makefile index f1edea030..202a13890 100644 --- a/arch/mips/jazz/Makefile +++ b/arch/mips/jazz/Makefile @@ -1,3 +1,4 @@ +# $Id: Makefile,v 1.4 1998/10/28 12:38:10 ralf Exp $ # # Makefile for the Jazz family specific parts of the kernel # @@ -13,8 +14,7 @@ all: jazz.o O_TARGET := jazz.o -O_OBJS := hw-access.o int-handler.o jazzdma.o reset.o rtc-jazz.o setup.o \ - floppy-jazz.o +O_OBJS := int-handler.o jazzdma.o reset.o rtc-jazz.o setup.o floppy-jazz.o int-handler.o: int-handler.S diff --git a/arch/mips/jazz/hw-access.c b/arch/mips/jazz/hw-access.c deleted file mode 100644 index e5da36dd0..000000000 --- a/arch/mips/jazz/hw-access.c +++ /dev/null @@ -1,91 +0,0 @@ -/* $Id: hw-access.c,v 1.13 1998/09/19 19:16:13 ralf Exp $ - * - * Low-level hardware access stuff for Jazz family machines. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle - */ -#include <linux/delay.h> -#include <linux/init.h> -#include <linux/linkage.h> -#include <linux/types.h> -#include <linux/mm.h> -#include <linux/kbd_ll.h> -#include <asm/addrspace.h> -#include <asm/jazz.h> -#include <asm/jazzdma.h> -#include <asm/keyboard.h> -#include <asm/pgtable.h> - -static volatile keyboard_hardware *jazz_kh = - (keyboard_hardware *) JAZZ_KEYBOARD_ADDRESS; - -#define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */ - -static unsigned char jazz_read_input(void) -{ - return jazz_kh->data; -} - -static void jazz_write_output(unsigned char val) -{ - int status; - - do { - status = jazz_kh->command; - } while (status & KBD_STAT_IBF); - jazz_kh->data = val; -} - -static void jazz_write_command(unsigned char val) -{ - int status; - - do { - status = jazz_kh->command; - } while (status & KBD_STAT_IBF); - jazz_kh->command = val; -} - -static unsigned char jazz_read_status(void) -{ - return jazz_kh->command; -} - -__initfunc(void jazz_keyboard_setup(void)) -{ - kbd_read_input = jazz_read_input; - kbd_write_output = jazz_write_output; - kbd_write_command = jazz_write_command; - kbd_read_status = jazz_read_status; - request_irq(JAZZ_KEYBOARD_IRQ, keyboard_interrupt, - 0, "keyboard", NULL); - request_region(0x60, 16, "keyboard"); - r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, - r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) - | JAZZ_IE_KEYBOARD); -} - -int jazz_ps2_request_irq(void) -{ - extern void aux_interrupt(int, void *, struct pt_regs *); - int ret; - - ret = request_irq(JAZZ_MOUSE_IRQ, aux_interrupt, 0, "PS/2 Mouse", NULL); - if (!ret) - r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, - r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | - JAZZ_IE_MOUSE); - return ret; -} - -void jazz_ps2_free_irq(void) -{ - r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, - r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | - JAZZ_IE_MOUSE); - free_irq(JAZZ_MOUSE_IRQ, NULL); -} diff --git a/arch/mips/jazz/kbd-jazz.c b/arch/mips/jazz/kbd-jazz.c new file mode 100644 index 000000000..1dfed0384 --- /dev/null +++ b/arch/mips/jazz/kbd-jazz.c @@ -0,0 +1,102 @@ +/* $Id: kbd-jazz.c,v 1.1 1998/10/28 12:38:10 ralf Exp $ + * + * Low-level hardware access stuff for Jazz family machines. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle + */ +#include <linux/sched.h> +#include <linux/pc_keyb.h> +#include <asm/keyboard.h> +#include <asm/jazz.h> + +#define jazz_kh ((keyboard_hardware *) JAZZ_KEYBOARD_ADDRESS) + +static void jazz_request_region(void) +{ + /* No I/O ports are being used on Jazz. */ +} + +static int jazz_request_irq(void (*handler)(int, void *, struct pt_regs *)) +{ + int res; + + res = request_irq(JAZZ_KEYBOARD_IRQ, handler, 0, "keyboard", NULL); + if (res != 0) + return res; + + /* jazz_request_irq() should do this ... */ + r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, + r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) + | JAZZ_IE_KEYBOARD); + + return 0; +} + +static int jazz_aux_request_irq(void (*handler)(int, void *, struct pt_regs *)) +{ + int ret; + + ret = request_irq(JAZZ_MOUSE_IRQ, handler, 0, "PS/2 Mouse", NULL); + if (ret != 0) + return ret; + + r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, + r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | + JAZZ_IE_MOUSE); + return 0; +} + +static void jazz_aux_free_irq(void) +{ + r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, + r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) + | JAZZ_IE_MOUSE); + free_irq(JAZZ_MOUSE_IRQ, NULL); +} + +static unsigned char jazz_read_input(void) +{ + return jazz_kh->data; +} + +static void jazz_write_output(unsigned char val) +{ + int status; + + do { + status = jazz_kh->command; + } while (status & KBD_STAT_IBF); + jazz_kh->data = val; +} + +static void jazz_write_command(unsigned char val) +{ + int status; + + do { + status = jazz_kh->command; + } while (status & KBD_STAT_IBF); + jazz_kh->command = val; +} + +static unsigned char jazz_read_status(void) +{ + return jazz_kh->command; +} + +struct kbd_ops jazz_kbd_ops = { + jazz_request_region, + jazz_request_irq, + + jazz_aux_request_irq, + jazz_aux_free_irq, + + jazz_read_input, + jazz_write_output, + jazz_write_command, + jazz_read_status +}; diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index e9652344b..0c85b0e1e 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.17 1998/09/20 21:12:19 tsbogend Exp $ +/* $Id: setup.c,v 1.18 1998/10/18 13:19:46 tsbogend Exp $ * * Setup pointers to hardware-dependent routines. * @@ -39,7 +39,6 @@ static void no_action(int cpl, void *dev_id, struct pt_regs *regs) { } static struct irqaction irq2 = { no_action, 0, 0, "cascade", NULL, NULL}; extern asmlinkage void jazz_handle_int(void); -extern void jazz_keyboard_setup(void); extern void jazz_machine_restart(char *command); extern void jazz_machine_halt(void); @@ -47,6 +46,7 @@ extern void jazz_machine_power_off(void); extern struct ide_ops std_ide_ops; extern struct rtc_ops jazz_rtc_ops; +extern struct kbd_ops jazz_kbd_ops; extern struct fd_ops *fd_ops; extern struct fd_ops jazz_fd_ops; @@ -56,7 +56,7 @@ __initfunc(static void jazz_time_init(struct irqaction *irq)) { /* set the clock to 100 Hz */ r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9); - setup_x86_irq(JAZZ_TIMER_IRQ, irq); + i8259_setup_irq(JAZZ_TIMER_IRQ, irq); } __initfunc(static void jazz_irq_setup(void)) @@ -76,7 +76,7 @@ __initfunc(static void jazz_irq_setup(void)) r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9); request_region(0x20, 0x20, "pic1"); request_region(0xa0, 0x20, "pic2"); - setup_x86_irq(2, &irq2); + i8259_setup_irq(2, &irq2); } __initfunc(void jazz_setup(void)) @@ -86,7 +86,6 @@ __initfunc(void jazz_setup(void)) add_wired_entry (0x01800017, 0x01000017, 0xe4000000, PM_4M); irq_setup = jazz_irq_setup; - keyboard_setup = jazz_keyboard_setup; mips_io_port_base = JAZZ_PORT_BASE; isa_slot_offset = 0xe3000000; request_region(0x00,0x20,"dma1"); @@ -105,5 +104,9 @@ __initfunc(void jazz_setup(void)) #endif conswitchp = &dummy_con; rtc_ops = &jazz_rtc_ops; - fd_ops = &jazz_fd_ops; + kbd_ops = &jazz_kbd_ops; +#ifdef CONFIG_PSMOUSE + aux_device_present = 0xaa; +#endif + fd_ops = &jazz_fd_ops; } diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 8bea8ab5b..ef8709bcd 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -26,7 +26,8 @@ endif # SGI's have very different interrupt/timer hardware. # ifndef CONFIG_SGI -O_OBJS += irq.o time.o +O_OBJS += time.o +OX_OBJS += irq.o endif # diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 63b13a94d..a0e141759 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -1,4 +1,5 @@ -/* +/* $Id: irixelf.c,v 1.16 1998/10/28 12:38:11 ralf Exp $ + * * irixelf.c: Code to load IRIX ELF executables which conform to * the MIPS ABI. * @@ -1197,12 +1198,16 @@ static int irix_core_dump(long signr, struct pt_regs * regs) #else corefile[4] = '\0'; #endif - dentry = open_namei(corefile, O_CREAT | 2 | O_TRUNC, 0600); + dentry = open_namei(corefile, O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); if (IS_ERR(dentry)) { inode = NULL; goto end_coredump; } inode = dentry->d_inode; + + if(inode->i_nlink > 1) + goto end_coredump; /* multiple links - don't dump */ + if (!S_ISREG(inode->i_mode)) goto end_coredump; if (!inode->i_op || !inode->i_op->default_file_ops) diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index d0e286def..3aef18cb6 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -3,7 +3,7 @@ * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) * - * $Id: irixsig.c,v 1.11 1998/03/26 07:39:09 ralf Exp $ + * $Id: irixsig.c,v 1.9 1998/03/27 04:47:54 ralf Exp $ */ #include <linux/kernel.h> @@ -568,7 +568,7 @@ static inline unsigned long timespectojiffies(struct timespec *value) asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, struct timespec *tp) { - unsigned long expire = 0; + long expire = MAX_SCHEDULE_TIMEOUT; sigset_t kset; int i, sig, error, timeo = 0; @@ -603,21 +603,21 @@ asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, error = -EINVAL; goto out; } - expire = timespectojiffies(tp)+(tp->tv_sec||tp->tv_nsec)+jiffies; - current->timeout = expire; + expire = timespectojiffies(tp)+(tp->tv_sec||tp->tv_nsec); } while(1) { long tmp = 0; - current->state = TASK_INTERRUPTIBLE; schedule(); + current->state = TASK_INTERRUPTIBLE; + expire = schedule_timeout(expire); for (i=0; i<=4; i++) tmp |= (current->signal.sig[i] & kset.sig[i]); if (tmp) break; - if (tp && expire <= jiffies) { + if (!expire) { timeo = 1; break; } diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 8ae1fc11e..cc4919bff 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c @@ -1,4 +1,4 @@ -/* $Id: irq.c,v 1.11 1998/05/07 23:43:59 ralf Exp $ +/* $Id: irq.c,v 1.12 1998/06/30 00:21:49 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -12,6 +12,7 @@ #include <linux/errno.h> #include <linux/init.h> #include <linux/kernel_stat.h> +#include <linux/module.h> #include <linux/signal.h> #include <linux/sched.h> #include <linux/types.h> @@ -27,9 +28,21 @@ #include <asm/irq.h> #include <asm/mipsregs.h> #include <asm/system.h> +#include <asm/sni.h> -unsigned char cache_21 = 0xff; -unsigned char cache_A1 = 0xff; +/* + * This contains the irq mask for both 8259A irq controllers, it's an + * int so we can deal with the third PIC in some systems like the RM300. + * (XXX This is broken for big endian.) + */ +static unsigned int cached_irq_mask = 0xffff; + +#define __byte(x,y) (((unsigned char *)&(y))[x]) +#define __word(x,y) (((unsigned short *)&(y))[x]) +#define __long(x,y) (((unsigned int *)&(y))[x]) + +#define cached_21 (__byte(0,cached_irq_mask)) +#define cached_A1 (__byte(1,cached_irq_mask)) unsigned int local_bh_count[NR_CPUS]; unsigned int local_irq_count[NR_CPUS]; @@ -39,32 +52,26 @@ unsigned long spurious_count = 0; * (un)mask_irq, disable_irq() and enable_irq() only handle (E)ISA and * PCI devices. Other onboard hardware needs specific routines. */ -static inline void mask_irq(unsigned int irq_nr) +static inline void mask_irq(unsigned int irq) { - unsigned char mask; - - mask = 1 << (irq_nr & 7); - if (irq_nr < 8) { - cache_21 |= mask; - outb(cache_21,0x21); + cached_irq_mask |= 1 << irq; + if (irq & 8) { + outb(cached_A1, 0xa1); } else { - cache_A1 |= mask; - outb(cache_A1,0xA1); + outb(cached_21, 0x21); } +*(volatile char *)PCIMT_CSITPEND; } -static inline void unmask_irq(unsigned int irq_nr) +static inline void unmask_irq(unsigned int irq) { - unsigned char mask; - - mask = ~(1 << (irq_nr & 7)); - if (irq_nr < 8) { - cache_21 &= mask; - outb(cache_21,0x21); + cached_irq_mask &= ~(1 << irq); + if (irq & 8) { + outb(cached_A1, 0xa1); } else { - cache_A1 &= mask; - outb(cache_A1,0xA1); + outb(cached_21, 0x21); } +*(volatile char *)PCIMT_CSITPEND; } void disable_irq(unsigned int irq_nr) @@ -84,13 +91,11 @@ void enable_irq(unsigned int irq_nr) restore_flags(flags); } -/* - * Pointers to the low-level handlers: first the general ones, then the - * fast ones, then the bad ones. - */ -extern void interrupt(void); - -static struct irqaction *irq_action[32] = { +static struct irqaction *irq_action[NR_IRQS] = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -122,6 +127,65 @@ int get_irq_list(char *buf) atomic_t __mips_bh_counter; +static inline void i8259_mask_and_ack_irq(int irq) +{ + cached_irq_mask |= 1 << irq; + + if (irq & 8) { + inb(0xa1); + outb(cached_A1, 0xa1); +inb(0x80); + outb(0x62, 0x20); /* Specific EOI to cascade */ +inb(0x80); + outb(0x20, 0xa0); +inb(0x80); + } else { + inb(0x21); + outb(cached_21, 0x21); +inb(0x80); + outb(0x20, 0x20); +inb(0x80); + } +*(volatile char *)PCIMT_CSITPEND; +} + +asmlinkage void i8259_do_irq(int irq, struct pt_regs *regs) +{ + struct irqaction *action; + int do_random, cpu; + + cpu = smp_processor_id(); + hardirq_enter(cpu); + + if (irq >= 16) + goto out; + + i8259_mask_and_ack_irq(irq); + + kstat.irqs[cpu][irq]++; + + action = *(irq + irq_action); + if (!action) + goto out; + + if (!(action->flags & SA_INTERRUPT)) + __sti(); + action = *(irq + irq_action); + do_random = 0; + do { + do_random |= action->flags; + action->handler(irq, action->dev_id, regs); + action = action->next; + } while (action); + if (do_random & SA_SAMPLE_RANDOM) + add_interrupt_randomness(irq); + __cli(); + unmask_irq (irq); + +out: + hardirq_exit(cpu); +} + /* * do_IRQ handles IRQ's that have been installed without the * SA_INTERRUPT flag: it uses the full signal-handling return @@ -135,23 +199,9 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) int do_random, cpu; cpu = smp_processor_id(); - irq_enter(cpu, irq); + hardirq_enter(cpu); kstat.irqs[cpu][irq]++; - /* - * mask and ack quickly, we don't want the irq controller - * thinking we're snobs just because some other CPU has - * disabled global interrupts (we have already done the - * INT_ACK cycles, it's too late to try to pretend to the - * controller that we aren't taking the interrupt). - * - * Commented out because we've already done this in the - * machinespecific part of the handler. It's reasonable to - * do this here in a highlevel language though because that way - * we could get rid of a good part of duplicated code ... - */ - /* mask_and_ack_irq(irq); */ - action = *(irq + irq_action); if (action) { if (!(action->flags & SA_INTERRUPT)) @@ -165,21 +215,14 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) } while (action); if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - unmask_irq (irq); __cli(); } - irq_exit(cpu, irq); + hardirq_exit(cpu); /* unmasking and bottom half handling is done magically for us. */ } -/* - * Used only for setup of PC style interrupts and therefore still - * called setup_x86_irq. Later on I'll provide a machine specific - * function with similar purpose. Idea is to put all interrupts - * in a single table and differenciate them just by number. - */ -int setup_x86_irq(int irq, struct irqaction * new) +int i8259_setup_irq(int irq, struct irqaction * new) { int shared = 0; struct irqaction *old, **p; @@ -216,11 +259,15 @@ int setup_x86_irq(int irq, struct irqaction * new) return 0; } +/* + * Request_interrupt and free_interrupt ``sort of'' handle interrupts of + * non i8259 devices. They will have to be replaced by architecture + * specific variants. For now we still use this as broken as it is because + * it used to work ... + */ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), - unsigned long irqflags, - const char * devname, - void *dev_id) + unsigned long irqflags, const char * devname, void *dev_id) { int retval; struct irqaction * action; @@ -241,7 +288,7 @@ int request_irq(unsigned int irq, action->next = NULL; action->dev_id = dev_id; - retval = setup_x86_irq(irq, action); + retval = i8259_setup_irq(irq, action); if (retval) kfree(action); @@ -275,7 +322,7 @@ void free_irq(unsigned int irq, void *dev_id) unsigned long probe_irq_on (void) { - unsigned int i, irqs = 0, irqmask; + unsigned int i, irqs = 0; unsigned long delay; /* first, enable any unassigned (E)ISA irqs */ @@ -291,19 +338,17 @@ unsigned long probe_irq_on (void) /* about 100ms delay */; /* now filter out any obviously spurious interrupts */ - irqmask = (((unsigned int)cache_A1)<<8) | (unsigned int)cache_21; - return irqs & ~irqmask; + return irqs & ~cached_irq_mask; } int probe_irq_off (unsigned long irqs) { - unsigned int i, irqmask; + unsigned int i; - irqmask = (((unsigned int)cache_A1)<<8) | (unsigned int)cache_21; #ifdef DEBUG printk("probe_irq_off: irqs=0x%04x irqmask=0x%04x\n", irqs, irqmask); #endif - irqs &= irqmask; + irqs &= cached_irq_mask; if (!irqs) return 0; i = ffz(~irqs); @@ -314,13 +359,36 @@ int probe_irq_off (unsigned long irqs) int (*irq_cannonicalize)(int irq); -static int i8259a_irq_cannonicalize(int irq) +static int i8259_irq_cannonicalize(int irq) { return ((irq == 2) ? 9 : irq); } +__initfunc(static void i8259_init(void)) +{ + /* Init master interrupt controller */ + outb(0x11, 0x20); /* Start init sequence */ + outb(0x00, 0x21); /* Vector base */ + outb(0x04, 0x21); /* edge tiggered, Cascade (slave) on IRQ2 */ + outb(0x01, 0x21); /* Select 8086 mode */ + outb(0xff, 0x21); /* Mask all */ + + /* Init slave interrupt controller */ + outb(0x11, 0xa0); /* Start init sequence */ + outb(0x08, 0xa1); /* Vector base */ + outb(0x02, 0xa1); /* edge triggered, Cascade (slave) on IRQ2 */ + outb(0x01, 0xa1); /* Select 8086 mode */ + outb(0xff, 0xa1); /* Mask all */ + + outb(cached_A1, 0xa1); + outb(cached_21, 0x21); +} + __initfunc(void init_IRQ(void)) { - irq_cannonicalize = i8259a_irq_cannonicalize; + irq_cannonicalize = i8259_irq_cannonicalize; + /* i8259_init(); */ irq_setup(); } + +EXPORT_SYMBOL(irq_cannonicalize); diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c index 5267ea96b..df8148add 100644 --- a/arch/mips/kernel/mips_ksyms.c +++ b/arch/mips/kernel/mips_ksyms.c @@ -1,4 +1,4 @@ -/* $Id: mips_ksyms.c,v 1.8 1998/06/30 00:21:50 ralf Exp $ +/* $Id: mips_ksyms.c,v 1.9 1998/09/19 19:16:16 ralf Exp $ * * Export MIPS-specific functions needed for loadable modules. * @@ -55,16 +55,19 @@ EXPORT_SYMBOL(clear_page); EXPORT_SYMBOL(__mips_bh_counter); EXPORT_SYMBOL(local_bh_count); EXPORT_SYMBOL(local_irq_count); +//EXPORT_SYMBOL(enable_irq); +//EXPORT_SYMBOL(disable_irq); +EXPORT_SYMBOL(kernel_thread); /* * Userspace access stuff. */ -EXPORT_SYMBOL(__copy_user); -EXPORT_SYMBOL(__bzero); -EXPORT_SYMBOL(__strncpy_from_user_nocheck_asm); -EXPORT_SYMBOL(__strncpy_from_user_asm); -EXPORT_SYMBOL(__strlen_user_nocheck_asm); -EXPORT_SYMBOL(__strlen_user_asm); +EXPORT_SYMBOL_NOVERS(__copy_user); +EXPORT_SYMBOL_NOVERS(__bzero); +EXPORT_SYMBOL_NOVERS(__strncpy_from_user_nocheck_asm); +EXPORT_SYMBOL_NOVERS(__strncpy_from_user_asm); +EXPORT_SYMBOL_NOVERS(__strlen_user_nocheck_asm); +EXPORT_SYMBOL_NOVERS(__strlen_user_asm); /* Networking helper routines. */ @@ -109,7 +112,3 @@ EXPORT_SYMBOL(__compute_return_epc); EXPORT_SYMBOL(register_fpe); EXPORT_SYMBOL(unregister_fpe); #endif - -#if CONFIG_PCI -EXPORT_SYMBOL(pci_devices); -#endif diff --git a/arch/mips/kernel/pci.c b/arch/mips/kernel/pci.c index de5834320..992e893a2 100644 --- a/arch/mips/kernel/pci.c +++ b/arch/mips/kernel/pci.c @@ -1,4 +1,4 @@ -/* $Id: pci.c,v 1.5 1998/05/07 23:44:00 ralf Exp $ +/* $Id: pci.c,v 1.6 1998/08/25 09:14:40 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -42,7 +42,7 @@ int pcibios_present (void) */ void pcibios_fixup (void) { - return pci_ops->pcibios_fixup(); + pci_ops->pcibios_fixup(); } int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn, @@ -90,9 +90,4 @@ __initfunc(void pcibios_fixup_bus(struct pci_bus *bus)) { } -__initfunc(char *pcibios_setup(char *str)) -{ - return str; -} - #endif /* defined(CONFIG_PCI) */ diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index ed7ee40b2..3143829dc 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.11 1998/08/17 12:14:53 ralf Exp $ +/* $Id: process.c,v 1.10 1998/08/25 09:14:40 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -145,3 +145,40 @@ void dump_thread(struct pt_regs *regs, struct user *dump) memcpy(&dump->regs[0], regs, sizeof(struct pt_regs)); memcpy(&dump->regs[EF_SIZE/4], ¤t->tss.fpu, sizeof(current->tss.fpu)); } + +/* + * Create a kernel thread + */ +pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) +{ + long retval; + + __asm__ __volatile__( + ".set\tnoreorder\n\t" + "move\t$6,$sp\n\t" + "move\t$4,%5\n\t" + "li\t$2,%1\n\t" + "syscall\n\t" + "beq\t$6,$sp,1f\n\t" + "subu\t$sp,32\n\t" /* delay slot */ + "jalr\t%4\n\t" + "move\t$4,%3\n\t" /* delay slot */ + "move\t$4,$2\n\t" + "li\t$2,%2\n\t" + "syscall\n" + "1:\taddiu\t$sp,32\n\t" + "move\t%0,$2\n\t" + ".set\treorder" + :"=r" (retval) + :"i" (__NR_clone), "i" (__NR_exit), + "r" (arg), "r" (fn), + "r" (flags | CLONE_VM) + /* + * The called subroutine might have destroyed any of the + * at, result, argument or temporary registers ... + */ + :"$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", + "$9","$10","$11","$12","$13","$14","$15","$24","$25"); + + return retval; +} diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 1acdc31eb..ac7bfb771 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -1,4 +1,4 @@ -/* $Id: ptrace.c,v 1.8 1998/07/16 19:10:01 ralf Exp $ +/* $Id: ptrace.c,v 1.9 1998/09/19 19:16:16 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -344,8 +344,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) goto out; } - /* read the word at location addr in the USER area. */ -/* #define DEBUG_PEEKUSR */ + /* Read the word at location addr in the USER area. */ case PTRACE_PEEKUSR: { struct pt_regs *regs; unsigned long tmp; @@ -353,12 +352,15 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) regs = (struct pt_regs *) ((unsigned long) child + KERNEL_STACK_SIZE - 32 - sizeof(struct pt_regs)); tmp = 0; /* Default return value. */ - if (addr < 32 && addr >= 0) - tmp = regs->regs[addr]; - else if (addr >= 32 && addr < 64) { - unsigned long long *fregs; + switch(addr) { + case 0 ... 31: + tmp = regs->regs[addr]; + break; + case FPR_BASE ... FPR_BASE + 31: if (child->used_math) { + unsigned long long *fregs; + if (last_task_used_math == child) { enable_cp1(); r4xx0_save_fp(child); @@ -371,35 +373,32 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) } else { tmp = -1; /* FP not yet used */ } - } else { - addr -= 64; - switch(addr) { - case 0: - tmp = regs->cp0_epc; - break; - case 1: - tmp = regs->cp0_cause; - break; - case 2: - tmp = regs->cp0_badvaddr; - break; - case 3: - tmp = regs->lo; - break; - case 4: - tmp = regs->hi; - break; - case 5: - tmp = child->tss.fpu.hard.control; - break; - case 6: /* implementation / version register */ - tmp = 0; /* XXX */ - break; - default: - tmp = 0; - res = -EIO; - goto out; - } + break; + case PC: + tmp = regs->cp0_epc; + break; + case CAUSE: + tmp = regs->cp0_cause; + break; + case BADVADDR: + tmp = regs->cp0_badvaddr; + break; + case MMHI: + tmp = regs->hi; + break; + case MMLO: + tmp = regs->lo; + break; + case FPC_CSR: + tmp = child->tss.fpu.hard.control; + break; + case FPC_EIR: /* implementation / version register */ + tmp = 0; /* XXX */ + break; + default: + tmp = 0; + res = -EIO; + goto out; } res = put_user(tmp, (unsigned long *) data); goto out; @@ -411,16 +410,16 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) goto out; case PTRACE_POKEUSR: { + unsigned long long *fregs; struct pt_regs *regs; int res = 0; - regs = (struct pt_regs *) ((unsigned long) child + - KERNEL_STACK_SIZE - 32 - sizeof(struct pt_regs)); - if (addr < 32 && addr >= 0) - regs->regs[addr] = data; - else if (addr >= 32 && addr < 64) { - unsigned long long *fregs; - + switch (addr) { + case 0 ... 31: + regs = (struct pt_regs *) ((unsigned long) child + + KERNEL_STACK_SIZE - 32 - sizeof(struct pt_regs)); + break; + case FPR_BASE ... FPR_BASE + 31: if (child->used_math) { if (last_task_used_math == child) { enable_cp1(); @@ -437,26 +436,23 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) fregs = (unsigned long long *) &child->tss.fpu.hard.fp_regs[0]; fregs[(addr - 32)] = (unsigned long long) data; - } else { - addr -= 64; - switch (addr) { - case 0: - regs->cp0_epc = data; - break; - case 3: - regs->lo = data; - break; - case 4: - regs->hi = data; - break; - case 5: - child->tss.fpu.hard.control = data; - break; - default: - /* The rest are not allowed. */ - res = -EIO; - break; - }; + break; + case PC: + regs->cp0_epc = data; + break; + case MMHI: + regs->hi = data; + break; + case MMLO: + regs->lo = data; + break; + case FPC_CSR: + child->tss.fpu.hard.control = data; + break; + default: + /* The rest are not allowed. */ + res = -EIO; + break; } goto out; } @@ -484,8 +480,8 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) */ case PTRACE_KILL: { if (child->state != TASK_ZOMBIE) { - wake_up_process(child); child->exit_code = SIGKILL; + wake_up_process(child); } res = 0; goto out; @@ -497,11 +493,11 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) goto out; } child->flags &= ~(PF_PTRACED|PF_TRACESYS); - wake_up_process(child); child->exit_code = data; REMOVE_LINKS(child); child->p_pptr = child->p_opptr; SET_LINKS(child); + wake_up_process(child); res = 0; goto out; } diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 038e64205..dc9e51d72 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.9 1998/08/25 09:14:40 ralf Exp $ +/* $Id: setup.c,v 1.10 1998/10/18 13:25:32 tsbogend Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -91,6 +91,9 @@ struct ide_ops *ide_ops; extern struct rtc_ops no_rtc_ops; struct rtc_ops *rtc_ops; +extern struct kbd_ops no_kbd_ops; +struct kbd_ops *kbd_ops; + /* * Setup information * @@ -170,6 +173,7 @@ __initfunc(void setup_arch(char **cmdline_p, #endif rtc_ops = &no_rtc_ops; + kbd_ops = &no_kbd_ops; switch(mips_machgroup) { diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index d1c2da72a..056a268eb 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c @@ -1,4 +1,4 @@ -/* $Id: sysirix.c,v 1.12 1998/08/17 10:16:27 ralf Exp $ +/* $Id: sysirix.c,v 1.12 1998/08/25 09:14:42 ralf Exp $ * * sysirix.c: IRIX system call emulation. * @@ -1081,13 +1081,8 @@ out: asmlinkage int irix_sginap(int ticks) { - lock_kernel(); - if(ticks) { - current->timeout = ticks + jiffies; - current->state = TASK_INTERRUPTIBLE; - } - schedule(); - unlock_kernel(); + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(ticks); return 0; } diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index bf056a122..0f5954039 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -1,12 +1,10 @@ -/* - * linux/arch/mips/kernel/time.c +/* $Id: time.c,v 1.7 1998/08/28 23:29:33 tsbogend Exp $ * * Copyright (C) 1991, 1992, 1995 Linus Torvalds + * Copyright (C) 1996, 1997, 1998 Ralf Baechle * * This file contains the time handling details for PC-style clocks as * found in some MIPS systems. - * - * $Id: time.c,v 1.6 1998/08/25 09:14:43 ralf Exp $ */ #include <linux/errno.h> #include <linux/init.h> @@ -463,7 +461,7 @@ void (*board_time_init)(struct irqaction *irq); __initfunc(void time_init(void)) { - unsigned int year, mon, day, hour, min, sec; + unsigned int epoch, year, mon, day, hour, min, sec; int i; /* The Linux interpretation of the CMOS clock register contents: @@ -495,13 +493,17 @@ __initfunc(void time_init(void)) BCD_TO_BIN(mon); BCD_TO_BIN(year); } -#if 0 /* the IBM way */ - if ((year += 1900) < 1970) - year += 100; -#else - /* Acer PICA clock starts from 1980. True for all MIPS machines? */ - year += 1980; -#endif + + /* Attempt to guess the epoch. This is the same heuristic as in rtc.c so + no stupid things will happen to timekeeping. Who knows, maybe Ultrix + also uses 1952 as epoch ... */ + if (year > 10 && year < 44) { + epoch = 1980; + } else if (year < 96) { + epoch = 1952; + } + year += epoch; + xtime.tv_sec = mktime(year, mon, day, hour, min, sec); xtime.tv_usec = 0; |