diff -ur --new-file old/linux/CREDITS new/linux/CREDITS --- old/linux/CREDITS Tue Oct 20 23:17:45 1998 +++ new/linux/CREDITS Thu Jan 28 20:25:04 1999 @@ -16,6 +16,13 @@ S: (ask for current address) S: Finland +N: Dave Airlie +E: airlied@linux.ie +W: http://www.csn.ul.ie/~airlied +D: NFS over TCP patches +S: University of Limerick +S: Ireland + N: Werner Almesberger E: werner.almesberger@lrc.di.epfl.ch D: dosfs, LILO, some fd features, various other hacks here and there @@ -42,12 +49,12 @@ N: Erik Andersen E: andersee@debian.org -W: http://www.inconnect.com/~andersen +W: http://www.xmission.com/~andersen P: 1024/FC4CFFED 78 3C 6A 19 FA 5D 92 5A FB AC 7B A5 A5 E1 FF 8E D: Maintainer of ide-cd and Uniform CD-ROM driver, D: ATAPI CD-Changer support, Major 2.1.x CD-ROM update. S: 4538 South Carnegie Tech Street -S: West Valley City, Utah 84120 +S: Salt Lake City, Utah 84120 S: USA N: H. Peter Anvin @@ -84,6 +91,14 @@ S: Cambridge, Massachusetts 02139 S: USA +N: Jens Axboe +E: axboe@image.dk +D: Linux CD-ROM maintainer +D: jiffies wrap fixes + schedule timeouts depending on HZ == 100 +S: Peter Bangs Vej 258, 2TH +S: 2500 Valby +S: Denmark + N: John Aycock E: aycock@cpsc.ucalgary.ca D: Adaptec 274x driver @@ -139,7 +154,8 @@ E: kgb@manjak.knm.org.pl P: 1024/FA6F16D1 96 D1 1A CF 5F CA 69 EC F9 4F 36 1F 6D 60 7B DA D: Maintainer of the System V file system. -D: SystemV fs update for 2.1.x dcache. +D: System V fs update for 2.1.x dcache. +D: Forward ported a couple of SCSI drivers. D: Various bugfixes. S: ul. Koscielna 12a S: 62-300 Wrzesnia @@ -265,6 +281,14 @@ S: Trafford, Pennsylvania 15085 S: USA +N: Dag Brattli +E: dagb@cs.uit.no +W: http://www.cs.uit.no/~dagb +D: IrDA Subsystem +S: 19. Wellington Road +S: Lancaster, LA1 4DN +S: UK, England + N: Andries Brouwer E: aeb@cwi.nl D: random Linux hacker @@ -338,10 +362,12 @@ S: USA N: Juan Jose Ciarlante +W: http://juanjox.linuxhq.com/ E: jjciarla@raiz.uncu.edu.ar -E: juanjo@irriga.uncu.edu.ar +E: jjo@mendoza.gov.ar D: Network driver alias support D: IP masq hashing and app modules +D: IP masq 2.1 features and bugs S: Las Cuevas 2385 - Bo Guemes S: Las Heras, Mendoza CP 5539 S: Argentina @@ -353,6 +379,11 @@ S: East Malvern, Victoria, 3145 S: Australia +N: Neil Conway +E: nconway.list@ukaea.org.uk +D: Assorted sched/mm titbits +S: Oxfordshire, UK. + N: Alan Cox W: http://roadrunner.swansea.linux.org.uk/alan.shtml E: alan@lxorguk.ukuu.org.uk @@ -429,12 +460,21 @@ 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 S: USA +N: Oleg Drokin +E: green@ccssu.crimea.ua +W: http://www.ccssu.crimea.ua/~green +D: Cleaning up sound drivers. +S: Skvoznoy per., 14a +S: Evpatoria +S: Crimea +S: UKRAINE, 334320 + N: Thomas Dunbar E: tdunbar@vtaix.cc.vt.edu D: TeX & METAFONT hacking/maintenance @@ -642,6 +682,17 @@ S: Sterling Heights, Michigan 48313 S: USA +N: Tristan Greaves +E: Tristan.Greaves@icl.com +E: tmg296@ecs.soton.ac.uk +W: http://www.ecs.soton.ac.uk/~tmg296 +D: Miscellaneous ipv4 sysctl patches +S: 15 Little Mead +S: Denmead +S: Hampshire +S: PO7 6HS +S: United Kingdom + N: Michael A. Griffith E: grif@cs.ucr.edu W: http://www.cs.ucr.edu/~grif @@ -721,9 +772,9 @@ S: Germany N: Richard Henderson +E: rth@twiddle.net E: rth@cygnus.com -E: richard@gnu.org -D: Alpha/ELF, gcc, binutils, and glibc +D: Alpha hacker, kernel and userland S: 50 E. Middlefield #10 S: Mountain View, California 94043 S: USA @@ -863,6 +914,16 @@ S: 160 00 Praha 6 S: Czech Republic +N: Niels Kristian Bech Jensen +E: nkbj@image.dk +W: http://www.image.dk/~nkbj +D: 4.4BSD and NeXTstep filesystem support in the old ufs. +D: Openstep filesystem support in the new ufs. +D: Danish HOWTO, Linux+FreeBSD mini-HOWTO. +S: Dr. Holsts Vej 34, lejl. 164 +S: DK-8230 Ĺbyhřj +S: Denmark + N: Michael K. Johnson E: johnsonm@redhat.com W: http://www.redhat.com/~johnsonm @@ -887,6 +948,17 @@ S: 8103 Rein S: Austria +N: Jan "Yenya" Kasprzak +E: kas@fi.muni.cz +D: Author of the COSA/SRP sync serial board driver. +D: Port of the syncppp.c from the 2.0 to the 2.1 kernel. +P: 1024/D3498839 0D 99 A7 FB 20 66 05 D7 8B 35 FC DE 05 B1 8A 5E +W: http://www.fi.muni.cz/~kas/ +S: c/o Faculty of Informatics, Masaryk University +S: Botanicka' 68a +S: 602 00 Brno +S: Czech Republic + N: Fred N. van Kempen E: waltje@uwalt.nl.mugnet.org D: NET-2 @@ -933,6 +1005,17 @@ S: San Jose, California 95161-1311 S: USA +N: Thorsten Knabe +E: Thorsten Knabe +E: Thorsten Knabe +W: http://www.student.informatik.tu-darmstadt.de/~tek +W: http://www.tu-darmstadt.de/~tek01 +P: 1024/3BC8D885 8C 29 C5 0A C0 D1 D6 F4 20 D4 2D AB 29 F6 D0 60 +D: AD1816 sound driver +S: Am Bergfried 10 +S: 63225 Langen +S: Germany + N: Alain L. Knaff E: Alain.Knaff@poboxes.com D: floppy driver @@ -1026,11 +1109,11 @@ S: The Netherlands N: Volker Lendecke -E: lendecke@namu01.Num.Math.Uni-Goettingen.de +E: vl@kki.org D: Kernel smbfs (to mount WfW, NT and OS/2 network drives.) D: NCP filesystem support (to mount NetWare volumes) -S: Innersteweg 11 -S: 37081 Goettingen +S: Von Ossietzky Str. 12 +S: 37085 Goettingen S: Germany N: Kevin Lentin @@ -1076,8 +1159,8 @@ N: Mark Lord E: mlord@pobox.com -D: Author of IDE driver (ide.c), hd.c support -D: Triton Bus Master IDE driver +D: EIDE driver, hd.c support +D: EIDE PCI and bus-master DMA support D: Hard Disk Parameter (hdparm) utility S: 33 Ridgefield Cr S: Nepean, Ontario @@ -1116,11 +1199,11 @@ 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 @@ -1211,6 +1294,14 @@ S: D-90453 Nuernberg S: Germany +N: Arnaldo Carvalho de Melo +E: acme@conectiva.com.br +D: wanrouter hacking +D: cyclades 2X sync card driver (still in early devel stage) +S: R. Prof. Rubens Elke Braga, 558 - Parolin +S: 80220-320 Curitiba - Parana +S: Brazil + N: Michael Meskes E: meskes@debian.org P: 1024/04B6E8F5 6C 77 33 CA CC D6 22 03 AB AB 15 A3 AE AD 39 7D @@ -1423,6 +1514,15 @@ D: implemented kmod D: modularized BSD Unix domain sockets +N: Reed H. Petty +E: rhp@draper.net +W: http://www.draper.net +D: Loop device driver extensions +D: Encryption transfer modules (no export) +S: Post Office Box 1815 +S: Harrison, Arkansas 72602-1815 +S: USA + N: Kai Petzke E: wpp@marie.physik.tu-berlin.de W: http://physik.tu-berlin.de/~wpp @@ -1495,8 +1595,8 @@ S: France N: Rik van Riel -E: H.H.vanRiel@phys.uu.nl -W: http://www.phys.uu.nl/~riel/ +E: H.H.vanRiel@humbolt.geo.uu.nl +W: http://humbolt.geo.uu.nl/ D: Maintainer of the mm-patches page (see www.linuxhq.com) D: Documentation/sysctl/*, kswapd fixes, random kernel hacker S: Vorenkampsweg 1 @@ -1545,9 +1645,17 @@ E: rubini@ipvvis.unipv.it D: the gpm mouse server and kernel support for it +N: Philipp Rumpf +E: prumpf@jcsbs.lanobis.de +D: ipi_count for x86 +D: random bugfixes +S: Rueting 4 +S: 23743 Groemitz +S: Germany + N: Paul Russell E: Paul.Russell@rustcorp.com.au -W: http://www.adelaide.net.au/~rustcorp +W: http://www.rustcorp.com D: Ruggedly handsome. D: Developed Generic IP Firewalling Chains with Michael Neuling. @@ -1587,6 +1695,11 @@ S: B2240 Zandhoven S: Belgium +N: Henning P. Schmiedehausen +E: hps@tanstaafl.de +D: added PCI support to the serial driver +S: Buckenhof, Germany + N: Martin Schulze E: joey@linux.de W: http://home.pages.de/~joey/ @@ -1614,11 +1727,11 @@ S: USA N: Mike Shaver -E: shaver@netscape.com -W: http://people.netscape.com/shaver/ +E: shaver@hungry.org +W: http://www.hungry.org/~shaver/ D: MIPS work, /proc/sys/net, misc net hacking S: 149 Union St. -S: Ottawa, Ontario +S: Kingston, Ontario S: Canada K7L 2P4 N: John Shifflett @@ -1629,6 +1742,16 @@ S: San Jose, California S: USA +N: Jaspreet Singh +E: jaspreet@sangoma.com +W: www.sangoma.com +D: WANPIPE driver for Sangoma S508/FT1 cards +S: Sangoma Technologies Inc., +S: 1001 Denison Street +S: Suite 101 +S: Markham, Ontario L3R 2Z6 +S: Canada + N: Rick Sladkey E: jrs@world.std.com D: utility hacker: Emacs, NFS server, mount, kmem-ps, UPS debugger, strace, GDB @@ -1677,11 +1800,12 @@ 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 @@ -1911,6 +2035,11 @@ 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 @@ -1940,7 +2069,8 @@ N: Steven Whitehouse E: SteveW@ACM.org -D: Linux DECnet project: http://eeshack3.swan.ac.uk/~gw7rrm/DECnet/index.html +W: http://www-sigproc.eng.cam.ac.uk/~sjw44/ +D: Linux DECnet project: http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html D: Minor debugging of other networking protocols. N: Hans-Joachim Widmaier @@ -1965,6 +2095,14 @@ S: 6525 EZ Nijmegen S: The Netherlands +N: Ulrich Windl +E: Ulrich.Windl@rz.uni-regensburg.de +P: 1024/E843660D CF D7 43 A1 5A 49 14 25 7C 04 A0 6E 4C 3A AC 6D +D: Supports NTP on Linux. Added PPS code. Fixed bugs in adjtimex(). +S: Alte Regensburger Str. 11a +S: 93149 Nittenau +S: Germany + N: Lars Wirzenius E: liw@iki.fi D: Linux System Administrator's Guide @@ -2005,7 +2143,7 @@ S: The Netherlands N: David Woodhouse -E: Dave@mvhi.com +E: David.Woodhouse@mvhi.com E: Dave@imladris.demon.co.uk D: Extensive ARCnet rewrite D: ARCnet COM20020, COM90xx IO-MAP drivers @@ -2064,7 +2202,7 @@ 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 -ur --new-file old/linux/Documentation/00-INDEX new/linux/Documentation/00-INDEX --- old/linux/Documentation/00-INDEX Wed Jun 24 23:30:07 1998 +++ new/linux/Documentation/00-INDEX Fri Dec 18 23:01:48 1998 @@ -111,10 +111,10 @@ - how to set up linux with a serial line console as the default. smart-config.txt - description of the Smart Config makefile feature. -smp - - how to setup the kernel for SMP smp.tex - TeX document describing implementation of Multiprocessor Linux +smp.txt + - a few more notes on symmetric multi-processing sound/ - directory with info on sound card support specialix.txt diff -ur --new-file old/linux/Documentation/Changes new/linux/Documentation/Changes --- old/linux/Documentation/Changes Tue Oct 20 22:18:23 1998 +++ new/linux/Documentation/Changes Tue Jan 19 18:48:01 1999 @@ -2,13 +2,13 @@ ===== This document is designed to provide a list of the minimum levels of -software necessary to run the 2.1.x kernels, as well as provide brief +software necessary to run the 2.2 kernels, as well as provide brief instructions regarding any other "Gotchas" users may encounter when trying life on the Bleeding Edge. If upgrading from a pre-2.0.x kernel, please consult the Changes file included with 2.0.x kernels for additional information; most of that information will not be repeated here. Basically, this document assumes that your system is already -functional and running at least 2.0.x. +functional and running at least 2.0.x kernels. It is originally based on my "Changes" file for 2.0.x kernels and therefore owes credit to the same people as that file (Jared Mauch, @@ -33,7 +33,7 @@ Also, don't forget http://www.linuxhq.com/ for all your Linux kernel needs. -Last updated: October 9, 1998 +Last updated: January 18, 1999 Current Author: Chris Ricker (kaboom@gatech.edu or chris.ricker@m.cc.utah.edu). Current Minimal Requirements @@ -51,19 +51,18 @@ - 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.9 ; ps --version -- Procinfo 14 ; procinfo -v +- Procinfo 15 ; procinfo -v - Psmisc 17 ; pstree -V -- Mount 2.7l ; mount --version -- Net-tools 1.45 ; hostname -V +- Net-tools 1.49 ; hostname -V - Loadlin 1.6a - Sh-utils 1.16 ; basename --v -- Autofs 0.3.11 ; automount --version -- NFS 2.2beta37 ; showmount --version +- Autofs 3.1.1 ; automount --version +- NFS 2.2beta40 ; showmount --version - Bash 1.14.7 ; bash -version - Ncpfs 2.2.0 ; ncpmount -v -- Pcmcia-cs 3.0.5 ; cardmgr -V +- Pcmcia-cs 3.0.7 ; cardmgr -V - PPP 2.3.5 ; pppd -v -- PCI Utilities 1.08 ; lspci --version +- Util-linux 2.9g ; chsh -v Upgrade notes ************* @@ -82,15 +81,18 @@ ttyS1, etc.). In addition, some software still works, but needs to be compiled -against 2.1 headers for complete functionality. Fdutils binaries +against 2.2 headers for complete functionality. Fdutils binaries compiled under 2.0 or earlier kernels should be replaced with ones -compiled under 2.1, for example. +compiled under 2.2, for example. - As of 2.1.115, Unix98 pty support was added as an option, and -support for the deprecated major 4 /dev/ttyp* devices was removed. If -necessary (eg, you get "out of pty" error messages when you obviously -are not out of pty's), create major 3 /dev/tty* and major 2 /dev/pty* -devices (see Documentation/devices.txt for more information). If you + As of 2.1.115, support for the deprecated major 4 /dev/ttyp* devices +was removed. If necessary (eg, you get "out of pty" error messages when +you obviously are not out of pty's), create major 3 /dev/tty* and major +2 /dev/pty* devices (see Documentation/devices.txt for more +information). In general, you should make sure that your /dev +directory is up-to-date if you are experiencing any problems. + + Optional support for Unix98 pty devices has also been added. If you want to use the Unix98 ptys, you should be running at least glibc-2.0.9x, and you must switch completely to Unix98 pty's. The general procedure for configuring Unix98 pty support is: @@ -119,10 +121,10 @@ Libc (libc5) ============ - Linux-2.1.x is ELF-only. You can still compile a.out apps if you + Linux-2.2 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 currently compile ELF, consult the ELF howto at -http://sunsite.unc.edu/mdw/HOWTO/ELF-HOWTO.html and upgrade your system +http://metalab.unc.edu/mdw/HOWTO/ELF-HOWTO.html and upgrade your system accordingly. For modules to work, you need to be running libc-5.4.x or greater. @@ -143,8 +145,8 @@ you're using NIS. If you upgrade to libc-5.4.46, please read and pay attention to its -accompanying release notes. The section about it breaking make is not -a joke. +accompanying release notes. The section about it breaking make is not a +joke. GNU libc (libc6) ================ @@ -163,8 +165,8 @@ Modules ======= - 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. + You need to upgrade to the latest version of modutils for the Linux +2.2 kernel. This version will also work with your 2.0 kernel. As of 2.1.90-pre1, kerneld has been replaced by a kernel thread, kmod. See Documentation/kmod.txt for more information. The main @@ -199,7 +201,7 @@ Note that the latest compilers (egcs, pgcc, gcc 2.8) may do Bad Things while compiling your kernel, particularly if absurd optimizations (like -O9) are used. Caveat emptor. Currently, the only -C compiler available in a binary distribution is egcs. Version 1.0.2 +C compiler available in a binary distribution is egcs. Version 1.0.3 seems okay; if you have to have a binary, you may be successful using that. In general, however, gcc-2.7.2.3 is known to be stable, while egcs and others have not been as thoroughly tested yet. @@ -225,9 +227,6 @@ To turn on IP forwarding, issue the following command: echo 1 > /proc/sys/net/ipv4/ip_forward - To run bootpd, you'll need to issue the following command: echo 1 ->/proc/sys/net/ipv4/ip_boot_agent - Similar procedures are necessary to turn on other features. If something appears broken, check the /proc/sys/net/ipv4/ directory. "1" generally denotes enabled, while "0" generally denotes disabled. @@ -239,11 +238,17 @@ As of 2.1.102, the IP firewalling code has been replaced; ipfwadm 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. +http://www.rustcorp.com/linux/ipchains/ , and use that instead of +ipfwadm. + + To use masq forwarding you will need to obtain "ipmasqadm," +available from http://juanjox.linuxhq.com/ . + + DHCP clients for 2.0 do not work with the new networking code in the +2.2 kernel. You will need to upgrade your dhcpcd / dhcpclient. - To use port forwarding and auto forwarding you will need to obtain -"ipmasqadm," available from http://juanjox.home.ml.org/. + The ISDN code in the stock 2.0 kernel may not work for you. If it +doesn't, look in ftp://ftp.suse.com/pub/isdn4linux for updated versions. Memory ====== @@ -252,16 +257,23 @@ many memory utils, which have to be upgraded. Get the new procps-1.2 and you should be set. -Mount and network file systems -============================== +Network File System +=================== The NFS code in the kernel is currently being revised, resulting in -much-improved performance. As a result, you'll need to upgrade mount -to a recent 2.6 release. Also, amd is being phased out in favor of the -much better autofs. You'll also have to get the appropriate utils to -use autofs as well as the new NFS utils. In addition, you have the +much-improved performance. Also, amd is being phased out in favor of +the much better autofs. You'll also have to get the appropriate utils +to use autofs as well as the new NFS utils. In addition, you have the choice of user-land NFS or kernel-level NFS (knfs). +Util-linux (including mount) +============================ + + Among other changes made in the development of Linux kernel 2.2, the +128 meg limit on IA32 swap partition sizes has been eliminated. To use +larger swap spaces, you need the new mkswap found in util-linux. You +also need to upgrade util-linux to get the latest version of mount. + RPM === @@ -271,8 +283,8 @@ DOSEMU ====== - A new "stable" version of DOSEMU is available for 2.1.x kernels. -Upgrade to 0.66.7 or later. + A new "stable" version of DOSEMU is available for 2.2 kernels. +Upgrade to 0.98.4 or later. Loadlin ======= @@ -295,7 +307,9 @@ parallel port may no longer be where you expect it; for example, LPT1 (under DOS) was sometimes /dev/lp1 in Linux, but will probably be /dev/lp0 with the new Plug-and-Play driver. If printing breaks with -the new driver, try checking your lpd configuration. +the new driver, try checking your lpd configuration. A good source of +more information is the Documentation/parport.txt file included with +the kernel. Setserial ========= @@ -319,6 +333,15 @@ cause problems when compiling modules. Upgrade to at least 1.14 to fix this problem. +Sysklogd +======== + + Older versions of sysklogd sometimes segfault under 2.2 kernels. +Upgrading to the latest release fixes that problem as well as adding +support for new features like system power-off on halt (with +appropriate incantations of halt; see the man page) and automatic +decoding of kernel oopses. + Ncpfs ===== @@ -329,8 +352,13 @@ ===== To mount SMB (Samba / Windows) shares, you'll need to use the -smbmount utility included with recent Samba releases. +smbmount utility included with release 2.0 of Samba. Documentation/filesystems/smbfs.txt has more information about this. +Note that smbmount must have been built against 2.2 headers to work +with 2.2; if all else fails, recompile it and hope it works ;-). In +addition, Mike Warfield has a script and some information at +http://www.wittsend.com/mhw/smbmount.html that you will probably find +useful. Pcmcia-cs ========= @@ -347,19 +375,74 @@ iBCS ==== - A new version of iBCS is necessary for 2.1 kernels. + A new version of iBCS is necessary for 2.2 kernels. AppleTalk ========= Use the Asun version of netatalk for AppleTalk support, as Umich's -version is not compatible with 2.1 kernels. +version is not compatible with 2.2 kernels. Psmisc ====== fuser, which comes with psmisc, reads /proc/*/fd/* to do its job. -Upgrade psmisc if 2.1 changes to /proc broke the version you're using. +Upgrade psmisc if 2.2 changes to /proc broke the version you're using. + +Tunelp +====== + + A new version of tunelp is available which will allow you to enable +"trustirq" mode, improving printing while using IRQ-driven lp ports. + +PCI utils +========= + + Linux PCI utils are available; these include lspci, which displays +the detailed information about your system's PCI devices which used to +be in /proc/pci, and setpci, which allws you to read and write +configuration registers on your PCI devices. + +Xosview +======= + + /proc interface changes require a recent xosview. + +RealPlayer +========== + + Current releases of Real Player 5.0 depend on a bug in the sound +sub-system which is no longer there. Consequently, they don't work. +Real is aware of the problem and should have an updated version of the +software available shortly. In the mean time, you can always try +backing up your copy of rvplayer, and then editing it by: + + dd if=/dev/zero of=rvplayer bs=1 count=1 seek=657586 conv=notrunc dd +if=/dev/zero of=rvplayer bs=1 count=1 seek=665986 conv=notrunc + + If you're lucky, you'll then have sound.... + + You may also need to edit it with + + dd if=/dev/zero of=rvplayer bs=1 count=1 seek=702554 conv=notrunc + + as well. Alternately, download rpopen from +http://onramp.i2k.com/~jeffd/rpopen/ and pre-load it before you run +rvplayer (it's a shared object which blocks rvplayer from doing the +NONBLOCKing open of /dev/dsp). + +Quotas +====== + + If you are using large quotas, you should upgrade your quota utils; +newer versions count file sizes in blocks instead of bytes, providing +an upper limit of terabytes instead of 4 GB. + +Ping +==== + + Most distributed ping clients are buggy. Get an updated one from the +iputils package. Where to get the files ********************** @@ -369,21 +452,21 @@ The 2.8.1.0.23 release: ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.8.1.0.23.bin.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.8.1.0.23.bin.tar.gz +ftp://metalab.unc.edu/pub/Linux/GCC/binutils-2.8.1.0.23.bin.tar.gz 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 +ftp://metalab.unc.edu/pub/Linux/GCC/release.binutils-2.8.1.0.23 -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 +The 2.9.1.0.15 release: +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.15-glibc.x86.tar.gz +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.15-libc5.x86.tar.gz +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.9.1.0.15.tar.gz +ftp://metalab.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.15-glibc.x86.tar.gz +ftp://metalab.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.15-libc5.x86.tar.gz +ftp://metalab.unc.edu/pub/Linux/GCC/binutils-2.9.1.0.15.tar.gz Installation notes: -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 +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.binutils-2.9.1.0.15 +ftp://metalab.unc.edu/pub/Linux/GCC/release.binutils-2.9.1.0.15 Gnu C ===== @@ -391,25 +474,25 @@ 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 +ftp://metalab.unc.edu/pub/Linux/GCC/egcs-1.0.3-glibc.x86.tar.bz2 +ftp://metalab.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.3 -ftp://sunsite.unc.edu/pub/Linux/GCC/release.egcs-1.0.3 +ftp://metalab.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 -ftp://sunsite.unc.edu/pub/gnu/gcc-2.7.2.3.tar.gz +ftp://metalab.unc.edu/pub/gnu/gcc-2.7.2.3.tar.gz Linux C Library =============== 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 +ftp://metalab.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 +ftp://metalab.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 @@ -420,17 +503,17 @@ The 2.7.2.8 release: ftp://tsx-11.mit.edu/pub/linux/packages/GCC/libg++-2.7.2.8.bin.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/libg++-2.7.2.8.bin.tar.gz +ftp://metalab.unc.edu/pub/Linux/GCC/libg++-2.7.2.8.bin.tar.gz Installation notes: ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.libg++-2.7.2.8 -ftp://sunsite.unc.edu/pub/Linux/GCC/release.libg++-2.7.2.8 +ftp://metalab.unc.edu/pub/Linux/GCC/release.libg++-2.7.2.8 Dynamic Linker ============== The 1.9.9 release: ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ld.so-1.9.9.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/ld.so-1.9.9.tar.gz +ftp://metalab.unc.edu/pub/Linux/GCC/ld.so-1.9.9.tar.gz Modules utilities ================= @@ -443,20 +526,20 @@ The 1.2 release: 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 +ftp://metalab.unc.edu/pub/Linux/system/status/ps/procps-1.2.9.tgz Procinfo utilities ================== -The 14 release: -ftp://ftp.cistron.nl/pub/people/svm/procinfo-14.tar.gz +The 15 release: +ftp://ftp.cistron.nl/pub/people/svm/procinfo-15.tar.gz Psmisc utilities ================ The 17 release: ftp://lrcftp.epfl.ch/pub/linux/local/psmisc/psmisc-17.tar.gz -ftp://sunsite.unc.edu/pub/Linux/system/status/ps/psmisc-17.tar.gz +ftp://metalab.unc.edu/pub/Linux/system/status/ps/psmisc-17.tar.gz RPM utilities ============= @@ -475,8 +558,8 @@ ====== 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 +ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/dosemu-0.98.4.tgz +ftp://ftp.dosemu.org/dosemu/dosemu-0.98.4.tgz Loadlin ======= @@ -489,14 +572,14 @@ ======== The 1.16 release: -ftp://sunsite.unc.edu/pub/gnu/sh-utils-1.16.tar.gz +ftp://metalab.unc.edu/pub/gnu/sh-utils-1.16.tar.gz ftp://prep.ai.mit.edu/pub/gnu/sh-utils-1.16.tar.gz -Mount -===== +Util-linux +========== -The 2.7l release: -ftp://ftp.win.tue.nl/pub/linux/util/mount/mount-2.7l.tar.gz +The 2.9 release: +ftp://ftp.win.tue.nl/pub/linux/util/util-linux-2.9g.tar.gz Autofs ====== @@ -507,26 +590,32 @@ NFS === -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 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 +The user-land 2.2beta40 release: +ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir/nfs-server-2.2beta40.tar.gz +ftp://linux.nrao.edu/mirrors/fb0429.mathematik.th-darmstadt.de/pub/linux/okir/nfs-server-2.2beta40.tar.gz + +The kernel-level 12/04/98 release: +ftp://ftp.yggdrasil.com/private/hjl/knfsd-981204.tar.gz +ftp://ftp.kernel.org/pub/linux/devel/gcc/knfsd-981204.tar.gz Net-tools ========= -The 1.45 release: -ftp://ftp.cs-ipv6.lancs.ac.uk/pub/Code/Linux/Net_Tools/net-tools-1.45.tar.gz -http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-1.45.tar.gz +The 1.49 release: +ftp://ftp.cs-ipv6.lancs.ac.uk/pub/Code/Linux/Net_Tools/net-tools-1.49.tar.gz +http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-1.49.tar.gz Ypbind ====== -The 3.2 release: -ftp://ftp.uni-paderborn.de/pub/linux/local/yp/ypbind-3.2.tar.gz +The 3.3 release: +ftp://ftp.uni-paderborn.de/pub/linux/local/yp/ypbind-3.3.tar.gz + +Sysklogd +======== + +The 1.3-30 release: +ftp://metalab.unc.edu/pub/Linux/system/daemons/sysklogd-1.3-30.tar.gz Bash ==== @@ -534,6 +623,9 @@ The 1.14.7 release: ftp://prep.ai.mit.edu/pub/gnu/bash-1.14.7.tar.gz +The 2.02.1 release: +ftp://prep.ai.mit.edu/pub/gnu/bash-2.02.1.tar.gz + Ncpfs ===== @@ -543,21 +635,21 @@ SMBfs ===== -The 1.9.18p10 release of Samba: -ftp://samba.anu.edu.au/pub/samba/samba-1.9.18p10.tar.gz +The 2.0.0 release of Samba: +ftp://ftp.samba.org/pub/samba/samba-2.0.0.tar.gz Pcmcia-cs ========= -The 3.0.5 release: -ftp://hyper.stanford.edu/pub/pcmcia/pcmcia-cs.3.0.5.tar.gz +The 3.0.7 release: +ftp://hyper.stanford.edu/pub/pcmcia/pcmcia-cs.3.0.7.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 +The 2.15 release: +ftp://tsx-11.mit.edu/pub/linux/sources/sbin/setserial-2.15.tar.gz +ftp://metalab.unc.edu/pub/Linux/system/serial/setserial-2.15.tar.gz PPP === @@ -568,21 +660,30 @@ IP Chains ========= -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 +The 1.3.8 release: +ftp://ftp.rustcorp.com/ipchains/ipchains-1.3.8.tar.gz +ftp://ftp.rustcorp.com/ipchains/ipchains-1.3.8.tar.bz2 IP Masq Adm =========== -The 0.4.1 release: -http://juanjox.home.ml.org/ipmasqadm-0.4.1.tar.gz +The 0.4.2 release: +http://juanjox.linuxhq.com/ipmasqadm-0.4.2.tar.gz + +DHCP clients +============ + +The 2.0b1p18 ISC dhcpclient release: +ftp://ftp.isc.org/isc/dhcp/test/dhcp-2.0b1pl8.tar.gz + +The 1.3.17-pl2 PhysTech dhcpcd release: +ftp://ftp.phystech.com/pub/dhcpcd-1.3.17-pl2.tar.gz iBCS ==== -The 8/30/98 release: -ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2/ibcs-2.1-980830-ALPHA.tar.gz +The 11/05/98 release: +ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2/ibcs-2.1-981105-ALPHA.tar.gz Asun netatalk ============= @@ -593,22 +694,47 @@ Fbset ===== -The 7/13/98 release: -http://www.cs.kuleuven.ac.be/~geert/bin/fbset-2.0-pre-19980713.tar.gz +The 11/04/98 release: +http://www.cs.kuleuven.ac.be/~geert/bin/fbset-2.0-pre-19981104.tar.gz + +PCI utils +========= + +The 1.09 release: +ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-1.09.tar.gz +ftp://metalab.unc.edu/pub/Linux/hardware/pciutils-1.09.tar.gz + +Tunelp +====== + +The 0-2.1.131 release: +ftp://e-mind.com/pub/linux/tunelp/tunelp-0-2.1.131.tar.gz + +Xosview +======= + +The 1.6.1 release: +ftp://metalab.unc.edu/pub/Linux/system/status/xstatus/xosview-1.6.1.tar.gz + +Quota utils +=========== + +The 1.55 release: +ftp://ftp.uk.linux.org/pub/linux/sct/quota/quota-1.55-10.i386.rpm +ftp://ftp.uk.linux.org/pub/linux/sct/quota/quota-1.55-10.src.rpm -PCIutils +IP utils ======== -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 +The 11/01/98 release: +ftp://ftp.inr.ac.ru/pub/ip-routing/iputils-ss981101.tar.gz Other Info ========== Please remember that most of these utils are available on your favorite local linux mirror. If you can, please get them from a closer -site before checking sunsite. +site before checking metalab or tsx-11. You may also want to check for updated versions of this software in a package format for the distribution you use. @@ -616,21 +742,18 @@ For those of you running Red Hat (or RPM on a different 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, and Red Hat 5.1 ships with most necessary software. +version. Remember, you might need to use the --force option to get the +upgrade to install. ftp://contrib.redhat.com/ , +ftp://developer.redhat.com/ , or ftp://rawhide.redhat.com/ will have +almost everything you need, and Red Hat 5.2 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 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 -ftp://ftp.wsc.com/pub/freeware/linux/update.linux/kernel-v2.1.x/ for -more information and the files. - -Please send info about any other packages that 2.1.x "broke" or about -any new features of 2.1.x that require extra or new packages for use to -Chris Ricker (kaboom@gatech.edu or chris.ricker@m.cc.utah.edu). +Please send info about any other packages that 2.2 "broke" or about any +new features of 2.2 that require extra or new packages for use to Chris +Ricker (kaboom@gatech.edu or chris.ricker@m.cc.utah.edu). diff -ur --new-file old/linux/Documentation/Configure.help new/linux/Documentation/Configure.help --- old/linux/Documentation/Configure.help Tue Feb 9 18:59:29 1999 +++ new/linux/Documentation/Configure.help Tue Feb 9 19:00:17 1999 @@ -1,34 +1,26 @@ # Maintained by Axel Boldt (boldt@math.ucsb.edu) # # This version of the Linux kernel configuration help texts -# corresponds to the kernel versions 2.1.x. Be aware that these are -# development kernels and need not be completely stable. +# corresponds to the kernel versions 2.2.x. # # 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 -# via FTP (user: anonymous) from sunsite.unc.edu in the directory +# via FTP (user: anonymous) from metalab.unc.edu in the directory # /pub/Linux/docs/HOWTO. Before you start compiling, make sure that # you have the necessary versions of all programs and libraries # required to compile and run this kernel; they are listed in the file @@ -78,7 +70,7 @@ 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 @@ -87,12 +79,38 @@ you say Y here, you will be offered the choice of using features or drivers that are currently considered to be in the alpha-test phase. +Symmetric Multi Processing +CONFIG_SMP + This enables support for systems with more than one CPU. If you have a + system with only one CPU, like most personal computers, say N. If you + have a system with more than one CPU, say Y. + + A non-SMP kernel will run on any machine, but will use only one CPU of + a multi-CPU machine. An SMP kernel will run on many, but not all, + single-CPU machines. On a single-CPU machine, a non-SMP kernel + will run faster than an SMP kernel. + + i486 based SMP boards don't boot CONFIG_M586/M686 kernels. CONFIG_M686 + SMP kernels might not work on all Pentium based boards. + + People using multiprocessor machines should also say Y to "Enhanced + Real Time Clock Support", below. The "Advanced Power Management" + code will be disabled in an SMP kernel. + + If you don't know what to do here, say N. + + See also: Documentation/SMP.txt, Documentation/smp.tex, + Documentation/smp.txt, and Documentation/IO-APIC.txt. Also see 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). + Kernel math emulation 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. @@ -104,15 +122,22 @@ 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.) This means that it is a + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO.) This means that it is a good idea to say Y here if you intend to use this kernel on different machines. More information about the internals of Linux 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. +Kernel FP software completion +CONFIG_MATHEMU + This option is required for IEEE compliant floating point arithmetic + on the Alpha. The only time you would ever not say Y is to say M + in order to debug the code. Do not say anything but Y unless you + know what you are doing. + Normal PC floppy disk support CONFIG_BLK_DEV_FD If you want to use the floppy disk drive(s) of your PC under Linux, @@ -127,16 +152,22 @@ 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 +189,8 @@ 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,8 +202,9 @@ 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. + 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) @@ -200,18 +232,22 @@ 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), @@ -225,22 +261,25 @@ 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. People with SCSI-only systems - should say 'N' here. + 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://metalab.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://metalab.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 @@ -252,12 +291,14 @@ 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. - People with SCSI-only systems can say 'N' here. + 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://metalab.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 @@ -270,16 +311,20 @@ 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 can say 'N' here. + 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. If all your disks are SCSI, say 'N'. + 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), @@ -294,7 +339,7 @@ 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. + double(2X) or better speed drives. If you say Y here, the CDROM drive will be identified at boot time along with other IDE devices, as "hdb" or "hdc", or something @@ -303,11 +348,11 @@ to say Y or M to "ISO 9660 CDROM filesystem support". Read the CDROM-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO and the file + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO and the file Documentation/cdrom/ide-cd. Note that older versions of lilo (the Linux boot loader) cannot properly deal with IDE/ATAPI CDROMs, so install lilo-16 or higher, available from - ftp://sunsite.unc.edu/pub/Linux/system/Linux-boot/lilo. + ftp://metalab.unc.edu/pub/Linux/system/Linux-boot/lilo. If you want to compile the driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -318,7 +363,8 @@ CONFIG_BLK_DEV_IDETAPE If you have an IDE tape drive using the ATAPI protocol, say Y. ATAPI is a newer protocol used by IDE tape and CDROM drives, similar - to the SCSI protocol (but say 'N' if your tape is a SCSI device). + 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 @@ -334,12 +380,12 @@ 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 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 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 @@ -368,18 +414,18 @@ If both this SCSI emulation and native ATAPI support are compiled into the kernel, the native support will be used. - People with SCSI-only systems should say 'N' here. 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 @@ -388,42 +434,41 @@ bootparam" or see the documentation of your boot loader about how to pass options to the kernel. The lilo procedure is also explained in the SCSI-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO.) + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO.) 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. - People with SCSI-only systems should say 'N' here. If unsure, say Y. + 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 + Linux. This may slow disk throughput by a few percent, but at least things will operate 100% reliably. - People with SCSI-only systems can say 'N' here. If unsure, say Y. + 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. - - People with SCSI-only systems should say 'N' here. 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 @@ -435,33 +480,40 @@ 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/. + ftp://metalab.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. - Saying Y to 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 this will rearrange the order of the hd* devices and - may require modification of fstab and other files. + 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. @@ -472,46 +524,48 @@ 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. - - People with SCSI-only systems should say 'N' here. + 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 @@ -522,7 +576,7 @@ 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. @@ -541,41 +595,47 @@ 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. + 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. - This requires CONFIG_IDEDMA_AUTO to be enabled. 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 it's 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. + 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. @@ -620,12 +680,12 @@ Parallel port IDE disks 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. @@ -639,31 +699,31 @@ 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 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 @@ -671,54 +731,59 @@ 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. + 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 the pg driver. + 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 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. + 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 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 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 @@ -765,13 +830,23 @@ called fit3.o. You must also have a high-level driver for the type of device that you want to support. +Freecom IQ ASIC-2 protocol +CONFIG_PARIDE_FRIQ + This option enables support for version 2 of the Freecom IQ parallel + port IDE adapter. This adapter is used by the Maxell Superdisk + drive. 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 friq.o. You must also have a high-level driver for the type + 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 + 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 @@ -788,11 +863,11 @@ 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. @@ -800,43 +875,52 @@ 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 + 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://metalab.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 @@ -844,31 +928,19 @@ 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://metalab.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 @@ -878,23 +950,20 @@ 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://metalab.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. + 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 @@ -906,16 +975,47 @@ 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://metalab.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 @@ -935,27 +1035,27 @@ 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 @@ -976,7 +1076,7 @@ address they listen on (e.g. "multihosting" or "virtual domains" or "virtual hosting services" on the web server apache and the ftp server wuftpd -- read the Virtual-Services-HOWTO, available via FTP - (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO) + (user: anonymous) from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO) or for connecting to different logical networks through the same physical interface (most commonly an Ethernet networking card). See Documentation/networking/alias.txt for more info. @@ -1036,10 +1136,11 @@ 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 @@ -1055,6 +1156,10 @@ 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 @@ -1071,38 +1176,50 @@ if you have a floppy drive, otherwise N. Easy. Alpha system type -CONFIG_ALPHA_AVANTI - Find out what type of Alpha motherboard you have. You will probably - want to read the Linux/Alpha home page on the WWW at - http://www.azstarnet.com/~axplinux/ (to browse the WWW, you need to +CONFIG_ALPHA_GENERIC + This is the system type of your hardware. A "generic" kernel will + run on any supported Alpha system. Configuring a kernel for one + specific system can save about 200K and operate more efficiently. + + To find out what type of Alpha system you have, you may want to + check out the Linux/Alpha FAQ, accessible on the WWW from + http://www.azstarnet.com/~axplinux/ (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 the Alpha-HOWTO, available via FTP (user: - anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. For this - 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, - 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 - come with a TGA graphics adapter, so you'll want to say Y to "TGA - Console support", below, if you have one of these. - ** Jensen: a.k.a. DEC 2000 a.k.a. DECpc AXP 150, the oldest Alpha - PC; it sports an EISA bus. The boot process on Jensen machines is - difficult (no booting from floppies, MILO doesn't work). You need - to have access to a second Linux workstation. The Linux/Alpha - FAQ, accessible from the above mentioned WWW page, has details. - ** Noname: a.k.a. AXPpci33, a PCI-bus based board using the 21066 - Alpha CPU, running at either 166 or 233 MHz. You also want to - choose this option if you have a UDB (Universal Desktop Box - a.k.a. Multia) machine. - ** Cabriolet: also called AlphaPC64, a PCI-bus based board using the - 21064 Alpha CPU typically running at 275 or 300 MHz. - ** EB66: "Evaluation Board" - ** EB66+: "Evaluation Board" -### -### Add info about Platform2000, EB164, etc. -### + lynx or netscape). In summary: + + Alcor/Alpha-XLT AS 600 + Alpha-XL XL-233, XL-266 + AlphaBook1 Alpha laptop + Avanti AS 200, AS 205, AS 250, AS 255, AS 300, AS 400 + Cabriolet AlphaPC64, AlphaPCI64 + DP264 DP264 + EB164 EB164 21164 evaluation board + EB64+ EB64+ 21064 evaluation board + EB66 EB66 21066 evaluation board + EB66+ EB66+ 21066 evaluation board + Jensen DECpc 150, DEC 2000 model 300, DEC 2000 model 500 + LX164 AlphaPC164-LX + Miata Personal Workstation 433a, 433au, 500a, + 500au, 600a, or 600au + Mikasa AS 1000 + Noname AXPpci33, UDB (Multia) + Noritake AS 1000A, AS 600A, AS 800 + PC164 AlphaPC164 + Rawhide AS 1200, AS 4000, AS 4100 + Ruffian RPX164-2, AlphaPC164-UX, AlphaPC164-BX + SX164 AlphaPC164-SX + Sable AS 2000, AS 2100 + Takara Takara + + If you don't know what to do, choose "generic". + +EV5 CPU daughtercard +CONFIG_ALPHA_PRIMO + Say Y if you have an AS 1000 5/xxx or an AS 1000A 5/xxx. + +EV5 CPU(s) +CONFIG_ALPHA_GAMMA + Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx. Using SRM as bootloader CONFIG_ALPHA_SRM @@ -1127,6 +1244,12 @@ If unsure, say N. +Use SRM PCI setup +CONFIG_ALPHA_SRM_SETUP + This option controls whether or not the PCI configuration set up by + SRM is modified. If you say Y, the existing PCI configuration will + be left intact. + Non-standard serial port support CONFIG_SERIAL_NONSTANDARD Say Y here if you have any non-standard serial boards -- boards @@ -1134,20 +1257,24 @@ 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 @@ -1155,7 +1282,7 @@ standard COM 1/2/3/4 ports. This may happen if you have an AST FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini), or other custom + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini), or other custom serial port hardware which acts similar to standard serial port hardware. If you only use the standard COM 1/2/3/4 ports, you can say N here to save some memory. You can also say Y if you have an @@ -1164,7 +1291,7 @@ 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) @@ -1181,26 +1308,20 @@ 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 @@ -1214,7 +1335,7 @@ your box. Other bus systems are ISA, EISA, Microchannel (MCA) or VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO, contains valuable + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO, contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -1222,8 +1343,8 @@ boot time ("man dmesg"), please follow the instructions at the top of include/linux/pci.h. -PCI BIOS support -CONFIG_PCI_BIOS +PCI access mode +CONFIG_PCI_GOBIOS If you have enabled PCI bus support above, you probably want to allow Linux to use your PCI BIOS to detect the PCI devices and determine their configuration. Note: some old PCI motherboards have @@ -1234,14 +1355,12 @@ Except for some special cases (embedded systems with no BIOS), you probably should say Y here. -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 @@ -1253,9 +1372,9 @@ 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 @@ -1275,28 +1394,36 @@ 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 - still experimental code. + before attempting to build an MCA bus kernel. + +SGI Visal Workstation support +CONFIG_VISWS + The SGI Visual Workstation series is an IA32-based workstation + based on SGI systems chips with some legacy PC hardware attached. + Say Y here to create a kernel to run on the SGI 320 or 540. + A kernel compiled for the Visual Workstation will not run on other + PC boards and vice versa. + See Documentation/sgi-visws.txt for more. 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 (read the DOSEMU-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO), you'll need to say Y + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO), you'll need to say Y here. You can find documentation about IPC with "info ipc" and also in section 6.4 of the Linux Programmer's Guide, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-guide. + ftp://metalab.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 @@ -1319,31 +1446,33 @@ 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://metalab.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), @@ -1382,21 +1511,21 @@ If you want to execute JAVA binaries, read the Java on Linux HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. You will then need to + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. You will then need to install the run time system contained in the Java Developers Kit (JDK) as described in the HOWTO. This is completely independent of the Linux kernel and you do NOT need to say Y here for this to work. 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 "". 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 @@ -1417,7 +1546,7 @@ 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 @@ -1426,7 +1555,7 @@ 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 + ftp://metalab.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. @@ -1450,7 +1579,7 @@ 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). @@ -1462,29 +1591,23 @@ 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. - - 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; - if you have a multi processor machine and want Linux to use all the - processors in parallel (Symmetric Multi Processing), make sure that - the line "SMP=1" is not commented out and 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). People using multiprocessor machines should - also say Y to "Enhanced Real Time Clock Support", below. + "386" here. - 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 specify one of "486" or "Pentium" or "PPro", then the kernel + will not necessarily run on earlier architectures (ie a Pentium + optimized kernel will run on a PPro, but not necessarily on a i486). + + 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. + - "586" for generic Pentium CPU's, possibly lacking the TSC register. + - "Pentium" for the Intel Pentium/Pentium MMX, AMD K5, K6 and K6-3D. + This option will assume that you have a time stamp counter. + - "PPro" for the Cyrix/IBM/National Semiconductor 6x86MX, MII and + Intel Pentium II/Pentium Pro. If you don't know what to do, choose "386". @@ -1492,7 +1615,13 @@ 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://metalab.unc.edu/pub/Linux/utils/console. + + Say Y. Video mode selection support CONFIG_VIDEO_SELECT @@ -1505,7 +1634,7 @@ "man bootparam" or see the documentation of your boot loader about how to pass options to the kernel. The lilo procedure is also explained in the SCSI-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Read + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Read Documentation/svga.txt for more information about the Video mode selection support. If unsure, say N. @@ -1528,13 +1657,19 @@ in the /dev directory, i.e. /dev/fb*. You need an utility program called fbset to make full use of frame - buffer devices. Please read the file - Documentation/fb/framebuffer.txt for more information. + 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. + + 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 want to play with it, say Y here and also to the driver for - your graphics board, below. If unsure, say N, unless you are - compiling a kernel for a non-X86 architecture, in which case you - should say Y. + If you are compiling for the x86 architecture, you can say Y if you + want to play with it, but it is not essential. Please note that + running graphical applications that directly touch the hardware (e.g. + and accelerated X server) and that are not frame buffer device-aware + may cause unexpected results. If unsure, say N. Acorn VIDC support CONFIG_FB_ACORN @@ -1554,13 +1689,13 @@ 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. @@ -1568,7 +1703,7 @@ 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 @@ -1602,6 +1737,18 @@ Say N unless you have such a graphics board or plan to get one before you next recompile the kernel. +Apollo support +CONFIG_APOLLO + Say Y here if you want to run Linux on an MC680x0-based Apollo + Domain workstation such as the DN3500. + +Apollo 3c505 support +CONFIG_APOLLO_ELPLUS + Say Y or M here if your Apollo has a 3Com 3c505 ISA Ethernet card. + If you don't have one made for Apollos, you can use one from a PC, + except that your Apollo won't be able to boot from it (because the + code in the ROM will be for a PC). + Atari native chipset support CONFIG_FB_ATARI This is the frame buffer device driver for the builtin graphics @@ -1609,7 +1756,8 @@ 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 @@ -1626,13 +1774,13 @@ 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. + This driver supports a frame buffer for the "valkyrie" graphics + adapter in some Power Macintoshes. Chips 65550 display support CONFIG_FB_CT65550 @@ -1651,29 +1799,89 @@ 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. + 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 Millennium 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 boot time. 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 Millennium 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/G200 support +CONFIG_FB_MATROX_G100 + Say Y here if you have Matrox Productiva G100, Matrox Mystique G200, + Matrox Marvel G200 or Matrox Millennium G200 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 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 mdacon.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. @@ -1697,7 +1905,8 @@ 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 @@ -1711,19 +1920,19 @@ 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 say N here, the needed low level drivers are automatically enabled, depending on what frame buffer devices you selected above. @@ -1734,9 +1943,9 @@ 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. @@ -1747,23 +1956,24 @@ 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 @@ -1773,13 +1983,13 @@ 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 @@ -1804,8 +2014,8 @@ 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 font widths - 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 @@ -1823,13 +2033,13 @@ 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 and it is safe to compile all the corresponding drivers into the - kernel. If you want to compile parallel port support as a module - ( = code which can be inserted in and removed from the running kernel + kernel. If you want to compile parallel port 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 parport.o. If you have more than one parallel port and want to specify which port and IRQ to be used by @@ -1857,22 +2067,8 @@ 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 @@ -1882,8 +2078,8 @@ 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 @@ -1904,10 +2100,10 @@ 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. @@ -1919,20 +2115,21 @@ 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 @@ -1940,10 +2137,10 @@ 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 @@ -1952,11 +2149,12 @@ 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 @@ -1987,17 +2185,32 @@ 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//rp_filter + or + echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter If unsure, say N here. @@ -2005,8 +2218,10 @@ 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 @@ -2022,10 +2237,9 @@ 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 @@ -2044,7 +2258,8 @@ 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 @@ -2057,11 +2272,13 @@ 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. @@ -2070,10 +2287,10 @@ If you want to configure your Linux box as a packet filter firewall for a local TCP/IP based network, say Y here. You may want to read the FIREWALL-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Also, you will need the ipchains tool (available on the WWW at - http://www.adelaide.net.au/~rustcorp/) to allow selective blocking + http://www.rustcorp.com/linux/ipchains/) to allow selective blocking of Internet traffic based on type, origin and destination. Note that the Linux firewall code has changed and the old program called ipfwadm won't work anymore. @@ -2095,7 +2312,7 @@ 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 @@ -2131,33 +2348,34 @@ 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 @@ -2173,9 +2391,7 @@ Saying Y to this option will produce two modules ( = code which can be inserted in and removed from the running kernel whenever you - want), one encapsulator called tunnel.o and one decapsulator called - ipip.o. You can read details in drivers/net/README.tunnel. Most - people won't need this and can say N. + want). Most people won't need this and can say N. IP: GRE tunnels over IP CONFIG_NET_IPGRE @@ -2201,7 +2417,7 @@ 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 ipchains utility) and/or by doing an appropriate @@ -2224,7 +2440,7 @@ Linux box to the Internet using SLiRP [SLiRP is a SLIP/PPP emulator that works if you have a regular dial up shell account on some UNIX computer; get it via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/system/network/serial/ ].) + ftp://metalab.unc.edu/pub/Linux/system/network/serial/ ].) The IP masquerading code will only work if IP forwarding is enabled in your kernel; you can do this by saying Y to "/proc @@ -2233,44 +2449,63 @@ 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 - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini; there's also some + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini; there's also some 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 pieces of code - which can be inserted in and removed from the running kernel - whenever you want; read Documentation/modules.txt for details. + 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 note 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.linuxhq.com/ + + 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/ - For 2.1 kernels, you will need "ipmasqadm" tool from - http://juanjox.home.ml.org + You will also need the ipmasqadm tool available from + http://juanjox.linuxhq.com/ . The ipautofw code is still under development and so is currently marked EXPERIMENTAL. If you want to try it, say Y. @@ -2280,44 +2515,28 @@ The module will be called ip_masq_autofw.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. -IP: masquerading special modules support -CONFIG_IP_MASQUERADE_MOD - This provides support for special modules that can modify rewriting - rules to achieve, for example, input port forwarding. - Beware that this feature adds a little overhead in the input packet - processing chain. - - You will need 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: 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 "ipmasqadm" which can be downloaded from - http://juanjox.home.ml.org/ + that has a program like lynx or netscape). For general info, please + see ftp://ftp.compsoc.net/users/steve/ipportfw/linux21/ - 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.linuxhq.com/ The portfw code is still under development and so is currently marked EXPERIMENTAL. If you want to try it, say Y. @@ -2328,12 +2547,12 @@ it as a module, say M here and read Documentation/modules.txt. IP: ipmarkfw masquerade support -CONFIG_IP_MASQUERADE_IPMARKFW - This provides functionally equivalent to port forwarding, the difference - is that Mark Forwarding uses "firewalling mark" to select which packets - must forward (see ipchains(8), "-m" argument). +CONFIG_IP_MASQUERADE_MFW + This provides functionality similar to port forwarding, the + difference is that Firewall 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 + The ip_masq_mfw 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 @@ -2341,44 +2560,42 @@ 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 +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. + about to be forwarded. + + You must say Y here if you want to enable "IP: masquerading" or "IP: + transparent proxying". - 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. + 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. - - 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. + 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://metalab.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 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 @@ -2400,27 +2617,31 @@ 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 @@ -2431,13 +2652,13 @@ 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 - ftp://sunsite.unc.edu/pub/Linux/system/network/boot.net/. + ftp://metalab.unc.edu/pub/Linux/system/network/boot.net/. Superior solutions to the problem of booting and configuring machines over a net connection are given by the protocol BOOTP and @@ -2459,8 +2680,9 @@ 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 @@ -2468,8 +2690,8 @@ 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 @@ -2481,37 +2703,39 @@ 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 used only 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. + 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 @@ -2549,6 +2773,11 @@ given in Documentation/Changes. You will still be able to do regular IPv4 networking as well. + 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 @@ -2580,9 +2809,9 @@ used for local networks of Windows machines. You need it if you want 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 + ftp://metalab.unc.edu/pub/Linux/system/filesystems/) or from within the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO). In order to do the + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO). In order to do the former, you'll also have to say Y to "NCP filesystem support", below. @@ -2592,9 +2821,9 @@ 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 + ftp://metalab.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. + read the IPX-HOWTO in ftp://metalab.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 @@ -2612,12 +2841,12 @@ 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://metalab.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 @@ -2625,13 +2854,14 @@ 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 @@ -2646,7 +2876,7 @@ space programs lwared or mars_nwe for the server side). Say Y here if you have use for SPX; read the IPX-HOWTO at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO for details. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO 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). @@ -2667,7 +2897,7 @@ slower LocalTalk is AppleTalk over a proprietary apple network using serial links. EtherTalk and LocalTalk are fully supported by Linux. The NET-2-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO contains valuable + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO contains valuable information as well. General information about how to connect Linux, Windows machines and @@ -2683,7 +2913,7 @@ 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 @@ -2718,7 +2948,7 @@ 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. @@ -2728,8 +2958,8 @@ 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. @@ -2746,15 +2976,16 @@ 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://metalab.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 @@ -2774,7 +3005,7 @@ Information about where to get supporting software for Linux amateur radio 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 might also want to + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. You might also want to check out the file Documentation/networking/ax25.txt in the kernel source. More information about digital amateur radio in general is on the WWW at http://www.tapr.org/tapr/html/pkthome.html. (To browse @@ -2812,10 +3043,10 @@ 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 + ftp://metalab.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). @@ -2833,10 +3064,10 @@ 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 + ftp://metalab.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). @@ -2849,7 +3080,10 @@ CONFIG_MKISS 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 AX25 amateur radio connections). + 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. @@ -2898,17 +3132,17 @@ (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/. + ftp://metalab.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 @@ -2924,7 +3158,7 @@ in order to communicate with other computers. If you want to use this, read Documentation/networking/z8530drv.txt and the AX25-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Also make sure to say Y + ftp://metalab.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 @@ -2984,7 +3218,7 @@ 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 @@ -2999,9 +3233,9 @@ 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 @@ -3016,9 +3250,9 @@ 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 @@ -3039,8 +3273,8 @@ 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 @@ -3054,15 +3288,16 @@ 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 @@ -3097,7 +3332,7 @@ 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 @@ -3116,7 +3351,7 @@ (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). @@ -3144,16 +3379,16 @@ 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 @@ -3182,7 +3417,7 @@ probably contains several Ethernet devices, but the kernel is not able to recognize more than one at boot time without help; for details read the Ethernet-HOWTO, available via FTP (user: anonymous) - in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. The Bridging code is + in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. The Bridging code is still in test. If unsure, say N. Packet socket @@ -3225,16 +3460,6 @@ This is a backward compatibility option, choose Y for now. This option will be removed soon. -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). If you are connected to a HIPPI network, and want - to enable HIPPI support in the kernel, say Y here (you must also - remember to enable the driver for your HIPPI card below). Most - people will say N here. - Asynchronous Transfer Mode (ATM) CONFIG_ATM Kernel support for ATM. Note that you need a set of user-space programs @@ -3402,10 +3627,13 @@ 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://metalab.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). @@ -3419,9 +3647,9 @@ 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://metalab.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). @@ -3436,7 +3664,7 @@ CONFIG_CHR_DEV_ST If you want to use a SCSI tape drive under Linux, say Y and read the SCSI-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO and + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO and drivers/scsi/README.st in the kernel source. This is NOT for SCSI CDROMs. @@ -3450,8 +3678,8 @@ 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://metalab.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). @@ -3474,11 +3702,11 @@ 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://metalab.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://metalab.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), @@ -3492,7 +3720,7 @@ 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. @@ -3500,24 +3728,30 @@ 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 @@ -3532,11 +3766,12 @@ Adaptec AHA152X/2825 support CONFIG_SCSI_AHA152X - This is support for the AHA-1510, AHA-1520, AHA-1522, and AHA-2825 - SCSI host adapters. It is explained in section 3.3 of the - SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. You might also want to - read the comments at the top of drivers/scsi/aha152x.c. + This is support for the AVA-1505 (irq etc must be manually specified), + AHA-1510, AHA-1520, AHA-1522, and AHA-2825 SCSI host adapters. It is + explained in section 3.3 of the SCSI-HOWTO, available via FTP + (user: anonymous) at ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. You + might also want to read the comments at the top of + drivers/scsi/aha152x.c. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -3547,7 +3782,7 @@ 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://metalab.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. @@ -3561,29 +3796,37 @@ CONFIG_SCSI_AHA1740 This is support for a SCSI host adapter. It is explained in section 3.5 of the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out of the box, you may have to change some settings in drivers/scsi/aha1740.h. 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 aha17400.o. If you want to compile it as a + The module will be called aha1740.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. Adaptec AIC7xxx chipset SCSI controller support CONFIG_SCSI_AIC7XXX This is support for the various aic7xxx based Adaptec SCSI - controllers. These include the 274x EISA cards, 284x VLB cards, 294x - PCI cards, 394x PCI cards, 3985 PCI card, and several versions of - the Adaptec built-in SCSI controllers on various PC motherboards. + controllers. These include the 274x EISA cards; 284x VLB cards; 2902, + 2910, 293x, 294x, 394x, 3985 and several other PCI and motherboard based + SCSI controllers from Adaptec. It does not support the AAA-13x RAID + controllers from Adaptec, nor will it likely ever support them. It + does not support the 2920 cards from Adaptec that use the Future Domain + SCSI controller chip. For those cards, you need the "Future Domain + 16xx SCSI support" driver. + + In general, if the controller is based on an Adaptec SCSI controller + chip from the aic777x series or the aic78xx series, it should work. The + only exception is the 7810 which is specifically not supported (that's the + RAID controller chip on the AAA-13x cards). + Information on the configuration options for this controller can be 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 - driver; choose "Future Domain 16xx SCSI support" instead if you have - one of those. + configuration options. You should read drivers/scsi/README.aic7xxx + at a minimum before contacting the maintainer with any questions. + The SCSI-HOWTO, available via FTP (user: anonymous) at + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO can also be of great help. 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), @@ -3595,24 +3838,18 @@ Say Y here if you want to override the default maximum number of commands that a single device on the aic7xxx controller is allowed to have active at one time. This option only affects tagged queueing - capable devices. The driver uses a "failsafe" value of 8 by default. - This is much lower than many devices can handle, but left in place - for safety's sake. If you say Y here, you can adjust the number of - commands per LUN with the following configuration option. - - NOTE: This does not actually enable tagged queueing on any - particular device. The driver has changed in this respect. Please - see the file drivers/scsi/README.aic7xxx for more information on how - to get particular devices to use tagged command queueing. + capable devices. The driver uses a value of 24 by default. + If you say Y here, you can adjust the number of commands per LUN + with the following configuration option. If unsure, say N. 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 @@ -3634,7 +3871,9 @@ 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 @@ -3654,12 +3893,12 @@ 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 - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO, and the files + Adapters. Consult the SCSI-HOWTO, available via anonymous FTP from + ftp://metalab.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), @@ -3670,33 +3909,36 @@ 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. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO and the file + 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. -EATA-DMA (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix) support +EATA-DMA [Obsolete] (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix) support CONFIG_SCSI_EATA_DMA + This driver is obsolete. You should normally be using the generic EATA + driver for this hardware. + 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://metalab.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. @@ -3707,9 +3949,9 @@ 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://metalab.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), @@ -3721,11 +3963,11 @@ 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 + ftp://metalab.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 @@ -3735,37 +3977,54 @@ enable elevator sorting CONFIG_SCSI_U14_34F_LINKED_COMMANDS - This is a feature of SCSI-2 which improves performance: the host - adapter can send a whole list of commands to a device in one - batch. Some SCSI devices might not implement this properly, so the - safe answer is N. + This option enables elevator sorting for all probed SCSI disks and + CDROMs. It definitely reduces the average seek distance when doing + random seeks, but this does not necessarily results in a noticeable + performance improvement: your mileage may vary... + The safe answer is N. maximum number of queued commands CONFIG_SCSI_U14_34F_MAX_TAGS - This specifies how many SCSI commands can be maximally queued for a - given SCSI device. Go with the default unless you know what you're - doing. Minimum is 2 and maximum is 8. + This specifies how many SCSI commands can be maximally queued for each + probed SCSI device. You should reduce the default value of 8 only if + you have disks with buggy or limited tagged command support. + Minimum is 2 and maximum is 14. This value is also the window size + used by the elevator sorting option above. + The effective value used by the driver for each probed SCSI device is + reported at boot time. -Future Domain 16xx SCSI/AHA 2920 support +Future Domain 16xx SCSI/AHA-2920A support CONFIG_SCSI_FUTURE_DOMAIN This is support for Future Domain's 16-bit SCSI host adapters (TMC-1660/1680, TMC-1650/1670, TMC-3260, TMC-1610M/MER/MEX) and other adapters based on the Future Domain chipsets (Quantum - ISA-200S, ISA-250MG; Adaptec AHA-2920; and at least one IBM board). + ISA-200S, ISA-250MG; Adaptec AHA-2920A; 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://metalab.unc.edu/pub/Linux/docs/HOWTO. + + NOTE: Newer Adaptec AHA-2920C boards use the Adaptec AIC-7850 chip and + should use the aic7xxx driver (CONFIG_SCSI_AIC7XXX). The Future Domain + driver works with the older Adaptec AHA-2920A boards with a Future Domain + chip on them. 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 confused with the NCR 53c7 or 8xx controllers. It is explained in section 3.8 of the SCSI-HOWTO, available via FTP (user: anonymous) - at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work + at ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out of the box, you may have to change some settings in drivers/scsi/g_NCR5380.h. @@ -3794,10 +4053,16 @@ This is the 53c7 and 8xx NCR family of SCSI controllers, not to be confused with the NCR 5380 controllers. It is explained in section 3.8 of the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out 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 @@ -3818,25 +4083,31 @@ 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 @@ -3887,7 +4158,7 @@ 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 @@ -3898,12 +4169,11 @@ 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 @@ -3915,14 +4185,13 @@ 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 + do not 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. @@ -3956,8 +4225,8 @@ 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=' kernel @@ -3969,7 +4238,7 @@ bootparam" or see the documentation of your boot loader about how to pass options to the kernel. The lilo procedure is also explained in the SCSI-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.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), @@ -3998,14 +4267,14 @@ 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 + 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 @@ -4020,6 +4289,17 @@ you know that one of your older devices needs it; N is the safe answer. +NCR 53C9x MCA support +CONFIG_SCSI_MCA_53C9X + Some Microchannel machines, notably the NCR 35xx line, use a SCSI + controller based on the NCR 53C94. This driver will allow use of + the controller on the 3550, and very possibly others. + + If you want to compile this as a module (= code which can be inserted + and removed from the running kernel whenever you want), + say M here and read Documentation/modules.txt. The module will be + called mca_53c9x.o. + Always IN2000 SCSI support CONFIG_SCSI_IN2000 This is support for an ISA bus SCSI host adapter. You'll find more @@ -4032,11 +4312,33 @@ say M here and read Documentation/modules.txt. The module will be called in2000.o. +Initio 91XXU(W) SCSI support +CONFIG_SCSI_INITIO + This is support for the Initio 91XXU(W) SCSI host adapter. + Please read the SCSI-HOWTO, available via FTP (user: anonymous) at + 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), + say M here and read Documentation/modules.txt. The module will be + called initio.o + +Initio 91XXU(W) SCSI support +CONFIG_SCSI_INITIO + This is support for the Initio 91XXU(W) SCSI host adapter. + Please read the SCSI-HOWTO, available via FTP (user: anonymous) at + 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), + say M here and read Documentation/modules.txt. The module will be + called initio.o + PAS16 SCSI support CONFIG_SCSI_PAS16 This is support for a SCSI host adapter. It is explained in section 3.10 of the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out of the box, you may have to change some settings in drivers/scsi/pas16.h. @@ -4049,7 +4351,7 @@ CONFIG_SCSI_PCI2000 This is support for the PCI2000I EIDE interface card which acts as a SCSI host adapter. Please read the SCSI-HOWTO, available via FTP - (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (user: anonymous) at ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module called pci2000.o ( = code which can be inserted in and removed from the running kernel @@ -4060,7 +4362,7 @@ CONFIG_SCSI_PCI2220I This is support for the PCI2220i EIDE interface card which acts as a SCSI host adapter. Please read the SCSI-HOWTO, available via FTP - (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (user: anonymous) at ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module called pci2220i.o ( = code which can be inserted in and removed from the running kernel @@ -4071,7 +4373,7 @@ CONFIG_SCSI_PSI240I This is support for the PSI240i EIDE interface card which acts as a SCSI host adapter. Please read the SCSI-HOWTO, available via FTP - (user: anonymous) at ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (user: anonymous) at ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. This driver is also available as a module called psi240i.o ( = code which can be inserted in and removed from the running kernel @@ -4084,10 +4386,10 @@ 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. + ftp://metalab.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). @@ -4098,12 +4400,13 @@ 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://metalab.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). @@ -4115,7 +4418,7 @@ These are 8-bit SCSI controllers; the ST-01 is also supported by this driver. It is explained in section 3.9 of the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out of the box, you may have to change some settings in drivers/scsi/seagate.h. @@ -4128,7 +4431,7 @@ CONFIG_SCSI_T128 This is support for a SCSI host adapter. It is explained in section 3.11 of the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out of the box, you may have to change some settings in drivers/scsi/t128.h. Note that Trantor was purchased by Adaptec, and some former Trantor products are being sold under the Adaptec name. @@ -4143,7 +4446,7 @@ This is support for the UltraStor 14F, 24F and 34F SCSI-2 host adapter family. This driver is explained in section 3.12 of the SCSI-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If it doesn't work out of the box, you may have to change some settings in drivers/scsi/ultrastor.h. @@ -4158,7 +4461,7 @@ 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 @@ -4167,13 +4470,13 @@ 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 - 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. + This driver supports all the EATA/DMA-compliant SCSI host adapters. + DPT ISA and all EISA i/o addresses are probed looking for the "EATA" + signature. If you said Y to "PCI support", the addresses of all the + PCI SCSI controllers reported by the PCI subsystem 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://metalab.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. @@ -4187,53 +4490,81 @@ CONFIG_SCSI_EATA_TAGGED_QUEUE This is a feature of SCSI-2 which improves performance: the host adapter can send several SCSI commands to a device's queue even if - previous commands haven't finished yet. Some SCSI devices don't - implement this properly, so the safe answer is N. + previous commands haven't finished yet. Most EATA adapters negotiate + this feature automatically with the device, even if your answer is N. + The safe answer is N. enable elevator sorting CONFIG_SCSI_EATA_LINKED_COMMANDS - This is a feature of SCSI-2 which improves performance: the host - adapter can send a whole list of commands to a device in one - batch. Some SCSI devices might not implement this properly, so the - safe answer is N. + This option enables elevator sorting for all probed SCSI disks and + CDROMs. It definetly reduces the average seek distance when doing + random seeks, but this does not necessarily result in a noticeable + performance improvement: your mileage may vary... + The safe answer is N. maximum number of queued commands CONFIG_SCSI_EATA_MAX_TAGS - This specifies how many SCSI commands can be maximally queued for a - given SCSI device. Go with the default unless you know what you're - doing. Minimum is 2 and maximum is 16. This number will only have an - effect if you said Y to "enable tagged command queuing", above. + This specifies how many SCSI commands can be maximally queued for each + probed SCSI device. You should reduce the default value of 16 only if + you have disks with buggy or limited tagged command support. + Minimum is 2 and maximum is 62. This value is also the window size + used by the elevator sorting option above. + The effective value used by the driver for each probed SCSI device is + reported at boot time. NCR53c406a SCSI support 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://metalab.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://metalab.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), @@ -4254,11 +4585,11 @@ 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 - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If you use this driver, + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If you use this driver, you will still be able to use the parallel port for other tasks, such as a printer; it is safe to compile both drivers into the kernel. @@ -4267,27 +4598,44 @@ drive: it will be supported automatically if you said Y to the generic "SCSI disk support", above. + The ZIP Plus drive is supported by the imm driver, also more recent + parallel port ZIP drives use an imm compatible interface. If the + supplied cable with the drive is labeled "AutoDetect" then you will + need the imm driver. + This driver is also available as a module which can be inserted in and removed from the running kernel whenever you want. To compile this driver as a module, say M here and read Documentation/modules.txt. The module will be called ppa.o. -EPP FIFO Checking -CONFIG_SCSI_PPA_HAVE_PEDANTIC +IOMEGA Parallel Port ZIP drive SCSI support +CONFIG_SCSI_IMM + All "new and improved" parallel port to SCSI interface from Iomega. + Please read the comments for the ppa driver for further information + +Force the Iomega ZIP drivers to use EPP-16 +CONFIG_SCSI_IZIP_EPP16 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. + peripheral devices. + + Some parallel port chipsets are slower than 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. + + Generally, saying Y is the safe option and slows things down a bit. + +Assume slow parallel port control register +CONFIG_SCSI_IZIP_SLOW_CTR + Some parallel ports are known to have excessive delays between changing + the parallel port control register and good data being available on + the parallel port data/status register. This option forces a small delay + (1.0 usec to be exact) after changing the control register to let things + settle out. Enabling this option may result in a big drop in performance + but some very old parallel ports (found in 386 vintage machines) will + not work properly. + + Generally, saying N is fine. SCSI Debug host simulator. CONFIG_SCSI_DEBUG @@ -4311,18 +4659,18 @@ 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 @@ -4335,42 +4683,42 @@ 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 @@ -4379,7 +4727,7 @@ line with a modem either via UUCP (UUCP is a protocol to forward mail and news between unix hosts over telephone lines; read the UUCP-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO) or dialing up a shell + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO) or dialing up a shell account or a BBS, even using 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 @@ -4391,8 +4739,8 @@ 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://metalab.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 @@ -4402,7 +4750,7 @@ 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://metalab.unc.edu:/pub/Linux/docs/LDP. If unsure, say Y. Dummy net driver support @@ -4413,7 +4761,7 @@ inactive SLIP address seem like a real address for local programs. If you use SLIP or PPP, you might want to say Y here. Read about it in the Network Administrator's Guide, available via FTP (user: - anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/LDP. Since this + anonymous) from ftp://metalab.unc.edu/pub/Linux/docs/LDP. Since this thing often comes in handy, the default is Y. It won't enlarge your kernel either. What a deal. @@ -4429,19 +4777,20 @@ 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 around (available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/system/network/serial/ ) which + ftp://metalab.unc.edu/pub/Linux/system/network/serial/ ) which allows you to use SLIP over a regular dial up shell connection. If you plan to use SLiRP, make sure to say Y to CSLIP, below. The NET-2-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO, explains how to + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO, explains how to configure SLIP. Note that you don't need this option if you just want to run term (term is a program which gives you almost full Internet connectivity if you have a regular dial up shell account on @@ -4449,7 +4798,7 @@ 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), @@ -4461,14 +4810,14 @@ 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 + ftp://metalab.unc.edu/pub/Linux/system/network/serial/) which allows you to use SLIP over a regular dial up shell connection, you definitely want to say Y here. The NET-2-HOWTO, available via FTP - (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO, + (user: anonymous) in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO, explains how to configure CSLIP. This won't enlarge your kernel. Keepalive and linefill @@ -4496,7 +4845,7 @@ program SLiRP can emulate a PPP line if you just have a regular dial up shell account on some UNIX computer; get it via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/system/network/serial/). Note that + ftp://metalab.unc.edu/pub/Linux/system/network/serial/). Note that you don't need "PPP support" if you just want to run 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 @@ -4507,9 +4856,9 @@ 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://metalab.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). @@ -4540,13 +4889,13 @@ 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.) @@ -4574,7 +4923,7 @@ If you want to use an ISA WaveLAN card under Linux, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Some more specific + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Some more specific information is contained in Documentation/networking/wavelan.txt and in the source code drivers/net/wavelan.p.h. @@ -4594,7 +4943,7 @@ 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), @@ -4631,8 +4980,8 @@ 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 @@ -4640,9 +4989,9 @@ 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 @@ -4659,13 +5008,13 @@ If you want to use PLIP, say Y and read the PLIP mini-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini as well as the - NET-2-HOWTO in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini as well as the + NET-2-HOWTO in ftp://metalab.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 @@ -4675,8 +5024,8 @@ 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 @@ -4701,8 +5050,8 @@ 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). @@ -4775,7 +5124,7 @@ 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. @@ -4805,7 +5154,7 @@ 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!) @@ -4831,7 +5180,7 @@ 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 @@ -4848,20 +5197,20 @@ 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. @@ -5009,24 +5358,46 @@ 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 -### -### I don't know what this is. -### +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. + +COSA/SRP sync serial boards support +CONFIG_COSA + This is a driver for COSA and SRP synchronous serial boards. + These boards enable to connect synchronous serial devices (for + example base-band modems, or any other device with the X.21, V.24, + V.35 or V.36 interface) to your Linux box. The cards can work + as the character device, synchronous PPP network device, or the Cisco + HDLC network device. + + To actually use the COSA or SRP board, you will need user-space + utilities for downloading the firmware to the cards and to set + them up. Look at the http://www.fi.muni.cz/~kas/cosa/ for more + information about the cards (including the pointer to the user-space + utilities). You can also read the comment at the top of the + drivers/net/cosa.c for details about the cards and the driver itself. + + The driver will be compiled as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called cosa.o. For general information about + modules read Documentation/modules.txt. 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 + 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 + 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 @@ -5034,12 +5405,12 @@ 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). @@ -5048,8 +5419,8 @@ 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). @@ -5059,15 +5430,15 @@ 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 @@ -5076,7 +5447,7 @@ 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 @@ -5096,7 +5467,7 @@ If your Linux machine will be connected to an Ethernet and you have an Ethernet network interface card (NIC) installed in your computer, say Y here and read the Ethernet-HOWTO, available via FTP (user: - anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. You will + anonymous) from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. You will then also have to say Y to the driver for your particular NIC. Note that the answer to this question won't directly affect the @@ -5116,14 +5487,14 @@ 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 If you have a network (Ethernet) card belonging to this class, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Note that the answer to this question doesn't directly affect the kernel: saying N will just cause this configure script to skip all @@ -5134,7 +5505,7 @@ CONFIG_WD80x3 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://metalab.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). @@ -5147,7 +5518,7 @@ If you have a network (Ethernet) card of this type and are running an MCA based system (PS/2), say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.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). @@ -5159,7 +5530,7 @@ CONFIG_ULTRA 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://metalab.unc.edu/pub/Linux/docs/HOWTO. Important: There have been many reports that, with some motherboards mixing an SMC Ultra and an Adaptec AHA154x SCSI card (or compatible, @@ -5178,7 +5549,7 @@ 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://metalab.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). @@ -5194,7 +5565,7 @@ into the kernel, and read the file Documentation/networking/smc9.txt and the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.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 @@ -5205,9 +5576,10 @@ 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: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + 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://metalab.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). @@ -5220,7 +5592,7 @@ If you have a network (Ethernet) card belonging to this class, such as the NI5010, NI5210 or NI6210, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Note that the answer to this question doesn't directly affect the kernel: saying N will just cause this configure script to skip all @@ -5231,7 +5603,7 @@ CONFIG_NI5010 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. Note that this is still + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Note that this is still experimental code. This driver is also available as a module ( = code which can be @@ -5244,7 +5616,7 @@ CONFIG_NI52 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://metalab.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). @@ -5256,7 +5628,7 @@ CONFIG_NI65 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://metalab.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). @@ -5269,7 +5641,7 @@ This is a driver for the Fast Ethernet PCI network cards based on the RTL8129 and RTL8139 chips. If you have one of those, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.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), @@ -5290,18 +5662,32 @@ 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 the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Some LinkSys cards are + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Some LinkSys cards are of this type. 3COM cards CONFIG_NET_VENDOR_3COM If you have a network (Ethernet) card belonging to this class, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Note that the answer to this question doesn't directly affect the kernel: saying N will just cause this configure script to skip all @@ -5312,7 +5698,7 @@ CONFIG_EL1 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. Also, consider buying a + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Also, consider buying a new card, since the 3c501 is slow, broken, and obsolete: you will have problems. Some people suggest to ping ("man ping") a nearby machine every minute ("man cron") when using this card. @@ -5327,7 +5713,7 @@ CONFIG_EL2 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://metalab.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). @@ -5340,7 +5726,7 @@ Information about this network (Ethernet) card can be found in Documentation/networking/3c505.txt. If you have a 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. + anonymous) in ftp://metalab.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), @@ -5352,7 +5738,7 @@ CONFIG_EL16 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://metalab.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). @@ -5364,7 +5750,7 @@ CONFIG_ELMC 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://metalab.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). @@ -5377,7 +5763,7 @@ If you have a network (Ethernet) card belonging to the 3Com EtherLinkIII series, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If your card is not working you may need to use the DOS setup disk to disable Plug & Play mode, and to select the default @@ -5393,8 +5779,8 @@ 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://metalab.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. @@ -5410,7 +5796,7 @@ of your computer) is ISA (as opposed to EISA, VLB or PCI), say Y. Make sure you know the name of your card. Read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. If unsure, say Y. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If unsure, say Y. Note that the answer to this question doesn't directly affect the kernel: saying N will just cause this configure script to skip all @@ -5423,13 +5809,13 @@ (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 - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO (even though ARCnet is + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO (even though ARCnet is not really Ethernet). This driver is also available as a module ( = code which can be @@ -5441,25 +5827,25 @@ 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. @@ -5479,7 +5865,7 @@ 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 @@ -5517,7 +5903,7 @@ CONFIG_E2100 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://metalab.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). @@ -5530,7 +5916,7 @@ Support for CS89x0 chipset based Ethernet cards. 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 as well as + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO as well as Documentation/networking/cs89x0.txt. If you want to compile this as a module ( = code which can be @@ -5543,7 +5929,7 @@ CONFIG_DEPCA 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 as well as + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO as well as drivers/net/depca.c. If you want to compile this as a module ( = code which can be @@ -5558,7 +5944,7 @@ cards. If this is for you, say Y and read Documentation/networking/ewrk3.txt in the kernel source as well as the Ethernet-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.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), @@ -5570,13 +5956,13 @@ CONFIG_SEEQ8005 This is a driver for the SEEQ 8005 network (Ethernet) card. If this is for you, read the Ethernet-HOWTO, available via FTP (user: - anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + anonymous) from ftp://metalab.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 - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.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). @@ -5589,7 +5975,7 @@ CONFIG_FMV18X If you have a Fujitsu FMV-181/182/183/184 network (Ethernet) card, say Y and read the Ethernet-HOWTO, available via FTP (user: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + anonymous) in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If you use an FMV-183 or FMV-184 and it is not working, you may need to disable Plug & Play mode of the card. @@ -5605,7 +5991,7 @@ If you have a network (Ethernet) card of this type, say Y. Note however that the EtherExpress PRO/100 Ethernet card has its own separate driver. Please read the Ethernet-HOWTO, available via FTP - (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (user: anonymous) in ftp://metalab.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). @@ -5617,7 +6003,7 @@ CONFIG_EEXPRESS If you have an EtherExpress16 network (Ethernet) card, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Note that the Intel + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Note that the Intel EtherExpress16 card used to be regarded as a very poor choice because the driver was very unreliable. We now have a new driver that should do better. @@ -5632,7 +6018,7 @@ CONFIG_HPLAN_PLUS 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://metalab.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). @@ -5644,7 +6030,7 @@ CONFIG_HPLAN 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://metalab.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). @@ -5656,7 +6042,7 @@ CONFIG_HP100 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://metalab.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), @@ -5668,8 +6054,14 @@ 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. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Many Ethernet cards + 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). @@ -5681,14 +6073,26 @@ CONFIG_SK_G16 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://metalab.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://metalab.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 bus. If you have one of those, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Note that the answer to this question doesn't directly affect the kernel: saying N will just cause this configure script to skip all @@ -5698,9 +6102,9 @@ 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: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + 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://metalab.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). @@ -5712,7 +6116,7 @@ CONFIG_AC3200 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://metalab.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). @@ -5720,23 +6124,11 @@ 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. - 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. + ftp://metalab.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). @@ -5748,7 +6140,7 @@ 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. Note that this driver + ftp://metalab.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 @@ -5761,7 +6153,7 @@ CONFIG_APRICOT If you have a network (Ethernet) controller 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://metalab.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), @@ -5775,7 +6167,7 @@ These include the DE425, DE434, DE435, DE450 and DE500 models. If you have a network 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. More specific + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. More specific information is contained in Documentation/networking/de4x5.txt. This driver is also available as a module ( = code which can be @@ -5793,7 +6185,7 @@ (smc9332dst), you can also try the driver for "Generic DECchip" cards, above. However, most people with a network card of this type will say Y here.) Do read the Ethernet-HOWTO, available via FTP - (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (user: anonymous) in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. More specific information is contained in Documentation/networking/tulip.txt. @@ -5809,7 +6201,7 @@ PCI/EISA Ethernet switch cards. These include the SE-4 and the SE-6 models. If you have a network 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. More specific + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. More specific information is contained in Documentation/networking/dgrs.txt. This driver is also available as a module ( = code which can be @@ -5822,7 +6214,7 @@ CONFIG_EEXPRESS_PRO100 If you have an Intel EtherExpress PRO/100 PCI network (Ethernet) card, say Y and read the Ethernet-HOWTO, available via FTP (user: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + anonymous) in ftp://metalab.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). @@ -5834,7 +6226,7 @@ CONFIG_ETH16I 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://metalab.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). @@ -5847,7 +6239,7 @@ If you have a PCI Ethernet network card based on the ThunderLAN chip which is supported by this driver, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Devices currently supported by this driver are Compaq Netelligent, Compaq NetFlex and Olicom cards. Please read the file @@ -5855,18 +6247,41 @@ 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 tlan.o. If you want to compile it as a + The module will be called tlan.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. + + 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://metalab.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. - Please email feedback to james.banks@caldera.com. - SMC EtherPower II (EXPERIMENTAL) CONFIG_EPIC100 If you have an SMC EtherPower II 9432 PCI Ethernet network card which is based on the SMC83c170, say Y and read the Ethernet-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.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). @@ -5874,11 +6289,10 @@ module, say M here and read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. -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. To build this driver as a module - say M. +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 @@ -5886,14 +6300,14 @@ (Ethernet) card, and this is the Linux driver for it. Note that the IBM Thinkpad 300 is compatible with the Z-Note and is also supported by this driver. Read the Ethernet-HOWTO, available via FTP (user: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + anonymous) in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Pocket and portable adapters CONFIG_NET_POCKET Cute little network (Ethernet) devices which attach to the parallel port ("pocket adapters"), commonly used with laptops. If you have one of those, say Y and read the Ethernet-HOWTO, available via FTP - (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (user: anonymous) from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. If you want to plug a network card into the PCMCIA slot of your laptop instead (PCMCIA is the standard for credit card size @@ -5916,7 +6330,7 @@ This is a network (Ethernet) device which attaches to your parallel port. Read drivers/net/atp.c as well as the Ethernet-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO if you want to use this. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO if you want to use this. If you intend to use this driver, you should have said N to the Parallel Printer support, because the two drivers don't like each other. @@ -5926,7 +6340,7 @@ This is a network (Ethernet) device which attaches to your parallel port. Read Documentation/networking/DLINK.txt as well as the Ethernet-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO if you want to use this. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO if you want to use this. It is possible to have several devices share a single parallel port and it is safe to compile the corresponding drivers into the kernel. @@ -5940,7 +6354,7 @@ This is a network (Ethernet) device which attaches to your parallel port. Read Documentation/networking/DLINK.txt as well as the Ethernet-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO if you want to use this. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO if you want to use this. It is possible to have several devices share a single parallel port and it is safe to compile the corresponding drivers into the kernel. @@ -5958,7 +6372,7 @@ Ring card under Linux, say Y here and to the driver for your particular card below and read the Token-Ring mini-HOWTO, available via FTP (user:anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. Most people can say N + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Most people can say N here. IBM Tropic chipset based adapter support @@ -5966,7 +6380,7 @@ This is support for all IBM Token Ring cards that don't use DMA. If you have such a beast, say Y and read the Token-Ring mini-HOWTO, available via FTP (user:anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Warning: this driver will almost definitely fail if more than one active Token Ring card is present. @@ -5984,7 +6398,7 @@ If you have such an adapter and would like to use it, say Y or M and read the Token-Ring mini-HOWTO, available via FTP (user: anonymous) - from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Also read the file linux/Documentation/networking/sktr.txt or check the Linux-SNA WWW site for the latest information at @@ -5995,9 +6409,9 @@ 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). @@ -6019,9 +6433,34 @@ 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. + +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 @@ -6039,7 +6478,7 @@ should say Y to this option if you wish to use it with Linux. EBSA-110 Ethernet interface -CONFIG_AM79C961A +CONFIG_ARM_AM79C961A If you wish to compile a kernel for the EBSA-110, then you should always answer Y to this. @@ -6047,7 +6486,7 @@ CONFIG_CD_NO_IDESCSI If you have a CDROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CDROM-HOWTO, available via FTP (user: - anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + anonymous) from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Note that the answer to this question doesn't directly affect the kernel: saying N will just cause this configure script to skip all @@ -6061,20 +6500,20 @@ file drivers/cdrom/.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 @@ -6100,13 +6539,13 @@ 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 @@ -6121,10 +6560,11 @@ 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 @@ -6185,7 +6625,7 @@ 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 + 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. @@ -6214,7 +6654,7 @@ 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. @@ -6231,7 +6671,7 @@ 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 @@ -6275,9 +6715,9 @@ 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 @@ -6285,11 +6725,11 @@ 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). @@ -6303,30 +6743,29 @@ ext2 filesystem. You need additional software in order to use quota support; for details, read the Quota mini-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini. Probably the quota + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini. Probably the quota support is only useful for multi user systems. If unsure, say N. 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 @@ -6345,7 +6784,7 @@ by about 41 kB. The Ext2fs-Undeletion mini-HOWTO, available via FTP (user: - anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini, + anonymous) from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini, gives information about how to retrieve deleted files on ext2fs filesystems. @@ -6354,17 +6793,21 @@ 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) and from - within Windows 95 and Windows NT using the ex2fs explorer available - from http://jnewbigin-pc.it.swin.edu.au/Linux/Explore2fs.htm. + command line tool package (available via FTP (user: anonymous) from + ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2) and from + within Windows NT using the ext2nt command line tool package from + ftp://metalab.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 @@ -6376,7 +6819,7 @@ listen to audio CDs and watch its LEDs, say Y (and read Documentation/filesystems/isofs.txt and the CDROM-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO), thereby enlarging your + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO), thereby enlarging your kernel by about 27 kB; otherwise say N. If you want to compile this as a module ( = code which can be @@ -6399,12 +6842,27 @@ 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 @@ -6412,8 +6870,9 @@ 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. + 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 @@ -6421,42 +6880,44 @@ they are compressed; to access compressed MSDOS partitions under Linux, you can either use the DOS emulator DOSEMU, described in the DOSEMU-HOWTO, available via FTP (user: anonymous) at - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO, or try dmsdosfs in - ftp://sunsite.unc.edu/pub/Linux/system/filesystems/dosfs. If you + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO, or try dmsdosfs in + ftp://metalab.unc.edu/pub/Linux/system/filesystems/dosfs. If you intend to use dosemu with a non-compressed MSDOS partition, say Y here) and MSDOS floppies. This means that file access becomes 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. + repartitioning, you'll have to say Y or M here. - 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. + 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), @@ -6471,7 +6932,7 @@ 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 @@ -6482,8 +6943,9 @@ 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 @@ -6518,10 +6980,10 @@ programs nfsd and mountd (but does not need to have NFS filesystem support enabled in its kernel). NFS is explained in the Network Administrator's Guide, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/LDP, on its man page: "man + ftp://metalab.unc.edu/pub/Linux/docs/LDP, on its man page: "man nfs", and in the NFS-HOWTO. - An superior but less widely used alternative to NFS is provided by + 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. @@ -6538,18 +7000,19 @@ cannot compile this driver as a module in this case. There are two packages designed for booting diskless machines over the net: netboot and etherboot, both available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/system/boot/ethernet/ . + ftp://metalab.unc.edu/pub/Linux/system/boot/ethernet/ . If you don't know what all this is about, say N. 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. @@ -6565,7 +7028,7 @@ 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://metalab.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). @@ -6575,8 +7038,8 @@ Emulate Sun NFS daemon CONFIG_NFSD_SUN If you would like for the server to allow clients to access - directories that are mountpoints on the local filesystem (this is - how nfsd behaves on Sun systems), say yes here. If unsure, say N. + 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 @@ -6608,7 +7071,7 @@ 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. @@ -6618,34 +7081,36 @@ 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 @@ -6694,8 +7159,8 @@ 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 @@ -6712,13 +7177,13 @@ 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", below. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -6733,8 +7198,8 @@ 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. + this filesystem as well. Saying Y here will allow you to read from + 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 @@ -6756,6 +7221,12 @@ If you haven't heard about all of this before, it's safe to say N. +UFS filesystem write support +CONFIG_UFS_FS_WRITE + You will be able to write to 4.4BSD (e.g. FreeBSD, NetBSD and + OpenBSD) and SunOS partitions and diskettes if you say Y to this + option in addition to "UFS filesystem support", above. + BSD disklabel (FreeBSD partition tables) support CONFIG_BSD_DISKLABEL FreeBSD uses its own hard disk partition scheme on your PC. It @@ -6807,24 +7278,37 @@ If unsure, say N. -/dev/pts filesystem (experimental) +/dev/pts filesystem for Unix98 PTYs CONFIG_DEVPTS_FS 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 + 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/. 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. + of operation; you also need clients that use the Unix98 API. - 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. +Unixware slices support (EXPERIMENTAL) +CONFIG_UNIXWARE_DISKLABEL + Like some systems, Unixware uses, except DOS-like partition table, + its own slice table inside a partition (VTOC - Virtual Table of + Contents). Its format is incompatible with all other OSes. Saying Y + here allows you to read VTOC and further mount Unixware partitions + read-only from within Linux if you have also said Y to "UFS + filesystem support" or "System V and Coherent filesystem support", + above. + + This is mainly used to carry data from a Unixware box to your + Linux box via a removable medium like magneto-optical, ZIP or + removable IDE drives. Note, however, that 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"). If you don't know what all this is about, + say N. Macintosh partition map support CONFIG_MAC_PARTITION @@ -6832,24 +7316,24 @@ 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. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Note: if you just want your box to act as an SMB *server* and make files and printing services available to Windows clients (which need to have a TCP/IP stack), you don't need to say Y here; you can use the program samba (available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/system/network/samba) for that. + ftp://metalab.unc.edu/pub/Linux/system/network/samba) for that. 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 @@ -6874,18 +7358,17 @@ 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 . + 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 @@ -6900,7 +7383,7 @@ 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://metalab.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. @@ -7023,16 +7506,17 @@ 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 @@ -7043,7 +7527,7 @@ 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. @@ -7211,7 +7695,7 @@ 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 @@ -7257,6 +7741,21 @@ letters that were missing in Latin 4 to cover the entire Nordic area. +nls iso8859-15 +CONFIG_NLS_ISO8859_15 + If you want to display filenames with native language characters + from the Microsoft fat filesystem family or from JOLIET CDROMs + correctly on the screen, you need to include the appropriate + input/output character sets. Say Y here for the Latin 9 character + set, which covers most West European languages such as Albanian, + Catalan, Danish, Dutch, English, Estonian, Faeroese, Finnish, + French, German, Galician, Irish, Icelandic, Italian, Norwegian, + Portuguese, Spanish, Swedish, and Valencian. Latin 9 is an update to + Latin 1 (ISO 8859-1) that removes a handful of rarely used + characters and instead adds support for Estonian, corrects the + support for French and Finnish, and adds the new Euro character. If + unsure, say Y. + nls koi8-r CONFIG_NLS_KOI8_R If you want to display filenames with native language characters @@ -7267,30 +7766,67 @@ 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-. + + 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://metalab.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 @@ -7305,38 +7841,54 @@ 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 if you unload 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://metalab.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. @@ -7344,12 +7896,12 @@ 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 @@ -7363,8 +7915,8 @@ 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. @@ -7374,18 +7926,18 @@ 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 @@ -7394,19 +7946,19 @@ 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. @@ -7422,10 +7974,10 @@ 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 @@ -7451,8 +8003,8 @@ 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 @@ -7482,8 +8034,9 @@ filesystem; therefore, if you say Y here you should say Y to "/dev/pts filesystem for Unix98 PTYs" as well. - Say Y here if you are uncertain, unless you are very short on - memory. + 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 @@ -7494,7 +8047,7 @@ connection and every xterm uses up one PTY. When not in use, each additional set of 256 PTYs occupy - approximately 8K of kernel memory on 32-bit architectures. + approximately 8 KB of kernel memory on 32-bit architectures. Parallel printer support CONFIG_PRINTER @@ -7502,7 +8055,7 @@ box (as opposed to using a serial printer; if the connector at the printer has 9 or 25 holes ["female"], then it's serial), say Y. Also read the Printing-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. It is possible to share one parallel port among several devices (e.g. printer and ZIP drive) and it is safe to compile the @@ -7517,7 +8070,7 @@ 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.) The standard base + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO.) The standard base addresses as well as the syntax of the "lp" command line option can be found in drivers/char/lp.c. @@ -7528,7 +8081,7 @@ 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 @@ -7537,7 +8090,7 @@ Microsoft mouse (made by Logitech) that plugs into a COM port (rectangular with 9 or 25 pins). These people say N here. If you have something else, read the Busmouse-HOWTO, available via FTP - (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO and + (user: anonymous) in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO and say Y here. If you have a laptop, you either have to check the documentation or @@ -7555,7 +8108,7 @@ made by Logitech don't use the Logitech protocol anymore; for those, you don't need this option. You want to read the Busmouse-HOWTO, available via FTP (user: anonymous) in - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + ftp://metalab.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), @@ -7572,27 +8125,23 @@ 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. + in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. - 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. + 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://metalab.unc.edu:/pub/Linux/system/Daemons) solves this + problem, or you can get the "mconv" utility also from metalab. C&T 82C710 mouse port support (as on TI Travelmate) CONFIG_82C710_MOUSE This is a certain kind of PS/2 mouse used on the TI Travelmate. If you are unsure, try first to say N here and come back if the mouse doesn't work. Read the Busmouse-HOWTO, available via FTP (user: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + anonymous) in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. PC110 digitizer pad support CONFIG_PC110_PAD @@ -7600,7 +8149,7 @@ 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), @@ -7612,7 +8161,7 @@ These animals (also called Inport mice) are connected to an expansion board using a round connector with 9 pins. If this is what you have, say Y and read the Busmouse-HOWTO, available via FTP - (user: anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + (user: anonymous) in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. 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 @@ -7629,7 +8178,7 @@ This is a rare type of busmouse that is connected to the back of an ATI video card. Note that most ATI mice are actually Microsoft busmice. Read the Busmouse-HOWTO, available via FTP (user: - anonymous) in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. + anonymous) in ftp://metalab.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), @@ -7639,13 +8188,10 @@ 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 @@ -7661,7 +8207,7 @@ 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. @@ -7743,7 +8289,7 @@ 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 @@ -7754,7 +8300,7 @@ 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), @@ -7764,12 +8310,12 @@ 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 @@ -7782,9 +8328,9 @@ 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. @@ -7898,9 +8444,9 @@ 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 @@ -7924,9 +8470,9 @@ 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 @@ -7964,20 +8510,18 @@ 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 lead to all sorts of problems. - 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. + You can safely say Y even if your machine doesn't have MTRRs, you'll + just add about 3k to your kernel. See Documentation/mtrr.txt for more information. @@ -7989,8 +8533,8 @@ 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 @@ -8003,7 +8547,7 @@ Supporting software is available; for more information, read the Battery Powered Linux mini-HOWTO, available via FTP (user: - anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini. + anonymous) from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini. This driver does not spin down disk drives (see the hdparm(8) manpage ("man 8 hdparm") for that), and it doesn't turn off @@ -8028,41 +8572,45 @@ 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 @@ -8077,12 +8625,12 @@ 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. @@ -8090,13 +8638,14 @@ 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: + ftp://metalab.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 @@ -8106,6 +8655,43 @@ 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 and others, but + should be safe for all other laptops. When enabled, a system suspend + event that occurs within three seconds 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. + +RTC stores time in GMT +CONFIG_APM_RTC_IS_GMT + This option can be used when your RTC (Real Time Clock aka. Hardware + Clock) stores the time in GMT (Greenwich Mean Time) rather than + localtime. When suspending/resuming, the kernel needs to know what + is stored in the RTC so it can update the system clock (which is + always GMT). Without this option the kernel attempts to measure + the offset between the RTC and the system clock. This means you + can loose one second on each suspend/resume cycle. + Also, on the Dell Inspiron 3200, the hardware slows down the system + even before the kernel can measure the RTC/system clock offset. It + can then take 15 seconds to do this measurement and it can be + incorrect by several seconds. + Say Y if GMT is stored in your RTC. + GMT is usually the best anyway, because you don't have to worry about + daylight savings time changes. The only reason to not use GMT in + your RTC is if you also run a broken OS that doesn't understand GMT. + +Allow interrupts during APM BIOS calls +CONFIG_APM_ALLOW_INTS + Normally we disable external interrupts while we are making calls to + the APM BIOS as a measure to lessen the effects of a badly behaving + BIOS implementation. The BIOS should reeanble interrupts if it + needs to. Unfortunately, some BIOS's do not - especially those in + many of the newer IBM Thinkpads. If you experience hangs when you + suspend, try setting this to Y. Otherwise, say N. + Watchdog Timer Support CONFIG_WATCHDOG If you say Y here (and to one of the following options) and create a @@ -8121,8 +8707,8 @@ 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. @@ -8179,7 +8765,7 @@ 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. @@ -8187,8 +8773,9 @@ 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 @@ -8198,54 +8785,54 @@ 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 - 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)). + 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. + + If you enabled CONFIG_SMP, you should say Y here to read and set the + RTC clock in an SMP compatible fashion. 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. Note + however that most NVRAM space in a PC belongs to the BIOS and you should + NEVER idly tamper with it. See Ralf Browns interrupt list for a guide to + the use of CMOS bytes by your BIOS. + + 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). @@ -8257,7 +8844,7 @@ 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 under /dev/jsX devices. Please read the file + 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. @@ -8266,13 +8853,14 @@ 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 +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, and with CHF / FCS / 6-button - extensions. For more information on how to use the driver please - read Documentation/joystick.txt + 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 @@ -8280,25 +8868,26 @@ MadCatz Panther XL. For more information on how to use the driver please read Documentation/joystick.txt -Gravis GrIP gamepads +Gravis GrIP joysticks and gamepads CONFIG_JOY_GRAVIS - Say Y here if you have a Gravis GamePad Pro. For more information - on how to use the driver please read Documentation/joystick.txt + 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 L4 gamecards +PDPI Lightning 4 gamecards CONFIG_JOY_LIGHTNING - Say Y here if you have a PDPI Lightning L4 gamecard and an analog + 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 +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 +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, @@ -8306,32 +8895,34 @@ more information on how to use the driver please read Documentation/joystick.txt -ThrustMaster DirectConnect (BSP) joysticks +ThrustMaster DirectConnect joysticks and gamepads CONFIG_JOY_THRUSTMASTER - Say Y here if you have a ThrustMaster Millenium 3D Inceptor, ThrustMaster - 3D Rage Pad, or ThrustMaster WCS III. For more information on how to use the + 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 gamepads +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 + gamepad or a Multisystem -- Atari, Amiga, Commodore, Amstrad CPC joystick. For more information on how to use the driver please read - Documentation/joystick.txt + Documentation/joystick.txt and Documentation/joystick-parport.txt -Sega, Multisystem gamepads +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, + 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 + 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 + 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 @@ -8343,13 +8934,13 @@ 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 @@ -8358,7 +8949,7 @@ about your sound card and its configuration down (I/O port, interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available via FTP (user: anonymous) - from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO. There is also some + from ftp://metalab.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, and, if yes, which driver to use. @@ -8376,9 +8967,8 @@ 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 http://www.imladris.demon.co.uk/pcsp/ + 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 @@ -8394,6 +8984,14 @@ cards from Aztech. It supports the Waverider Pro 32 - 3D and the Galaxy Washington 16. +Support for AD1816(A) based cards (EXPERIMENTAL) +CONFIG_SOUND_AD1816 + Say M here if you have a soundcard based on the Analog Devices + AD1816(A) chip. + + NOTE: This driver is still EXPERIMENTAL. + See Documentation/sound/AD1816 for further information. + Yamaha OPL3-SA1 audio controller CONFIG_SOUND_OPL3SA1 Say Y or M if you have a Yamaha OPL3-SA1 sound chip, which is @@ -8403,7 +9001,7 @@ 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. @@ -8413,7 +9011,7 @@ Creative Labs or a 100% hardware compatible clone (like the Thunderboard or SM Games). If your card was in the list of supported cards look at the card specific instructions in the - drivers/sound/Readme.cards file before answering this question. For + drivers/sound/Readme.cards file before answering this question. For an unknown card you may answer Y if the card claims to be Sound Blaster-compatible. @@ -8466,12 +9064,17 @@ 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 or M if you have an Orchid SW32, Cardinal DSP16, Beethoven @@ -8493,8 +9096,8 @@ Have DSPxxx.LD firmware file CONFIG_PSS_HAVE_BOOT - If you have the DSPxxx.LD file or SYNTH.LD file for you card, answer - Y to include this file. Without this file the synth device (OPL) may + 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 @@ -8505,7 +9108,7 @@ 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 @@ -8514,10 +9117,10 @@ 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), @@ -8584,27 +9187,35 @@ 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-SA2, SA3, and SAx based PnP cards +CONFIG_SOUND_OPL3SA2 + Say Y or M if you have a card based on one of these Yamaha + sound chipsets. Read Documentation/sound/OPL3-SA2 for more + information on configuring these cards. 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 @@ -8613,22 +9224,23 @@ 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 @@ -8640,61 +9252,61 @@ 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 have S/PDIF I/O CONFIG_MSNDPIN_DIGITAL - If you have the S/PDIF daughterboard for the Pinnacle or Fiji, say 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 + 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. + 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 + 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 @@ -8712,16 +9324,16 @@ affect the kernel; saying Y will simply cause this configure script to present you with more options. If unsure, say Y. -ACI mixer (miroPCM12) +ACI mixer (miroPCM12/PCM20) 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 and PCM20 cards. On the PCM20, ACI also controls + the radio tuner. This is supported in the video4linux radio-miropcm20 + driver. SB32/AWE support CONFIG_AWE32_SYNTH @@ -8729,7 +9341,7 @@ similar sound card. See drivers/sound/lowlevel/README.awe, Documentation/sound/AWE32 and the Soundblaster-AWE mini-HOWTO, available via FTP (user: anonymous) from - ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini for more info. + ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini for more info. Gallant's Audio Excel DSP 16 support (SC-6000 and SC-6600) CONFIG_AEDSP16 @@ -8750,17 +9362,11 @@ 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 - The SC6600 is the new version of DSP mounted on the Audio Excel DSP - 16 cards. Find in the manual the FCC ID of your audio card and - answer Y if you have an SC6600 DSP. - -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" - and say N to "Audio Excel DSP 16 (SBPro emulation)". +I/O base for Audio Excel DSP 16 +CONFIG_AEDSP16_BASE + This is the base I/O address of the Audio Excel DSP 16 card. It must + be 220 or 240. If you compiled aedsp16.o as a module you can specify + this parameter as 'io=0xNNN'. Audio Excel DSP 16 (SBPro emulation) CONFIG_AEDSP16_SBPRO @@ -8769,6 +9375,68 @@ (SB16/32/64, ESS, Jazz16) support" and N to "Audio Excel DSP 16 (MSS emulation)". +Audio Excel DSP 16 IRQ +CONFIG_AEDSP16_SB_IRQ + This is the IRQ of the Audio Excel DSP 16 card. It must be 5, 7, 9, + 10 or 11. If you compiled aedsp16.o as a module you can specify + this parameter as 'irq=NN'. + +Audio Excel DSP 16 DMA +CONFIG_AEDSP16_SB_DMA + This is the IRQ of the Audio Excel DSP 16 card. It must be 0, 1 or 3. + If you compiled aedsp16.o as a module you can specify this parameter + as 'dma=NN'. + +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" + and say N to "Audio Excel DSP 16 (SBPro emulation)". + +Audio Excel DSP 16 IRQ +CONFIG_AEDSP16_MSS_IRQ + This is the IRQ of the Audio Excel DSP 16 card. It must be 5, 7, 9, + 10 or 11. If you compiled aedsp16.o as a module you can specify + this parameter as 'irq=NN'. + +Audio Excel DSP 16 DMA +CONFIG_AEDSP16_MSS_DMA + This is the IRQ of the Audio Excel DSP 16 card. It must be 0, 1 or 3. + If you compiled aedsp16.o as a module you can specify this parameter + as 'dma=NN'. + +SC-6600 based audio cards (new Audio Excel DSP 16) +CONFIG_SC6600 + The SC6600 is the new version of DSP mounted on the Audio Excel DSP + 16 cards. Find in the manual the FCC ID of your audio card and + answer Y if you have an SC6600 DSP. + +SC-6600 Joystick Interface +CONFIG_SC6600_JOY + This option activate the Joystick interface of Audio Excel DSP 16 card. + +SC-6600 CDROM Interface +CONFIG_SC6600_CDROM + This option activate the CDROM interface of Audio Excel DSP 16 card. + Required parameter can be: 0 for Sony, 1 for Panasonic, 2 for IDE, 4 for + no CDROM present. + +Audio Excel DSP 16 (MPU401 emulation) +CONFIG_AEDSP16_MPU401 + Answer Y if you want your audio card to emulate the MPU-401 midi + interface. You should then say Y to "MPU-401 support". + You have to note that the I/O base for MPU-401 support of aedsp16 is + the same you have selected for "MPU-401 support". If you are using + this driver as a module you have to specify the MPU I/O base address + with the parameter 'mpu_base=0xNNN'. + +MPU401 IRQ for Audio Excel DSP 16 +CONFIG_AEDSP16_MPU_IRQ + This is the IRQ of the MPU-401 emulation of Audio Excel DSP 16 card. + It must be 5, 7, 9, 10 or 0 (to disable MPU-401 interface). If you + compiled aedsp16.o as a module you can specify this parameter as + 'mpu_irq=NN'. + Ensoniq ES1370 based PCI sound cards CONFIG_SOUND_ES1370 Say Y or M if you have a PCI sound card utilizing the Ensoniq @@ -8780,6 +9448,10 @@ 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 @@ -8790,6 +9462,15 @@ models are either ES1370 or ES1371 based. This driver differs slightly from OSS/Free, so PLEASE READ Documentation/sound/es1371. +Gameport I/O-range selection +CONFIG_SOUND_ES1371_GAMEPORT + Select the I/O-range of the gameport on a ES1371 based soundcard. + The card uses 8 ioports and the gameport is available at all eight + ioports. Legal hexadecimal values are 200, 208, 210 and 218. + The joystick driver will by default use 0x201. + Leave the default 200 unless you have a joystick not attached + to your soundcard. + S3 SonicVibes based PCI sound cards CONFIG_SOUND_SONICVIBES Say Y or M if you have a PCI sound card utilizing the S3 @@ -8799,6 +9480,25 @@ 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 @@ -8818,10 +9518,10 @@ 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 @@ -8884,7 +9584,7 @@ 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 @@ -8921,104 +9621,116 @@ 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) @@ -9039,10 +9751,10 @@ 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 @@ -9071,7 +9783,7 @@ 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. @@ -9086,7 +9798,7 @@ 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). @@ -9101,7 +9813,7 @@ 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). @@ -9111,7 +9823,7 @@ 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) @@ -9166,21 +9878,21 @@ # 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 @@ -9191,54 +9903,61 @@ Say N unless you're willing to code the remaining necessary support. ;) +HP9000/300 support +CONFIG_HP300 + This option enables support for the HP9000/300 series of workstations. + Support for these machines is still very experimental. If you plan to + try to use the kernel on such a machine say Y here. Everybody else + says N. + # CONFIG_APOLLO, etc. coming soon (?) 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 @@ -9258,7 +9977,7 @@ 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"!). @@ -9268,13 +9987,13 @@ 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. @@ -9282,31 +10001,31 @@ 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 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 + 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 @@ -9355,13 +10074,13 @@ 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 @@ -9369,19 +10088,19 @@ 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 @@ -9391,36 +10110,36 @@ 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. + 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 @@ -9430,7 +10149,7 @@ 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). @@ -9472,7 +10191,7 @@ 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 @@ -9482,7 +10201,7 @@ 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 @@ -9510,7 +10229,7 @@ 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). @@ -9519,7 +10238,7 @@ 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). @@ -9529,13 +10248,13 @@ 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). @@ -9562,7 +10281,7 @@ 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). @@ -9571,9 +10290,9 @@ 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. @@ -9588,19 +10307,19 @@ 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 @@ -9614,8 +10333,8 @@ 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). @@ -9625,8 +10344,8 @@ 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 @@ -9634,44 +10353,58 @@ want). If you want to compile it as a module, say M here and read Documentation/modules.txt. +HP DCA serial support +CONFIG_HPDCA + If you want to use the internal "DCA" serial ports on an HP300 + machine, say Y here. + +HP on-board LANCE support +CONFIG_HPLANCE + If you want to use the builtin "LANCE" Ethernet controller on an HP300 + machine, say Y here. + +DIO bus support +CONFIG_DIO + Say Y here to enable support for the "DIO" expansion bus used in HP300 + machines. If you are using such a system you almost certainly want this. + 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. 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. + 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. + 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 + 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. @@ -9681,18 +10414,18 @@ 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 @@ -9703,7 +10436,7 @@ 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 @@ -9736,7 +10469,7 @@ 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 @@ -9750,7 +10483,7 @@ 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 @@ -9759,7 +10492,7 @@ 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 @@ -9772,7 +10505,7 @@ 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 @@ -9781,7 +10514,7 @@ 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 @@ -9794,8 +10527,8 @@ 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 @@ -9804,7 +10537,7 @@ 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 @@ -9825,7 +10558,7 @@ 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 @@ -9842,11 +10575,12 @@ 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. + Choose Y here if you have this FM radio card. You also need the + PCM12/PCM20 ACI mixer in additional low level sound drivers for this + to work. 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 @@ -9857,6 +10591,28 @@ say M here and read Documentation/modules.txt. The module will be called radio-miropcm20.o +GemTek Radio Card +CONFIG_RADIO_GEMTEK + Choose Y here if you have this FM radio card, 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-gemtek.o. + +GemTek i/o port +CONFIG_RADIO_GEMTEK_PORT + Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is + 0x34c, if you haven't changed the jumper setting on the card. + BT848 Video For Linux CONFIG_VIDEO_BT848 Support for BT848 based frame grabber/overlay boards. This includes @@ -9905,20 +10661,33 @@ 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. +Include support for CATS boards +CONFIG_CATS + Say Y here if you wish to include support for the extra hardware found + in Chalice CATS machines. The resulting kernel will still run on an + EBSA-285 but will be slightly larger. If in doubt say N. + +Debug kernel errors +CONFIG_DEBUG_ERRORS + This option controls verbose debugging information which can be printed + when the kernel detects an internal error. Verbose debugging information + is useful when tracking down kernel problems, but it will be meaning less + for non-kernel hackers. It's safe for everyone to say Y. + Build Tools Selection CONFIG_BINUTILS_NEW Say Y here if and only if you're using GCC 2.8.1/EGCS with a @@ -9931,51 +10700,301 @@ it will give useful debugging/error results. If you don't debug the kernel, you can 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. +Initial kernel command line +CONFIG_CMDLINE + On some architectures (EBSA285, EBSA110 and Corel NetWinder), there is + currently no way for the boot loader to pass arguments to the kernel. + For these architectures, you should supply some command-line options + at build time by entering them here. As a minimum, you should specify + the memory size and the root device (eg, mem=64M root=/dev/nfs) + +IrDA Protocols +CONFIG_IRDA + Say Y here if you want to build support for the IrDA (TM) + protocols. The Infrared Data Associations (tm) specifies standards + for wireless infrared communication and is supported by most laptops + and PDA's If you want to compile it as a module, say M here and read + Documentation/modules.txt. -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). + To use Linux support for the IrDA (tm) protocols, you will also need + some user-space utilities like the irmanager and probably irattach + as well. For more information, visit + http://www.cs.uit.no/~dagb/irda/ + +IrDA Cache last LSAP +CONFIG_IRDA_CACHE_LAST_LSAP + Say Y here if you want IrLMP to cache the last LSAP used. This makes + sense since most frames will be sent/received on the same connection. + Enabling this option will save a hash-lookup per frame. -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. + If unsure, say Y. -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. +IrDA Fast RR's +CONFIG_IRDA_FAST_RR + Say Y here is you want IrLAP to send fast RR (Receive Ready) frames + when acting as a primary station. This will make IrLAP send out a RR + frame immediately when receiving a frame if its own transmit queue is + currently empty. This will give a lot of speed improvement when + receiving much data since the secondary station will not have to + wait the max. turn around time before it is allowed to transmit the + next time. If the transmit queue of the secondary is also empty the + primary will back off waiting longer for sending out the RR frame + until the timeout reaches the normal value. Enabling this option + will make the IR-diode burn more power and thus reduce your battery + life. -Support for PowerMac serial ports -CONFIG_MAC_SERIAL - If you have Macintosh style serial ports (8 pin mini-DIN), this - is the driver for them. If you also have regular serial ports - and enable the driver for them, you can't currently use the - serial console feature. + If unsure, 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. +IrDA Recycle RR's +CONFIG_IRDA_RECYCLE_RR + In the normal life of the IrLAP protocol, it sends a lot of small RR + (Receive Ready) frames over the link (at least when it has nothing + else to do). Saying Y to this option will make IrLAP recycle these + frames thus avoiding many alloc_skb's and kfree_skb's. To do this it + will only buffer one of these frame which is enough for the normal + case. + + If unsure, say Y. + +IrDA Debug +CONFIG_IRDA_DEBUG + Say Y here if you want the IrDA subsystem to write debug information to + your syslog. You can change the debug level in + /proc/sys/net/irda/debug + + If unsure, say Y (since it makes it easier to find the bugs). + +IrLAP Compression support +CONFIG_IRDA_COMPRESSION + Compression is _not_ part of the IrDA(tm) protocol specification, + but it's working great! Linux is the first to try out compression + support at the IrLAP layer. This means that you will only benefit + from compression if you are running a Linux <-> Linux configuration + +IrLAP Deflate Compression Protocol +CONFIG_IRDA_DEFLATE + Say Y here if you want to build support for the Deflate compression + protocol. If you want to compile it as a module, say M here and read + Documentation/modules.txt. The deflate compression (GZIP) is exactly + the same as used by the PPP protocol. Enabling this option will + build a module called irda_deflate.o + +IrLAN Protocol +CONFIG_IRLAN + Say Y here if you want to build support for the IrLAN protocol. If + you want to compile it as a module, say M here and read + Documentation/modules.txt. IrLAN emulates an Ethernet and makes it + possible to put up an wireless LAN using infrared beams. + +IrLAN Client Protocol +CONFIG_IRLAN_CLIENT + Say Y here if you want to build support for the IrLAN client + protocol. If you want to compile it as a module, say M here and read + Documentation/modules.txt. The IrLAN client protocol can be used to + talk with infrared access points like the HP NetbeamIR, or the ESI + JetEye NET. You can also connect to another Linux machine running + the IrLAN server protocol for ac-hoc networking! + +IrLAN Server Protocol +CONFIG_IRLAN_SERVER + Say Y here if you want to build support for infrared LAN access. If + you want to compile it as a module, say M here and read + Documentation/modules.txt. The IrLAN server protocol makes it + possible to set up a wireless LAN with a machine running the IrLAN + client protocol. Notice that the IrLAN server protocol currently + only emulates an access point and does not implement the ad-hoc + specification of IrLAN, but this will not be noticeable for the + user. + +IrOBEX Protocol +CONFIG_IROBEX + Say Y here if you want to build support for the IrOBEX protocol. If + you want to compile it as a module, say M here and read + Documentation/modules.txt. The module does not actually implement + the IrOBEX protocol since that protocol lives in userspace, but it + contains the necessary functions to interface the user-space stuff + with the kernel. So you will need to have the user-space library and + programs that can use this library installed as well to be able to + use the IrOBEX protocol. This module will hopefully be replaced by + IrDA sockets in the future. + +IrCOMM Protocol +CONFIG_IRCOMM + Say Y here if you want to build support for the IrCOMM protocol. If + you want to compile it as a module, say M here and read + Documentation/modules.txt. IrCOMM implements serial port emulation, + and makes it possible to use all existing applications that + understands TTY's with an infrared link. Thus you should be able to + use application like PPP, minicom and others. Enabling this option + will create two modules called ircomm and ircomm_tty. For more + information go to http://www.pluto.dti.ne.jp/~thiguchi/irda/ + +IrLPT Protocol +CONFIG_IRLPT + Say Y here if you want to build support for the IrLPT protocol. If + you want to compile it as a module, say M here and read + Documentation/modules.txt. IrLPT makes it possible to print + documents to IrDA capable printers. + +IrLPT Client Protocol +CONFIG_IRLPT_CLIENT + Say Y here if you want to build support for the IrLPT client + protocol. If you want to compile it as a module, say M here and read + Documentation/modules.txt. The IrLPT client protocol can be used to + print documents to IrDA compatible printers like the HP-5MP, or + IrLPT printer adapters like the ACTiSYS IR-100M. + +IrLPT Server Protocol +CONFIG_IRLPT_SERVER + Say Y here if you want to build support for the IrLPT server + protocol. If you want to compile it as a module, say M here and read + Documentation/modules.txt. The IrLPT server protocol makes it + possible to use a Linux machine as an infrared printer server for + other laptops. So if your Linux machine has a cable connection to a + printer, then other laptops can use the Linux machine to print out + documents using infrared communication. + +IrTTY IrDA Device Driver +CONFIG_IRTTY_SIR + Say Y here if you want to build support for the IrTTY line + discipline. If you want to compile it as a module, say M here and + read Documentation/modules.txt. IrTTY makes it possible to use + Linux's own serial driver for all IrDA ports that are 16550 + compatible. Most IrDA chips are 16550 compatible so you should + probably say Y to this option. Using IrTTY will however limit the + speed of the connection to 115200 bps (IrDA SIR mode) + + If unsure, say Y. + +Winbond W83977AF IrDA Device Driver +CONFIG_WINBOND_FIR + Say Y here if you want to build IrDA support for the Winbond W83977AF + super-io chipset. If you want to compile it as a module, say M here + and read Documentation/modules.txt. This driver should be used for + the IrDA chipset in the Corel NetWinder. The driver supports SIR, + MIR and FIR (4Mbps) speeds. + +NSC PC87108 IrDA Device Driver +CONFIG_NSC_FIR + Say Y here if you want to build support for the NSC PC87108 IrDA + chipset. If you want to compile it as a module, say M here and + read Documentation/modules.txt. This drivers currently only supports + the ACTiSYS IR2000B ISA card and supports SIR, MIR and FIR (4Mbps) + speeds. + +Sharp UIRCC IrDA Device Driver +CONFIG_SHARP_FIR + Say Y here if you want to build support for the Sharp UIRCC IrDA + chipset. If you want to compile it as a module, say M here and + read Documentation/modules.txt. This chipset is used by the Toshiba + Tecra laptops. + +ESI JetEye PC Dongle +CONFIG_ESI_DONGLE + Say Y here if you want to build support for the Extended Systems + JetEye PC dongle. If you want to compile it as a module, say M here + and read Documentation/modules.txt. The ESI dongle attaches to the + normal 9-pin serial port connector, and can currently only be used + by IrTTY. To activate support for ESI dongles you will have to + insert "irattach -d esi" in the /etc/irda/drivers script. + +ACTiSYS IR-220L and IR220L+ dongle +CONFIG_ACTISYS_DONGLE + Say Y here if you want to build support for the ACTiSYS + IR-220L and IR220L+ dongles. If you want to compile it as a module, + say M here and read Documentation/modules.txt. The ACTiSYS dongles + attaches to the normal 9-pin serial port connector, and can + currently only be used by IrTTY. To activate support for ACTiSYS + dongles you will have to insert "irattach -d actisys" or + "irattach -d actisys_plus" in the/etc/irda/drivers script. + +Tekram IrMate 210B dongle +CONFIG_TEKRAM_DONGLE + Say Y here if you want to build support for the Tekram IrMate 210B + dongle. If you want to compile it as a module, say M here + and read Documentation/modules.txt. The Tekram dongle attaches to + the normal 9-pin serial port connector, and can currently only be + used by IrTTY. To activate support for Tekram dongles you will have + to insert "irattach -d tekram" in the /etc/irda/drivers script. + +VME (Motorola and BVM) support +CONFIG_VME + Say Y here if you want to build a kernel for a 680x0 based VME + board. Boards currently supported include Motorola boards MVME162, + MVME166, MVME167, MVME172, and MVME177. BVME4000 and BVME6000 + boards from BVM Ltd are also supported. + +MVME162, 166 and 167 support +CONFIG_MVME16x + Say Y to include support for Motorola VME boards. This will build a + kernel which can run on MVME162, MVME166, MVME167, MVME172, and + MVME177 boards. If you select this option you will have to select + the appropriate drivers for SCSI, Ethernet and serial ports later + on. + +BVME4000 and BVME6000 support +CONFIG_BVME6000 + Say Y to include support for VME boards from BVM Ltd. This will + build a kernel which can run on BVME4000 and BVME6000 boards. If + you select this option you will have to select the appropriate + drivers for SCSI, Ethernet and serial ports later on. + +Use write-through caching for 68060 supervisor accesses +CONFIG_060_WRITETHROUGH + The 68060 generally uses copyback caching of recently accessed data. + Copyback caching means that memory writes will be held in an on-chip + cache and only written back to memory some time later. Saying Y + here will force supervisor (kernel) accesses to use writethrough + caching. Writethrough caching means that data is written to memory + straight away, so that cache and memory data always agree. + Writethrough caching is less efficient, but is needed for some + drivers on 68060 based systems where the 68060 bus snooping signal + is hardwired on. The 53c710 SCSI driver is known to suffer from + this problem. + +NCR53C710 SCSI driver for MVME16x +CONFIG_MVME16x_SCSI + The Motorola MVME162, 166, 167, 172 and 177 boards use the NCR53C710 + SCSI controller chip. Almost everyone using one of these boards + will want to say Y to this question. + +NCR53C710 SCSI driver for BVME6000 +CONFIG_BVME6000_SCSI + The BVME4000 and BVME6000 boards from BVM Ltd use the NCR53C710 + SCSI controller chip. Almost everyone using one of these boards + will want to say Y to this question. + +MVME16x Ethernet support +CONFIG_MVME16x_NET + This is the driver for the Ethernet interface on the Motorola + MVME162, 166, 167, 172 and 177 boards. Say Y here to include the + driver for this chip in your kernel. If you want to compile it as + a module, say M here and read Documentation/modules.txt. + +BVME6000 Ethernet support +CONFIG_BVME6000_NET + This is the driver for the Ethernet interface on BVME4000 and + BVME6000 VME boards. Say Y here to include the driver for this chip + in your kernel. If you want to compile it as a module, say M here + and read Documentation/modules.txt. + +CD2401 support for MVME166/7 serial ports +CONFIG_SERIAL167 + This is the driver for the serial ports on the Motorola MVME166, + 167, and 172 boards. Everyone using one of these boards should say + Y here. + +SCC support for MVME162 serial ports +CONFIG_MVME162_SCC + This is the driver for the serial ports on the Motorola MVME162 and + 172 boards. Everyone using one of these boards should say Y here. + +SCC support for BVME6000 serial ports +CONFIG_BVME6000_SCC + This is the driver for the serial ports on the BVME4000 and BVME6000 + boards from BVM Ltd. Everyone using one of these boards should say + Y here. -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. # # A couple of things I keep forgetting: # capitalize: AppleTalk, Ethernet, DMA, FTP, Internet, Intel, IRQ, @@ -9985,7 +11004,7 @@ # # This is used by Emacs' spell checker ispell.el: # -# LocalWords: CONFIG coprocessor DX Pentium SX lilo loadlin HOWTO ftp sunsite +# LocalWords: CONFIG coprocessor DX Pentium SX lilo loadlin HOWTO ftp metalab # LocalWords: unc edu docs emu README kB BLK DEV FD Thinkpad fd MFM RLL IDE gz # LocalWords: cdrom diskless netboot nfs xzvf ATAPI MB ide pavia rubini pl pd # LocalWords: HD CDROMs IDECD NEC MITSUMI filesystem XT XD PCI BIOS cezar ATEN @@ -10027,13 +11046,13 @@ # 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 @@ -10107,7 +11126,7 @@ # 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 @@ -10169,6 +11188,19 @@ # 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 -# LocalWords: synth WaveFront MSND NONPNP AudioExcelDSP STRAM APUS CHRP MBX -# LocalWords: PowerMac's BMAC radiotrack rtrack miropcm +# 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 -ur --new-file old/linux/Documentation/cdrom/cdrom-standard.tex new/linux/Documentation/cdrom/cdrom-standard.tex --- old/linux/Documentation/cdrom/cdrom-standard.tex Sat Jun 13 22:05:21 1998 +++ new/linux/Documentation/cdrom/cdrom-standard.tex Mon Jan 18 21:47:33 1999 @@ -23,8 +23,9 @@ \begin{document} \title{A \linux\ \cdrom\ standard} \author{David van Leeuwen\\{\normalsize\tt david@ElseWare.cistron.nl} -\\{\footnotesize updated by Erik Andersen {\tt(andersee@debian.org)}}} -\date{19 November 1997} +\\{\footnotesize updated by Erik Andersen {\tt(andersee@debian.org)}} +\\{\footnotesize updated by Jens Axboe {\tt(axboe@image.dk)}}} +\date{11 January 1999} \maketitle @@ -145,7 +146,7 @@ low-level \cdrom\ device drivers. The \UCD\ now provides another software-level, that separates the $ioctl()$ and $open()$ implementation from the actual hardware implementation. Note that this effort has -made few changes which will effect a user's application programs. The +made few changes which will affect a user's application programs. The greatest change involved moving the contents of the various low-level \cdrom\ drivers' header files to the kernel's cdrom directory. This was done to help ensure that the user is only presented with only one cdrom @@ -232,7 +233,7 @@ struct& cdrom_device_ops\ \{ \hidewidth\cr &int& (* open)(struct\ cdrom_device_info *, int)\cr &void& (* release)(struct\ cdrom_device_info *);\cr - &int& (* drive_status)(struct\ cdrom_device_info *);\cr + &int& (* drive_status)(struct\ cdrom_device_info *, int);\cr &int& (* media_changed)(struct\ cdrom_device_info *, int);\cr &int& (* tray_move)(struct\ cdrom_device_info *, int);\cr &int& (* lock_door)(struct\ cdrom_device_info *, int);\cr @@ -286,12 +287,13 @@ \noalign{\medskip} & kdev_t& dev;& device number (incorporates minor)\cr & int& mask;& mask of capability: disables them \cr - &const\ int& speed;& maximum speed for reading data \cr - &const\ int& capacity;& number of discs in a jukebox \cr + & int& speed;& maximum speed for reading data \cr + & int& capacity;& number of discs in a jukebox \cr \noalign{\medskip} &int& options : 30;& options flags \cr - &long& mc_flags : 2;& media-change buffer flags \cr + &unsigned& mc_flags : 2;& media-change buffer flags \cr & int& use_count;& number of times device is opened\cr + & char& name[20];& name of the device type\cr \}\cr }$$ Using this $struct$, a linked list of the registered minor devices is @@ -371,13 +373,13 @@ allocated buffers in the VFS is taken care of by the routine in \cdromc. This is the only function returning type $void$. -\subsection{$Int\ drive_status(struct\ cdrom_device_info * cdi)$} +\subsection{$Int\ drive_status(struct\ cdrom_device_info * cdi, int\ slot_nr)$} \label{drive status} The function $drive_status$, if implemented, should provide information on the status of the drive (not the status of the disc, -which may or may not be in the drive). In \cdromh\ the possibilities -are listed: +which may or may not be in the drive). If the drive is not a changer, +$slot_nr$ should be ignored. In \cdromh\ the possibilities are listed: $$ \halign{$#$\ \hfil&$/*$ \rm# $*/$\hfil\cr CDS_NO_INFO& no information available\cr @@ -810,7 +812,7 @@ \subsection{$Int\ cdrom_ioctl(struct\ inode *ip, struct\ file *fp, - unsigned\ int\ cmd, unsigned\ long\ arg)$} +unsigned\ int\ cmd, unsigned\ long\ arg)$} \label{cdrom-ioctl} This function handles all the standard $ioctl$ requests for \cdrom\ @@ -833,7 +835,7 @@ \item[CDROMEJECT_SW] If $arg\not=0$, set behavior to auto-close (close tray on first open) and auto-eject (eject on last release), otherwise set behavior to non-moving on $open()$ and $release()$ calls. -\item[CDROM_GET_MCN or CDROM_GET_UPC] Get the Media Catalog Number from a CD. +\item[CDROM_GET_MCN] Get the Media Catalog Number from a CD. \end{description} \subsubsection{$Ioctl$s routed through $audio_ioctl()$} @@ -931,7 +933,6 @@ CDS_NO_DISC& no disc is inserted, or tray is opened\cr CDS_AUDIO& Audio disc (2352 audio bytes/frame)\cr CDS_DATA_1& data disc, mode 1 (2048 user bytes/frame)\cr - CDS_DATA_2& data disc, mode 2 (2336 user bytes/frame)\cr CDS_XA_2_1& mixed data (XA), mode 2, form 1 (2048 user bytes)\cr CDS_XA_2_2& mixed data (XA), mode 2, form 1 (2324 user bytes)\cr CDS_MIXED& mixed audio/data disc\cr @@ -942,6 +943,7 @@ \item[CDROM_CHANGER_NSLOTS] Returns the number of slots in a juke-box. +\item[CDROMRESET] Reset the drive. \end{description} \subsubsection{Device dependent $ioctl$s} diff -ur --new-file old/linux/Documentation/cdrom/ide-cd new/linux/Documentation/cdrom/ide-cd --- old/linux/Documentation/cdrom/ide-cd Wed Jul 29 21:37:05 1998 +++ new/linux/Documentation/cdrom/ide-cd Mon Jan 18 21:47:33 1999 @@ -1,6 +1,7 @@ IDE-CD driver documentation Originally by scott snyder (19 May 1996) Carrying on the torch is: Erik Andersen +New maintainers (19 Oct 1998): Jens Axboe 1. Introduction --------------- diff -ur --new-file old/linux/Documentation/cdrom/mcdx new/linux/Documentation/cdrom/mcdx --- old/linux/Documentation/cdrom/mcdx Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/cdrom/mcdx Thu Jan 7 17:41:54 1999 @@ -21,13 +21,13 @@ This driver: - o handles XA (and hopefully) multi session CDs as well as + o handles XA and (hopefully) multi session CDs as well as ordinary CDs; o supports up to 5 drives (of course, you'll need free IRQs, i/o ports and slots); o uses much less kernel memory than the standard mcd driver (no extra driver internal buffers!). - o plays audio (like the `old' driver, I hope) + o plays audio (like the `old' driver, I hope) This version doesn't support yet: diff -ur --new-file old/linux/Documentation/devices.txt new/linux/Documentation/devices.txt --- old/linux/Documentation/devices.txt Sun Aug 16 20:35:51 1998 +++ new/linux/Documentation/devices.txt Wed Dec 16 21:52:00 1998 @@ -98,10 +98,14 @@ demand. block Floppy disks - 0 = /dev/fd0 First floppy disk autodetect - 1 = /dev/fd1 Second floppy disk autodetect - 2 = /dev/fd2 Third floppy disk autodetect - 3 = /dev/fd3 Fourth floppy disk autodetect + 0 = /dev/fd0 Controller 1, drive 1 autodetect + 1 = /dev/fd1 Controller 1, drive 2 autodetect + 2 = /dev/fd2 Controller 1, drive 3 autodetect + 3 = /dev/fd3 Controller 1, drive 4 autodetect + 128 = /dev/fd4 Controller 2, drive 1 autodetect + 129 = /dev/fd5 Controller 2, drive 2 autodetect + 130 = /dev/fd6 Controller 2, drive 3 autodetect + 131 = /dev/fd7 Controller 2, drive 4 autodetect To specify format, add to the autodetect device number: 0 = /dev/fd? Autodetect format diff -ur --new-file old/linux/Documentation/digiboard.txt new/linux/Documentation/digiboard.txt --- old/linux/Documentation/digiboard.txt Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/digiboard.txt Thu Jan 7 17:41:54 1999 @@ -10,7 +10,7 @@ In case you have problems with this version (1.6.1) of this driver, please email directly to me as I made the last update. It you have a report about -runnning it on other architectures than intel, email me, so I can document +running it on other architectures than intel, email me, so I can document it here. A version of this driver has been taken by Digiboard to make a driver diff -ur --new-file old/linux/Documentation/digiepca.txt new/linux/Documentation/digiepca.txt --- old/linux/Documentation/digiepca.txt Wed May 14 07:40:59 1997 +++ new/linux/Documentation/digiepca.txt Thu Jan 7 17:41:54 1999 @@ -27,7 +27,7 @@ drivers started device names with 1. PCI boards are auto-detected and configured by the driver. PCI boards will -be allocated device numbers (internally) begining with the lowest PCI slot +be allocated device numbers (internally) beginning with the lowest PCI slot first. In other words a PCI card in slot 3 will always have higher device nodes than a PCI card in slot 1. @@ -46,7 +46,7 @@ Base of memory window (in HEX if using string identifiers), NOTE : PCI boards are auto-detected and configured. Do not attempt to -configure PCI boards with the LILO append comand. If you wish to override +configure PCI boards with the LILO append command. If you wish to override previous configuration data (As set by digiConfig), but you do not wish to configure any specific card (Example if there are PCI cards in the system) the following override command will accomplish this: diff -ur --new-file old/linux/Documentation/fb/framebuffer.txt new/linux/Documentation/fb/framebuffer.txt --- old/linux/Documentation/fb/framebuffer.txt Sat Jul 11 00:18:29 1998 +++ new/linux/Documentation/fb/framebuffer.txt Wed Nov 25 23:53:51 1998 @@ -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 @@ -------------------------------------- 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 @@ --------------- 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 @@ 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 @@ 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 -ur --new-file old/linux/Documentation/fb/matroxfb.txt new/linux/Documentation/fb/matroxfb.txt --- old/linux/Documentation/fb/matroxfb.txt Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/fb/matroxfb.txt Fri Jan 15 22:56:49 1999 @@ -0,0 +1,336 @@ +[This file is cloned from VesaFB. Thanks go to Gerd Knorr] + +what is matroxfb? +================= + +This is a driver for a graphic framebuffer for Matrox devices on +Alpha, Intel and PPC boxes. + +Advantages: + + * It provides a nice large console (128 cols + 48 lines with 1024x768) + without using tiny, unreadable fonts. + * You can run XF68_FBDev on top of /dev/fb0 + * Most important: boot logo :-) + +Disadvantages: + + * graphic mode is slower than text mode... but you should not notice + if you use same resolution as you used in textmode. + + +How to use it? +============== + +Switching modes is done using the video=matrox:vesa:... boot parameter +or using `fbset' program. + +If you want, for example, enable a resolution of 1280x1024x24bpp you should +pass to the kernel this command line: "video=matrox:vesa:0x1BB". +Note that the same line, if 'appended' as a lilo parameter in lilo.conf will +read "video=matrox:vesa:443" because lilo pass integer parameters as decimal +numbers to the kernel. + +You should compile in both vgacon (to boot if you remove you Matrox from +box) and matroxfb (for graphics mode). You should not compile-in vesafb +unless you have primary display on non-Matrox VBE2.0 device (see +Documentation/vesafb.txt for details). + +Currently supported video modes are (through vesa:... interface, PowerMac +has [as addon] compatibility code): + + +[Graphic modes] + +bpp | 640x400 640x480 768x576 800x600 960x720 +----+-------------------------------------------- + 4 | 0x12 0x102 + 8 | 0x100 0x101 0x180 0x103 0x188 + 15 | 0x110 0x181 0x113 0x189 + 16 | 0x111 0x182 0x114 0x18A + 24 | 0x1B2 0x184 0x1B5 0x18C + 32 | 0x112 0x183 0x115 0x18B + + +[Graphic modes (continued)] + +bpp | 1024x768 1152x864 1280x1024 1408x1056 1600x1200 +----+------------------------------------------------ + 4 | 0x104 0x106 + 8 | 0x105 0x190 0x107 0x198 0x11C + 15 | 0x116 0x191 0x119 0x199 0x11D + 16 | 0x117 0x192 0x11A 0x19A 0x11E + 24 | 0x1B8 0x194 0x1BB 0x19C 0x1BF + 32 | 0x118 0x193 0x11B 0x19B + + +[Text modes] + +text | 640x400 640x480 1056x344 1056x400 1056x480 +-----+------------------------------------------------ + 8x8 | 0x1C0 0x108 0x10A 0x10B 0x10C +8x16 | 2, 3, 7 0x109 + +You can enter these number either hexadecimal (leading `0x') or decimal +(0x100 = 256). You can also use value + 512 to achieve compatibility +with your old number passed to vesafb. + +Non-listed number can be achieved by more complicated command-line, for +example 1600x1200x32bpp can be specified by `video=matrox:vesa:0x11C,depth:32'. + + +X11 +=== + +XF68_FBDev should work just fine, but it is non-accelerated. On non-intel +architectures there are some glitches for 24bpp videomodes. 8, 16 and 32bpp +works fine. + +Running another (accelerated) X-Server like XF86_SVGA works too. But (at least) +XFree servers have big troubles in multihead configurations (even on first +head, not even talking about second). + + +SVGALib +======= + +Driver contains SVGALib compatibility code. It is turned on by choosing textual +mode for console. You can do it at boottime by using videomode +2,3,7,0x108-0x10C or 0x1C0. At runtime, `fbset -depth 0' does this work. +Unfortunately, after SVGALib application exits, screen contents is corrupted. +Switching to another console and back fixes it. I hope that it is SVGALib and +not mine problem, but I'm not sure. + + +Configuration +============= + +You can pass kernel command line options to vesafb with +`video=matrox:option1,option2:value2,option3' (multiple options should be +separated by comma, values are separated from options by `:'). +Accepted options: + +mem:X - size of memory (X can be in megabytes, kilobytes or bytes) + You can only decrease value determined by driver because of + it always probe for memory. Default is to use whole detected + memory usable for on-screen display (i.e. max. 8MB). +disabled - do not load driver; you can use also `off', but `disabled' + is here too. +enabled - load driver, if you have `video=matrox:disabled' in LILO + configuration, you can override it by this (you cannot override + `off'). It is default. +noaccel - do not use acceleration engine. It does not work on Alphas. +accel - use acceleration engine. It is default. +nopan - create initial consoles with vyres = yres, thus disabling virtual + scrolling. +pan - create initial consoles as tall as possible (vyres = memory/vxres). + It is default. +nopciretry - disable PCI retries. It is needed for some broken chipsets, + it is autodetected for intel's 82437. In this case device does + not comply to PCI 2.1 specs (it will not guarantee that every + transaction terminate with success or retry in 32 PCLK). +pciretry - enable PCI retries. It is default, except for intel's 82437. +novga - disables VGA I/O ports. It is default if BIOS did not enable device. + You should not use this option, some boards then do not restart + without power off. +vga - preserve state of VGA I/O ports. It is default. Driver does not + enable VGA I/O if BIOS did not it (it is not safe to enable it in + most cases). +nobios - disables BIOS ROM. It is default if BIOS did not enable BIOS itself. + You should not use this option, some boards then do not restart + without power off. +bios - preserve state of BIOS ROM. It is default. Driver does not enable + BIOS if BIOS was not enabled before. +noinit - tells driver, that devices were already initialized. You should use + it if you have G100 and/or if driver cannot detect memory, you see + strange pattern on screen and so on. Devices not enabled by BIOS + are still initialized. It is default. +init - driver initializes every device it knows about. +nomtrr - disables write combining on frame buffer. This slows down driver but + there is reported minor incompatibility between GUS DMA and XFree + under high loads if write combining is enabled (sound dropouts). +mtrr - enables write combining on frame buffer. It speeds up video accesses + much. It is default. You must have MTRR support enabled in kernel + and your CPU must have MTRR (f.e. Pentium II have them). +sgram - tells to driver that you have G200 with SGRAM memory. It has no + effect without `init'. +sdram - tells to driver that you have G200 with SDRAM memory. + It is a default. +inv24 - change timings parameters for 24bpp modes on Millenium and + Millenium II. Specify this if you see strange color shadows around + characters. +noinv24 - use standard timmings. It is default. +inverse - invert colors on screen (for LCD displays) +noinverse - show true colors on screen. It is default. +dev:X - bind driver to device X. Driver numbers device from 0 up to N, + where device 0 is first `known' device found, 1 second and so on. + lspci lists devices in this order. + Default is `every' known device for driver with multihead support + and first working device (usually dev:0) for driver without + multihead support. +nohwcursor - disables hardware cursor (use software cursor instead). +hwcursor - enables hardware cursor. It is default. If you are using + non-accelerated mode (`noaccel' or `fbset -accel false'), software + cursor is used (except for text mode). +noblink - disables cursor blinking. Cursor in text mode always blinks (hw + limitation). +blink - enables cursor blinking. It is default. +nofastfont - disables fastfont feature. It is default. +fastfont:X - enables fastfont feature. X specifies size of memory reserved for + font data, it must be >= (fontwidth*fontheight*chars_in_font)/8. + It is faster on Gx00 series, but slower on older cards. +grayscale - enable grayscale summing. It works in PSEUDOCOLOR modes (text, + 4bpp, 8bpp). In DIRECTCOLOR modes it is limited to characters + displayed through putc/putcs. Direct accesses to framebuffer + can paint colors. +nograyscale - disable grayscale summing. It is default. +cross4MB - enables that pixel line can cross 4MB boundary. It is default for + non-Millenium. +nocross4MB - pixel line must not cross 4MB boundary. It is default for + Millenium I or II, because of these devices have hardware + limitations which do not allow this. But this option is + incompatible with some (if not all yet released) versions of + XF86_FBDev. +vesa:X - selects startup videomode. X is number from 0 to 0x1FF, see table + above for detailed explanation. Default is 640x480x8bpp if driver + has 8bpp support. Otherwise first available of 640x350x4bpp, + 640x480x15bpp, 640x480x24bpp, 640x480x32bpp or 80x25 text + (80x25 text is always available). + +If you are not satisfied with videomode selected by `vesa' option, you +can modify it with these options: + +xres:X - horizontal resolution, in pixels. Default is derived from `vesa' + option. +yres:X - vertical resolution, in pixel lines. Default is derived from `vesa' + option. +upper:X - top boundary: lines between end of VSYNC pulse and start of first + pixel line of picture. Default is derived from `vesa' option. +lower:X - bottom boundary: lines between end of picture and start of VSYNC + pulse. Default is derived from `vesa' option. +vslen:X - length of VSYNC pulse, in lines. Default is derived from `vesa' + option. +left:X - left boundary: pixels between end of HSYNC pulse and first pixel. + Default is derived from `vesa' option. +right:X - right boundary: pixels between end of picture and start of HSYNC + pulse. Default is derived from `vesa' option. +hslen:X - length of HSYNC pulse, in pixels. Default is derived from `vesa' + option. +pixclock:X - dotclocks, in ps (picoseconds). Default is derived from `vesa' + option and from `fh' and `fv' options. +sync:X - sync. pulse - bit 0 inverts HSYNC polarity, bit 1 VSYNC polarity. + If bit 3 (value 0x08) is set, composite sync instead of HSYNC is + generated. If bit 5 (value 0x20) is set, sync on green is turned on. + Default depends on `vesa'. +depth:X - Bits per pixel: 0=text, 4,8,15,16,24 or 32. Default depends on + `vesa'. + +If you know capabilities of your monitor, you can specify some (or all) of +`pixclk', `fh' and `fv'. In this case, `pixclock' is computed so that +pixclock <= maxclk, real_fh <= fh and real_fv <= fv. + +maxclk:X - maximum dotclock. X can be specified in MHz, kHz or Hz. Default is + `don't care'. +fh:X - maximum horizontal synchronization frequency. X can be specified + in kHz or Hz. Default is `don't care'. +fv:X - maximum vertical frequency. X must be specified in Hz. Default is + 70 for modes derived from `vesa' with yres <= 400, 60Hz for + yres > 400. + + +Limitations +=========== + +There are known and unknown bugs, features and misfeatures. +Currently there are following known bugs: + + SVGALib does not restore screen on exit + + generic fbcon-cfbX procedures do not work on Alphas. Due to this, + `noaccel' (and cfb4 accel) driver does not work on Alpha. So everyone + with access to /dev/fb* on Alpha can hang machine (you should restrict + access to /dev/fb* - everyone with access to this device can destroy + your monitor, believe me...). + + 24bpp does not support correctly XF-FBDev on big-endian architectures. + + interlaced text mode is not supported; it looks like hardware limitiation, + but I'm not sure. + + G200 SGRAM/SDRAM is not autodetected. + + maybe more... +And following misfeatures: + + SVGALib does not restore screen on exit. + + pixclock for text modes is limited by hardware to + 83MHz on G200 + 66MHz on Millenium I + 60MHz on Millenium II + Because of I have not access to other devices, I do not know specific + frequencies for them. So driver does not check this and allows you to + set frequency higher that this. It cause sparks, black holes and other + pretty effects on screen. Device was not destroyed during tests :-) + + my Millenium G200 oscillator has frequency range from 35MHz to 380MHz + (and it works with 8bpp on about 320MHz dotclocks (and changed mclk)). + But Matrox says on product sheet that VCO limit is 50-250MHz, so I believe + them (maybe that chip overheates, but it has very big cooler (G100 has + not one), so it should work). + + special mixed video/graphics videomodes of Mystique and Gx00 - 2G8V16 and + G16V16 are not supported + + color keying is not supported + + feature connector of Mystique and Gx00 is set to VGA mode (it is disabled + by BIOS) + + DCC (monitor detection) protocol is not implemented + + some check for input values are not so strict how it should be (you can + specify vslen=4000 and so on). + + maybe more... +And following features: + + 4bpp is available only on Millenium I and Millenium II. It is hardware + limitiation. + + current fbset is not able to set 15bpp videomode: you must specify + depth==16 and green.length==5. fbset does not allow you to set + green.length. + + hardware cursor is available only in accelerated videomodes. Maybe that + this is misfeature and not feature. + + text mode uses 6 bit VGA palette instead of 8 bit (one of 262144 colors + instead of one of 16M colors). It is due to hardware limitation of + MilleniumI/II and SVGALib compatibility. + + +Benchmarks +========== +It is time to redraw whole screen 1000 times in 1024x768, 60Hz. It is +time for draw 6144000 characters on screen through /dev/vcsa +(for 32bpp it is about 3GB of data (exactly 3000 MB); for 8x16 font in +16 seconds, i.e. 187MBps). +Times were obtained from one older version of driver, now they are about 3% +faster, it is kernel-space only time on P-II/350MHz, Millenium I in 33MHz +PCI slot, G200 in AGP 2x slot. I did not test vgacon. + +NOACCEL + 8x16 12x22 + MilleniumI G200 MilleniumI G200 +8bpp 16.42 9.54 12.33 9.13 +16bpp 21.00 15.70 19.11 15.02 +24bpp 36.66 36.66 35.00 35.00 +32bpp 35.00 30.00 33.85 28.66 + +ACCEL, nofastfont + 8x16 12x22 6x11 + MilleniumI G200 MilleniumI G200 MilleniumI G200 +8bpp 7.79 7.24 13.55 7.78 30.00 21.01 +16bpp 9.13 7.78 16.16 7.78 30.00 21.01 +24bpp 14.17 10.72 18.69 10.24 34.99 21.01 +32bpp 16.15 16.16 18.73 13.09 34.99 21.01 + +ACCEL, fastfont + 8x16 12x22 6x11 + MilleniumI G200 MilleniumI G200 MilleniumI G200 +8bpp 8.41 6.01 6.54 4.37 16.00 10.51 +16bpp 9.54 9.12 8.76 6.17 17.52 14.01 +24bpp 15.00 12.36 11.67 10.00 22.01 18.32 +32bpp 16.18 18.29* 12.71 12.74 24.44 21.00 + +TEXT + 8x16 + MilleniumI G200 +TEXT 3.29 1.50 + + +* Yes, it is slower than Millenium I. +-- +Petr Vandrovec diff -ur --new-file old/linux/Documentation/fb/vesafb.txt new/linux/Documentation/fb/vesafb.txt --- old/linux/Documentation/fb/vesafb.txt Mon Oct 5 22:39:20 1998 +++ new/linux/Documentation/fb/vesafb.txt Fri Jan 15 07:53:02 1999 @@ -1,16 +1,16 @@ -what is vesafb? +What is vesafb? =============== This is a generic driver for a graphic framebuffer on intel boxes. -Idea is simple: Turn on graphics mode at boot time with the help of -the BIOS, and use this as framebuffer device /dev/fb0, like the m68k +The idea is simple: Turn on graphics mode at boot time with the help +of the BIOS, and use this as framebuffer device /dev/fb0, like the m68k (and other) ports do. This means we decide at boot time whenever we want to run in text or graphics mode. Switching mode later on (in protected mode) is -impossible, BIOS calls work in real mode only. VESA BIOS Extentions +impossible; BIOS calls work in real mode only. VESA BIOS Extentions Version 2.0 are required, becauce we need a linear frame buffer. Advantages: @@ -33,11 +33,12 @@ Documentation/svga.txt for details. You should compile in both vgacon (for text mode) and vesafb (for -graphics mode). Which of them takes over the console depends on +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: +vga=ask and hit return. The mode you wish to use is derived from the +VESA mode number. Here are those VESA mode numbers: | 640x480 800x600 1024x768 1280x1024 ----+------------------------------------- @@ -46,19 +47,35 @@ 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. +The video mode number of the Linux kernel is the VESA mode number plus +0x200. + + Linux_kernel_mode_number = VESA_mode_number + 0x200 + +So the table for the Kernel mode numbers are: -Note: LILO can't handle hex, for booting directly with "vga=mode-number" - you have to transform the numbers to decimal. + | 640x480 800x600 1024x768 1280x1024 +----+------------------------------------- +256 | 0x301 0x303 0x305 0x307 +32k | 0x310 0x313 0x316 0x319 +64k | 0x311 0x314 0x317 0x31A +16M | 0x312 0x315 0x318 0x31B + +To enable one of those modes you have to specify "vga=ask" in the +lilo.conf file and rerun LILO. Then you can type in the descired +mode at the "vga=ask" prompt. For example if you like to use +1024x768x256 colors you have to say "305" at this prompt. + +If this does not work, this might be becauce your BIOS does not support +linear framebuffers or becauce it does not support this mode at all. +Even if your board does, it might be the BIOS which does not. VESA BIOS +Extentions v2.0 are required, 1.2 is NOT sufficient. You will get a +"bad mode number" message if something goes wrong. +1. Note: LILO cannot handle hex, for booting directly with + "vga=mode-number" you have to transform the numbers to decimal. +2. Note: Some newer versions of LILO appear to work with those hex values, + if you set the 0x infront of the numbers. X11 === @@ -68,7 +85,7 @@ 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). +with a broken console (and vesafb cannot do anything about this). Configuration @@ -98,3 +115,6 @@ -- Gerd Knorr + +Minor (mostly typo) changes +by Nico Schmoigl diff -ur --new-file old/linux/Documentation/ide.txt new/linux/Documentation/ide.txt --- old/linux/Documentation/ide.txt Thu May 21 03:54:34 1998 +++ new/linux/Documentation/ide.txt Tue Jan 5 00:07:27 1999 @@ -1,9 +1,5 @@ -ide.txt -- Information regarding the Enhanced IDE drive in Linux 2.1.68+ +ide.txt -- Information regarding the Enhanced IDE drive in Linux 2.1/2.2 =============================================================================== -Supported by: - Mark Lord -- disks, interfaces, probing - Gadi Oxman -- tapes, disks, whatever - Scott Snyder -- cdroms, ATAPI, audio +-----------------------------------------------------------------+ | The hdparm utility for controlling various IDE features is | @@ -12,7 +8,7 @@ See description later on below for handling BIG IDE drives with >1024 cyls. -Major features of the 2.1.xx IDE driver ("NEW!" marks changes since 2.0.xx): +Major features of the 2.1/2.2 IDE driver ("NEW!" marks changes since 2.0.xx): NEW! - support for IDE ATAPI *floppy* drives - support for IDE ATAPI *tape* drives, courtesy of Gadi Oxman @@ -69,10 +65,9 @@ NEW! - works with most Pentium PCI systems, chipsets, add-on cards NEW! - works with regular DMA as well as Ultra DMA NEW! - automatically probes for all PCI IDE interfaces +NEW! - generic support for using BIOS-configured Ultra-DMA (UDMA) transfers -For work in progress, see the comments in ide.c, ide-cd.c, triton.c, ... - *** IMPORTANT NOTICES: BUGGY IDE CHIPSETS CAN CORRUPT DATA!! *** ================= *** PCI versions of the CMD640 and RZ1000 interfaces are now detected @@ -98,24 +93,26 @@ *** Use of the "serialize" option is no longer necessary. This is the multiple IDE interface driver, as evolved from hd.c. -It supports up to four IDE interfaces, on one or more IRQs (usually 14 & 15). +It supports up to six IDE interfaces, on one or more IRQs (usually 14 & 15). There can be up to two drives per interface, as per the ATA-2 spec. Primary: ide0, port 0x1f0; major=3; hda is minor=0; hdb is minor=64 Secondary: ide1, port 0x170; major=22; hdc is minor=0; hdd is minor=64 Tertiary: ide2, port 0x1e8; major=33; hde is minor=0; hdf is minor=64 Quaternary: ide3, port 0x168; major=34; hdg is minor=0; hdh is minor=64 +fifth.. ide4, usually PCI, probed +sixth.. ide5, usually PCI, probed -To access devices on the 2nd/3rd/4th interfaces, device entries must first be +To access devices on interfaces > ide0, device entries must first be created in /dev for them. To create such entries, simply run the included shell script: /usr/src/linux/scripts/MAKEDEV.ide -Apparently many releases of Slackware 2.2/2.3 have incorrect entries +Apparently many older releases of Slackware had incorrect entries in /dev for hdc* and hdd* -- this can also be corrected by running MAKEDEV.ide -ide.c automatically probes for the standard four IDE interfaces, +ide.c automatically probes for most IDE interfaces (including all PCI ones), for the drives/geometries attached to those interfaces, and for the -IRQ numbers being used by the interfaces (normally 14, 15, 11 and 10). +IRQ numbers being used by the interfaces (normally 14, 15 for ide0/ide1). For special cases, interfaces may be specified using kernel "command line" options. For example, @@ -179,7 +176,7 @@ so ide.c now probes for both units, though success is more likely when the drive is jumpered correctly. -Courtesy of Scott Snyder, the driver supports ATAPI cdrom drives +Courtesy of Scott Snyder and others, the driver supports ATAPI cdrom drives such as the NEC-260 and the new MITSUMI triple/quad speed drives. Such drives will be identified at boot time, just like a hard disk. @@ -227,8 +224,8 @@ The kernel is able to execute binaries directly off of the cdrom, provided it is mounted with the default block size of 1024 (as above). -Please pass on any feedback on the cdrom stuff to the author & maintainer, -Scott Snyder (snyder@fnald0.fnal.gov). +Please pass on any feedback on any of this stuff to the maintainer, +whose address can be found in linux/MAINTAINERS. Note that if BOTH hd.c and ide.c are configured into the kernel, hd.c will normally be allowed to control the primary IDE interface. @@ -256,8 +253,7 @@ insmod ide.o options="ide0=serialize ide2=0x1e8;0x3ee;11" -mlord@pobox.com -snyder@fnald0.fnal.gov + ================================================================================ Summary of ide driver parameters for kernel "command line": @@ -307,6 +303,7 @@ except the cmd640. "idex=serialize" : do not overlap operations on idex and ide(x^1) "idex=reset" : reset interface after probe + "idex=dma" : automatically configure/use DMA if possible. The following are valid ONLY on ide0, and the defaults for the base,ctl ports must not be altered. @@ -319,6 +316,8 @@ "ide0=ali14xx" : probe/support ali14xx chipsets (ALI M1439/M1445) "ide0=umc8672" : probe/support umc8672 chipsets +There may be more options than shown -- use the source, Luke! + Everything else is rejected with a "BAD OPTION" message. ================================================================================ @@ -488,19 +487,19 @@ - buy a motherboard that uses the Intel Triton chipset -- very common. - use IDE for the first two drives, placing them on separate interfaces. + - very fast 7200rpm drives are now available + (though many problems have been reported with Seagate ones). - place the IDE cdrom drive as slave on either interface. - if additional disks are to be connected, consider your needs: - fileserver? Buy a SC200 SCSI adaptor for the next few drives. - personal system? Use IDE for the next two drives. - still not enough? Keep adding SC200 SCSI cards as needed. -Most manufacturers make both IDE and SCSI-2 versions of each of their drives. -The IDE ones are usually faster and cheaper, due to the higher data transfer -speed of PIO mode4 (ATA2), 16.6MBytes/sec versus 10Mbytes/sec for SCSI-2. - -In particular, I recommend Quantum FireBalls as cheap and exceptionally fast. -The new WD1.6GB models are also cheap screamers. - -For really high end systems, go for fast/wide 7200rpm SCSI. But it'll cost ya! +Most manufacturers make both IDE and SCSI versions of each of their drives. +The IDE ones are usually as fast and cheaper, due to lower command overhead +and the higher data transfer speed of UDMA2. But fast/ultrawide/superlative +SCSI is still king of the heap, especially for servers, if you've got the bucks. mlord@pobox.com +-- +For current maintainers of this stuff, see the linux/MAINTAINERS file. diff -ur --new-file old/linux/Documentation/isdn/README.act2000 new/linux/Documentation/isdn/README.act2000 --- old/linux/Documentation/isdn/README.act2000 Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/isdn/README.act2000 Thu Jan 7 17:41:54 1999 @@ -7,7 +7,7 @@ Version. Currently, only the ISA-Bus version of the card is supported. However MCA and PCMCIA will follow soon. -The ISA-Bus Version uses 8 IO-ports. The base port adress has to be set +The ISA-Bus Version uses 8 IO-ports. The base port address has to be set manually using the DIP switches. Setting up the DIP switches for the IBM Active 2000 ISDN card: diff -ur --new-file old/linux/Documentation/isdn/README.concap new/linux/Documentation/isdn/README.concap --- old/linux/Documentation/isdn/README.concap Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/isdn/README.concap Thu Jan 7 17:41:54 1999 @@ -229,7 +229,7 @@ then the interface of the service function could be changed by passing a pointer of type (struct device*) instead of type (struct concap_proto*). Doing so would make many of the service -functions compatible to network device support fuctions. +functions compatible to network device support functions. e.g. instead of the concap protocol's service function @@ -241,7 +241,7 @@ As this is compatible to the dev->hard_start_xmit() method, the device driver could directly register the concap protocol's encap_and_xmit() -fuction as its hard_start_xmit() method. This would eliminate one +function as its hard_start_xmit() method. This would eliminate one procedure call layer. diff -ur --new-file old/linux/Documentation/isdn/README.x25 new/linux/Documentation/isdn/README.x25 --- old/linux/Documentation/isdn/README.x25 Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/isdn/README.x25 Thu Jan 7 17:41:54 1999 @@ -210,7 +210,7 @@ isdnloop driver. It seems that it is not caused by the isdn code. Somehow, the inode of a socket is freed while a process still refers the socket's wait queue. This causes problems when the process tries to -remove itself from the wait queue (refered by the dangling +remove itself from the wait queue (referred by the dangling sock->sleep pointer) before returning from a select() system call. - Henner diff -ur --new-file old/linux/Documentation/joystick-parport.txt new/linux/Documentation/joystick-parport.txt --- old/linux/Documentation/joystick-parport.txt Wed Oct 21 17:43:33 1998 +++ new/linux/Documentation/joystick-parport.txt Wed Dec 2 04:05:05 1998 @@ -506,14 +506,14 @@ ~~~~~~~~~~~~~~~~~~~~ The joy-turbografx.c driver uses a very simple kernel/module command line: - js_tg=port,count + 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). - 'Count' is the number of Multisystem, 1-button joysticks connected to the -interface. + '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 diff -ur --new-file old/linux/Documentation/joystick.txt new/linux/Documentation/joystick.txt --- old/linux/Documentation/joystick.txt Wed Oct 21 17:43:33 1998 +++ new/linux/Documentation/joystick.txt Wed Dec 2 04:05:05 1998 @@ -1,4 +1,4 @@ - Linux Joystick driver v1.2.12 + Linux Joystick driver v1.2.13 (c) 1996-1998 Vojtech Pavlik ---------------------------------------------------------------------------- @@ -30,10 +30,11 @@ The joystick driver for Linux provides support for a variety of joysticks and similar devices. - These currently include various analog joysticks (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. + 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, @@ -54,13 +55,23 @@ 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 site: + The joystick package is available at the following FTP sites: - ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick/joystick-1.2.x.tar.gz + 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: @@ -70,27 +81,42 @@ 2. Usage ~~~~~~~~ - To use the driver as a standalone module, without patching the kernel, you -first need to edit the Makefile to meet your needs (namely whether you use -MODVERSIONS). Then you compile the driver by typing + 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 compiling you first + And after that you install it - insmod joystick.o + make install - and then + 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: - insmod joy-something.o + make devs - where 'something' is the type of your joystick. See below for more precise -explanation. Of course, you can insmod more than one hardware specific -module at once, if you have more than one joystick installed. + For manual creation of the joystick devices, check the +Documentation/devices.txt file in the Linux source tree. - If you want to have the driver compiled into your kernel, you first need -to patch the kernel, so that it contains the current driver version. You do -that with a command: + 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 @@ -98,29 +124,101 @@ /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. +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. +as modules. After you compile the modules - After you're done with installation of the driver itself, you'll need to -create the joystick device files in /dev so that applications can use them. -This is done by typing + make modules - make devs + 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 -in the joystick driver's directory. For manual creation of the joystick -devices, check the Documentation/devices.txt file in the Linux source tree. + And add a line to your rc script executing that file -2.1 Analog joysticks + 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. However the only types that can be -autodetected are: + 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 @@ -204,7 +302,7 @@ And it would do the same as the above explained command line. Use whichever way you like best. -2.2 Microsoft SideWinder and Genius Digital joysticks +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: @@ -221,7 +319,7 @@ by the analog driver described above. SideWinder FreeStyle Pro and SideWinder Force Feedback Wheel are not supported yet. -2.3 Logitech Digital joysticks +3.3 Logitech Digital joysticks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Logitech Digital joysticks are supported by the joy-logitech.c module. It currently supports these devices: @@ -239,24 +337,25 @@ Formula, Wingman Formula Force, Wingman Gamepad, Wingman Interceptor are USB joysticks, with optional serial port connection, and are not supported yet. -2.4 Gravis GrIP +3.4 Gravis GrIP ~~~~~~~~~~~~~~~ Gravis GrIP gamepads are supported by the joy-gravis.c module. It -currently supports only: +currently supports: * Gravis GamePad Pro * Gravis Xterminator +* Gravis Blackhawk Digital - Both the pads are be autodetected, and you can even use any combination of -up to two these pads either chained together or using an Y-cable on a single + 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. - Gravis Blackhawk Digital, and GrIP MultiPort pads are not supported yet. GrIP MultiPort support is in the works. Gravis Xcalibur, ArcadeXtreme, GamePad Pro/M are joysticks/pads that probably never reached mass -production. +production. Gravis Stinger is a serial device and hopefully will be +supported in the future. -2.5 FPGaming A3D and MadCatz A3D +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 @@ -274,22 +373,22 @@ The trackball support is far from perfect at this stage of development, but should be well usable. -2.6 ThrustMaster DirectConnect (BSP) +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 -* ThrustMaster Weapon Control System III - All these drvices are autodetected, and thus no parameters to the module + Both these drvices are autodetected, and thus no parameters to the module are needed. - The only tested device was the Millenium. Rage Pad might work, and -WCS III won't, because important parts of code for that are missing. + 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. -2.7 PDPI Lightning 4 gamecards +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 @@ -321,7 +420,7 @@ See the description of analog joystick driver for explanations of m0 and n0 values. -2.8 Amiga +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. @@ -339,11 +438,11 @@ 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. -2.9 Game console and 8-bit pads and joysticks +3.9 Game console and 8-bit pads and joysticks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See joystick-parport.txt for more info. -3. Troubleshooting +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 @@ -359,7 +458,8 @@ make joydump.o - in the driver's directory. It is run then by typing + in the directory where you unpacked the joystick package. It is run then +by typing insmod joydump.o @@ -370,7 +470,7 @@ Oh, and read the FAQ! :) -4. 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: @@ -420,14 +520,9 @@ A: Yes, it is possible, but it'll burn your serial port or the pad. It won't work, of course. -5. 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 included in the -joystick package to set better correction coefficients than what the driver -would choose itself. + 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 ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -449,27 +544,27 @@ Thanks to the following people who contributed code, ideas or specifications to the joystick driver development: - 0.1-0.5 Arthur C. Smith - 0.5 Eyal Lebedinsky - 0.6 Jeff Tranter - 0.7 Carlos Puchol - 0.7.1-0.8 Matt Rhoten - 0.7.3 Dan Fandrich - 0.7.3 Sverker Wilberg - 0.8 Hal Maney - 0.8 Bernd Schmidt - 0.9 Alan Cox - 1.1.0 John Markus Bjorndalen - 1.1.0 Boris Muehmer - 1.1.0 Robert W. Grubbs - 1.1.0 Pete Chown - 1.1.0 Benji York - 1.1.3 Leslie F. Donaldson - 1.2.0 Eng-Jon Ong - 1.2.8 Ragnar Hojland Espinosa - 1.1.0-1.2.9 Brian Gerst - 1.2.3-1.2.12 Andree Borrmann - 0.9.0-1.2.12 Vojtech Pavlik + Arthur C. Smith + Eyal Lebedinsky + Jeff Tranter + Carlos Puchol + Matt Rhoten + Dan Fandrich + Sverker Wilberg + Hal Maney + Bernd Schmidt + Alan Cox + John Markus Bjorndalen + Boris Muehmer + Robert W. Grubbs + Pete Chown + Benji York + Leslie F. Donaldson + Eng-Jon Ong + Ragnar Hojland Espinosa + Brian Gerst + Andree Borrmann + Martin Giguere 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. :) @@ -506,14 +601,7 @@ 9. To do ~~~~~~~~ - Sooner or later I'll do these: - - Fix possible races at open/close - Fix possible read/timer races - Make the driver SMP-friendly - Support joysticks on Linux/m68k/Atari - Support joysticks on Linux/FM-TOWNS (?) - Support even more joystick types + See the TODO file for the list of things planned. 10. Current driver status ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -545,6 +633,7 @@ 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 @@ -555,8 +644,7 @@ SW PP - OK SW FFP - OK joy-thrustmaster.c Millenium 3D Inceptor - OK - 3D-Rage pad - unknown - WCS III - incomplete + 3D-Rage Pad - OK joy-turbografx.c Multi1 stick - OK Please help me and send me success / failure reports for the drivers, diff -ur --new-file old/linux/Documentation/kernel-docs.txt new/linux/Documentation/kernel-docs.txt --- old/linux/Documentation/kernel-docs.txt Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/kernel-docs.txt Mon Jan 4 20:37:29 1999 @@ -0,0 +1,331 @@ + + + INDEX OF DOCUMENTATION FOR PEOPLE INTERESTED IN WRITING AND/OR UNDERSTANDING + THE LINUX KERNEL. + + Juan-Mariano de Goyeneche + + + /* + * The latest version of this document may be found at: + * http://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html + */ + + The need for a document like this one became apparent in the + linux-kernel mailing list as the same questions, asking for pointers + to information, appeared again and again. + + Fortunately, as more and more people get to GNU/Linux, more and more + get interested in the Kernel. But reading the sources is not always + enough. It is easy to understand the code, but miss the concepts, the + philosophy and design decissions behind this code. + + Unfortunately, not many documents are available for beginners to + start. And, even if they exist, there was no "well-known" place which + kept track of them. These lines try to cover this lack. All documents + available on line known by the author are listed, while some reference + books are also mentioned. + + PLEASE, if you know any paper not listed here or write a new document, + send me an e-mail, and I'll include a reference to it here. Any + corrections, ideas or comments are also welcomed. + + The papers that follow are listed in no particular order. All are + catalogued with the following fields: the document's "Title", the + "Author"/s, the "URL" where they can be found, some "Keywords" + helpfull when searching for specific topics, and a brief "Description" + of the Document. + + Enjoy! + + + ON-LINE DOCS: + + + Title: "The Linux Kernel" + Author: David A. Rusling. + URL: http://sunsite.unc.edu/linux/LDP/tlk/tlk.html + Keywords: everything!, book. + Description: On line, 200 pages book describing most + aspects of the Linux Kernel. Probably, the first reference + for beginners. Lots of illustrations explaining data + structures use and relationships in the purest Richard W. + Stevens' style. Contents: "1.-Hardware Basics, 2.-Software + Basics, 3.-Memory Management, 4.-Processes, 5.-Interprocess + Communication Mechanisms, 6.-PCI, 7.-Interrupts and Interrupt + Handling, 8.-Device Drivers, 9.-The File system, + 10.-Networks, 11.-Kernel Mechanisms, 12.-Modules, 13.-The + Linux Kernel Sources, A.-Linux Data Structures, B.-The Alpha + AXP Processor, C.-Useful Web and FTP Sites, D.-The GNU + General Public License, Glossary". In short: a must have. + + + Title: "The Linux Kernel Hackers' Guide" + Author: Michael K.Johnson and others. + URL: http://www.redhat.com:8080/HyperNews/get/khg.html + Keywords: everything! + Description: No more Postscript book-like version. Only + HTML now. Many people have contributed. The interface is + similar to web available mailing lists archives. You can find + some articles and then some mails asking questions about them + and/or complementing previous contributions. A little bit + anarchic in this aspect, but with some valuable information + in some cases. + + + Title: "Tour Of the Linux Kernel Source" + Author: Vijo Cherian. + URL: http://www.svrec.ernet.in/~vijo/tolks/tolks.html + Keywords: + Description: The name says it all. A tour of the sources, + describing directories, files, variables, data structures... + It covers general stuff, device drivers, filesystems, IPC and + Network Code. + + + Title: "Overview of the Virtual File System" + Author: Richard Gooch. + URL: http://www.atnf.csiro.au/~rgooch/linux/vfs.txt + Keywords: VFS, File System, mounting filesystems, opening + files, dentries, + dcache. Description: Brief introduction to the Linux + Virtual File System. What is it, how it works, operations + taken when opening a file or mounting a file system and + description of important data structures explaining the + purpose of each of their entries. + + + Title: "The Linux RAID-1, 4, 5 Code" + Author: Ingo Molnar, Gadi Oxman and Miguel de Icaza. + URL: http://www.ssc.com/lj/issue44/2391.html + Keywords: RAID, MD driver. + Description: Linux Journal Kernel Korner article. Here is + it's abstract: "A description of the implementation of the + RAID-1, RAID-4 and RAID-5 personalities of the MD device + driver in the Linux kernel, providing users with high + performance and reliable, secondary-storage capability using + software". + + + Title: "Dynamic Kernels: Modularized Device Drivers" + Author: Alessandro Rubini. + URL: http://www.ssc.com/lj/issue23/1219.html + Keywords: device driver, module, loading/unloading modules, + allocating + resources. Description: Linux Journal Kernel Korner + article. Here is it's abstract: "This is the first of a + series of four articles co-authored by Alessandro Rubini and + Georg Zezchwitz which present a practical approach to writing + Linux device drivers as kernel loadable modules. This + installment presents an introduction to the topic, preparing + the reader to understand next month's installment". + + + Title: "Dynamic Kernels: Discovery" + Author: Alessandro Rubini. + URL: http://www.ssc.com/lj/issue24/kk24.html + Keywords: character driver, init_module, clean_up module, + autodetection, + mayor number, minor number, file operations, open(), close(). + Description: Linux Journal Kernel Korner article. Here is + it's abstract: "This article, the second of four, introduces + part of the actual code to create custom module implementing + a character device driver. It describes the code for module + initialization and cleanup, as well as the open() and close() + system calls". + + + Title: "The Devil's in the Details" + Author: Georg v. Zezschwitz and Alessandro Rubini. + URL: http://www.ssc.com/lj/issue25/kk25.html + Keywords: read(), write(), select(), ioctl(), blocking/non + blocking mode, + interrupt handler. Description: Linux Journal Kernel Korner + article. Here is it's abstract: "This article, the third of + four on writing character device drivers, introduces concepts + of reading, writing, and using ioctl-calls". + + + Title: "Dissecting Interrupts and Browsing DMA" + Author: Alessandro Rubini and Georg v. Zezschwitz. + URL: http://www.ssc.com/lj/issue26/interrupt.html + Keywords: interrupts, irqs, DMA, bottom halves, task + queues. + Description: Linux Journal Kernel Korner article. Here is + it's abstract: "This is the fourth in a series of articles + about writing character device drivers as loadable kernel + modules. This month, we further investigate the field of + interrupt handling. Though it is conceptually simple, + practical limitations and constraints make this an + ``interesting'' part of device driver writing, and several + different facilities have been provided for different + situations. We also investigate the complex topic of DMA". + + + Title: "Network Buffers And Memory Management" + Author: Alan Cox. + URL: http://www.ssc.com/lj/issue30/kk30.html + Keywords: sk_buffs, network devices, protocol/link layer + variables, network + devices flags, transmit, receive, configuration, multicast. + Description: Linux Journal Kernel Korner. Here is the + abstract: "Writing a network device driver for Linux is + fundamentally simple---most of the complexity (other than + talking to the hardware) involves managing network packets in + memory". + + + Title: "An Introduction to the Linux 1.3.x Networking Code" + Author: Vipul Gupta. + URL: + http://anchor.cs.binghamton.edu/courses/cs628/linux-net.html + Keywords: files, sk_buffs. + Description: A short description of files under the net/ + directory. Each file has a one or two lines paragrahp + description. sk_buffs explained, too, with some beatiful + pictures. A little bit outdated. + + + Title: "Linux ioctl() Primer" + Author: Vipul Gupta. + URL: + http://anchor.cs.binghamton.edu/courses/cs628/ioctl.html + Keywords: ioctl, socket. + Description: Little description and examples on the use and + implementation of the ioctl() system call. A little bit + biased towards sockets. + + + Title: "Writing Linux Device Drivers" + Author: Michael K. Johnson. + URL: http://www.redhat.com/~johnsonm/devices.html + Keywords: files, VFS, file operations, kernel interface, + character vs + block devices, I/O access, hardware interrupts, DMA, access + to user memory, memory allocation, timers. Description: + Introductory 50-minutes (sic) tutorial on writing device + drivers. 12 pages written by the same author of the "Kernel + Hackers' Guide" which give a very good overview of the topic. + + + Title: "The Venus kernel interface" + Author: Peter J. Braam. + URL: + http://www.coda.cs.cmu.edu/doc/html/kernel-venus-protocol.html + Keywords: coda, filesystem, venus, cache manager. + Description: "This document describes the communication + between Venus and kernel level file system code needed for + the operation of the Coda filesystem. This version document + is meant to describe the current interface (version 1.0) as + well as improvements we envisage". + + + Title: "Programming PCI-Devices under Linux" + Author: Claus Schroeter. + URL: + ftp://ftp.llp.fu-berlin.de/pub/linux/LINUX-LAB/whitepapers/pc + ip.ps.gz + Keywords: PCI, device, busmastering. + Description: 6 pages tutorial on PCI programming under + Linux. Gives the basic concepts on the architecture of the + PCI subsystem, as long as basic functions and macros to + read/write the devices and perform busmastering. + + + Title: "Writing Character Device Driver for Linux" + Author: R. Baruch and C. Schroeter. + URL: + ftp://ftp.llp.fu-berlin.de/pub/linux/LINUX-LAB/whitepapers/dr + ivers.ps.gz + Keywords: character device drivers, I/O, signals, DMA, + accesing ports in user space, kernel environment. + Description: 68 pages paper on writing character drivers. A + little bit old (1.993, 1.994) although still useful. + + + + * BOOKS: (Not on-line) + + + Title: "Linux Device Drivers" + Author: Alessandro Rubini. + Publisher: O'Reilly &Associates. + Date: 1998. + ISBN: 1-56592-292-1 + + + Title: "Linux Kernel Internals" + Author: Michael Beck. + Publisher: Addison-Wesley. + Date: 1997. + ISBN: 0-201-33143-8 (second edition) + + + Title: "The Design of the UNIX Operating System" + Author: Maurice J. Bach. + Publisher: Prentice Hall. + Date: 1986. + ISBN: ??? + + + Title: "The Design and Implementation of the 4.3 BSD UNIX + Operating System" + Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael + J. Karels, John S. Quarterman. + Publisher: Addison-Wesley. + Date: 1989 (reprinted with corrections on October, 1990). + ISBN: 0-201-06196-1 + + + Title: "The Design and Implementation of the 4.4 BSD UNIX + Operating System" + Author: Marshall Kirk McKusick, Keith Bostic, Michael J. + Karels, John S. Quarterman. + Publisher: Addison-Wesley. + Date: 1996. + ISBN: 0-201-54979-4 + + + Title: "Programmation Linux 2.0 API systeme et + fonctionnement du noyau" + Author: Remy Card, Eric Dumas, Franck Mevel. + Publisher: Eyrolles. + Date: 1997. + Pages: 520. ISBN: 2-212-08932-5 + + + Title: "Unix internals -- the new frontiers" + Author: Uresh Vahalia. + Publisher: Prentice Hall. + Date: 1996. + Pages: 600. ISBN: 0-13-101908-2 + + + * MISCELLANEOUS: + + + Name: Linux Source Driver. + URL: http://lsd.linux.cz + Keywords: Browsing. + Description: "Linux Source Driver (LSD) is an application, + which can make browsing source codes of Linux kernel easier + than you can imagine. You can select between multiple + versions of kernel (e.g. 0.01, 1.0.0, 2.0.33, 2.0.34pre13, + 2.0.0, 2.1.101 etc.). With LSD you can search Linux kernel + (fulltext, macros, types, functions and variables) and LSD + can generate patches for you on the fly (files, directories + or kernel)". + + + Name: Linux Weekly News. + URL: http://lwn.net + Keywords: last kernel news. + Description: The title says it all. There's a fixed kernel + section summarizing developers' work, bug fixes, new features + and versions produced during the week. Published every + thursday. + + + Name: CuTTiNG.eDGe.LiNuX. + URL: http://edge.linuxhq.com + Keywords: changelist. + Description: Site which provides the changelist for every + kernel release. What's new, what's better, what's changed. + Myrdraal reads the patchs and describes them. Pointers to the + patches are there, too. + + + Name: New linux-kernel Mailing List FAQ. + URL: Original site: + http://www.altern.org/andrebalsa/doc/lkml-faq.html + URL: U.S. mirror site: + http://www.ececs.uc.edu/~rreilova/linux/lkml-faq.html + Keywords: linux-kernel mailing list FAQ. + Description: linux-kernel is a mailing list for developers + to communicate. This FAQ builds on the previous linux-kernel + mailing list FAQ maintained by Frohwalt Egerer, who no longer + maintains it. Read it to see how to join the mailing list. + Dozens of interesting questions regarding the list, Linux, + developers (who is ...?), terms (what is...?) are answered + here too. Just read it. + + + Name: "Linux Virtual File System" + Author: Peter J. Braam. + URL: http://www.coda.cs.cmu.edu/doc/talks/linuxvfs + Keywords: slides, VFS, inode, superblock, dentry, dcache. + Description: Set of slides, presumably from a presentation + on the Linux VFS layer. Covers version 2.1.x, with dentries + and the dcache. diff -ur --new-file old/linux/Documentation/locks.txt new/linux/Documentation/locks.txt --- old/linux/Documentation/locks.txt Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/locks.txt Thu Jan 7 17:41:54 1999 @@ -45,7 +45,7 @@ I wanted the two lock styles to be cooperative, but there were so many race and deadlock conditions that the current solution was the only practical one. It puts us in the same position as, for example, SunOS -4.1.x and serveral other commercial Unices. The only OS's that support +4.1.x and several other commercial Unices. The only OS's that support cooperative flock()/fcntl() are those that emulate flock() using fcntl(), with all the problems that implies. diff -ur --new-file old/linux/Documentation/logo.txt new/linux/Documentation/logo.txt --- old/linux/Documentation/logo.txt Sun Jun 9 17:01:04 1996 +++ new/linux/Documentation/logo.txt Fri Jan 15 07:53:02 1999 @@ -1,6 +1,6 @@ This is the full-colour version of the currently unofficial Linux logo ("currently unofficial" just means that there has been no paperwork and -that I haven't really announced it yet). It was created by Larry Ewing, +that I have not really announced it yet). It was created by Larry Ewing, and is freely usable as long as you acknowledge Larry as the original artist. diff -ur --new-file old/linux/Documentation/m68k/kernel-options.txt new/linux/Documentation/m68k/kernel-options.txt --- old/linux/Documentation/m68k/kernel-options.txt Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/m68k/kernel-options.txt Thu Jan 7 17:41:54 1999 @@ -617,7 +617,7 @@ Legal values are between 0 and 255. Default: 255/0. Note: This value is forced to 0 on a Falcon, since scatter-gather isn't possible with the ST-DMA. Not using scatter-gather hurts - perfomance significantly. + performance significantly. : The SCSI ID to be used by the initiator (your Atari). This is diff -ur --new-file old/linux/Documentation/mca.txt new/linux/Documentation/mca.txt --- old/linux/Documentation/mca.txt Sun Oct 18 00:33:45 1998 +++ new/linux/Documentation/mca.txt Sun Nov 8 22:29:31 1998 @@ -279,8 +279,8 @@ 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 +Video : ff ff ff ff ff ff ff ff +SCSI : ff ff ff ff ff ff ff ff /proc/mca/slot1: Slot: 1 diff -ur --new-file old/linux/Documentation/memory.txt new/linux/Documentation/memory.txt --- old/linux/Documentation/memory.txt Thu Jan 16 03:46:06 1997 +++ new/linux/Documentation/memory.txt Tue Dec 22 17:31:07 1998 @@ -18,13 +18,9 @@ as you add more memory. Consider exchanging your motherboard. - 4) Linux will not currently detect above 64M of RAM, - regardless of how much memory is actually installed. - All of these problems can be addressed with the "mem=XXXM" boot option -(where XXX is the size of RAM to use in megabytes). Adding this boot -option to your boot loader can help Linux see more than 64M. It can -also tell Linux to use less memory than is actually installed. +(where XXX is the size of RAM to use in megabytes). +It can also tell Linux to use less memory than is actually installed. See the documentation of your boot loader (LILO, loadlin, etc.) about how to pass options to the kernel. diff -ur --new-file old/linux/Documentation/networking/6pack.txt new/linux/Documentation/networking/6pack.txt --- old/linux/Documentation/networking/6pack.txt Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/networking/6pack.txt Thu Jan 7 17:41:54 1999 @@ -16,7 +16,7 @@ - The PC is given full control over the radio channel. Special control data is exchanged between the PC and the TNC so that the PC knows at any time if the TNC is receiving data, if a TNC - buffer underrun or overrun has occured, if the PTT is + buffer underrun or overrun has occurred, if the PTT is set and so on. This control data is processed at a higher priority than normal data, so a data stream can be interrupted at any time to issue an important event. This helps to improve the channel access and timing @@ -167,7 +167,7 @@ some cleaning and optimizing. This will be done in a later release. If you encounter a bug or if you have a question or suggestion concerning the -driver, feel free to mail me, using the adresses given at the beginning of +driver, feel free to mail me, using the addresses given at the beginning of this file. Have fun! diff -ur --new-file old/linux/Documentation/networking/arcnet-hardware.txt new/linux/Documentation/networking/arcnet-hardware.txt --- old/linux/Documentation/networking/arcnet-hardware.txt Mon Sep 14 20:32:22 1998 +++ new/linux/Documentation/networking/arcnet-hardware.txt Thu Jan 7 17:41:55 1999 @@ -2560,7 +2560,7 @@ -------------------- The two jumpers labeled ET1 and ET2 are used to determine the timeout -parameters (respons and reconfiguration time). Every node in a network +parameters (response and reconfiguration time). Every node in a network must be set to the same timeout values. ET1 ET2 | Response Time (us) | Reconfiguration Time (ms) diff -ur --new-file old/linux/Documentation/networking/cops.txt new/linux/Documentation/networking/cops.txt --- old/linux/Documentation/networking/cops.txt Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/networking/cops.txt Thu Jan 7 17:41:55 1999 @@ -17,7 +17,7 @@ DAYNA driver mode: Dayna DL2000/DaynaTalk PC (Half Length), COPS LT-95, Farallon PhoneNET PC III, Farallon PhoneNET PC II -Other cards possibly supported mode unkown though: +Other cards possibly supported mode unknown though: Dayna DL2000 (Full length) The COPS driver defaults to using Dayna mode. To change the driver's diff -ur --new-file old/linux/Documentation/networking/de4x5.txt new/linux/Documentation/networking/de4x5.txt --- old/linux/Documentation/networking/de4x5.txt Thu May 21 03:54:34 1998 +++ new/linux/Documentation/networking/de4x5.txt Thu Jan 7 17:41:55 1999 @@ -151,7 +151,7 @@ autonegotiation feature in the SROM autoconf code, this detection will occur automatically for that case. - Command line arguements are now allowed, similar to passing arguements + Command line arguments are now allowed, similar to passing arguments through LILO. This will allow a per adapter board set up of full duplex and media. The only lexical constraints are: the board name (dev->name) appears in the list before its parameters. The list of parameters ends diff -ur --new-file old/linux/Documentation/networking/ip-sysctl.txt new/linux/Documentation/networking/ip-sysctl.txt --- old/linux/Documentation/networking/ip-sysctl.txt Thu May 14 19:26:22 1998 +++ new/linux/Documentation/networking/ip-sysctl.txt Tue Jan 5 00:31:35 1999 @@ -123,6 +123,12 @@ 0 to disable any limiting, otherwise the maximal rate in jiffies(1) See the source for more information. +icmp_ignore_bogus_error_responses - BOOLEAN + Some routers violate RFC 1122 by sending bogus responses to broadcast + frames. Such violations are normally logged via a kernel warning. + If this is set to TRUE, the kernel will not give such warnings, which + will avoid log file clutter. + Default: FALSE (1) Jiffie: internal timeunit for the kernel. On the i386 1/100s, on the Alpha 1/1024s. See the HZ define in /usr/include/asm/param.h for the exact @@ -205,4 +211,4 @@ Updated by: Andi Kleen ak@muc.de -$Id: ip-sysctl.txt,v 1.7 1998/05/02 12:05:00 davem Exp $ +$Id: ip-sysctl.txt,v 1.8 1999/01/02 16:37:06 davem Exp $ diff -ur --new-file old/linux/Documentation/networking/irda.txt new/linux/Documentation/networking/irda.txt --- old/linux/Documentation/networking/irda.txt Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/networking/irda.txt Thu Dec 17 18:01:03 1998 @@ -0,0 +1,13 @@ +To use the IrDA protocols within Linux you will need to get a suitable copy +of the IrDA Utilities. More detailed information about these and associated +programs can be found on http://www.cs.uit.no/~dagb/irda/. + +For more information about the IrDA protocol stack, see the IR-HOWTO +written by Werner Heuser + +There is an active mailing list for discussing Linux IrDA matters called +linux-irda. To subscribe to it, send a message to Majordomo@list.uit.no +with the words "subscribe linux-irda" in the body of the message, the +subject field is ignored. + +Dag Brattli diff -ur --new-file old/linux/Documentation/networking/ltpc.txt new/linux/Documentation/networking/ltpc.txt --- old/linux/Documentation/networking/ltpc.txt Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/networking/ltpc.txt Fri Nov 13 19:29:43 1998 @@ -6,18 +6,37 @@ 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 @@ 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 @@ -------------------------------------- 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: - -2.1.xx: The module support doesn't work yet. +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. + +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 @@ -- Bradford Johnson +-- Updated 11/09/1998 by David Huggins-Daines diff -ur --new-file old/linux/Documentation/oops-tracing.txt new/linux/Documentation/oops-tracing.txt --- old/linux/Documentation/oops-tracing.txt Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/oops-tracing.txt Tue Jan 5 20:14:24 1999 @@ -1,3 +1,24 @@ +Quick Summary +------------- + +cd /usr/src/linux/scripts/ksymoops +make ksymoops +./ksymoops < the_oops.txt + +and send the output the maintainer of the kernel area that seems to be +involved with the problem. Don't worry too much about getting the wrong +person. If you are unsure send it to the person responsible for the code +relevant to what you were doing. If it occurs repeatably try and describe +how to recreate it. Thats worth even more than the oops + +If you are totally stumped as to whom to send the report, send it to +linux-kernel@vger.rutgers.edu. Thanks for your help in making Linux as +stable as humanly possible. + + +Full Information +---------------- + From: Linus Torvalds How to track down an Oops.. [originally a mail to linux-kernel] diff -ur --new-file old/linux/Documentation/paride.txt new/linux/Documentation/paride.txt --- old/linux/Documentation/paride.txt Mon Sep 28 19:51:16 1998 +++ new/linux/Documentation/paride.txt Tue Dec 22 17:29:00 1998 @@ -42,6 +42,7 @@ SyQuest EZ-135, EZ-230 & SparQ drives Avatar Shark Imation Superdisk LS-120 + Maxell Superdisk LS-120 FreeCom Power CD Hewlett-Packard 5GB and 8GB tape drives Hewlett-Packard 7100 and 7200 CD-RW drives @@ -76,6 +77,7 @@ epia Shuttle EPIA (UK) fit2 FIT TD-2000 (US) fit3 FIT TD-3000 (US) + friq Freecom IQ cable (DE) frpw Freecom Power (DE) kbic KingByte KBIC-951A and KBIC-971A (TW) ktti KT Technology PHd adapter (SG) @@ -111,10 +113,12 @@ MicroSolutions 8000t tape pt bpck SyQuest EZ, SparQ pd epat Imation Superdisk pf epat + Maxell Superdisk pf friq Avatar Shark pd epat FreeCom CD-ROM pcd frpw Hewlett-Packard 5GB Tape pt epat - Hewlett-Packard 7100/7200 pg epat + Hewlett-Packard 7200e (CD) pcd epat + Hewlett-Packard 7200e (CD-R) pg epat 2.1 Configuring built-in drivers @@ -299,7 +303,6 @@ 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. @@ -307,27 +310,29 @@ 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. 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 +to create CD-ROMs. Please get cdrecord version 1.6.1 or later +from ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ . 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 +3.1 Use EPP mode if you can + 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. +3.2 Check the port delay + 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 @@ -341,6 +346,25 @@ read the comments at the beginning of the driver source files in linux/drivers/block/paride. +3.3 Some drives need a printer reset + +There appear to be a number of "noname" external drives on the market +that do not always power up correctly. We have noticed this with some +drives based on OnSpec and older Freecom adapters. In these rare cases, +the adapter can often be reinitialised by issuing a "printer reset" on +the parallel port. As the reset operation is potentially disruptive in +multiple device environments, the PARIDE drivers will not do it +automatically. You can however, force a printer reset by doing: + + insmod lp + rmmod lp + +If you have one of these marginal cases, you should probably build +your paride drivers as modules, and arrange to do the printer reset +before loading the PARIDE drivers. + +3.4 Use the verbose option and dmesg if you need help + 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 @@ -368,6 +392,8 @@ of two ways. Either send it directly to the author of the PARIDE suite, by e-mail to grant@torque.net, or join the linux-parport mailing list and post your report there. + +3.5 For more information or help You can join the linux-parport mailing list by sending a mail message to diff -ur --new-file old/linux/Documentation/proc.txt new/linux/Documentation/proc.txt --- old/linux/Documentation/proc.txt Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/proc.txt Thu Jan 28 21:16:40 1999 @@ -0,0 +1,1353 @@ + +----------------------------------------------------------------------- + + T H E /proc F I L E S Y S T E M + +----------------------------------------------------------------------- +/proc/sys Terrehon Bowden January 27 1999 + Bodo Bauer +----------------------------------------------------------------------- +Version 1.1 Kernel version 2.2 +----------------------------------------------------------------------- +Contents + +1 Introduction/Credits + +1.1 Legal Issues + +2 The /proc file system + +2.1 Process specific subdirectories +2.2 Kernel data +2.3 IDE devices in /proc/ide +2.4 Networking info in /proc/net +2.5 SCSI info +2.6 Parallel port info in /proc/parport +2.7 TTY info in /proc/tty + +3 Reading and modifying kernel parameters + +3.1 /proc/sys/debug and /proc/sys/proc +3.2 /proc/fs - File system data +3.3 /proc/fs/binfmt_misc - Miscellaneous binary formats +3.4 /proc/sys/kernel - General kernel parameters +3.5 /proc/sys/vm - The virtual memory subsystem +3.6 /proc/sys/dev - Device specific parameters +3.7 /proc/sys/sunrpc - Remote procedure calls +3.8 /proc/sys/net - Networking stuff +3.9 /proc/sys/net/ipv4 - IPV4 settings=20 +3.10 Appletalk +3.11 IPX + +----------------------------------------------------------------------- + +1 Introduction/Credits + +This documentation is part of a soon to be released book published by +IDG Books on the SuSE Linux distribution. As there is no complete +documentation for the /proc file system and we've used many freely +available sources to write this chapter, it seems only fair to give +the work back to the Linux community. This work is based on the +2.1.132 and 2.2.0-pre-kernel versions. I'm afraid it's still far from +complete, but we hope it will be useful. As far as we know, it is the +first 'all-in-one’ document about the /proc file system. It is +focused on the Intel x86 hardware, so if you are looking for PPC, ARM, +SPARC, APX, etc., features, you probably won't find what you are +looking for. It also only covers IPv4 networking, not IPv6 nor other +protocols - sorry. + +We'd like to thank Alan Cox, Rik van Riel, and Alexey Kuznetsov. We'd +also like to extend a special thank you to Andi Kleen for +documentation, which we relied on heavily to create this document, as +well as the additional information he provided. Thanks to everybody +else who contributed source or docs to the Linux kernel and helped +create a great piece of software... :) + +If you have any comments, corrections or additions, please don't +hesitate to contact Bodo Bauer at bb@ricochet.net. We'll be happy to +add them to this document. + +The latest version of this document is available online at +http://www.suse.com/~bb/Docs/proc.html in HTML, ASCII, and as +Postscript file. + +1.1 Legal Stuff + +We don't guarantee the correctness of this document, and if you come +to us complaining about how you screwed up your system because of +incorrect documentation, we won't feel responsible... + +----------------------------------------------------------------------- + +2 The /proc file system + +The proc file system acts as an interface to internal data structures +in the kernel. It can be used to obtain information about the system +and to change certain kernel parameters at runtime. It contains +(among other things) one subdirectory for each process running on the +system which is named after the process id (PID) of the process. The +link self points to the process reading the file system. + +2.1 Process specific subdirectories + +Each process subdirectory has the in table 1.1 listed entries. + + _________________________________________________ + cmdline Command line arguments + environ Values of environment variables + fd Directory, which contains all file descriptors + mem Memory held by this process + stat Process status + status Process status in human readable form + cwd Link to the current working directory + exe Link to the executable of this process + maps Memory maps + root Link to the root directory of this process + statm Process memory status information + _________________________________________________ + Table 1.1: Process specific entries in /proc + +For example, to get the status information of a process, all you have +to do is read the file /proc/PID/status: + +> cat /proc/self/status +Name: cat +State: R (running) +Pid: 5633 +PPid: 5609 +Uid: 501 501 501 501 +Gid: 100 100 100 100 +Groups: 100 16 +VmSize: 804 kB +VmLck: 0 kB +VmRSS: 344 kB +VmData: 68 kB +VmStk: 20 kB +VmExe: 12 kB +VmLib: 660 kB +SigPnd: 0000000000000000 +SigBlk: 0000000000000000 +SigIgn: 0000000000000000 +SigCgt: 0000000000000000 +CapInh: 00000000fffffeff +CapPrm: 0000000000000000 +CapEff: 0000000000000000 + +This shows you almost the same information as you would get if you +viewed it with the ps command. In fact, ps uses the proc file system +to obtain its information. + +The statm file contains more detailed information about the process +memory usage. It contains seven values with the following meanings: + +size total program size +resident size of in memory portions +shared number of the pages that are shared +trs number of pages that are 'code' +drs number of pages of data/stack +lrs number of pages of library +dt number of dirty pages + +The ratio text/data/library is approximate only by heuristics. + +2.2 Kernel data + +Similar to the process entries, these are files which give information +about the running kernel. The files used to obtain this information +are contained in /proc and are listed in table 1.2. Not all of these +will be present in your system. It depends on the kernel configuration +and the loaded modules, which files are there, and which are missing. + + ________________________________________________ + apm Advanced power management info + cmdline Kernel command line + cpuinfo Info about the CPU + devices Available devices (block and character) + dma Used DMS channels + filesystems Supported filesystems + interrupts Interrupt usage + ioports I/O port usage + kcore Kernel core image + kmsg Kernel messages + ksyms Kernel symbol table + loadavg Load average + locks Kernel locks + meminfo Memory info + misc Miscellaneous + modules List of loaded modules + mounts Mounted filesystems + partitions Table of partitions known to the system + rtc Real time clock + slabinfo Slab pool info + stat Overall statistics + swaps Swap space utilization + uptime System uptime + version Kernel version + ________________________________________________ + Table 1.2: Kernel info in /proc + +You can, for example, check which interrupts are currently in use and +what they are used for by looking in the file /proc/interrupts: + +> cat /proc/interrupts + CPU0 + 0: 8728810 XT-PIC timer + 1: 895 XT-PIC keyboard + 2: 0 XT-PIC cascade + 3: 531695 XT-PIC aha152x + 4: 2014133 XT-PIC serial + 5: 44401 XT-PIC pcnet_cs + 8: 2 XT-PIC rtc + 11: 8 XT-PIC i82365 + 12: 182918 XT-PIC PS/2 Mouse + 13: 1 XT-PIC fpu + 14: 1232265 XT-PIC ide0 + 15: 7 XT-PIC ide1 +NMI: 0 + +There three more important subdirectories in /proc: net, scsi and +sys. The general rule is that the contents, or even the existence of +these directories, depends on your kernel configuration. If SCSI is +not enabled, the directory scsi may not exist. The same is true with +the net, which is only there when networking support is present in the +running kernel. + +The slabinfo file gives information about memory usage on the slab +level. Linux uses slab pools for memory management above page level +in version 2.2. Commonly used objects have their own slab pool (like +network buffers, directory cache, etc.). + +2.3 IDE devices in /proc/ide + +This subdirectory contains information about all IDE devices that the +kernel is aware of. There is one subdirectory for each device +(i.e. hard disk) containing the following files: + + cache The cache + capacity Capacity of the medium + driver Driver and version + geometry Physical and logical geometry + identify Device identify block + media Media type + model Device identifier + settings Device setup + smart_thresholds IDE disk management thresholds + smart_values IDE disk management values + +2.4 Networking info in /proc/net + +This directory follows the usual pattern. Table 1.3 lists the files +and their meaning. + + ____________________________________________________ + arp Kernel ARP table + dev network devices with statistics + dev_mcast Lists the Layer2 multicast groups a + device is listening to (interface index, + label, number of references, number of + bound addresses). + dev_stat network device status + ip_fwchains Firewall chain linkage + ip_fwnames Firewall chains + ip_masq Directory containing the masquerading + tables. + ip_masquerade Major masquerading table + netstat Network statistics + raw Raw device statistics + route Kernel routing table + rpc Directory containing rpc info + rt_cache Routing cache + snmp SNMP data + sockstat Socket statistics + tcp TCP sockets + tr_rif Token ring RIF routing table + udp UDP sockets + unix UNIX domain sockets + wireless Wireless interface data (Wavelan etc) + igmp IP multicast addresses, which this host joined + psched Global packet scheduler parameters. + netlink List of PF_NETLINK sockets. + ip_mr_vifs List of multicast virtual interfaces. + ip_mr_cache List of multicast routing cache. + udp6 UDP sockets (IPv6) + tcp6 TCP sockets (IPv6) + raw6 Raw device statistics (IPv6) + igmp6 IP multicast addresses, which this host joineed (IPv6) + if_inet6 List of IPv6 interface addresses. + ipv6_route Kernel routing table for IPv6 + rt6_stats global IPv6 routing tables statistics. + sockstat6 Socket statistics (IPv6) + snmp6 Snmp data (IPv6) + ____________________________________________________ + Table 1.3: Network info in /proc/net + +You can use this information to see which network devices are +available in your system and how much traffic was routed over those +devices: + +> cat /proc/net/dev +Inter-|Receive |[... + face |bytes packets errs drop fifo frame compressed multicast|[... + lo: 908188 5596 0 0 0 0 0 0 [... + ppp0:15475140 20721 410 0 0 410 0 0 [... + eth0: 614530 7085 0 0 0 0 0 1 [... + +...] Transmit +...] bytes packets errs drop fifo colls carrier compressed +...] 908188 5596 0 0 0 0 0 0 +...] 1375103 17405 0 0 0 0 0 0 +...] 1703981 5535 0 0 0 3 0 0 + +2.5 SCSI info + +If you have a SCSI host adapter in your system, you'll find a +subdirectory named after the driver for this adapter in /proc/scsi. +You'll also see a list of all recognized SCSI devices in /proc/scsi: + +>cat /proc/scsi/scsi +Attached devices: +Host: scsi0 Channel: 00 Id: 00 Lun: 00 + Vendor: QUANTUM Model: XP34550W Rev: LXY4 + Type: Direct-Access ANSI SCSI revision: 02 +Host: scsi0 Channel: 00 Id: 01 Lun: 00 + Vendor: SEAGATE Model: ST34501W Rev: 0018 + Type: Direct-Access ANSI SCSI revision: 02 +Host: scsi0 Channel: 00 Id: 02 Lun: 00 + Vendor: SEAGATE Model: ST34501W Rev: 0017 + Type: Direct-Access ANSI SCSI revision: 02 +Host: scsi0 Channel: 00 Id: 04 Lun: 00 + Vendor: ARCHIVE Model: Python 04106-XXX Rev: 703b + Type: Sequential-Access ANSI SCSI revision: 02 + +The directory named after the driver has one file for each adapter +found in the system. These files contain information about +the controller, including the used IRQ and the IO address range: + +>cat /proc/scsi/ncr53c8xx/0 +General information: + Chip NCR53C875, device id 0xf, revision id 0x4 + IO port address 0xec00, IRQ number 11 + Synchronous period factor 12, max commands per lun 4 + +2.6 Parallel port info in /proc/parport + +The directory /proc/parport contains information about the parallel +ports of your system. It has one subdirectory for each port, named +after the port number (0,1,2,...). + +This directory contains four files: + + autoprobe Autoprobe results of this port + devices Connected device modules + hardware Hardware info (port type, io-port, DMA, IRQ, etc.) + irq Used interrupt, if any + +2.7 TTY info in /proc/tty + +Information about the available and the actually used tty's can be +found in /proc/tty. You'll find entries for drivers and line +disciplines in this directory, as shown in the table below: + + drivers List of drivers and their usage + ldiscs Registered line disciplines + driver/serial Usage statistic and status of single tty lines + +To see which tty's are currently in use, you can simply look into the +file /proc/tty/drivers: + +>cat /proc/tty/drivers +pty_slave /dev/pts 136 0-255 pty:slave +pty_master /dev/ptm 128 0-255 pty:master +pty_slave /dev/ttyp 3 0-255 pty:slave +pty_master /dev/pty 2 0-255 pty:master +serial /dev/cua 5 64-67 serial:callout +serial /dev/ttyS 4 64-67 serial +/dev/tty0 /dev/tty0 4 0 system:vtmaster +/dev/ptmx /dev/ptmx 5 2 system +/dev/console /dev/console 5 1 system:console +/dev/tty /dev/tty 5 0 system:/dev/tty +unknown /dev/tty 4 1-63 console + +----------------------------------------------------------------------- + +3 Reading and modifying kernel parameters + +A very interesting part of /proc is the directory /proc/sys. This not +only provides information, it also allows you to change parameters +within the kernel. Be very careful when trying this. You can optimize +your system, but you also can crash it. Never play around with kernel +parameters on a production system. Set up a development machine and +test to make sure that everything works the way you want it to. You +may have no alternative but to reboot the machine once an error has +been made. + +To change a value, simply echo the new value into the file. An example +is given below in the section on the file system data. You need to be +root to do this. You can create your own boot script to get this done +every time your system boots. + +The files in /proc/sys can be used to tune and monitor miscellaneous +and general things in the operation of the Linux kernel. Since some +of the files can inadvertently disrupt your system, it is advisable to +read both documentation and source before actually making +adjustments. In any case, be very careful when writing to any of these +files. The entries in /proc may change slightly between the 2.1.* and +the 2.2 kernel, so review the kernel documentation if there is any +doubt. You'll find the documentation in the directory +/usr/src/linux/Documentation/sys. This chapter is heavily based on the +documentation included in the pre 2.2 kernels. Thanks to Rick van Riel +for providing this information. + +3.1 /proc/sys/debug and /proc/sys/proc + +These two subdirectories are empty. + +3.2 /proc/fs - File system data + +This subdirectory contains specific file system, file handle, inode, +dentry and quota information. + +Currently, these files are in /proc/sys/fs: + +dentry-state + Status of the directory cache. Since directory entries are + dynamically allocated and deallocated, this file gives information + about the current status. It holds six values, in which the last + two are not used and are always zero. The other four mean: + + nr_dentry Seems to be zero all the time + nr_unused Number of unused cache entries + age_limit Age in seconds after the entry may be + reclaimed, when memory is short + want_pages internal + +dquot-nr and dquot-max + 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 + a large number of simultaneous system users, you might want + to raise the limit. + +file-nr and file-max + The kernel allocates file handles dynamically, but as yet + 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 a lot of error + messages about running out of file handles, you might want to raise + this limit. The default value is 4096. To change it, just write the + new number into the file: + + # cat /proc/sys/fs/file-max + 4096 + # echo 8192 > /proc/sys/fs/file-max + # cat /proc/sys/fs/file-max + 8192 + + This method of revision is useful for all customizable parameters + of the kernel - simply echo the new value to the corresponding + file. + + 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. + + However, there is still a per process limit of open files, which + unfortunatly can't be changed that easily. It is set to 1024 by + default. To change this you have to edit the files limits.h and + fs.h in the directory /usr/src/linux/include/linux. Change the + definition of NR_OPEN and recompile the kernel. + +inode-state, inode-nr and inode-max + 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 to 4 times larger than the value + in file-max, since stdin, stdout, and network sockets also need an + inode struct to handle them. If you regularly run out of inodes, + you should 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 dummy values. The + actual numbers are (in order of appearance) nr_inodes, nr_free_inodes, + and preshrink. + + nr_inodes + Denotes 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 pre shrink is nonzero + when the nr_inodes > inode-max and the system needs to prune the + inode list instead of allocating more. + +super-nr and super-max + Again, super block structures are allocated by the kernel, + but not freed. The file super-max contains the maximum number of + super block handlers, where super-nr shows the number of + currently allocated ones. + + Every mounted file system needs a super block, so if you plan to + mount lots of file systems, you may want to increase these + numbers. + +3.3 /proc/fs/binfmt_misc - Miscellaneous binary formats + +Besides these files, there is the subdirectory +/proc/sys/fs/binfmt_misc. This handles the kernel support for +miscellaneous binary formats. + +Binfmt_misc provides the ability to register additional binary formats +to the Kernel without compiling an additional module/kernel. Therefore +binfmt_misc needs to know magic numbers at the beginning or the +filename extension of the binary. + +It works by maintaining a linked list of structs, that contain a +description of a binary format, including a magic with size (or the +filename extension), offset and mask, and the interpreter name. On +request it invokes the given interpreter with the original program as +argument, as binfmt_java and binfmt_em86 and binfmt_mz do. +Since binfmt_misc does not define any default binary-formats, you have to +register an additional binary-format. + +There are two general files in binfmt_misc and one file per registered +format. The two general files are register and status. + +Registering a new binary format + +echo :name:type:offset:magic:mask:interpreter: > /proc/sys/fs/binfmt_misc/register + +with appropriate name (the name for the /proc-dir entry), offset +(defaults to 0, if omitted), magic and mask (which can be omitted, +defaults to all 0xff) and last but not least, the interpreter that is +to be invoked (for example and testing '/bin/echo'). Type can be M for +usual magic matching or E for filename extension matching (give +extension in place of magic). + +To check or reset the status of the binary format handler: + +If you do a cat on the file /proc/sys/fs/binfmt_misc/status, you will +get the current status (enabled/disabled) of binfmt_misc. Change the +status by echoing 0 (disables) or 1 (enables) or -1 (caution: this +clears all previously registered binary formats) to status. For +example echo 0 > status to disable binfmt_misc (temporarily). + +Status of a single handler + +Each registered handler has an entry in /proc/sys/fs/binfmt_misc. +These files perform the same function as status, but their scope is +limited to the actual binary format. By cating this file, you also +receive all related information about the interpreter/magic of the +binfmt. + +Example usage of binfmt_misc (emulate binfmt_java) + +cd /proc/sys/fs/binfmt_misc +echo ':Java:M::\xca\xfe\xba\xbe::/usr/local/java/bin/javawrapper:' > register +echo ':HTML:E::html::/usr/local/java/bin/appletviewer:' > register +echo ':Applet:M::WaveTable<-- + (IO 0 (BASE 0x0620)) + (IO 1 (BASE 0x0A20)) + (IO 2 (BASE 0x0E20)) + (ACT Y) + )) + + 7d. Load the config file. + CAUTION: This will reset all PnP cards! + + # isapnp /etc/isapnp.conf + + 8. Load the sound module (if you configured it as a module): + + for 2.0 kernel or OSS/Free monolithic module: + + # modprobe sound.o + + for 2.1 kernel: + + # modprobe sound + # insmod uart401 + # insmod sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330 + (These values depend on your settings.) + # insmod awe_wave + (Be sure to load awe_wave after sb!) + + See /usr/src/linux/Documentation/sound/AWE32 for + more details. + + 9. (only for obsolete systems) If you don't have /dev/sequencer + device file, make it according to Readme.linux file on + /usr/src/linux/drivers/sound. (Run a shell script included in + that file). <-- This file no longer exists in the recent kernels! + + 10. OK, load your own soundfont file, and enjoy MIDI! + + % sfxload synthgm.sbk + % drvmidi foo.mid + + 11. For more advanced use (eg. dynamic loading, virtual bank and + etc.), please read the awedrv FAQ or the instructions in awesfx + and awemidi packages. + +Good luck! diff -ur --new-file old/linux/Documentation/sound/Introduction new/linux/Documentation/sound/Introduction --- old/linux/Documentation/sound/Introduction Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/sound/Introduction Wed Dec 16 21:52:00 1998 @@ -0,0 +1,253 @@ +Soundcore Notes on Modular Sound Drivers and Soundcore +Wade Hampton +11/20/1998 + +Purpose: +======== +This document provides some general notes on the modular +sound drivers and their configuration, along with the +support modules sound.o, soundlow.o and soundcore.o. + +Note, some of this probably should be added to the Sound-HOWTO! + +Copying: +======== +none + +History: +======== +0.1.0 11/20/1998 First version + + +Modular Sound Drivers: +====================== + +Thanks to the GREAT work by Alan Cox (alan@lxorguk.ukuu.org.uk), + +[And Oleg Drokin, Thomas Sailer, Andrew Veliath and more than a few + others - not to mention Hannu's original code being designed well + enough to cope with that kind of chopping up](Alan) + +the standard Linux kernels support a modular sound driver. From +Alan's comments in linux/drivers/sound/README.FIRST: + + The modular sound driver patches were funded by Red Hat Software + (www.redhat.com). The sound driver here is thus a modified version of + Hannu's code. Please bear that in mind when considering the appropriate + forums for bug reporting. + +The modular sound drivers may be loaded via insmod or modprobe. +To support all the various sound modules, there are three general +support modules that must be loaded first: + + soundcore.o: Top level handler for the sound system, provides + a set of functions for registration of devices + by type. + + soundlow.o: Low-level sound drivers which are not part of + OSS/Lite (Open Sound System), including SB32/AWE + synthesizer, etc. + + sound.o: Common sound functions required by all modules. + +For the specific sound modules (e.g., sb.o for the Soundblaster), +read the documentation on that module to determine what options +are available, for example IRQ, address, DMA. + +Warning, the options for different cards sometime use different names +for the same or a similar feature (dma1= versus dma16=). As a last +resort, inspect the code (search for MODULE_PARM). + + +INSMOD: +======= + +If loading via insmod, the common modules must be loaded in the +order below BEFORE loading the other sound modules. The card-specific +modules may then be loaded (most require parameters). For example, +I use the following via a shell script to load my SoundBlaster: + +SB_BASE=0x240 +SB_IRQ=9 +SB_DMA=3 +SB_DMA2=5 +SB_MPU=0x300 +# +echo Starting sound +/sbin/insmod soundcore +/sbin/insmod soundlow +/sbin/insmod sound +# +echo Starting sound blaster.... +/sbin/insmod uart401 +/sbin/insmod sb io=$SB_BASE irq=$SB_IRQ dma=$SB_DMA dma16=$SB_DMA2 mpu_io=$SB_MP + + +MODPROBE: +========= + +If loading via modprobe, these common files are automatically loaded +when requested by modprobe. For example, my /etc/conf.modules contains: + +alias sound sb +options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300 + +All you need to do to load the module is: + + /sbin/modprobe sb + + +Sound Status: +============= + +The status of sound may be read/checked by: + cat /proc/sound + cat /dev/sndstat + cat (anyfile).au >/dev/audio + +The status of the modules and which modules depend on +which other modules may be checked by: + /sbin/lsmod + +/sbin/lsmod should show something like the following: + sb 26280 0 + uart401 5640 0 [sb] + sound 57112 0 [sb uart401] + soundlow 208 0 [sound] + soundcore 1968 8 [sb sound] + + +Removing Sound: +=============== + +Sound may be removed by using /sbin/rmmod in the reverse order +in which you load the modules. Note, if a program has a sound device +open (e.g., xmixer), that module (and the modules on which it +depends) may not be unloaded. + +For example, I use the following to remove my Soundblaster (rmmod +in the reverse order in which I loaded the modules): + +/sbin/rmmod sb +/sbin/rmmod uart401 +/sbin/rmmod sound +/sbin/rmmod soundlow +/sbin/rmmod soundcore + + +Multiple Sound Cards: +===================== + +The sound drivers will support multiple sound cards and there +are some great applications like multitrack that support them. +Typically, you need two sound cards of different types. Note, this +uses more precious interrupts and DMA channels and sometimes +can be a configuration nightmare. I have heard reports of 3-4 +sound cards (typically I only use 2). + +On my machine I have two sound cards (cs4232 and Soundblaster Vibra +16). By loading sound as modules, I can control which is the first +sound device (/dev/dsp, /dev/audio, /dev/mixer) and which is +the second. Normally, the cs4232 (Dell sound on the motherboard) +would be the first sound device, but I prefer the Soundblaster. +All you have to do is to load the one you want as /dev/dsp +first (in my case "sb") and then load the other one +(in my case "cs4232"). + +Warning: I have never been able to get two PnP sound cards of the +same type to load at the same time. I have tried this several times +with the Soundblaster Vibra 16 cards. OSS has indicated that this +is a PnP problem.... If anyone has any luck doing this, please +send me an E-MAIL. PCI sound cards should not have this problem. + + +Sound Problems: +=============== + +First RTFM (including the troubleshooting section +in the Sound-HOWTO). + +1) If you are having problems loading the modules (for + example, if you get device conflict errors) try the + following: + + A) If you have Win95 or NT on the same computer, + write down what addresses, IRQ, and DMA channels + those were using for the same hardware. You probably + can use these addresses, IRQs, and DMA channels. + + B) Check (cat) /proc/interrupts, /proc/ioports, + and /proc/dma. Are you trying to use an address, + IRQ or DMA port that another device is using? + + C) Check (cat) /proc/sys/pnp (if this exists, you + may need a kernel patch to get this device). + + D) Inspect your /var/log/messages file. Often that will + indicate what IRQ or IO port could not be obtained + + E) Try another port or IRQ. Note this may involve + using the PnP tools to move the sound card to + another location. + +2) If you get motorboating (the same sound or part of a + sound clip repeated), you probably have either an IRQ + or DMA conflict. Move the card to another address. This + has happened to me when playing long files when I had + an IRQ conflict. + +3) Ask for help on the sound list or send E-MAIL to the + sound driver author/maintainer. + +4) Turn on debug in drivers/sound/sound_config.h (DEB, DDB, MDB). + + +Configuring Sound: +================== + +There are several ways of configuring your sound: + +1) Hardcoded in the kernel at compile time (not applicable when + using sound modules). This was the OLD way! + +2) On the command line when using insmod. + +3) In /etc/conf.modules when using modprobe. + +4) Via RedHat's /usr/sbin/sndconfig program (text based). + +5) Via the OSS soundconf program (with the commercial version + of the OSS driver. + +And I am sure, several other ways. + +Anyone want to write a linuxconf module for configuring sound? + + + +For More Information (RTFM): +============================ +1) Information on kernel modules: linux/Documentation/modules.txt + and manual pages for insmod and modprobe. + +2) Information on PnP, RTFM manual pages for isapnp. + +3) Sound-HOWTO and Sound-Playing-HOWTO. + +4) OSS's WWW site at http://www.opensound.com. + +5) All the files in linux/Documentation/sound. + +6) The comments and code in linux/drivers/sound. + +7) The sndconfig and rhsound documentation from RedHat. + +8) The Linux-sound mailing list: sound-list@redhat.com + + + +Contact Information: +==================== +Wade Hampton: (whampton@staffnet.com) + + diff -ur --new-file old/linux/Documentation/sound/MultiSound new/linux/Documentation/sound/MultiSound --- old/linux/Documentation/sound/MultiSound Fri Oct 9 20:56:59 1998 +++ new/linux/Documentation/sound/MultiSound Wed Dec 16 21:52:00 1998 @@ -157,13 +157,13 @@ # # * MultiSound Classic/Monterey/Tahiti: # -# insmod soundcore +# modprobe soundcore # insmod msnd # insmod msnd_classic io=0x290 irq=7 mem=0xd0000 # # * MultiSound Pinnacle in PnP mode: # -# insmod soundcore +# modprobe soundcore # insmod msnd # isapnp mypinnacle.conf # insmod msnd_pinnacle io=0x210 irq=5 mem=0xd8000 <-- match mypinnacle.conf values @@ -359,8 +359,8 @@ # 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. +# input to analog 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. @@ -373,7 +373,7 @@ # 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 . +# Made on 1998-12-04 10:07 EST by . # Source directory was `/home/andrewtv/programming/pinnacle/pinnacle'. # # Existing files will *not* be overwritten unless `-c' is specified. @@ -381,10 +381,11 @@ # 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 +# 2046 -rw-rw-r-- MultiSound.d/setdigital.c +# 10235 -rw-rw-r-- MultiSound.d/pinnaclecfg.c +# 106 -rw-rw-r-- MultiSound.d/Makefile # 141 -rw-rw-r-- MultiSound.d/conv.l +# 1472 -rw-rw-r-- MultiSound.d/msndreset.c # save_IFS="${IFS}" IFS="${IFS}:" @@ -431,7 +432,7 @@ fi rm -f 1231235999 $$.touch # -if mkdir _sh21233; then +if mkdir _sh01426; then $echo 'x -' 'creating lock directory' else $echo 'failed to create lock directory' @@ -467,8 +468,6 @@ 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 @@ -528,19 +527,19 @@ X return 0; } SHAR_EOF - $shar_touch -am 0828233298 'MultiSound.d/setdigital.c' && + $shar_touch -am 1204092598 '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 +e87217fc3e71288102ba41fd81f71ec4 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!" + test 2046 -eq "$shar_count" || + $echo 'MultiSound.d/setdigital.c:' 'original size' '2046,' 'current size' "$shar_count!" fi fi # ============= MultiSound.d/pinnaclecfg.c ============== @@ -575,8 +574,6 @@ 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 @@ -984,19 +981,19 @@ X return 0; } SHAR_EOF - $shar_touch -am 0905082598 'MultiSound.d/pinnaclecfg.c' && + $shar_touch -am 1204092598 '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 +366bdf27f0db767a3c7921d0a6db20fe 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!" + test 10235 -eq "$shar_count" || + $echo 'MultiSound.d/pinnaclecfg.c:' 'original size' '10235,' 'current size' "$shar_count!" fi fi # ============= MultiSound.d/Makefile ============== @@ -1007,26 +1004,26 @@ sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/Makefile' && CC = gcc CFLAGS = -O -PROGS = setdigital pinnaclecfg conv +PROGS = setdigital msndreset pinnaclecfg conv X all: $(PROGS) X clean: X rm -f $(PROGS) SHAR_EOF - $shar_touch -am 0828231798 'MultiSound.d/Makefile' && + $shar_touch -am 1204092398 '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 +76ca8bb44e3882edcf79c97df6c81845 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!" + test 106 -eq "$shar_count" || + $echo 'MultiSound.d/Makefile:' 'original size' '106,' 'current size' "$shar_count!" fi fi # ============= MultiSound.d/conv.l ============== @@ -1059,5 +1056,82 @@ $echo 'MultiSound.d/conv.l:' 'original size' '141,' 'current size' "$shar_count!" fi fi -rm -fr _sh21233 +# ============= MultiSound.d/msndreset.c ============== +if test -f 'MultiSound.d/msndreset.c' && test "$first_param" != -c; then + $echo 'x -' SKIPPING 'MultiSound.d/msndreset.c' '(file already exists)' +else + $echo 'x -' extracting 'MultiSound.d/msndreset.c' '(text)' + sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/msndreset.c' && +/********************************************************************* +X * +X * msndreset.c - resets the MultiSound card +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 ********************************************************************/ +X +#include +#include +#include +#include +#include +#include +#include +X +int main(int argc, char *argv[]) +{ +X int fd; +X +X if (argc != 2) { +X fprintf(stderr, "usage: msndreset \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_PRIVATE1, 0) < 0) { +X fprintf(stderr, "error: msnd ioctl reset 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 1204100698 'MultiSound.d/msndreset.c' && + chmod 0664 'MultiSound.d/msndreset.c' || + $echo 'restore of' 'MultiSound.d/msndreset.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/msndreset.c:' 'MD5 check failed' +c52f876521084e8eb25e12e01dcccb8a MultiSound.d/msndreset.c +SHAR_EOF + else + shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/msndreset.c'`" + test 1472 -eq "$shar_count" || + $echo 'MultiSound.d/msndreset.c:' 'original size' '1472,' 'current size' "$shar_count!" + fi +fi +rm -fr _sh01426 exit 0 diff -ur --new-file old/linux/Documentation/sound/OPL3-SA2 new/linux/Documentation/sound/OPL3-SA2 --- old/linux/Documentation/sound/OPL3-SA2 Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/sound/OPL3-SA2 Fri Jan 15 07:53:02 1999 @@ -0,0 +1,126 @@ +Documentation for the OPL3-SA2, SA3, and SAx driver (opl3sa2.o) +--------------------------------------------------------------- + +Scott Murray, scottm@interlog.com +January 5, 1999 + +NOTE: All trade-marked terms mentioned below are properties of their + respective owners. + +This driver is for PnP soundcards based on the following Yamaha audio +controller chipsets: + +YMF711 aka OPL3-SA2 +YMF715 aka OPL3-SA3 +YMF719 aka OPL3-SAx (?) + +I'm a little fuzzy on what exactly is classified a SAx, as I've seen +the label used to refer to the whole 7xx family and as a specific +identifier for the 719 on my no-name soundcard. To make matters +worse, there seem to be several revisions of the 715 chipset. + +Anyways, all of these chipsets implement the following devices: + +OPL3 FM synthesizer +Soundblaster Pro +Microsoft/Windows Sound System +MPU401 MIDI interface + +Note that this driver uses the MSS device, and to my knowledge these +chipsets enforce an either/or situation with the Soundblaster Pro +device and the MSS device. Since the MSS device has better +capabilities, I have implemented the driver to use it. + +Being PnP cards, some configuration is required. There are two ways +of doing this. The most common is to use the isapnptools package to +initialize the card, and use the kernel module form of the sound +subsystem and sound drivers. Alternatively, some BIOS's allow manual +configuration of installed PnP devices in a BIOS menu, which should +allow using the non-modular sound drivers, i.e. built into the kernel. + +I personally use isapnp and modules, and do not have access to a PnP +BIOS machine to test. If you have such a beast, try building both the +MSS driver and this driver into the kernel (appropriately configured, +of course). I have received reports of this working, so it should be +possible for most people with PnP BIOS. If it does not work for you, +then email me if you are willing to experiment in an effort to make it +work. + +If you are using isapnp, follow the directions in its documentation to +produce a configuration file. Here is the relevant excerpt I use for +my SAx card from my isapnp.conf: + +(CONFIGURE YMH0800/-1 (LD 0 + +# Instead of (IO 0 (BASE 0x0220)), disable SB: +(IO 0 (BASE 0x0000)) +(IO 1 (BASE 0x0530)) +(IO 2 (BASE 0x0388)) +(IO 3 (BASE 0x0330)) +(IO 4 (BASE 0x0370)) +(INT 0 (IRQ 7 (MODE +E))) +(DMA 0 (CHANNEL 0)) +(DMA 1 (CHANNEL 3)) + +Here, note that: + +Port Acceptable Range Purpose +---- ---------------- ------- +IO 0 0x0220 - 0x0280 SB base address, I set to 0 just to be safe. +IO 1 0x0530 - 0x0F48 MSS base address +IO 2 0x0388 - 0x03F8 OPL3 base address +IO 3 0x0300 - 0x0334 MPU base address +IO 4 0x0100 - 0x0FFE card's own base address for its control I/O ports + +The IRQ and DMA values can be any that considered acceptable for a +MSS. Assuming you've got isapnp all happy, then you should be able to +do something like the following (which matches up with the isapnp +configuration above): + +insmod mpu401 +insmod ad1848 +insmod opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=7 dma=0 dma2=3 +insmod opl3 io=0x388 + +Remember that the opl3sa2 module's io argument is for it's own control +port, which handles the card's master mixer for volume (on all cards), +and bass and treble (on SA3 and SAx cards). + +If all goes well and you see no error messages, you should be able to +start using the sound capabilities of your system. If you get an +error message while trying to insert the opl3sa2 module, then make +sure that the values of the various arguments match what you specified +in your isapnp configuration file, and that there is no conflict with +another device for an I/O port or interrupt. Checking the contents of +/proc/ioports and /proc/interrupts can be useful to see if you're +butting heads with another device. + +If you still cannot get the module to load, look at the contents of +your system log file, usually /var/log/messages. If you see the +message "Unknown Yamaha audio controller version", then you have a +different chipset than I've encountered so far. Look for a line in +the log file that says "opl3sa2.c: chipset version = ". +If you want me to add support for your card, send me the number from +this line and any information you have on the make and chipset of your +sound card, and I should be able to work up a permanent fix. + +If you do not see the chipset version message, and none of the other +messages present in the system log are helpful, email me some details +and I'll try my best to help. + +Lastly, if you're using modules and want to set up automatic module +loading with kmod, the kernel module loader, here is the section I +currently use in my conf.modules file: + +# Sound +alias char-major-14 opl3sa2 +pre-install opl3sa2 modprobe "-k" "ad1848" +post-install opl3sa2 modprobe "-k" "opl3" +options opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=7 dma=0 dma2=3 +options opl3 io=0x388 + +That's all it currently takes to get an OPL3-SAx card working on my +system. Once again, if you have any other problems, email me at the +address listed above. + +Scott diff -ur --new-file old/linux/Documentation/sound/README.OSS new/linux/Documentation/sound/README.OSS --- old/linux/Documentation/sound/README.OSS Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/sound/README.OSS Mon Jan 18 03:23:01 1999 @@ -0,0 +1,1484 @@ +Introduction +------------ + +This file is a collection of all the old Readme files distributed with +OSS/Lite by Hannu Savolainen. Since the new Linux sound driver is founded +on it I think these information may still be interesting for users that +have to configure their sound system. + +Be warned: Alan Cox is the current maintainer of the Linux sound driver so if +you have problems with it, please contact him or the current device-specific +driver maintainer (e.g. for aedsp16 specific problems contact me). If you have +patches, contributions or suggestions send them to Alan: I'm sure they are +welcome. + +In this document you will find a lot of references about OSS/Lite or ossfree: +they are gone forever. Keeping this in mind and with a grain of salt this +document can be still interesting and very helpful. + +[ File edited 17.01.1999 - Riccardo Facchetti ] + +OSS/Free version 3.8 release notes +---------------------------------- + +Please read the SOUND-HOWTO (available from sunsite.unc.edu and other Linux FTP +sites). It gives instructions about using sound with Linux. It's bit out of +date but still very useful. Information about bug fixes and such things +is available from the web page (see above). + +Please check http://www.opensound.com/pguide for more info about programming +with OSS API. + + ==================================================== +- THIS VERSION ____REQUIRES____ Linux 2.1.57 OR LATER. + ==================================================== + +Packages "snd-util-3.8.tar.gz" and "snd-data-0.1.tar.Z" +contain useful utilities to be used with this driver. +See http://www.opensound.com/ossfree/getting.html for +download instructions. + +If you are looking for the installation instructions, please +look forward into this document. + +Supported sound cards +--------------------- + +See below. + +Contributors +------------ + +This driver contains code by several contributors. In addition several other +persons have given useful suggestions. The following is a list of major +contributors. (I could have forgotten some names.) + + Craig Metz 1/2 of the PAS16 Mixer and PCM support + Rob Hooft Volume computation algorithm for the FM synth. + Mika Liljeberg uLaw encoding and decoding routines + Jeff Tranter Linux SOUND HOWTO document + Greg Lee Volume computation algorithm for the GUS and + lot's of valuable suggestions. + Andy Warner ISC port + Jim Lowe, + Amancio Hasty Jr FreeBSD/NetBSD port + Anders Baekgaard Bug hunting and valuable suggestions. + Joerg Schubert SB16 DSP support (initial version). + Andrew Robinson Improvements to the GUS driver + Megens SA MIDI recording for SB and SB Pro (initial version). + Mikael Nordqvist Linear volume support for GUS and + nonblocking /dev/sequencer. + Ian Hartas SVR4.2 port + Markus Aroharju and + Risto Kankkunen Major contributions to the mixer support + of GUS v3.7. + Hunyue Yau Mixer support for SG NX Pro. + Marc Hoffman PSS support (initial version). + Rainer Vranken Initialization for Jazz16 (initial version). + Peter Trattler Initial version of loadable module support for Linux. + JRA Gibson 16 bit mode for Jazz16 (initial version) + Davor Jadrijevic MAD16 support (initial version) + Gregor Hoffleit Mozart support (initial version) + Riccardo Facchetti Audio Excel DSP 16 (aedsp16) support + James Hightower Spotting a tiny but important bug in CS423x support. + Denis Sablic OPTi 82C924 spesific enhancements (non PnP mode) + Tim MacKenzie Full duplex support for OPTi 82C930. + + Please look at lowlevel/README for more contributors. + +There are probably many other names missing. If you have sent me some +patches and your name is not in the above list, please inform me. + +Sending your contributions or patches +------------------------------------- + +First of all it's highly recommended to contact me before sending anything +or before even starting to do any work. Tell me what you suggest to be +changed or what you have planned to do. Also ensure you are using the +very latest (development) version of OSS/Free since the change may already be +implemented there. In general it's major waste of time to try to improve +several months old version. Information about the latest version can be found +from http://www.opensound.com/ossfree. In general there is no point in +sending me patches relative to production kernels. + +Sponsors etc. +------------- + +The following companies have greatly helped development of this driver +in form of a free copy of their product: + +Novell, Inc. UnixWare personal edition + SDK +The Santa Cruz Operation, Inc. A SCO OpenServer + SDK +Ensoniq Corp, a SoundScape card and extensive amount of assistance +MediaTrix Peripherals Inc, a AudioTrix Pro card + SDK +Acer, Inc. a pair of AcerMagic S23 cards. + +In addition the following companies have provided me sufficient amount +of technical information at least some of their products (free or $$$): + +Advanced Gravis Computer Technology Ltd. +Media Vision Inc. +Analog Devices Inc. +Logitech Inc. +Aztech Labs Inc. +Crystal Semiconductor Corporation, +Integrated Circuit Systems Inc. +OAK Technology +OPTi +Turtle Beach +miro +Ad Lib Inc. ($$) +Music Quest Inc. ($$) +Creative Labs ($$$) + +If you have some problems +========================= + +Read the sound HOWTO (sunsite.unc.edu:/pub/Linux/docs/...?). +Also look at the home page (http://www.opensound.com/ossfree). It may +contain info about some recent bug fixes. + +It's likely that you have some problems when trying to use the sound driver +first time. Sound cards don't have standard configuration so there are no +good default configuration to use. Please try to use same I/O, DMA and IRQ +values for the sound card than with DOS. + +If you get an error message when trying to use the driver, please look +at /var/adm/messages for more verbose error message. + + +In general the easiest way to diagnose problems is to do "cat /dev/sndstat". + +If you get an error message, there are some problems with the driver setup: + + - "No such file or directory" tells that the device files for + the sound driver are missing. Use the script at the end of + linux/drivers/sound/Readme.linux to create them. + + - "No such device" tells that the sound driver is not in the kernel. + You have to reconfigure and recompile the kernel to have the sound + driver. Compiling the driver doesn't help alone. You have to boot + with the newly compiled one before the driver becomes active. + The Linux-HOWTO should help in this step. + +The following errors are likely with /dev/dsp and /dev/audio. + + - "No such device or address". This error message should not happen + with /dev/sndstat but it's possible with the other sound devices. + This error indicates that there are no suitable hardware for the + device file or the sound driver has been compiled without support for + this particular device. For example /dev/audio and /dev/dsp will not + work if "digitized voice support" was not enabled during "make config". + + - "Device or resource busy". Probably the IRQ (or DMA) channel + required by the sound card is in use by some other device/driver. + + - "I/O error". Almost certainly (99%) it's an IRQ or DMA conflict. + Look at the kernel messages in /var/adm/notice for more info. + + - "Invalid argument". The application is calling ioctl() + with impossible parameters. Check that the application is + for sound driver version 2.X or later. + +In general the printout of /dev/sndstat should tell what is the problem. +It's possible that there are bugs in the sound driver but 99% of the problems +reported to me are caused by somehow incorrect setup during "make config". + +Linux installation +================== + +IMPORTANT! Read this if you are installing a separately + distributed version of this driver. + + Check that your kernel version works with this + release of the driver (see Readme). Also verify + that your current kernel version doesn't have more + recent sound driver version than this one. IT'S HIGHLY + RECOMMENDED THAT YOU USE THE SOUND DRIVER VERSION THAT + IS DISTRIBUTED WITH KERNEL SOURCES. + +- When installing separately distributed sound driver you should first + read the above notice. Then try to find proper directory where and how + to install the driver sources. You should not try to install a separately + distributed driver version if you are not able to find the proper way + yourself (in this case use the version that is distributed with kernel + sources). Remove old version of linux/drivers/sound directory before + installing new files. + +- To build the device files you need to run the enclosed shell script + (see below). You need to do this only when installing sound driver + first time or when upgrading to much recent version than the earlier + one. + +- Configure and compile Linux as normally (remember to include the + sound support during "make config"). Please refer to kernel documentation + for instructions about configuring and compiling kernel. File Readme.cards + contains card specific instructions for configuring this driver for + use with various sound cards. + +Boot time configuration (using lilo and insmod) +----------------------------------------------- + +This information has been removed. Too many users didn't believe +that it's really not necessary to use this method. Please look at +Readme of sound driver version 3.0.1 if you still want to use this method. + +Problems +-------- + +If you have any kind of problems, there is a debugging feature which +could help you to solve the problem. To use it, just execute the +command: + + cat /dev/sndstat + +and look at the output. It should display some useful info about the +driver configuration. If there is no /dev/sndstat +(/dev/sndstat: No such file or directory), ensure that you have executed the +soundinstall script (at the end of this file). + +Common error messages: + +- /dev/???????: No such file or directory. +Run the script at the end of this file. + +- /dev/???????: No such device. +You are not running kernel which contains the sound driver. When using +modularized sound driver this error means that the sound driver is not +loaded. + +- /dev/????: No such device or address. +Sound driver didn't detect suitable card when initializing. Please look at +Readme.cards for info about configuring the driver with your card. Also +check for possible boot (insmod) time error messages in /var/adm/messages. + +- Other messages or problems +Please check http://www.opensound.com/ossfree for more info. + +Configuring version 3.8 (for Linux) with some common sound cards +================================================================ + +This document describes configuring sound cards with the freeware version of +Open Sound Systems (OSS/Free). Information about the commercial version +(OSS/Linux) and its configuration is available from +http://www.opensound.com/linux.html. Information presented here is +not valid for OSS/Linux. + +If you are unsure about how to configure OSS/Free +you can download the free evaluation version of OSS/Linux from the above +address. There is a chance that it can autodetect your sound card. In this case +you can use the information included in soundon.log when configuring OSS/Free. + + +IMPORTANT! This document covers only cards that were "known" when + this driver version was released. Please look at + http://www.opensound.com/ossfree for info about + cards introduced recently. + + When configuring the sound driver, you should carefully + check each sound configuration option (particularly + "Support for /dev/dsp and /dev/audio"). The default values + offered by these programs are not necessarily valid. + + +THE BIGGEST MISTAKES YOU CAN MAKE +================================= + +1. Assuming that the card is Sound Blaster compatible when it's not. +-------------------------------------------------------------------- + +The number one mistake is to assume that your card is compatible with +Sound Blaster. Only the cards made by Creative Technology or which have +one or more chips labeled by Creative are SB compatible. In addition there +are few sound chipsets which are SB compatible in Linux such as ESS1688 or +Jazz16. Note that SB compatibility in DOS/Windows does _NOT_ mean anything +in Linux. + +IF YOU REALLY ARE 150% SURE YOU HAVE A SOUND BLASTER YOU CAN SKIP THE REST OF +THIS CHAPTER. + +For most other "supposed to be SB compatible" cards you have to use other +than SB drivers (see below). It is possible to get most sound cards to work +in SB mode but in general it's a complete waste of time. There are several +problems which you will encounter by using SB mode with cards that are not +truly SB compatible: + +- The SB emulation is at most SB Pro (DSP version 3.x) which means that +you get only 8 bit audio (there is always an another ("native") mode which +gives the 16 bit capability). The 8 bit only operation is the reason why +many users claim that sound quality in Linux is much worse than in DOS. +In addition some applications require 16 bit mode and they produce just +noise with a 8 bit only device. +- The card may work only in some cases but refuse to work most of the +time. The SB compatible mode always requires special initialization which is +done by the DOS/Windows drivers. This kind of cards work in Linux after +you have warm booted it after DOS but they don't work after cold boot +(power on or reset). +- You get the famous "DMA timed out" messages. Usually all SB clones have +software selectable IRQ and DMA settings. If the (power on default) values +currently used by the card don't match configuration of the driver you will +get the above error message whenever you try to record or play. There are +few other reasons to the DMA timeout message but using the SB mode seems +to be the most common cause. + +2. Trying to use a PnP (Plug & Play) card just like an ordinary sound card +-------------------------------------------------------------------------- + +Plug & Play is a protocol defined by Intel and Microsoft. It lets operating +systems to easily identify and reconfigure I/O ports, IRQs and DMAs of ISA +cards. The problem with PnP cards is that the standard Linux doesn't currently +(versions 2.1.x and earlier) don't support PnP. This means that you will have +to use some special tricks (see later) to get a PnP card alive. Many PnP cards +work after they have been initialized but this is not always the case. + +There are sometimes both PnP and non-PnP versions of the same sound card. +The non-PnP version is the original model which usually has been discontinued +more than an year ago. The PnP version has the same name but with "PnP" +appended to it (sometimes not). This causes major confusion since the non-PnP +model works with Linux but the PnP one doesn't. + +You should carefully check if "Plug & Play" or "PnP" is mentioned in the name +of the card or in the documentation or package that came with the card. +Everything described in the rest of this document is not necessarily valid for +PnP models of sound cards even you have managed to wake up the card properly. +Many PnP cards are simply too different from their non-PnP ancestors which are +covered by this document. + + +Cards that are not (fully) supported by this driver +=================================================== + +See http://www.opensound.com/ossfree for information about sound cards +to be supported in future. + + +How to use sound without recompiling kernel and/or sound driver +=============================================================== + +There is a commercial sound driver which comes in precompiled form and doesn't +require recompiling of the kernel. See http://www.4Front-tech.com/oss.html for +more info. + + +Configuring PnP cards +===================== + +New versions of most sound cards use the so-called ISA PnP protocol for +soft configuring their I/O, IRQ, DMA and shared memory resources. +Currently at least cards made by Creative Technology (SB32 and SB32AWE +PnP), Gravis (GUS PnP and GUS PnP Pro), Ensoniq (Soundscape PnP) and +Aztech (some Sound Galaxy models) use PnP technology. The CS4232/4236 audio +chip by Crystal Semiconductor (Intel Atlantis, HP Pavilion and many other +motherboards) is also based on PnP technology but there is a "native" driver +available for it (see information about CS4232 later in this document). + +PnP sound cards (as well as most other PnP ISA cards) are not supported +by this version of the driver . Proper +support for them should be released during 97 once the kernel level +PnP support is available. + +There is a method to get most of the PnP cards to work. The basic method +is the following: + +1) Boot DOS so the card's DOS drivers have a chance to initialize it. +2) _Cold_ boot to Linux by using "loadlin.exe". Hitting ctrl-alt-del +works with older machines but causes a hard reset of all cards on recent +(Pentium) machines. +3) If you have the sound driver in Linux configured properly, the card should +work now. "Proper" means that I/O, IRQ and DMA settings are the same as in +DOS. The hard part is to find which settings were used. See the documentation of +your card for more info. + +Windows 95 could work as well as DOS but running loadlin may be difficult. +Probably you should "shut down" your machine to MS-DOS mode before running it. + +Some machines have a BIOS utility for setting PnP resources. This is a good +way to configure some cards. In this case you don't need to boot DOS/Win95 +before starting Linux. + +Another way to initialize PnP cards without DOS/Win95 is a Linux based +PnP isolation tool. When writing this there is a pre alpha test version +of such a tool available from ftp://ftp.demon.co.uk/pub/unix/linux/utils. The +file is called isapnptools-*. Please note that this tool is just a temporary +solution which may be incompatible with future kernel versions having proper +support for PnP cards. There are bugs in setting DMA channels in earlier +versions of isapnptools so at least version 1.6 is required with sound cards. + +Yet another way to use PnP cards is to use (commercial) OSS/Linux drivers. See +http://www.opensound.com/linux.html for more info. This is probably the way you +should do it if you don't want to spend time recompiling the kernel and +required tools. + + +Read this before trying to configure the driver +=============================================== + +There are currently many cards that work with this driver. Some of the cards +have native support while others work since they emulate some other +card (usually SB, MSS/WSS and/or MPU401). The following cards have native +support in the driver. Detailed instructions for configuring these cards +will be given later in this document. + +Pro Audio Spectrum 16 (PAS16) and compatibles: + Pro Audio Spectrum 16 + Pro Audio Studio 16 + Logitech Sound Man 16 + NOTE! The original Pro Audio Spectrum as well as the PAS+ are not + and will not be supported by the driver. + +Media Vision Jazz16 based cards + Pro Sonic 16 + Logitech SoundMan Wave + (Other Jazz based cards should work but I don't have any reports + about them). + +Sound Blasters + SB 1.0 to 2.0 + SB Pro + SB 16 + SB32/64/AWE + Configure SB32/64/AWE just like SB16. See lowlevel/README.awe + for information about using the wave table synth. + NOTE! AWE63/Gold and 16/32/AWE "PnP" cards need to be activated + using isapnptools before they work with OSS/Free. + SB16 compatible cards by other manufacturers than Creative. + You have been fooled since there are _no_ SB16 compatible + cards on the market (as of May 1997). It's likely that your card + is compatible just with SB Pro but there is also a non-SB- + compatible 16 bit mode. Usually it's MSS/WSS but it could also + be a proprietary one like MV Jazz16 or ESS ES688. OPTi + MAD16 chips are very common in so called "SB 16 bit cards" + (try with the MAD16 driver). + + ====================================================================== + "Supposed to be SB compatible" cards. + Forget the SB compatibility and check for other alternatives + first. The only cards that work with the SB driver in + Linux have been made by Creative Technology (there is at least + one chip on the card with "CREATIVE" printed on it). The + only other SB compatible chips are ESS and Jazz16 chips + (maybe ALSxxx chips too but they probably don't work). + Most other "16 bit SB compatible" cards such as "OPTi/MAD16" or + "Crystal" are _NOT_ SB compatible in Linux. + + Practically all sound cards have some kind of SB emulation mode + in addition to their native (16 bit) mode. In most cases this + (8 bit only) SB compatible mode doesn't work with Linux. If + you get it working it may cause problems with games and + applications which require 16 bit audio. Some 16 bit only + applications don't check if the card actually supports 16 bits. + They just dump 16 bit data to a 8 bit card which produces just + noise. + + In most cases the 16 bit native mode is supported by Linux. + Use the SB mode with "clones" only if you don't find anything + better from the rest of this doc. + ====================================================================== + +Gravis Ultrasound (GUS) + GUS + GUS + the 16 bit option + GUS MAX + GUS ACE (No MIDI port and audio recording) + GUS PnP (with RAM) + +MPU-401 and compatibles + The driver works both with the full (intelligent mode) MPU-401 + cards (such as MPU IPC-T and MQX-32M) and with the UART only + dumb MIDI ports. MPU-401 is currently the most common MIDI + interface. Most sound cards are compatible with it. However, + don't enable MPU401 mode blindly. Many cards with native support + in the driver have their own MPU401 driver. Enabling the standard one + will cause a conflict with these cards. So check if your card is + in the list of supported cards before enabling MPU401. + +Windows Sound System (MSS/WSS) + Even when Microsoft has discontinued their own Sound System card + they managed to make it a standard. MSS compatible cards are based on + a codec chip which is easily available from at least two manufacturers + (AD1848 by Analog Devices and CS4231/CS4248 by Crystal Semiconductor). + Currently most sound cards are based on one of the MSS compatible codec + chips. The CS4231 is used in the high quality cards such as GUS MAX, + MediaTrix AudioTrix Pro and TB Tropez (GUS MAX is not MSS compatible). + + Having a AD1848, CS4248 or CS4231 codec chip on the card is a good + sign. Even if the card is not MSS compatible, it could be easy to write + support for it. Note also that most MSS compatible cards + require special boot time initialization which may not be present + in the driver. Also, some MSS compatible cards have native support. + Enabling the MSS support with these cards is likely to + cause a conflict. So check if your card is listed in this file before + enabling the MSS support. + +Yamaha FM synthesizers (OPL2, OPL3 (not OPL3-SA) and OPL4) + Most sound cards have a FM synthesizer chip. The OPL2 is a 2 + operator chip used in the original AdLib card. Currently it's used + only in the cheapest (8 bit mono) cards. The OPL3 is a 4 operator + FM chip which provides better sound quality and/or more available + voices than the OPL2. The OPL4 is a new chip that has an OPL3 and + a wave table synthesizer packed onto the same chip. The driver supports + just the OPL3 mode directly. Most cards with an OPL4 (like + SM Wave and AudioTrix Pro) support the OPL4 mode using MPU401 + emulation. Writing a native OPL4 support is difficult + since Yamaha doesn't give information about their sample ROM chip. + + Enable the generic OPL2/OPL3 FM synthesizer support if your + card has a FM chip made by Yamaha. Don't enable it if your card + has a software (TRS) based FM emulator. + + ---------------------------------------------------------------- + NOTE! OPL3-SA is different chip than the ordinary OPL3. In addition + to the FM synth this chip has also digital audio (WSS) and + MIDI (MPU401) capabilities. Support for OPL3-SA is described below. + ---------------------------------------------------------------- + +Yamaha OPL3-SA1 + + Yamaha OPL3-SA1 (YMF701) is an audio controller chip used on some + (Intel) motherboards and on cheap sound cards. It should not be + confused with the original OPL3 chip (YMF278) which is entirely + different chip. OPL3-SA1 has support for MSS, MPU401 and SB Pro + (not used in OSS/Free) in addition to the OPL3 FM synth. + + There are also chips called OPL3-SA2, OPL3-SA3, ..., OPL3SA-N. They + are PnP chips and will not work with the OPL3-SA1 driver. You should + use the standard MSS, MPU401 and OPL3 options with thses chips and to + activate the card using isapnptools. + +4Front Technologies SoftOSS + + SoftOSS is a software based wave table emulation which works with + any 16 bit stereo sound card. Due to its nature a fast CPU is + required (P133 is minimum). Although SoftOSS does _not_ use MMX + instructions it has proven out that recent processors (which appear + to have MMX) perform significantly better with SoftOSS than earlier + ones. For example a P166MMX beats a PPro200. SoftOSS should not be used + on 486 or 386 machines. + + The amount of CPU load caused by SoftOSS can be controlled by + selecting the CONFIG_SOFTOSS_RATE and CONFIG_SOFTOSS_VOICES + parameters properly (they will be prompted by make config). It's + recommended to set CONFIG_SOFTOSS_VOICES to 32. If you have a + P166MMX or faster (PPro200 is not faster) you can set + CONFIG_SOFTOSS_RATE to 44100 (kHz). However with slower systems it + recommended to use sampling rates around 22050 or even 16000 kHz. + Selecting too high values for these parameters may hang your + system when playing MIDI files with hight degree of polyphony + (number of concurrently playing notes). It's also possible to + decrease CONFIG_SOFTOSS_VOICES. This makes it possible to use + higher sampling rates. However using fewer voices decreases + playback quality more than decreasing the sampling rate. + + SoftOSS keeps the samples loaded on the system's RAM so much RAM is + required. SoftOSS should never be used on machines with less than 16 MB + of RAM since this is potentially dangerous (you may accidently run out + of memory which probably crashes the machine). + + SoftOSS implements the wave table API originally designed for GUS. For + this reason all applications designed for GUS should work (at least + after minor modifications). For example gmod/xgmod and playmidi -g are + known to work. + + To work SoftOSS will require GUS compatible + patch files to be installed on the system (in /dos/ultrasnd/midi). You + can use the public domain MIDIA patchset available from several ftp + sites. + + ********************************************************************* + IMPORTANT NOTICE! The original patch set distributed with the Gravis + Ultrasound card is not in public domain (even though it's available from + some FTP sites). You should contact Voice Crystal (www.voicecrystal.com) + if you like to use these patches with SoftOSS included in OSS/Free. + ********************************************************************* + +PSS based cards (AD1848 + ADSP-2115 + Echo ESC614 ASIC) + Analog Devices and Echo Speech have together defined a sound card + architecture based on the above chips. The DSP chip is used + for emulation of SB Pro, FM and General MIDI/MT32. + + There are several cards based on this architecture. The most known + ones are Orchid SW32 and Cardinal DSP16. + + The driver supports downloading DSP algorithms to these cards. + + NOTE! You will have to use the "old" config script when configuring + PSS cards. + +MediaTrix AudioTrix Pro + The ATP card is built around a CS4231 codec and an OPL4 synthesizer + chips. The OPL4 mode is supported by a microcontroller running a + General MIDI emulator. There is also a SB 1.5 compatible playback mode. + +Ensoniq SoundScape and compatibles + Ensoniq has designed a sound card architecture based on the + OTTO synthesizer chip used in their professional MIDI synthesizers. + Several companies (including Ensoniq, Reveal and Spea) are selling + cards based on this architecture. + + NOTE! The SoundScape PnP is not supported by OSS/Free. Ensoniq VIVO and + VIVO90 cards are not compatible with Soundscapes so the Soundscape + driver will not work with them. You may want to use OSS/Linux with these + cards. + +OPTi MAD16 and Mozart based cards + The Mozart (OAK OTI-601), MAD16 (OPTi 82C928), MAD16 Pro (OPTi 82C929), + OPTi 82C924/82C925 (in _non_ PnP mode) and OPTi 82C930 interface + chips are used in many different sound cards, including some + cards by Reveal miro and Turtle Beach (Tropez). The purpose of these + chips is to connect other audio components to the PC bus. The + interface chip performs address decoding for the other chips. + NOTE! Tropez Plus is not MAD16 but CS4232 based. + NOTE! MAD16 PnP cards (82C924, 82C925, 82C931) are not MAD16 compatible + in the PnP mode. You will have to use them in MSS mode after having + initialized them using isapnptools or DOS. 82C931 probably requires + initialization using DOS/Windows (running isapnptools is not enough). + It's possible to use 82C931 with OSS/Free by jumpering it to non-PnP + mode (provided that the card has a jumper for this). In non-PnP mode + 82C931 is compatible with 82C930 and should work with the MAD16 driver + (without need to use isapnptools or DOS to initialize it). All OPTi + chips are supported by OSS/Linux (both in PnP and non-PnP modes). + +Audio Excel DSP16 + Support for this card was written by Riccardo Faccetti + (riccardo@cdc8g5.cdc.polimi.it). The AEDSP16 driver included in + the lowlevel/ directory. To use it you should enable the + "Additional low level drivers" option. + +Crystal CS4232 and CS4236 based cards such as AcerMagic S23, TB Tropez _Plus_ and + many PC motherboards (Compaq, HP, Intel, ...) + CS4232 is a PnP multimedia chip which contains a CS3231A codec, + SB and MPU401 emulations. There is support for OPL3 too. + Unfortunately the MPU401 mode doesn't work (I don't know how to + initialize it). CS4236 is an enhanced (compatible) version of CS4232. + NOTE! Don't ever try to use isapnptools with CS4232 since this will just + freeze your machine (due to chip bugs). If you have problems in getting + CS4232 working you could try initializing it with DOS (CS4232C.EXE) and + then booting Linux using loadlin. CS4232C.EXE loads a secret firmware + patch which is not documented by Crystal. + +Turtle Beach Maui and Tropez "classic" + This driver version supports sample, patch and program loading commands + described in the Maui/Tropez User's manual. + There is now full initialization support too. The audio side of + the Tropez is based on the MAD16 chip (see above). + NOTE! Tropez Plus is different card than Tropez "classic" and will not + work fully in Linux. You can get audio features working by configuring + the card as a CS4232 based card (above). + + +Jumpers and software configuration +================================== + +Some of the earliest sound cards were jumper configurable. You have to +configure the driver use I/O, IRQ and DMA settings +that match the jumpers. Just few 8 bit cards are fully jumper +configurable (SB 1.x/2.x, SB Pro and clones). +Some cards made by Aztech have an EEPROM which contains the +config info. These cards behave much like hardware jumpered cards. + +Most cards have jumper for the base I/O address but other parameters +are software configurable. Sometimes there are few other jumpers too. + +Latest cards are fully software configurable or they are PnP ISA +compatible. There are no jumpers on the board. + +The driver handles software configurable cards automatically. Just configure +the driver to use I/O, IRQ and DMA settings which are known to work. +You could usually use the same values than with DOS and/or Windows. +Using different settings is possible but not recommended since it may cause +some trouble (for example when warm booting from an OS to another or +when installing new hardware to the machine). + +Sound driver sets the soft configurable parameters of the card automatically +during boot. Usually you don't need to run any extra initialization +programs when booting Linux but there are some exceptions. See the +card-specific instructions below for more info. + +The drawback of software configuration is that the driver needs to know +how the card must be initialized. It cannot initialize unknown cards +even if they are otherwise compatible with some other cards (like SB, +MPU401 or Windows Sound System). + + +What if your card was not listed above? +======================================= + +The first thing to do is to look at the major IC chips on the card. +Many of the latest sound cards are based on some standard chips. If you +are lucky, all of them could be supported by the driver. The most common ones +are the OPTi MAD16, Mozart, SoundScape (Ensoniq) and the PSS architectures +listed above. Also look at the end of this file for list of unsupported +cards and the ones which could be supported later. + +The last resort is to send _exact_ name and model information of the card +to me together with a list of the major IC chips (manufactured, model) to +me. I could then try to check if your card looks like something familiar. + +There are many more cards in the world than listed above. The first thing to +do with these cards is to check if they emulate some other card or interface +such as SB, MSS and/or MPU401. In this case there is a chance to get the +card to work by booting DOS before starting Linux (boot DOS, hit ctrl-alt-del +and boot Linux without hard resetting the machine). In this method the +DOS based driver initializes the hardware to use known I/O, IRQ and DMA +settings. If sound driver is configured to use the same settings, everything +should work OK. + + +Configuring sound driver (with Linux) +===================================== + +The sound driver is currently distributed as part of the Linux kernel. The +files are in /usr/src/linux/drivers/sound/. + +**************************************************************************** +* ALWAYS USE THE SOUND DRIVER VERSION WHICH IS DISTRIBUTED WITH * +* THE KERNEL SOURCE PACKAGE YOU ARE USING. SOME ALPHA AND BETA TEST * +* VERSIONS CAN BE INSTALLED FROM A SEPARATELY DISTRIBUTED PACKAGE * +* BUT CHECK THAT THE PACKAGE IS NOT MUCH OLDER (OR NEWER) THAN THE * +* KERNEL YOU ARE USING. IT'S POSSIBLE THAT THE KERNEL/DRIVER * +* INTERFACE CHANGES BETWEEN KERNEL RELEASES WHICH MAY CAUSE SOME * +* INCOMPATIBILITY PROBLEMS. * +* * +* IN CASE YOU INSTALL A SEPARATELY DISTRIBUTED SOUND DRIVER VERSION, * +* BE SURE TO REMOVE OR RENAME THE OLD SOUND DRIVER DIRECTORY BEFORE * +* INSTALLING THE NEW ONE. LEAVING OLD FILES TO THE SOUND DRIVER * +* DIRECTORY _WILL_ CAUSE PROBLEMS WHEN THE DRIVER IS USED OR * +* COMPILED. * +**************************************************************************** + +To configure the driver, run "make config" in the kernel source directory +(/usr/src/linux). Answer "y" or "m" to the question about Sound card support +(after the questions about mouse, CD-ROM, ftape, etc. support). Questions +about options for sound will then be asked. + +After configuring the kernel and sound driver, run "make dep" and compile +the kernel following instructions in the kernel README. + +The sound driver configuration dialog +------------------------------------- + +If you already have the sound driver installed, consult a printout of +"cat /dev/sndstat" when configuring the driver again. It gives the I/O, +IRQ and DMA settings you used earlier. + +Sound configuration starts by making some yes/no questions. Be careful +when answering to these questions since answering y to a question may +prevent some later ones from being asked. For example don't answer y to +the first question (PAS16) if you don't really have a PAS16. Don't enable +more cards than you really need since they just consume memory. Also +some drivers (like MPU401) may conflict with your SCSI controller and +prevent kernel from booting. If you card was in the list of supported +cards (above), please look at the card specific config instructions +(later in this file) before starting to configure. Some cards must be +configured in way which is not obvious. + +So here is the beginning of the config dialog. Answer 'y' or 'n' to these +questions. The default answer is shown so that (y/n) means 'y' by default and +(n/y) means 'n'. To use the default value, just hit ENTER. But be careful +since using the default _doesn't_ guarantee anything. + +Note also that all questions may not be asked. The configuration program +may disable some questions depending on the earlier choices. It may also +select some options automatically as well. + + "ProAudioSpectrum 16 support", + - Answer 'y'_ONLY_ if you have a Pro Audio Spectrum _16_, + Pro Audio Studio 16 or Logitech SoundMan 16 (be sure that + you read the above list correctly). Don't answer 'y' if you + have some other card made by Media Vision or Logitech since they + are not PAS16 compatible. + NOTE! Since 3.5-beta10 you need to enable SB support (next question) + if you want to use the SB emulation of PAS16. It's also possible to + the emulation if you want to use a true SB card together with PAS16 + (there is another question about this that is asked later). + "Sound Blaster support", + - Answer 'y' if you have an original SB card made by Creative Labs + or a full 100% hardware compatible clone (like Thunderboard or + SM Games). If your card was in the list of supported cards (above), + please look at the card specific instructions later in this file + before answering this question. For an unknown card you may answer + 'y' if the card claims to be SB compatible. + Enable this option also with PAS16 (changed since v3.5-beta9). + + Don't enable SB if you have a MAD16 or Mozart compatible card. + + "Generic OPL2/OPL3 FM synthesizer support", + - Answer 'y' if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4). + 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. However I don't currently know + such cards. + "Gravis Ultrasound support", + - Answer 'y' if you have GUS or GUS MAX. Answer 'n' if you don't + have GUS since the GUS driver consumes much memory. + Currently I don't have experiences with the GUS ACE so I don't + know what to answer with it. + "MPU-401 support (NOT for SB16)", + - Be careful with this question. The MPU401 interface is supported + by almost any sound card today. However some natively supported cards + have their own driver for MPU401. Enabling the MPU401 option with + these cards will cause a conflict. Also enabling MPU401 on a system + that doesn't really have a MPU401 could cause some trouble. If your + card was in the list of supported cards (above), please look at + the card specific instructions later in this file. + + In MOST cases this MPU401 driver should only be used with "true" + MIDI-only MPU401 professional cards. In most other cases there + is another way to get the MPU401 compatible interface of a + sound card to work. + Support for the MPU401 compatible MIDI port of SB16, ESS1688 + and MV Jazz16 cards is included in the SB driver. Use it instead + of this separate MPU401 driver with these cards. As well + Soundscape, PSS and Maui drivers include their own MPU401 + options. + + It's safe to answer 'y' if you have a true MPU401 MIDI interface + card. + "6850 UART Midi support", + - It's safe to answer 'n' to this question in all cases. The 6850 + UART interface is so rarely used. + "PSS (ECHO-ADI2111) support", + - 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). + "16 bit sampling option of GUS (_NOT_ GUS MAX)", + - Answer 'y' if you have installed the 16 bit sampling daughtercard + to your GUS. Answer 'n' if you have GUS MAX. Enabling this option + disables GUS MAX support. + "GUS MAX support", + - Answer 'y' only if you have a GUS MAX. + "Microsoft Sound System support", + - Again think carefully before answering 'y' to this question. It's + safe to answer 'y' in case 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 was not listed earlier + in this file. For cards having native support in the driver, consult + the card specific instructions later in this file. Some drivers + have their own MSS support and enabling this option will cause a + conflict. + Note! The MSS driver permits configuring two DMA channels. This is a + "nonstandard" feature and works only with very few cards (if any). + In most cases the second DMA channel should be disabled or set to + the same channel than the first one. Trying to configure two separate + channels with cards that don't support this feature will prevent + audio (at least recording) from working. + "Ensoniq Soundscape support", + - Answer 'y' if you have a sound card based on the Ensoniq SoundScape + chipset. Such cards are being manufactured at least by Ensoniq, + Spea and Reveal (note that Reveal makes other cards also). The oldest + cards made by Spea don't work properly with Linux. + Soundscape PnP as well as Ensoniq VIVO work only with the commercial + OSS/Linux version. + "MediaTrix AudioTrix Pro support", + - Answer 'y' if you have the AudioTrix Pro. + "Support for MAD16 and/or Mozart based cards", + - Answer y if your card has a Mozart (OAK OTI-601) or MAD16 + (OPTi 82C928, 82C929, 82C924/82C925 or 82C930) audio interface chip. + These chips are + currently 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 (some recent models). + Note OPTi 82C924 and 82C925 are MAD16 compatible only in non PnP + mode (jumper selectable on many cards). + "Support for TB Maui" + - This enables TB Maui specific initialization. Works with TB Maui + and TB Tropez (may not work with Tropez Plus). + + +Then the configuration program asks some y/n questions about the higher +level services. It's recommended to answer 'y' to each of these questions. +Answer 'n' only if you know you will not need the option. + + "MIDI interface support", + - Answering 'n' disables /dev/midi## 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. + "FM synthesizer (YM3812/OPL-3) support", + - Answer 'y' here. + "/dev/sequencer support", + - Answering 'n' disables /dev/sequencer and /dev/music. + +Entering the I/O, IRQ and DMA config parameters +----------------------------------------------- + +After the above questions the configuration program prompts for the +card specific configuration information. Usually just a set of +I/O address, IRQ and DMA numbers are asked. With some cards the program +asks for some files to be used during initialization of the card. For example +many cards have a DSP chip or microprocessor which must be initialized by +downloading a program (microcode) file to the card. + +Instructions for answering these questions are given in the next section. + + +Card specific information +========================= + +This section gives additional instructions about configuring some cards. +Please refer manual of your card for valid I/O, IRQ and DMA numbers. Using +the same settings with DOS/Windows and Linux is recommended. Using +different values could cause some problems when switching between +different operating systems. + +Sound Blasters (the original ones by Creative) +--------------------------------------------- + +NOTE! Check if you have a PnP Sound Blaster (cards sold after summer 1995 + are almost certainly PnP ones). With PnP cards you should use isapnptools + to activate them (see above). + +It's possible to configure these cards to use different I/O, IRQ and +DMA settings. Since the possible/default settings have changed between various +models, you have to consult manual of your card for the proper ones. It's +a good idea to use the same values than with DOS/Windows. With SB and SB Pro +it's the only choice. SB16 has software selectable IRQ and DMA channels but +using different values with DOS and Linux is likely to cause troubles. The +DOS driver is not able to reset the card properly after warm boot from Linux +if Linux has used different IRQ or DMA values. + +The original (steam) Sound Blaster (versions 1.x and 2.x) use always +DMA1. There is no way to change it. + +The SB16 needs two DMA channels. A 8 bit one (1 or 3) is required for +8 bit operation and a 16 bit one (5, 6 or 7) for the 16 bit mode. In theory +it's possible to use just one (8 bit) DMA channel by answering the 8 bit +one when the configuration program asks for the 16 bit one. This may work +in some systems but is likely to cause terrible noise on some other systems. + +It's possible to use two SB16/32/64 at the same time. To do this you should +first configure OSS/Free for one card. Then edit local.h manually and define +SB2_BASE, SB2_IRQ, SB2_DMA and SB2_DMA2 for the second one. You can't get +the OPL3, MIDI and EMU8000 devices of the second card to work. If you are +going to use two PnP Sound Blasters, ensure that they are of different model +and have different PnP IDs. There is no way to get two cards with the same +card ID and serial number to work. The easiest way to check this is trying +if isapnptools can see both cards or just one. + +NOTE! Don't enable the SM Games option (asked by the configuration program) + if you are not 101% sure that your card is a Logitech Soundman Games + (not a SM Wave or SM16). + +SB Clones +--------- + +First of all: There are no SB16 clones. There are SB Pro clones with a +16 bit mode which is not SB16 compatible. The most likely alternative is that +the 16 bit mode means MSS/WSS. + +There are just a few fully 100% hardware SB or SB Pro compatible cards. +I know just Thunderboard and SM Games. Other cards require some kind of +hardware initialization before they become SB compatible. Check if your card +was listed in the beginning of this file. In this case you should follow +instructions for your card later in this file. + +For other not fully SB clones you may try initialization using DOS in +the following way: + + - Boot DOS so that the card specific driver gets run. + - Hit ctrl-alt-del (or use loadlin) to boot Linux. Don't + switch off power or press the reset button. + - If you use the same I/O, IRQ and DMA settings in Linux, the + card should work. + +If your card is both SB and MSS compatible, I recommend using the MSS mode. +Most cards of this kind are not able to work in the SB and the MSS mode +simultaneously. Using the MSS mode provides 16 bit recording and playback. + +ProAudioSpectrum 16 and compatibles +----------------------------------- + +PAS16 has a SB emulation chip which can be used together with the native +(16 bit) mode of the card. To enable this emulation you should configure +the driver to have SB support too (this has been changed since version +3.5-beta9 of this driver). + +With current driver versions it's also possible to use PAS16 together with +another SB compatible card. In this case you should configure SB support +for the other card and to disable the SB emulation of PAS16 (there is a +separate questions about this). + +With PAS16 you can use two audio device files at the same time. /dev/dsp (and +/dev/audio) is connected to the 8/16 bit native codec and the /dev/dsp1 (and +/dev/audio1) is connected to the SB emulation (8 bit mono only). + +Gravis Ultrasound +----------------- + +There are many different revisions of the Ultrasound card (GUS). The +earliest ones (pre 3.7) don't have a hardware mixer. With these cards +the driver uses a software emulation for synth and pcm playbacks. It's +also possible to switch some of the inputs (line in, mic) off by setting +mixer volume of the channel level below 10%. For recording you have +to select the channel as a recording source and to use volume above 10%. + +GUS 3.7 has a hardware mixer. + +GUS MAX and the 16 bit sampling daughtercard have a CS4231 codec chip which +also contains a mixer. + +Configuring GUS is simple. Just enable the GUS support and GUS MAX or +the 16 bit daughtercard if you have them. Note that enabling the daughter +card disables GUS MAX driver. + +NOTE for owners of the 16 bit daughtercard: By default the daughtercard +uses /dev/dsp (and /dev/audio). Command "ln -sf /dev/dsp1 /dev/dsp" +selects the daughter card as the default device. + +With just the standard GUS enabled the configuration program prompts +for the I/O, IRQ and DMA numbers for the card. Use the same values than +with DOS. + +With the daughter card option enabled you will be prompted for the I/O, +IRQ and DMA numbers for the daughter card. You have to use different I/O +and DMA values than for the standard GUS. The daughter card permits +simultaneous recording and playback. Use /dev/dsp (the daughtercard) for +recording and /dev/dsp1 (GUS GF1) for playback. + +GUS MAX uses the same I/O address and IRQ settings than the original GUS +(GUS MAX = GUS + a CS4231 codec). In addition an extra DMA channel may be used. +Using two DMA channels permits simultaneous playback using two devices +(dev/dsp0 and /dev/dsp1). The second DMA channel is required for +full duplex audio. +To enable the second DMA channels, give a valid DMA channel when the config +program asks for the GUS MAX DMA (entering -1 disables the second DMA). +Using 16 bit DMA channels (5,6 or 7) is recommended. + +If you have problems in recording with GUS MAX, you could try to use +just one 8 bit DMA channel. Recording will not work with one DMA +channel if it's a 16 bit one. + +Microphone input of GUS MAX is connected to mixer in little bit nonstandard +way. There is actually two microphone volume controls. Normal "mic" controls +only recording level. Mixer control "speaker" is used to control volume of +microphone signal connected directly to line/speaker out. So just decrease +volume of "speaker" if you have problems with microphone feedback. + +GUS ACE works too but any attempt to record or to use the MIDI port +will fail. + +GUS PnP (with RAM) is partially supported but it needs to be initialized using +DOS or isapnptools before starting the driver. + +MPU401 and Windows Sound System +------------------------------- + +Again. Don't enable these options in case your card is listed +somewhere else in this file. + +Configuring these cards is obvious (or it should be). With MSS +you should probably enable the OPL3 synth also since +most MSS compatible cards have it. However check that this is true +before enabling OPL3. + +Sound driver supports more than one MPU401 compatible cards at the same time +but the config program asks config info for just the first of them. +Adding the second or third MPU interfaces must be done manually by +editing sound/local.h (after running the config program). Add defines for +MPU2_BASE & MPU2_IRQ (and MPU3_BASE & MPU3_IRQ) to the file. + +CAUTION! + +The default I/O base of Adaptec AHA-1542 SCSI controller is 0x330 which +is also the default of the MPU401 driver. Don't configure the sound driver to +use 0x330 as the MPU401 base if you have a AHA1542. The kernel will not boot +if you make this mistake. + +PSS +--- + +Even the PSS cards are compatible with SB, MSS and MPU401, you must not +enable these options when configuring the driver. The configuration +program handles these options itself. (You may use the SB, MPU and MSS options +together with PSS if you have another card on the system). + +The PSS driver enables MSS and MPU401 modes of the card. SB is not enabled +since it doesn't work concurrently with MSS. The driver loads also a +DSP algorithm which is used to for the general MIDI emulation. The +algorithm file (.ld) is read by the config program and written to a +file included when the pss.c is compiled. For this reason the config +program asks if you want to download the file. Use the genmidi.ld file +distributed with the DOS/Windows drivers of the card (don't use the mt32.ld). +With some cards the file is called 'synth.ld'. You must have access to +the file when configuring the driver. The easiest way is to mount the DOS +partition containing the file with Linux. + +It's possible to load your own DSP algorithms and run them with the card. +Look at the directory pss_test of snd-util-3.0.tar.gz for more info. + +AudioTrix Pro +------------- + +You have to enable the OPL3 and SB (not SB Pro or SB16) drivers in addition +to the native AudioTrix driver. Don't enable MSS or MPU drivers. + +Configuring ATP is little bit tricky since it uses so many I/O, IRQ and +DMA numbers. Using the same values than with DOS/Win is a good idea. Don't +attempt to use the same IRQ or DMA channels twice. + +The SB mode of ATP is implemented so the ATP driver just enables SB +in the proper address. The SB driver handles the rest. You have to configure +both the SB driver and the SB mode of ATP to use the same IRQ, DMA and I/O +settings. + +Also the ATP has a microcontroller for the General MIDI emulation (OPL4). +For this reason the driver asks for the name of a file containing the +microcode (TRXPRO.HEX). This file is usually located in the directory +where the DOS drivers were installed. You must have access to this file +when configuring the driver. + +If you have the effects daughtercard, it must be initialized by running +the setfx program of snd-util-3.0.tar.gz package. This step is not required +when using the (future) binary distribution version of the driver. + +Ensoniq SoundScape +------------------ + +NOTE! The new PnP SoundScape is not supported yet. Soundscape compatible + cards made by Reveal don't work with Linux. They use older revision + of the Soundscape chipset which is not fully compatible with + newer cards made by Ensoniq. + +The SoundScape driver handles initialization of MSS and MPU supports +itself so you don't need to enable other drivers than SoundScape +(enable also the /dev/dsp, /dev/sequencer and MIDI supports). + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!! !!!! +!!!!! NOTE! Before version 3.5-beta6 there WERE two sets of audio !!!! +!!!!! device files (/dev/dsp0 and /dev/dsp1). The first one WAS !!!! +!!!!! used only for card initialization and the second for audio !!!! +!!!!! purposes. It WAS required to change /dev/dsp (a symlink) to !!!! +!!!!! point to /dev/dsp1. !!!! +!!!!! !!!! +!!!!! This is not required with OSS versions 3.5-beta6 and later !!!! +!!!!! since there is now just one audio device file. Please !!!! +!!!!! change /dev/dsp to point back to /dev/dsp0 if you are !!!! +!!!!! upgrading from an earlier driver version using !!!! +!!!!! (cd /dev;rm dsp;ln -s dsp0 dsp). !!!! +!!!!! !!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +The configuration program asks one DMA channel and two interrupts. One IRQ +and one DMA is used by the MSS codec. The second IRQ is required for the +MPU401 mode (you have to use different IRQs for both purposes). +There were earlier two DMA channels for SoundScape but the current driver +version requires just one. + +The SoundScape card has a Motorola microcontroller which must initialized +_after_ boot (the driver doesn't initialize it during boot). +The initialization is done by running the 'ssinit' program which is +distributed in the snd-util-3.0.tar.gz package. You have to edit two +defines in the ssinit.c and then compile the program. You may run ssinit +manually (after each boot) or add it to /etc/rc.d/rc.local. + +The ssinit program needs the microcode file that comes with the DOS/Windows +driver of the card. You will need to use version 1.30.00 or later +of the microcode file (sndscape.co0 or sndscape.co1 depending on +your card model). THE OLD sndscape.cod WILL NOT WORK. IT WILL HANG YOUR +MACHINE. The only way to get the new microcode file is to download +and install the DOS/Windows driver from ftp://ftp.ensoniq.com/pub. + +Then you have to select the proper microcode file to use: soundscape.co0 +is the right one for most cards and sndscape.co1 is for few (older) cards +made by Reveal and/or Spea. The driver has capability to detect the card +version during boot. Look at the boot log messages in /var/adm/messages +and locate the sound driver initialization message for the SoundScape +card. If the driver displays string , you have +an old card and you will need to use sndscape.co1. For other cards use +soundscape.co0. New Soundscape revisions such as Elite and PnP use +code files with higher numbers (.co2, .co3, etc.). + +NOTE! Ensoniq Soundscape VIVO is not compatible with other Soundscape cards. + Currently it's possible to use it in Linux only with OSS/Linux + drivers. + +Check /var/adm/messages after running ssinit. The driver prints +the board version after downloading the microcode file. That version +number must match the number in the name of the microcode file (extension). + +Running ssinit with a wrong version of the sndscape.co? file is not +dangerous as long as you don't try to use a file called sndscape.cod. +If you have initialized the card using a wrong microcode file (sounds +are terrible), just modify ssinit.c to use another microcode file and try +again. It's possible to use an earlier version of sndscape.co[01] but it +may sound weird. + +MAD16 (Pro) and Mozart +---------------------- + +You need to enable just the MAD16 /Mozart support when configuring +the driver. _Don't_ enable SB, MPU401 or MSS. However you will need the +/dev/audio, /dev/sequencer and MIDI supports. + +Mozart and OPTi 82C928 (the original MAD16) chips don't support +MPU401 mode so enter just 0 when the configuration program asks the +MPU/MIDI I/O base. The MAD16 Pro (OPTi 82C929) and 82C930 chips have MPU401 +mode. + +TB Tropez is based on the 82C929 chip. It has two MIDI ports. +The one connected to the MAD16 chip is the second one (there is a second +MIDI connector/pins somewhere??). If you have not connected the second MIDI +port, just disable the MIDI port of MAD16. The 'Maui' compatible synth of +Tropez is jumper configurable and not connected to the MAD16 chip (the +Maui driver can be used with it). + +Some MAD16 based cards may cause feedback, whistle or terrible noise if the +line3 mixer channel is turned too high. This happens at least with Shuttle +Sound System. Current driver versions set volume of line3 low enough so +this should not be a problem. + +If you have a MAD16 card which have an OPL4 (FM + Wave table) synthesizer +chip (_not_ an OPL3), you have to append a line containing #define MAD16_OPL4 +to the file linux/drivers/sound/local.h (after running make config). + +MAD16 cards having a CS4231 codec support full duplex mode. This mode +can be enabled by configuring the card to use two DMA channels. Possible +DMA channel pairs are: 0&1, 1&0 and 3&0. + +NOTE! Cards having an OPTi 82C924/82C925 chip work with OSS/Free only in +non-PnP mode (usually jumper selectable). The PnP mode is supported only +by OSS/Linux. + +MV Jazz (ProSonic) +------------------ + +The Jazz16 driver is just a hack made to the SB Pro driver. However it works +fairly well. You have to enable SB, SB Pro (_not_ SB16) and MPU401 supports +when configuring the driver. The configuration program asks later if you +want support for MV Jazz16 based cards (after asking SB base address). Answer +'y' here and the driver asks the second (16 bit) DMA channel. + +The Jazz16 driver uses the MPU401 driver in a way which will cause +problems if you have another MPU401 compatible card. In this case you must +give address of the Jazz16 based MPU401 interface when the config +program prompts for the MPU401 information. Then look at the MPU401 +specific section for instructions about configuring more than one MPU401 cards. + +Logitech Soundman Wave +---------------------- + +Read the above MV Jazz specific instructions first. + +The Logitech SoundMan Wave (don't confuse this with the SM16 or SM Games) is +a MV Jazz based card which has an additional OPL4 based wave table +synthesizer. The OPL4 chip is handled by an on board microcontroller +which must be initialized during boot. The config program asks if +you have a SM Wave immediately after asking the second DMA channel of jazz16. +If you answer 'y', the config program will ask name of the file containing +code to be loaded to the microcontroller. The file is usually called +MIDI0001.BIN and it's located in the DOS/Windows driver directory. The file +may also be called as TSUNAMI.BIN or something else (older cards?). + +The OPL4 synth will be inaccessible without loading the microcontroller code. + +Also remember to enable SB MPU401 support if you want to use the OPL4 mode. +(Don't enable the 'normal' MPU401 device as with some earlier driver +versions (pre 3.5-alpha8)). + +NOTE! Don't answer 'y' when the driver asks about SM Games support + (the next question after the MIDI0001.BIN name). However + answering 'y' doesn't cause damage your computer so don't panic. + +Sound Galaxies +-------------- + +There are many different Sound Galaxy cards made by Aztech. The 8 bit +ones are fully SB or SB Pro compatible and there should be no problems +with them. + +The older 16 bit cards (SG Pro16, SG NX Pro16, Nova and Lyra) have +an EEPROM chip for storing the configuration data. There is a microcontroller +which initializes the card to match the EEPROM settings when the machine +is powered on. These cards actually behave just like they have jumpers +for all of the settings. Configure driver for MSS, MPU, SB/SB Pro and OPL3 +supports with these cards. + +There are some new Sound Galaxies in the market. I have no experience with +them so read the card's manual carefully. + +ESS ES1688 and ES688 'AudioDrive' based cards +--------------------------------------------- + +Support for these two ESS chips is embedded in the SB driver. +Configure these cards just like SB. Enable the 'SB MPU401 MIDI port' +if you want to use MIDI features of ES1688. ES688 doesn't have MPU mode +so you don't need to enable it (the driver uses normal SB MIDI automatically +with ES688). + +NOTE! ESS cards are not compatible with MSS/WSS so don't worry if MSS support +of OSS doesn't work with it. + +There are some ES1688/688 based sound cards and (particularily) motherboards +which use software configurable I/O port relocation feature of the chip. +This ESS proprietary feature is supported only by OSS/Linux. + +There are ES1688 based cards which use different interrupt pin assignment than +recommended by ESS (5, 7, 9/2 and 10). In this case all IRQ's don't work. +At least a card called (Pearl?) Hypersound 16 supports IRQ15 but it doesn't +work. + +ES1868 is a PnP chip which is (supposed to be) compatible with ESS1688 +brobably works with OSS/Free after initialization using isapnptools. + +Reveal cards +------------ + +There are several different cards made/marketed by Reveal. Some of them +are compatible with SoundScape and some use the MAD16 chip. You may have +to look at the card and try to identify its origin. + +Diamond +------- + +The oldest (Sierra Aria based) sound cards made by Diamond are not supported +(they may work if the card is initialized using DOS). The recent (LX?) +models are based on the MAD16 chip which is supported by the driver. + +Audio Excel DSP16 +----------------- + +Support for this card is currently not functional. A new driver for it +should be available later this year. + +PCMCIA cards +------------ + +Sorry, can't help. Some cards may work and some don't. + +TI TM4000M notebooks +-------------------- + +These computers have a built in sound support based on the Jazz chipset. +Look at the instructions for MV Jazz (above). It's also important to note +that there is something wrong with the mouse port and sound at least on +some TM models. Don't enable the "C&T 82C710 mouse port support" when +configuring Linux. Having it enabled is likely to cause mysterious problems +and kernel failures when sound is used. + +miroSOUND +--------- + +The miroSOUND PCM12 has been used successfully. This card is based on +the MAD16, OPL4, and CS4231A chips and everything said in the section +about MAD16 cards applies here, too. The only major difference between +the PCM12 and other MAD16 cards is that instead of the mixer in the +CS4231 codec a separate mixer controlled by an on-board 80C32 +microcontroller is used. Control of the mixer takes place via the ACI +(miro's audio control interface) protocol that is implemented in a +separate lowlevel driver. Make sure you compile this ACI driver +together with the normal MAD16 support when you use a miroSOUND PCM12 +card. The ACI mixer is controlled by /dev/mixer and the CS4231 mixer +by /dev/mixer2. You usually don't want to change anything on the +CS4231 mixer. + +The miroSOUND PCM12 is capable of full duplex operation (simultaneous +PCM replay and recording), which allows you to implement nice +real-time signal processing audio effect software and network +telephones. The ACI mixer has to be configured into a special "solo" +mode for duplex operation in order to avoid feedback caused by the +mixer (input hears output signal). See lowlevel/aci.c for details on +the ioctl() for activating the "solo" mode. + +The following configuration parameters have worked fine for the PCM12 +in Markus Kuhn's system, many other configurations might work, too: +CONFIG_MAD16_BASE=0x530, CONFIG_MAD16_IRQ=11, CONFIG_MAD16_DMA=3, +CONFIG_MAD16_DMA2=0, CONFIG_MAD16_MPU_BASE=0x330, CONFIG_MAD16_MPU_IRQ=10, +DSP_BUFFSIZE=65536, SELECTED_SOUND_OPTIONS=0x00281000. + +The miroSOUND PCM1 pro and the PCM20 are very similar to the PCM12. +Perhaps the same ACI driver also works for these cards, however this +has never actually been tested. The PCM20 contains a radio tuner, +which is also controlled by ACI. This radio tuner is currently not +supported by the ACI driver, but documentation for it was provided by +miro and ACI tuner support could easily be added if someone is really +interested. + +Compaq Deskpro XL +----------------- + +The builtin sound hardware of Compaq Deskpro XL is now supported. +You need to configure the driver with MSS and OPL3 supports enabled. +In addition you need to manually edit linux/drivers/sound/local.h and +to add a line containing "#define DESKPROXL" if you used +make menuconfig/xconfig. + +Others? +------- + +Since there are so many different sound cards, it's likely that I have +forgotten to mention many of them. Please inform me if you know yet another +card which works with Linux, please inform me (or is anybody else +willing to maintain a database of supported cards (just like in XF86)?). + +Cards not supported yet +======================= + +Please check the version of sound driver you are using before +complaining that your card is not supported. It's possible you are +using a driver version which was released months before your card was +introduced. The driver's release date is listed after its version number in a +"cat /dev/sndstat" printout and in the file linux/drivers/sound/soundvers.h. + +First of all, there is an easy way to make most sound cards work with Linux. +Just use the DOS based driver to initialize the card to a known state, then use +loadlin.exe to boot Linux. If Linux is configured to use the same I/O, IRQ and +DMA numbers as DOS, the card could work. +(ctrl-alt-del can be used in place of loadlin.exe but it doesn't work with +new motherboards). This method works also with all/most PnP sound cards. + +Don't get fooled with SB compatibility. Most cards are compatible with +SB but that may require a TSR which is not possible with Linux. If +the card is compatible with MSS, it's a better choice. Some cards +don't work in the SB and MSS modes at the same time. + +Then there are cards which are no longer manufactured and/or which +are relatively rarely used (such as the 8 bit ProAudioSpectrum +models). It's extremely unlikely that such cards ever get supported. +Adding support for a new card requires much work and increases time +required in maintaining the driver (some changes need to be done +to all low level drivers and be tested too, maybe with multiple +operating systems). For this reason I have made a decision to not support +obsolete cards. It's possible that someone else makes a separately +distributed driver (diffs) for the card. + +Writing a driver for a new card is not possible if there are no +programming information available about the card. If you don't +find your new card from this file, look from the home page +(http://www.opensound.com/ossfree). Then please contact +manufacturer of the card and ask if they have (or are willing to) +released technical details of the card. Do this before contacting me. I +can only answer 'no' if there are no programming information available. + +I have made decision to not accept code based on reverse engineering +to the driver. There are three main reasons: First I don't want to break +relationships to sound card manufacturers. The second reason is that +maintaining and supporting a driver without any specs will be a pain. +The third reason is that companies have freedom to refuse selling their +products to other than Windows users. + +Some companies don't give low level technical information about their +products to public or at least their require signing a NDA. It's not +possible to implement a freeware driver for them. However it's possible +that support for such cards become available in the commercial version +of this driver (see http://www.4Front-tech.com/oss.html for more info). + +There are some common audio chipsets that are not supported yet. For example +Sierra Aria and IBM Mwave. It's possible that these architectures +get some support in future but I can't make any promises. Just look +at the home page (http://www.opensound.com/ossfree/new_cards.html) +for latest info. + +Information about unsupported sound cards and chipsets is welcome as well +as free copies of sound cards, SDKs and operating systems. + +If you have any corrections and/or comments, please contact me. + +Hannu Savolainen +hannu@opensound.com + +Personal home page: http://www.compusonic.fi/~hannu +home page of OSS/Free: http://www.opensound.com/ossfree + +home page of commercial OSS +(Open Sound System) drivers: http://www.opensound.com/oss.html diff -ur --new-file old/linux/Documentation/sound/README.awe new/linux/Documentation/sound/README.awe --- old/linux/Documentation/sound/README.awe Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/sound/README.awe Wed Dec 16 21:52:00 1998 @@ -0,0 +1,219 @@ +================================================================ + AWE32 Sound Driver for Linux / FreeBSD + version 0.4.3; Nov. 1, 1998 + + Takashi Iwai +================================================================ + +* GENERAL NOTES + +This is a sound driver extension for SoundBlaster AWE32 and other +compatible cards (AWE32-PnP, SB32, SB32-PnP, AWE64 & etc) to enable +the wave synth operations. The driver is provided for both Linux +1.2.x and 2.[01].x kernels, and also FreeBSD, on Intel x86 and DEC +Alpha systems. + +This driver was written by Takashi Iwai , +and provided "as is". The original source (awedrv-0.4.3.tar.gz) and +binary packages are available on the following URL: + http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/ +Note that since the author is apart from this web site, the update is +not frequent now. + + +* NOTE TO LINUX USERS + +To enable this driver on linux-2.[01].x kernels, you need turn on both +"lowlevel drivers support" and "AWE32 synth support" options in sound +menu when configure your linux kernel and modules. The precise +installation procedure is described in the AWE64-Mini-HOWTO and +linux-kernel/Documetation/sound/AWE32. + +If you're using PnP cards, the card must be initialized before loading +the sound driver. There're several options to do this: + - Initialize the card via ISA PnP tools, and load the sound module. + - Initialize the card on DOS, and load linux by loadlin.exe + - Use PnP kernel driver (for Linux-2.x.x) +The detailed instruction for the solution using isapnp tools is found +in many documents like above. A brief instruction is also included in +the installation document of this package. +For PnP driver project, please refer to the following URL: + http://www-jcr.lmh.ox.ac.uk/~pnp/ + + +* USING THE DRIVER + +The awedrv has several different playing modes to realize easy channel +allocation for MIDI songs. To hear the exact sound quality, you need +to obtain the extended sequencer program, drvmidi or playmidi-2.5. + +For playing MIDI files, you *MUST* load the soundfont file on the +driver previously by sfxload utility. Otherwise you'll here no sounds +at all! All the utilities and driver source packages are found in the +above URL. The sfxload program is included in the package +awesfx-0.4.3.tgz. Binary packages are available there, too. See the +instruction in each package for installation. + +Loading a soundfont file is very simple. Just execute the command + + % sfxload synthgm.sbk + +Then, sfxload transfers the file "synthgm.sbk" to the driver. +Both SF1 and SF2 formats are accepted. + +Now you can hear midi musics by a midi player. + + % drvmidi foo.mid + +If you run MIDI player after MOD player, you need to load soundfont +files again, since MOD player programs clear the previous loaded +samples by their own data. + +If you have only 512kb on the sound card, I recommend to use dynamic +sample loading via -L option of drvmidi. 2MB GM/GS soundfont file is +available in most midi files. + + % sfxload synthgm + % drvmidi -L 2mbgmgs foo.mid + +This makes a big differece (believe me)! For more details, please +refer to the FAQ list which is available on the URL above. + +The current chorus, reverb and equalizer status can be changed by +aweset utility program (included in awesfx package). Note that +some awedrv-native programs (like drvmidi and xmp) will change the +current settings by themselves. The aweset program is effective +only for other programs like playmidi. + +Enjoy. + + +* COMPILE FLAGS + +Compile conditions are defined in awe_config.h. + +[Compatibility Conditions] +The following flags are defined automatically when using installation +shell script. + +- AWE_MODULE_SUPPORT + indicates your linux kernel supports module for each soundcard + (in recent 2.1 kernels and unofficial patched 2.0 kernels as + distributed in the RH5.0 package). + This flag is automatically set when you're using 2.1.x kernels. + You can pass the base address and memory size via the following + module options, + io = base I/O port address (eg. 0x620) + memsize = DRAM size in Kbyes (eg. 512) + As default, AWE driver probes these values automatically. + + +[Hardware Conditions] +You DON'T have to define the following two values. +Define them only when the driver couldn't detect the card properly. + +- AWE_DEFAULT_BASE_ADDR (default: not defined) + specifies the base port address of your AWE32 card. + 0 means to autodetect the address. + +- AWE_DEFAULT_MEM_SIZE (default: not defined) + specifies the memory size of your AWE32 card in kilo bytes. + -1 means to autodetect its size. + + +[Sample Table Size] +From ver.0.4.0, sample tables are allocated dynamically (except +Linux-1.2.x system), so you need NOT to touch these parameters. +Linux-1.2.x users may need to increase these values to apropriate size +if larger DRAM is equipped with the soundcard. + +- AWE_MAX_SF_LISTS, AWE_MAX_SAMPLES, AWE_MAX_INFOS + + +[Other Conditions] + +- AWE_ALWAYS_INIT_FM (default: not defined) + indicates the AWE driver always initialize FM passthrough even + without DRAM on board. Emu8000 chip has a restriction for playing + samples on DRAM that at least two channels must be occupied as + passthrough channels. + +- AWE_DEBUG_ON (default: defined) + turns on debuggin messages if defined. + +- AWE_HAS_GUS_COMPATIBILITY (default: defined) + Enables GUS compatibility mode if defined, reading GUS patches and + GUS control commands. Define this option to use GMOD or other + GUS module players. + +- CONFIG_AWE32_MIDIEMU (default: defined) + Adds a MIDI emulation device by Emu8000 wavetable. The emulation + device can be accessed as an external MIDI, and sends the MIDI + control codes directly. XG and GS sysex/NRPN are accepted. + No MIDI input is supported. + +- CONFIG_AWE32_MIXER (default: not defined) + Adds a mixer device for AWE32 bass/treble equalizer control. + You can access this device using /dev/mixer?? (usually mixer01). + +- AWE_USE_NEW_VOLUME_CALC (default: defined) + Use the new method to calculate the volume change as compatible + with DOS/Win drivers. This option can be toggled via aweset + program, or drvmidi player. + +- AWE_CHECK_VTARGET (default: defined) + Check the current volume target value when searching for an + empty channel to allocate a new voice. This is experimentally + implemented in this version. (probably, this option doesn't + affect the sound quality severely...) + +- AWE_ALLOW_SAMPLE_SHARING (default: defined) + Allow sample sharing for differently loaded patches. + This function is available only together with awesfx-0.4.3p3. + Note that this is still an experimantal option. + +- DEF_FM_CHORUS_DEPTH (default: 0x10) + The default strength to be sent to the chorus effect engine. + From 0 to 0xff. Larger numbers may often cause weird sounds. + +- DEF_FM_REVERB_DEPTH (default: 0x10) + The default strength to be sent to the reverb effect engine. + From 0 to 0xff. Larger numbers may often cause weird sounds. + + +* ACKNOWLEDGMENTS + +Thanks to Witold Jachimczyk (witek@xfactor.wpi.edu) for many advices +to programming of AWE32. Many codes are brought from his AWE32-native +MOD player, ALMP. +The port of awedrv to FreeBSD is done by Randall Hopper +(rhh@ct.picker.com). +The new volume calculation routine was derived from Mark Weaver's +ADIP compatible routines. +I also thank linux-awe-ml members for their efforts +to reboot their system many times :-) + + +* TODO'S + +- Complete DOS/Win compatibility +- DSP-like output + + +* COPYRIGHT + +Copyright (C) 1996-1998 Takashi Iwai + +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., 675 Mass Ave, Cambridge, MA 02139, USA. diff -ur --new-file old/linux/Documentation/sound/README.modules new/linux/Documentation/sound/README.modules --- old/linux/Documentation/sound/README.modules Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/sound/README.modules Mon Jan 18 03:23:01 1999 @@ -0,0 +1,99 @@ +Building a modular sound driver +================================ + + The following information is current as of linux-2.1.85. Check the other +readme files, especially README.OSS, for information not specific to +making sound modular. + + First, configure your kernel. This is an idea of what you should be +setting in the sound section: + + Sound card support + + 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support + + I have SoundBlaster. Select your card from the list. + + Generic OPL2/OPL3 FM synthesizer support + FM synthesizer (YM3812/OPL-3) support + + If you don't set these, you will probably find you can play .wav files +but not .midi. As the help for them says, set them unless you know your +card does not use one of these chips for FM support. + + Once you are configured, make zlilo, modules, modules_install; reboot. +Note that it is no longer necessary or possible to configure sound in the +drivers/sound dir. Now one simply configures and makes one's kernel and +modules in the usual way. + + Then, add to your /etc/modules.conf or /etc/conf.modules something like: + +alias char-major-14 sb +post-install sb /sbin/modprobe "-k" "adlib_card" +options sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 +options adlib_card io=0x388 # FM synthesizer + + The effect of this is that the sound driver and all necessary bits and +pieces autoload on demand, assuming you use kerneld (a sound choice) and +autoclean when not in use. Also, options for the device drivers are +set. They will not work without them. Change as appropriate for your card. +If you are not yet using the very cool kerneld, you will have to "modprobe +-k sb" yourself to get things going. Eventually things may be fixed so +that this kludgery is not necessary; for the time being, it seems to work +well. + + Replace 'sb' with the driver for your card, and give it the right +options. To find the filename of the driver, look in +/lib/modules//misc. Mine looks like: + +adlib_card.o # This is the generic OPLx driver +opl3.o # The OPL3 driver +sb.o # <> +sound.o # The sound driver +uart401.o # Used by sb, maybe other cards + + Whichever card you have, try feeding it the options that would be the +default if you were making the driver wired, not as modules. You can look +at the init_module() code for the card to see what args are expected. + + Note that at present there is no way to configure the io, irq and other +parameters for the modular drivers as one does for the wired drivers.. One +needs to pass the modules the necessary parameters as arguments, either +with /etc/modules.conf or with command-line args to modprobe, e.g. + +modprobe -k sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 +modprobe -k adlib_card io=0x388 + + recommend using /etc/modules.conf. + +Persistent DMA Buffers: + +The sound modules normally allocate DMA buffers during open() and +deallocate them during close(). Linux can often have problems allocating +DMA buffers for ISA cards on machines with more than 16MB RAM. This is +because ISA DMA buffers must exist below the 16MB boundry and it is quite +possible that we can't find a large enough free block in this region after +the machine has been running for any amount of time. The way to avoid this +problem is to allocate the DMA buffers during module load and deallocate +them when the module is unloaded. For this to be effective we need to load +the sound modules right after the kernel boots, either manually or by an +init script, and keep them around until we shut down. This is a little +wasteful of RAM, but it guarantees that sound always works. + +To make the sound driver use persistent DMA buffers we need to pass the +sound.o module a "dmabuf=1" command-line argument. This is normally done +in /etc/conf.modules (or the more proper /etc/modules.conf) like so: + +options sound dmabuf=1 + +If you have 16MB or less RAM or a PCI sound card, this is wasteful and +unnecessary. It is possible that machine with 16MB or less RAM will find +this option useful, but if your machine is so memory-starved that it +cannot find a 64K block free, you will be wasting even more RAM by keeping +the sound modules loaded and the DMA buffers allocated when they are not +needed. The proper solution is to upgrade your RAM. But you do also have +this improper solution as well. Use it wisely. + + I'm afraid I know nothing about anything but my setup, being more of a +text-mode guy anyway. If you have options for other cards or other helpful +hints, send them to me, Jim Bray, jb@as220.org, http://as220.org/jb. diff -ur --new-file old/linux/Documentation/sound/VIA-chipset new/linux/Documentation/sound/VIA-chipset --- old/linux/Documentation/sound/VIA-chipset Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/sound/VIA-chipset Sun Jan 10 04:16:43 1999 @@ -0,0 +1,43 @@ +Running sound cards on VIA chipsets + +o There are problems with VIA chipsets and sound cards that appear to + lock the hardware solidly. Test programs under DOS have verified the + problem exists on at least some (but apparently not all) VIA boards + +o VIA have so far failed to bother to answer support mail on the subject + so if you are a VIA engineer feeling aggrieved as you read this + document go chase your own people. If there is a workaround please + let us know so we can implement it. + + +Certain patterns of ISA DMA access used for most PC sound cards cause the +VIA chipsets to lock up. From the collected reports this appears to cover a +wide range of boards. Some also lock up with sound cards under Win* as well. + +Linux implements a workaround providing your chipset is PCI and you compiled +with PCI Quirks enabled. If so you will see a message + "Activating ISA DMA bug workarounds" + +during booting. If you have a VIA PCI chipset that hangs when you use the +sound and is not generating this message even with PCI quirks enabled +please report the information to the linux-kernel list (see REPORTING-BUGS). + +If you are one of the tiny number of unfortunates with a 486 ISA/VLB VIA +chipset board you need to do the following to build a special kernel for +your board + + edit linux/include/asm-i386/dma.h + +change + +#define isa_dma_bridge_buggy (0) + +to + +#define isa_dma_bridge_buggy (1) + +and rebuild a kernel without PCI quirk support. + + +Other than this particular glitch the VIA [M]VP* chipsets appear to work +perfectly with Linux. diff -ur --new-file old/linux/Documentation/specialix.txt new/linux/Documentation/specialix.txt --- old/linux/Documentation/specialix.txt Tue Apr 28 23:22:04 1998 +++ new/linux/Documentation/specialix.txt Thu Oct 29 07:04:05 1998 @@ -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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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,10 +306,20 @@ 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 -ur --new-file old/linux/Documentation/sysctl/README new/linux/Documentation/sysctl/README --- old/linux/Documentation/sysctl/README Wed Jun 24 23:30:07 1998 +++ new/linux/Documentation/sysctl/README Thu Jan 7 17:41:55 1999 @@ -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 'Why', I hear you ask, 'would anyone even _want_ documentation @@ -12,6 +12,9 @@ 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 +... + ============================================================== Legal blurb: @@ -58,9 +61,9 @@ debug/ dev/ device specific information (eg dev/cdrom/info) fs/ specific filesystems + filehandle, inode, dentry and quota tuning binfmt_misc kernel/ global kernel info / tuning - open file / inode tuning miscellaneous stuff net/ networking stuff, for documentation look in: diff -ur --new-file old/linux/Documentation/sysctl/fs.txt new/linux/Documentation/sysctl/fs.txt --- old/linux/Documentation/sysctl/fs.txt Thu Jan 1 01:00:00 1970 +++ new/linux/Documentation/sysctl/fs.txt Fri Nov 13 19:07:26 1998 @@ -0,0 +1,116 @@ +Documentation for /proc/sys/fs/* kernel version 2.1.128 + (c) 1998, Rik van Riel + +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 -ur --new-file old/linux/Documentation/sysctl/kernel.txt new/linux/Documentation/sysctl/kernel.txt --- old/linux/Documentation/sysctl/kernel.txt Wed Jun 24 23:30:07 1998 +++ new/linux/Documentation/sysctl/kernel.txt Thu Dec 31 20:55:19 1998 @@ -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 For general info and legal blurb, please look in README. @@ -14,25 +14,45 @@ 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) ] +- shmmax [ sysv ipc ] - 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 % accounting suspends. If free space gets +above % accounting resumes. 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 +71,6 @@ ============================================================== -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 +82,12 @@ ============================================================== -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 +115,13 @@ ============================================================== +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 +147,39 @@ ============================================================== -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 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. -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. +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) +shmmax: -??? 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. ??? +This value can be used to query and set the run time limit +on the maximum shared memory segment size that can be created. +Shared memory segments up to 1Gb are now supported in the +kernel. This value defaults to SHMMAX. + +============================================================== + +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 -ur --new-file old/linux/Documentation/sysctl/vm.txt new/linux/Documentation/sysctl/vm.txt --- old/linux/Documentation/sysctl/vm.txt Wed Jun 24 23:30:07 1998 +++ new/linux/Documentation/sysctl/vm.txt Fri Nov 13 19:07:26 1998 @@ -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 For general info and legal blurb, please look in README. @@ -20,8 +20,8 @@ - kswapd - overcommit_memory - pagecache +- pagetable_cache - swapctl -- swapout_interval ============================================================== @@ -56,7 +56,7 @@ } 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 @@ 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 @@ 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 @@ 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 @@ ============================================================== +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 @@ 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 -ur --new-file old/linux/Documentation/video4linux/API.html new/linux/Documentation/video4linux/API.html --- old/linux/Documentation/video4linux/API.html Sun Aug 23 22:32:25 1998 +++ new/linux/Documentation/video4linux/API.html Thu Jan 7 17:41:55 1999 @@ -314,7 +314,7 @@ To use the mmap interface a user first sets the desired image size and depth properties. Next the VIDIOCGMBUF ioctl is issued. This reports the size of buffer to mmap and the offset within the buffer for each frame. The -number of frames supported is device dependant and may only be one. +number of frames supported is device dependent and may only be one.

The video_mbuf structure contains the following fields

diff -ur --new-file old/linux/Documentation/video4linux/bttv/CARDS new/linux/Documentation/video4linux/bttv/CARDS --- old/linux/Documentation/video4linux/bttv/CARDS Sun Aug 23 22:32:25 1998 +++ new/linux/Documentation/video4linux/bttv/CARDS Wed Dec 16 21:53:13 1998 @@ -90,15 +90,14 @@ AverMedia --------- - ... +ADS Channel Surfer +------------------ +... - - - - - - +Maxi TV Video PCI 2 card +------------------------ +... diff -ur --new-file old/linux/Documentation/video4linux/bttv/INSTALL new/linux/Documentation/video4linux/bttv/INSTALL --- old/linux/Documentation/video4linux/bttv/INSTALL Sun Aug 23 22:32:25 1998 +++ new/linux/Documentation/video4linux/bttv/INSTALL Sun Nov 8 23:36:46 1998 @@ -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 -ur --new-file old/linux/MAINTAINERS new/linux/MAINTAINERS --- old/linux/MAINTAINERS Tue Oct 20 23:17:45 1998 +++ new/linux/MAINTAINERS Wed Jan 20 22:27:17 1999 @@ -94,9 +94,12 @@ S: Maintained W: http://rsphy1.anu.edu.au/~gpg109/ne2000.html -AEDSP16 DRIVER -P: Riccardo Facchetti -M: fizban@tin.it +AD1816 SOUND DRIVER +P: Thorsten Knabe +M: Thorsten Knabe +M: Thorsten Knabe +W: http://www.student.informatik.tu-darmstadt.de/~tek/projects/linux.html +W: http://www.tu-darmstadt.de/~tek01/projects/linux.html S: Maintained ADVANSYS SCSI DRIVER @@ -105,6 +108,11 @@ W: http://www.advansys.com/linux S: Maintained +AEDSP16 DRIVER +P: Riccardo Facchetti +M: fizban@tin.it +S: Maintained + AHA152X SCSI DRIVER P: Juergen E. Fischer M: Juergen Fischer @@ -162,19 +170,31 @@ W: http://www.dandelion.com/Linux/ S: Maintained +CONFIGURE, MENUCONFIG, XCONFIG +P: Michael Elizabeth Chastain +M: mec@shout.net +L: linux-kbuild@torque.net +S: Maintained + CONFIGURE.HELP P: Axel Boldt M: boldt@math.ucsb.edu S: Maintained +COSA/SRP SYNC SERIAL DRIVER +P: Jan "Yenya" Kasprzak +M: kas@fi.muni.cz +W: http://www.fi.muni.cz/~kas/cosa/ +S: Maintained + CREDITS FILE P: John A. Martin M: jam@acm.org S: Maintained CYCLADES ASYNC MUX DRIVER -P: Marcio Saito -M: Marcio Saito +P: Ivan Passos +M: Ivan Passos W: http://www.cyclades.com/ S: Supported @@ -186,9 +206,17 @@ L: linux-hams@vger.rutgers.edu S: Maintained +DC390/AM53C974 SCSI driver +P: Kurt Garloff +M: kurt@garloff.de +W: http://www.garloff.de/kurt/linux/dc390/ +S: Maintained + DECnet NETWORK LAYER P: Steven Whitehouse M: SteveW@ACM.org +W: http://www.sucs.swan.ac.uk/~rohan/ +W: http://www-sigproc.eng.cam.ac.uk/~sjw44/ L: netdev@roxanne.nuclecu.unam.mx S: Maintained @@ -198,7 +226,7 @@ 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 @@ -271,7 +299,7 @@ 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 @@ -291,7 +319,7 @@ 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 @@ -321,15 +349,21 @@ M: perex@jcu.cz S: Maintained +IBM MCA SCSI SUBSYSTEM DRIVER +P: Michael Lang +M: langa2@kph.uni-mainz.de +W: http://www.uni-mainz.de/~langm000/linux.html +S: Maintained + IDE DRIVER [GENERAL] -P: Mark Lord -M: mlord@pobox.com +P: Andre Hedrick +M: hedrick@astro.dyer.vanderbilt.edu L: linux-kernel@vger.rutgers.edu -S: Odd Fixes +S: Maintained IDE/ATAPI CDROM DRIVER -P: Erik Andersen -M: andersee@debian.org +P: Jens Axboe +M: axboe@image.dk L: linux-kernel@vger.rutgers.edu S: Maintained @@ -342,7 +376,7 @@ IP FIREWALL P: Paul Russell M: Paul.Russell@rustcorp.com.au -W: http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html +W: http://www.rustcorp.com/linux/ipchains S: Supported IPX/SPX NETWORK LAYER @@ -351,6 +385,13 @@ L: linux-net@vger.rutgers.edu S: Maintained +IRDA SUBSYSTEM +P: Dag Brattli +M: Dag Brattli +L: linux-irda@list.uit.no +W: http://www.cs.uit.no/~dagb/irda/ +S: Maintained + ISDN SUBSYSTEM P: Fritz Elfert M: fritz@wuemaus.franken.de @@ -370,6 +411,13 @@ L: autofs@linux.kernel.org S: Maintained +KERNEL NFSD +P: G. Allen Morris III +M: gam3@acm.org +L: nfs-devel@linux.kernel.org (Linux NFS) +W: http://csua.berkeley.edu/~gam3/knfsd +S: Maintained + LAPB module P: Henner Eisen M: eis@baty.hanse.de @@ -379,7 +427,7 @@ 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 @@ -388,14 +436,14 @@ 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 @@ -408,19 +456,20 @@ 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 @@ -433,16 +482,23 @@ L: linux-kernel@vger.rutgers.edu S: Maintained +MTRR AND SIMILAR SUPPORT [i386] +P: Richard Gooch +M: rgooch@atnf.csiro.au +L: linux-kernel@vger.rutgers.edu +W: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html +S: Maintained + MULTISOUND SOUND DRIVER P: Andrew Veliath M: andrewtv@usa.net S: Maintained -NCP FILESYSTEM: +NCP FILESYSTEM P: Petr Vandrovec M: vandrove@vc.cvut.cz P: Volker Lendecke -M: lendecke@Math.Uni-Goettingen.de +M: vl@kki.org L: linware@sh.cvut.cz S: Maintained @@ -457,18 +513,18 @@ 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 -M: Eric.Schenk@dna.lth.se +M: davem@dm.cobaltmicro.com +P: Andi Kleen +M: ak@muc.de P: Alexey Kuznetsov M: kuznet@ms2.inr.ac.ru L: netdev@roxanne.nuclecu.unam.mx @@ -487,6 +543,12 @@ L: linux-kernel@vger.rutgers.edu S: Maintained +OPL3-SA2, SA3, and SAx DRIVER +P: Scott Murray +M: scottm@interlog.com +L: linux-sound@vger.rutgers.edu +S: Maintained + PARALLEL PORT SUPPORT P: Phil Blundell M: Philip.Blundell@pobox.com @@ -557,7 +619,7 @@ L: linux-hams@vger.rutgers.edu S: Maintained -RISCOM8 DRIVER: +RISCOM8 DRIVER P: Dmitry Gorodchanin M: pgmdsg@ibi.com L: linux-kernel@vger.rutgers.edu @@ -579,9 +641,16 @@ L: linux-scsi@vger.rutgers.edu S: Maintained -SMB FILESYSTEM: +SGI VISUAL WORKSTATION 320 AND 540 +P: Bent Hagemark +M: bh@sgi.com +P: Ingo Molnar +M: mingo@redhat.com +S: Maintained + +SMB FILESYSTEM P: Volker Lendecke -M: lendecke@Math.Uni-Goettingen.de +M: vl@kki.org L: samba@listproc.anu.edu.au S: Maintained @@ -634,7 +703,7 @@ 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 @@ -653,7 +722,7 @@ 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 @@ -671,8 +740,8 @@ S: Maintained UNIFORM CDROM DRIVER -P: Erik Andersen -M: andersee@debian.org +P: Jens Axboe +M: axboe@image.dk L: linux-kernel@vger.rutgers.edu S: Maintained @@ -727,6 +796,6 @@ L: linux-hams@vger.rutgers.edu S: Maintained -REST: +THE REST P: Linus Torvalds S: Buried alive in diapers diff -ur --new-file old/linux/Makefile new/linux/Makefile --- old/linux/Makefile Tue Feb 9 18:59:29 1999 +++ new/linux/Makefile Tue Feb 9 19:00:17 1999 @@ -1,18 +1,10 @@ VERSION = 2 -PATCHLEVEL = 1 -SUBLEVEL = 126 +PATCHLEVEL = 2 +SUBLEVEL = 1 +EXTRAVERSION = ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) -# -# For SMP kernels, set this. We don't want to have this in the config file -# because it makes re-config very ugly and too many fundamental files depend -# on "CONFIG_SMP" -# -# For UP operations COMMENT THIS OUT, simply setting SMP = 0 won't work -# -SMP = 1 - .EXPORT_ALL_VARIABLES: CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ @@ -67,6 +59,8 @@ ROOT_DEV = CURRENT +KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) + # # INSTALL_PATH specifies where to place the updated kernel and system map # images. Uncomment if you want to place them anywhere other than root. @@ -94,7 +88,7 @@ CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -ifdef SMP +ifdef CONFIG_SMP CFLAGS += -D__SMP__ AFLAGS += -D__SMP__ endif @@ -184,6 +178,18 @@ DRIVERS := $(DRIVERS) drivers/net/hamradio/hamradio.a endif +ifeq ($(CONFIG_USB),y) +DRIVERS := $(DRIVERS) drivers/uusbd/usb.a +endif + +ifeq ($(CONFIG_I2O),y) +DRIVERS := $(DRIVERS) drivers/i2o/i2o.a +endif + +ifeq ($(CONFIG_IRDA),y) +DRIVERS := $(DRIVERS) drivers/net/irda/irda_drivers.a +endif + include arch/$(ARCH)/Makefile .S.s: @@ -199,11 +205,13 @@ vmlinux: $(CONFIGURATION) init/main.o init/version.o linuxsubdirs $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \ + --start-group \ $(CORE_FILES) \ $(FILESYSTEMS) \ $(NETWORKS) \ $(DRIVERS) \ $(LIBS) \ + --end-group \ -o vmlinux $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aU] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map @@ -260,7 +268,7 @@ include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion @echo -n \#define UTS_VERSION \"\#`cat .version` > .ver - @if [ -n "$(SMP)" ] ; then echo -n " SMP" >> .ver; fi + @if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver; fi @if [ -f .name ]; then echo -n \-`cat .name` >> .ver; fi @echo ' '`date`'"' >> .ver @echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver @@ -273,11 +281,11 @@ else \ echo \#define LINUX_COMPILE_DOMAIN ; \ fi >> .ver - @echo \#define LINUX_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" >> .ver + @echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver @mv -f .ver $@ include/linux/version.h: ./Makefile - @echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > .ver + @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver @echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver @mv -f .ver $@ @@ -304,13 +312,14 @@ modules_install: @( \ - MODLIB=$(INSTALL_MOD_PATH)/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL); \ + MODLIB=$(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE); \ cd modules; \ MODULES=""; \ inst_mod() { These="`cat $$1`"; MODULES="$$MODULES $$These"; \ mkdir -p $$MODLIB/$$2; cp $$These $$MODLIB/$$2; \ echo Installing modules under $$MODLIB/$$2; \ }; \ + mkdir -p $$MODLIB; \ \ if [ -f BLOCK_MODULES ]; then inst_mod BLOCK_MODULES block; fi; \ if [ -f NET_MODULES ]; then inst_mod NET_MODULES net; fi; \ @@ -325,6 +334,7 @@ if [ -f SOUND_MODULES ]; then inst_mod SOUND_MODULES sound; fi; \ if [ -f VIDEO_MODULES ]; then inst_mod VIDEO_MODULES video; fi; \ if [ -f FC4_MODULES ]; then inst_mod FC4_MODULES fc4; fi; \ + if [ -f IRDA_MODULES ]; then inst_mod IRDA_MODULES net; fi; \ \ ls *.o > $$MODLIB/.allmods; \ echo $$MODULES | tr ' ' '\n' | sort | comm -23 $$MODLIB/.allmods - > $$MODLIB/.misc; \ @@ -407,8 +417,12 @@ depend dep: dep-files $(MODVERFILE) +# make checkconfig: Prune 'scripts' directory to avoid "false positives". checkconfig: - perl -w scripts/checkconfig.pl `find * -name '*.[hcS]' -print | sort` + perl -w scripts/checkconfig.pl `find * -path 'scripts' -prune -o -name '*.[hcS]' -print | sort` + +checkhelp: + perl -w scripts/checkhelp.pl `find * -name [cC]onfig.in -print` ifdef CONFIGURATION ..$(CONFIGURATION): diff -ur --new-file old/linux/README new/linux/README --- old/linux/README Sat Oct 10 19:30:35 1998 +++ new/linux/README Thu Jan 7 17:41:55 1999 @@ -1,23 +1,9 @@ - Linux kernel release 2.1.xx + Linux kernel release 2.2.xx -These are the release notes for Linux version 2.1. Read them carefully, +These are the release notes for Linux version 2.2. Read them carefully, as they tell you what this is all about, explain how to install the kernel, and what to do if something goes wrong. -Linux version 2.1 is a DEVELOPMENT kernel, and not intended for general -public use. Different releases may have various and sometimes severe -bugs. It is *strongly* recommended that you back up the previous kernel -before installing any new 2.1.xx release. - -If you need to use a proven and stable Linux kernel, please use 1.0.9, -1.2.13, or 2.0.xx. All features which will be in the 2.1.xx releases will -be contained in 2.2.xx when the code base has stabilized again. - -If you decide to use 2.1, it is recommended that you join the kernel mailing -list. To do this, e-mail majordomo@vger.rutgers.edu, and put in the body -of the message "subscribe linux-kernel" or "subscribe linux-kernel-digest" -for a daily digest of the mailing list (it is a high-traffic list.) - However, please make sure you don't ask questions which are already answered in various files in the Documentation directory. See DOCUMENTATION below. @@ -62,12 +48,12 @@ - If you install the full sources, do a cd /usr/src - gzip -cd linux-2.1.XX.tar.gz | tar xfv - + gzip -cd linux-2.2.XX.tar.gz | tar xfv - to get it all put in place. Replace "XX" with the version number of the latest kernel. - - You can also upgrade between 2.1.xx releases by patching. Patches are + - You can also upgrade between 2.2.xx releases by patching. Patches are distributed in the traditional gzip and the new bzip2 format. To install by patching, get all the newer patch files and do @@ -105,7 +91,7 @@ SOFTWARE REQUIREMENTS - Compiling and running the 2.1.x kernels requires up-to-date + Compiling and running the 2.2.x kernels requires up-to-date versions of various software packages. Consult ./Documentation/Changes for the minimum version numbers required and how to get updates for these packages. Beware that using @@ -159,7 +145,7 @@ COMPILING the kernel: - - Make sure you have gcc-2.7.0 or newer available. It seems older gcc + - Make sure you have gcc-2.7.2 or newer available. It seems older gcc versions can have problems compiling newer versions of Linux. This is mainly because the older compilers can only generate "a.out"-format executables. As of Linux 2.1.0, the kernel must be compiled as an diff -ur --new-file old/linux/REPORTING-BUGS new/linux/REPORTING-BUGS --- old/linux/REPORTING-BUGS Thu Jan 1 01:00:00 1970 +++ new/linux/REPORTING-BUGS Fri Jan 15 07:53:02 1999 @@ -0,0 +1,56 @@ +[Some of this is taken from Frohwalt Egerer's original linux-kernel FAQ] + + What follows is a suggested proceedure for reporting Linux bugs. You +aren't obliged to use the bug reporting format, it is provided as a guide +to the kind of information that can be useful to developers - no more. + + If the failure includes an "OOPS:" type message in your log or on +screen please read "Documentation/oops-tracing.txt" before posting your +bug report. This explains what you should do with the "Oops" information +to make it useful to the recipient. + + Send the output the maintainer of the kernel area that seems to +be involved with the problem. Don't worry too much about getting the +wrong person. If you are unsure send it to the person responsible for the +code relevant to what you were doing. If it occurs repeatably try and +describe how to recreate it. That is worth even more than the oops itself. +The list of maintainers is in the MAINTAINERS file in this directory. + + If you are totally stumped as to whom to send the report, send it to +linux-kernel@vger.rutgers.edu. (For more information on the linux-kernel +mailing list see http://www.tux.org/lkml/). + +This is a suggested format for a bug report sent to the Linux kernel mailing +list. Having a standardized bug report form makes it easier for you not to +overlook things, and easier for the developers to find the pieces of +information they're really interested in. + + First run the ver_linux script included as scripts/ver_linux or +at It checks out +the version of some important subsystems. Run it with the commnd +"sh scripts/ver_linux" + +Use that information to fill in all fields of the bug report form, and +post it to the mailing list with a subject of "PROBLEM: " for easy identification by the developers + +[1.] One line summary of the problem: +[2.] Full description of the problem/report: +[3.] Keywords (i.e., modules, networking, kernel): +[4.] Kernel version (from /proc/version): +[5.] Output of Oops.. message (if applicable) with symbolic information + resolved (see Documentation/oops-tracing.txt) +[6.] A small shell script or example program which triggers the + problem (if possible) +[7.] Environment +[7.1.] Software (add the output of the ver_linux script here) +[7.2.] Processor information (from /proc/cpuinfo): +[7.3.] Module information (from /proc/modules): +[7.4.] SCSI information (from /proc/scsi/scsi) +[7.5.] Other information that might be relevant to the problem + (please look in /proc and include all information that you + think to be relevant): +[X.] Other notes, patches, fixes, workarounds: + + +Thank you diff -ur --new-file old/linux/Rules.make new/linux/Rules.make --- old/linux/Rules.make Mon Aug 17 07:41:01 1998 +++ new/linux/Rules.make Fri Dec 18 23:01:48 1998 @@ -197,7 +197,7 @@ # and SMP Intel boxes - AC - from bits by Michael Chastain # -ifdef SMP +ifdef CONFIG_SMP genksyms_smp_prefix := -p smp_ else genksyms_smp_prefix := diff -ur --new-file old/linux/arch/alpha/Makefile new/linux/arch/alpha/Makefile --- old/linux/arch/alpha/Makefile Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/Makefile Mon Jan 25 06:29:52 1999 @@ -19,6 +19,10 @@ # 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) +have_mcpu_pca56 := $(shell if $(CC) -mcpu=pca56 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi) + +have_mcpu_ev6 := $(shell if $(CC) -mcpu=ev6 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi) + # Turn on the proper cpu optimizations. ifeq ($(have_mcpu),y) # If GENERIC, make sure to turn off any instruction set extensions that @@ -31,17 +35,34 @@ 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_PYXIS),y) + CFLAGS := $(CFLAGS) -mcpu=ev56 + endif + ifeq ($(CONFIG_ALPHA_POLARIS),y) + ifeq ($(have_mcpu_pca56),y) + CFLAGS := $(CFLAGS) -mcpu=pca56 + else + CFLAGS := $(CFLAGS) -mcpu=ev56 + endif + endif ifeq ($(CONFIG_ALPHA_EV6),y) - CFLAGS := $(CFLAGS) -mcpu=ev6 + ifeq ($(have_mcpu_ev6),y) + CFLAGS := $(CFLAGS) -mcpu=ev6 + else + ifeq ($(have_mcpu_pca56),y) + CFLAGS := $(CFLAGS) -mcpu=pca56 + else + CFLAGS := $(CFLAGS) -mcpu=ev56 + endif + endif endif endif # For TSUNAMI, we must have the assembler not emulate our instructions. +# The same is true for POLARIS. # BWX is most important, but we don't really want any emulation ever. ifeq ($(old_gas),y) - ifneq ($(CONFIG_ALPHA_GENERIC)$(CONFIG_ALPHA_TSUNAMI),) + ifneq ($(CONFIG_ALPHA_GENERIC)$(CONFIG_ALPHA_TSUNAMI)$(CONFIG_ALPHA_POLARIS),) # How do we do #error in make? CFLAGS := --error-please-upgrade-your-assembler endif @@ -51,6 +72,12 @@ endif ifeq ($(CONFIG_ALPHA_PYXIS),y) CFLAGS := $(CFLAGS) -Wa,-m21164a -DBWIO_ENABLED + endif + ifeq ($(CONFIG_ALPHA_POLARIS),y) + CFLAGS := $(CFLAGS) -Wa,-m21164pc + endif + ifeq ($(CONFIG_ALPHA_TSUNAMI),y) + CFLAGS := $(CFLAGS) -Wa,-mev6 endif endif diff -ur --new-file old/linux/arch/alpha/config.in new/linux/arch/alpha/config.in --- old/linux/arch/alpha/config.in Tue Feb 9 18:59:29 1999 +++ new/linux/arch/alpha/config.in Tue Feb 9 19:00:17 1999 @@ -13,7 +13,6 @@ comment 'Loadable module support' bool 'Enable loadable module support' CONFIG_MODULES if [ "$CONFIG_MODULES" = "y" ]; then - MODULES=y bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS bool 'Kernel module loader' CONFIG_KMOD fi @@ -22,14 +21,6 @@ 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 \ @@ -52,6 +43,7 @@ Platform2000 CONFIG_ALPHA_P2K \ Rawhide CONFIG_ALPHA_RAWHIDE \ Ruffian CONFIG_ALPHA_RUFFIAN \ + RX164 CONFIG_ALPHA_RX164 \ SX164 CONFIG_ALPHA_SX164 \ Sable CONFIG_ALPHA_SABLE \ Takara CONFIG_ALPHA_TAKARA" Generic @@ -60,7 +52,7 @@ unset CONFIG_ALPHA_EV4 CONFIG_ALPHA_EV5 CONFIG_ALPHA_EV6 unset CONFIG_PCI CONFIG_ALPHA_EISA unset CONFIG_ALPHA_LCA CONFIG_ALPHA_APECS CONFIG_ALPHA_CIA -unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS +unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS CONFIG_ALPHA_POLARIS unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA unset CONFIG_ALPHA_NEED_ROUNDING_EMULATION @@ -139,6 +131,12 @@ define_bool CONFIG_ALPHA_EV5 y define_bool CONFIG_ALPHA_MCPCIA y fi +if [ "$CONFIG_ALPHA_RX164" = "y" ] +then + define_bool CONFIG_PCI y + define_bool CONFIG_ALPHA_EV5 y + define_bool CONFIG_ALPHA_POLARIS y +fi if [ "$CONFIG_ALPHA_JENSEN" = "y" ] then define_bool CONFIG_ALPHA_EV4 y @@ -175,6 +173,8 @@ define_bool CONFIG_ALPHA_AVANTI y fi +bool 'Symmetric multi-processing support' CONFIG_SMP + if [ "$CONFIG_PCI" = "y" ]; then bool 'PCI quirks' CONFIG_PCI_QUIRKS if [ "$CONFIG_PCI_QUIRKS" = "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then @@ -257,8 +257,6 @@ source drivers/char/Config.in source fs/Config.in - -source fs/nls/Config.in if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment diff -ur --new-file old/linux/arch/alpha/defconfig new/linux/arch/alpha/defconfig --- old/linux/arch/alpha/defconfig Wed Sep 9 23:06:48 1998 +++ new/linux/arch/alpha/defconfig Wed Dec 23 16:34:11 1998 @@ -42,6 +42,7 @@ # CONFIG_ALPHA_SX164 is not set # CONFIG_ALPHA_SABLE is not set # CONFIG_ALPHA_TAKARA is not set +# CONFIG_SMP is not set CONFIG_PCI=y CONFIG_ALPHA_NEED_ROUNDING_EMULATION=y # CONFIG_PCI_QUIRKS is not set @@ -241,7 +242,6 @@ # 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 -ur --new-file old/linux/arch/alpha/kernel/Makefile new/linux/arch/alpha/kernel/Makefile --- old/linux/arch/alpha/kernel/Makefile Sun Sep 6 19:34:33 1998 +++ new/linux/arch/alpha/kernel/Makefile Sun Jan 10 18:59:54 1999 @@ -23,11 +23,11 @@ ifdef CONFIG_ALPHA_GENERIC O_OBJS += core_apecs.o core_cia.o core_lca.o core_mcpcia.o core_pyxis.o \ - core_t2.o core_tsunami.o \ + core_t2.o core_tsunami.o core_polaris.o \ sys_alcor.o sys_cabriolet.o sys_dp264.o sys_eb64p.o \ sys_jensen.o sys_miata.o sys_mikasa.o sys_noritake.o \ sys_rawhide.o sys_ruffian.o sys_sable.o sys_sio.o \ - sys_sx164.o sys_takara.o \ + sys_sx164.o sys_takara.o sys_rx164.o \ es1888.o smc37c669.o smc37c93x.o else @@ -53,6 +53,9 @@ ifdef CONFIG_ALPHA_TSUNAMI O_OBJS += core_tsunami.o endif +ifdef CONFIG_ALPHA_POLARIS +O_OBJS += core_polaris.o +endif # Board support ifneq ($(CONFIG_ALPHA_ALCOR)$(CONFIG_ALPHA_XLT),) @@ -85,6 +88,9 @@ ifdef CONFIG_ALPHA_RUFFIAN O_OBJS += sys_ruffian.o endif +ifdef CONFIG_ALPHA_RX164 +O_OBJS += sys_rx164.o +endif ifdef CONFIG_ALPHA_SABLE O_OBJS += sys_sable.o endif @@ -111,7 +117,7 @@ endif # GENERIC -ifdef SMP +ifdef CONFIG_SMP O_OBJS += smp.o endif diff -ur --new-file old/linux/arch/alpha/kernel/alpha_ksyms.c new/linux/arch/alpha/kernel/alpha_ksyms.c --- old/linux/arch/alpha/kernel/alpha_ksyms.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/alpha_ksyms.c Sun Jan 17 02:02:50 1999 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -26,6 +27,8 @@ #include #include #include +#include +#include #define __KERNEL_SYSCALLS__ #include @@ -50,6 +53,7 @@ EXPORT_SYMBOL(enable_irq); EXPORT_SYMBOL(disable_irq); EXPORT_SYMBOL(screen_info); +EXPORT_SYMBOL(perf_irq); /* platform dependent support */ EXPORT_SYMBOL(_inb); @@ -83,6 +87,7 @@ EXPORT_SYMBOL(strncat); EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strtok); +EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strchr); EXPORT_SYMBOL(strrchr); EXPORT_SYMBOL(memcmp); @@ -135,6 +140,13 @@ EXPORT_SYMBOL_NOVERS(__do_clear_user); EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strlen_user); + +/* + * The following are specially called from the semaphore assembly stubs. + */ +EXPORT_SYMBOL_NOVERS(__down_failed); +EXPORT_SYMBOL_NOVERS(__down_failed_interruptible); +EXPORT_SYMBOL_NOVERS(__up_wakeup); /* * SMP-specific symbols. diff -ur --new-file old/linux/arch/alpha/kernel/bios32.c new/linux/arch/alpha/kernel/bios32.c --- old/linux/arch/alpha/kernel/bios32.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/bios32.c Tue Dec 1 18:33:59 1998 @@ -296,60 +296,82 @@ * 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 @@ 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 @@ * 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 @@ 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; @@ -582,8 +609,11 @@ } } 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; @@ -596,9 +626,16 @@ * addresses to be used. */ if (type == PCI_BASE_ADDRESS_MEM_TYPE_64) { - pcibios_write_config_dword(bus->number, - dev->devfn, - off+4, 0); + 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; @@ -719,39 +756,55 @@ pcibios_write_config_dword(bridge->bus->number, bridge->devfn, PCI_IO_BASE, l); - /* Also clear out the upper 16 bits. */ + /* + * 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 + * 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, 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, - PCI_PREF_MEMORY_BASE, 0x0000ffff); + PCI_PREF_MEMORY_BASE, l); /* * Tell bridge that there is an ISA bus in the system, * and (possibly) a VGA as well. */ - /* ??? This appears to be a single-byte write into MIN_GNT. - What is up with this? */ - 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, PCI_COMMAND, 0xffff0007); @@ -806,12 +859,15 @@ 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. */ @@ -820,7 +876,6 @@ { 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 */ @@ -851,10 +906,7 @@ 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++; } @@ -971,8 +1023,6 @@ &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", @@ -980,9 +1030,7 @@ 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 -ur --new-file old/linux/arch/alpha/kernel/bios32.h new/linux/arch/alpha/kernel/bios32.h --- old/linux/arch/alpha/kernel/bios32.h Sun Sep 6 19:34:33 1998 +++ new/linux/arch/alpha/kernel/bios32.h Sun Jan 10 18:59:54 1999 @@ -32,6 +32,13 @@ #define DEFAULT_IO_BASE 0x8000 /* start at 8th slot */ /* + * We try to make the DEFAULT_MEM_BASE addresses *always* have more than + * a single bit set. This is so that devices like the broken Myrinet card + * will always have a PCI memory address that will never match a IDSEL + * address in PCI Config space, which can cause problems with early rev cards. + */ + +/* * An XL is AVANTI (APECS) family, *but* it has only 27 bits of ISA address * that get passed through the PCI<->ISA bridge chip. Although this causes * us to set the PCI->Mem window bases lower than normal, we still allocate @@ -45,22 +52,20 @@ #define XL_DEFAULT_MEM_BASE (16*MB + 2*MB) /* 16M to 64M-1 is avail */ /* - * We try to make this address *always* have more than 1 bit set. - * this is so that devices like the broken Myrinet card will always have - * a PCI memory address that will never match a IDSEL address in - * PCI Config space, which can cause problems with early rev cards. - * - * However, APECS and LCA have only 34 bits for physical addresses, thus - * limiting PCI bus memory addresses for SPARSE access to be less than 128Mb. + * APECS and LCA have only 34 bits for physical addresses, thus limiting PCI + * bus memory addresses for SPARSE access to be less than 128Mb. */ #define APECS_AND_LCA_DEFAULT_MEM_BASE (64*MB + 2*MB) /* - * We try to make this address *always* have more than 1 bit set. - * this is so that devices like the broken Myrinet card will always have - * a PCI memory address that will never match a IDSEL address in - * PCI Config space, which can cause problems with early rev cards. - * + * Because the MCPCIA core logic supports more bits for physical addresses, + * it should allow an expanded range of SPARSE memory addresses. + * However, we do not use them all, in order to avoid the HAE manipulation + * that would be needed. + */ +#define RAWHIDE_DEFAULT_MEM_BASE (64*MB + 2*MB) + +/* * Because CIA and PYXIS and T2 have more bits for physical addresses, * they support an expanded range of SPARSE memory addresses. */ diff -ur --new-file old/linux/arch/alpha/kernel/core_polaris.c new/linux/arch/alpha/kernel/core_polaris.c --- old/linux/arch/alpha/kernel/core_polaris.c Thu Jan 1 01:00:00 1970 +++ new/linux/arch/alpha/kernel/core_polaris.c Mon Jan 11 07:56:43 1999 @@ -0,0 +1,275 @@ +/* + * linux/arch/alpha/kernel/core_polaris.c + * + * POLARIS chip-specific code + * + */ +#include +#include +#include +#include +#include + +#include +#include +#include + +#define __EXTERN_INLINE inline +#include +#include +#undef __EXTERN_INLINE + +#include "proto.h" +#include "bios32.h" + +/* + * BIOS32-style PCI interface: + */ + +#ifdef DEBUG_CONFIG +# define DBG_CFG(args) printk args +#else +# define DBG_CFG(args) +#endif + +#define DEBUG_MCHECK +#ifdef DEBUG_MCHECK +# define DBG_MCK(args) printk args +/* #define DEBUG_MCHECK_DUMP */ +#else +# define DBG_MCK(args) +#endif + +static volatile unsigned int POLARIS_mcheck_expected = 0; +static volatile unsigned int POLARIS_mcheck_taken = 0; +static volatile unsigned short POLARIS_jd = 0; + +/* + * Given a bus, device, and function number, compute resulting + * configuration space address. This is fairly straightforward + * on POLARIS, since the chip itself generates Type 0 or Type 1 + * cycles automatically depending on the bus number (Bus 0 is + * hardwired to Type 0, all others are Type 1. Peer bridges + * are not supported). + * + * All types: + * + * 3 3 3 3|3 3 3 3|3 3 2 2|2 2 2 2|2 2 2 2|1 1 1 1|1 1 1 1|1 1 + * 9 8 7 6|5 4 3 2|1 0 9 8|7 6 5 4|3 2 1 0|9 8 7 6|5 4 3 2|1 0 9 8|7 6 5 4|3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * |1|1|1|1|1|0|0|1|1|1|1|1|1|1|1|0|B|B|B|B|B|B|B|B|D|D|D|D|D|F|F|F|R|R|R|R|R|R|x|x| + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * 23:16 bus number (8 bits = 128 possible buses) + * 15:11 Device number (5 bits) + * 10:8 function number + * 7:2 register number + * + * Notes: + * The function number selects which function of a multi-function device + * (e.g., scsi and ethernet). + * + * The register selects a DWORD (32 bit) register offset. Hence it + * doesn't get shifted by 2 bits as we want to "drop" the bottom two + * bits. + */ + +static int +mk_conf_addr(u8 bus, u8 device_fn, u8 where, unsigned long *pci_addr, u8 *type1) +{ + *type1 = (bus == 0) ? 0 : 1; + *pci_addr = (bus << 16) | (device_fn << 8) | (where) | + POLARIS_DENSE_CONFIG_BASE; + + DBG_CFG(("mk_conf_addr(bus=%d ,device_fn=0x%x, where=0x%x," + " returning address 0x%p\n" + bus, device_fn, where, *pci_addr)); + + return 0; +} + +int +polaris_hose_read_config_byte (u8 bus, u8 device_fn, u8 where, u8 *value, + struct linux_hose_info *hose) +{ + unsigned long pci_addr; + unsigned char type1; + + if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1)) + return PCIBIOS_DEVICE_NOT_FOUND; + + *value = __kernel_ldbu(*(vucp)pci_addr); + return PCIBIOS_SUCCESSFUL; +} + + +int +polaris_hose_read_config_word (u8 bus, u8 device_fn, u8 where, u16 *value, + struct linux_hose_info *hose) +{ + unsigned long pci_addr; + unsigned char type1; + + if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1)) + return PCIBIOS_DEVICE_NOT_FOUND; + + *value = __kernel_ldwu(*(vusp)pci_addr); + return PCIBIOS_SUCCESSFUL; +} + + +int +polaris_hose_read_config_dword (u8 bus, u8 device_fn, u8 where, u32 *value, + struct linux_hose_info *hose) +{ + unsigned long pci_addr; + unsigned char type1; + + if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1)) + return PCIBIOS_DEVICE_NOT_FOUND; + + *value = *(vuip)pci_addr; + return PCIBIOS_SUCCESSFUL; +} + + +int +polaris_hose_write_config_byte (u8 bus, u8 device_fn, u8 where, u8 value, + struct linux_hose_info *hose) +{ + unsigned long pci_addr; + unsigned char type1; + + if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1)) + return PCIBIOS_DEVICE_NOT_FOUND; + + __kernel_stb(value, *(vucp)pci_addr); + mb(); + __kernel_ldbu(*(vucp)pci_addr); + return PCIBIOS_SUCCESSFUL; +} + + +int +polaris_hose_write_config_word (u8 bus, u8 device_fn, u8 where, u16 value, + struct linux_hose_info *hose) +{ + unsigned long pci_addr; + unsigned char type1; + + if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1)) + return PCIBIOS_DEVICE_NOT_FOUND; + + __kernel_stw(value, *(vusp)pci_addr); + mb(); + __kernel_ldbu(*(vusp)pci_addr); + return PCIBIOS_SUCCESSFUL; +} + + +int +polaris_hose_write_config_dword (u8 bus, u8 device_fn, u8 where, u32 value, + struct linux_hose_info *hose) +{ + unsigned long pci_addr; + unsigned char type1; + + if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1)) + return PCIBIOS_DEVICE_NOT_FOUND; + + *(vuip)pci_addr = value; + mb(); + *(vuip)pci_addr; + return PCIBIOS_SUCCESSFUL; +} + +void __init +polaris_init_arch(unsigned long *mem_start, unsigned long *mem_end) +{ + /* May need to initialize error reporting (see PCICTL0/1), but + * for now assume that the firmware has done the right thing + * already. + */ +#if 0 + printk("polaris_init_arch(): trusting firmware for setup\n"); +#endif +} + +int polaris_pci_clr_err(void) +{ + POLARIS_jd = *((vusp)POLARIS_W_STATUS); + DBG_MCK(("POLARIS_pci_clr_err: POLARIS_W_STATUS after read 0x%x\n", + POLARIS_jd)); + /* Write 1's to settable bits to clear errors */ + *((vusp)POLARIS_W_STATUS) = 0x7800; mb(); + POLARIS_jd = *((vusp)POLARIS_W_STATUS); + return 0; +} + +void polaris_machine_check(unsigned long vector, unsigned long la_ptr, + struct pt_regs * regs) +{ + struct el_common *mchk_header; + struct el_POLARIS_sysdata_mcheck *mchk_sysdata; + + mchk_header = (struct el_common *)la_ptr; + + mchk_sysdata = + (struct el_POLARIS_sysdata_mcheck *)(la_ptr+mchk_header->sys_offset); + +#if 0 + DBG_MCK(("polaris_machine_check: vector=0x%lx la_ptr=0x%lx\n", + vector, la_ptr)); + DBG_MCK(("\t\t pc=0x%lx size=0x%x procoffset=0x%x sysoffset 0x%x\n", + regs->pc, mchk_header->size, mchk_header->proc_offset, + mchk_header->sys_offset)); + DBG_MCK(("polaris_machine_check: expected %d status 0x%lx\n", + POLARIS_mcheck_expected, mchk_sysdata->psc_status)); +#endif +#ifdef DEBUG_MCHECK_DUMP + { + unsigned long *ptr; + int i; + + ptr = (unsigned long *)la_ptr; + for (i = 0; i < mchk_header->size / sizeof(long); i += 2) { + printk(" +%lx %lx %lx\n", i*sizeof(long), ptr[i], ptr[i+1]); + } + } +#endif /* DEBUG_MCHECK_DUMP */ + /* + * Check if machine check is due to a badaddr() and if so, + * ignore the machine check. + */ + mb(); + mb(); + if (POLARIS_mcheck_expected) { + DBG_MCK(("POLARIS machine check expected\n")); + POLARIS_mcheck_expected = 0; + POLARIS_mcheck_taken = 1; + mb(); + mb(); + draina(); + polaris_pci_clr_err(); + wrmces(0x7); + mb(); + } +#if 1 + else { + printk("POLARIS machine check NOT expected\n") ; + DBG_MCK(("polaris_machine_check: vector=0x%lx la_ptr=0x%lx\n", + vector, la_ptr)); + DBG_MCK(("\t\t pc=0x%lx size=0x%x procoffset=0x%x sysoffset 0x%x\n", + regs->pc, mchk_header->size, mchk_header->proc_offset, + mchk_header->sys_offset)); + POLARIS_mcheck_expected = 0; + POLARIS_mcheck_taken = 1; + mb(); + mb(); + draina(); + polaris_pci_clr_err(); + wrmces(0x7); + mb(); + } +#endif +} diff -ur --new-file old/linux/arch/alpha/kernel/core_t2.c new/linux/arch/alpha/kernel/core_t2.c --- old/linux/arch/alpha/kernel/core_t2.c Sun Sep 6 19:34:33 1998 +++ new/linux/arch/alpha/kernel/core_t2.c Sun Jan 10 04:08:21 1999 @@ -143,7 +143,7 @@ conf_read(unsigned long addr, unsigned char type1) { unsigned long flags; - unsigned int stat0, value, cpu; + unsigned int value, cpu; unsigned long t2_cfg = 0; cpu = smp_processor_id(); @@ -153,11 +153,14 @@ DBG(("conf_read(addr=0x%lx, type1=%d)\n", addr, type1)); #if 0 - /* Reset status register to avoid losing errors. */ - stat0 = *(vulp)T2_IOCSR; - *(vulp)T2_IOCSR = stat0; - mb(); - DBG(("conf_read: T2 IOCSR was 0x%x\n", stat0)); + { + unsigned long stat0; + /* Reset status register to avoid losing errors. */ + stat0 = *(vulp)T2_IOCSR; + *(vulp)T2_IOCSR = stat0; + mb(); + DBG(("conf_read: T2 IOCSR was 0x%x\n", stat0)); + } #endif /* If Type1 access, must set T2 CFG. */ @@ -202,7 +205,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1) { unsigned long flags; - unsigned int stat0, cpu; + unsigned int cpu; unsigned long t2_cfg = 0; cpu = smp_processor_id(); @@ -210,11 +213,14 @@ __save_and_cli(flags); /* avoid getting hit by machine check */ #if 0 - /* Reset status register to avoid losing errors. */ - stat0 = *(vulp)T2_IOCSR; - *(vulp)T2_IOCSR = stat0; - mb(); - DBG(("conf_write: T2 ERR was 0x%x\n", stat0)); + { + unsigned long stat0; + /* Reset status register to avoid losing errors. */ + stat0 = *(vulp)T2_IOCSR; + *(vulp)T2_IOCSR = stat0; + mb(); + DBG(("conf_write: T2 ERR was 0x%x\n", stat0)); + } #endif /* If Type1 access, must set T2 CFG. */ @@ -346,7 +352,6 @@ void __init t2_init_arch(unsigned long *mem_start, unsigned long *mem_end) { - unsigned long t2_err; unsigned int i; for (i = 0; i < NR_CPUS; i++) { @@ -355,13 +360,15 @@ } #if 0 - /* - * Set up error reporting. - */ - t2_err = *(vulp)T2_IOCSR ; - t2_err |= (0x1 << 7) ; /* master abort */ - *(vulp)T2_IOCSR = t2_err ; - mb() ; + { + /* Set up error reporting. */ + unsigned long t2_err; + + t2_err = *(vulp)T2_IOCSR; + t2_err |= (0x1 << 7); /* master abort */ + *(vulp)T2_IOCSR = t2_err; + mb(); + } #endif printk("t2_init: HBASE was 0x%lx\n", *(vulp)T2_HBASE); diff -ur --new-file old/linux/arch/alpha/kernel/core_tsunami.c new/linux/arch/alpha/kernel/core_tsunami.c --- old/linux/arch/alpha/kernel/core_tsunami.c Sun Sep 6 19:34:33 1998 +++ new/linux/arch/alpha/kernel/core_tsunami.c Mon Jan 11 07:56:43 1999 @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -302,14 +301,22 @@ * For now, windows 1,2 and 3 are disabled. In the future, * we may want to use them to do scatter/gather DMA. * - * Window 0 goes at 1 GB and is 1 GB large. + * Window 0 goes at 1 GB and is 1 GB large, mapping to 0. */ pchip->wsba[0].csr = 1L | (TSUNAMI_DMA_WIN_BASE_DEFAULT & 0xfff00000U); pchip->wsm[0].csr = (TSUNAMI_DMA_WIN_SIZE_DEFAULT - 1) & 0xfff00000UL; pchip->tba[0].csr = 0; +#if 0 pchip->wsba[1].csr = 0; +#else + /* make the second window at 2Gb for 1Gb mapping to 1Gb */ + pchip->wsba[1].csr = 1L | ((0x80000000U) & 0xfff00000U); + pchip->wsm[1].csr = (0x40000000UL - 1) & 0xfff00000UL; + pchip->tba[1].csr = 0x40000000; +#endif + pchip->wsba[2].csr = 0; pchip->wsba[3].csr = 0; mb(); @@ -359,7 +366,9 @@ /* Find how many hoses we have, and initialize them. */ tsunami_init_one_pchip(TSUNAMI_pchip0, 0, mem_start); - tsunami_init_one_pchip(TSUNAMI_pchip1, 1, mem_start); + /* must change this for TYPHOON which may have 4 */ + if (TSUNAMI_cchip->csc.csr & 1L<<14) + tsunami_init_one_pchip(TSUNAMI_pchip1, 1, mem_start); } static inline void @@ -378,7 +387,9 @@ { int cpu = smp_processor_id(); tsunami_pci_clr_err_1(TSUNAMI_pchip0, cpu); - tsunami_pci_clr_err_1(TSUNAMI_pchip1, cpu); + /* must change this for TYPHOON which may have 4 */ + if (TSUNAMI_cchip->csc.csr & 1L<<14) + tsunami_pci_clr_err_1(TSUNAMI_pchip1, cpu); return 0; } diff -ur --new-file old/linux/arch/alpha/kernel/entry.S new/linux/arch/alpha/kernel/entry.S --- old/linux/arch/alpha/kernel/entry.S Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/entry.S Thu Jan 21 20:26:30 1999 @@ -8,10 +8,9 @@ #define halt .long PAL_halt #define rti .long PAL_rti -#define SIGCHLD 20 +#define SIGCHLD 20 -#define NR_SYSCALLS 370 -#define osf_vfork sys_fork +#define NR_SYSCALLS 371 /* * These offsets must match with alpha_mv in . @@ -502,6 +501,17 @@ .end sys_clone .align 3 +.globl sys_vfork +.ent sys_vfork +sys_vfork: + bsr $1,do_switch_stack + bis $30,$30,$16 + jsr $26,alpha_vfork + bsr $1,undo_switch_stack + ret $31,($26),1 +.end sys_vfork + +.align 3 .globl alpha_switch_to .ent alpha_switch_to alpha_switch_to: @@ -689,7 +699,8 @@ .set at mb /* Make the changed data visible before the freed lock. */ stq $31,scheduler_lock - br ret_from_sys_call + lda $26,ret_from_sys_call + jsr $31,schedule_tail .set noat .end ret_from_smpfork #endif /* __SMP__ */ @@ -821,7 +832,7 @@ .quad sys_getpgrp .quad sys_getpagesize .quad alpha_ni_syscall /* 65 */ - .quad osf_vfork + .quad sys_vfork .quad sys_newstat .quad sys_newlstat .quad alpha_ni_syscall @@ -1127,4 +1138,4 @@ .quad sys_getcwd .quad sys_capget .quad sys_capset - .quad sys_ni_syscall /* 370 */ + .quad sys_sendfile /* 370 */ diff -ur --new-file old/linux/arch/alpha/kernel/irq.c new/linux/arch/alpha/kernel/irq.c --- old/linux/arch/alpha/kernel/irq.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/irq.c Sun Jan 17 02:02:50 1999 @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -38,13 +39,6 @@ unsigned int local_bh_count[NR_CPUS]; unsigned long hardirq_no[NR_CPUS]; -#define RTC_IRQ 8 -#ifdef CONFIG_RTC -#define TIMER_IRQ 0 /* timer is the pit */ -#else -#define TIMER_IRQ RTC_IRQ /* the timer is, in fact, the rtc */ -#endif - #if NR_IRQS > 64 # error Unable to handle more than 64 irq levels. #endif @@ -84,6 +78,15 @@ } } + + +static void dummy_perf(unsigned long vector, struct pt_regs *regs) +{ + printk(KERN_CRIT "Performance counter interrupt!\n"); +} + +void (*perf_irq)(unsigned long, struct pt_regs *) = dummy_perf; + /* * Dispatch device interrupts. */ @@ -102,6 +105,8 @@ # define IACK_SC PYXIS_IACK_SC #elif defined(CONFIG_ALPHA_TSUNAMI) # define IACK_SC TSUNAMI_IACK_SC +#elif defined(CONFIG_ALPHA_POLARIS) +# define IACK_SC POLARIS_IACK_SC #else /* This is bogus but necessary to get it to compile on all platforms. */ # define IACK_SC 1L @@ -311,14 +316,14 @@ int get_irq_list(char *buf) { - int i, j; + int i; struct irqaction * action; char *p = buf; #ifdef __SMP__ p += sprintf(p, " "); - for (j = 0; j < smp_num_cpus; j++) - p += sprintf(p, "CPU%d ", j); + for (i = 0; i < smp_num_cpus; i++) + p += sprintf(p, "CPU%d ", i); *p++ = '\n'; #endif @@ -330,9 +335,12 @@ #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]); + { + int j; + 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)?'+':' ', @@ -815,7 +823,7 @@ * Wait about 100ms for spurious interrupts to mask themselves * out again... */ - for (delay = jiffies + HZ/10; delay > jiffies; ) + for (delay = jiffies + HZ/10; time_before(jiffies, delay); ) barrier(); /* Now filter out any obviously spurious interrupts. */ @@ -879,8 +887,8 @@ __restore_flags(flags); return; case 4: - printk("Performance counter interrupt\n"); - break; + perf_irq(vector, ®s); + return; default: printk("Hardware intr %ld %lx? Huh?\n", type, vector); } diff -ur --new-file old/linux/arch/alpha/kernel/irq.h new/linux/arch/alpha/kernel/irq.h --- old/linux/arch/alpha/kernel/irq.h Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/irq.h Thu Dec 31 00:06:22 1998 @@ -8,6 +8,8 @@ * with the IRQ handling routines in irq.c. */ +#include + #define STANDARD_INIT_IRQ_PROLOG \ outb(0, DMA1_RESET_REG); \ outb(0, DMA2_RESET_REG); \ @@ -21,3 +23,11 @@ extern void srm_device_interrupt(unsigned long vector, struct pt_regs * regs); extern void handle_irq(int irq, int ack, struct pt_regs * regs); + +#define RTC_IRQ 8 +#ifdef CONFIG_RTC +#define TIMER_IRQ 0 /* timer is the pit */ +#else +#define TIMER_IRQ RTC_IRQ /* timer is the rtc */ +#endif + diff -ur --new-file old/linux/arch/alpha/kernel/machvec.h new/linux/arch/alpha/kernel/machvec.h --- old/linux/arch/alpha/kernel/machvec.h Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/machvec.h Sun Jan 10 18:59:54 1999 @@ -13,6 +13,11 @@ we can read and write it as we like. ;-) */ #define TSUNAMI_HAE_ADDRESS (&alpha_mv.hae_cache) +/* Whee. POLARIS doesn't have an HAE. Fix things up for the GENERIC + kernel by defining the HAE address to be that of the cache. Now + we can read and write it as we like. ;-) */ +#define POLARIS_HAE_ADDRESS (&alpha_mv.hae_cache) + /* Only a few systems don't define IACK_SC, handling all interrupts through the SRM console. But splitting out that one case from IO() below seems like such a pain. Define this to get things to compile. */ @@ -91,6 +96,7 @@ #define DO_LCA_IO IO(LCA,lca,lca) #define DO_MCPCIA_IO IO(MCPCIA,mcpcia,mcpcia) #define DO_PYXIS_IO IO(PYXIS,pyxis_bw,pyxis) +#define DO_POLARIS_IO IO(POLARIS,polaris,polaris) #define DO_T2_IO IO(T2,t2,t2) #define DO_TSUNAMI_IO IO(TSUNAMI,tsunami,tsunami) @@ -103,6 +109,7 @@ #define DO_LCA_BUS BUS(lca) #define DO_MCPCIA_BUS BUS(mcpcia) #define DO_PYXIS_BUS BUS(pyxis) +#define DO_POLARIS_BUS BUS(polaris) #define DO_T2_BUS BUS(t2) #define DO_TSUNAMI_BUS BUS(tsunami) diff -ur --new-file old/linux/arch/alpha/kernel/osf_sys.c new/linux/arch/alpha/kernel/osf_sys.c --- old/linux/arch/alpha/kernel/osf_sys.c Sun Sep 13 19:22:17 1998 +++ new/linux/arch/alpha/kernel/osf_sys.c Thu Jan 21 01:07:26 1999 @@ -1128,15 +1128,20 @@ return ret; } +#define MAX_SELECT_SECONDS \ + ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1) + asmlinkage int osf_select(int n, fd_set *inp, fd_set *outp, fd_set *exp, struct timeval32 *tvp) { - fd_set_buffer *fds; + fd_set_bits fds; + char *bits; + size_t size; unsigned long timeout; int ret; - timeout = ~0UL; + timeout = MAX_SCHEDULE_TIMEOUT; if (tvp) { time_t sec, usec; @@ -1145,30 +1150,46 @@ || (ret = __get_user(usec, &tvp->tv_usec))) goto out_nofds; - timeout = (usec + 1000000/HZ - 1) / (1000000/HZ); - timeout += sec * HZ; - if (timeout) - timeout += jiffies + 1; + ret = -EINVAL; + if (sec < 0 || usec < 0) + goto out_nofds; + + if ((unsigned long) sec < MAX_SELECT_SECONDS) { + timeout = (usec + 1000000/HZ - 1) / (1000000/HZ); + timeout += sec * (unsigned long) HZ; + } } + ret = -EINVAL; + if (n < 0 || n > KFDS_NR) + goto out_nofds; + + /* + * We need 6 bitmaps (in/out/ex for both incoming and outgoing), + * since we used fdset we need to allocate memory in units of + * long-words. + */ ret = -ENOMEM; - fds = (fd_set_buffer *) __get_free_page(GFP_KERNEL); - if (!fds) + size = FDS_BYTES(n); + bits = kmalloc(6 * size, GFP_KERNEL); + if (!bits) goto out_nofds; - ret = -EINVAL; - if (n < 0) - goto out; - if (n > KFDS_NR) - n = KFDS_NR; - if ((ret = get_fd_set(n, inp->fds_bits, fds->in)) || - (ret = get_fd_set(n, outp->fds_bits, fds->out)) || - (ret = get_fd_set(n, exp->fds_bits, fds->ex))) + fds.in = (unsigned long *) bits; + fds.out = (unsigned long *) (bits + size); + fds.ex = (unsigned long *) (bits + 2*size); + fds.res_in = (unsigned long *) (bits + 3*size); + fds.res_out = (unsigned long *) (bits + 4*size); + fds.res_ex = (unsigned long *) (bits + 5*size); + + if ((ret = get_fd_set(n, inp->fds_bits, fds.in)) || + (ret = get_fd_set(n, outp->fds_bits, fds.out)) || + (ret = get_fd_set(n, exp->fds_bits, fds.ex))) goto out; - zero_fd_set(n, fds->res_in); - zero_fd_set(n, fds->res_out); - zero_fd_set(n, fds->res_ex); + zero_fd_set(n, fds.res_in); + 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. */ @@ -1181,12 +1202,12 @@ ret = 0; } - set_fd_set(n, inp->fds_bits, fds->res_in); - set_fd_set(n, outp->fds_bits, fds->res_out); - set_fd_set(n, exp->fds_bits, fds->res_ex); + set_fd_set(n, inp->fds_bits, fds.res_in); + set_fd_set(n, outp->fds_bits, fds.res_out); + set_fd_set(n, exp->fds_bits, fds.res_ex); out: - free_page((unsigned long) fds); + kfree(bits); out_nofds: return ret; } @@ -1313,18 +1334,11 @@ 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 -ur --new-file old/linux/arch/alpha/kernel/process.c new/linux/arch/alpha/kernel/process.c --- old/linux/arch/alpha/kernel/process.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/process.c Wed Jan 20 20:08:43 1999 @@ -133,18 +133,15 @@ 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 @@ /* 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 @@ CMOS_WRITE(control, RTC_CONTROL); CMOS_READ(RTC_INTR_FLAGS); - restore_flags(flags); + sti(); } #endif @@ -262,11 +257,17 @@ * with parameters (SIGCHLD, 0). */ int alpha_clone(unsigned long clone_flags, unsigned long usp, - struct switch_stack * swstack) + struct switch_stack * swstack) { if (!usp) usp = rdusp(); return do_fork(clone_flags, usp, (struct pt_regs *) (swstack+1)); +} + +int alpha_vfork(struct switch_stack * swstack) +{ + return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), + (struct pt_regs *) (swstack+1)); } extern void ret_from_sys_call(void); diff -ur --new-file old/linux/arch/alpha/kernel/proto.h new/linux/arch/alpha/kernel/proto.h --- old/linux/arch/alpha/kernel/proto.h Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/proto.h Sun Jan 10 18:59:59 1999 @@ -76,6 +76,22 @@ extern void mcpcia_init_arch(unsigned long *, unsigned long *); extern void mcpcia_machine_check(u64, u64, struct pt_regs *); +/* core_polaris.c */ +extern int polaris_hose_read_config_byte (u8, u8, u8, u8 *value, + struct linux_hose_info *hose); +extern int polaris_hose_read_config_word (u8, u8, u8, u16 *value, + struct linux_hose_info *hose); +extern int polaris_hose_read_config_dword (u8, u8, u8, u32 *value, + struct linux_hose_info *hose); +extern int polaris_hose_write_config_byte (u8, u8, u8, u8 value, + struct linux_hose_info *hose); +extern int polaris_hose_write_config_word (u8, u8, u8, u16 value, + struct linux_hose_info *hose); +extern int polaris_hose_write_config_dword (u8, u8, u8, u32 value, + struct linux_hose_info *hose); +extern void polaris_init_arch(unsigned long *, unsigned long *); +extern void polaris_machine_check(u64, u64, struct pt_regs *); + /* core_pyxis.c */ extern int pyxis_hose_read_config_byte (u8, u8, u8, u8 *value, struct linux_hose_info *hose); @@ -129,8 +145,6 @@ extern void tsunami_machine_check(u64, u64, struct pt_regs *); /* setup.c */ -extern void init_pit_rest(void); -extern void generic_init_pit (void); extern unsigned long srm_hae; /* smp.c */ @@ -143,6 +157,8 @@ /* time.c */ extern void timer_interrupt(int irq, void *dev, struct pt_regs * regs); +extern void rtc_init_pit(void); +extern void generic_init_pit(void); extern unsigned long est_cycle_freq; /* smc37c93x.c */ diff -ur --new-file old/linux/arch/alpha/kernel/ptrace.c new/linux/arch/alpha/kernel/ptrace.c --- old/linux/arch/alpha/kernel/ptrace.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/ptrace.c Wed Dec 30 01:17:00 1998 @@ -541,7 +541,9 @@ /* When I and D space are separate, these will need to be fixed. */ case PTRACE_PEEKTEXT: /* read word at location addr. */ case PTRACE_PEEKDATA: + down(&child->mm->mmap_sem); ret = read_long(child, addr, &tmp); + up(&child->mm->mmap_sem); DBG(DBG_MEM, ("peek %#lx->%#lx\n", addr, tmp)); if (ret < 0) goto out; @@ -560,7 +562,9 @@ case PTRACE_POKETEXT: /* write the word at location addr. */ case PTRACE_POKEDATA: DBG(DBG_MEM, ("poke %#lx<-%#lx\n", addr, data)); + down(&child->mm->mmap_sem); ret = write_long(child, addr, data); + up(&child->mm->mmap_sem); goto out; case PTRACE_POKEUSR: /* write the specified register */ diff -ur --new-file old/linux/arch/alpha/kernel/setup.c new/linux/arch/alpha/kernel/setup.c --- old/linux/arch/alpha/kernel/setup.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/setup.c Thu Jan 14 19:21:40 1999 @@ -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; @@ -100,33 +94,46 @@ * Declare all of the machine vectors. */ -extern struct alpha_machine_vector alcor_mv; -extern struct alpha_machine_vector alphabook1_mv; -extern struct alpha_machine_vector avanti_mv; -extern struct alpha_machine_vector cabriolet_mv; -extern struct alpha_machine_vector dp264_mv; -extern struct alpha_machine_vector eb164_mv; -extern struct alpha_machine_vector eb64p_mv; -extern struct alpha_machine_vector eb66_mv; -extern struct alpha_machine_vector eb66p_mv; -extern struct alpha_machine_vector jensen_mv; -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 noname_mv; -extern struct alpha_machine_vector noritake_mv; -extern struct alpha_machine_vector noritake_primo_mv; -extern struct alpha_machine_vector p2k_mv; -extern struct alpha_machine_vector pc164_mv; -extern struct alpha_machine_vector rawhide_mv; -extern struct alpha_machine_vector ruffian_mv; -extern struct alpha_machine_vector sable_mv; -extern struct alpha_machine_vector sable_gamma_mv; -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; +/* GCC 2.7.2 (on alpha at least) is lame. It does not support either + __attribute__((weak)) or #pragma weak. Bypass it and talk directly + to the assembler. */ + +#define WEAK(X) \ + extern struct alpha_machine_vector X; \ + asm(".weak "#X) + +WEAK(alcor_mv); +WEAK(alphabook1_mv); +WEAK(avanti_mv); +WEAK(cabriolet_mv); +WEAK(dp264_mv); +WEAK(eb164_mv); +WEAK(eb64p_mv); +WEAK(eb66_mv); +WEAK(eb66p_mv); +WEAK(jensen_mv); +WEAK(lx164_mv); +WEAK(miata_mv); +WEAK(mikasa_mv); +WEAK(mikasa_primo_mv); +WEAK(monet_mv); +WEAK(noname_mv); +WEAK(noritake_mv); +WEAK(noritake_primo_mv); +WEAK(p2k_mv); +WEAK(pc164_mv); +WEAK(rawhide_mv); +WEAK(ruffian_mv); +WEAK(rx164_mv); +WEAK(sable_mv); +WEAK(sable_gamma_mv); +WEAK(sx164_mv); +WEAK(takara_mv); +WEAK(webbrick_mv); +WEAK(xl_mv); +WEAK(xlt_mv); + +#undef WEAK void __init @@ -197,26 +204,18 @@ 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", @@ -249,7 +248,7 @@ if (initrd_end > *memory_end_p) { printk("initrd extends beyond end of memory " "(0x%08lx > 0x%08lx)\ndisabling initrd\n", - initrd_end, memory_end_p); + initrd_end, (unsigned long) memory_end_p); initrd_start = initrd_end = 0; } } @@ -260,6 +259,16 @@ if (alpha_mv.init_arch) alpha_mv.init_arch(memory_start_p, memory_end_p); + /* Initialize the timers. */ + /* ??? There is some circumstantial evidence that this needs + to be done now rather than later in time_init, which would + be more natural. Someone please explain or refute. */ +#if defined(CONFIG_RTC) + rtc_init_pit(); +#else + alpha_mv.init_pit(); +#endif + /* * Give us a default console. TGA users will see nothing until * chr_dev_init is called, rather late in the boot sequence. @@ -334,8 +343,8 @@ static char unofficial_names[][8] = {"100", "Ruffian"}; -static char eb164_names[][8] = {"EB164", "PC164", "LX164", "SX164"}; -static int eb164_indices[] = {0,0,0,1,1,1,1,1,2,2,2,2,3,3,3,3}; +static char eb164_names[][8] = {"EB164", "PC164", "LX164", "SX164", "RX164"}; +static int eb164_indices[] = {0,0,0,1,1,1,1,1,2,2,2,2,3,3,3,3,4}; static char alcor_names[][16] = {"Alcor", "Maverick", "Bret"}; static int alcor_indices[] = {0,0,0,1,1,1,0,0,0,0,0,0,2,2,2,2,2,2}; @@ -351,11 +360,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 +406,7 @@ NULL, /* XXM */ &takara_mv, NULL, /* Yukon */ - &dp264_mv, + NULL, /* Tsunami -- see variation. */ NULL, /* Wildfire */ NULL, /* CUSCO */ }; @@ -410,7 +424,7 @@ static struct alpha_machine_vector *eb164_vecs[] __initlocaldata = { - &eb164_mv, &pc164_mv, &lx164_mv, &sx164_mv + &eb164_mv, &pc164_mv, &lx164_mv, &sx164_mv, &rx164_mv }; static struct alpha_machine_vector *eb64p_vecs[] __initlocaldata = @@ -426,6 +440,19 @@ &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 */ + &webbrick_mv, /* webbrick */ + &dp264_mv, /* catamaran */ + }; + /* ??? Do we need to distinguish between Rawhides? */ struct alpha_machine_vector *vec; @@ -466,6 +493,10 @@ 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: cpu &= 0xffffffff; if (cpu == EV5_CPU || cpu == EV56_CPU) @@ -490,17 +521,11 @@ } } 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, @@ -517,6 +542,7 @@ &miata_mv, &mikasa_mv, &mikasa_primo_mv, + &monet_mv, &noname_mv, &noritake_mv, &noritake_primo_mv, @@ -524,10 +550,12 @@ &pc164_mv, &rawhide_mv, &ruffian_mv, + &rx164_mv, &sable_mv, &sable_gamma_mv, &sx164_mv, &takara_mv, + &webbrick_mv, &xl_mv, &xlt_mv }; @@ -539,11 +567,6 @@ return mv; } return NULL; -#else - if (strcasecmp(alpha_mv.vector_name, name) == 0) - return &alpha_mv; - return NULL; -#endif } static void @@ -600,6 +623,10 @@ 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; } } @@ -651,8 +678,8 @@ } 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; diff -ur --new-file old/linux/arch/alpha/kernel/smc37c669.c new/linux/arch/alpha/kernel/smc37c669.c --- old/linux/arch/alpha/kernel/smc37c669.c Fri Sep 4 21:10:46 1998 +++ new/linux/arch/alpha/kernel/smc37c669.c Wed Nov 25 23:52:22 1998 @@ -2519,10 +2519,10 @@ 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 @@ 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 -ur --new-file old/linux/arch/alpha/kernel/smc37c93x.c new/linux/arch/alpha/kernel/smc37c93x.c --- old/linux/arch/alpha/kernel/smc37c93x.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/smc37c93x.c Wed Nov 25 23:52:22 1998 @@ -241,10 +241,10 @@ 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 @@ -264,9 +264,13 @@ 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 -ur --new-file old/linux/arch/alpha/kernel/smp.c new/linux/arch/alpha/kernel/smp.c --- old/linux/arch/alpha/kernel/smp.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/smp.c Sun Jan 17 02:02:50 1999 @@ -30,7 +30,14 @@ #include "proto.h" -struct ipi_msg_flush_tb_struct ipi_msg_flush_tb; +#define DEBUG_SMP 0 +#if DEBUG_SMP +#define DBGS(args) printk args +#else +#define DBGS(args) +#endif + +struct ipi_msg_flush_tb_struct ipi_msg_flush_tb __cacheline_aligned; struct cpuinfo_alpha cpu_data[NR_CPUS]; @@ -39,7 +46,6 @@ 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; @@ -53,10 +59,12 @@ volatile unsigned long cpu_callin_map[NR_CPUS] = {0,}; volatile unsigned long smp_spinning[NR_CPUS] = { 0, }; +cycles_t cacheflush_time; + unsigned int prof_multiplier[NR_CPUS]; unsigned int prof_counter[NR_CPUS]; -volatile int ipi_bits[NR_CPUS]; +volatile int ipi_bits[NR_CPUS] __cacheline_aligned; unsigned long boot_cpu_palrev; @@ -73,87 +81,80 @@ static void secondary_cpu_start(int, struct task_struct *); static void send_cpu_msg(char *, int); -/* process bootcommand SMP options, like "nosmp" and "maxcpus=" */ -__initfunc(void smp_setup(char *str, int *ints)) +/* Process bootcommand SMP options, like "nosmp" and "maxcpus=" */ +void __init +smp_setup(char *str, int *ints) { if (ints && ints[0] > 0) max_cpus = ints[1]; - else + else max_cpus = 0; } -void smp_store_cpu_info(int id) +static void __init +smp_store_cpu_info(int id) { /* This is it on Alpha, so far. */ - cpu_data[id].loops_per_sec = loops_per_sec; + cpu_data[id].loops_per_sec = loops_per_sec; } -void smp_commence(void) +void __init +smp_commence(void) { /* Lets the callin's below out of their loop. */ mb(); smp_commenced = 1; } -void smp_callin(void) +void __init +smp_callin(void) { - int cpuid = hard_smp_processor_id(); + int cpuid = hard_smp_processor_id(); -#if 0 - printk("CALLIN %d state 0x%lx\n", cpuid, current->state); -#endif + DBGS(("CALLIN %d state 0x%lx\n", cpuid, current->state)); #ifdef HUH - local_flush_cache_all(); - local_flush_tlb_all(); + local_flush_cache_all(); + local_flush_tlb_all(); #endif #if 0 - set_irq_udt(mid_xlate[boot_cpu_id]); + set_irq_udt(mid_xlate[boot_cpu_id]); #endif - /* Get our local ticker going. */ - smp_setup_percpu_timer(); + /* Get our local ticker going. */ + smp_setup_percpu_timer(); #if 0 - calibrate_delay(); + calibrate_delay(); #endif - smp_store_cpu_info(cpuid); + smp_store_cpu_info(cpuid); #ifdef HUH - local_flush_cache_all(); - local_flush_tlb_all(); + local_flush_cache_all(); + local_flush_tlb_all(); #endif - /* Allow master to continue. */ - set_bit(cpuid, (unsigned long *)&cpu_callin_map[cpuid]); + /* Allow master to continue. */ + set_bit(cpuid, (unsigned long *)&cpu_callin_map[cpuid]); #ifdef HUH - local_flush_cache_all(); - local_flush_tlb_all(); + local_flush_cache_all(); + local_flush_tlb_all(); #endif #ifdef NOT_YET - while(!task[cpuid] || current_set[cpuid] != task[cpuid]) - barrier(); -#endif /* NOT_YET */ - -#if 0 - /* Fix idle thread fields. */ - __asm__ __volatile__("ld [%0], %%g6\n\t" - : : "r" (¤t_set[cpuid]) - : "memory" /* paranoid */); - current->mm->mmap->vm_page_prot = PAGE_SHARED; - current->mm->mmap->vm_start = PAGE_OFFSET; - current->mm->mmap->vm_end = init_task.mm->mmap->vm_end; + while(!task[cpuid] || current_set[cpuid] != task[cpuid]) + barrier(); #endif - + #ifdef HUH - local_flush_cache_all(); - local_flush_tlb_all(); + local_flush_cache_all(); + local_flush_tlb_all(); #endif #if 0 - __sti(); + __sti(); #endif } -asmlinkage int start_secondary(void *unused) +asmlinkage int __init +start_secondary(void *unused) { extern asmlinkage void entInt(void); extern void paging_init_secondary(void); @@ -163,35 +164,83 @@ trap_init(); wrent(entInt, 0); - smp_callin(); - while (!smp_commenced) + smp_callin(); + while (!smp_commenced) barrier(); #if 1 -printk("start_secondary: commencing CPU %d current %p\n", - hard_smp_processor_id(), current); + printk("start_secondary: commencing CPU %d current %p\n", + hard_smp_processor_id(), current); #endif - cpu_idle(NULL); + cpu_idle(NULL); } +static void __init +smp_tune_scheduling (void) +{ + /* + * Rough estimation for SMP scheduling, this is the number of + * cycles it takes for a fully memory-limited process to flush + * the SMP-local cache. + * + * We are not told how much cache there is, so we have to guess. + */ + + struct percpu_struct *cpu; + unsigned long on_chip_cache; + unsigned long freq; + + cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset); + switch (cpu->type) + { + case EV45_CPU: + on_chip_cache = 16 + 16; + break; + + case EV5_CPU: + case EV56_CPU: + on_chip_cache = 8 + 8 + 96; + break; + + case PCA56_CPU: + on_chip_cache = 16 + 8; + break; + + case EV6_CPU: + on_chip_cache = 64 + 64; + break; + + default: + on_chip_cache = 8 + 8; + break; + } + + freq = hwrpb->cycle_freq ? : est_cycle_freq; + + /* Magic estimation stolen from x86 port. */ + cacheflush_time = freq / 1024 * on_chip_cache / 5000; +} + + /* * Cycle through the processors sending START msgs to boot each. */ -void smp_boot_cpus(void) +void __init +smp_boot_cpus(void) { - int cpucount = 0; - int i, first, prev; + int cpucount = 0; + int i, first, prev; - printk("smp_boot_cpus: Entering SMP Mode...\n"); + printk("Entering SMP Mode.\n"); #if 0 - __sti(); + __sti(); #endif - for(i=0; i < NR_CPUS; i++) { + for(i=0; i < NR_CPUS; i++) { cpu_number_map[i] = -1; cpu_logical_map[i] = -1; - prof_counter[i] = 1; - prof_multiplier[i] = 1; + prof_counter[i] = 1; + prof_multiplier[i] = 1; ipi_bits[i] = 0; } @@ -199,159 +248,155 @@ cpu_logical_map[0] = boot_cpu_id; current->processor = boot_cpu_id; /* ??? */ - smp_store_cpu_info(boot_cpu_id); + smp_store_cpu_info(boot_cpu_id); + smp_tune_scheduling(); #ifdef NOT_YET - printk("CPU%d: ", boot_cpu_id); - print_cpu_info(&cpu_data[boot_cpu_id]); - set_irq_udt(mid_xlate[boot_cpu_id]); -#endif /* NOT_YET */ - smp_setup_percpu_timer(); + printk("CPU%d: ", boot_cpu_id); + print_cpu_info(&cpu_data[boot_cpu_id]); + set_irq_udt(mid_xlate[boot_cpu_id]); +#endif + smp_setup_percpu_timer(); #ifdef HUH - local_flush_cache_all(); + local_flush_cache_all(); #endif - if (smp_num_probed == 1) + if (smp_num_probed == 1) return; /* Not an MP box. */ #if NOT_YET - /* - * If SMP should be disabled, then really disable it! - */ - if (!max_cpus) + /* + * If SMP should be disabled, then really disable it! + */ + if (!max_cpus) { smp_found_config = 0; - printk(KERN_INFO "SMP mode deactivated.\n"); - } -#endif /* NOT_YET */ + printk(KERN_INFO "SMP mode deactivated.\n"); + } +#endif - for (i = 0; i < NR_CPUS; i++) { + for (i = 0; i < NR_CPUS; i++) { if (i == boot_cpu_id) continue; - if (cpu_present_map & (1 << i)) { - struct task_struct *idle; - int timeout; - - /* Cook up an idler for this guy. */ - kernel_thread(start_secondary, NULL, CLONE_PID); - idle = task[++cpucount]; + if (cpu_present_map & (1 << i)) { + struct task_struct *idle; + int timeout; + + /* Cook up an idler for this guy. */ + kernel_thread(start_secondary, NULL, CLONE_PID); + idle = task[++cpucount]; if (!idle) panic("No idle process for CPU %d", i); - idle->processor = i; + idle->processor = i; -#if 0 -printk("smp_boot_cpus: CPU %d state 0x%lx flags 0x%lx\n", - i, idle->state, idle->flags); -#endif + DBGS(("smp_boot_cpus: CPU %d state 0x%lx flags 0x%lx\n", + i, idle->state, idle->flags)); - /* whirrr, whirrr, whirrrrrrrrr... */ + /* whirrr, whirrr, whirrrrrrrrr... */ #ifdef HUH - local_flush_cache_all(); + local_flush_cache_all(); #endif - secondary_cpu_start(i, idle); + secondary_cpu_start(i, idle); - /* wheee... it's going... wait for 5 secs...*/ - for (timeout = 0; timeout < 50000; timeout++) { + /* wheee... it's going... wait for 5 secs...*/ + for (timeout = 0; timeout < 50000; timeout++) { if (cpu_callin_map[i]) break; - udelay(100); - } - if (cpu_callin_map[i]) { + udelay(100); + } + if (cpu_callin_map[i]) { /* Another "Red Snapper". */ cpu_number_map[i] = cpucount; - cpu_logical_map[cpucount] = i; - } else { + cpu_logical_map[cpucount] = i; + } else { cpucount--; - printk("smp_boot_cpus: Processor %d" + printk("smp_boot_cpus: Processor %d" " is stuck 0x%lx.\n", i, idle->flags); - } - } - if (!(cpu_callin_map[i])) { + } + } + if (!(cpu_callin_map[i])) { cpu_present_map &= ~(1 << i); - cpu_number_map[i] = -1; - } - } + cpu_number_map[i] = -1; + } + } #ifdef HUH - local_flush_cache_all(); + local_flush_cache_all(); #endif - if (cpucount == 0) { + if (cpucount == 0) { printk("smp_boot_cpus: ERROR - only one Processor found.\n"); - cpu_present_map = (1 << smp_processor_id()); - } else { + cpu_present_map = (1 << smp_processor_id()); + } else { unsigned long bogosum = 0; - for (i = 0; i < NR_CPUS; i++) { + for (i = 0; i < NR_CPUS; i++) { if (cpu_present_map & (1 << i)) bogosum += cpu_data[i].loops_per_sec; - } - printk("smp_boot_cpus: Total of %d Processors activated" + } + printk("smp_boot_cpus: Total of %d Processors activated" " (%lu.%02lu BogoMIPS).\n", - cpucount + 1, - (bogosum + 2500)/500000, - ((bogosum + 2500)/5000)%100); - smp_activated = 1; - smp_num_cpus = cpucount + 1; - } - - /* Setup CPU list for IRQ distribution scheme. */ - first = prev = -1; - for (i = 0; i < NR_CPUS; i++) { + cpucount + 1, + (bogosum + 2500)/500000, + ((bogosum + 2500)/5000)%100); + smp_activated = 1; + smp_num_cpus = cpucount + 1; + } + + /* Setup CPU list for IRQ distribution scheme. */ + first = prev = -1; + for (i = 0; i < NR_CPUS; i++) { if (cpu_present_map & (1 << i)) { if (first == -1) first = i; if (prev != -1) cpu_data[i].next = i; - prev = i; - } - } - cpu_data[prev].next = first; + prev = i; + } + } + cpu_data[prev].next = first; - /* Ok, they are spinning and ready to go. */ - smp_processors_ready = 1; + /* Ok, they are spinning and ready to go. */ + smp_processors_ready = 1; } -__initfunc(void ioapic_pirq_setup(char *str, int *ints)) +static void __init +smp_setup_percpu_timer(void) { - /* this is prolly INTEL-specific */ -} - -static void smp_setup_percpu_timer(void) -{ - int cpu = smp_processor_id(); + int cpu = smp_processor_id(); - prof_counter[cpu] = prof_multiplier[cpu] = 1; + prof_counter[cpu] = prof_multiplier[cpu] = 1; #ifdef NOT_YET - load_profile_irq(mid_xlate[cpu], lvl14_resolution); - if (cpu == boot_cpu_id) + load_profile_irq(mid_xlate[cpu], lvl14_resolution); + if (cpu == boot_cpu_id) enable_pil_irq(14); #endif } extern void update_one_process(struct task_struct *p, unsigned long ticks, - unsigned long user, unsigned long system, + unsigned long user, unsigned long system, int cpu); -void smp_percpu_timer_interrupt(struct pt_regs *regs) +void +smp_percpu_timer_interrupt(struct pt_regs *regs) { int cpu = smp_processor_id(); #ifdef NOT_YET - clear_profile_irq(mid_xlate[cpu]); - if(!user_mode(regs)) + clear_profile_irq(mid_xlate[cpu]); + if(!user_mode(regs)) alpha_do_profile(regs->pc); #endif - if (!--prof_counter[cpu]) { + if (!--prof_counter[cpu]) { int user = user_mode(regs); - if (current->pid) { + if (current->pid) { update_one_process(current, 1, user, !user, cpu); - if (--current->counter < 0) { + if (--current->counter < 0) { current->counter = 0; - current->need_resched = 1; - } + current->need_resched = 1; + } - spin_lock(&ticker_lock); - if (user) { + spin_lock(&ticker_lock); + if (user) { if (current->priority < DEF_PRIORITY) { kstat.cpu_nice++; kstat.per_cpu_nice[cpu]++; @@ -359,93 +404,86 @@ kstat.cpu_user++; kstat.per_cpu_user[cpu]++; } - } else { + } else { kstat.cpu_system++; kstat.per_cpu_system[cpu]++; - } - spin_unlock(&ticker_lock); - } - prof_counter[cpu] = prof_multiplier[cpu]; - } + } + spin_unlock(&ticker_lock); + } + prof_counter[cpu] = prof_multiplier[cpu]; + } } -int setup_profiling_timer(unsigned int multiplier) +int __init +setup_profiling_timer(unsigned int multiplier) { #ifdef NOT_YET - int i; - unsigned long flags; + int i; + unsigned long flags; - /* Prevent level14 ticker IRQ flooding. */ - if((!multiplier) || (lvl14_resolution / multiplier) < 500) - return -EINVAL; - - save_and_cli(flags); - for(i = 0; i < NR_CPUS; i++) { - if(cpu_present_map & (1 << i)) { - load_profile_irq(mid_xlate[i], lvl14_resolution / multip + /* Prevent level14 ticker IRQ flooding. */ + if((!multiplier) || (lvl14_resolution / multiplier) < 500) + return -EINVAL; + + save_and_cli(flags); + for(i = 0; i < NR_CPUS; i++) { + if(cpu_present_map & (1 << i)) { + load_profile_irq(mid_xlate[i], lvl14_resolution / multip lier); - prof_multiplier[i] = multiplier; - } - } - restore_flags(flags); + prof_multiplier[i] = multiplier; + } + } + restore_flags(flags); - return 0; + return 0; #endif return -EINVAL; } -/* Only broken Intel needs this, thus it should not even be referenced globally. -*/ -__initfunc(void initialize_secondary(void)) +/* Only broken Intel needs this, thus it should not even be + referenced globally. */ + +void __init +initialize_secondary(void) { - printk("initialize_secondary: entry\n"); } -static void +static void __init secondary_cpu_start(int cpuid, struct task_struct *idle) { struct percpu_struct *cpu; - int timeout; + int timeout; cpu = (struct percpu_struct *) ((char*)hwrpb - + hwrpb->processor_offset - + cpuid * hwrpb->processor_size); + + hwrpb->processor_offset + + cpuid * hwrpb->processor_size); - /* set context to idle thread this CPU will use when running */ - /* assumption is that the idle thread is all set to go... ??? */ + /* Set context to idle thread this CPU will use when running + assumption is that the idle thread is all set to go... ??? */ memcpy(&cpu->hwpcb[0], &idle->tss, sizeof(struct pcb_struct)); cpu->hwpcb[4] = cpu->hwpcb[0]; /* UNIQUE set to KSP ??? */ -#if 0 -printk("KSP 0x%lx PTBR 0x%lx VPTBR 0x%lx\n", - cpu->hwpcb[0], cpu->hwpcb[2], hwrpb->vptb); -printk("Starting secondary cpu %d: state 0x%lx pal_flags 0x%lx\n", - cpuid, idle->state, idle->tss.pal_flags); -#endif - - /* setup HWRPB fields that SRM uses to activate secondary CPU */ - hwrpb->CPU_restart = __start_cpu; - hwrpb->CPU_restart_data = (unsigned long) idle; - - /* recalculate and update the HWRPB checksum */ - { - unsigned long sum, *lp1, *lp2; - sum = 0; - lp1 = (unsigned long *)hwrpb; - lp2 = &hwrpb->chksum; - while (lp1 < lp2) - sum += *lp1++; - *lp2 = sum; - } + + DBGS(("KSP 0x%lx PTBR 0x%lx VPTBR 0x%lx\n", + cpu->hwpcb[0], cpu->hwpcb[2], hwrpb->vptb)); + DBGS(("Starting secondary cpu %d: state 0x%lx pal_flags 0x%lx\n", + cpuid, idle->state, idle->tss.pal_flags)); + + /* Setup HWRPB fields that SRM uses to activate secondary CPU */ + hwrpb->CPU_restart = __start_cpu; + hwrpb->CPU_restart_data = (unsigned long) idle; + + /* Recalculate and update the HWRPB checksum */ + hwrpb_update_checksum(hwrpb); /* * Send a "start" command to the specified processor. */ /* SRM III 3.4.1.3 */ - cpu->flags |= 0x22; /* turn on Context Valid and Restart Capable */ - cpu->flags &= ~1;/* turn off Bootstrap In Progress */ + cpu->flags |= 0x22; /* turn on Context Valid and Restart Capable */ + cpu->flags &= ~1; /* turn off Bootstrap In Progress */ mb(); send_cpu_msg("START\r\n", cpuid); @@ -454,7 +492,7 @@ for (timeout = 10000; !(cpu->flags & 1); timeout--) { if (timeout <= 0) { printk("Processor %d failed to start\n", cpuid); - /* needed for pset_info to work */ + /* needed for pset_info to work */ #if 0 ipc_processor_enable(cpu_to_processor(cpunum)); #endif @@ -462,49 +500,61 @@ } mdelay(1); } -#if 0 - printk("secondary_cpu_start: SUCCESS for CPU %d!!!\n", cpuid); -#endif + DBGS(("secondary_cpu_start: SUCCESS for CPU %d!!!\n", cpuid)); } static void send_cpu_msg(char *str, int cpuid) { struct percpu_struct *cpu; - register char *cp1, *cp2; - unsigned long cpumask; - int timeout; + register char *cp1, *cp2; + unsigned long cpumask; + size_t len; + int timeout; - cpu = (struct percpu_struct *) ((char*)hwrpb - + hwrpb->processor_offset - + cpuid * hwrpb->processor_size); + + hwrpb->processor_offset + + cpuid * hwrpb->processor_size); + + cpumask = (1L << cpuid); + if (hwrpb->txrdy & cpumask) + goto delay1; + ready1: + + cp2 = str; + len = strlen(cp2); + *(unsigned int *)&cpu->ipc_buffer[0] = len; + cp1 = (char *) &cpu->ipc_buffer[1]; + memcpy(cp1, cp2, len); + + /* atomic test and set */ + set_bit(cpuid, &hwrpb->rxrdy); + + if (hwrpb->txrdy & cpumask) + goto delay2; + ready2: + return; - cpumask = (1L << cpuid); - for (timeout = 10000; (hwrpb->txrdy & cpumask); timeout--) { - if (timeout <= 0) { - printk("Processor %x not ready\n", cpuid); - return; - } - mdelay(1); - } - - cp1 = (char *) &cpu->ipc_buffer[1]; - cp2 = str; - while (*cp2) *cp1++ = *cp2++; - *(unsigned int *)&cpu->ipc_buffer[0] = cp2 - str; /* hack */ - - /* atomic test and set */ - set_bit(cpuid, &hwrpb->rxrdy); - - for (timeout = 10000; (hwrpb->txrdy & cpumask); timeout--) { - if (timeout <= 0) { - printk("Processor %x not ready\n", cpuid); - return; - } - mdelay(1); - } +delay1: + for (timeout = 10000; timeout > 0; --timeout) { + if (!(hwrpb->txrdy & cpumask)) + goto ready1; + udelay(100); + } + goto timeout; + +delay2: + for (timeout = 10000; timeout > 0; --timeout) { + if (!(hwrpb->txrdy & cpumask)) + goto ready2; + udelay(100); + } + goto timeout; + +timeout: + printk("Processor %x not ready\n", cpuid); + return; } /* @@ -512,7 +562,8 @@ * * called from arch/alpha/kernel/setup.c:setup_arch() when __SMP__ defined */ -__initfunc(void setup_smp(void)) +void __init +setup_smp(void) { struct percpu_struct *cpubase, *cpu; int i; @@ -523,10 +574,10 @@ } if (hwrpb->nr_processors > 1) { -#if 0 -printk("setup_smp: nr_processors 0x%lx\n", - hwrpb->nr_processors); -#endif + + DBGS(("setup_smp: nr_processors %ld\n", + hwrpb->nr_processors)); + cpubase = (struct percpu_struct *) ((char*)hwrpb + hwrpb->processor_offset); boot_cpu_palrev = cpubase->pal_revision; @@ -541,12 +592,11 @@ if (i != boot_cpu_id) cpu->pal_revision = boot_cpu_palrev; } -#if 0 -printk("setup_smp: CPU %d: flags 0x%lx type 0x%lx\n", - i, cpu->flags, cpu->type); - printk("setup_smp: CPU %d: PAL rev 0x%lx\n", - i, cpu->pal_revision); -#endif + + DBGS(("setup_smp: CPU %d: flags 0x%lx type 0x%lx\n", + i, cpu->flags, cpu->type)); + DBGS(("setup_smp: CPU %d: PAL rev 0x%lx\n", + i, cpu->pal_revision)); } } else { smp_num_probed = 1; @@ -560,132 +610,59 @@ static void secondary_console_message(void) { - int mycpu, i, cnt; + int mycpu, i, cnt; unsigned long txrdy = hwrpb->txrdy; char *cp1, *cp2, buf[80]; - struct percpu_struct *cpu; - - mycpu = hard_smp_processor_id(); - -#if 0 -printk("secondary_console_message: TXRDY 0x%lx.\n", txrdy); -#endif - for (i = 0; i < NR_CPUS; i++) { - if (txrdy & (1L << i)) { -#if 0 -printk("secondary_console_message: TXRDY contains CPU %d.\n", i); -#endif - cpu = (struct percpu_struct *) - ((char*)hwrpb - + hwrpb->processor_offset - + i * hwrpb->processor_size); -#if 1 - printk("secondary_console_message: on %d from %d" - " HALT_REASON 0x%lx FLAGS 0x%lx\n", - mycpu, i, cpu->halt_reason, cpu->flags); -#endif - cnt = cpu->ipc_buffer[0] >> 32; - if (cnt <= 0 || cnt >= 80) - strcpy(buf,"<<< BOGUS MSG >>>"); - else { - cp1 = (char *) &cpu->ipc_buffer[11]; - cp2 = buf; - while (cnt--) { - if (*cp1 == '\r' || *cp1 == '\n') { - *cp2++ = ' '; cp1++; - } else - *cp2++ = *cp1++; - } - *cp2 = 0; - } -#if 1 - printk("secondary_console_message: on %d message is '%s'\n", - mycpu, buf); -#endif - } - } - hwrpb->txrdy = 0; - return; -} - -static int -halt_on_panic(unsigned int this_cpu) -{ - halt(); - return 0; -} + struct percpu_struct *cpu; -static int -local_flush_tlb_all(unsigned int this_cpu) -{ - tbia(); - clear_bit(this_cpu, &ipi_msg_flush_tb.flush_tb_mask); - return 0; -} + DBGS(("secondary_console_message: TXRDY 0x%lx.\n", txrdy)); -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_current(mm); - clear_bit(this_cpu, &ipi_msg_flush_tb.flush_tb_mask); - return 0; -} + mycpu = hard_smp_processor_id(); -static int -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; + for (i = 0; i < NR_CPUS; i++) { + if (!(txrdy & (1L << i))) + continue; - 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); - return 0; -} + DBGS(("secondary_console_message: " + "TXRDY contains CPU %d.\n", i)); -static int -wrapper_local_flush_tlb_page(unsigned int this_cpu) -{ -#if 0 - int cpu = smp_processor_id(); + cpu = (struct percpu_struct *) + ((char*)hwrpb + + hwrpb->processor_offset + + i * hwrpb->processor_size); + + printk("secondary_console_message: on %d from %d" + " HALT_REASON 0x%lx FLAGS 0x%lx\n", + mycpu, i, cpu->halt_reason, cpu->flags); + + cnt = cpu->ipc_buffer[0] >> 32; + if (cnt <= 0 || cnt >= 80) + strcpy(buf, "<<< BOGUS MSG >>>"); + else { + cp1 = (char *) &cpu->ipc_buffer[11]; + cp2 = buf; + strcpy(cp2, cp1); + + while ((cp2 = strchr(cp2, '\r')) != 0) { + *cp2 = ' '; + if (cp2[1] == '\n') + cp2[1] = ' '; + } + } - if (cpu) { - printk("wrapper: ipi_msg_flush_tb.flush_addr 0x%lx [%d]\n", - ipi_msg_flush_tb.flush_addr, atomic_read(&global_irq_count)); + printk("secondary_console_message: on %d message is '%s'\n", + mycpu, buf); } -#endif - local_flush_tlb_page(this_cpu); - return 0; -} -static int -unknown_ipi(unsigned int this_cpu) -{ - printk("unknown_ipi() on CPU %d: ", this_cpu); - return 1; + hwrpb->txrdy = 0; } enum ipi_message_type { - CPU_STOP, - TLB_ALL, - TLB_MM, - TLB_PAGE, - TLB_RANGE -}; - -static int (* ipi_func[32])(unsigned int) = { - halt_on_panic, - local_flush_tlb_all, - local_flush_tlb_mm, - wrapper_local_flush_tlb_page, - local_flush_tlb_mm, /* a.k.a. local_flush_tlb_range */ - unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, - unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, - unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, - unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, unknown_ipi, - unknown_ipi, unknown_ipi, unknown_ipi + IPI_TLB_ALL, + IPI_TLB_MM, + IPI_TLB_PAGE, + IPI_RESCHEDULE, + IPI_CPU_STOP }; void @@ -693,122 +670,165 @@ { int this_cpu = smp_processor_id(); volatile int * pending_ipis = &ipi_bits[this_cpu]; - int ops; + unsigned long ops; - 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); -#endif - while ((ops = *pending_ipis)) { - int first; - for (first = 0; (ops & 1) == 0; ++first, ops >>= 1) - ; /* look for the first thing to do */ - clear_bit(first, pending_ipis); - mb(); /* Order bit clearing and data access. */ - if ((*ipi_func[first])(this_cpu)) - printk("%d\n", first); - mb(); /* Order data access and bit clearing. */ + DBGS(("handle_ipi: on CPU %d ops 0x%x PC 0x%lx\n", + this_cpu, *pending_ipis, regs->pc)); + + mb(); /* Order interrupt and bit testing. */ + while ((ops = xchg(pending_ipis, 0)) != 0) { + mb(); /* Order bit clearing and data access. */ + do { + unsigned long which; + + which = ops & -ops; + ops &= ~which; + which = ffz(~which); + + if (which < IPI_RESCHEDULE) { + if (which == IPI_TLB_ALL) + tbia(); + else if (which == IPI_TLB_MM) { + struct mm_struct * mm; + mm = ipi_msg_flush_tb.p.flush_mm; + if (mm == current->mm) + flush_tlb_current(mm); + } + else /* IPI_TLB_PAGE */ { + struct vm_area_struct * vma; + struct mm_struct * mm; + unsigned long addr; + + vma = ipi_msg_flush_tb.p.flush_vma; + mm = vma->vm_mm; + addr = ipi_msg_flush_tb.flush_addr; + + if (mm == current->mm) + flush_tlb_current_page(mm, vma, addr); + } + clear_bit(this_cpu, &ipi_msg_flush_tb.flush_tb_mask); + } + else if (which == IPI_RESCHEDULE) { + /* Reschedule callback. Everything to be done + is done by the interrupt return path. */ + } + else if (which == IPI_CPU_STOP) { + halt(); + } + else { + printk(KERN_CRIT "unknown_ipi() on CPU %d: %lu\n", + this_cpu, which); + } + } while (ops); + mb(); /* Order data access and bit testing. */ } + + cpu_data[this_cpu].ipi_count++; + if (hwrpb->txrdy) - secondary_console_message(); + secondary_console_message(); } -void -send_ipi_message(long to_whom, enum ipi_message_type operation) +static void +send_ipi_message(unsigned long to_whom, enum ipi_message_type operation) { - int i; - unsigned int j; + long i, 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(); /* Order bit setting and interrupt. */ - wripir(i); + /* Reduce the number of memory barriers by doing two loops, + one to set the bits, one to invoke the interrupts. */ + + mb(); /* Order out-of-band data and bit setting. */ + + for (i = 0, j = 1; i < NR_CPUS; ++i, j <<= 1) { + if (to_whom & j) + set_bit(operation, &ipi_bits[i]); + } + + mb(); /* Order bit setting and interrupt. */ + + for (i = 0, j = 1; i < NR_CPUS; ++i, j <<= 1) { + if (to_whom & j) + wripir(i); } } int smp_info(char *buffer) { - int i; + long i; unsigned long sum = 0; for (i = 0; i < NR_CPUS; i++) - sum += ipicnt[i]; + sum += cpu_data[i].ipi_count; - return sprintf(buffer, "CPUs probed %d active %d map 0x%x IPIs %ld\n", + 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() */ void -smp_message_pass(int target, int msg, unsigned long data, int wait) +smp_send_reschedule(int cpu) { - int me = smp_processor_id(); - - if (msg != MSG_STOP_CPU) - goto barf; + send_ipi_message(1 << cpu, IPI_RESCHEDULE); +} - send_ipi_message(CPU_STOP, cpu_present_map ^ (1 << me)); - return; -barf: - printk("Yeeee, trying to send SMP msg(%d) on CPU %d\n", msg, me); - panic("Bogon SMP message pass."); +void +smp_send_stop(void) +{ + unsigned long to_whom = cpu_present_map ^ (1 << smp_processor_id()); + send_ipi_message(to_whom, IPI_CPU_STOP); } void flush_tlb_all(void) { - unsigned int to_whom = cpu_present_map ^ (1 << smp_processor_id()); - int timeout = 10000; + unsigned long to_whom = cpu_present_map ^ (1 << smp_processor_id()); + long timeout = 1000000; spin_lock_own(&kernel_flag, "flush_tlb_all"); ipi_msg_flush_tb.flush_tb_mask = to_whom; - send_ipi_message(to_whom, TLB_ALL); + send_ipi_message(to_whom, IPI_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; - } - /* Wait for all clear from other CPUs. */ - udelay(100); + while (ipi_msg_flush_tb.flush_tb_mask && --timeout) { + udelay(1); + barrier(); + } + + 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; } } void flush_tlb_mm(struct mm_struct *mm) { - unsigned int to_whom = cpu_present_map ^ (1 << smp_processor_id()); - int timeout = 10000; + unsigned long to_whom = cpu_present_map ^ (1 << smp_processor_id()); + long timeout = 1000000; 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); + ipi_msg_flush_tb.p.flush_mm = mm; + send_ipi_message(to_whom, IPI_TLB_MM); if (mm != current->mm) flush_tlb_other(mm); else flush_tlb_current(mm); - while (ipi_msg_flush_tb.flush_tb_mask) { - if (--timeout < 0) { - printk("flush_tlb_mm: 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. */ + while (ipi_msg_flush_tb.flush_tb_mask && --timeout) { + udelay(1); + barrier(); + } + + if (timeout == 0) { + printk("flush_tlb_mm: 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; } } @@ -816,68 +836,40 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) { int cpu = smp_processor_id(); - unsigned int to_whom = cpu_present_map ^ (1 << cpu); + unsigned long to_whom = cpu_present_map ^ (1 << cpu); struct mm_struct * mm = vma->vm_mm; - int timeout = 10000; + int timeout = 1000000; spin_lock_own(&kernel_flag, "flush_tlb_page"); + ipi_msg_flush_tb.flush_tb_mask = to_whom; ipi_msg_flush_tb.p.flush_vma = vma; ipi_msg_flush_tb.flush_addr = addr; - ipi_msg_flush_tb.flush_tb_mask = to_whom; - send_ipi_message(to_whom, TLB_PAGE); + send_ipi_message(to_whom, IPI_TLB_PAGE); if (mm != current->mm) flush_tlb_other(mm); else flush_tlb_current_page(mm, vma, addr); - while (ipi_msg_flush_tb.flush_tb_mask) { - if (--timeout < 0) { - printk("flush_tlb_page: STUCK on CPU %d [0x%x,0x%lx,%d]\n", - cpu, ipi_msg_flush_tb.flush_tb_mask, addr, - global_irq_holder); - ipi_msg_flush_tb.flush_tb_mask = 0; - break; - } - udelay(100); - ; /* Wait for all clear from other CPUs. */ + while (ipi_msg_flush_tb.flush_tb_mask && --timeout) { + udelay(1); + barrier(); + } + + if (timeout == 0) { + printk("flush_tlb_page: 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; } } void flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) { -#if 0 + /* On the Alpha we always flush the whole user tlb. */ flush_tlb_mm(mm); -#else - unsigned int to_whom; - int timeout; - - 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); - - if (mm != current->mm) - flush_tlb_other(mm); - else - flush_tlb_current(mm); - - while (ipi_msg_flush_tb.flush_tb_mask) { - if (--timeout < 0) { - printk("flush_tlb_range: 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. */ - } -#endif } #if DEBUG_SPINLOCK @@ -902,8 +894,8 @@ #else -#define spinlock_raise_ipl(LOCK) 0 -#define spinlock_restore_ipl(PREV) ((void)0) +#define spinlock_raise_ipl(LOCK) ((void)(LOCK), 0) +#define spinlock_restore_ipl(PREV) ((void)(PREV)) #endif /* MANAGE_SPINLOCK_IPL */ diff -ur --new-file old/linux/arch/alpha/kernel/sys_dp264.c new/linux/arch/alpha/kernel/sys_dp264.c --- old/linux/arch/alpha/kernel/sys_dp264.c Sun Sep 6 19:34:33 1998 +++ new/linux/arch/alpha/kernel/sys_dp264.c Sun Jan 10 18:59:59 1999 @@ -25,12 +25,14 @@ #include #include #include +#include #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 @@ -123,6 +125,7 @@ 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.device_interrupt = dp264_srm_device_interrupt; @@ -217,8 +220,94 @@ }; 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 int __init +webbrick_map_irq(struct pci_dev *dev, int slot, int pin) +{ + static char irq_tab[13][5] __initlocaldata = { + /*INT INTA INTB INTC INTD */ + { -1, -1, -1, -1, -1}, /* IdSel 7 ISA Bridge */ + { -1, -1, -1, -1, -1}, /* IdSel 8 unused */ + { 29, 29, 29, 29, 29}, /* IdSel 9 21143 #1 */ + { -1, -1, -1, -1, -1}, /* IdSel 10 unused */ + { 30, 30, 30, 30, 30}, /* IdSel 11 21143 #2 */ + { -1, -1, -1, -1, -1}, /* IdSel 12 unused */ + { -1, -1, -1, -1, -1}, /* IdSel 13 unused */ + { 47, 47, 46, 45, 44}, /* IdSel 14 slot 0 */ + { 39, 39, 38, 37, 36}, /* IdSel 15 slot 1 */ + { 43, 43, 42, 41, 40}, /* IdSel 16 slot 2 */ + { 35, 35, 34, 33, 32}, /* IdSel 17 slot 3 */ +}; + const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5; + int irq = COMMON_TABLE_LOOKUP; + return irq; } @@ -230,9 +319,26 @@ 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(); +} + +static void __init +webbrick_pci_fixup(void) +{ + layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE); + common_pci_fixup(webbrick_map_irq, common_swizzle); + SMC669_Init(); +} + /* - * The System Vector + * The System Vectors */ struct alpha_machine_vector dp264_mv __initmv = { @@ -257,3 +363,49 @@ 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, +}; + +struct alpha_machine_vector webbrick_mv __initmv = { + vector_name: "Webbrick", + 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: webbrick_pci_fixup, + kill_arch: generic_kill_arch, +}; +/* No alpha_mv alias for webbrick, since we compile it in unconditionally + with DP264; setup_arch knows how to cope. */ diff -ur --new-file old/linux/arch/alpha/kernel/sys_miata.c new/linux/arch/alpha/kernel/sys_miata.c --- old/linux/arch/alpha/kernel/sys_miata.c Sun Sep 6 19:34:33 1998 +++ new/linux/arch/alpha/kernel/sys_miata.c Wed Nov 25 23:52:22 1998 @@ -36,7 +36,7 @@ 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 @@ * 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 @@ * 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 @@ 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 @@ { -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 @@ /* 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 @@ 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 -ur --new-file old/linux/arch/alpha/kernel/sys_rawhide.c new/linux/arch/alpha/kernel/sys_rawhide.c --- old/linux/arch/alpha/kernel/sys_rawhide.c Sun Sep 6 19:34:33 1998 +++ new/linux/arch/alpha/kernel/sys_rawhide.c Sun Jan 10 18:59:59 1999 @@ -159,7 +159,7 @@ static void __init rawhide_pci_fixup(void) { - layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE); + layout_all_busses(DEFAULT_IO_BASE, RAWHIDE_DEFAULT_MEM_BASE); common_pci_fixup(rawhide_map_irq, common_swizzle); } diff -ur --new-file old/linux/arch/alpha/kernel/sys_ruffian.c new/linux/arch/alpha/kernel/sys_ruffian.c --- old/linux/arch/alpha/kernel/sys_ruffian.c Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/kernel/sys_ruffian.c Sun Jan 10 04:08:27 1999 @@ -62,7 +62,7 @@ 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; } @@ -82,7 +82,7 @@ * then all the PCI slots/INTXs (12-31) * flash(5) :DWH: */ - pld &= 0x00000000ffffff9fUL; /* was ffff7f */ + pld &= 0x00000000ffffff9fUL; /* was ffff7f */ /* * Now for every possible bit set, work through them and call @@ -91,8 +91,14 @@ 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 */ + /* Ruffian does not have the RTC connected to + the CPU timer interrupt. Instead, it uses the + PIT connected to IRQ 0. So we must detect that + and route that specifically to where we expected + to find the timer interrupt come in. */ + + /* 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,18 +113,17 @@ if (j == 7 && !(inb(0x20) & 0x80)) { /* It's only a passive release... */ } else if (j == 0) { - timer_interrupt(0, NULL, regs); + handle_irq(TIMER_IRQ, -1, regs); 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); } - *(vulp)PYXIS_INT_REQ = 1UL << i; mb(); - *(vulp)PYXIS_INT_REQ; /* read to force the write */ + *(vulp)PYXIS_INT_REQ = 1UL << i; mb(); + *(vulp)PYXIS_INT_REQ; /* read to force the write */ } } @@ -171,6 +176,7 @@ } +#ifdef BUILDING_FOR_MILO /* * The DeskStation Ruffian motherboard firmware does not place * the memory size in the PALimpure area. Therefore, we use @@ -207,6 +213,7 @@ return ret; } +#endif /* BUILDING_FOR_MILO */ static void __init ruffian_init_arch(unsigned long *mem_start, unsigned long *mem_end) @@ -215,7 +222,7 @@ pyxis_enable_errors(); if (!pyxis_srm_window_setup()) { - printk("ruffian_init_arch: Skipping window register rewrites." + printk("ruffian_init_arch: Skipping window register rewrites." "\n... Trust DeskStation firmware!\n"); } pyxis_finish_init_arch(); @@ -226,16 +233,21 @@ { /* Ruffian depends on the system timer established in MILO! */ request_region(0x70, 0x10, "timer"); - init_pit_rest(); + + outb(0xb6, 0x43); /* pit counter 2: speaker */ + outb(0x31, 0x42); + outb(0x13, 0x42); } 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); } diff -ur --new-file old/linux/arch/alpha/kernel/sys_rx164.c new/linux/arch/alpha/kernel/sys_rx164.c --- old/linux/arch/alpha/kernel/sys_rx164.c Thu Jan 1 01:00:00 1970 +++ new/linux/arch/alpha/kernel/sys_rx164.c Mon Jan 25 06:29:53 1999 @@ -0,0 +1,235 @@ +/* + * linux/arch/alpha/kernel/sys_rx164.c + * + * Copyright (C) 1995 David A Rusling + * Copyright (C) 1996 Jay A Estabrook + * Copyright (C) 1998 Richard Henderson + * + * Code supporting the RX164 (PCA56+POLARIS). + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "proto.h" +#include "irq.h" +#include "bios32.h" +#include "machvec.h" + + +static void +rx164_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p) +{ + if (irq >= 16) { + unsigned int temp; + pcibios_write_config_dword(0, 0, 0x74, ~mask >> 16); + pcibios_read_config_dword(0, 0, 0x74, &temp); + } + else if (irq >= 8) + outb(mask >> 8, 0xA1); /* ISA PIC2 */ + else + outb(mask, 0x21); /* ISA PIC1 */ +} + +static void +rx164_srm_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p) +{ +#if 0 + if (irq >= 16) { + if (unmask_p) + cserve_ena(irq - 16); + else + cserve_dis(irq - 16); + } + else if (irq >= 8) + outb(mask >> 8, 0xA1); /* ISA PIC2 */ + else + outb(mask, 0x21); /* ISA PIC1 */ +#endif +} + +static void +rx164_isa_device_interrupt(unsigned long vector, struct pt_regs * regs) +{ + unsigned long pic; + + /* + * It seems to me that the probability of two or more *device* + * interrupts occurring at almost exactly the same time is + * pretty low. So why pay the price of checking for + * additional interrupts here if the common case can be + * handled so much easier? + */ + /* + * The first read of the PIC gives you *all* interrupting lines. + * Therefore, read the mask register and and out those lines + * not enabled. Note that some documentation has 21 and a1 + * write only. This is not true. + */ + pic = inb(0x20) | (inb(0xA0) << 8); /* read isr */ + pic &= ~alpha_irq_mask; /* apply mask */ + pic &= 0xFFFB; /* mask out cascade & hibits */ + + while (pic) { + int j = ffz(~pic); + pic &= pic - 1; + handle_irq(j, j, regs); + } +} + +static void +rx164_device_interrupt(unsigned long vector, struct pt_regs *regs) +{ + unsigned long pld; + int i; + + /* Read the interrupt summary register. On Polaris, + * this is the DIRR register in PCI config space (offset 0x84) + */ + pld = 0; + pcibios_read_config_dword(0, 0, 0x84, (unsigned int *)&pld); + +#if 0 + printk("PLD 0x%lx\n", pld); +#endif + + if (pld & 0xffffffff00000000UL) pld &= 0x00000000ffffffffUL; + + /* + * Now for every possible bit set, work through them and call + * the appropriate interrupt handler. + */ + while (pld) { + i = ffz(~pld); + pld &= pld - 1; /* clear least bit set */ + if (i == 20) { + rx164_isa_device_interrupt(vector, regs); + } else { + handle_irq(16+i, 16+i, regs); + } + } +} + +static void +rx164_init_irq(void) +{ + unsigned int temp; + + STANDARD_INIT_IRQ_PROLOG; + + pcibios_write_config_dword(0, 0, 0x74, (~alpha_irq_mask >> 16)); + pcibios_read_config_dword(0, 0, 0x74, &temp); + + enable_irq(16 + 20); /* enable ISA interrupts */ + enable_irq(2); /* enable cascade */ +} +/* The RX164 changed its interrupt routing between pass1 and pass2... + * + * PASS1: + * + * Slot IDSEL INTA INTB INTC INTD + * 0 6 5 10 15 20 + * 1 7 4 9 14 19 + * 2 5 3 8 13 18 + * 3 9 2 7 12 17 + * 4 10 1 6 11 16 + * + * PASS2: + * Slot IDSEL INTA INTB INTC INTD + * 0 5 1 7 12 17 + * 1 6 2 8 13 18 + * 2 8 3 9 14 19 + * 3 9 4 10 15 20 + * 4 10 5 11 16 6 + * + */ + +/* + * IdSel + * 5 32 bit PCI option slot 0 + * 6 64 bit PCI option slot 1 + * 7 PCI-ISA bridge + * 7 64 bit PCI option slot 2 + * 9 32 bit PCI option slot 3 + * 10 PCI-PCI bridge + * + */ + +static int __init +rx164_map_irq(struct pci_dev *dev, int slot, int pin) +{ +#if 0 + char irq_tab_pass1[6][5] = { + /*INT INTA INTB INTC INTD */ + { 16+3, 16+3, 16+8, 16+13, 16+18}, /* IdSel 5, slot 2 */ + { 16+5, 16+5, 16+10, 16+15, 16+20}, /* IdSel 6, slot 0 */ + { 16+4, 16+4, 16+9, 16+14, 16+19}, /* IdSel 7, slot 1 */ + { -1, -1, -1, -1, -1}, /* IdSel 8, PCI/ISA bridge */ + { 16+2, 16+2, 16+7, 16+12, 16+17}, /* IdSel 9, slot 3 */ + { 16+1, 16+1, 16+6, 16+11, 16+16}, /* IdSel 10, slot 4 */ + }; +#endif + char irq_tab[6][5] = { + /*INT INTA INTB INTC INTD */ + { 16+0, 16+0, 16+6, 16+11, 16+16}, /* IdSel 5, slot 0 */ + { 16+1, 16+1, 16+7, 16+12, 16+17}, /* IdSel 6, slot 1 */ + { -1, -1, -1, -1, -1}, /* IdSel 7, PCI/ISA bridge */ + { 16+2, 16+2, 16+8, 16+13, 16+18}, /* IdSel 8, slot 2 */ + { 16+3, 16+3, 16+9, 16+14, 16+19}, /* IdSel 9, slot 3 */ + { 16+4, 16+4, 16+10, 16+15, 16+5}, /* IdSel 10, PCI-PCI */ + }; + const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5; + /* JRP - Need to figure out how to distinguish pass1 from pass2, + * and use the correct table... + */ + return COMMON_TABLE_LOOKUP; +} + +void __init +rx164_pci_fixup(void) +{ + layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE); + common_pci_fixup(rx164_map_irq, common_swizzle); +} + + +/* + * The System Vector + */ + +struct alpha_machine_vector rx164_mv __initmv = { + vector_name: "RX164", + DO_EV5_MMU, + DO_DEFAULT_RTC, + DO_POLARIS_IO, + DO_POLARIS_BUS, + machine_check: polaris_machine_check, + max_dma_address: ALPHA_MAX_DMA_ADDRESS, + + nr_irqs: 40, + irq_probe_mask: _PROBE_MASK(40), + update_irq_hw: rx164_update_irq_hw, + ack_irq: generic_ack_irq, + device_interrupt: rx164_device_interrupt, + + init_arch: polaris_init_arch, + init_irq: rx164_init_irq, + init_pit: generic_init_pit, + pci_fixup: rx164_pci_fixup, + kill_arch: generic_kill_arch, +}; +ALIAS_MV(rx164) diff -ur --new-file old/linux/arch/alpha/kernel/sys_sio.c new/linux/arch/alpha/kernel/sys_sio.c --- old/linux/arch/alpha/kernel/sys_sio.c Sun Aug 9 21:09:05 1998 +++ new/linux/arch/alpha/kernel/sys_sio.c Thu Jan 21 20:26:30 1999 @@ -110,6 +110,9 @@ * * 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; @@ -229,7 +232,7 @@ * selected... :-( */ layout_all_busses(DEFAULT_IO_BASE, APECS_AND_LCA_DEFAULT_MEM_BASE); - sio_pci_fixup(noname_map_irq, 0x0b0a0f09); + sio_pci_fixup(noname_map_irq, 0x0b0a0f0d); sio_fixup_irq_levels(sio_collect_irq_levels()); enable_ide(0x26e); } @@ -238,7 +241,7 @@ 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 -ur --new-file old/linux/arch/alpha/kernel/time.c new/linux/arch/alpha/kernel/time.c --- old/linux/arch/alpha/kernel/time.c Tue Oct 20 18:43:21 1998 +++ new/linux/arch/alpha/kernel/time.c Tue Jan 19 19:19:38 1999 @@ -10,6 +10,8 @@ * 1995-03-26 Markus Kuhn * fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887 * precision CMOS clock update + * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 + * "A Kernel Model for Precision Timekeeping" by Dave Mills * 1997-01-09 Adrian Sun * use interval timer if CONFIG_RTC=y * 1997-10-29 John Bowman (bowman@math.ualberta.ca) @@ -35,12 +37,7 @@ #include #include "proto.h" - -#ifdef CONFIG_RTC -#define TIMER_IRQ 0 /* using pit for timer */ -#else -#define TIMER_IRQ 8 /* using rtc for timer */ -#endif +#include "irq.h" static int set_rtc_mmss(unsigned long); @@ -60,6 +57,8 @@ 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; @@ -79,8 +78,6 @@ */ 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; @@ -96,32 +93,31 @@ #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 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be * called as close as possible to 500 ms before the new second starts. */ - if (time_state != TIME_BAD + if ((time_status & STA_UNSYNC) == 0 && xtime.tv_sec > state.last_rtc_update + 660 - && xtime.tv_usec >= 500000 - (tick >> 1) - && xtime.tv_usec <= 500000 + (tick >> 1)) { + && xtime.tv_usec >= 500000 - ((unsigned) tick) / 2 + && xtime.tv_usec <= 500000 + ((unsigned) tick) / 2) { int tmp = set_rtc_mmss(xtime.tv_sec); state.last_rtc_update = xtime.tv_sec - (tmp ? 600 : 0); } @@ -164,43 +160,28 @@ * drivers depend on them being initialized (e.g., joystick driver). */ -/* It is (normally) only counter 0 that presents config problems, so - provide this support function to do the rest of the job. */ - -void inline -init_pit_rest(void) -{ -#if 0 - /* Leave refresh timer alone---nobody should depend on a - particular value anyway. */ - outb(0x54, 0x43); /* counter 1: refresh timer */ - outb(0x18, 0x41); -#endif - - outb(0xb6, 0x43); /* counter 2: speaker */ - outb(0x31, 0x42); - outb(0x13, 0x42); -} - #ifdef CONFIG_RTC -static inline void +void rtc_init_pit (void) { unsigned char control; - /* Setup interval timer if /dev/rtc is being used */ + /* 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); + (void) CMOS_READ(RTC_INTR_FLAGS); + + request_region(0x40, 0x20, "timer"); /* reserve pit */ + + /* Setup interval timer. */ 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(); + outb(0xb6, 0x43); /* pit counter 2: speaker */ + outb(0x31, 0x42); + outb(0x13, 0x42); } #endif @@ -209,7 +190,7 @@ { unsigned char x; - /* Reset periodic interrupt frequency. */ + /* 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); @@ -224,36 +205,26 @@ x &= ~(RTC_AIE | RTC_UIE); CMOS_WRITE(x, RTC_CONTROL); } - CMOS_READ(RTC_INTR_FLAGS); + (void) CMOS_READ(RTC_INTR_FLAGS); request_region(RTC_PORT(0), 0x10, "timer"); /* reserve rtc */ - /* Turn off the PIT. */ - outb(0x36, 0x43); /* counter 0: system timer */ + outb(0x36, 0x43); /* pit counter 0: system timer */ outb(0x00, 0x40); outb(0x00, 0x40); - init_pit_rest(); + outb(0xb6, 0x43); /* pit counter 2: speaker */ + outb(0x31, 0x42); + outb(0x13, 0x42); } -/* This probably isn't Right, but it is what the old code did. */ -#if defined(CONFIG_RTC) -# define init_pit rtc_init_pit -#else -# define init_pit alpha_mv.init_pit -#endif - - void time_init(void) { - void (*irq_handler)(int, void *, struct pt_regs *); + 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(); - /* * The Linux interpretation of the CMOS clock register contents: * When the Update-In-Progress (UIP) flag goes from 1 to 0, the @@ -325,10 +296,11 @@ state.scaled_ticks_per_cycle = ((unsigned long) HZ << FIX_SHIFT) / cycle_freq; state.last_rtc_update = 0; + state.partial_tick = 0L; /* setup timer */ - irq_handler = timer_interrupt; - if (request_irq(TIMER_IRQ, irq_handler, 0, "timer", NULL)) + irq_handler = timer_interrupt; + if (request_irq(TIMER_IRQ, irq_handler, 0, "timer", NULL)) panic("Could not allocate timer IRQ!"); } @@ -366,7 +338,7 @@ */ 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) { @@ -383,9 +355,11 @@ { cli(); xtime = *tv; - time_state = TIME_BAD; - time_maxerror = 0x70000000; - time_esterror = 0x70000000; + time_adjust = 0; /* stop active adjtime() */ + time_status |= STA_UNSYNC; + time_state = TIME_ERROR; /* p. 24, (a) */ + time_maxerror = NTP_PHASE_LIMIT; + time_esterror = NTP_PHASE_LIMIT; sti(); } @@ -396,6 +370,9 @@ * 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 won't notice until after reboot! */ static int set_rtc_mmss(unsigned long nowtime) @@ -437,8 +414,12 @@ } CMOS_WRITE(real_seconds,RTC_SECONDS); CMOS_WRITE(real_minutes,RTC_MINUTES); - } else - retval = -1; + } 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 diff -ur --new-file old/linux/arch/alpha/lib/Makefile new/linux/arch/alpha/lib/Makefile --- old/linux/arch/alpha/lib/Makefile Mon Oct 12 20:40:12 1998 +++ new/linux/arch/alpha/lib/Makefile Sun Jan 17 02:02:51 1999 @@ -7,7 +7,7 @@ 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 semaphore.o \ srm_dispatch.o srm_fixup.o srm_puts.o srm_printk.o lib.a: $(OBJS) diff -ur --new-file old/linux/arch/alpha/lib/semaphore.S new/linux/arch/alpha/lib/semaphore.S --- old/linux/arch/alpha/lib/semaphore.S Thu Jan 1 01:00:00 1970 +++ new/linux/arch/alpha/lib/semaphore.S Wed Jan 27 19:18:03 1999 @@ -0,0 +1,183 @@ +/* + * linux/arch/alpha/lib/semaphore.S + * + * Copyright (C) 1999 Richard Henderson + */ + +/* + * The semaphore operations have a special calling sequence that + * allow us to do a simpler in-line version of them. These routines + * need to convert that sequence back into the C sequence when + * there is contention on the semaphore. + */ + + .set noat + .set noreorder + .align 4 + +/* __down_failed takes the semaphore in $24, clobbers $24 and $28. */ + + .globl __down_failed + .ent __down_failed +__down_failed: + ldgp $29,0($27) + lda $30, -20*8($30) + stq $28, 0*8($30) + stq $0, 1*8($30) + stq $1, 2*8($30) + stq $2, 3*8($30) + stq $3, 4*8($30) + stq $4, 5*8($30) + stq $5, 6*8($30) + stq $6, 7*8($30) + stq $7, 8*8($30) + stq $16, 9*8($30) + stq $17, 10*8($30) + stq $18, 11*8($30) + stq $19, 12*8($30) + stq $20, 13*8($30) + stq $21, 14*8($30) + stq $22, 15*8($30) + stq $23, 16*8($30) + stq $25, 17*8($30) + stq $26, 18*8($30) + .frame $30, 20*8, $28 + .prologue 1 + + mov $24, $16 + jsr __down + + ldq $28, 0*8($30) + ldq $0, 1*8($30) + ldq $1, 2*8($30) + ldq $2, 3*8($30) + ldq $3, 4*8($30) + ldq $4, 5*8($30) + ldq $5, 6*8($30) + ldq $6, 7*8($30) + ldq $7, 8*8($30) + ldq $16, 9*8($30) + ldq $17, 10*8($30) + ldq $18, 11*8($30) + ldq $19, 12*8($30) + ldq $20, 13*8($30) + ldq $21, 14*8($30) + ldq $22, 15*8($30) + ldq $23, 16*8($30) + ldq $25, 17*8($30) + ldq $26, 18*8($30) + lda $30, 20*8($30) + ret $31, ($28), 0 + .end __down_failed + +/* __down_failed_interruptible takes the semaphore in $24, + clobbers $28, returns success in $24. */ + + .globl __down_failed_interruptible + .ent __down_failed_interruptible +__down_failed_interruptible: + ldgp $29,0($27) + lda $30, -20*8($30) + stq $28, 0*8($30) + stq $0, 1*8($30) + stq $1, 2*8($30) + stq $2, 3*8($30) + stq $3, 4*8($30) + stq $4, 5*8($30) + stq $5, 6*8($30) + stq $6, 7*8($30) + stq $7, 8*8($30) + stq $16, 9*8($30) + stq $17, 10*8($30) + stq $18, 11*8($30) + stq $19, 12*8($30) + stq $20, 13*8($30) + stq $21, 14*8($30) + stq $22, 15*8($30) + stq $23, 16*8($30) + stq $25, 17*8($30) + stq $26, 18*8($30) + .frame $30, 20*8, $28 + .prologue 1 + + mov $24, $16 + jsr __down_interruptible + mov $0, $24 + + ldq $28, 0*8($30) + ldq $0, 1*8($30) + ldq $1, 2*8($30) + ldq $2, 3*8($30) + ldq $3, 4*8($30) + ldq $4, 5*8($30) + ldq $5, 6*8($30) + ldq $6, 7*8($30) + ldq $7, 8*8($30) + ldq $16, 9*8($30) + ldq $17, 10*8($30) + ldq $18, 11*8($30) + ldq $19, 12*8($30) + ldq $20, 13*8($30) + ldq $21, 14*8($30) + ldq $22, 15*8($30) + ldq $23, 16*8($30) + ldq $25, 17*8($30) + ldq $26, 18*8($30) + lda $30, 20*8($30) + ret $31, ($28), 0 + .end __down_failed_interruptible + +/* __up_wakeup takes the semaphore in $24, clobbers $24 and $28. */ + + .globl __up_wakeup + .ent __up_wakeup +__up_wakeup: + ldgp $29,0($27) + lda $30, -20*8($30) + stq $28, 0*8($30) + stq $0, 1*8($30) + stq $1, 2*8($30) + stq $2, 3*8($30) + stq $3, 4*8($30) + stq $4, 5*8($30) + stq $5, 6*8($30) + stq $6, 7*8($30) + stq $7, 8*8($30) + stq $16, 9*8($30) + stq $17, 10*8($30) + stq $18, 11*8($30) + stq $19, 12*8($30) + stq $20, 13*8($30) + stq $21, 14*8($30) + stq $22, 15*8($30) + stq $23, 16*8($30) + stq $25, 17*8($30) + stq $26, 18*8($30) + .frame $30, 20*8, $28 + .prologue 1 + + mov $24, $16 + jsr __up + + ldq $28, 0*8($30) + ldq $0, 1*8($30) + ldq $1, 2*8($30) + ldq $2, 3*8($30) + ldq $3, 4*8($30) + ldq $4, 5*8($30) + ldq $5, 6*8($30) + ldq $6, 7*8($30) + ldq $7, 8*8($30) + ldq $16, 9*8($30) + ldq $17, 10*8($30) + ldq $18, 11*8($30) + ldq $19, 12*8($30) + ldq $20, 13*8($30) + ldq $21, 14*8($30) + ldq $22, 15*8($30) + ldq $23, 16*8($30) + ldq $25, 17*8($30) + ldq $26, 18*8($30) + lda $30, 20*8($30) + ret $31, ($28), 0 + .end __up_wakeup diff -ur --new-file old/linux/arch/arm/Makefile new/linux/arch/arm/Makefile --- old/linux/arch/arm/Makefile Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/Makefile Thu Dec 17 18:05:42 1998 @@ -120,6 +120,7 @@ endif ifeq ($(CONFIG_ARCH_VNC),y) +TEXTADDR = 0xC000C000 MACHINE = vnc ARCHDIR = vnc endif @@ -141,7 +142,7 @@ OBJDUMP = $(CROSS_COMPILE)objdump CPP = $(CC) -E ARCHCC := $(word 1,$(CC)) -GCCLIB := `$(ARCHCC) $(CFLAGS_PROC) --print-libgcc-file-name` +GCCLIB := `$(CC) $(CFLAGS_PROC) --print-libgcc-file-name` #GCCARCH := -B/usr/bin/arm-linuxelf- HOSTCFLAGS := $(CFLAGS:-fomit-frame-pointer=) ifeq ($(CONFIG_FRAME_POINTER),y) @@ -160,10 +161,10 @@ BLOCK_DRIVERS := drivers/block/block.a CDROM_DRIVERS := drivers/cdrom/cdrom.a ifeq ($(CONFIG_FB),y) -CHAR_DRIVERS := arch/arm/drivers/char1/char.a +CHAR_DRIVERS := arch/arm/drivers/char1/char1.a drivers/char/char.a arch/arm/drivers/char1/char1.a else ifeq ($(CONFIG_VGA_CONSOLE),y) -CHAR_DRIVERS := arch/arm/drivers/char1/char.a +CHAR_DRIVERS := arch/arm/drivers/char1/char1.a drivers/char/char.a arch/arm/drivers/char1/char1.a else CHAR_DRIVERS := arch/arm/drivers/char/char.a endif diff -ur --new-file old/linux/arch/arm/config.in new/linux/arch/arm/config.in --- old/linux/arch/arm/config.in Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/config.in Thu Jan 14 19:29:28 1999 @@ -38,15 +38,22 @@ define_bool CONFIG_BUS_I2C y fi -# These machines have PCI/may have PCI +# These machines always have PCI if [ "$CONFIG_ARCH_NEXUSPCI" = "y" -o \ "$CONFIG_ARCH_VNC" = "y" ]; then define_bool CONFIG_PCI y +fi +if [ "$CONFIG_ARCH_EBSA285" = "y" ]; then + bool "PCI support" CONFIG_PCI +fi + +# These machines have ISA-DMA +if [ "$CONFIG_CATS" = "y" -o \ + "$CONFIG_ARCH_VNC" = "y" ]; then + define_bool CONFIG_ISA_DMA y else - if [ "$CONFIG_ARCH_EBSA285" = "y" ]; then - bool "PCI support" CONFIG_PCI - fi + define_bool CONFIG_ISA_DMA n fi # Figure out whether this system uses 26-bit or 32-bit CPUs. Nobody has @@ -122,6 +129,11 @@ fi fi fi +if [ "$CONFIG_ARCH_EBSA285" = "y" -o \ + "$CONFIG_ARCH_EBSA110" = "y" -o \ + "$CONFIG_ARCH_VNC" = "y" ]; then + string 'Initial kernel command string' CONFIG_CMDLINE +fi endmenu source drivers/pnp/Config.in @@ -132,16 +144,20 @@ source drivers/acorn/block/Config.in fi -source arch/arm/drivers/char/Config.in +if [ "$CONFIG_VGA_CONSOLE" = "n" -a "$CONFIG_FB" = "n" ]; then + source arch/arm/drivers/char/Config.in +else + source drivers/char/Config.in +fi +if [ "$CONFIG_ARCH_ACORN" = "y" ]; then + source drivers/acorn/char/Config.in +fi if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment comment 'Console drivers' if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then bool 'VGA text console' CONFIG_VGA_CONSOLE - if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - bool 'Video mode selection support' CONFIG_VIDEO_SELECT - fi fi bool 'Support Frame buffer devices' CONFIG_FB source drivers/video/Config.in @@ -194,8 +210,6 @@ # endmenu source fs/Config.in - -source fs/nls/Config.in mainmenu_option next_comment comment 'Kernel hacking' diff -ur --new-file old/linux/arch/arm/kernel/Makefile new/linux/arch/arm/kernel/Makefile --- old/linux/arch/arm/kernel/Makefile Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/Makefile Thu Dec 17 18:05:42 1998 @@ -10,43 +10,53 @@ O_TARGET := kernel.o O_OBJS := $(ENTRY_OBJ) ioport.o irq.o process.o ptrace.o setup.o \ - signal.o sys_arm.o time.o traps.o fiq.o + signal.o sys_arm.o time.o traps.o + +DMA_OBJS_arc = dma-arc.o +DMA_OBJS_a5k = dma-a5k.o +DMA_OBJS_rpc = dma-rpc.o +DMA_OBJS_ebsa110 = dma-dummy.o +DMA_OBJS_ebsa285 = dma-ebsa285.o +DMA_OBJS_nexuspci = +DMA_OBJS_vnc = dma-vnc.o + +O_OBJS_arc = ecard.o iic.o fiq.o oldlatches.o +O_OBJS_a5k = ecard.o iic.o fiq.o +O_OBJS_rpc = ecard.o iic.o fiq.o +O_OBJS_ebsa110 = leds-ebsa110.o +O_OBJS_ebsa285 = leds-ebsa285.o hw-ebsa285.o +O_OBJS_nexuspci = +O_OBJS_vnc = leds-ebsa285.o hw-vnc.o all: lib kernel.o $(HEAD_OBJ) init_task.o ifeq ($(CONFIG_MODULES),y) -OX_OBJS = armksyms.o + OX_OBJS = armksyms.o else -O_OBJS += armksyms.o + O_OBJS += armksyms.o endif -ifdef CONFIG_ARCH_ACORN - O_OBJS += ecard.o iic.o - ifdef CONFIG_ARCH_ARC - O_OBJS += oldlatches.o +ifeq ($(MACHINE),nexuspci) + ifdef CONFIG_PCI + O_OBJS += plx9080.o endif - O_OBJS += dma-$(MACHINE).o - OX_OBJS += dma.o -endif - -ifeq ($(MACHINE),ebsa110) - O_OBJS += dma-dummy.o leds-ebsa110.o -endif - -ifeq ($(MACHINE),ebsa285) - OX_OBJS += dma.o - O_OBJS += dma-ebsa285.o leds-ebsa285.o +else ifdef CONFIG_PCI O_OBJS += dec21285.o endif endif -ifeq ($(MACHINE),nexuspci) - O_OBJS += dma-dummy.o - ifdef CONFIG_PCI - O_OBJS += plx9080.o +ifneq ($(DMA_OBJS_$(MACHINE)),) + OX_OBJS += dma.o + O_OBJS += $(DMA_OBJS_$(MACHINE)) + ifeq ($(CONFIG_ISA_DMA),y) + O_OBJS += dma-isa.o endif +else + O_OBJS += dma-dummy.o endif + +O_OBJS += $(O_OBJS_$(MACHINE)) $(HEAD_OBJ): $(HEAD_OBJ:.o=.S) $(CC) -D__ASSEMBLY__ -DTEXTADDR=$(TEXTADDR) -traditional -c $(HEAD_OBJ:.o=.S) -o $@ diff -ur --new-file old/linux/arch/arm/kernel/calls.S new/linux/arch/arm/kernel/calls.S --- old/linux/arch/arm/kernel/calls.S Sat Jul 18 20:55:23 1998 +++ new/linux/arch/arm/kernel/calls.S Thu Dec 17 18:05:42 1998 @@ -9,7 +9,7 @@ #define NR_syscalls 256 #else -/* 0 */ .long SYMBOL_NAME(sys_setup) +/* 0 */ .long SYMBOL_NAME(sys_ni_syscall) .long SYMBOL_NAME(sys_exit) .long SYMBOL_NAME(sys_fork_wrapper) .long SYMBOL_NAME(sys_read) diff -ur --new-file old/linux/arch/arm/kernel/dec21285.c new/linux/arch/arm/kernel/dec21285.c --- old/linux/arch/arm/kernel/dec21285.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/dec21285.c Thu Dec 17 18:05:42 1998 @@ -3,14 +3,23 @@ * * Copyright (C) 1998 Russell King, Phil Blundell */ +#include #include #include +#include +#include #include +#include #include #define MAX_SLOTS 20 +extern void pcibios_fixup_ebsa285(struct pci_dev *dev); +extern void pcibios_init_ebsa285(void); +extern void pcibios_fixup_vnc(struct pci_dev *dev); +extern void pcibios_init_vnc(void); + int pcibios_present(void) { @@ -24,12 +33,11 @@ int slot = PCI_SLOT(dev_fn); if (slot < MAX_SLOTS) - return 0xf8c00000 + (slot << 11); + return 0xf8c00000 + (slot << 11) + (PCI_FUNC(dev_fn) << 8); else return 0; - } else { + } else return 0xf9000000 | (bus << 16) | (dev_fn << 8); - } } int @@ -119,56 +127,35 @@ return PCIBIOS_SUCCESSFUL; } -static int irqmap_ebsa[] __initdata = { 9, 8, 18, 11 }; -static int irqmap_cats[] __initdata = { 18, 8, 9, 11 }; +__initfunc(void pci_set_cmd(struct pci_dev *dev, unsigned short clear, unsigned short set)) +{ + unsigned short cmd; + + pci_read_config_word(dev, PCI_COMMAND, &cmd); + cmd = (cmd & ~clear) | set; + pci_write_config_word(dev, PCI_COMMAND, cmd); +} -__initfunc(static int ebsa_irqval(struct pci_dev *dev)) +__initfunc(void pci_set_base_addr(struct pci_dev *dev, int idx, unsigned int addr)) { - unsigned char pin; - - pcibios_read_config_byte(dev->bus->number, - dev->devfn, - PCI_INTERRUPT_PIN, - &pin); - - return irqmap_ebsa[(PCI_SLOT(dev->devfn) + pin) & 3]; -} - -__initfunc(static int cats_irqval(struct pci_dev *dev)) -{ - if (dev->irq >= 128) - return 32 + (dev->irq & 0x1f); - - switch (dev->irq) { - case 1: - case 2: - case 3: - case 4: - return irqmap_cats[dev->irq - 1]; - case 0: - return 0; - } + int reg = PCI_BASE_ADDRESS_0 + (idx << 2); - printk("PCI: device %02x:%02x has unknown irq line %x\n", - dev->bus->number, dev->devfn, dev->irq); - return 0; + pci_write_config_dword(dev, reg, addr); + pci_read_config_dword(dev, reg, &addr); + + dev->base_address[idx] = addr; } __initfunc(void pcibios_fixup(void)) { struct pci_dev *dev; - unsigned char cmd; for (dev = pci_devices; dev; dev = dev->next) { - /* sort out the irq mapping for this device */ - switch (machine_type) { - case MACH_TYPE_EBSA285: - dev->irq = ebsa_irqval(dev); - break; - case MACH_TYPE_CATS: - dev->irq = cats_irqval(dev); - break; - } + if (machine_is_ebsa285() || machine_is_cats()) + pcibios_fixup_ebsa285(dev); + if (machine_is_netwinder()) + pcibios_fixup_vnc(dev); + pcibios_write_config_byte(dev->bus->number, dev->devfn, PCI_INTERRUPT_LINE, dev->irq); @@ -176,34 +163,19 @@ "PCI: %02x:%02x [%04x/%04x] on irq %d\n", dev->bus->number, dev->devfn, dev->vendor, dev->device, dev->irq); - - /* Turn on bus mastering - boot loader doesn't - * - perhaps it should! - dag - */ - pcibios_read_config_byte(dev->bus->number, dev->devfn, - PCI_COMMAND, &cmd); - cmd |= PCI_COMMAND_MASTER; - pcibios_write_config_byte(dev->bus->number, dev->devfn, - PCI_COMMAND, cmd); } + if (machine_is_netwinder()) + hw_init(); } __initfunc(void pcibios_init(void)) { - int rev; - - rev = *(unsigned char *)0xfe000008; - printk("DEC21285 PCI revision %02X\n", rev); + if (machine_is_ebsa285() || machine_is_cats()) + pcibios_init_ebsa285(); + if (machine_is_netwinder()) + pcibios_init_vnc(); - /* - * Map our SDRAM at a known address in PCI space, just in case - * the firmware had other ideas. Using a nonzero base is slightly - * bizarre but apparently necessary to avoid problems with some - * video cards. - * - * We should really only do this if we are the configuration master. - */ - *((unsigned long *)0xfe000018) = 0x10000000; + printk("DEC21285 PCI revision %02X\n", *(unsigned char *)0xfe000008); } __initfunc(void pcibios_fixup_bus(struct pci_bus *bus)) diff -ur --new-file old/linux/arch/arm/kernel/dma-a5k.c new/linux/arch/arm/kernel/dma-a5k.c --- old/linux/arch/arm/kernel/dma-a5k.c Sat Jul 18 20:55:23 1998 +++ new/linux/arch/arm/kernel/dma-a5k.c Thu Dec 17 18:05:42 1998 @@ -16,7 +16,7 @@ #include "dma.h" -static struct fiq_handler fh = { "floppydma", NULL }; +static struct fiq_handler fh = { NULL, "floppydma", NULL, NULL }; int arch_request_dma(dmach_t channel, dma_t *dma, const char *dev_id) { diff -ur --new-file old/linux/arch/arm/kernel/dma-ebsa285.c new/linux/arch/arm/kernel/dma-ebsa285.c --- old/linux/arch/arm/kernel/dma-ebsa285.c Wed Sep 9 08:20:41 1998 +++ new/linux/arch/arm/kernel/dma-ebsa285.c Thu Dec 17 18:05:42 1998 @@ -4,6 +4,9 @@ * Copyright (C) 1998 Phil Blundell * * DMA functions specific to EBSA-285/CATS architectures + * + * Changelog: + * 09/11/1998 RMK Split out ISA DMA functions to dma-isa.c */ #include @@ -19,44 +22,19 @@ #include #include "dma.h" - -/* 8237 DMA controllers */ -#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ -#define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */ - -/* 8237 DMA controller registers */ -#define DMA1_CMD_REG 0x08 /* command register (w) */ -#define DMA1_STAT_REG 0x08 /* status register (r) */ -#define DMA1_REQ_REG 0x09 /* request register (w) */ -#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ -#define DMA1_MODE_REG 0x0B /* mode register (w) */ -#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ -#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ -#define DMA1_RESET_REG 0x0D /* Master Clear (w) */ -#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ -#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ - -#define DMA2_CMD_REG 0xD0 /* command register (w) */ -#define DMA2_STAT_REG 0xD0 /* status register (r) */ -#define DMA2_REQ_REG 0xD2 /* request register (w) */ -#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ -#define DMA2_MODE_REG 0xD6 /* mode register (w) */ -#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ -#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ -#define DMA2_RESET_REG 0xDA /* Master Clear (w) */ -#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ -#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ +#include "dma-isa.h" int arch_request_dma(dmach_t channel, dma_t *dma, const char *dev_name) { - /* 21285 internal channels */ - if (channel == 0 || channel == 1) + switch (channel) { + case 0: + case 1: /* 21285 internal channels */ return 0; - /* ISA channels */ -// if (machine_is_cats() && ((channel >= 2 && channel <= 5) || -// (channel >= 7 && channel <= 9))) -// return 0; + case 2 ... 9: + if (machine_is_cats()) + return isa_request_dma(channel - 2, dma, dev_name); + } return -EINVAL; } @@ -75,14 +53,9 @@ case 1: break; #ifdef CONFIG_CATS - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: + case 2 ... 9: + if (machine_is_cats()) + residue = isa_get_dma_residue(channel - 2); #endif } return residue; @@ -98,56 +71,9 @@ */ break; #ifdef CONFIG_CATS - case 2: - case 3: - case 4: - case 5: - case 7: - case 8: - case 9: - if (dma->invalid) { - static unsigned char dma_page[] = { 0x87, 0x83, 0x81, 0x82, - 0x00, 0x8b, 0x89, 0x8a }; - unsigned long int address = dma->buf.address, - length = dma->buf.length - 1; - outb(address >> 24, dma_page[channel - DMA_ISA_BASE] | 0x400); - outb(address >> 16, dma_page[channel - DMA_ISA_BASE]); - if (channel >= DMA_ISA_BASE + 5) { - outb(0, DMA2_CLEAR_FF_REG); - outb(address >> 1, - IO_DMA2_BASE + ((channel - DMA_ISA_BASE - 4) << 2)); - outb(address >> 9, - IO_DMA2_BASE + ((channel - DMA_ISA_BASE - 4) << 2)); - outb((length >> 1) & 0xfe, - IO_DMA2_BASE + 1 + ((channel - DMA_ISA_BASE - 4) << 2)); - outb(length >> 9, - IO_DMA2_BASE + 1 + ((channel - DMA_ISA_BASE - 4) << 2)); - outb(dma->dma_mode | (channel - DMA_ISA_BASE - 4), DMA2_MODE_REG); - } else { - outb(0, DMA1_CLEAR_FF_REG); - outb(address >> 0, IO_DMA1_BASE + ((channel - DMA_ISA_BASE) << 1)); - outb(address >> 8, IO_DMA1_BASE + ((channel - DMA_ISA_BASE) << 1)); - outb(length >> 0, - IO_DMA1_BASE + 1 + ((channel - DMA_ISA_BASE) << 1)); - outb(length >> 8, - IO_DMA1_BASE + 1 + ((channel - DMA_ISA_BASE) << 1)); - outb(dma->dma_mode | (channel - DMA_ISA_BASE), DMA1_MODE_REG); - } - switch (dma->dma_mode) { - case DMA_MODE_READ: - dma_cache_inv(__bus_to_virt(address), length + 1); - break; - case DMA_MODE_WRITE: - dma_cache_wback(__bus_to_virt(address), length + 1); - break; - } - dma->invalid = 0; - } - - if (channel >= DMA_ISA_BASE + 5) - outb(channel - DMA_ISA_BASE - 4, DMA2_MASK_REG); - else - outb(channel - DMA_ISA_BASE, DMA1_MASK_REG); + case 2 ... 9: + if (machine_is_cats()) + isa_enable_dma(channel - 2, dma); #endif } } @@ -162,18 +88,9 @@ */ break; #ifdef CONFIG_CATS - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - if (channel >= DMA_ISA_BASE + 5) - outb(channel - DMA_ISA_BASE, DMA2_MASK_REG); - else - outb((channel - DMA_ISA_BASE) | 4, DMA1_MASK_REG); + case 2 ... 9: + if (machine_is_cats()) + isa_disable_dma(channel - 2, dma); #endif } } diff -ur --new-file old/linux/arch/arm/kernel/dma-isa.c new/linux/arch/arm/kernel/dma-isa.c --- old/linux/arch/arm/kernel/dma-isa.c Thu Jan 1 01:00:00 1970 +++ new/linux/arch/arm/kernel/dma-isa.c Thu Dec 17 18:05:42 1998 @@ -0,0 +1,107 @@ +/* + * arch/arm/kernel/dma-isa.c: ISA DMA primitives + * + * Copyright (C) Russell King + * + * Taken from various sources, including: + * linux/include/asm/dma.h: Defines for using and allocating dma channels. + * Written by Hennus Bergman, 1992. + * High DMA channel support & info by Hannu Savolainen and John Boyd, Nov. 1992. + * arch/arm/kernel/dma-ebsa285.c + * Copyright (C) 1998 Phil Blundell + */ +#include + +#include +#include + +#include "dma.h" +#include "dma-isa.h" + +#define ISA_DMA_MASK 0 +#define ISA_DMA_MODE 1 +#define ISA_DMA_CLRFF 2 +#define ISA_DMA_PGHI 3 +#define ISA_DMA_PGLO 4 +#define ISA_DMA_ADDR 5 +#define ISA_DMA_COUNT 6 + +static unsigned int isa_dma_port[8][7] = { + /* MASK MODE CLRFF PAGE_HI PAGE_LO ADDR COUNT */ + { 0x0a, 0x0b, 0x0c, 0x487, 0x087, 0x00, 0x01 }, + { 0x0a, 0x0b, 0x0c, 0x483, 0x083, 0x02, 0x03 }, + { 0x0a, 0x0b, 0x0c, 0x481, 0x081, 0x04, 0x05 }, + { 0x0a, 0x0b, 0x0c, 0x482, 0x082, 0x06, 0x07 }, + { 0xd4, 0xd6, 0xd8, 0x000, 0x000, 0xc0, 0xc2 }, + { 0xd4, 0xd6, 0xd8, 0x48b, 0x08b, 0xc4, 0xc6 }, + { 0xd4, 0xd6, 0xd8, 0x489, 0x089, 0xc8, 0xca }, + { 0xd4, 0xd6, 0xd8, 0x48a, 0x08a, 0xcc, 0xce } +}; + +int isa_request_dma(int channel, dma_t *dma, const char *dev_name) +{ + if (channel != 4) + return 0; + + return -EINVAL; +} + +void isa_free_dma(int channel, dma_t *dma) +{ + /* nothing to do */ +} + +int isa_get_dma_residue(int channel, dma_t *dma) +{ + unsigned int io_port = isa_dma_port[channel][ISA_DMA_COUNT]; + int count; + + count = 1 + inb(io_port) + (inb(io_port) << 8); + + return channel < 4 ? count : (count << 1); +} + +void isa_enable_dma(int channel, dma_t *dma) +{ + unsigned long address, length; + + if (dma->invalid) { + address = dma->buf.address; + length = dma->buf.length - 1; + + outb(address >> 24, isa_dma_port[channel][ISA_DMA_PGHI]); + outb(address >> 16, isa_dma_port[channel][ISA_DMA_PGLO]); + + if (channel >= 4) { + address >>= 1; + length = (length >> 1) & 0xfe; /* why &0xfe? */ + } + + outb(0, isa_dma_port[channel][ISA_DMA_CLRFF]); + + outb(address, isa_dma_port[channel][ISA_DMA_ADDR]); + outb(address >> 8, isa_dma_port[channel][ISA_DMA_ADDR]); + + outb(length, isa_dma_port[channel][ISA_DMA_COUNT]); + outb(length >> 8, isa_dma_port[channel][ISA_DMA_COUNT]); + + outb(dma->dma_mode | (channel & 3), isa_dma_port[channel][ISA_DMA_MODE]); + + switch (dma->dma_mode) { + case DMA_MODE_READ: + dma_cache_inv(__bus_to_virt(dma->buf.address), dma->buf.length); + break; + + case DMA_MODE_WRITE: + dma_cache_wback(__bus_to_virt(dma->buf.address), dma->buf.length); + break; + } + dma->invalid = 0; + } + outb(channel & 3, isa_dma_port[channel][ISA_DMA_MASK]); +} + +void isa_disable_dma(int channel, dma_t *dma) +{ + outb(channel | 4, isa_dma_port[channel][ISA_DMA_MASK]); +} diff -ur --new-file old/linux/arch/arm/kernel/dma-isa.h new/linux/arch/arm/kernel/dma-isa.h --- old/linux/arch/arm/kernel/dma-isa.h Thu Jan 1 01:00:00 1970 +++ new/linux/arch/arm/kernel/dma-isa.h Thu Dec 17 18:05:42 1998 @@ -0,0 +1,25 @@ +/* + * Request an ISA DMA channel + */ +int isa_request_dma(int channel, dma_t *dma, const char *dev_name); + +/* + * Free an ISA DMA channel + */ +void isa_free_dma(int channel, dma_t *dma); + +/* + * Get ISA DMA channel residue + */ +int isa_get_dma_residue(int channel, dma_t *dma); + +/* + * Enable (and set up) an ISA DMA channel + */ +void isa_enable_dma(int channel, dma_t *dma); + +/* + * Disable an ISA DMA channel + */ +void isa_disable_dma(int channel, dma_t *dma); + diff -ur --new-file old/linux/arch/arm/kernel/dma-vnc.c new/linux/arch/arm/kernel/dma-vnc.c --- old/linux/arch/arm/kernel/dma-vnc.c Thu Jan 1 01:00:00 1970 +++ new/linux/arch/arm/kernel/dma-vnc.c Thu Dec 17 18:05:42 1998 @@ -0,0 +1,51 @@ +/* + * arch/arm/kernel/dma-vnc.c + * + * Copyright (C) 1998 Russell King + */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "dma.h" +#include "dma-isa.h" + +int arch_request_dma(dmach_t channel, dma_t *dma, const char *dev_name) +{ + if (channel < 8) + return isa_request_dma(channel, dma, dev_name); + return -EINVAL; +} + +void arch_free_dma(dmach_t channel, dma_t *dma) +{ + isa_free_dma(channel, dma); +} + +int arch_get_dma_residue(dmach_t channel, dma_t *dma) +{ + return isa_get_dma_residue(channel, dma); +} + +void arch_enable_dma(dmach_t channel, dma_t *dma) +{ + isa_enable_dma(channel, dma); +} + +void arch_disable_dma(dmach_t channel, dma_t *dma) +{ + isa_disable_dma(channel, dma); +} + +__initfunc(void arch_dma_init(dma_t *dma)) +{ + /* Nothing to do */ +} + diff -ur --new-file old/linux/arch/arm/kernel/dma.c new/linux/arch/arm/kernel/dma.c --- old/linux/arch/arm/kernel/dma.c Fri May 8 09:42:38 1998 +++ new/linux/arch/arm/kernel/dma.c Thu Dec 17 18:05:42 1998 @@ -26,6 +26,26 @@ #include #include #include +#include + + +/* A note on resource allocation: + * + * All drivers needing DMA channels, should allocate and release them + * through the public routines `request_dma()' and `free_dma()'. + * + * In order to avoid problems, all processes should allocate resources in + * the same sequence and release them in the reverse order. + * + * So, when allocating DMAs and IRQs, first allocate the IRQ, then the DMA. + * When releasing them, first release the DMA, then release the IRQ. + * If you don't, you may cause allocation requests to fail unnecessarily. + * This doesn't really matter now, but it will once we get real semaphores + * in the kernel. + */ + + +spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED; #include "dma.h" diff -ur --new-file old/linux/arch/arm/kernel/ecard.c new/linux/arch/arm/kernel/ecard.c --- old/linux/arch/arm/kernel/ecard.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/ecard.c Mon Dec 28 20:04:21 1998 @@ -3,7 +3,7 @@ * * Find all installed expansion cards, and handle interrupts from them. * - * Copyright 1995,1996,1997 Russell King + * Copyright 1995-1998 Russell King * * Created from information from Acorns RiscOS3 PRMs * @@ -14,6 +14,7 @@ * 29-Sep-1997 RMK Expansion card interrupt hardware not being re-enabled on reset from * Linux. (Caused cards not to respond under RiscOS without hard reset). * 15-Feb-1998 RMK Added DMA support + * 12-Sep-1998 RMK Added EASI support */ #define ECARD_C @@ -79,7 +80,7 @@ static unsigned int ecard_numcards, ecard_numirqcards; static unsigned int have_expmask; -static void ecard_def_irq_enable (ecard_t *ec, int irqnr) +static void ecard_def_irq_enable(ecard_t *ec, int irqnr) { #ifdef HAS_EXPMASK if (irqnr < 4 && have_expmask) { @@ -89,7 +90,7 @@ #endif } -static void ecard_def_irq_disable (ecard_t *ec, int irqnr) +static void ecard_def_irq_disable(ecard_t *ec, int irqnr) { #ifdef HAS_EXPMASK if (irqnr < 4 && have_expmask) { @@ -99,14 +100,14 @@ #endif } -static void ecard_def_fiq_enable (ecard_t *ec, int fiqnr) +static void ecard_def_fiq_enable(ecard_t *ec, int fiqnr) { - panic ("ecard_def_fiq_enable called - impossible"); + panic("ecard_def_fiq_enable called - impossible"); } -static void ecard_def_fiq_disable (ecard_t *ec, int fiqnr) +static void ecard_def_fiq_disable(ecard_t *ec, int fiqnr) { - panic ("ecard_def_fiq_disable called - impossible"); + panic("ecard_def_fiq_disable called - impossible"); } static expansioncard_ops_t ecard_default_ops = { @@ -122,7 +123,7 @@ * * They are not meant to be called directly, but via enable/disable_irq. */ -void ecard_enableirq (unsigned int irqnr) +void ecard_enableirq(unsigned int irqnr) { irqnr &= 7; if (irqnr < MAX_ECARDS && irqno_to_expcard[irqnr] != -1) { @@ -132,14 +133,14 @@ ec->ops = &ecard_default_ops; if (ec->claimed && ec->ops->irqenable) - ec->ops->irqenable (ec, irqnr); + ec->ops->irqenable(ec, irqnr); else - printk (KERN_ERR "ecard: rejecting request to " + printk(KERN_ERR "ecard: rejecting request to " "enable IRQs for %d\n", irqnr); } } -void ecard_disableirq (unsigned int irqnr) +void ecard_disableirq(unsigned int irqnr) { irqnr &= 7; if (irqnr < MAX_ECARDS && irqno_to_expcard[irqnr] != -1) { @@ -149,11 +150,11 @@ ec->ops = &ecard_default_ops; if (ec->ops && ec->ops->irqdisable) - ec->ops->irqdisable (ec, irqnr); + ec->ops->irqdisable(ec, irqnr); } } -void ecard_enablefiq (unsigned int fiqnr) +void ecard_enablefiq(unsigned int fiqnr) { fiqnr &= 7; if (fiqnr < MAX_ECARDS && irqno_to_expcard[fiqnr] != -1) { @@ -163,14 +164,14 @@ ec->ops = &ecard_default_ops; if (ec->claimed && ec->ops->fiqenable) - ec->ops->fiqenable (ec, fiqnr); + ec->ops->fiqenable(ec, fiqnr); else - printk (KERN_ERR "ecard: rejecting request to " + printk(KERN_ERR "ecard: rejecting request to " "enable FIQs for %d\n", fiqnr); } } -void ecard_disablefiq (unsigned int fiqnr) +void ecard_disablefiq(unsigned int fiqnr) { fiqnr &= 7; if (fiqnr < MAX_ECARDS && irqno_to_expcard[fiqnr] != -1) { @@ -180,7 +181,7 @@ ec->ops = &ecard_default_ops; if (ec->ops->fiqdisable) - ec->ops->fiqdisable (ec, fiqnr); + ec->ops->fiqdisable(ec, fiqnr); } } @@ -198,8 +199,27 @@ } } cli(); - if (called == 0) - printk (KERN_WARNING "Wild interrupt from backplane?\n"); + if (called == 0) { + static int last, lockup; + + if (last == jiffies) { + lockup += 1; + if (lockup > 1000000) { + printk(KERN_ERR "\nInterrupt lockup detected - disabling expansion card IRQs\n"); + disable_irq(intr_no); + printk("Expansion card IRQ state:\n"); + for (i = 0; i < num_cards; i++) + printk(" %d: %sclaimed, irqaddr = %p, irqmask = %X, status=%X\n", expcard[i].irq - 32, + expcard[i].claimed ? "" : "not", expcard[i].irqaddr, expcard[i].irqmask, *expcard[i].irqaddr); + } + } else + lockup = 0; + + if (!last || time_after(jiffies, last + 5*HZ)) { + last = jiffies; + printk(KERN_ERR "\nUnrecognised interrupt from backplane\n"); + } + } } #ifdef HAS_EXPMASK @@ -214,7 +234,7 @@ 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00 }; -static void ecard_irq_expmask (int intr_no, void *dev_id, struct pt_regs *regs) +static void ecard_irq_expmask(int intr_no, void *dev_id, struct pt_regs *regs) { const unsigned int statusmask = 15; unsigned int status; @@ -239,22 +259,22 @@ */ oldexpmask = have_expmask; EXPMASK_ENABLE = (have_expmask &= priority_masks[irqno]); - sti (); - do_ecard_IRQ (ec->irq, regs); - cli (); + sti(); + do_ecard_IRQ(ec->irq, regs); + cli(); EXPMASK_ENABLE = have_expmask = oldexpmask; status = EXPMASK_STATUS & statusmask; if (status) goto again; } else { - printk (KERN_WARNING "card%d: interrupt from unclaimed card???\n", irqno); + printk(KERN_WARNING "card%d: interrupt from unclaimed card???\n", irqno); EXPMASK_ENABLE = (have_expmask &= ~(1 << irqno)); } } else - printk (KERN_WARNING "Wild interrupt from backplane (masks)\n"); + printk(KERN_WARNING "Wild interrupt from backplane (masks)\n"); } -static int ecard_checkirqhw (void) +static int ecard_checkirqhw(void) { int found; @@ -267,7 +287,7 @@ } #endif -static void ecard_readbytes (void *addr, ecard_t *ec, int off, int len, int useld) +static void ecard_readbytes(void *addr, ecard_t *ec, int off, int len, int useld) { extern int ecard_loader_read(int off, volatile unsigned int pa, loader_t loader); unsigned char *a = (unsigned char *)addr; @@ -287,7 +307,7 @@ * If we require a low address or address 0, then reset, and start again... */ if (!off || lowaddress > laddr) { - outb (0, ec->podaddr); + outb(0, ec->podaddr); lowaddress = 0; } while (lowaddress <= laddr) { @@ -314,15 +334,136 @@ } } +static int ecard_prints(char *buffer, ecard_t *ec) +{ + char *start = buffer; + + buffer += sprintf(buffer, "\n %d: ", ec->slot_no); + + if (ec->cid.id == 0) { + struct in_chunk_dir incd; + + buffer += sprintf(buffer, "[%04X:%04X] ", + ec->cid.manufacturer, ec->cid.product); + + if (!ec->card_desc && ec->cid.is && ec->cid.cd && + ecard_readchunk(&incd, ec, 0xf5, 0)) + ec->card_desc = incd.d.string; + + if (!ec->card_desc) + ec->card_desc = "*unknown*"; + + buffer += sprintf(buffer, "%s", ec->card_desc); + } else + buffer += sprintf(buffer, "Simple card %d", ec->cid.id); + + return buffer - start; +} + +static inline unsigned short ecard_getu16(unsigned char *v) +{ + return v[0] | v[1] << 8; +} + +static inline signed long ecard_gets24(unsigned char *v) +{ + return v[0] | v[1] << 8 | v[2] << 16 | ((v[2] & 0x80) ? 0xff000000 : 0); +} + +/* + * Probe for an expansion card. + * + * If bit 1 of the first byte of the card is set, then the + * card does not exist. + */ +__initfunc(static int ecard_probe(int card, int freeslot, card_type_t type)) +{ + ecard_t *ec = expcard + freeslot; + struct ex_ecid cid; + char buffer[200]; + int i; + + irqno_to_expcard[card] = -1; + + ec->slot_no = card; + ec->irq = NO_IRQ; + ec->fiq = NO_IRQ; + ec->dma = NO_DMA; + ec->card_desc = NULL; + ec->ops = &ecard_default_ops; + + if ((ec->podaddr = ecard_address(ec, type, ECARD_SYNC)) == 0) + return 0; + + cid.r_zero = 1; + ecard_readbytes(&cid, ec, 0, 16, 0); + if (cid.r_zero) + return 0; + + irqno_to_expcard[card] = freeslot; + + ec->type = type; + ec->cid.id = cid.r_id; + ec->cid.cd = cid.r_cd; + ec->cid.is = cid.r_is; + ec->cid.w = cid.r_w; + ec->cid.manufacturer = ecard_getu16(cid.r_manu); + ec->cid.product = ecard_getu16(cid.r_prod); + ec->cid.country = cid.r_country; + ec->cid.irqmask = cid.r_irqmask; + ec->cid.irqoff = ecard_gets24(cid.r_irqoff); + ec->cid.fiqmask = cid.r_fiqmask; + ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); + ec->fiqaddr = + ec->irqaddr = (unsigned char *)BUS_ADDR(ec->podaddr); + + if (ec->cid.cd && ec->cid.is) { + ec->irqmask = ec->cid.irqmask; + ec->irqaddr += ec->cid.irqoff; + ec->fiqmask = ec->cid.fiqmask; + ec->fiqaddr += ec->cid.fiqoff; + } else { + ec->irqmask = 1; + ec->fiqmask = 4; + } + + for (i = 0; i < sizeof(blacklist) / sizeof(*blacklist); i++) + if (blacklist[i].manufacturer == ec->cid.manufacturer && + blacklist[i].product == ec->cid.product) { + ec->loader = blacklist[i].loader; + ec->card_desc = blacklist[i].type; + break; + } + + ecard_prints(buffer, ec); + printk("%s", buffer); + + ec->irq = 32 + card; +#ifdef IO_EC_MEMC8_BASE + if (card == 8) + ec->irq = 11; +#endif +#ifdef CONFIG_ARCH_RPC + /* On RiscPC, only first two slots have DMA capability */ + if (card < 2) + ec->dma = 2 + card; +#endif +#if 0 /* We don't support FIQs on expansion cards at the moment */ + ec->fiq = 96 + card; +#endif + + return 1; +} + /* * This is called to reset the loaders for each expansion card on reboot. * * This is required to make sure that the card is in the correct state * that RiscOS expects it to be. */ -void ecard_reset (int card) +void ecard_reset(int card) { - extern int ecard_loader_reset (volatile unsigned int pa, loader_t loader); + extern int ecard_loader_reset(volatile unsigned int pa, loader_t loader); if (card >= ecard_numcards) return; @@ -330,11 +471,11 @@ if (card < 0) { for (card = 0; card < ecard_numcards; card++) if (expcard[card].loader) - ecard_loader_reset (BUS_ADDR(expcard[card].podaddr), + ecard_loader_reset(BUS_ADDR(expcard[card].podaddr), expcard[card].loader); } else if (expcard[card].loader) - ecard_loader_reset (BUS_ADDR(expcard[card].podaddr), + ecard_loader_reset(BUS_ADDR(expcard[card].podaddr), expcard[card].loader); #ifdef HAS_EXPMASK @@ -347,18 +488,19 @@ static unsigned int ecard_startcard; -void ecard_startfind (void) +void ecard_startfind(void) { ecard_startcard = 0; } -ecard_t *ecard_find (int cld, const card_ids *cids) +ecard_t *ecard_find(int cid, const card_ids *cids) { int card; + if (!cids) { for (card = ecard_startcard; card < ecard_numcards; card++) if (!expcard[card].claimed && - ((expcard[card].cld.ecld ^ cld) & 0x78) == 0) + (expcard[card].cid.id ^ cid) == 0) break; } else { for (card = ecard_startcard; card < ecard_numcards; card++) { @@ -368,8 +510,8 @@ if (expcard[card].claimed) continue; - manufacturer = expcard[card].cld.manufacturer; - product = expcard[card].cld.product; + manufacturer = expcard[card].cid.manufacturer; + product = expcard[card].cid.product; for (i = 0; cids[i].manufacturer != 65535; i++) if (manufacturer == cids[i].manufacturer && @@ -380,16 +522,21 @@ break; } } + ecard_startcard = card + 1; + return card < ecard_numcards ? &expcard[card] : NULL; } -int ecard_readchunk (struct in_chunk_dir *cd, ecard_t *ec, int id, int num) +int ecard_readchunk(struct in_chunk_dir *cd, ecard_t *ec, int id, int num) { struct ex_chunk_dir excd; int index = 16; int useld = 0; + if (!ec->cid.is || !ec->cid.cd) + return 0; + while(1) { ecard_readbytes(&excd, ec, index, 8, useld); index += 8; @@ -427,124 +574,49 @@ } } cd->start_offset = c_start(&excd); - memcpy (cd->d.string, excd.d.string, 256); + memcpy(cd->d.string, excd.d.string, 256); return 1; } -unsigned int ecard_address (ecard_t *ec, card_type_t type, card_speed_t speed) +unsigned int ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) { switch (ec->slot_no) { case 0 ... 3: switch (type) { case ECARD_MEMC: - return MEMCECIO_BASE + (ec->slot_no << 12); + return IO_EC_MEMC_BASE + (ec->slot_no << 12); case ECARD_IOC: - return IOCECIO_BASE + (speed << 17) + (ec->slot_no << 12); + return IO_EC_IOC_BASE + (speed << 17) + (ec->slot_no << 12); - default: - return 0; +#ifdef IO_EC_EASI_BASE + case ECARD_EASI: + return IO_EC_EASI_BASE + (ec->slot_no << 22); +#endif } + break; -#ifdef IOCEC4IO_BASE case 4 ... 7: - if (type != ECARD_IOC) - return 0; - - return IOCEC4IO_BASE + (speed << 17) + ((ec->slot_no - 4) << 12); + switch (type) { +#ifdef IO_EC_IOC4_BASE + case ECARD_IOC: + return IO_EC_IOC4_BASE + (speed << 17) + ((ec->slot_no - 4) << 12); #endif -#ifdef MEMCEC8IO_BASE - case 8: - return MEMCEC8IO_BASE; +#ifdef IO_EC_EASI_BASE + case ECARD_EASI: + return IO_EC_EASI_BASE + (ec->slot_no << 22); #endif - } - return 0; -} - -/* - * Probe for an expansion card. - * - * If bit 1 of the first byte of the card is set, - * then the card does not exist. - */ -__initfunc(static int ecard_probe (int card, int freeslot)) -{ - ecard_t *ec = expcard + freeslot; - struct ex_ecld excld; - const char *card_desc = NULL; - int i; - - irqno_to_expcard[card] = -1; - - ec->slot_no = card; - if ((ec->podaddr = ecard_address (ec, ECARD_IOC, ECARD_SYNC)) == 0) - return 0; - - excld.r_ecld = 2; - ecard_readbytes (&excld, ec, 0, 16, 0); - if (excld.r_ecld & 2) - return 0; - - irqno_to_expcard[card] = freeslot; - - ec->irq = NO_IRQ; - ec->fiq = NO_IRQ; - ec->dma = NO_DMA; - ec->cld.ecld = e_ecld(&excld); - ec->cld.manufacturer = e_manu(&excld); - ec->cld.product = e_prod(&excld); - ec->cld.country = e_country(&excld); - ec->cld.fiqmask = e_fiqmask(&excld); - ec->cld.irqmask = e_irqmask(&excld); - ec->cld.fiqaddr = e_fiqaddr(&excld); - ec->cld.irqaddr = e_irqaddr(&excld); - ec->fiqaddr = - ec->irqaddr = (unsigned char *)BUS_ADDR(ec->podaddr); - ec->fiqmask = 4; - ec->irqmask = 1; - ec->ops = &ecard_default_ops; - - for (i = 0; i < sizeof (blacklist) / sizeof (*blacklist); i++) - if (blacklist[i].manufacturer == ec->cld.manufacturer && - blacklist[i].product == ec->cld.product) { - ec->loader = blacklist[i].loader; - card_desc = blacklist[i].type; + default: break; } + break; - ec->irq = 32 + card; -#if 0 - /* We don't support FIQs on expansion cards at the moment */ - ec->fiq = 96 + card; -#endif -#ifdef CONFIG_ARCH_RPC - if (card != 8) { - /* On RiscPC, only first two slots have DMA capability - */ - if (card < 2) - ec->dma = 2 + card; - } else - ec->irq = 11; +#ifdef IO_EC_MEMC8_BASE + case 8: + return IO_EC_MEMC8_BASE; #endif - - if ((ec->cld.ecld & 0x78) == 0) { - struct in_chunk_dir incd; - printk ("\n %d: [%04X:%04X] ", card, ec->cld.manufacturer, ec->cld.product); - if (e_is (&excld)) { - ec->fiqmask = e_fiqmask (&excld); - ec->irqmask = e_irqmask (&excld); - ec->fiqaddr += e_fiqaddr (&excld); - ec->irqaddr += e_irqaddr (&excld); - } - if (!card_desc && e_cd (&excld) && ecard_readchunk (&incd, ec, 0xf5, 0)) - card_desc = incd.d.string; - if (card_desc) - printk ("%s", card_desc); - else - printk ("*Unknown*"); - } else - printk("\n %d: Simple card %d\n", card, (ec->cld.ecld >> 3) & 15); - return 1; + } + return 0; } static struct irqaction irqexpansioncard = { @@ -565,11 +637,11 @@ { int i, nc = 0; - memset (expcard, 0, sizeof (expcard)); + memset(expcard, 0, sizeof(expcard)); #ifdef HAS_EXPMASK if (ecard_checkirqhw()) { - printk (KERN_DEBUG "Expansion card interrupt management hardware found\n"); + printk(KERN_DEBUG "Expansion card interrupt management hardware found\n"); irqexpansioncard.handler = ecard_irq_expmask; irqexpansioncard.flags |= SA_IRQNOMASK; have_expmask = -1; @@ -581,8 +653,8 @@ /* * First of all, probe all cards on the expansion card interrupt line */ - for (i = 0; i < 4; i++) - if (ecard_probe (i, nc)) + for (i = 0; i < 8; i++) + if (ecard_probe(i, nc, ECARD_IOC) || ecard_probe(i, nc, ECARD_EASI)) nc += 1; else have_expmask &= ~(1<used_math + mov r8, #1 + strb r8, [r10, #TSK_USED_MATH] @ set current->used_math add r10, r10, #TSS_FPESAVE @ r10 = workspace ldr r4, .LC2 ldr pc, [r4] @ Call FP module USR entry point @@ -741,6 +749,43 @@ mov r1, #BAD_UNDEFINSTR @ int reason and r2, r6, #31 @ int mode b SYMBOL_NAME(bad_mode) @ Does not ever return... + +/* We get here if an undefined instruction happens and the floating + * point emulator is not present. If the offending instruction was + * a WFS, we just perform a normal return as if we had emulated the + * operation. This is a hack to allow some basic userland binaries + * to run so that the emulator module proper can be loaded. --philb + */ +fpe_not_present: + adr r10, wfs_mask_data + ldmia r10, {r4, r5, r6, r7, r8} + ldr r10, [sp, #S_PC] @ Load PC + sub r10, r10, #4 + mask_pc r10, r10 + ldrt r10, [r10] @ get instruction + and r5, r10, r5 + teq r5, r4 @ Is it WFS? + moveq pc, r9 + and r5, r10, r8 + teq r5, r6 @ Is it LDF/STF on sp or fp? + teqne r5, r7 + movne pc, lr + tst r10, #0x00200000 @ Does it have WB + moveq pc, r9 + and r4, r10, #255 @ get offset + and r6, r10, #0x000f0000 + tst r10, #0x00800000 @ +/- + rsbeq r4, r4, #0 + ldr r5, [sp, r6, lsr #14] @ Load reg + add r5, r5, r4, lsl #2 + str r5, [sp, r6, lsr #14] @ Save reg + mov pc, r9 + +wfs_mask_data: .word 0x0e200110 @ WFS + .word 0x0fff0fff + .word 0x0d0d0100 @ LDF [sp]/STF [sp] + .word 0x0d0b0100 @ LDF [fp]/STF [fp] + .word 0x0f0f0f00 #include "entry-common.S" diff -ur --new-file old/linux/arch/arm/kernel/entry-common.S new/linux/arch/arm/kernel/entry-common.S --- old/linux/arch/arm/kernel/entry-common.S Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/entry-common.S Thu Dec 17 18:05:42 1998 @@ -288,4 +288,4 @@ .data ENTRY(fp_enter) - .word fpundefinstr + .word fpe_not_present diff -ur --new-file old/linux/arch/arm/kernel/fiq.c new/linux/arch/arm/kernel/fiq.c --- old/linux/arch/arm/kernel/fiq.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/fiq.c Thu Dec 17 18:05:42 1998 @@ -106,14 +106,7 @@ memcpy((void *)FIQ_VECTOR, start, length); protect_page_0(); -#if 0 - /* This doesn'w work correctly. Ok, it's a misuse - * of the DMA flushing code, but it ought to work. - * More investigation required. Maybe it really - * needs the cache flushed. - */ - dma_cache_wback(FIQ_VECTOR, length); -#else +#ifdef CONFIG_CPU_32 processor.u.armv3v4._flush_cache_area(FIQ_VECTOR, FIQ_VECTOR + length, 1); #endif } diff -ur --new-file old/linux/arch/arm/kernel/head-armo.S new/linux/arch/arm/kernel/head-armo.S --- old/linux/arch/arm/kernel/head-armo.S Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/head-armo.S Thu Dec 17 18:05:42 1998 @@ -58,6 +58,3 @@ cmp r4, r3 blt 1b movs pc, lr - - .align 13 -ENTRY(this_must_match_init_task) diff -ur --new-file old/linux/arch/arm/kernel/head-armv.S new/linux/arch/arm/kernel/head-armv.S --- old/linux/arch/arm/kernel/head-armv.S Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/head-armv.S Thu Dec 17 18:05:42 1998 @@ -8,9 +8,23 @@ #include #include +#ifndef CONFIG_ARCH_VNC #if (TEXTADDR & 0xffff) != 0x8000 #error TEXTADDR must start at 0xXXXX8000 #endif +#else + .text + mov r0, r0 + mov r0, r0 + mov r0, r0 + mov r0, r0 + mov r0, r0 + mov r0, r0 + mov r0, r0 + mov r0, r0 + mov r0, #0 + mov r1, #5 +#endif #define DEBUG @@ -97,6 +111,15 @@ add r3, r3, #1 << 20 teq r0, r2 bne 1b +#ifdef CONFIG_ARCH_VNC + add r0, r4, #0x3f00 + add r0, r0, #0x00f8 + mov r3, #0x7c000000 + orr r3, r3, r8 + str r3, [r0], #4 + add r3, r3, #1 << 20 + str r3, [r0], #4 +#endif #endif #ifdef CONFIG_ARCH_RPC /* Map in screen at 0x02000000 & SCREEN2_BASE @@ -339,7 +362,7 @@ beq 1001b .endm -#elif defined(CONFIG_ARCH_EBSA285) || defined(CONFIG_ARCH_VNC) +#elif defined(CONFIG_ARCH_EBSA285) .macro addruart,rx mov \rx, #0xfe000000 .endm @@ -373,6 +396,30 @@ .endm .macro waituart,rd,rx + .endm + +#elif defined(CONFIG_ARCH_VNC) + .macro addruart,rx + mov \rx, #0xff000000 + orr \rx, \rx, #0x00e00000 + orr \rx, \rx, #0x000003f8 + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx +1002: ldrb \rd, [\rx, #0x5] + and \rd, \rd, #0x60 + teq \rd, #0x60 + bne 1002b + .endm + + .macro waituart,rd,rx +1001: ldrb \rd, [\rx, #0x6] + tst \rd, #0x10 + beq 1001b .endm #else #error Unknown architecture diff -ur --new-file old/linux/arch/arm/kernel/hw-ebsa285.c new/linux/arch/arm/kernel/hw-ebsa285.c --- old/linux/arch/arm/kernel/hw-ebsa285.c Thu Jan 1 01:00:00 1970 +++ new/linux/arch/arm/kernel/hw-ebsa285.c Wed Dec 23 18:44:40 1998 @@ -0,0 +1,161 @@ +/* + * arch/arm/kernel/hw-ebsa286.c + * + * EBSA285 hardware specific functions + * + * Copyright (C) 1998 Russell King, Phil Blundel + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +extern int setup_arm_irq(int, struct irqaction *); + +extern void pci_set_cmd(struct pci_dev *dev, unsigned short clear, unsigned short set); +extern void pci_set_base_addr(struct pci_dev *dev, int idx, unsigned int addr); +extern void pci_set_irq_line(struct pci_dev *dev, unsigned int irq); + +static int irqmap_ebsa[] __initdata = { 9, 8, 18, 11 }; +static int irqmap_cats[] __initdata = { 18, 8, 9, 11 }; + +__initfunc(static int ebsa_irqval(struct pci_dev *dev)) +{ + unsigned char pin; + + pcibios_read_config_byte(dev->bus->number, + dev->devfn, + PCI_INTERRUPT_PIN, + &pin); + + return irqmap_ebsa[(PCI_SLOT(dev->devfn) + pin) & 3]; +} + +__initfunc(static int cats_irqval(struct pci_dev *dev)) +{ + if (dev->irq >= 128) + return 32 + (dev->irq & 0x1f); + + switch (dev->irq) { + case 1: + case 2: + case 3: + case 4: + return irqmap_cats[dev->irq - 1]; + case 0: + return 0; + } + + printk("PCI: device %02x:%02x has unknown irq line %x\n", + dev->bus->number, dev->devfn, dev->irq); + return 0; +} + +__initfunc(void pcibios_fixup_ebsa285(struct pci_dev *dev)) +{ + char cmd; + + /* sort out the irq mapping for this device */ + switch (machine_type) { + case MACH_TYPE_EBSA285: + dev->irq = ebsa_irqval(dev); + break; + case MACH_TYPE_CATS: + dev->irq = cats_irqval(dev); + break; + } + + /* Turn on bus mastering - boot loader doesn't + * - perhaps it should! - dag + */ + pci_read_config_byte(dev, PCI_COMMAND, &cmd); + pci_write_config_byte(dev, PCI_COMMAND, cmd | PCI_COMMAND_MASTER); +} + +static void irq_pci_err(int irq, void *dev_id, struct pt_regs *regs) +{ + const char *err = "unknown"; + unsigned long cmd = *(unsigned long *)0xfe000004 & 0xffff; + unsigned long ctrl = *(unsigned long *)0xfe00013c & 0xffffde07; + static unsigned long next_warn[7]; + int idx = 6; + + switch(irq) { + case IRQ_PCIPARITY: + *(unsigned long *)0xfe000004 = cmd | 1 << 31; + idx = 0; + err = "parity"; + break; + + case IRQ_PCITARGETABORT: + *(unsigned long *)0xfe000004 = cmd | 1 << 28; + idx = 1; + err = "target abort"; + break; + + case IRQ_PCIMASTERABORT: + *(unsigned long *)0xfe000004 = cmd | 1 << 29; + idx = 2; + err = "master abort"; + break; + + case IRQ_PCIDATAPARITY: + *(unsigned long *)0xfe000004 = cmd | 1 << 24; + idx = 3; + err = "data parity"; + break; + + case IRQ_DISCARDTIMER: + *(unsigned long *)0xfe00013c = ctrl | 1 << 8; + idx = 4; + err = "discard timer"; + break; + + case IRQ_SERR: + *(unsigned long *)0xfe00013c = ctrl | 1 << 3; + idx = 5; + err = "system"; + break; + } + if (time_after_eq(jiffies, next_warn[idx])) { + next_warn[idx] = jiffies + 3 * HZ / 100; + printk(KERN_ERR "PCI %s error detected\n", err); + } +} + +static struct irqaction irq_pci_error = { + irq_pci_err, SA_INTERRUPT, 0, "PCI error", NULL, NULL +}; + +__initfunc(void pcibios_init_ebsa285(void)) +{ + setup_arm_irq(IRQ_PCIPARITY, &irq_pci_error); + setup_arm_irq(IRQ_PCITARGETABORT, &irq_pci_error); + setup_arm_irq(IRQ_PCIMASTERABORT, &irq_pci_error); + setup_arm_irq(IRQ_PCIDATAPARITY, &irq_pci_error); + setup_arm_irq(IRQ_DISCARDTIMER, &irq_pci_error); + setup_arm_irq(IRQ_SERR, &irq_pci_error); + + /* + * Map our SDRAM at a known address in PCI space, just in case + * the firmware had other ideas. Using a nonzero base is slightly + * bizarre but apparently necessary to avoid problems with some + * video cards. + * + * We should really only do this if the central function is enabled. + */ + *(unsigned long *)0xfe000010 = 0; + *(unsigned long *)0xfe000018 = 0xe0000000; + *(unsigned long *)0xfe0000f8 = 0; + *(unsigned long *)0xfe0000fc = 0; + *(unsigned long *)0xfe000100 = 0x01fc0000; + *(unsigned long *)0xfe000104 = 0; + *(unsigned long *)0xfe000108 = 0x80000000; + *(unsigned long *)0xfe000004 = 0x17; +} diff -ur --new-file old/linux/arch/arm/kernel/init_task.c new/linux/arch/arm/kernel/init_task.c --- old/linux/arch/arm/kernel/init_task.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/init_task.c Thu Dec 17 18:05:42 1998 @@ -6,7 +6,6 @@ static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; -static struct file * init_fd_array[NR_OPEN] = { NULL, }; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; struct mm_struct init_mm = INIT_MM; diff -ur --new-file old/linux/arch/arm/kernel/irq.c new/linux/arch/arm/kernel/irq.c --- old/linux/arch/arm/kernel/irq.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/irq.c Wed Dec 23 18:44:40 1998 @@ -119,7 +119,9 @@ *p++ = '\n'; } +#ifdef CONFIG_ACORN p += get_fiq_list(p); +#endif return p - buf; } @@ -354,7 +356,7 @@ /* * wait for spurious interrupts to mask themselves out again */ - for (delay = jiffies + HZ/10; delay > jiffies; ) + for (delay = jiffies + HZ/10; time_before(jiffies, delay); ) /* min 100ms delay */; /* @@ -424,6 +426,8 @@ } irq_init_irq(); +#ifdef CONFIG_ARCH_ACORN init_FIQ(); +#endif init_dma(); } diff -ur --new-file old/linux/arch/arm/kernel/setup.c new/linux/arch/arm/kernel/setup.c --- old/linux/arch/arm/kernel/setup.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/setup.c Thu Dec 17 18:05:42 1998 @@ -57,13 +57,15 @@ #endif #ifndef CONFIG_CMDLINE -#define CONFIG_CMDLINE "root=nfs rw console=ttyS1,38400n8" +#define CONFIG_CMDLINE "root=/dev/nfs rw" #endif #define MEM_SIZE (16*1024*1024) #define COMMAND_LINE_SIZE 256 struct drive_info_struct { char dummy[32]; } drive_info; struct screen_info screen_info = { + orig_video_lines: 30, + orig_video_cols: 80, orig_video_mode: 0, orig_video_ega_bx: 0, orig_video_isVGA: 1, @@ -210,6 +212,8 @@ #ifdef CONFIG_ARCH_ACORN *mem_end_p = GET_MEMORY_END(params); +#elif defined(CONFIG_ARCH_EBSA285) + *mem_end_p = PAGE_OFFSET + params->u1.s.page_size * params->u1.s.nr_pages; #else *mem_end_p = PAGE_OFFSET + MEM_SIZE; #endif @@ -305,18 +309,18 @@ __initfunc(static void setup_mem(char *cmd_line, unsigned long *mem_start, unsigned long *mem_end)) { - char c = ' ', *to = command_line; + char c, *to = command_line; int len = 0; *mem_start = (unsigned long)&_end; for (;;) { - if (c == ' ' && - cmd_line[0] == 'm' && - cmd_line[1] == 'e' && - cmd_line[2] == 'm' && - cmd_line[3] == '=') { - *mem_end = simple_strtoul(cmd_line+4, &cmd_line, 0); + if (cmd_line[0] == ' ' && + cmd_line[1] == 'm' && + cmd_line[2] == 'e' && + cmd_line[3] == 'm' && + cmd_line[4] == '=') { + *mem_end = simple_strtoul(cmd_line+5, &cmd_line, 0); switch(*cmd_line) { case 'M': case 'm': @@ -336,7 +340,7 @@ *to++ = c; } - *to = '\0'; + *to = '\0'; } __initfunc(void @@ -381,33 +385,27 @@ conswitchp = &dummy_con; #endif #endif -printascii("setup_arch done\n"); } +static const struct { + char *machine_name; + char *bus_name; +} machine_desc[] = { + { "DEC-EBSA110", "DEC" }, + { "Acorn-RiscPC", "Acorn" }, + { "Nexus-NexusPCI", "PCI" }, + { "DEC-EBSA285", "PCI" }, + { "Corel-Netwinder", "PCI/ISA" }, + { "Chalice-CATS", "PCI" }, + { "unknown-TBOX", "PCI" } +}; + #if defined(CONFIG_ARCH_ARC) #define HARDWARE "Acorn-Archimedes" #define IO_BUS "Acorn" #elif defined(CONFIG_ARCH_A5K) #define HARDWARE "Acorn-A5000" #define IO_BUS "Acorn" -#elif defined(CONFIG_ARCH_RPC) -#define HARDWARE "Acorn-RiscPC" -#define IO_BUS "Acorn" -#elif defined(CONFIG_ARCH_EBSA110) -#define HARDWARE "DEC-EBSA110" -#define IO_BUS "DEC" -#elif defined(CONFIG_ARCH_EBSA285) -#define HARDWARE "DEC-EBSA285" -#define IO_BUS "PCI" -#elif defined(CONFIG_ARCH_NEXUSPCI) -#define HARDWARE "Nexus-NexusPCI" -#define IO_BUS "PCI" -#elif defined(CONFIG_ARCH_VNC) -#define HARDWARE "Corel-VNC" -#define IO_BUS "PCI" -#else -#define HARDWARE "unknown" -#define IO_BUS "unknown" #endif #if defined(CONFIG_CPU_ARM2) @@ -439,8 +437,17 @@ (int)processor_id & 15, (loops_per_sec+2500) / 500000, ((loops_per_sec+2500) / 5000) % 100, +#ifdef HARDWARE HARDWARE, +#else + machine_desc[machine_type].machine_name, +#endif OPTIMISATION, - IO_BUS); +#ifdef IO_BUS + IO_BUS +#else + machine_desc[machine_type].bus_name +#endif + ); return len; } diff -ur --new-file old/linux/arch/arm/kernel/sys_arm.c new/linux/arch/arm/kernel/sys_arm.c --- old/linux/arch/arm/kernel/sys_arm.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/sys_arm.c Thu Dec 17 18:05:42 1998 @@ -77,7 +77,8 @@ goto out; if (!(a.flags & MAP_ANONYMOUS)) { error = -EBADF; - if (a.fd >= NR_OPEN || !(file = current->files->fd[a.fd])) + if (a.fd >= current->files->max_fds || + !(file = current->files->fd[a.fd])) goto out; } a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); diff -ur --new-file old/linux/arch/arm/kernel/time.c new/linux/arch/arm/kernel/time.c --- old/linux/arch/arm/kernel/time.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/time.c Tue Jan 19 19:19:41 1999 @@ -9,7 +9,7 @@ * * 1994-07-02 Alan Modra * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime - * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 + * 1998-12-20 Updated NTP code according to technical memorandum Jan '96 * "A Kernel Model for Precision Timekeeping" by Dave Mills */ #include @@ -125,9 +125,11 @@ } xtime = *tv; - time_state = TIME_BAD; - time_maxerror = MAXPHASE; - time_esterror = MAXPHASE; + time_adjust = 0; /* stop active adjtime() */ + time_status |= STA_UNSYNC; + time_state = TIME_ERROR; /* p. 24, (a) */ + time_maxerror = NTP_PHASE_LIMIT; + time_esterror = NTP_PHASE_LIMIT; sti (); } diff -ur --new-file old/linux/arch/arm/kernel/traps.c new/linux/arch/arm/kernel/traps.c --- old/linux/arch/arm/kernel/traps.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/kernel/traps.c Thu Dec 17 18:05:42 1998 @@ -51,7 +51,7 @@ if (stackptr < 0x02048000 || stackptr + size > 0x03000000) return -EFAULT; #else - if (stackptr < 0xc0000000 || stackptr + size > (unsigned long)high_memory) + if (stackptr < PAGE_OFFSET || stackptr + size > (unsigned long)high_memory) return -EFAULT; #endif return 0; @@ -175,7 +175,7 @@ printk("(sp underflow)"); printk("\n"); - dump_mem(cstack, sstack + 4096); + dump_mem(cstack - 16, sstack + 4096); frameptr = regs->ARM_fp; if (frameptr) { diff -ur --new-file old/linux/arch/arm/lib/Makefile new/linux/arch/arm/lib/Makefile --- old/linux/arch/arm/lib/Makefile Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/lib/Makefile Thu Dec 17 18:05:42 1998 @@ -26,6 +26,10 @@ L_OBJS += io-ebsa110.o endif +ifeq ($(MACHINE),vnc) + L_OBJS += io-ebsa285.o +endif + ifeq ($(MACHINE),ebsa285) L_OBJS += io-ebsa285.o endif diff -ur --new-file old/linux/arch/arm/lib/io-ebsa285.S new/linux/arch/arm/lib/io-ebsa285.S --- old/linux/arch/arm/lib/io-ebsa285.S Sat Jul 18 20:55:23 1998 +++ new/linux/arch/arm/lib/io-ebsa285.S Thu Dec 17 18:05:42 1998 @@ -104,24 +104,75 @@ ENTRY(outsw) add r0, r0, #0xff000000 add r0, r0, #0x00e00000 -1: teq r2, #0 - ldrneh r3, [r1], #2 - strneh r3, [r0] - subne r2, r2, #1 - bne 1b +1: subs r2, r2, #1 + ldrgeh r3, [r1], #2 + strgeh r3, [r0] + bgt 1b mov pc, lr ENTRY(inswb) mov r2, r2, lsr #1 ENTRY(insw) + stmfd sp!, {r4, r5, lr} add r0, r0, #0xff000000 add r0, r0, #0x00e00000 -1: teq r2, #0 + @ + 8 + 9 +10 +11 +12 +13 +14 +15 +16 +17 + subs ip, r2, #8 + blo too_little + @ + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + ands lr, r1, #3 @ check alignment + beq 1f + + ldrh r3, [r0] + strh r3, [r1], #2 + sub ip, ip, #1 + cmn ip, #8 + blo too_little + +1: ldrh r2, [r0] + ldrh r3, [r0] + orr r2, r2, r3, lsl #16 + ldrh r3, [r0] + ldrh r4, [r0] + orr r3, r3, r4, lsl #16 + ldrh r4, [r0] + ldrh r5, [r0] + orr r4, r4, r5, lsl #16 + ldrh r5, [r0] + ldrh lr, [r0] + orr r5, r5, lr, lsl #16 + stmia r1!, {r2, r3, r4, r5} + subs ip, ip, #8 + @ - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 + 0 + 1 + bhs 1b + @ - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 - 8 - 7 + cmn ip, #4 + ldrhsh r2, [r0] @ ... ... ... ... - 4 - 3 - 2 - 1 ... ... + ldrhsh r3, [r0] + orrhs r2, r2, r3, lsl #16 + ldrhsh r3, [r0] + ldrhsh r4, [r0] + orrhs r3, r3, r4, lsl #16 + stmhsia r1!, {r2, r3} + + tst ip, #2 + ldrneh r2, [r0] @ ... ... - 6 - 5 ... ... - 2 - 1 ... ... ldrneh r3, [r0] - strneh r3, [r1], #2 - subne r2, r2, #1 - bne 1b - mov pc, lr + orrne r2, r2, r3, lsl #16 + strne r2, [r1], #4 + + tst ip, #1 + ldrneh r2, [r0] + strneh r2, [r1], #2 + + ldmfd sp!, {r4, r5, pc} + +too_little: subs r2, r2, #1 + ldrgeh r3, [r0] + strgeh r3, [r1], #2 + bgt too_little + + ldmfd sp!, {r4, r5, pc} ENTRY(insb) diff -ur --new-file old/linux/arch/arm/mm/fault-armo.c new/linux/arch/arm/mm/fault-armo.c --- old/linux/arch/arm/mm/fault-armo.c Wed Sep 9 17:56:58 1998 +++ new/linux/arch/arm/mm/fault-armo.c Thu Dec 17 18:05:42 1998 @@ -174,7 +174,7 @@ } /* Are we prepared to handle this kernel fault? */ - if ((fixup = search_exception_table(regs->ARM_pc)) != 0) { + if ((fixup = search_exception_table(instruction_pointer(regs))) != 0) { printk(KERN_DEBUG "%s: Exception at [<%lx>] addr=%lx (fixup: %lx)\n", tsk->comm, regs->ARM_pc, addr, fixup); regs->ARM_pc = fixup; diff -ur --new-file old/linux/arch/arm/mm/fault-armv.c new/linux/arch/arm/mm/fault-armv.c --- old/linux/arch/arm/mm/fault-armv.c Wed Sep 9 17:56:58 1998 +++ new/linux/arch/arm/mm/fault-armv.c Thu Dec 17 18:05:42 1998 @@ -208,7 +208,7 @@ } /* Are we prepared to handle this kernel fault? */ - if ((fixup = search_exception_table(regs->ARM_pc)) != 0) { + if ((fixup = search_exception_table(instruction_pointer(regs))) != 0) { printk(KERN_DEBUG "%s: Exception at [<%lx>] addr=%lx (fixup: %lx)\n", tsk->comm, regs->ARM_pc, addr, fixup); regs->ARM_pc = fixup; diff -ur --new-file old/linux/arch/arm/mm/init.c new/linux/arch/arm/mm/init.c --- old/linux/arch/arm/mm/init.c Wed Sep 9 17:56:58 1998 +++ new/linux/arch/arm/mm/init.c Thu Dec 17 18:05:42 1998 @@ -192,6 +192,15 @@ reservedpages << (PAGE_SHIFT-10), datapages << (PAGE_SHIFT-10), initpages << (PAGE_SHIFT-10)); + +#ifdef CONFIG_CPU_26 + if (max_mapnr <= 128) { + extern int sysctl_overcommit_memory; + /* On a machine this small we won't get anywhere without + overcommit, so turn it on by default. */ + sysctl_overcommit_memory = 1; + } +#endif } void free_initmem (void) diff -ur --new-file old/linux/arch/arm/mm/mm-ebsa285.c new/linux/arch/arm/mm/mm-ebsa285.c --- old/linux/arch/arm/mm/mm-ebsa285.c Mon Jul 20 05:45:45 1998 +++ new/linux/arch/arm/mm/mm-ebsa285.c Thu Dec 17 18:05:42 1998 @@ -5,7 +5,6 @@ * * Copyright (C) 1998 Russell King, Dave Gilbert. */ -#include #include #include #include @@ -14,46 +13,7 @@ #include #include #include - -/* - * These two functions convert PCI bus addresses to virtual addresses - * and back again. - */ -unsigned long __virt_to_bus(unsigned long res) -{ - if (res < PAGE_OFFSET || res >= 0xD0000000) { - printk("__virt_to_bus: invalid address 0x%08lx\n", res); -#ifdef CONFIG_DEBUG_ERRORS - __backtrace(); -#endif - } else - res = (res - PAGE_OFFSET) + 0x10000000; - - return res; -} - -unsigned long __bus_to_virt(unsigned long res) -{ - if (res < 0x10000000 || res >= 0x20000000) { - printk("__bus_to_virt: invalid address 0x%08lx\n", res); -#ifdef CONFIG_DEBUG_ERRORS - __backtrace(); -#endif - } else - res = (res - 0x10000000) + PAGE_OFFSET; - - return res; -} - -/* Logical Physical - * 0xfff00000 0x40000000 X-Bus - * 0xffe00000 0x7c000000 PCI I/O space - * 0xfe000000 0x42000000 CSR - * 0xfd000000 0x78000000 Outbound write flush - * 0xfc000000 0x79000000 PCI IACK/special space - * 0xf9000000 0x7a000000 PCI Config type 1 - * 0xf8000000 0x7b000000 PCI Config type 0 - */ +#include /* * This is to allow us to fiddle with the EEPROM @@ -65,15 +25,15 @@ * until we're happy with them... */ #define MAPPING \ - { 0xd8000000, 0x41000000, 0x00400000, DOMAIN_USER, 1, 1 }, /* EEPROM */ \ - { 0xdc000000, 0x7c000000, 0x00100000, DOMAIN_USER, 1, 1 }, /* VGA */ \ - { 0xe0000000, 0x80000000, 0x10000000, DOMAIN_USER, 1, 1 }, /* VGA */ \ - { 0xf8000000, 0x7b000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 0 Config */ \ - { 0xf9000000, 0x7a000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 1 Config */ \ - { 0xfc000000, 0x79000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* PCI IACK */ \ - { 0xfd000000, 0x78000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* Outbound wflsh*/ \ - { 0xfe000000, 0x42000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* CSR */ \ - { 0xffe00000, 0x7c000000, 0x00100000, DOMAIN_IO , 0, 1 }, /* PCI I/O */ \ - { 0xfff00000, 0x40000000, 0x00100000, DOMAIN_IO , 0, 1 }, /* X-Bus */ + { 0xd8000000, DC21285_FLASH, 0x00400000, DOMAIN_USER, 1, 1 }, /* EEPROM */ \ + { 0xdc000000, 0x7c000000, 0x00100000, DOMAIN_USER, 1, 1 }, /* VGA */ \ + { 0xe0000000, DC21285_PCI_MEM, 0x18000000, DOMAIN_USER, 1, 1 }, /* VGA */ \ + { 0xf8000000, DC21285_PCI_TYPE_0_CONFIG, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 0 Config */ \ + { 0xf9000000, DC21285_PCI_TYPE_1_CONFIG, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 1 Config */ \ + { PCI_IACK, DC21285_PCI_IACK, 0x01000000, DOMAIN_IO , 0, 1 }, /* PCI IACK */ \ + { 0xfd000000, DC21285_OUTBOUND_WRITE_FLUSH, 0x01000000, DOMAIN_IO , 0, 1 }, /* Out wrflsh */ \ + { 0xfe000000, DC21285_ARMCSR_BASE, 0x01000000, DOMAIN_IO , 0, 1 }, /* CSR */ \ + { 0xffe00000, DC21285_PCI_IO, 0x00100000, DOMAIN_IO , 0, 1 }, /* PCI I/O */ \ + { 0xfff00000, 0x40000000, 0x00100000, DOMAIN_IO , 0, 1 }, /* X-Bus */ #include "mm-armv.c" diff -ur --new-file old/linux/arch/arm/mm/mm-rpc.c new/linux/arch/arm/mm/mm-rpc.c --- old/linux/arch/arm/mm/mm-rpc.c Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/mm/mm-rpc.c Thu Dec 17 18:05:42 1998 @@ -91,7 +91,8 @@ #define MAPPING \ { SCREEN2_BASE, SCREEN_START, 2*1048576, DOMAIN_IO, 0, 1 }, /* VRAM */ \ - { IO_BASE, IO_START, IO_SIZE , DOMAIN_IO, 0, 1 } /* IO space */ + { IO_BASE, IO_START, IO_SIZE , DOMAIN_IO, 0, 1 }, /* IO space */ \ + { EASI_BASE, EASI_START, EASI_SIZE, DOMAIN_IO, 0, 1 } /* EASI space */ /* * Include common routine to set up page tables */ diff -ur --new-file old/linux/arch/arm/mm/mm-vnc.c new/linux/arch/arm/mm/mm-vnc.c --- old/linux/arch/arm/mm/mm-vnc.c Sat Jul 18 20:55:23 1998 +++ new/linux/arch/arm/mm/mm-vnc.c Thu Dec 17 18:05:42 1998 @@ -13,20 +13,19 @@ #include #include #include +#include /* Table describing the MMU translation mapping * mainly used to set up the I/O mappings. */ #define MAPPING \ - { 0xe0000000, DC21285_PCI_IO, 0x00100000, DOMAIN_IO, 0, 1 }, /* PCI I/O */ \ - { 0xe0100000, DC21285_PCI_TYPE_0_CONFIG, 0x00f00000, DOMAIN_IO, 0, 1 }, /* Type 0 Config */ \ - { 0xe1000000, DC21285_ARMCSR_BASE, 0x00100000, DOMAIN_IO, 0, 1 }, /* ARM CSR */ \ - { 0xe1100000, DC21285_PCI_IACK, 0x00100000, DOMAIN_IO, 0, 1 }, /* PCI IACK */ \ - { 0xe1300000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \ - { 0xe1400000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \ - { 0xe1500000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \ - { 0xe1600000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \ - { 0xe1700000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \ - { 0xe1800000, DC21285_FLASH, 0x00800000, DOMAIN_IO, 0, 1 } /* Flash */ + { 0xd0000000, DC21285_FLASH, 0x00800000, DOMAIN_IO , 0, 1 }, /* Flash */ \ + { 0xe0000000, DC21285_PCI_MEM, 0x18000000, DOMAIN_IO , 0, 1 }, /* PCI Mem */ \ + { 0xf8000000, DC21285_PCI_TYPE_0_CONFIG, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 0 Config */ \ + { 0xf9000000, DC21285_PCI_TYPE_1_CONFIG, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 1 Config */ \ + { PCI_IACK, DC21285_PCI_IACK, 0x01000000, DOMAIN_IO , 0, 1 }, /* PCI IACK */ \ + { 0xfd000000, DC21285_OUTBOUND_WRITE_FLUSH, 0x01000000, DOMAIN_IO , 0, 1 }, /* Out wrflsh */ \ + { 0xfe000000, DC21285_ARMCSR_BASE, 0x01000000, DOMAIN_IO , 0, 1 }, /* CSR */ \ + { 0xffe00000, DC21285_PCI_IO, 0x00100000, DOMAIN_IO , 0, 1 }, /* PCI I/O */ \ #include "mm-armv.c" diff -ur --new-file old/linux/arch/arm/mm/proc-sa110.S new/linux/arch/arm/mm/proc-sa110.S --- old/linux/arch/arm/mm/proc-sa110.S Sun Sep 6 19:44:47 1998 +++ new/linux/arch/arm/mm/proc-sa110.S Thu Dec 17 18:05:42 1998 @@ -10,6 +10,11 @@ #include #include "../lib/constants.h" +/* This is the maximum size of an area which will be flushed. If the area + * is larger than this, then we flush the whole cache + */ +#define MAX_AREA_SIZE 32768 + .data Lclean_switch: .long 0 .text @@ -52,7 +57,7 @@ .align 5 _sa110_flush_cache_area: sub r3, r1, r0 - cmp r3, #32768 + cmp r3, #MAX_AREA_SIZE bgt _sa110_flush_cache_all_r2 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c6, 1 @ flush D entry @@ -79,16 +84,17 @@ .align 5 _sa110_cache_wback_area: sub r3, r1, r0 - cmp r3, #32768 - movgt r2, #0 - bgt _sa110_flush_cache_all + cmp r3, #MAX_AREA_SIZE + mov r2, #0 + bgt _sa110_flush_cache_all_r2 + bic r0, r0, #31 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry add r0, r0, #32 mcr p15, 0, r0, c7, c10, 1 @ clean D entry add r0, r0, #32 cmp r0, r1 blt 1b - mcr p15, 0, r0, c7, c10, 4 @ drain WB + mcr p15, 0, r2, c7, c10, 4 @ drain WB mov pc, lr /* diff -ur --new-file old/linux/arch/i386/Makefile new/linux/arch/i386/Makefile --- old/linux/arch/i386/Makefile Mon Jul 20 19:05:15 1998 +++ new/linux/arch/i386/Makefile Wed Dec 30 23:17:25 1998 @@ -35,6 +35,10 @@ CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 endif +ifdef CONFIG_M586TSC +CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 +endif + ifdef CONFIG_M686 CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 endif diff -ur --new-file old/linux/arch/i386/boot/Makefile new/linux/arch/i386/boot/Makefile --- old/linux/arch/i386/boot/Makefile Mon Jul 20 19:05:15 1998 +++ new/linux/arch/i386/boot/Makefile Sat Jan 2 19:27:52 1999 @@ -40,7 +40,7 @@ if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi install: $(CONFIGURE) $(BOOTIMAGE) - sh -x ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) $(BOOTIMAGE) $(TOPDIR)/System.map "$(INSTALL_PATH)" + sh -x ./install.sh $(KERNELRELEASE) $(BOOTIMAGE) $(TOPDIR)/System.map "$(INSTALL_PATH)" tools/build: tools/build.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include diff -ur --new-file old/linux/arch/i386/boot/setup.S new/linux/arch/i386/boot/setup.S --- old/linux/arch/i386/boot/setup.S Mon Oct 5 21:59:25 1998 +++ new/linux/arch/i386/boot/setup.S Sun Nov 29 02:18:54 1998 @@ -396,8 +396,6 @@ 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 ... @@ -416,6 +414,26 @@ 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 -ur --new-file old/linux/arch/i386/boot/tools/build.c new/linux/arch/i386/boot/tools/build.c --- old/linux/arch/i386/boot/tools/build.c Wed Jun 24 23:30:08 1998 +++ new/linux/arch/i386/boot/tools/build.c Sun Oct 25 23:16:21 1998 @@ -151,7 +151,7 @@ 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 -ur --new-file old/linux/arch/i386/config.in new/linux/arch/i386/config.in --- old/linux/arch/i386/config.in Tue Feb 9 18:59:29 1999 +++ new/linux/arch/i386/config.in Tue Feb 9 19:00:17 1999 @@ -14,12 +14,28 @@ choice 'Processor family' \ "386 CONFIG_M386 \ 486/Cx486 CONFIG_M486 \ - Pentium/K5/5x86/6x86 CONFIG_M586 \ - PPro/K6/6x86MX CONFIG_M686" Pentium -bool 'Math emulation' CONFIG_MATH_EMULATION -if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR + 586/K5/5x86/6x86 CONFIG_M586 \ + Pentium/K6/TSC CONFIG_M586TSC \ + PPro/6x86MX CONFIG_M686" PPro +# +# Define implied options from the CPU selection here +# +if [ "$CONFIG_M386" != "y" ]; then + define_bool CONFIG_X86_WP_WORKS_OK y + define_bool CONFIG_X86_INVLPG y + define_bool CONFIG_X86_BSWAP y + define_bool CONFIG_X86_POPAD_OK y +fi +if [ "$CONFIG_M686" = "y" -o "$CONFIG_M586TSC" = "y" ]; then + define_bool CONFIG_X86_TSC y +fi +if [ "$CONFIG_M686" = "y" ]; then + define_bool CONFIG_X86_GOOD_APIC y fi + +bool 'Math emulation' CONFIG_MATH_EMULATION +bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR +bool 'Symmetric multi-processing support' CONFIG_SMP endmenu mainmenu_option next_comment @@ -37,8 +53,16 @@ bool 'Networking support' CONFIG_NET bool 'PCI support' CONFIG_PCI if [ "$CONFIG_PCI" = "y" ]; then - bool ' PCI BIOS support' CONFIG_PCI_BIOS - bool ' PCI direct access support' CONFIG_PCI_DIRECT + choice 'PCI access mode' \ + "BIOS CONFIG_PCI_GOBIOS \ + Direct CONFIG_PCI_GODIRECT \ + Any CONFIG_PCI_GOANY" Any + if [ "$CONFIG_PCI_GOBIOS" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then + define_bool CONFIG_PCI_BIOS y + fi + if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then + define_bool CONFIG_PCI_DIRECT y + fi bool ' PCI quirks' CONFIG_PCI_QUIRKS if [ "$CONFIG_PCI_QUIRKS" = "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then bool ' PCI bridge optimization (experimental)' CONFIG_PCI_OPTIMIZE @@ -46,6 +70,17 @@ bool ' Backward-compatible /proc/pci' CONFIG_PCI_OLD_PROC fi bool 'MCA support' CONFIG_MCA +bool 'SGI Visual Workstation support' CONFIG_VISWS +if [ "$CONFIG_VISWS" = "y" ]; then + define_bool CONFIG_X86_VISWS_APIC y + define_bool CONFIG_X86_LOCAL_APIC y +else + if [ "$CONFIG_SMP" = "y" ]; then + define_bool CONFIG_X86_IO_APIC y + define_bool CONFIG_X86_LOCAL_APIC y + fi +fi + bool 'System V IPC' CONFIG_SYSVIPC bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL @@ -72,6 +107,9 @@ 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 + bool ' RTC stores time in GMT' CONFIG_APM_RTC_IS_GMT + bool ' Allow interrupts during APM BIOS calls' CONFIG_APM_ALLOW_INTS fi endmenu @@ -110,12 +148,15 @@ source net/ax25/Config.in +source net/irda/Config.in + mainmenu_option next_comment comment 'ISDN subsystem' - -tristate 'ISDN support' CONFIG_ISDN -if [ "$CONFIG_ISDN" != "n" ]; then - source drivers/isdn/Config.in +if [ "$CONFIG_NET" != "n" ]; then + tristate 'ISDN support' CONFIG_ISDN + if [ "$CONFIG_ISDN" != "n" ]; then + source drivers/isdn/Config.in + fi fi endmenu @@ -131,8 +172,6 @@ source drivers/char/Config.in source fs/Config.in - -source fs/nls/Config.in if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment diff -ur --new-file old/linux/arch/i386/defconfig new/linux/arch/i386/defconfig --- old/linux/arch/i386/defconfig Fri Oct 23 19:13:39 1998 +++ new/linux/arch/i386/defconfig Wed Jan 20 20:33:56 1999 @@ -12,9 +12,18 @@ # # CONFIG_M386 is not set # CONFIG_M486 is not set -CONFIG_M586=y -# CONFIG_M686 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +CONFIG_M686=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_TSC=y +CONFIG_X86_GOOD_APIC=y # CONFIG_MATH_EMULATION is not set +# CONFIG_MTRR is not set +CONFIG_SMP=y # # Loadable module support @@ -28,11 +37,17 @@ # CONFIG_NET=y CONFIG_PCI=y +# CONFIG_PCI_GOBIOS is not set +# CONFIG_PCI_GODIRECT is not set +CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_PCI_QUIRKS=y CONFIG_PCI_OLD_PROC=y # CONFIG_MCA is not set +# CONFIG_VISWS is not set +CONFIG_X86_IO_APIC=y +CONFIG_X86_LOCAL_APIC=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y @@ -139,6 +154,7 @@ # SCSI low-level drivers # # CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AHA152X is not set # CONFIG_SCSI_AHA1542 is not set # CONFIG_SCSI_AHA1740 is not set @@ -146,18 +162,24 @@ # 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_MEGARAID is not set +# CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_DMA is not set # CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_EATA is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO 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 @@ -202,6 +224,8 @@ # CONFIG_NET_RADIO is not set # CONFIG_TR is not set # CONFIG_HOSTESS_SV11 is not set +# CONFIG_COSA is not set +# CONFIG_RCPCI is not set # CONFIG_WAN_DRIVERS is not set # CONFIG_LAPBETHER is not set # CONFIG_X25_ASY is not set @@ -233,6 +257,10 @@ CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTY_COUNT=256 CONFIG_MOUSE=y + +# +# Mice +# # CONFIG_ATIXL_BUSMOUSE is not set # CONFIG_BUSMOUSE is not set # CONFIG_MS_BUSMOUSE is not set @@ -241,9 +269,17 @@ # CONFIG_PC110_PAD is not set # CONFIG_QIC02_TAPE is not set # CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set # CONFIG_RTC is not set + +# +# Video For Linux +# # CONFIG_VIDEO_DEV is not set -# CONFIG_NVRAM is not set + +# +# Joystick support +# # CONFIG_JOYSTICK is not set # @@ -255,35 +291,43 @@ # Filesystems # # CONFIG_QUOTA is not set -# CONFIG_MINIX_FS is not set -CONFIG_EXT2_FS=y -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set +CONFIG_AUTOFS_FS=y +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set # CONFIG_FAT_FS is not set # CONFIG_MSDOS_FS is not set # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set +CONFIG_ISO9660_FS=y +# CONFIG_JOLIET is not set +# CONFIG_MINIX_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y +CONFIG_DEVPTS_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set 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_HPFS_FS is not set -# 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=y -# CONFIG_UFS_FS is not set +# CONFIG_NCP_FS is not set + +# +# Partition Types +# # CONFIG_BSD_DISKLABEL is not set +# CONFIG_MAC_PARTITION 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 # diff -ur --new-file old/linux/arch/i386/kernel/Makefile new/linux/arch/i386/kernel/Makefile --- old/linux/arch/i386/kernel/Makefile Thu Sep 10 07:40:36 1998 +++ new/linux/arch/i386/kernel/Makefile Wed Jan 20 19:18:53 1999 @@ -38,8 +38,16 @@ OX_OBJS += apm.o endif -ifdef SMP -O_OBJS += io_apic.o smp.o trampoline.o +ifdef CONFIG_SMP +O_OBJS += smp.o trampoline.o +endif + +ifdef CONFIG_X86_IO_APIC +O_OBJS += io_apic.o +endif + +ifdef CONFIG_X86_VISWS_APIC +O_OBJS += visws_apic.o endif head.o: head.S $(TOPDIR)/include/linux/tasks.h diff -ur --new-file old/linux/arch/i386/kernel/apm.c new/linux/arch/i386/kernel/apm.c --- old/linux/arch/i386/kernel/apm.c Thu Oct 8 03:52:05 1998 +++ new/linux/arch/i386/kernel/apm.c Fri Jan 15 07:57:25 1999 @@ -30,6 +30,9 @@ * Feb 1998, Version 1.4 * Aug 1998, Version 1.5 * Sep 1998, Version 1.6 + * Nov 1998, Version 1.7 + * Jan 1999, Version 1.8 + * Jan 1999, Version 1.9 * * History: * 0.6b: first version in official kernel, Linux 1.3.46 @@ -60,6 +63,33 @@ * Fix OOPS at power off with no APM BIOS by Jan Echternach * * Stephen Rothwell + * 1.7: Modify driver's cached copy of the disabled/disengaged flags + * to reflect current state of APM BIOS. + * Chris Rankin + * Reset interrupt 0 timer to 100Hz after suspend + * Chad Miller + * Add CONFIG_APM_IGNORE_SUSPEND_BOUNCE + * Richard Gooch + * Allow boot time disabling of APM + * Make boot messages far less verbose by default + * Make asm safer + * Stephen Rothwell + * 1.8: Add CONFIG_APM_RTC_IS_GMT + * Richard Gooch + * change APM_NOINTS to CONFIG_APM_ALLOW_INTS + * remove dependency on CONFIG_PROC_FS + * Stephen Rothwell + * 1.9: Fix small typo. + * Try to cope with BIOS's that need to have all display + * devices blanked and not just the first one. + * Ross Paterson + * Fix segment limit setting it has always been wrong as + * the segments needed to have byte granularity. + * Mark a few things __init. + * Add hack to allow power off of SMP systems by popular request. + * Use CONFIG_SMP instead of __SMP__ + * Ignore BOUNCES for three seconds. + * Stephen Rothwell * * APM 1.1 Reference: * @@ -93,10 +123,8 @@ #include #include #include -#ifdef CONFIG_PROC_FS #include #include -#endif #include #include #include @@ -167,7 +195,7 @@ * * U: TI 4000M TravelMate: BIOS is *NOT* APM compliant * [Confirmed by TI representative] - * U: ACER 486DX4/75: uses dseg 0040, in violation of APM specification + * ?: 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 @@ -190,13 +218,6 @@ #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). @@ -204,7 +225,7 @@ #define APM_ZERO_SEGS /* - * Define to make all set_limit calls use 64k limits. The APM 1.1 BIOS is + * 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 @@ -215,11 +236,30 @@ #define APM_RELAX_SEGMENTS /* + * Define to re-initialize the interrupt 0 timer to 100 Hz after a suspend. + * This patched by Chad Miller , orig code by David + * Chen + */ +#undef INIT_TIMER_AFTER_SUSPEND + +#ifdef INIT_TIMER_AFTER_SUSPEND +#include +#include +#include +#endif + +/* * Need to poll the APM BIOS every second */ #define APM_CHECK_TIMEOUT (HZ) /* + * If CONFIG_APM_IGNORE_SUSPEND_BOUNCE is defined then + * ignore suspend events for this amount of time + */ +#define BOUNCE_INTERVAL (3 * HZ) + +/* * Save a segment register away */ #define savesegment(seg, where) \ @@ -241,9 +281,7 @@ 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)); @@ -256,6 +294,7 @@ unsigned short segment; } apm_bios_entry; static int apm_enabled = 0; +static int smp_hack = 0; #ifdef CONFIG_APM_CPU_IDLE static int clock_slowed = 0; #endif @@ -265,15 +304,22 @@ static int waiting_for_resume = 0; #endif +#ifdef CONFIG_APM_RTC_IS_GMT +# define clock_cmos_diff 0 +# define got_clock_diff 1 +#else static long clock_cmos_diff; static int got_clock_diff = 0; +#endif +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.6"; /* no spaces */ +static char driver_version[] = "1.9"; /* no spaces */ #ifdef APM_DEBUG static char * apm_event_name[] = { @@ -348,22 +394,22 @@ #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 + * These are the actual BIOS calls. Depending on APM_ZERO_SEGS and + * CONFIG_APM_ALLOW_INTS, 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 +#ifndef CONFIG_APM_ALLOW_INTS # define APM_DO_CLI __cli() #else # define APM_DO_CLI @@ -393,7 +439,7 @@ # define APM_DO_RESTORE_SEGS #endif -static inline u8 apm_bios_call(u32 eax_in, u32 ebx_in, u32 ecx_in, +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; @@ -404,13 +450,17 @@ 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), "=b" (*ebx), "=c" (*ecx), "=d" (*edx), + "=S" (*esi) : "a" (eax_in), "b" (ebx_in), "c" (ecx_in) - : "ax", "bx", "cx", "dx", "si", "di", "bp", "memory", "cc"); + : "memory", "cc"); APM_DO_RESTORE_SEGS; __restore_flags(flags); return *eax & 0xff; @@ -420,7 +470,7 @@ * This version only returns one value (usually an error code) */ -static inline u8 apm_bios_call_simple(u32 eax_in, u32 ebx_in, u32 ecx_in, +static u8 apm_bios_call_simple(u32 eax_in, u32 ebx_in, u32 ecx_in, u32 *eax) { u8 error; @@ -431,13 +481,22 @@ __save_flags(flags); APM_DO_CLI; APM_DO_SAVE_SEGS; - __asm__ __volatile__(APM_DO_ZERO_SEGS - "lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t" - "setc %%bl\n\t" - APM_DO_POP_SEGS - : "=a" (*eax), "=b" (error) - : "a" (eax_in), "b" (ebx_in), "c" (ecx_in) - : "ax", "bx", "cx", "dx", "si", "di", "bp", "memory", "cc"); + { + 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; @@ -470,7 +529,7 @@ return APM_SUCCESS; } -static inline int set_power_state(u_short what, u_short state) +static int set_power_state(u_short what, u_short state) { u32 eax; @@ -486,7 +545,15 @@ void apm_power_off(void) { - if (apm_enabled) + /* + * smp_hack == 2 means that we would have enabled APM support + * except there is more than one processor and so most of + * the APM stuff is unsafe. We will still try power down + * because is is useful to some people and they know what + * they are doing because they booted with the smp-power-off + * kernel option. + */ + if (apm_enabled || (smp_hack == 2)) (void) apm_set_power_state(APM_STATE_OFF); } @@ -494,13 +561,19 @@ /* 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); + int error; + + /* Blank the first display device */ + error = set_power_state(0x0100, state); + if (error == APM_BAD_DEVICE) + /* try to blank them all instead */ + error = set_power_state(0x01ff, state); + return error; } #endif #ifdef CONFIG_APM_DO_ENABLE -/* Called by apm_setup if apm_enabled will be true. */ -static int apm_enable_power_management(void) +static int __init apm_enable_power_management(void) { u32 eax; @@ -508,6 +581,7 @@ (apm_bios_info.version > 0x100) ? 0x0001 : 0xffff, 1, &eax)) return (eax >> 8) & 0xff; + apm_bios_info.flags &= ~APM_BIOS_DISABLED; return APM_SUCCESS; } #endif @@ -528,12 +602,9 @@ return APM_SUCCESS; } -#if 0 -/* not used anywhere */ -static int apm_get_battery_status(u_short which, +static int apm_get_battery_status(u_short which, u_short *status, u_short *bat, u_short *life, u_short *nbat) { - u_short status; u32 eax; u32 ebx; u32 ecx; @@ -545,20 +616,20 @@ if (which != 1) return APM_BAD_DEVICE; *nbat = 1; - return apm_get_power_status(&status, bat, life); + 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; + *status = ebx; *bat = ecx; *life = edx; *nbat = esi; return APM_SUCCESS; } -#endif -static int apm_engage_power_management(u_short device) +static int __init apm_engage_power_management(u_short device) { u32 eax; @@ -574,9 +645,10 @@ for (i = 0; i < ERROR_COUNT; i++) if (error_table[i].key == err) break; if (i < ERROR_COUNT) - printk(KERN_NOTICE "apm_bios: %s: %s\n", str, error_table[i].msg); + printk(KERN_NOTICE "apm: %s: %s\n", str, error_table[i].msg); else - printk(KERN_NOTICE "apm_bios: %s: unknown error code %#2.2x\n", str, err); + printk(KERN_NOTICE "apm: %s: unknown error code %#2.2x\n", + str, err); } /* Called from console driver -- must make sure apm_enabled. */ @@ -629,7 +701,6 @@ callback_list_t ** ptr; callback_list_t * old; - ptr = &callback_list; for (ptr = &callback_list; *ptr != NULL; ptr = &(*ptr)->next) if ((*ptr)->callback == callback) break; @@ -663,7 +734,7 @@ static int notified; if (notified == 0) { - printk( "apm_bios: an event queue overflowed\n" ); + printk(KERN_ERR "apm: an event queue overflowed\n"); notified = 1; } as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; @@ -707,18 +778,33 @@ unsigned long flags; int err; - /* Estimate time zone so that set_time can - update the clock */ +#ifndef CONFIG_APM_RTC_IS_GMT + /* + * 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); +#endif 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(); } @@ -771,24 +857,32 @@ static void check_events(void) { - apm_event_t event; + apm_event_t event; +#ifdef CONFIG_APM_IGNORE_SUSPEND_BOUNCE + static unsigned long last_resume = 0; + static int ignore_bounce = 0; +#endif while ((event = get_event()) != 0) { #ifdef APM_DEBUG if (event <= NR_APM_EVENT_NAME) - printk(KERN_DEBUG "APM BIOS received %s notify\n", + printk(KERN_DEBUG "apm: received %s notify\n", apm_event_name[event - 1]); else - printk(KERN_DEBUG "APM BIOS received unknown " + printk(KERN_DEBUG "apm: received unknown " "event 0x%02x\n", event); #endif +#ifdef CONFIG_APM_IGNORE_SUSPEND_BOUNCE + if (ignore_bounce + && ((jiffies - last_resume) > BOUNCE_INTERVAL)) + ignore_bounce = 0; +#endif switch (event) { case APM_SYS_STANDBY: case APM_USER_STANDBY: #ifdef CONFIG_APM_IGNORE_MULTIPLE_SUSPEND - if (waiting_for_resume) { - return; - } + if (waiting_for_resume) + return; waiting_for_resume = 1; #endif send_event(event, APM_STANDBY_RESUME, NULL); @@ -803,10 +897,13 @@ break; #endif case APM_SYS_SUSPEND: +#ifdef CONFIG_APM_IGNORE_SUSPEND_BOUNCE + if (ignore_bounce) + break; +#endif #ifdef CONFIG_APM_IGNORE_MULTIPLE_SUSPEND - if (waiting_for_resume) { - return; - } + if (waiting_for_resume) + return; waiting_for_resume = 1; #endif send_event(event, APM_NORMAL_RESUME, NULL); @@ -820,6 +917,10 @@ #ifdef CONFIG_APM_IGNORE_MULTIPLE_SUSPEND waiting_for_resume = 0; #endif +#ifdef CONFIG_APM_IGNORE_SUSPEND_BOUNCE + last_resume = jiffies; + ignore_bounce = 1; +#endif set_time(); send_event(event, 0, NULL); break; @@ -905,7 +1006,7 @@ 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_bios: %s passed bad filp", func); + printk(KERN_ERR "apm: %s passed bad filp", func); return 1; } return 0; @@ -1041,7 +1142,7 @@ as1 = as1->next) ; if (as1 == NULL) - printk(KERN_ERR "apm_bios: filp not in user list"); + printk(KERN_ERR "apm: filp not in user list"); else as1->next = as->next; } @@ -1055,7 +1156,7 @@ as = (struct apm_bios_struct *)kmalloc(sizeof(*as), GFP_KERNEL); if (as == NULL) { - printk(KERN_ERR "apm_bios: cannot allocate struct of size %d bytes", + printk(KERN_ERR "apm: cannot allocate struct of size %d bytes", sizeof(*as)); return -ENOMEM; } @@ -1077,13 +1178,13 @@ 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 nbat; unsigned short error; unsigned short ac_line_status = 0xff; unsigned short battery_status = 0xff; @@ -1105,13 +1206,8 @@ 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; - } + units = (dx & 0x8000) ? "min" : "sec"; + time_units = dx & 0x7fff; } } } @@ -1166,7 +1262,28 @@ 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; + if (strncmp(str, "smp-power-off", 13) == 0) + smp_hack = !invert; + str = strchr(str, ','); + if (str != NULL) + str += strspn(str, ", \t"); + } +} void __init apm_bios_init(void) { @@ -1178,23 +1295,18 @@ char * bat_stat; static struct proc_dir_entry *ent; -#ifdef __SMP__ - if (smp_num_cpus > 1) { - printk(KERN_NOTICE "APM disabled: APM is not SMP safe.\n"); - return; - } -#endif if (apm_bios_info.version == 0) { - printk(KERN_INFO "APM BIOS not found.\n"); + printk(KERN_INFO "apm: BIOS not found.\n"); return; } - printk(KERN_INFO "APM BIOS version %c.%c Flags 0x%02x (Driver version %s)\n", - ((apm_bios_info.version >> 8) & 0xff) + '0', - (apm_bios_info.version & 0xff) + '0', - apm_bios_info.flags, - driver_version); + 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 " No 32 bit BIOS support\n"); + printk(KERN_INFO "apm: no 32 bit BIOS support\n"); return; } @@ -1207,16 +1319,25 @@ /* BIOS < 1.2 doesn't set cseg_16_len */ if (apm_bios_info.version < 0x102) - apm_bios_info.cseg_16_len = 0xFFFF; /* 64k */ + apm_bios_info.cseg_16_len = 0; /* 64k */ - printk(KERN_INFO " 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 (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, dseg len %x", + apm_bios_info.cseg_len, + apm_bios_info.dseg_len); + if (apm_bios_info.version > 0x101) + printk(" cseg16 len %x", apm_bios_info.cseg_16_len); + printk("\n"); + } + + if (apm_disabled) { + printk(KERN_NOTICE "apm: disabled on user request.\n"); + return; + } /* * Set up a segment that references the real mode segment 0x40 @@ -1226,7 +1347,7 @@ */ set_base(gdt[APM_40 >> 3], __va((unsigned long)0x40 << 4)); - set_limit(gdt[APM_40 >> 3], 4096 - (0x40 << 4)); + _set_limit((char *)&gdt[APM_40 >> 3], 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_bios_info.offset; apm_bios_entry.segment = APM_CS; @@ -1236,101 +1357,117 @@ __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 +#ifndef APM_RELAX_SEGMENTS + if (apm_bios_info.version == 0x100) +#endif + { /* For ASUS motherboard, Award BIOS rev 110 (and others?) */ - set_limit(gdt[APM_CS >> 3], 64 * 1024); + _set_limit((char *)&gdt[APM_CS >> 3], 64 * 1024 - 1); /* For some unknown machine. */ - set_limit(gdt[APM_CS_16 >> 3], 64 * 1024); + _set_limit((char *)&gdt[APM_CS_16 >> 3], 64 * 1024 - 1); /* 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); + _set_limit((char *)&gdt[APM_DS >> 3], 64 * 1024 - 1); + } +#ifndef APM_RELAX_SEGMENTS + else { + _set_limit((char *)&gdt[APM_CS >> 3], + (apm_bios_info.cseg_len - 1) & 0xffff); + _set_limit((char *)&gdt[APM_CS_16 >> 3], + (apm_bios_info.cseg_16_len - 1) & 0xffff); + _set_limit((char *)&gdt[APM_DS >> 3], + (apm_bios_info.dseg_len - 1) & 0xffff); + } +#endif +#ifdef CONFIG_SMP + if (smp_num_cpus > 1) { + printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n"); + if (smp_hack) + smp_hack = 2; + return; + } #endif - /* The APM 1.2 docs state that the apm_driver_version - * call can fail if we try to connect as 1.2 to a 1.1 bios. + if (apm_bios_info.version > 0x100) { + /* + * We only support BIOSs up to version 1.2 */ - apm_bios_info.version = 0x0102; - error = apm_driver_version(&apm_bios_info.version); - if (error != APM_SUCCESS) { /* Fall back to an APM 1.1 connection. */ - apm_bios_info.version = 0x0101; - error = apm_driver_version(&apm_bios_info.version); - } - if (error != APM_SUCCESS) /* Fall back to an APM 1.0 connection. */ + 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; - else { - apm_engage_power_management(0x0001); - printk( " Connection 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 " 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 " 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(" battery flag 0x%02x, battery life ", - (cx >> 8) & 0xff); - if (dx == 0xffff) + if (debug) { + printk(KERN_INFO "apm: Connection 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 { - if ((dx & 0x8000)) - printk("%d minutes\n", dx & 0x7ffe ); + else + printk("%d%%\n", cx & 0xff); + if (apm_bios_info.version > 0x100) { + printk(KERN_INFO + "apm: battery flag 0x%02x, battery life ", + (cx >> 8) & 0xff); + if (dx == 0xffff) + printk("unknown\n"); else - printk("%d seconds\n", dx & 0x7fff ); + printk("%d %s\n", dx & 0x7fff, + (dx & 0x8000) ? + "minutes" : "seconds"); } } } #ifdef CONFIG_APM_DO_ENABLE - /* - * 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); - if (error == APM_DISABLED) - return; + 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 + if (ent != NULL) + ent->get_info = apm_get_info; misc_register(&apm_device); diff -ur --new-file old/linux/arch/i386/kernel/bios32.c new/linux/arch/i386/kernel/bios32.c --- old/linux/arch/i386/kernel/bios32.c Fri Oct 23 17:25:05 1998 +++ new/linux/arch/i386/kernel/bios32.c Wed Jan 20 19:18:53 1999 @@ -352,6 +352,10 @@ { u16 dfn, x; +#ifdef CONFIG_VISWS + return 1; /* Lithium PCI Bridges are non-standard */ +#endif + if (pci_probe & PCI_NO_CHECKS) return 1; for(dfn=0; dfn < 0x100; dfn++) @@ -1051,7 +1055,7 @@ pci_write_config_word(dev, PCI_COMMAND, cmd); } } -#ifdef __SMP__ +#if defined(CONFIG_X86_IO_APIC) /* * Recalculate IRQ numbers if we use the I/O APIC */ diff -ur --new-file old/linux/arch/i386/kernel/entry.S new/linux/arch/i386/kernel/entry.S --- old/linux/arch/i386/kernel/entry.S Wed Oct 14 00:27:47 1998 +++ new/linux/arch/i386/kernel/entry.S Wed Jan 20 20:05:59 1999 @@ -107,7 +107,7 @@ 2: popl %es; \ addl $4,%esp; \ 3: iret; \ -.section fixup,"ax"; \ +.section .fixup,"ax"; \ 4: movl $0,(%esp); \ jmp 1b; \ 5: movl $0,(%esp); \ @@ -150,14 +150,14 @@ jmp ret_from_sys_call -#ifdef __SMP__ ALIGN - .globl ret_from_smpfork -ret_from_smpfork: + .globl ret_from_fork +ret_from_fork: +#ifdef __SMP__ + call SYMBOL_NAME(schedule_tail) +#endif /* __SMP__ */ GET_CURRENT(%ebx) - btrl $0, SYMBOL_NAME(scheduler_lock) jmp ret_from_sys_call -#endif /* __SMP__ */ /* * Return to user mode is not as complex as all this looks, @@ -193,6 +193,7 @@ ALIGN signal_return: + sti # we can get here from an interrupt handler testl $(VM_MASK),EFLAGS(%esp) movl %esp,%eax jne v86_signal_return @@ -237,14 +238,13 @@ 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 @@ -559,13 +559,14 @@ .long SYMBOL_NAME(sys_sendfile) .long SYMBOL_NAME(sys_ni_syscall) /* streams1 */ .long SYMBOL_NAME(sys_ni_syscall) /* streams2 */ + .long SYMBOL_NAME(sys_vfork) /* 190 */ /* - * NOTE!! This doesn' thave to be exact - we just have + * NOTE!! This doesn't have to be exact - we just have * to make sure we have _enough_ of the "sys_ni_syscall" * entries. Don't panic if you notice that this hasn't * been shrunk every time we add a new system call. */ - .rept NR_syscalls-189 + .rept NR_syscalls-190 .long SYMBOL_NAME(sys_ni_syscall) .endr diff -ur --new-file old/linux/arch/i386/kernel/head.S new/linux/arch/i386/kernel/head.S --- old/linux/arch/i386/kernel/head.S Wed Sep 9 17:56:58 1998 +++ new/linux/arch/i386/kernel/head.S Fri Jan 15 07:57:25 1999 @@ -534,10 +534,14 @@ .quad 0x00cff2000000ffff /* 0x2b user 4GB data at 0x00000000 */ .quad 0x0000000000000000 /* not used */ .quad 0x0000000000000000 /* not used */ - .quad 0x00c0920000000000 /* 0x40 APM set up for bad BIOS's */ - .quad 0x00c09a0000000000 /* 0x48 APM CS code */ - .quad 0x00809a0000000000 /* 0x50 APM CS 16 code (16 bit) */ - .quad 0x00c0920000000000 /* 0x58 APM DS data */ + /* + * The APM segments have byte granularity and their bases + * and limits are set at run time. + */ + .quad 0x0040920000000000 /* 0x40 APM set up for bad BIOS's */ + .quad 0x00409a0000000000 /* 0x48 APM CS code */ + .quad 0x00009a0000000000 /* 0x50 APM CS 16 code (16 bit) */ + .quad 0x0040920000000000 /* 0x58 APM DS data */ .fill 2*NR_TASKS,8,0 /* space for LDT's and TSS's etc */ /* diff -ur --new-file old/linux/arch/i386/kernel/i386_ksyms.c new/linux/arch/i386/kernel/i386_ksyms.c --- old/linux/arch/i386/kernel/i386_ksyms.c Tue Jul 28 02:43:30 1998 +++ new/linux/arch/i386/kernel/i386_ksyms.c Tue Jan 19 20:02:59 1999 @@ -39,6 +39,7 @@ 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); @@ -57,6 +58,10 @@ EXPORT_SYMBOL_NOVERS(__put_user_2); EXPORT_SYMBOL_NOVERS(__put_user_4); +EXPORT_SYMBOL(strtok); +EXPORT_SYMBOL(strpbrk); +EXPORT_SYMBOL(strstr); + EXPORT_SYMBOL(strncpy_from_user); EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(clear_user); @@ -82,7 +87,6 @@ EXPORT_SYMBOL(__global_sti); EXPORT_SYMBOL(__global_save_flags); EXPORT_SYMBOL(__global_restore_flags); -EXPORT_SYMBOL(smp_message_pass); EXPORT_SYMBOL(mtrr_hook); #endif @@ -98,6 +102,9 @@ 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 -ur --new-file old/linux/arch/i386/kernel/io_apic.c new/linux/arch/i386/kernel/io_apic.c --- old/linux/arch/i386/kernel/io_apic.c Wed Oct 7 01:44:00 1998 +++ new/linux/arch/i386/kernel/io_apic.c Mon Dec 28 19:52:01 1998 @@ -225,6 +225,13 @@ int pirq_entries [MAX_PIRQS]; int pirqs_enabled; +void __init ioapic_setup(char *str, int *ints) +{ + extern int skip_ioapic_setup; /* defined in arch/i386/kernel/smp.c */ + + skip_ioapic_setup = 1; +} + void __init ioapic_pirq_setup(char *str, int *ints) { int i, max; @@ -675,7 +682,8 @@ printk(".... register #01: %08X\n", *(int *)®_01); printk("....... : max redirection entries: %04X\n", reg_01.entries); if ( (reg_01.entries != 0x0f) && /* ISA-only Neptune boards */ - (reg_01.entries != 0x17) /* ISA+PCI boards */ + (reg_01.entries != 0x17) && /* ISA+PCI boards */ + (reg_01.entries != 0x3F) /* Xeon boards */ ) UNEXPECTED_IO_APIC(); if (reg_01.entries == 0x0f) @@ -683,7 +691,8 @@ printk("....... : IO APIC version: %04X\n", reg_01.version); if ( (reg_01.version != 0x10) && /* oldest IO-APICs */ - (reg_01.version != 0x11) /* my IO-APIC */ + (reg_01.version != 0x11) && /* Pentium/Pro IO-APICs */ + (reg_01.version != 0x13) /* Xeon IO-APICs */ ) UNEXPECTED_IO_APIC(); if (reg_01.__reserved_1 || reg_01.__reserved_2) @@ -946,7 +955,7 @@ if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { desc->status = status | IRQ_REPLAY; - send_IPI(APIC_DEST_SELF, IO_APIC_VECTOR(irq)); + send_IPI_self(IO_APIC_VECTOR(irq)); } } diff -ur --new-file old/linux/arch/i386/kernel/ioport.c new/linux/arch/i386/kernel/ioport.c --- old/linux/arch/i386/kernel/ioport.c Wed Jul 8 20:22:57 1998 +++ new/linux/arch/i386/kernel/ioport.c Tue Jan 12 00:02:52 1999 @@ -58,7 +58,7 @@ if ((from + num <= from) || (from + num > IO_BITMAP_SIZE*32)) return -EINVAL; - if (!capable(CAP_SYS_RAWIO)) + if (turn_on && !capable(CAP_SYS_RAWIO)) return -EPERM; /* * If it's the first ioperm() call in this thread's lifetime, set the @@ -91,11 +91,15 @@ { struct pt_regs * regs = (struct pt_regs *) &unused; unsigned int level = regs->ebx; + unsigned int old = (regs->eflags >> 12) & 3; if (level > 3) return -EINVAL; - if (!capable(CAP_SYS_RAWIO)) - return -EPERM; + /* Trying to gain more privileges? */ + if (level > old) { + if (!capable(CAP_SYS_RAWIO)) + return -EPERM; + } regs->eflags = (regs->eflags & 0xffffcfff) | (level << 12); return 0; } diff -ur --new-file old/linux/arch/i386/kernel/irq.c new/linux/arch/i386/kernel/irq.c --- old/linux/arch/i386/kernel/irq.c Mon Sep 28 04:20:20 1998 +++ new/linux/arch/i386/kernel/irq.c Wed Jan 20 22:00:17 1999 @@ -15,6 +15,7 @@ * Naturally it's not a 1:1 relation, but there are similarities. */ +#include #include #include #include @@ -47,46 +48,28 @@ atomic_t nmi_counter; /* - * About the IO-APIC, the architecture is 'merged' into our - * current irq architecture, seemlessly. (i hope). It is only - * visible through a few more more hardware interrupt lines, but - * otherwise drivers are unaffected. The main code is believed - * to be NR_IRQS-safe (nothing anymore thinks we have 16 - * irq lines only), but there might be some places left ... + * Linux has a controller-independent x86 interrupt architecture. + * every controller has a 'controller-template', that is used + * by the main code to do the right thing. Each driver-visible + * interrupt source is transparently wired to the apropriate + * controller. Thus drivers need not be aware of the + * interrupt-controller. + * + * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC, + * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC. + * (IO-APICs assumed to be messaging to Pentium local-APICs) + * + * the code is designed to be easily extended with new/different + * interrupt controllers, without having to do assembly magic. */ /* - * This contains the irq mask for both 8259A irq controllers, + * Micro-access to controllers is serialized over the whole + * system. We never hold this lock when we call the actual + * IRQ handler. */ -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)) - spinlock_t irq_controller_lock; -/* - * Not all IRQs can be routed through the IO-APIC, eg. on certain (older) - * boards the timer interrupt is not connected to any IO-APIC pin, it's - * fed to the CPU IRQ line directly. - * - * Any '1' bit in this mask means the IRQ is routed through the IO-APIC. - * this 'mixed mode' IRQ handling costs us one more branch in do_IRQ, - * but we have _much_ higher compatibility and robustness this way. - */ -unsigned long long io_apic_irqs = 0; - -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 @@ -108,6 +91,19 @@ disable_none }; +/* + * This is the 'legacy' 8259A Programmable Interrupt Controller, + * present in the majority of PC/AT boxes. + */ + +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 + static struct hw_interrupt_type i8259A_irq_type = { "XT-PIC", startup_8259A_irq, @@ -117,11 +113,38 @@ disable_8259A_irq }; -irq_desc_t irq_desc[NR_IRQS] = { - [0 ... 15] = { 0, &i8259A_irq_type, }, /* default to standard ISA IRQs */ - [16 ... NR_IRQS-1] = { 0, &no_irq_type, }, /* 'high' PCI IRQs filled in on demand */ -}; +/* + * Controller mappings for all interrupt sources: + */ +irq_desc_t irq_desc[NR_IRQS] = { [0 ... NR_IRQS-1] = { 0, &no_irq_type, }}; + +/* + * 8259A PIC functions to handle ISA devices: + */ + +/* + * This contains the irq mask for both 8259A irq controllers, + */ +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)) + +/* + * Not all IRQs can be routed through the IO-APIC, eg. on certain (older) + * boards the timer interrupt is not connected to any IO-APIC pin, it's + * fed to the CPU IRQ line directly. + * + * Any '1' bit in this mask means the IRQ is routed through the IO-APIC. + * this 'mixed mode' IRQ handling costs us one more branch in do_IRQ, + * but we have _much_ higher compatibility and robustness this way. + */ +unsigned long long io_apic_irqs = 0; /* * These have to be protected by the irq controller spinlock @@ -149,6 +172,77 @@ } } +int i8259A_irq_pending(unsigned int irq) +{ + unsigned int mask = 1<> 8)); +} + +void make_8259A_irq(unsigned int irq) +{ + disable_irq(irq); + __long(0,io_apic_irqs) &= ~(1<status & ~IRQ_REPLAY; + action = NULL; + if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) + action = desc->action; + desc->status = status | IRQ_INPROGRESS; + } + spin_unlock(&irq_controller_lock); + + /* Exit early if we had no action or it was disabled */ + if (!action) + return; + + handle_IRQ_event(irq, regs, action); + + spin_lock(&irq_controller_lock); + { + unsigned int status = desc->status & ~IRQ_INPROGRESS; + desc->status = status; + if (!(status & IRQ_DISABLED)) + enable_8259A_irq(irq); + } + spin_unlock(&irq_controller_lock); +} + /* * This builds up the IRQ handler stubs using some ugly macros in irq.h * @@ -168,8 +262,7 @@ BUILD_IRQ(8) BUILD_IRQ(9) BUILD_IRQ(10) BUILD_IRQ(11) BUILD_IRQ(12) BUILD_IRQ(13) BUILD_IRQ(14) BUILD_IRQ(15) -#ifdef __SMP__ - +#ifdef CONFIG_X86_IO_APIC /* * The IO-APIC gives us many more interrupt sources.. */ @@ -185,11 +278,13 @@ BUILD_IRQ(52) BUILD_IRQ(53) BUILD_IRQ(54) BUILD_IRQ(55) BUILD_IRQ(56) BUILD_IRQ(57) BUILD_IRQ(58) BUILD_IRQ(59) BUILD_IRQ(60) BUILD_IRQ(61) BUILD_IRQ(62) BUILD_IRQ(63) +#endif +#ifdef __SMP__ /* * The following vectors are part of the Linux architecture, there * is no hardware IRQ pin equivalent for them, they are triggered - * through the ICC by us (IPIs), via smp_message_pass(): + * through the ICC by us (IPIs) */ BUILD_SMP_INTERRUPT(reschedule_interrupt) BUILD_SMP_INTERRUPT(invalidate_interrupt) @@ -213,7 +308,7 @@ IRQ4_interrupt, IRQ5_interrupt, IRQ6_interrupt, IRQ7_interrupt, IRQ8_interrupt, IRQ9_interrupt, IRQ10_interrupt, IRQ11_interrupt, IRQ12_interrupt, IRQ13_interrupt, IRQ14_interrupt, IRQ15_interrupt -#ifdef __SMP__ +#ifdef CONFIG_X86_IO_APIC ,IRQ16_interrupt, IRQ17_interrupt, IRQ18_interrupt, IRQ19_interrupt, IRQ20_interrupt, IRQ21_interrupt, IRQ22_interrupt, IRQ23_interrupt, IRQ24_interrupt, IRQ25_interrupt, IRQ26_interrupt, IRQ27_interrupt, @@ -231,12 +326,16 @@ #endif }; + /* * Initial irq handlers. */ -static void no_action(int cpl, void *dev_id, struct pt_regs *regs) { } +void no_action(int cpl, void *dev_id, struct pt_regs *regs) +{ +} +#ifndef CONFIG_VISWS /* * Note that on a 486, we don't want to do a SIGFPE on an irq13 * as the irq is unreliable, and exception 16 works correctly @@ -262,7 +361,13 @@ /* * IRQ2 is cascade interrupt to second interrupt controller */ + static struct irqaction irq2 = { no_action, 0, 0, "cascade", NULL, NULL}; +#endif + +/* + * Generic, controller-independent functions: + */ int get_irq_list(char *buf) { @@ -297,7 +402,7 @@ } p += sprintf(p, "NMI: %10u\n", atomic_read(&nmi_counter)); #ifdef __SMP__ - p += sprintf(p, "IPI: %10lu\n", ipi_count); + p += sprintf(p, "ERR: %10lu\n", ipi_count); #endif return p - buf; } @@ -335,22 +440,22 @@ int i; unsigned long *stack; int cpu = smp_processor_id(); + extern char *get_options(char *str, int *ints); printk("\n%s, CPU %d:\n", str, cpu); printk("irq: %d [%d %d]\n", atomic_read(&global_irq_count), local_irq_count[0], local_irq_count[1]); printk("bh: %d [%d %d]\n", atomic_read(&global_bh_count), local_bh_count[0], local_bh_count[1]); - stack = (unsigned long *) &str; + stack = (unsigned long *) &stack; for (i = 40; i ; i--) { unsigned long x = *++stack; - if (x > (unsigned long) &init_task_union && x < (unsigned long) &vsprintf) { + if (x > (unsigned long) &get_options && x < (unsigned long) &vsprintf) { printk("<[%08lx]> ", x); } } } - #define MAXCOUNT 100000000 static inline void wait_on_bh(void) @@ -607,79 +712,6 @@ return status; } -int i8259A_irq_pending(unsigned int irq) -{ - unsigned int mask = 1<> 8)); -} - - -void make_8259A_irq(unsigned int irq) -{ - disable_irq(irq); - __long(0,io_apic_irqs) &= ~(1<status & ~IRQ_REPLAY; - action = NULL; - if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) - action = desc->action; - desc->status = status | IRQ_INPROGRESS; - } - spin_unlock(&irq_controller_lock); - - /* Exit early if we had no action or it was disabled */ - if (!action) - return; - - handle_IRQ_event(irq, regs, action); - - spin_lock(&irq_controller_lock); - { - unsigned int status = desc->status & ~IRQ_INPROGRESS; - desc->status = status; - if (!(status & IRQ_DISABLED)) - enable_8259A_irq(irq); - } - spin_unlock(&irq_controller_lock); -} - - /* * Generic enable/disable code: this just calls * down into the PIC-specific version for the actual @@ -691,8 +723,10 @@ unsigned long flags; spin_lock_irqsave(&irq_controller_lock, flags); - irq_desc[irq].status |= IRQ_DISABLED; - irq_desc[irq].handler->disable(irq); + if (!irq_desc[irq].depth++) { + irq_desc[irq].status |= IRQ_DISABLED; + irq_desc[irq].handler->disable(irq); + } spin_unlock_irqrestore(&irq_controller_lock, flags); if (irq_desc[irq].status & IRQ_INPROGRESS) @@ -704,16 +738,18 @@ unsigned long flags; spin_lock_irqsave(&irq_controller_lock, flags); - /* - * In contrast to the above, we should _not_ have any concurrent - * interrupt activity here, so we just clear both disabled bits. - * - * This allows us to have IRQ_INPROGRESS set until we actually - * install a handler for this interrupt (make irq autodetection - * work by just looking at the status field for the irq) - */ - irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS); - irq_desc[irq].handler->enable(irq); + switch (irq_desc[irq].depth) { + case 1: + irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS); + irq_desc[irq].handler->enable(irq); + /* fall throught */ + default: + irq_desc[irq].depth--; + break; + case 0: + printk("enable_irq() unbalanced from %p\n", + __builtin_return_address(0)); + } spin_unlock_irqrestore(&irq_controller_lock, flags); } @@ -798,6 +834,7 @@ *p = new; if (!shared) { + irq_desc[irq].depth = 0; irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS); irq_desc[irq].handler->startup(irq); } @@ -894,7 +931,7 @@ /* * Wait for spurious interrupts to trigger */ - for (delay = jiffies + HZ/10; delay > jiffies; ) + for (delay = jiffies + HZ/10; time_after(delay, jiffies); ) /* about 100ms delay */ synchronize_irq(); /* @@ -949,21 +986,75 @@ return irq_found; } -__initfunc(void init_IRQ(void)) +/* + * Silly, horrible hack + */ +static char uglybuffer[10*256]; + +__asm__("\n" __ALIGN_STR"\n" + "common_unexpected:\n\t" + SAVE_ALL + "pushl $ret_from_intr\n\t" + "jmp strange_interrupt"); + +void strange_interrupt(int irqnum) +{ + printk("Unexpected interrupt %d\n", irqnum & 255); + for (;;); +} + +extern int common_unexpected; +__initfunc(void init_unexpected_irq(void)) { int i; + for (i = 0; i < 256; i++) { + char *code = uglybuffer + 10*i; + unsigned long jumpto = (unsigned long) &common_unexpected; - /* set the clock to 100 Hz */ - outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ - outb_p(LATCH & 0xff , 0x40); /* LSB */ - outb(LATCH >> 8 , 0x40); /* MSB */ + jumpto -= (unsigned long)(code+10); + code[0] = 0x68; /* pushl */ + *(int *)(code+1) = i - 512; + code[5] = 0xe9; /* jmp */ + *(int *)(code+6) = jumpto; + + set_intr_gate(i,code); + } +} + + +void init_ISA_irqs (void) +{ + int i; - for (i=0; i> 8 , 0x40); /* MSB */ + +#ifndef CONFIG_VISWS setup_x86_irq(2, &irq2); setup_x86_irq(13, &irq13); +#endif } -#ifdef __SMP__ - +#ifdef CONFIG_X86_IO_APIC __initfunc(void init_IRQ_SMP(void)) { int i; @@ -1015,5 +1116,5 @@ if (IO_APIC_VECTOR(i) > 0) set_intr_gate(IO_APIC_VECTOR(i), interrupt[i]); } - #endif + diff -ur --new-file old/linux/arch/i386/kernel/irq.h new/linux/arch/i386/kernel/irq.h --- old/linux/arch/i386/kernel/irq.h Tue Sep 15 21:03:20 1998 +++ new/linux/arch/i386/kernel/irq.h Thu Jan 28 21:42:35 1999 @@ -37,10 +37,31 @@ unsigned int status; /* IRQ status - IRQ_INPROGRESS, IRQ_DISABLED */ struct hw_interrupt_type *handler; /* handle/enable/disable functions */ struct irqaction *action; /* IRQ action list */ - unsigned int unused[3]; + unsigned int depth; /* Disable depth for nested irq disables */ } irq_desc_t; -#define IRQ0_TRAP_VECTOR 0x51 +/* + * Special IRQ vectors used by the SMP architecture: + * + * (some of the following vectors are 'rare', they might be merged + * into a single vector to save vector space. TLB, reschedule and + * local APIC vectors are performance-critical.) + */ +#define RESCHEDULE_VECTOR 0x30 +#define INVALIDATE_TLB_VECTOR 0x31 +#define STOP_CPU_VECTOR 0x40 +#define LOCAL_TIMER_VECTOR 0x41 +#define MTRR_CHANGE_VECTOR 0x50 + +/* + * First vector available to drivers: (vectors 0x51-0xfe) + */ +#define IRQ0_TRAP_VECTOR 0x51 + +/* + * This IRQ should never happen, but we print a message nevertheless. + */ +#define SPURIOUS_APIC_VECTOR 0xff extern irq_desc_t irq_desc[NR_IRQS]; extern int irq_vector[NR_IRQS]; @@ -48,6 +69,7 @@ extern void init_IRQ_SMP(void); extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); +extern int setup_x86_irq(unsigned int, struct irqaction *); /* * Various low-level irq details needed by irq.c, process.c, @@ -56,17 +78,21 @@ * Interrupt entry/exit code at both C and assembly level */ -void mask_irq(unsigned int irq); -void unmask_irq(unsigned int irq); -void disable_8259A_irq(unsigned int irq); -int i8259A_irq_pending(unsigned int irq); -void ack_APIC_irq(void); -void setup_IO_APIC(void); -int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); -void make_8259A_irq(unsigned int irq); -void send_IPI(int dest, int vector); -void init_pic_mode(void); -void print_IO_APIC(void); +extern void no_action(int cpl, void *dev_id, struct pt_regs *regs); +extern void mask_irq(unsigned int irq); +extern void unmask_irq(unsigned int irq); +extern void disable_8259A_irq(unsigned int irq); +extern int i8259A_irq_pending(unsigned int irq); +extern void ack_APIC_irq(void); +extern void FASTCALL(send_IPI_self(int vector)); +extern void smp_send_mtrr(void); +extern void init_VISWS_APIC_irqs(void); +extern void setup_IO_APIC(void); +extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); +extern void make_8259A_irq(unsigned int irq); +extern void send_IPI(int dest, int vector); +extern void init_pic_mode(void); +extern void print_IO_APIC(void); extern unsigned long long io_apic_irqs; @@ -81,11 +107,7 @@ extern char ioapic_OEM_ID [16]; extern char ioapic_Product_ID [16]; -extern spinlock_t irq_controller_lock; /* - * Protects both the 8259 and the - * IO-APIC - */ - +extern spinlock_t irq_controller_lock; #ifdef __SMP__ diff -ur --new-file old/linux/arch/i386/kernel/mtrr.c new/linux/arch/i386/kernel/mtrr.c --- old/linux/arch/i386/kernel/mtrr.c Thu Oct 1 00:34:25 1998 +++ new/linux/arch/i386/kernel/mtrr.c Mon Dec 28 07:45:13 1998 @@ -164,6 +164,9 @@ #include #include +#include +#include "irq.h" + #define MTRR_VERSION "1.26 (19981001)" #define TRUE 1 @@ -612,10 +615,11 @@ /* Send a message to all other CPUs and wait for them to enter the barrier */ atomic_set (&undone_count, smp_num_cpus - 1); - smp_message_pass (MSG_ALL_BUT_SELF, MSG_MTRR_CHANGE, 0, 0); + smp_send_mtrr(); /* Wait for it to be done */ timeout = jiffies + JIFFIE_TIMEOUT; - while ( (atomic_read (&undone_count) > 0) && (jiffies < timeout) ) + while ( (atomic_read (&undone_count) > 0) && + time_before(jiffies, timeout) ) barrier (); if (atomic_read (&undone_count) > 0) { diff -ur --new-file old/linux/arch/i386/kernel/process.c new/linux/arch/i386/kernel/process.c --- old/linux/arch/i386/kernel/process.c Thu Oct 8 03:52:06 1998 +++ new/linux/arch/i386/kernel/process.c Wed Jan 20 20:08:24 1999 @@ -50,11 +50,7 @@ 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,30 @@ /* * 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; + int work = 1; + unsigned long start_idle = 0; - lock_kernel(); - if (current->pid != 0) - goto out; /* endless idle loop with no priority at all */ current->priority = 0; - current->counter = 0; + current->counter = -100; 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(); + if (work) 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; + + work = current->need_resched; schedule(); + check_pgt_cache(); } - ret = 0; -out: - unlock_kernel(); - return ret; } #else @@ -154,21 +136,26 @@ int cpu_idle(void *unused) { + /* endless idle loop with no priority at all */ 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; - schedule(); + current->counter = -100; + while(1) { + if (current_cpu_data.hlt_works_ok && !hlt_counter && + !current->need_resched) + __asm__("hlt"); + /* + * although we are an idle CPU, we do not want to + * get into the scheduler unnecessarily. + */ + if (current->need_resched) { + schedule(); + check_pgt_cache(); + } } } +#endif + asmlinkage int sys_idle(void) { if (current->pid != 0) @@ -177,8 +164,6 @@ 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, @@ -490,22 +475,54 @@ void release_segments(struct mm_struct *mm) { + if (mm->segments) { + void * ldt = mm->segments; + mm->segments = NULL; + vfree(ldt); + } +} + +void forget_segments(void) +{ /* forget local segments */ __asm__ __volatile__("movl %w0,%%fs ; movl %w0,%%gs" : /* no outputs */ : "r" (0)); - if (mm->segments) { - void * ldt = mm->segments; - /* - * Get the LDT entry from init_task. - */ - current->tss.ldt = _LDT(0); - load_ldt(0); + /* + * Get the LDT entry from init_task. + */ + current->tss.ldt = _LDT(0); + load_ldt(0); +} - mm->segments = NULL; - vfree(ldt); - } +/* + * 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; } /* @@ -577,7 +594,6 @@ *childregs = *regs; childregs->eax = 0; childregs->esp = esp; - childregs->eflags = regs->eflags & 0xffffcfff; /* iopl always 0 for a new process */ p->tss.esp = (unsigned long) childregs; p->tss.esp0 = (unsigned long) (childregs+1); @@ -766,6 +782,21 @@ if (!newsp) newsp = regs.esp; return do_fork(clone_flags, newsp, ®s); +} + +/* + * This is trivial, and on the face of it looks like it + * could equally well be done in user mode. + * + * Not so, for quite unobvious reasons - register pressure. + * In user mode vfork() cannot have a stack frame, and if + * done by calling the "clone()" system call directly, you + * do not have enough call-clobbered registers to hold all + * the information you need. + */ +asmlinkage int sys_vfork(struct pt_regs regs) +{ + return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, ®s); } /* diff -ur --new-file old/linux/arch/i386/kernel/ptrace.c new/linux/arch/i386/kernel/ptrace.c --- old/linux/arch/i386/kernel/ptrace.c Wed Sep 30 19:16:56 1998 +++ new/linux/arch/i386/kernel/ptrace.c Tue Jan 12 21:03:53 1999 @@ -367,8 +367,6 @@ ret = 0; goto out; } - if (pid == 1) /* you may not mess with init */ - goto out; ret = -ESRCH; read_lock(&tasklist_lock); child = find_task_by_pid(pid); @@ -376,6 +374,8 @@ if (!child) goto out; ret = -EPERM; + if (pid == 1) /* you may not mess with init */ + goto out; if (request == PTRACE_ATTACH) { if (child == current) goto out; @@ -420,7 +420,9 @@ case PTRACE_PEEKDATA: { unsigned long tmp; + down(&child->mm->mmap_sem); ret = read_long(child, addr, &tmp); + up(&child->mm->mmap_sem); if (ret >= 0) ret = put_user(tmp,(unsigned long *) data); goto out; @@ -451,7 +453,9 @@ /* when I and D space are separate, this will have to be fixed. */ case PTRACE_POKETEXT: /* write the word at location addr. */ case PTRACE_POKEDATA: + down(&child->mm->mmap_sem); ret = write_long(child,addr,data); + up(&child->mm->mmap_sem); goto out; case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ @@ -476,7 +480,7 @@ 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]) { diff -ur --new-file old/linux/arch/i386/kernel/setup.c new/linux/arch/i386/kernel/setup.c --- old/linux/arch/i386/kernel/setup.c Wed Oct 14 20:39:25 1998 +++ new/linux/arch/i386/kernel/setup.c Thu Jan 21 20:28:40 1999 @@ -38,6 +38,7 @@ #include #include #include +#include /* * Machine setup.. @@ -45,7 +46,6 @@ char ignore_irq13 = 0; /* set if exception 16 works */ struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; -static char Cx86_step[8]; /* decoded Cyrix step number */ /* * Bus types .. @@ -81,6 +81,7 @@ 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 @@ -107,6 +108,133 @@ #define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 +#ifdef CONFIG_VISWS +char visws_board_type = -1; +char visws_board_rev = -1; + +#define PIIX_PM_START 0x0F80 + +#define SIO_GPIO_START 0x0FC0 + +#define SIO_PM_START 0x0FC8 + +#define PMBASE PIIX_PM_START +#define GPIREG0 (PMBASE+0x30) +#define GPIREG(x) (GPIREG0+((x)/8)) +#define PIIX_GPI_BD_ID1 18 +#define PIIX_GPI_BD_REG GPIREG(PIIX_GPI_BD_ID1) + +#define PIIX_GPI_BD_SHIFT (PIIX_GPI_BD_ID1 % 8) + +#define SIO_INDEX 0x2e +#define SIO_DATA 0x2f + +#define SIO_DEV_SEL 0x7 +#define SIO_DEV_ENB 0x30 +#define SIO_DEV_MSB 0x60 +#define SIO_DEV_LSB 0x61 + +#define SIO_GP_DEV 0x7 + +#define SIO_GP_BASE SIO_GPIO_START +#define SIO_GP_MSB (SIO_GP_BASE>>8) +#define SIO_GP_LSB (SIO_GP_BASE&0xff) + +#define SIO_GP_DATA1 (SIO_GP_BASE+0) + +#define SIO_PM_DEV 0x8 + +#define SIO_PM_BASE SIO_PM_START +#define SIO_PM_MSB (SIO_PM_BASE>>8) +#define SIO_PM_LSB (SIO_PM_BASE&0xff) +#define SIO_PM_INDEX (SIO_PM_BASE+0) +#define SIO_PM_DATA (SIO_PM_BASE+1) + +#define SIO_PM_FER2 0x1 + +#define SIO_PM_GP_EN 0x80 + +static void +visws_get_board_type_and_rev(void) +{ + int raw; + + visws_board_type = (char)(inb_p(PIIX_GPI_BD_REG) & PIIX_GPI_BD_REG) + >> PIIX_GPI_BD_SHIFT; +/* + * Get Board rev. + * First, we have to initialize the 307 part to allow us access + * to the GPIO registers. Let's map them at 0x0fc0 which is right + * after the PIIX4 PM section. + */ + outb_p(SIO_DEV_SEL, SIO_INDEX); + outb_p(SIO_GP_DEV, SIO_DATA); /* Talk to GPIO regs. */ + + outb_p(SIO_DEV_MSB, SIO_INDEX); + outb_p(SIO_GP_MSB, SIO_DATA); /* MSB of GPIO base address */ + + outb_p(SIO_DEV_LSB, SIO_INDEX); + outb_p(SIO_GP_LSB, SIO_DATA); /* LSB of GPIO base address */ + + outb_p(SIO_DEV_ENB, SIO_INDEX); + outb_p(1, SIO_DATA); /* Enable GPIO registers. */ + +/* + * Now, we have to map the power management section to write + * a bit which enables access to the GPIO registers. + * What lunatic came up with this shit? + */ + outb_p(SIO_DEV_SEL, SIO_INDEX); + outb_p(SIO_PM_DEV, SIO_DATA); /* Talk to GPIO regs. */ + + outb_p(SIO_DEV_MSB, SIO_INDEX); + outb_p(SIO_PM_MSB, SIO_DATA); /* MSB of PM base address */ + + outb_p(SIO_DEV_LSB, SIO_INDEX); + outb_p(SIO_PM_LSB, SIO_DATA); /* LSB of PM base address */ + + outb_p(SIO_DEV_ENB, SIO_INDEX); + outb_p(1, SIO_DATA); /* Enable PM registers. */ + +/* + * Now, write the PM register which enables the GPIO registers. + */ + outb_p(SIO_PM_FER2, SIO_PM_INDEX); + outb_p(SIO_PM_GP_EN, SIO_PM_DATA); + +/* + * Now, initialize the GPIO registers. + * We want them all to be inputs which is the + * power on default, so let's leave them alone. + * So, let's just read the board rev! + */ + raw = inb_p(SIO_GP_DATA1); + raw &= 0x7f; /* 7 bits of valid board revision ID. */ + + if (visws_board_type == VISWS_320) { + if (raw < 0x6) { + visws_board_rev = 4; + } else if (raw < 0xc) { + visws_board_rev = 5; + } else { + visws_board_rev = 6; + + } + } else if (visws_board_type == VISWS_540) { + visws_board_rev = 2; + } else { + visws_board_rev = raw; + } + + printk("Silicon Graphics %s (rev %d)\n", + visws_board_type == VISWS_320 ? "320" : + (visws_board_type == VISWS_540 ? "540" : + "unknown"), + visws_board_rev); + } +#endif + + static char command_line[COMMAND_LINE_SIZE] = { 0, }; char saved_command_line[COMMAND_LINE_SIZE]; @@ -122,6 +250,10 @@ return; smptrap=1; +#ifdef CONFIG_VISWS + visws_get_board_type_and_rev(); +#endif + ROOT_DEV = to_kdev_t(ORIG_ROOT_DEV); drive_info = DRIVE_INFO; screen_info = SCREEN_INFO; @@ -145,12 +277,6 @@ } #endif -#define VMALLOC_RESERVE (64 << 20) /* 64MB for vmalloc */ -#define MAXMEM ((unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE)) - - if (memory_end > MAXMEM) - memory_end = MAXMEM; - memory_end &= PAGE_MASK; #ifdef CONFIG_BLK_DEV_RAM rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; @@ -200,10 +326,28 @@ } *to = '\0'; *cmdline_p = command_line; + +#define VMALLOC_RESERVE (64 << 20) /* 64MB for vmalloc */ +#define MAXMEM ((unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE)) + + if (memory_end > MAXMEM) + { + memory_end = MAXMEM; + printk(KERN_WARNING "Warning only %ldMB will be used.\n", + MAXMEM>>20); + } + memory_end += PAGE_OFFSET; *memory_start_p = memory_start; *memory_end_p = memory_end; +#ifdef __SMP__ + /* + * Save possible boot-time SMP configuration: + */ + init_smp_config(); +#endif + #ifdef CONFIG_BLK_DEV_INITRD if (LOADER_TYPE) { initrd_start = INITRD_START ? INITRD_START + PAGE_OFFSET : 0; @@ -231,6 +375,10 @@ conswitchp = &dummy_con; #endif #endif + /* + * Check the bugs that will bite us before we get booting + */ + } __initfunc(static int amd_model(struct cpuinfo_x86 *c)) @@ -244,6 +392,7 @@ cpuid(0x80000000, &n, &dummy, &dummy, &dummy); if (n < 4) return 0; + cpuid(0x80000001, &dummy, &dummy, &dummy, &(c->x86_capability)); v = (unsigned int *) c->x86_model_id; cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]); cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]); @@ -253,9 +402,9 @@ } /* - * Use the Cyrix DEVID CPU registers if avail. to get more detailed info. + * Read Cyrix DEVID registers (DIR) to get more detailed info. about the CPU */ -__initfunc(static void do_cyrix_devid(struct cpuinfo_x86 *c)) +static inline void do_cyrix_devid(unsigned char *dir0, unsigned char *dir1) { unsigned char ccr2, ccr3; @@ -271,22 +420,28 @@ getCx86(0xc0); /* dummy */ if (getCx86(CX86_CCR2) == ccr2) /* old Cx486SLC/DLC */ - c->x86_model = 0xfd; + *dir0 = 0xfd; else { /* Cx486S A step */ setCx86(CX86_CCR2, ccr2); - c->x86_model = 0xfe; + *dir0 = 0xfe; } } else { setCx86(CX86_CCR3, ccr3); /* restore CCR3 */ /* read DIR0 and DIR1 CPU registers */ - c->x86_model = getCx86(CX86_DIR0); - c->x86_mask = getCx86(CX86_DIR1); + *dir0 = getCx86(CX86_DIR0); + *dir1 = getCx86(CX86_DIR1); } sti(); } +/* + * Cx86_dir0_msb is a HACK needed by check_cx686_cpuid/slop in bugs.h in + * order to identify the Cyrix CPU model after we're out of setup.c + */ +unsigned char Cx86_dir0_msb __initdata = 0; + static char Cx86_model[][9] __initdata = { "Cx486", "Cx486", "5x86 ", "6x86", "MediaGX ", "6x86MX ", "M II ", "Unknown" @@ -304,27 +459,28 @@ static char Cx86_cb[] __initdata = "?.5x Core/Bus Clock"; static char cyrix_model_mult1[] __initdata = "12??43"; static char cyrix_model_mult2[] __initdata = "12233445"; -static char cyrix_model_oldstep[] __initdata = "A step"; __initfunc(static void cyrix_model(struct cpuinfo_x86 *c)) { - unsigned char dir0_msn, dir0_lsn, dir1; + unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0; char *buf = c->x86_model_id; const char *p = NULL; - do_cyrix_devid(c); + do_cyrix_devid(&dir0, &dir1); - dir0_msn = c->x86_model >> 4; - dir0_lsn = c->x86_model & 0xf; - dir1 = c->x86_mask; + Cx86_dir0_msb = dir0_msn = dir0 >> 4; /* identifies CPU "family" */ + dir0_lsn = dir0 & 0xf; /* model or clock multiplier */ - /* common case stepping number -- exceptions handled below */ - sprintf(Cx86_step, "%d.%d", (dir1 >> 4) + 1, dir1 & 0x0f); + /* common case step number/rev -- exceptions handled below */ + c->x86_model = (dir1 >> 4) + 1; + c->x86_mask = dir1 & 0xf; /* Now cook; the original recipe is by Channing Corn, from Cyrix. * We do the same thing for each generation: we work out - * the model, multiplier and stepping. + * the model, multiplier and stepping. Black magic included, + * to make the silicon step/rev numbers match the printed ones. */ + switch (dir0_msn) { unsigned char tmp; @@ -348,37 +504,41 @@ if (dir1 > 0x21) { /* 686L */ Cx86_cb[0] = 'L'; p = Cx86_cb; - Cx86_step[0]++; + (c->x86_model)++; } else /* 686 */ p = Cx86_cb+1; break; case 4: /* MediaGX/GXm */ + /* + * Life sometimes gets weiiiiiiiird if we use this + * on the MediaGX. So we turn it off for now. + */ + /* GXm supports extended cpuid levels 'ala' AMD */ if (c->cpuid_level == 2) { amd_model(c); /* get CPU marketing name */ + c->x86_capability&=~X86_FEATURE_TSC; return; } else { /* MediaGX */ Cx86_cb[2] = (dir0_lsn & 1) ? '3' : '4'; p = Cx86_cb+2; - Cx86_step[0] = (dir1 & 0x20) ? '1' : '2'; + c->x86_model = (dir1 & 0x20) ? 1 : 2; + c->x86_capability&=~X86_FEATURE_TSC; } break; case 5: /* 6x86MX/M II */ - /* the TSC is broken (for now) */ - c->x86_capability &= ~16; - if (dir1 > 7) dir0_msn++; /* M II */ tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0; Cx86_cb[tmp] = cyrix_model_mult2[dir0_lsn & 7]; p = Cx86_cb+tmp; if (((dir1 & 0x0f) > 4) || ((dir1 & 0xf0) == 0x20)) - Cx86_step[0]++; + (c->x86_model)++; break; - case 0xf: /* Cyrix 486 without DIR registers */ + case 0xf: /* Cyrix 486 without DEVID registers */ switch (dir0_lsn) { case 0xd: /* either a 486SLC or DLC w/o DEVID */ dir0_msn = 0; @@ -388,11 +548,13 @@ case 0xe: /* a 486S A step */ dir0_msn = 0; p = Cx486S_name[0]; - strcpy(Cx86_step, cyrix_model_oldstep); - c->x86_mask = 1; /* must != 0 to print */ break; break; } + + default: /* unknown (shouldn't happen, we know everyone ;-) */ + dir0_msn = 7; + break; } strcpy(buf, Cx86_model[dir0_msn & 7]); if (p) strcat(buf, p); @@ -444,15 +606,15 @@ "486 DX/4", "486 DX/4-WB", NULL, NULL, NULL, NULL, "Am5x86-WT", "Am5x86-WB" }}, { X86_VENDOR_AMD, 5, - { "K5/SSA5 (PR75, PR90, PR100)", "K5 (PR120, PR133)", - "K5 (PR166)", "K5 (PR200)", NULL, NULL, - "K6 (PR166 - PR266)", "K6 (PR166 - PR300)", "K6-2 (PR233 - PR333)", - "K6-3 (PR300 - PR450)", NULL, NULL, NULL, NULL, NULL, NULL }}, + { "K5/SSA5", "K5", + "K5", "K5", NULL, NULL, + "K6", "K6", "K6-2", + "K6-3", NULL, NULL, NULL, NULL, NULL, NULL }}, { X86_VENDOR_UMC, 4, { NULL, "U5D", "U5S", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }}, { X86_VENDOR_CENTAUR, 5, - { NULL, NULL, NULL, NULL, "C6", NULL, NULL, NULL, NULL, NULL, NULL, + { NULL, NULL, NULL, NULL, "C6", NULL, NULL, NULL, "C6-2", NULL, NULL, NULL, NULL, NULL, NULL, NULL }}, { X86_VENDOR_NEXGEN, 5, { "Nx586", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -478,6 +640,9 @@ return; } + if (c->x86_vendor == X86_VENDOR_AMD && amd_model(c)) + return; + for (i = 0; i < sizeof(cpu_models)/sizeof(struct cpu_model_info); i++) { if (c->cpuid_level > 1) { /* supports eax=2 call */ @@ -542,15 +707,39 @@ return; } - if (c->x86_vendor == X86_VENDOR_AMD && amd_model(c)) - return; - sprintf(c->x86_model_id, "%02x/%02x", c->x86_vendor, c->x86_model); } +/* + * Perform early boot up checks for a valid TSC. See arch/i386/kernel/time.c + */ + +__initfunc(void dodgy_tsc(void)) +{ + get_cpu_vendor(&boot_cpu_data); + + if(boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX) + { + return; + } + cyrix_model(&boot_cpu_data); +} + + +#define rdmsr(msr,val1,val2) \ + __asm__ __volatile__("rdmsr" \ + : "=a" (val1), "=d" (val2) \ + : "c" (msr)) + +#define wrmsr(msr,val1,val2) \ + __asm__ __volatile__("wrmsr" \ + : /* no outputs */ \ + : "c" (msr), "a" (val1), "d" (val2)) + static char *cpu_vendor_names[] __initdata = { "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur" }; + __initfunc(void print_cpu_info(struct cpuinfo_x86 *c)) { char *vendor = NULL; @@ -568,11 +757,19 @@ else printk("%s", c->x86_model_id); - if (c->x86_mask) { - if (c->x86_vendor == X86_VENDOR_CYRIX) - printk(" stepping %s", Cx86_step); - else - printk(" stepping %02x", c->x86_mask); + if (c->x86_mask || c->cpuid_level>=0) + printk(" stepping %02x", c->x86_mask); + + if(c->x86_vendor == X86_VENDOR_CENTAUR) + { + u32 hv,lv; + rdmsr(0x107, lv, hv); + printk("\nCentaur FSR was 0x%X ",lv); + lv|=(1<<8); + lv|=(1<<7); + /* lv|=(1<<6); - may help too if the board can cope */ + printk("now 0x%X", lv); + wrmsr(0x107, lv, hv); } printk("\n"); } @@ -596,7 +793,7 @@ for(n=0; nx86_model, c->x86_model_id[0] ? c->x86_model_id : "unknown"); - if (c->x86_mask) { - if (c->x86_vendor == X86_VENDOR_CYRIX) - p += sprintf(p, "stepping\t: %s\n", Cx86_step); - else - p += sprintf(p, "stepping\t: %d\n", c->x86_mask); - } else + if (c->x86_mask) + p += sprintf(p, "stepping\t: %d\n", c->x86_mask); + 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); /* Modify the capabilities according to chip type */ - if (c->x86_mask) { - if (c->x86_vendor == X86_VENDOR_CYRIX) { - x86_cap_flags[24] = "cxmmx"; - } else if (c->x86_vendor == X86_VENDOR_AMD) { - x86_cap_flags[16] = "fcmov"; - x86_cap_flags[31] = "amd3d"; - } else if (c->x86_vendor == X86_VENDOR_INTEL) { - x86_cap_flags[6] = "pae"; - x86_cap_flags[9] = "apic"; - x86_cap_flags[12] = "mtrr"; - x86_cap_flags[14] = "mca"; - x86_cap_flags[16] = "pat"; - x86_cap_flags[17] = "pse36"; - x86_cap_flags[24] = "osfxsr"; - } + if (c->x86_vendor == X86_VENDOR_CYRIX) { + x86_cap_flags[24] = "cxmmx"; + } else if (c->x86_vendor == X86_VENDOR_AMD) { + x86_cap_flags[16] = "fcmov"; + x86_cap_flags[31] = "3dnow"; + if (c->x86 == 5 && c->x86_model == 6) + x86_cap_flags[10] = "sep"; + } else if (c->x86_vendor == X86_VENDOR_INTEL) { + x86_cap_flags[6] = "pae"; + x86_cap_flags[9] = "apic"; + x86_cap_flags[12] = "mtrr"; + x86_cap_flags[14] = "mca"; + x86_cap_flags[16] = "pat"; + x86_cap_flags[17] = "pse36"; + x86_cap_flags[24] = "osfxsr"; } sep_bug = c->x86_vendor == X86_VENDOR_INTEL && diff -ur --new-file old/linux/arch/i386/kernel/signal.c new/linux/arch/i386/kernel/signal.c --- old/linux/arch/i386/kernel/signal.c Tue Sep 29 20:39:28 1998 +++ new/linux/arch/i386/kernel/signal.c Tue Dec 1 20:28:24 1998 @@ -592,7 +592,7 @@ * 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(struct pt_regs *regs, sigset_t *oldset) +int do_signal(struct pt_regs *regs, sigset_t *oldset) { siginfo_t info; struct k_sigaction *ka; diff -ur --new-file old/linux/arch/i386/kernel/smp.c new/linux/arch/i386/kernel/smp.c --- old/linux/arch/i386/kernel/smp.c Mon Oct 5 22:19:44 1998 +++ new/linux/arch/i386/kernel/smp.c Thu Jan 21 20:28:40 1999 @@ -3,12 +3,14 @@ * hosts. * * (c) 1995 Alan Cox, CymruNET Ltd + * (c) 1998 Ingo Molnar + * * Supported by Caldera http://www.caldera.com. * Much of the core SMP work is based on previous work by Thomas Radke, to * whom a great many thanks are extended. * - * Thanks to Intel for making available several different Pentium and - * Pentium Pro MP machines. + * Thanks to Intel for making available several different Pentium, + * Pentium Pro and Pentium-II/Xeon MP machines. * * This code is released under the GNU public license version 2 or * later. @@ -26,34 +28,17 @@ * Ingo Molnar : Added APIC timers, based on code * from Jose Renau * Alan Cox : Added EBDA scanning + * Ingo Molnar : various cleanups and rewrites */ #include -#include -#include -#include -#include #include #include #include #include -#include -#include #include -#include #include -#include -#include -#include -#include -#include - -#ifdef CONFIG_MTRR -# include -#endif - -#define __KERNEL_SYSCALLS__ -#include +#include #include "irq.h" @@ -104,31 +89,24 @@ spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED; /* - * Why isn't this somewhere standard ?? - * - * Maybe because this procedure is horribly buggy, and does - * not deserve to live. Think about signedness issues for five - * seconds to see why. - Linus + * function prototypes: */ - -extern __inline int max(int a,int b) -{ - if (a>b) - return a; - return b; -} +static void cache_APIC_registers (void); +static void stop_this_cpu (void); static int smp_b_stepping = 0; /* Set if we find a B stepping CPU */ static int max_cpus = -1; /* Setup configured maximum number of CPUs to activate */ int smp_found_config=0; /* Have we found an SMP box */ -unsigned long cpu_present_map = 0; /* Bitmask of existing CPUs */ +unsigned long cpu_present_map = 0; /* Bitmask of physically existing CPUs */ +unsigned long cpu_online_map = 0; /* Bitmask of currently online CPUs */ int smp_num_cpus = 1; /* Total count of live CPUs */ int smp_threads_ready=0; /* Set when the idlers are all forked */ volatile int cpu_number_map[NR_CPUS]; /* which CPU maps to which logical number */ volatile int __cpu_logical_map[NR_CPUS]; /* which logical number maps to which CPU */ -volatile unsigned long cpu_callin_map[NR_CPUS] = {0,}; /* We always use 0 the rest is ready for parallel delivery */ +static volatile unsigned long cpu_callin_map[NR_CPUS] = {0,}; /* We always use 0 the rest is ready for parallel delivery */ +static volatile unsigned long cpu_callout_map[NR_CPUS] = {0,}; /* We always use 0 the rest is ready for parallel delivery */ volatile unsigned long smp_invalidate_needed; /* Used for the invalidate map that's also checked in the spinlock */ volatile unsigned long kstack_ptr; /* Stack vector for booting CPUs */ struct cpuinfo_x86 cpu_data[NR_CPUS]; /* Per CPU bogomips and other parameters */ @@ -137,19 +115,13 @@ unsigned char boot_cpu_id = 0; /* Processor that is doing the boot up */ static int smp_activated = 0; /* Tripped once we need to start cross invalidating */ int apic_version[NR_CPUS]; /* APIC version number */ -static volatile int smp_commenced=0; /* Tripped when we start scheduling */ unsigned long apic_retval; /* Just debugging the assembler.. */ -static volatile unsigned char smp_cpu_in_msg[NR_CPUS]; /* True if this processor is sending an IPI */ - volatile unsigned long kernel_counter=0; /* Number of times the processor holds the lock */ volatile unsigned long syscall_count=0; /* Number of times the processor holds the syscall lock */ volatile unsigned long ipi_count; /* Number of IPIs delivered */ -volatile unsigned long smp_proc_in_lock[NR_CPUS] = {0,};/* for computing process time */ -volatile int smp_process_available=0; - const char lk_lockmsg[] = "lock from interrupt context at %p\n"; int mp_bus_id_to_type [MAX_MP_BUSSES] = { -1, }; @@ -159,6 +131,7 @@ int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { -1, }; int mp_current_pci_id = 0; unsigned long mp_lapic_addr = 0; +int skip_ioapic_setup = 0; /* 1 if "noapic" boot option passed */ /* #define SMP_DEBUG */ @@ -169,6 +142,11 @@ #endif /* + * IA s/w dev Vol 3, Section 7.4 + */ +#define APIC_DEFAULT_PHYS_BASE 0xfee00000 + +/* * Setup routine for controlling SMP activation * * Command-line option of "nosmp" or "maxcpus=0" will disable SMP @@ -199,6 +177,11 @@ } /* + * Intel MP BIOS table parsing routines: + */ + +#ifndef CONFIG_X86_VISWS_APIC +/* * Checksum an MP configuration block. */ @@ -250,7 +233,7 @@ if (memcmp(mpc->mpc_signature,MPC_SIGNATURE,4)) { - printk("Bad signature [%c%c%c%c].\n", + panic("SMP mptable: bad signature [%c%c%c%c]!\n", mpc->mpc_signature[0], mpc->mpc_signature[1], mpc->mpc_signature[2], @@ -259,7 +242,7 @@ } if (mpf_checksum((unsigned char *)mpc,mpc->mpc_length)) { - printk("Checksum error.\n"); + panic("SMP mptable: checksum error!\n"); return 1; } if (mpc->mpc_spec!=0x01 && mpc->mpc_spec!=0x04) @@ -405,7 +388,11 @@ } } if (ioapics > 1) + { printk("Warning: Multiple IO-APICs not yet supported.\n"); + printk("Warning: switching to non APIC mode.\n"); + skip_ioapic_setup=1; + } return num_processors; } @@ -413,7 +400,7 @@ * Scan the memory blocks for an SMP configuration block. */ -int __init smp_scan_config(unsigned long base, unsigned long length) +static int __init smp_scan_config(unsigned long base, unsigned long length) { unsigned long *bp=phys_to_virt(base); struct intel_mp_floating *mpf; @@ -447,7 +434,7 @@ unsigned long cfg; /* local APIC has default address */ - mp_lapic_addr = 0xFEE00000; + mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; /* * We need to know what the local * APIC id of the boot CPU is! @@ -564,6 +551,76 @@ return 0; } +void __init init_intel_smp (void) +{ + /* + * FIXME: Linux assumes you have 640K of base ram.. + * this continues the error... + * + * 1) Scan the bottom 1K for a signature + * 2) Scan the top 1K of base RAM + * 3) Scan the 64K of bios + */ + if (!smp_scan_config(0x0,0x400) && + !smp_scan_config(639*0x400,0x400) && + !smp_scan_config(0xF0000,0x10000)) { + /* + * If it is an SMP machine we should know now, unless the + * configuration is in an EISA/MCA bus machine with an + * extended bios data area. + * + * there is a real-mode segmented pointer pointing to the + * 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. These loaders are buggy and + * should be fixed. + */ + unsigned int address; + + 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"); + } +} + +#else + +/* + * The Visual Workstation is Intel MP compliant in the hardware + * sense, but it doesnt have a BIOS(-configuration table). + * No problem for Linux. + */ +void __init init_visws_smp(void) +{ + smp_found_config = 1; + + cpu_present_map |= 2; /* or in id 1 */ + apic_version[1] |= 0x10; /* integrated APIC */ + apic_version[0] |= 0x10; + + mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; +} + +#endif + +/* + * - Intel MP Configuration Table + * - or SGI Visual Workstation configuration + */ +void __init init_smp_config (void) +{ +#ifndef CONFIG_VISWS + init_intel_smp(); +#else + init_visws_smp(); +#endif +} + /* * Trampoline 80x86 program as an array. */ @@ -630,13 +687,17 @@ * we use to track CPUs as they power up. */ +static atomic_t smp_commenced = ATOMIC_INIT(0); + void __init smp_commence(void) { /* * Lets the callins below out of their loop. */ SMP_PRINTK(("Setting commenced=1, go go go\n")); - smp_commenced=1; + + wmb(); + atomic_set(&smp_commenced,1); } void __init enable_local_APIC(void) @@ -653,6 +714,26 @@ value &= ~APIC_TPRI_MASK; /* Set Task Priority to 'accept all' */ apic_write(APIC_TASKPRI,value); + /* + * Set arbitrarion priority to 0 + */ + value = apic_read(APIC_ARBPRI); + value &= ~APIC_ARBPRI_MASK; + apic_write(APIC_ARBPRI, value); + + /* + * Set the logical destination ID to 'all', just to be safe. + * also, put the APIC into flat delivery mode. + */ + value = apic_read(APIC_LDR); + value &= ~APIC_LDR_MASK; + value |= SET_APIC_LOGICAL_ID(0xff); + apic_write(APIC_LDR,value); + + value = apic_read(APIC_DFR); + value |= SET_APIC_DFR(0xf); + apic_write(APIC_DFR, value); + udelay(100); /* B safe */ ack_APIC_irq(); udelay(100); @@ -660,12 +741,11 @@ unsigned long __init init_smp_mappings(unsigned long memory_start) { - unsigned long apic_phys, ioapic_phys; + unsigned long apic_phys; memory_start = PAGE_ALIGN(memory_start); if (smp_found_config) { apic_phys = mp_lapic_addr; - ioapic_phys = mp_ioapic_addr; } else { /* * set up a fake all zeroes page to simulate the @@ -674,30 +754,81 @@ * this way if some buggy code writes to this page ... */ apic_phys = __pa(memory_start); - ioapic_phys = __pa(memory_start+PAGE_SIZE); - memset((void *)memory_start, 0, 2*PAGE_SIZE); - memory_start += 2*PAGE_SIZE; + memset((void *)memory_start, 0, PAGE_SIZE); + memory_start += PAGE_SIZE; } - set_fixmap(FIX_APIC_BASE,apic_phys); - set_fixmap(FIX_IO_APIC_BASE,ioapic_phys); - printk("mapped APIC to %08lx (%08lx)\n", APIC_BASE, apic_phys); - printk("mapped IOAPIC to %08lx (%08lx)\n", fix_to_virt(FIX_IO_APIC_BASE), ioapic_phys); + +#ifdef CONFIG_X86_IO_APIC + { + unsigned long ioapic_phys; + + if (smp_found_config) { + ioapic_phys = mp_ioapic_addr; + } else { + ioapic_phys = __pa(memory_start); + memset((void *)memory_start, 0, PAGE_SIZE); + memory_start += PAGE_SIZE; + } + set_fixmap(FIX_IO_APIC_BASE,ioapic_phys); + printk("mapped IOAPIC to %08lx (%08lx)\n", + fix_to_virt(FIX_IO_APIC_BASE), ioapic_phys); + } +#endif return memory_start; } +extern void calibrate_delay(void); + void __init smp_callin(void) { - extern void calibrate_delay(void); - int cpuid=GET_APIC_ID(apic_read(APIC_ID)); + int cpuid; + unsigned long timeout; + + /* + * (This works even if the APIC is not enabled.) + */ + cpuid = GET_APIC_ID(apic_read(APIC_ID)); + + SMP_PRINTK(("CPU#%d waiting for CALLOUT\n", cpuid)); + + /* + * STARTUP IPIs are fragile beasts as they might sometimes + * trigger some glue motherboard logic. Complete APIC bus + * silence for 1 second, this overestimates the time the + * boot CPU is spending to send the up to 2 STARTUP IPIs + * by a factor of two. This should be enough. + */ + + /* + * Waiting 2s total for startup (udelay is not yet working) + */ + timeout = jiffies + 2*HZ; + while (time_before(jiffies,timeout)) + { + /* + * Has the boot CPU finished it's STARTUP sequence? + */ + if (test_bit(cpuid, (unsigned long *)&cpu_callout_map[0])) + break; + } + + while (!time_before(jiffies,timeout)) { + printk("BUG: CPU%d started up but did not get a callout!\n", + cpuid); + stop_this_cpu(); + } /* - * Activate our APIC + * the boot CPU has finished the init stage and is spinning + * on callin_map until we finish. We are free to set up this + * CPU, first the APIC. (this is probably redundant on most + * boards) */ - SMP_PRINTK(("CALLIN %d %d\n",hard_smp_processor_id(), smp_processor_id())); + SMP_PRINTK(("CALLIN, before enable_local_APIC().\n")); enable_local_APIC(); /* @@ -705,7 +836,12 @@ */ setup_APIC_clock(); - sti(); + __sti(); + +#ifdef CONFIG_MTRR + /* Must be done before calibration delay is computed */ + mtrr_init_secondary_cpu (); +#endif /* * Get our bogomips. */ @@ -732,13 +868,14 @@ */ int __init start_secondary(void *unused) { -#ifdef CONFIG_MTRR - /* Must be done before calibration delay is computed */ - mtrr_init_secondary_cpu (); -#endif + /* + * Dont put anything before smp_callin(), SMP + * booting is too fragile that we want to limit the + * things done here to the most necessary things. + */ smp_callin(); - while (!smp_commenced) - barrier(); + while (!atomic_read(&smp_commenced)) + /* nothing */ ; return cpu_idle(NULL); } @@ -761,11 +898,7 @@ /* * We don't actually need to load the full TSS, * basically just the stack pointer and the eip. - * - * Get the scheduler lock, because we're going - * to release it as part of the "reschedule" return. */ - spin_lock(&scheduler_lock); asm volatile( "movl %0,%%esp\n\t" @@ -859,8 +992,7 @@ apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ cfg=apic_read(APIC_ICR); cfg&=~0xCDFFF; /* Clear bits */ - cfg |= (APIC_DEST_FIELD | APIC_DEST_LEVELTRIG - | APIC_DEST_ASSERT | APIC_DEST_DM_INIT); + cfg |= (APIC_DEST_LEVELTRIG | APIC_DEST_ASSERT | APIC_DEST_DM_INIT); apic_write(APIC_ICR, cfg); /* Send IPI */ udelay(200); @@ -871,8 +1003,7 @@ apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ cfg=apic_read(APIC_ICR); cfg&=~0xCDFFF; /* Clear bits */ - cfg |= (APIC_DEST_FIELD | APIC_DEST_LEVELTRIG - | APIC_DEST_DM_INIT); + cfg |= (APIC_DEST_LEVELTRIG | APIC_DEST_DM_INIT); apic_write(APIC_ICR, cfg); /* Send IPI */ /* @@ -908,19 +1039,23 @@ apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ cfg=apic_read(APIC_ICR); cfg&=~0xCDFFF; /* Clear bits */ - cfg |= (APIC_DEST_FIELD - | APIC_DEST_DM_STARTUP - | (start_eip >> 12)); /* Boot on the stack */ + cfg |= (APIC_DEST_DM_STARTUP | (start_eip >> 12)); /* Boot on the stack */ SMP_PRINTK(("Before start apic_write.\n")); apic_write(APIC_ICR, cfg); /* Kick the second */ SMP_PRINTK(("Startup point 1.\n")); + timeout = 0; + SMP_PRINTK(("Waiting for send to finish...\n")); do { - SMP_PRINTK(("Sleeping.\n")); mdelay(1000); - udelay(10); - } while ( (send_status = (apic_read(APIC_ICR) & 0x1000)) - && (timeout++ < 1000)); + SMP_PRINTK(("+")); + udelay(100); + send_status = apic_read(APIC_ICR) & 0x1000; + } while (send_status && (timeout++ < 1000)); + + /* + * Give the other CPU some time to accept the IPI. + */ udelay(200); accept_status = (apic_read(APIC_ESR) & 0xEF); } @@ -933,6 +1068,13 @@ if ( !(send_status || accept_status) ) { + /* + * allow APs to start initializing. + */ + SMP_PRINTK(("Before Callout %d.\n", i)); + set_bit(i, (unsigned long *)&cpu_callout_map[0]); + SMP_PRINTK(("After Callout %d.\n", i)); + for(timeout=0;timeout<50000;timeout++) { if (cpu_callin_map[0]&(1< cpucount+1)) { do_boot_cpu(i); @@ -1102,9 +1298,9 @@ * Make sure we unmap all failed CPUs */ - if (cpu_number_map[i] == -1 && (cpu_present_map & (1 << i))) { - printk("CPU #%d not responding. Removing from cpu_present_map.\n",i); - cpu_present_map &= ~(1 << i); + if (cpu_number_map[i] == -1 && (cpu_online_map & (1 << i))) { + printk("CPU #%d not responding. Removing from cpu_online_map.\n",i); + cpu_online_map &= ~(1 << i); } } @@ -1112,29 +1308,34 @@ * Cleanup possible dangling ends... */ - /* - * Install writable page 0 entry. - */ - - cfg = pg0[0]; - pg0[0] = 3; /* writeable, present, addr 0 */ - local_flush_tlb(); +#ifndef CONFIG_VISWS + { + unsigned long cfg; - /* - * Paranoid: Set warm reset code and vector here back - * to default values. - */ + /* + * Install writable page 0 entry. + */ + cfg = pg0[0]; + pg0[0] = 3; /* writeable, present, addr 0 */ + local_flush_tlb(); + + /* + * Paranoid: Set warm reset code and vector here back + * to default values. + */ - CMOS_WRITE(0, 0xf); + CMOS_WRITE(0, 0xf); - *((volatile long *) phys_to_virt(0x467)) = 0; + *((volatile long *) phys_to_virt(0x467)) = 0; - /* - * Restore old page 0 entry. - */ + /* + * Restore old page 0 entry. + */ - pg0[0] = cfg; - local_flush_tlb(); + pg0[0] = cfg; + local_flush_tlb(); + } +#endif /* * Allow the user to impress friends. @@ -1144,14 +1345,14 @@ if (cpucount==0) { printk(KERN_ERR "Error: only one processor found.\n"); - cpu_present_map=(1<CPU IPIs and self-IPIs too. + */ - /* - * prepare target chip field - */ - cfg = apic_read(APIC_ICR2) & 0x00FFFFFF; - apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(dest)); +/* + * Silly serialization to work around CPU bug in P5s. + * We can safely turn it off on a 686. + */ +#ifdef CONFIG_X86_GOOD_APIC +# define FORCE_APIC_SERIALIZATION 0 +#else +# define FORCE_APIC_SERIALIZATION 1 +#endif - cfg = apic_read(APIC_ICR); - cfg &= ~0xFDFFF; - cfg |= APIC_DEST_FIELD|APIC_DEST_DM_FIXED|vector; - cfg |= dest; - - /* - * Send the IPI. The write to APIC_ICR fires this off. - */ - - apic_write(APIC_ICR, cfg); - __restore_flags(flags); -} +static unsigned int cached_APIC_ICR; +static unsigned int cached_APIC_ICR2; /* - * A non wait message cannot pass data or CPU source info. This current setup - * is only safe because the kernel lock owner is the only person who can send - * a message. - * - * Wrapping this whole block in a spinlock is not the safe answer either. A - * processor may get stuck with IRQs off waiting to send a message and thus - * not replying to the person spinning for a reply. + * Caches reserved bits, APIC reads are (mildly) expensive + * and force otherwise unnecessary CPU synchronization. * - * In the end flush tlb ought to be the NMI and a very short function - * (to avoid the old IDE disk problems), and other messages sent with IRQs - * enabled in a civilised fashion. That will also boost performance. + * (We could cache other APIC registers too, but these are the + * main ones used in RL.) */ +#define slow_ICR (apic_read(APIC_ICR) & ~0xFDFFF) +#define slow_ICR2 (apic_read(APIC_ICR2) & 0x00FFFFFF) -void smp_message_pass(int target, int msg, unsigned long data, int wait) +void cache_APIC_registers (void) { - unsigned long cfg; - unsigned long dest = 0; - unsigned long target_map; - int p=smp_processor_id(); - int irq; - int ct=0; + cached_APIC_ICR = slow_ICR; + cached_APIC_ICR2 = slow_ICR2; + mb(); +} +static inline unsigned int __get_ICR (void) +{ +#if FORCE_APIC_SERIALIZATION /* - * During boot up send no messages + * Wait for the APIC to become ready - this should never occur. It's + * a debugging check really. */ - - if (!smp_activated || !smp_commenced) - return; + int count = 0; + unsigned int cfg; + while (count < 1000) + { + cfg = slow_ICR; + if (!(cfg&(1<<12))) { + if (count) + atomic_add(count, (atomic_t*)&ipi_count); + return cfg; + } + count++; + udelay(10); + } + printk("CPU #%d: previous IPI still not cleared after 10mS\n", + smp_processor_id()); + return cfg; +#else + return cached_APIC_ICR; +#endif +} - /* - * Skip the reschedule if we are waiting to clear a - * message at this time. The reschedule cannot wait - * but is not critical. - */ +static inline unsigned int __get_ICR2 (void) +{ +#if FORCE_APIC_SERIALIZATION + return slow_ICR2; +#else + return cached_APIC_ICR2; +#endif +} - switch (msg) { - case MSG_RESCHEDULE: - irq = 0x30; - if (smp_cpu_in_msg[p]) - return; - break; +static inline int __prepare_ICR (unsigned int shortcut, int vector) +{ + unsigned int cfg; - case MSG_INVALIDATE_TLB: - /* make this a NMI some day */ - irq = 0x31; - break; + cfg = __get_ICR(); + cfg |= APIC_DEST_DM_FIXED|shortcut|vector; - case MSG_STOP_CPU: - irq = 0x40; - break; + return cfg; +} - case MSG_MTRR_CHANGE: - irq = 0x50; - break; +static inline int __prepare_ICR2 (unsigned int dest) +{ + unsigned int cfg; - default: - printk("Unknown SMP message %d\n", msg); - return; - } + cfg = __get_ICR2(); + cfg |= SET_APIC_DEST_FIELD(dest); - /* - * Sanity check we don't re-enter this across CPUs. Only the kernel - * lock holder may send messages. For a STOP_CPU we are bringing the - * entire box to the fastest halt we can. A reschedule carries - * no data and can occur during a flush. Guess what panic - * I got to notice this bug. - */ - - /* - * We are busy. - */ - - smp_cpu_in_msg[p]++; + return cfg; +} -/* printk("SMP message pass #%d to %d of %d\n", - p, msg, target);*/ +static inline void __send_IPI_shortcut(unsigned int shortcut, int vector) +{ + unsigned int cfg; +/* + * Subtle. In the case of the 'never do double writes' workaround we + * have to lock out interrupts to be safe. Otherwise it's just one + * single atomic write to the APIC, no need for cli/sti. + */ +#if FORCE_APIC_SERIALIZATION + unsigned long flags; - /* - * Wait for the APIC to become ready - this should never occur. It's - * a debugging check really. - */ - - while (ct<1000) - { - cfg=apic_read(APIC_ICR); - if (!(cfg&(1<<12))) - break; - ct++; - udelay(10); - } + __save_flags(flags); + __cli(); +#endif /* - * Just pray... there is nothing more we can do + * No need to touch the target chip field */ - - if (ct==1000) - printk("CPU #%d: previous IPI still not cleared after 10mS\n", p); + + cfg = __prepare_ICR(shortcut, vector); /* - * Set the target requirement + * Send the IPI. The write to APIC_ICR fires this off. */ - - if (target==MSG_ALL_BUT_SELF) - { - dest=APIC_DEST_ALLBUT; - target_map=cpu_present_map; - cpu_callin_map[0]=(1<> 16; /* hack for backward compatibility */ call &= 0xffff; if (call <= SEMCTL) switch (call) { case SEMOP: - ret = sys_semop (first, (struct sembuf *)ptr, second); - goto out; + return sys_semop (first, (struct sembuf *)ptr, second); case SEMGET: - ret = sys_semget (first, second, third); - goto out; + return sys_semget (first, second, third); case SEMCTL: { union semun fourth; - ret = -EINVAL; if (!ptr) - goto out; - ret = -EFAULT; + return -EINVAL; if (get_user(fourth.__pad, (void **) ptr)) - goto out; - ret = sys_semctl (first, second, third, fourth); - goto out; + return -EFAULT; + return sys_semctl (first, second, third, fourth); } default: - ret = -EINVAL; - goto out; + return -EINVAL; } + if (call <= MSGCTL) switch (call) { case MSGSND: - ret = sys_msgsnd (first, (struct msgbuf *) ptr, + return sys_msgsnd (first, (struct msgbuf *) ptr, second, third); - goto out; case MSGRCV: switch (version) { case 0: { struct ipc_kludge tmp; - ret = -EINVAL; if (!ptr) - goto out; - ret = -EFAULT; - if (copy_from_user(&tmp,(struct ipc_kludge *) ptr, - sizeof (tmp))) - goto out; - ret = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, third); - goto out; + return -EINVAL; + + if (copy_from_user(&tmp, + (struct ipc_kludge *) ptr, + sizeof (tmp))) + return -EFAULT; + return sys_msgrcv (first, tmp.msgp, second, + tmp.msgtyp, third); } - case 1: default: - ret = sys_msgrcv (first, (struct msgbuf *) ptr, second, fifth, third); - goto out; + default: + return sys_msgrcv (first, + (struct msgbuf *) ptr, + second, fifth, third); } case MSGGET: - ret = sys_msgget ((key_t) first, second); - goto out; + return sys_msgget ((key_t) first, second); case MSGCTL: - ret = sys_msgctl (first, second, (struct msqid_ds *) ptr); - goto out; + return sys_msgctl (first, second, + (struct msqid_ds *) ptr); default: - ret = -EINVAL; - goto out; + return -EINVAL; } if (call <= SHMCTL) switch (call) { case SHMAT: switch (version) { - case 0: default: { + default: { ulong raddr; - ret = sys_shmat (first, (char *) ptr, second, &raddr); + ret = sys_shmat (first, (char *) ptr, + second, &raddr); if (ret) - goto out; - ret = put_user (raddr, (ulong *) third); - goto out; + return ret; + return put_user (raddr, (ulong *) third); } case 1: /* iBCS2 emulator entry point */ - ret = -EINVAL; if (!segment_eq(get_fs(), get_ds())) - goto out; - ret = sys_shmat (first, (char *) ptr, second, (ulong *) third); - goto out; + return -EINVAL; + return sys_shmat (first, (char *) ptr, + second, (ulong *) third); } case SHMDT: - ret = sys_shmdt ((char *)ptr); - goto out; + return sys_shmdt ((char *)ptr); case SHMGET: - ret = sys_shmget (first, second, third); - goto out; + return sys_shmget (first, second, third); case SHMCTL: - ret = sys_shmctl (first, second, (struct shmid_ds *) ptr); - goto out; + return sys_shmctl (first, second, + (struct shmid_ds *) ptr); default: - ret = -EINVAL; - goto out; + return -EINVAL; } - else - ret = -EINVAL; -out: - unlock_kernel(); - return ret; + + return -EINVAL; } /* diff -ur --new-file old/linux/arch/i386/kernel/time.c new/linux/arch/i386/kernel/time.c --- old/linux/arch/i386/kernel/time.c Fri Oct 9 21:16:19 1998 +++ new/linux/arch/i386/kernel/time.c Wed Jan 20 19:18:53 1999 @@ -12,6 +12,8 @@ * precision CMOS clock update * 1996-05-03 Ingo Molnar * fixed time warps in do_[slow|fast]_gettimeoffset() + * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 + * "A Kernel Model for Precision Timekeeping" by Dave Mills * 1998-09-05 (Various) * More robust do_fast_gettimeoffset() algorithm implemented * (works with APM, Cyrix 6x86MX and Centaur C6), @@ -20,6 +22,12 @@ * (C. Scott Ananian , Andrew D. * Balsa , Philip Gladstone ; * ported from 2.0.35 Jumbo-9 by Michael Krause ). + * 1998-12-16 Andrea Arcangeli + * Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy + * because was not accounting lost_ticks. + * 1998-12-24 Copyright (C) 1998 Andrea Arcangeli + * Fixed a xtime SMP race (we need the xtime_lock rw spinlock to + * serialize accesses to xtime/lost_ticks). */ /* What about the "updated NTP code" stuff in 2.0 time.c? It's not in @@ -57,12 +65,14 @@ #include #include +#include +#include + /* * for x86_do_profile() */ #include "irq.h" -extern int setup_x86_irq(int, struct irqaction *); unsigned long cpu_hz; /* Detected as we calibrate the TSC */ @@ -78,7 +88,9 @@ */ static unsigned long fast_gettimeoffset_quotient=0; -static unsigned long do_fast_gettimeoffset(void) +extern rwlock_t xtime_lock; + +static inline unsigned long do_fast_gettimeoffset(void) { register unsigned long eax asm("ax"); register unsigned long edx asm("dx"); @@ -88,13 +100,12 @@ :"=a" (eax), "=d" (edx)); /* .. relative to previous jiffy (32 bits is enough) */ - edx = 0; eax -= last_tsc_low; /* tsc_low delta */ /* - * Time offset = (tsc_low delta) * fast_gettimeoffset_quotient. - * = (tsc_low delta) / (clocks_per_usec) - * = (tsc_low delta) / (clocks_per_jiffy / usecs_per_jiffy) + * Time offset = (tsc_low delta) * fast_gettimeoffset_quotient + * = (tsc_low delta) * (usecs_per_clock) + * = (tsc_low delta) * (usecs_per_jiffy / clocks_per_jiffy) * * Using a mull instead of a divl saves up to 31 clock cycles * in the critical path. @@ -102,13 +113,17 @@ __asm__("mull %2" :"=a" (eax), "=d" (edx) - :"r" (fast_gettimeoffset_quotient), - "0" (eax), "1" (edx)); + :"g" (fast_gettimeoffset_quotient), + "0" (eax)); /* our adjusted time offset in microseconds */ - return edx + delay_at_last_interrupt; + return delay_at_last_interrupt + edx; } +#define TICK_SIZE tick + +#ifndef CONFIG_X86_TSC + /* This function must be called with interrupts disabled * It was inspired by Steve McCanne's microtime-i386 for BSD. -- jrs * @@ -141,8 +156,6 @@ * comp.protocols.time.ntp! */ -#define TICK_SIZE tick - static unsigned long do_slow_gettimeoffset(void) { int count; @@ -224,28 +237,45 @@ static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset; +#else + +#define do_gettimeoffset() do_fast_gettimeoffset() + +#endif + /* * This version of gettimeofday has microsecond resolution * and better than microsecond precision on fast x86 machines with TSC. */ void do_gettimeofday(struct timeval *tv) { + extern volatile unsigned long lost_ticks; unsigned long flags; + unsigned long usec, sec; - save_flags(flags); - cli(); - *tv = xtime; - tv->tv_usec += do_gettimeoffset(); - if (tv->tv_usec >= 1000000) { - tv->tv_usec -= 1000000; - tv->tv_sec++; + read_lock_irqsave(&xtime_lock, flags); + usec = do_gettimeoffset(); + { + unsigned long lost = lost_ticks; + if (lost) + usec += lost * (1000000 / HZ); + } + sec = xtime.tv_sec; + usec += xtime.tv_usec; + read_unlock_irqrestore(&xtime_lock, flags); + + while (usec >= 1000000) { + usec -= 1000000; + sec++; } - restore_flags(flags); + + tv->tv_sec = sec; + tv->tv_usec = usec; } void do_settimeofday(struct timeval *tv) { - cli(); + write_lock_irq(&xtime_lock); /* This is revolting. We need to set the xtime.tv_usec * correctly. However, the value in this location is * is value at the last tick. @@ -254,16 +284,18 @@ */ tv->tv_usec -= do_gettimeoffset(); - if (tv->tv_usec < 0) { + while (tv->tv_usec < 0) { tv->tv_usec += 1000000; tv->tv_sec--; } xtime = *tv; - time_state = TIME_BAD; - time_maxerror = MAXPHASE; - time_esterror = MAXPHASE; - sti(); + time_adjust = 0; /* stop active adjtime() */ + time_status |= STA_UNSYNC; + time_state = TIME_ERROR; /* p. 24, (a) */ + time_maxerror = NTP_PHASE_LIMIT; + time_esterror = NTP_PHASE_LIMIT; + write_unlock_irq(&xtime_lock); } /* @@ -338,8 +370,12 @@ * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick */ -static inline void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { +#ifdef CONFIG_VISWS + /* Clear the interrupt */ + co_cpu_write(CO_CPU_STAT,co_cpu_read(CO_CPU_STAT) & ~CO_STAT_TIMEINTR); +#endif do_timer(regs); /* * In the SMP case we use the local APIC timer interrupt to do the @@ -359,21 +395,15 @@ * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be * called as close as possible to 500 ms before the new second starts. */ - if (time_state != TIME_BAD && xtime.tv_sec > last_rtc_update + 660 && - xtime.tv_usec > 500000 - (tick >> 1) && - xtime.tv_usec < 500000 + (tick >> 1)) { + if ((time_status & STA_UNSYNC) == 0 && + xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec >= 500000 - ((unsigned) tick) / 2 && + xtime.tv_usec <= 500000 + ((unsigned) tick) / 2) { if (set_rtc_mmss(xtime.tv_sec) == 0) last_rtc_update = xtime.tv_sec; else last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ } -#if 0 - /* As we return to user mode fire off the other CPU schedulers.. this is - basically because we don't yet share IRQ's around. This message is - rigged to be safe on the 386 - basically it's a hack, so don't look - closely for now.. */ - smp_message_pass(MSG_ALL_BUT_SELF, MSG_RESCHEDULE, 0L, 0); -#endif #ifdef CONFIG_MCA if( MCA_bus ) { @@ -392,36 +422,56 @@ #endif } +static int use_tsc = 0; + /* * This is the same as the above, except we _also_ save the current * 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) +static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - int count, flags; + int count; - /* 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. - */ + /* + * Here we are in the timer irq handler. We just have irqs locally + * disabled but we don't know if the timer_bh is running on the other + * CPU. We need to avoid to SMP race with it. NOTE: we don' t need + * the irq version of write_lock because as just said we have irq + * locally disabled. -arca + */ + write_lock(&xtime_lock); + + if (use_tsc) + { + /* + * 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 need interrupts + * disabled locally. + */ + + /* + * Interrupts are just disabled locally since the timer irq + * has the SA_INTERRUPT flag set. -arca + */ - __save_flags(flags); - __cli(); - /* read Pentium cycle counter */ - __asm__("rdtsc" - :"=a" (last_tsc_low):: "eax", "edx"); + /* read Pentium cycle counter */ + __asm__("rdtsc" : "=a" (last_tsc_low) : : "edx"); - outb_p(0x00, 0x43); /* latch the count ASAP */ + outb_p(0x00, 0x43); /* latch the count ASAP */ - count = inb_p(0x40); /* read the latched count */ - count |= inb(0x40) << 8; + 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; + } + + do_timer_interrupt(irq, NULL, regs); + + write_unlock(&xtime_lock); - count = ((LATCH-1) - count) * TICK_SIZE; - delay_at_last_interrupt = (count + LATCH/2) / LATCH; - __restore_flags(flags); - - timer_interrupt(irq, NULL, regs); } /* Converts Gregorian date to seconds since 1970-01-01 00:00:00. @@ -526,9 +576,9 @@ /* 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 */ - "movb $0x0c, %%al\n\t" + "movl %1, %%eax\n\t" "outb %%al, $0x42\n\t" /* LSB of count */ - "movb $0xe9, %%al\n\t" + "shrl $8, %%eax\n\t" "outb %%al, $0x42\n\t" /* MSB of count */ /* Read the TSC; counting has just started */ @@ -562,12 +612,12 @@ * do a real 64-by-64 divide before that time's up. */ "movl %%eax, %%ecx\n\t" "xorl %%eax, %%eax\n\t" - "movl %1, %%edx\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 * 1000020/HZ) + : "r" (5 * LATCH), "r" (5 * 1000020/HZ) : /* we clobber: */ "ax", "bx", "cx", "dx", "cc", "memory"); return retval; } @@ -589,12 +639,27 @@ * 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 devices/char/apm_bios.c. + * smart. See arch/i386/kernel/apm.c. */ + /* + * Firstly we have to do a CPU check for chips with + * a potentially buggy TSC. At this point we haven't run + * the ident/bugs checks so we must run this hook as it + * may turn off the TSC flag. + * + * NOTE: this doesnt yet handle SMP 486 machines where only + * some CPU's have a TSC. Thats never worked and nobody has + * moaned if you have the only one in the world - you fix it! + */ + + dodgy_tsc(); + if (boot_cpu_data.x86_capability & X86_FEATURE_TSC) { +#ifndef do_gettimeoffset do_gettimeoffset = do_fast_gettimeoffset; +#endif do_get_fast_time = do_gettimeofday; - irq0.handler = pentium_timer_interrupt; + use_tsc = 1; fast_gettimeoffset_quotient = calibrate_tsc(); /* report CPU clock rate in Hz. @@ -609,5 +674,22 @@ printk("Detected %ld Hz processor.\n", cpu_hz); } } + +#ifdef CONFIG_VISWS + printk("Starting Cobalt Timer system clock\n"); + + /* Set the countdown value */ + co_cpu_write(CO_CPU_TIMEVAL, CO_TIME_HZ/HZ); + + /* Start the timer */ + co_cpu_write(CO_CPU_CTRL, co_cpu_read(CO_CPU_CTRL) | CO_CTRL_TIMERUN); + + /* Enable (unmask) the timer interrupt */ + co_cpu_write(CO_CPU_CTRL, co_cpu_read(CO_CPU_CTRL) & ~CO_CTRL_TIMEMASK); + + /* Wire cpu IDT entry to s/w handler (and Cobalt APIC to IDT) */ + setup_x86_irq(CO_IRQ_TIMER, &irq0); +#else setup_x86_irq(0, &irq0); +#endif } diff -ur --new-file old/linux/arch/i386/kernel/traps.c new/linux/arch/i386/kernel/traps.c --- old/linux/arch/i386/kernel/traps.c Fri Oct 2 04:06:44 1998 +++ new/linux/arch/i386/kernel/traps.c Thu Jan 28 20:44:15 1999 @@ -21,6 +21,11 @@ #include #include +#ifdef CONFIG_MCA +#include +#include +#endif + #include #include #include @@ -29,6 +34,14 @@ #include #include +#include + +#ifdef CONFIG_X86_VISWS_APIC +#include +#include +#include +#endif + asmlinkage int system_call(void); asmlinkage void lcall7(void); @@ -295,6 +308,14 @@ 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"); @@ -486,15 +507,18 @@ } #define _set_gate(gate_addr,type,dpl,addr) \ -__asm__ __volatile__ ("movw %%dx,%%ax\n\t" \ - "movw %2,%%dx\n\t" \ +do { \ + int __d0, __d1; \ + __asm__ __volatile__ ("movw %%dx,%%ax\n\t" \ + "movw %4,%%dx\n\t" \ "movl %%eax,%0\n\t" \ "movl %%edx,%1" \ :"=m" (*((long *) (gate_addr))), \ - "=m" (*(1+(long *) (gate_addr))) \ + "=m" (*(1+(long *) (gate_addr))), "=&a" (__d0), "=&d" (__d1) \ :"i" ((short) (0x8000+(dpl<<13)+(type<<8))), \ - "d" ((char *) (addr)),"a" (__KERNEL_CS << 16) \ - :"ax","dx") + "3" ((char *) (addr)),"2" (__KERNEL_CS << 16)); \ +} while (0) + /* * This needs to use 'idt_table' rather than 'idt', and @@ -553,9 +577,100 @@ _set_tssldt_desc(gdt_table+FIRST_LDT_ENTRY+(n<<1), (int)addr, ((size << 3) - 1), 0x82); } +#ifdef CONFIG_X86_VISWS_APIC + +/* + * On Rev 005 motherboards legacy device interrupt lines are wired directly + * to Lithium from the 307. But the PROM leaves the interrupt type of each + * 307 logical device set appropriate for the 8259. Later we'll actually use + * the 8259, but for now we have to flip the interrupt types to + * level triggered, active lo as required by Lithium. + */ + +#define REG 0x2e /* The register to read/write */ +#define DEV 0x07 /* Register: Logical device select */ +#define VAL 0x2f /* The value to read/write */ + +static void +superio_outb(int dev, int reg, int val) +{ + outb(DEV, REG); + outb(dev, VAL); + outb(reg, REG); + outb(val, VAL); +} + +static int __attribute__ ((unused)) +superio_inb(int dev, int reg) +{ + outb(DEV, REG); + outb(dev, VAL); + outb(reg, REG); + return inb(VAL); +} + +#define FLOP 3 /* floppy logical device */ +#define PPORT 4 /* parallel logical device */ +#define UART5 5 /* uart2 logical device (not wired up) */ +#define UART6 6 /* uart1 logical device (THIS is the serial port!) */ +#define IDEST 0x70 /* int. destination (which 307 IRQ line) reg. */ +#define ITYPE 0x71 /* interrupt type register */ + +/* interrupt type bits */ +#define LEVEL 0x01 /* bit 0, 0 == edge triggered */ +#define ACTHI 0x02 /* bit 1, 0 == active lo */ + +static void +superio_init(void) +{ + if (visws_board_type == VISWS_320 && visws_board_rev == 5) { + superio_outb(UART6, IDEST, 0); /* 0 means no intr propagated */ + printk("SGI 320 rev 5: disabling 307 uart1 interrupt\n"); + } +} + +static void +lithium_init(void) +{ + set_fixmap(FIX_LI_PCIA, LI_PCI_A_PHYS); + printk("Lithium PCI Bridge A, Bus Number: %d\n", + li_pcia_read16(LI_PCI_BUSNUM) & 0xff); + set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS); + printk("Lithium PCI Bridge B (PIIX4), Bus Number: %d\n", + li_pcib_read16(LI_PCI_BUSNUM) & 0xff); + + /* XXX blindly enables all interrupts */ + li_pcia_write16(LI_PCI_INTEN, 0xffff); + li_pcib_write16(LI_PCI_INTEN, 0xffff); +} + +static void +cobalt_init(void) +{ + /* + * On normal SMP PC this is used only with SMP, but we have to + * use it and set it up here to start the Cobalt clock + */ + set_fixmap(FIX_APIC_BASE, APIC_PHYS_BASE); + printk("Local APIC ID %lx\n", apic_read(APIC_ID)); + printk("Local APIC Version %lx\n", apic_read(APIC_VERSION)); + + set_fixmap(FIX_CO_CPU, CO_CPU_PHYS); + printk("Cobalt Revision %lx\n", co_cpu_read(CO_CPU_REV)); + + set_fixmap(FIX_CO_APIC, CO_APIC_PHYS); + printk("Cobalt APIC ID %lx\n", co_apic_read(CO_APIC_ID)); + + /* Enable Cobalt APIC being careful to NOT change the ID! */ + co_apic_write(CO_APIC_ID, co_apic_read(CO_APIC_ID)|CO_APIC_ENABLE); + + printk("Cobalt APIC enabled: ID reg %lx\n", co_apic_read(CO_APIC_ID)); +} +#endif void __init trap_init(void) { - int i; + /* Initially up all of the IDT to jump to unexpected */ + init_unexpected_irq(); if (readl(0x0FFFD9) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24)) EISA_bus = 1; @@ -578,8 +693,6 @@ set_trap_gate(15,&spurious_interrupt_bug); set_trap_gate(16,&coprocessor_error); set_trap_gate(17,&alignment_check); - for (i=18;i<48;i++) - set_trap_gate(i,&reserved); set_system_gate(0x80,&system_call); /* set up GDT task & ldt entries */ @@ -590,4 +703,9 @@ __asm__("pushfl ; andl $0xffffbfff,(%esp) ; popfl"); load_TR(0); load_ldt(0); +#ifdef CONFIG_X86_VISWS_APIC + superio_init(); + lithium_init(); + cobalt_init(); +#endif } diff -ur --new-file old/linux/arch/i386/kernel/visws_apic.c new/linux/arch/i386/kernel/visws_apic.c --- old/linux/arch/i386/kernel/visws_apic.c Thu Jan 1 01:00:00 1970 +++ new/linux/arch/i386/kernel/visws_apic.c Wed Jan 20 19:18:53 1999 @@ -0,0 +1,407 @@ +/* + * linux/arch/i386/kernel/visws_apic.c + * + * Copyright (C) 1999 Bent Hagemark, Ingo Molnar + * + * SGI Visual Workstation interrupt controller + * + * The Cobalt system ASIC in the Visual Workstation contains a "Cobalt" APIC + * which serves as the main interrupt controller in the system. Non-legacy + * hardware in the system uses this controller directly. Legacy devices + * are connected to the PIIX4 which in turn has its 8259(s) connected to + * a of the Cobalt APIC entry. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "irq.h" + +/* + * This is the PIIX4-based 8259 that is wired up indirectly to Cobalt + * -- not the manner expected by the normal 8259 code in irq.c. + * + * there is a 'master' physical interrupt source that gets sent to + * the CPU. But in the chipset there are various 'virtual' interrupts + * waiting to be handled. We represent this to Linux through a 'master' + * interrupt controller type, and through a special virtual interrupt- + * controller. Device drivers only see the virtual interrupt sources. + */ + +#define CO_IRQ_BASE 0x20 /* This is the 0x20 in init_IRQ()! */ + +static void startup_piix4_master_irq(unsigned int irq); +static void shutdown_piix4_master_irq(unsigned int irq); +static void do_piix4_master_IRQ(unsigned int irq, struct pt_regs * regs); +#define enable_piix4_master_irq startup_piix4_master_irq +#define disable_piix4_master_irq shutdown_piix4_master_irq + +static struct hw_interrupt_type piix4_master_irq_type = { + "PIIX4-master", + startup_piix4_master_irq, + shutdown_piix4_master_irq, + do_piix4_master_IRQ, + enable_piix4_master_irq, + disable_piix4_master_irq +}; + +static void enable_piix4_virtual_irq(unsigned int irq); +static void disable_piix4_virtual_irq(unsigned int irq); +#define startup_piix4_virtual_irq enable_piix4_virtual_irq +#define shutdown_piix4_virtual_irq disable_piix4_virtual_irq + +static struct hw_interrupt_type piix4_virtual_irq_type = { + "PIIX4-virtual", + startup_piix4_virtual_irq, + shutdown_piix4_virtual_irq, + 0, /* no handler, it's never called physically */ + enable_piix4_virtual_irq, + disable_piix4_virtual_irq +}; + +/* + * This is the SGI Cobalt (IO-)APIC: + */ + +static void do_cobalt_IRQ(unsigned int irq, struct pt_regs * regs); +static void enable_cobalt_irq(unsigned int irq); +static void disable_cobalt_irq(unsigned int irq); +static void startup_cobalt_irq(unsigned int irq); +#define shutdown_cobalt_irq disable_cobalt_irq + +static struct hw_interrupt_type cobalt_irq_type = { + "Cobalt-APIC", + startup_cobalt_irq, + shutdown_cobalt_irq, + do_cobalt_IRQ, + enable_cobalt_irq, + disable_cobalt_irq +}; + + +/* + * Not an initfunc, needed by the reboot code + */ +void init_pic_mode(void) +{ + /* Nop on Cobalt */ +} + +/* + * Cobalt (IO)-APIC functions to handle PCI devices. + */ + +static void disable_cobalt_irq(unsigned int irq) +{ + /* XXX undo the APIC entry here? */ + + /* + * definitely, we do not want to have IRQ storms from + * unused devices --mingo + */ +} + +static void enable_cobalt_irq(unsigned int irq) +{ +} + +/* + * Set the given Cobalt APIC Redirection Table entry to point + * to the given IDT vector/index. + */ +static void co_apic_set(int entry, int idtvec) +{ + co_apic_write(CO_APIC_LO(entry), CO_APIC_LEVEL | (CO_IRQ_BASE+idtvec)); + co_apic_write(CO_APIC_HI(entry), 0); + + printk("Cobalt APIC Entry %d IDT Vector %d\n", entry, idtvec); +} + +/* + * "irq" really just serves to identify the device. Here is where we + * map this to the Cobalt APIC entry where it's physically wired. + * This is called via request_irq -> setup_x86_irq -> irq_desc->startup() + */ +static void startup_cobalt_irq(unsigned int irq) +{ + /* + * These "irq"'s are wired to the same Cobalt APIC entries + * for all (known) motherboard types/revs + */ + switch (irq) { + case CO_IRQ_TIMER: co_apic_set(CO_APIC_CPU, CO_IRQ_TIMER); + return; + + case CO_IRQ_ENET: co_apic_set(CO_APIC_ENET, CO_IRQ_ENET); + return; + + case CO_IRQ_SERIAL: return; /* XXX move to piix4-8259 "virtual" */ + + case CO_IRQ_8259: co_apic_set(CO_APIC_8259, CO_IRQ_8259); + return; + + case CO_IRQ_IDE: + switch (visws_board_type) { + case VISWS_320: + switch (visws_board_rev) { + case 5: + co_apic_set(CO_APIC_0_5_IDE0, CO_IRQ_IDE); + co_apic_set(CO_APIC_0_5_IDE1, CO_IRQ_IDE); + return; + case 6: + co_apic_set(CO_APIC_0_6_IDE0, CO_IRQ_IDE); + co_apic_set(CO_APIC_0_6_IDE1, CO_IRQ_IDE); + return; + } + case VISWS_540: + switch (visws_board_rev) { + case 2: + co_apic_set(CO_APIC_1_2_IDE0, CO_IRQ_IDE); + return; + } + } + break; + default: + panic("huh?"); + } +} + +/* + * This is the handle() op in do_IRQ() + */ +static void do_cobalt_IRQ(unsigned int irq, struct pt_regs * regs) +{ + struct irqaction * action; + irq_desc_t *desc = irq_desc + irq; + + spin_lock(&irq_controller_lock); + { + unsigned int status; + /* XXX APIC EOI? */ + status = desc->status & ~IRQ_REPLAY; + action = NULL; + if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) + action = desc->action; + desc->status = status | IRQ_INPROGRESS; + } + spin_unlock(&irq_controller_lock); + + /* Exit early if we had no action or it was disabled */ + if (!action) + return; + + handle_IRQ_event(irq, regs, action); + + (void)co_cpu_read(CO_CPU_REV); /* Sync driver ack to its h/w */ + apic_write(APIC_EOI, APIC_EIO_ACK); /* Send EOI to Cobalt APIC */ + + spin_lock(&irq_controller_lock); + { + unsigned int status = desc->status & ~IRQ_INPROGRESS; + desc->status = status; + if (!(status & IRQ_DISABLED)) + enable_cobalt_irq(irq); + } + spin_unlock(&irq_controller_lock); +} + +/* + * PIIX4-8259 master/virtual functions to handle: + * + * floppy + * parallel + * serial + * audio (?) + * + * None of these get Cobalt APIC entries, neither do they have IDT + * entries. These interrupts are purely virtual and distributed from + * the 'master' interrupt source: CO_IRQ_8259. + * + * When the 8259 interrupts its handler figures out which of these + * devices is interrupting and dispatches to it's handler. + * + * CAREFUL: devices see the 'virtual' interrupt only. Thus disable/ + * enable_irq gets the right irq. This 'master' irq is never directly + * manipulated by any driver. + */ + +static void startup_piix4_master_irq(unsigned int irq) +{ + /* ICW1 */ + outb(0x11, 0x20); + outb(0x11, 0xa0); + + /* ICW2 */ + outb(0x08, 0x21); + outb(0x70, 0xa1); + + /* ICW3 */ + outb(0x04, 0x21); + outb(0x02, 0xa1); + + /* ICW4 */ + outb(0x01, 0x21); + outb(0x01, 0xa1); + + /* OCW1 - disable all interrupts in both 8259's */ + outb(0xff, 0x21); + outb(0xff, 0xa1); + + startup_cobalt_irq(irq); +} + +static void shutdown_piix4_master_irq(unsigned int irq) +{ + /* + * [we skip the 8259 magic here, not strictly necessary] + */ + + shutdown_cobalt_irq(irq); +} + +static void do_piix4_master_IRQ(unsigned int irq, struct pt_regs * regs) +{ + int realirq, mask; + + /* Find out what's interrupting in the PIIX4 8259 */ + + spin_lock(&irq_controller_lock); + outb(0x0c, 0x20); /* OCW3 Poll command */ + realirq = inb(0x20); + + if (!(realirq & 0x80)) { + /* + * Bit 7 == 0 means invalid/spurious + */ + goto out_unlock; + } + realirq &= 0x7f; + + /* + * mask and ack the 8259 + */ + mask = inb(0x21); + if ((mask >> realirq) & 0x01) + /* + * This IRQ is masked... ignore + */ + goto out_unlock; + + outb(mask | (1<status & IRQ_DISABLED)) + enable_piix4_virtual_irq(realirq); + } + spin_unlock(&irq_controller_lock); + return; + +out_unlock: + spin_unlock(&irq_controller_lock); + return; +} + +static void enable_piix4_virtual_irq(unsigned int irq) +{ + /* + * assumes this irq is one of the legacy devices + */ + + unsigned int mask = inb(0x21); + mask &= ~(1 << irq); + outb(mask, 0x21); + enable_cobalt_irq(irq); +} + +/* + * assumes this irq is one of the legacy devices + */ +static void disable_piix4_virtual_irq(unsigned int irq) +{ + unsigned int mask; + + disable_cobalt_irq(irq); + + mask = inb(0x21); + mask &= ~(1 << irq); + outb(mask, 0x21); +} + +static struct irqaction master_action = + { no_action, 0, 0, "PIIX4-8259", NULL, NULL }; + +void init_VISWS_APIC_irqs(void) +{ + int i; + + for (i = 0; i < 16; i++) { + irq_desc[i].status = IRQ_DISABLED; + irq_desc[i].action = 0; + irq_desc[i].depth = 0; + + /* + * Cobalt IRQs are mapped to standard ISA + * interrupt vectors: + */ + switch (i) { + /* + * Only CO_IRQ_8259 will be raised + * externally. + */ + case CO_IRQ_8259: + irq_desc[i].handler = &piix4_master_irq_type; + break; + case CO_IRQ_FLOPPY: + case CO_IRQ_PARLL: + irq_desc[i].handler = &piix4_virtual_irq_type; + break; + default: + irq_desc[i].handler = &cobalt_irq_type; + break; + } + } + + /* + * The master interrupt is always present: + */ + setup_x86_irq(CO_IRQ_8259, &master_action); +} + diff -ur --new-file old/linux/arch/i386/kernel/vm86.c new/linux/arch/i386/kernel/vm86.c --- old/linux/arch/i386/kernel/vm86.c Tue Sep 15 18:33:04 1998 +++ new/linux/arch/i386/kernel/vm86.c Tue Dec 1 20:28:24 1998 @@ -63,7 +63,7 @@ #define VM86_REGS_SIZE2 (sizeof(struct kernel_vm86_regs) - VM86_REGS_SIZE1) asmlinkage struct pt_regs * FASTCALL(save_v86_state(struct kernel_vm86_regs * regs)); -asmlinkage struct pt_regs * 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 -ur --new-file old/linux/arch/i386/lib/Makefile new/linux/arch/i386/lib/Makefile --- old/linux/arch/i386/lib/Makefile Wed Aug 19 01:42:56 1998 +++ new/linux/arch/i386/lib/Makefile Sun Dec 27 19:33:13 1998 @@ -6,6 +6,7 @@ $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c $< -o $*.o L_TARGET = lib.a -L_OBJS = checksum.o semaphore.o delay.o usercopy.o getuser.o putuser.o +L_OBJS = checksum.o old-checksum.o semaphore.o delay.o \ + usercopy.o getuser.o putuser.o include $(TOPDIR)/Rules.make diff -ur --new-file old/linux/arch/i386/lib/checksum.S new/linux/arch/i386/lib/checksum.S --- old/linux/arch/i386/lib/checksum.S Thu Jan 1 01:00:00 1970 +++ new/linux/arch/i386/lib/checksum.S Fri Jan 15 23:36:20 1999 @@ -0,0 +1,447 @@ +/* + * INET An implementation of the TCP/IP protocol suite for the LINUX + * operating system. INET is implemented using the BSD Socket + * interface as the means of communication with the user level. + * + * IP/TCP/UDP checksumming routines + * + * Authors: Jorge Cwik, + * Arnt Gulbrandsen, + * Tom May, + * Pentium Pro/II routines: + * Alexander Kjeldaas + * Finn Arne Gangstad + * Lots of code moved from tcp.c and ip.c; see those files + * for more names. + * + * Changes: Ingo Molnar, converted csum_partial_copy() to 2.1 exception + * handling. + * Andi Kleen, add zeroing on error + * converted to pure assembler + * + * 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. + */ + +#include + +/* + * computes a partial checksum, e.g. for TCP/UDP fragments + */ + +/* +unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) + */ + +.text +.align 4 +.globl csum_partial + +#if CPU!=686 + + /* + * Experiments with Ethernet and SLIP connections show that buff + * is aligned on either a 2-byte or 4-byte boundary. We get at + * least a twofold speedup on 486 and Pentium if it is 4-byte aligned. + * Fortunately, it is easy to convert 2-byte alignment to 4-byte + * alignment for the unrolled loop. + */ +csum_partial: + pushl %esi + pushl %ebx + movl 20(%esp),%eax # Function arg: unsigned int sum + movl 16(%esp),%ecx # Function arg: int len + movl 12(%esp),%esi # Function arg: unsigned char *buff + testl $2, %esi # Check alignment. + jz 2f # Jump if alignment is ok. + subl $2, %ecx # Alignment uses up two bytes. + jae 1f # Jump if we had at least two bytes. + addl $2, %ecx # ecx was < 2. Deal with it. + jmp 4f +1: movw (%esi), %bx + addl $2, %esi + addw %bx, %ax + adcl $0, %eax +2: + movl %ecx, %edx + shrl $5, %ecx + jz 2f + testl %esi, %esi +1: movl (%esi), %ebx + adcl %ebx, %eax + movl 4(%esi), %ebx + adcl %ebx, %eax + movl 8(%esi), %ebx + adcl %ebx, %eax + movl 12(%esi), %ebx + adcl %ebx, %eax + movl 16(%esi), %ebx + adcl %ebx, %eax + movl 20(%esi), %ebx + adcl %ebx, %eax + movl 24(%esi), %ebx + adcl %ebx, %eax + movl 28(%esi), %ebx + adcl %ebx, %eax + lea 32(%esi), %esi + dec %ecx + jne 1b + adcl $0, %eax +2: movl %edx, %ecx + andl $0x1c, %edx + je 4f + shrl $2, %edx # This clears CF +3: adcl (%esi), %eax + lea 4(%esi), %esi + dec %edx + jne 3b + adcl $0, %eax +4: andl $3, %ecx + jz 7f + cmpl $2, %ecx + jb 5f + movw (%esi),%cx + leal 2(%esi),%esi + je 6f + shll $16,%ecx +5: movb (%esi),%cl +6: addl %ecx,%eax + adcl $0, %eax +7: + popl %ebx + popl %esi + ret + +#else /* CPU==686 */ + +csum_partial: + movl 12(%esp),%eax # Function arg: unsigned int sum + movl 8(%esp),%ecx # Function arg: int len + movl 4(%esp),%esi # Function arg: const unsigned char *buf + + testl $2, %esi + jnz 30f +10: + movl %ecx, %edx + movl %ecx, %ebx + andl $0x7c, %ebx + shrl $7, %ecx + addl %ebx,%esi + shrl $2, %ebx + negl %ebx + lea 45f(%ebx,%ebx,2), %ebx + testl %esi, %esi + jmp *%ebx + + # Handle 2-byte-aligned regions +20: addw (%esi), %ax + lea 2(%esi), %esi + adcl $0, %eax + jmp 10b + +30: subl $2, %ecx + ja 20b + je 32f + movzbl (%esi),%ebx # csumming 1 byte, 2-aligned + addl %ebx, %eax + adcl $0, %eax + jmp 80f +32: + addw (%esi), %ax # csumming 2 bytes, 2-aligned + adcl $0, %eax + jmp 80f + +40: + addl -128(%esi), %eax + adcl -124(%esi), %eax + adcl -120(%esi), %eax + adcl -116(%esi), %eax + adcl -112(%esi), %eax + adcl -108(%esi), %eax + adcl -104(%esi), %eax + adcl -100(%esi), %eax + adcl -96(%esi), %eax + adcl -92(%esi), %eax + adcl -88(%esi), %eax + adcl -84(%esi), %eax + adcl -80(%esi), %eax + adcl -76(%esi), %eax + adcl -72(%esi), %eax + adcl -68(%esi), %eax + adcl -64(%esi), %eax + adcl -60(%esi), %eax + adcl -56(%esi), %eax + adcl -52(%esi), %eax + adcl -48(%esi), %eax + adcl -44(%esi), %eax + adcl -40(%esi), %eax + adcl -36(%esi), %eax + adcl -32(%esi), %eax + adcl -28(%esi), %eax + adcl -24(%esi), %eax + adcl -20(%esi), %eax + adcl -16(%esi), %eax + adcl -12(%esi), %eax + adcl -8(%esi), %eax + adcl -4(%esi), %eax +45: + lea 128(%esi), %esi + adcl $0, %eax + dec %ecx + jge 40b + movl %edx, %ecx +50: andl $3, %ecx + jz 80f + + # Handle the last 1-3 bytes without jumping + notl %ecx # 1->2, 2->1, 3->0, higher bits are masked + movl $0xffffff,%ebx # by the shll and shrl instructions + shll $3,%ecx + shrl %cl,%ebx + andl -128(%esi),%ebx # esi is 4-aligned so should be ok + addl %ebx,%eax + adcl $0,%eax +80: + ret + +#endif /* CPU==686 */ + +/* +unsigned int csum_partial_copy_generic (const char *src, char *dst, + int len, int sum, int *src_err_ptr, int *dst_err_ptr) + */ + +/* + * Copy from ds while checksumming, otherwise like csum_partial + * + * The macros SRC and DST specify the type of access for the instruction. + * thus we can call a custom exception handler for all access types. + * + * FIXME: could someone double-check whether I haven't mixed up some SRC and + * DST definitions? It's damn hard to trigger all cases. I hope I got + * them all but there's no guarantee. + */ + +#define SRC(y...) \ + 9999: y; \ + .section __ex_table, "a"; \ + .long 9999b, 6001f ; \ + .previous + +#define DST(y...) \ + 9999: y; \ + .section __ex_table, "a"; \ + .long 9999b, 6002f ; \ + .previous + +.align 4 +.globl csum_partial_copy_generic + +#if CPU!=686 + +#define ARGBASE 16 +#define FP 12 + +csum_partial_copy_generic: + subl $4,%esp + pushl %edi + pushl %esi + pushl %ebx + movl ARGBASE+16(%esp),%eax # sum + movl ARGBASE+12(%esp),%ecx # len + movl ARGBASE+4(%esp),%esi # src + movl ARGBASE+8(%esp),%edi # dst + + testl $2, %edi # Check alignment. + jz 2f # Jump if alignment is ok. + subl $2, %ecx # Alignment uses up two bytes. + jae 1f # Jump if we had at least two bytes. + addl $2, %ecx # ecx was < 2. Deal with it. + jmp 4f +SRC(1: movw (%esi), %bx ) + addl $2, %esi +DST( movw %bx, (%edi) ) + addl $2, %edi + addw %bx, %ax + adcl $0, %eax +2: + movl %ecx, FP(%esp) + shrl $5, %ecx + jz 2f + testl %esi, %esi +SRC(1: movl (%esi), %ebx ) +SRC( movl 4(%esi), %edx ) + adcl %ebx, %eax +DST( movl %ebx, (%edi) ) + adcl %edx, %eax +DST( movl %edx, 4(%edi) ) + +SRC( movl 8(%esi), %ebx ) +SRC( movl 12(%esi), %edx ) + adcl %ebx, %eax +DST( movl %ebx, 8(%edi) ) + adcl %edx, %eax +DST( movl %edx, 12(%edi) ) + +SRC( movl 16(%esi), %ebx ) +SRC( movl 20(%esi), %edx ) + adcl %ebx, %eax +DST( movl %ebx, 16(%edi) ) + adcl %edx, %eax +DST( movl %edx, 20(%edi) ) + +SRC( movl 24(%esi), %ebx ) +SRC( movl 28(%esi), %edx ) + adcl %ebx, %eax +DST( movl %ebx, 24(%edi) ) + adcl %edx, %eax +DST( movl %edx, 28(%edi) ) + + lea 32(%esi), %esi + lea 32(%edi), %edi + dec %ecx + jne 1b + adcl $0, %eax +2: movl FP(%esp), %edx + movl %edx, %ecx + andl $0x1c, %edx + je 4f + shrl $2, %edx # This clears CF +SRC(3: movl (%esi), %ebx ) + adcl %ebx, %eax +DST( movl %ebx, (%edi) ) + lea 4(%esi), %esi + lea 4(%edi), %edi + dec %edx + jne 3b + adcl $0, %eax +4: andl $3, %ecx + jz 7f + cmpl $2, %ecx + jb 5f +SRC( movw (%esi), %cx ) + leal 2(%esi), %esi +DST( movw %cx, (%edi) ) + leal 2(%edi), %edi + je 6f + shll $16,%ecx +SRC(5: movb (%esi), %cl ) +DST( movb %cl, (%edi) ) +6: addl %ecx, %eax + adcl $0, %eax +7: +5000: + +# Exception handler: +.section .fixup, "ax" + +6001: + movl ARGBASE+20(%esp), %ebx # src_err_ptr + movl $-EFAULT, (%ebx) + + # zero the complete destination - computing the rest + # is too much work + movl ARGBASE+8(%esp), %edi # dst + movl ARGBASE+12(%esp), %ecx # len + xorl %eax,%eax + rep ; stosb + + jmp 5000b + +6002: + movl ARGBASE+24(%esp), %ebx # dst_err_ptr + movl $-EFAULT,(%ebx) + jmp 5000b + +.previous + + popl %ebx + popl %esi + popl %edi + popl %ecx # equivalent to addl $4,%esp + ret + +#else + +/* Version for PentiumII/PPro */ + +#define ROUND1(x) \ + SRC(movl x(%esi), %ebx ) ; \ + addl %ebx, %eax\n ; \ + DST(movl %ebx, x(%edi) ) ; + +#define ROUND(x) \ + SRC(movl x(%esi), %ebx ) ; \ + adcl %ebx, %eax ; \ + DST(movl %ebx, x(%edi) ) ; + +#define ARGBASE 12 + +csum_partial_copy_generic: + pushl %ebx + pushl %edi + pushl %esi + movl ARGBASE+4(%esp),%esi #src + movl ARGBASE+8(%esp),%edi #dst + movl ARGBASE+12(%esp),%ecx #len + movl ARGBASE+16(%esp),%eax #sum + movl %ecx, %edx + movl %ecx, %ebx + shrl $6, %ecx + andl $0x3c, %ebx + negl %ebx + subl %ebx, %esi + subl %ebx, %edi + lea 3f(%ebx,%ebx), %ebx + testl %esi, %esi + jmp *%ebx +1: addl $64,%esi + addl $64,%edi + ROUND1(-64) ROUND(-60) ROUND(-56) ROUND(-52) + ROUND (-48) ROUND(-44) ROUND(-40) ROUND(-36) + ROUND (-32) ROUND(-28) ROUND(-24) ROUND(-20) + ROUND (-16) ROUND(-12) ROUND(-8) ROUND(-4) +3: adcl $0,%eax + dec %ecx + jge 1b +4: andl $3, %edx + jz 7f + cmpl $2, %edx + jb 5f +SRC( movw (%esi), %dx ) + leal 2(%esi), %esi +DST( movw %dx, (%edi) ) + leal 2(%edi), %edi + je 6f + shll $16,%edx +5: +SRC( movb (%esi), %dl ) +DST( movb %dl, (%edi) ) +6: addl %edx, %eax + adcl $0, %eax +7: +.section .fixup, "ax" +6001: movl ARGBASE+20(%esp), %ebx # src_err_ptr + movl $-EFAULT, (%ebx) + # zero the complete destination (computing the rest is too much work) + movl ARGBASE+8(%esp),%edi # dst + movl ARGBASE+12(%esp),%ecx # len + xorl %eax,%eax + rep; stosb + jmp 7b +6002: movl ARGBASE+24(%esp), %ebx # dst_err_ptr + movl $-EFAULT, (%ebx) + jmp 7b +.previous + + popl %esi + popl %edi + popl %ebx + ret + +#undef ROUND +#undef ROUND1 + +#endif /* CPU==i686 */ diff -ur --new-file old/linux/arch/i386/lib/checksum.c new/linux/arch/i386/lib/checksum.c --- old/linux/arch/i386/lib/checksum.c Tue Sep 15 07:52:10 1998 +++ new/linux/arch/i386/lib/checksum.c Thu Jan 1 01:00:00 1970 @@ -1,459 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * IP/TCP/UDP checksumming routines - * - * Authors: Jorge Cwik, - * Arnt Gulbrandsen, - * Tom May, - * Pentium Pro/II routines: - * Alexander Kjeldaas - * Finn Arne Gangstad - * Lots of code moved from tcp.c and ip.c; see those files - * for more names. - * - * 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 - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#include - -/* - * computes a partial checksum, e.g. for TCP/UDP fragments - */ - -#if CPU!=686 - -unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) { - /* - * Experiments with Ethernet and SLIP connections show that buff - * is aligned on either a 2-byte or 4-byte boundary. We get at - * least a twofold speedup on 486 and Pentium if it is 4-byte aligned. - * Fortunately, it is easy to convert 2-byte alignment to 4-byte - * alignment for the unrolled loop. - */ - __asm__(" - testl $2, %%esi # Check alignment. - jz 2f # Jump if alignment is ok. - subl $2, %%ecx # Alignment uses up two bytes. - jae 1f # Jump if we had at least two bytes. - addl $2, %%ecx # ecx was < 2. Deal with it. - jmp 4f -1: movw (%%esi), %%bx - addl $2, %%esi - addw %%bx, %%ax - adcl $0, %%eax -2: - movl %%ecx, %%edx - shrl $5, %%ecx - jz 2f - testl %%esi, %%esi -1: movl (%%esi), %%ebx - adcl %%ebx, %%eax - movl 4(%%esi), %%ebx - adcl %%ebx, %%eax - movl 8(%%esi), %%ebx - adcl %%ebx, %%eax - movl 12(%%esi), %%ebx - adcl %%ebx, %%eax - movl 16(%%esi), %%ebx - adcl %%ebx, %%eax - movl 20(%%esi), %%ebx - adcl %%ebx, %%eax - movl 24(%%esi), %%ebx - adcl %%ebx, %%eax - movl 28(%%esi), %%ebx - adcl %%ebx, %%eax - lea 32(%%esi), %%esi - dec %%ecx - jne 1b - adcl $0, %%eax -2: movl %%edx, %%ecx - andl $0x1c, %%edx - je 4f - shrl $2, %%edx # This clears CF -3: adcl (%%esi), %%eax - lea 4(%%esi), %%esi - dec %%edx - jne 3b - adcl $0, %%eax -4: andl $3, %%ecx - jz 7f - cmpl $2, %%ecx - jb 5f - movw (%%esi),%%cx - leal 2(%%esi),%%esi - je 6f - shll $16,%%ecx -5: movb (%%esi),%%cl -6: addl %%ecx,%%eax - adcl $0, %%eax -7: " - : "=a"(sum) - : "0"(sum), "c"(len), "S"(buff) - : "bx", "dx", "si", "cx", "memory"); - return(sum); -} - -#else /* 686 */ - -unsigned int csum_partial(const unsigned char * buf, int len, unsigned int sum) { - __asm__ (" - testl $2, %%esi - jnz 30f -10: - movl %%ecx, %%edx - movl %%ecx, %%ebx - andl $0x7c, %%ebx - shrl $7, %%ecx - addl %%ebx,%%esi - shrl $2, %%ebx - negl %%ebx - lea 45f(%%ebx,%%ebx,2), %%ebx - testl %%esi, %%esi - jmp *%%ebx - - # Handle 2-byte-aligned regions -20: addw (%%esi), %%ax - lea 2(%%esi), %%esi - adcl $0, %%eax - jmp 10b - -30: subl $2, %%ecx - ja 20b - je 32f - movzbl (%%esi),%%ebx # csumming 1 byte, 2-aligned - addl %%ebx, %%eax - adcl $0, %%eax - jmp 80f -32: - addw (%%esi), %%ax # csumming 2 bytes, 2-aligned - adcl $0, %%eax - jmp 80f - -40: - addl -128(%%esi), %%eax - adcl -124(%%esi), %%eax - adcl -120(%%esi), %%eax - adcl -116(%%esi), %%eax - adcl -112(%%esi), %%eax - adcl -108(%%esi), %%eax - adcl -104(%%esi), %%eax - adcl -100(%%esi), %%eax - adcl -96(%%esi), %%eax - adcl -92(%%esi), %%eax - adcl -88(%%esi), %%eax - adcl -84(%%esi), %%eax - adcl -80(%%esi), %%eax - adcl -76(%%esi), %%eax - adcl -72(%%esi), %%eax - adcl -68(%%esi), %%eax - adcl -64(%%esi), %%eax - adcl -60(%%esi), %%eax - adcl -56(%%esi), %%eax - adcl -52(%%esi), %%eax - adcl -48(%%esi), %%eax - adcl -44(%%esi), %%eax - adcl -40(%%esi), %%eax - adcl -36(%%esi), %%eax - adcl -32(%%esi), %%eax - adcl -28(%%esi), %%eax - adcl -24(%%esi), %%eax - adcl -20(%%esi), %%eax - adcl -16(%%esi), %%eax - adcl -12(%%esi), %%eax - adcl -8(%%esi), %%eax - adcl -4(%%esi), %%eax -45: - lea 128(%%esi), %%esi - adcl $0, %%eax - dec %%ecx - jge 40b - movl %%edx, %%ecx -50: andl $3, %%ecx - jz 80f - - # Handle the last 1-3 bytes without jumping - notl %%ecx # 1->2, 2->1, 3->0, higher bits are masked - movl $0xffffff,%%ebx # by the shll and shrl instructions - shll $3,%%ecx - shrl %%cl,%%ebx - andl -128(%%esi),%%ebx # esi is 4-aligned so should be ok - addl %%ebx,%%eax - adcl $0,%%eax -80: " - : "=a"(sum) - : "0"(sum), "c"(len), "S"(buf) - : "bx", "dx", "cx", "si", "memory"); - return(sum); -} - -#endif - -/* - * Copy from ds while checksumming, otherwise like csum_partial - * - * The macros SRC and DST specify the type of access for the instruction. - * thus we can call a custom exception handler for all access types. - * - * FIXME: could someone double-check whether I haven't mixed up some SRC and - * DST definitions? It's damn hard to trigger all cases. I hope I got - * them all but there's no guarantee. - */ - -#define SRC(y...) \ -" 9999: "#y"; \n \ - .section __ex_table, \"a\"; \n \ - .long 9999b, 6001f \n \ - .previous\n" - -#define DST(y...) \ -" 9999: "#y"; \n \ - .section __ex_table, \"a\"; \n \ - .long 9999b, 6002f \n \ - .previous\n" - -#if CPU!=686 - -unsigned int csum_partial_copy_generic (const char *src, char *dst, - int len, int sum, int *src_err_ptr, int *dst_err_ptr) -{ - __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. - jae 1f # Jump if we had at least two bytes. - addl $2, %%ecx # ecx was < 2. Deal with it. - jmp 4f -"SRC( 1: movw (%%esi), %%bx )" - addl $2, %%esi -"DST( movw %%bx, (%%edi) )" - addl $2, %%edi - addw %%bx, %%ax - adcl $0, %%eax - 2: - movl %%ecx, %8 - shrl $5, %%ecx - jz 2f - testl %%esi, %%esi -"SRC( 1: movl (%%esi), %%ebx )" -"SRC( movl 4(%%esi), %%edx )" - adcl %%ebx, %%eax -"DST( movl %%ebx, (%%edi) )" - adcl %%edx, %%eax -"DST( movl %%edx, 4(%%edi) )" - -"SRC( movl 8(%%esi), %%ebx )" -"SRC( movl 12(%%esi), %%edx )" - adcl %%ebx, %%eax -"DST( movl %%ebx, 8(%%edi) )" - adcl %%edx, %%eax -"DST( movl %%edx, 12(%%edi) )" - -"SRC( movl 16(%%esi), %%ebx )" -"SRC( movl 20(%%esi), %%edx )" - adcl %%ebx, %%eax -"DST( movl %%ebx, 16(%%edi) )" - adcl %%edx, %%eax -"DST( movl %%edx, 20(%%edi) )" - -"SRC( movl 24(%%esi), %%ebx )" -"SRC( movl 28(%%esi), %%edx )" - adcl %%ebx, %%eax -"DST( movl %%ebx, 24(%%edi) )" - adcl %%edx, %%eax -"DST( movl %%edx, 28(%%edi) )" - -"SRC( lea 32(%%esi), %%esi )" -"DST( lea 32(%%edi), %%edi )" - dec %%ecx - jne 1b - adcl $0, %%eax - 2: movl %8, %%edx - movl %%edx, %%ecx - andl $0x1c, %%edx - je 4f - shrl $2, %%edx # This clears CF -"SRC( 3: movl (%%esi), %%ebx )" - adcl %%ebx, %%eax -"DST( movl %%ebx, (%%edi) )" -"SRC( lea 4(%%esi), %%esi )" -"DST( lea 4(%%edi), %%edi )" - dec %%edx - jne 3b - adcl $0, %%eax - 4: andl $3, %%ecx - jz 7f - cmpl $2, %%ecx - jb 5f -"SRC( movw (%%esi), %%cx )" -"SRC( leal 2(%%esi), %%esi )" -"DST( movw %%cx, (%%edi) )" -"DST( leal 2(%%edi), %%edi )" - je 6f - shll $16,%%ecx -"SRC( 5: movb (%%esi), %%cl )" -"DST( movb %%cl, (%%edi) )" - 6: addl %%ecx, %%eax - adcl $0, %%eax - 7: - -5000: - -# Exception handler: -################################################ - # -.section .fixup, \"ax\" # - # -6000: # - # - movl %7, (%%ebx) # - # -# zero the complete destination - computing the rest -# is too much work - movl %6, %%edi - movl %9, %%ecx - xorl %%eax,%%eax - rep ; stosb - # - jmp 5000b # - # -6001: # - movl %1, %%ebx # - jmp 6000b # - # -6002: # - movl %2, %%ebx # - jmp 6000b # - # -.previous # - # -################################################ - -" - : "=a" (sum) - : "m" (src_err_ptr), "m" (dst_err_ptr), - "0" (sum), "c" (len), "S" (src), "m" (dst), - "i" (-EFAULT), "m"(tmp_var), - "m" (len) - : "bx", "dx", "si", "di", "cx", "memory" ); - - return(sum); -} - -#else /* CPU == 686 */ - -#define ROUND1(x) \ - SRC(movl x(%%esi), %%ebx ) \ - "addl %%ebx, %%eax\n" \ - DST(movl %%ebx, x(%%edi) ) - -#define ROUND(x) \ - SRC(movl x(%%esi), %%ebx ) \ - "adcl %%ebx, %%eax\n" \ - DST(movl %%ebx, x(%%edi) ) - -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 - andl $0x3c, %%ebx - negl %%ebx - subl %%ebx, %%esi - subl %%ebx, %%edi - lea 3f(%%ebx,%%ebx), %%ebx - testl %%esi, %%esi - jmp *%%ebx -1: addl $64,%%esi - addl $64,%%edi\n" -ROUND1(-64) ROUND(-60) ROUND(-56) ROUND(-52) -ROUND (-48) ROUND(-44) ROUND(-40) ROUND(-36) -ROUND (-32) ROUND(-28) ROUND(-24) ROUND(-20) -ROUND (-16) ROUND(-12) ROUND(-8) ROUND(-4) -"3: adcl $0,%%eax - dec %%ecx - jge 1b -4: andl $3, %%edx - jz 7f - cmpl $2, %%edx - jb 5f - " SRC(movw (%%esi), %%dx )" - leal 2(%%esi), %%esi - " DST(movw %%dx, (%%edi) )" - leal 2(%%edi), %%edi - je 6f - shll $16,%%edx -5:" SRC(movb (%%esi), %%dl )" - " DST(movb %%dl, (%%edi) )" -6: addl %%edx, %%eax - adcl $0, %%eax -7: -.section .fixup, \"ax\" -6000: movl %7, (%%ebx) -# 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 -6002: movl %2, %%ebx - jmp 6000b -.previous - " - : "=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); -} - -#undef ROUND -#undef ROUND1 - -#endif - - -#undef SRC -#undef DST - -/* - * FIXME: old compatibility stuff, will be removed soon. - */ - -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum) -{ - int src_err=0, dst_err=0; - - sum = csum_partial_copy_generic ( src, dst, len, sum, &src_err, &dst_err); - - if (src_err || dst_err) - printk("old csum_partial_copy_fromuser(), tell mingo to convert me.\n"); - - return sum; -} - - diff -ur --new-file old/linux/arch/i386/lib/delay.c new/linux/arch/i386/lib/delay.c --- old/linux/arch/i386/lib/delay.c Tue Oct 6 17:55:47 1998 +++ new/linux/arch/i386/lib/delay.c Sun Dec 27 19:36:38 1998 @@ -19,23 +19,23 @@ void __delay(unsigned long loops) { + int d0; __asm__ __volatile__( "\tjmp 1f\n" ".align 16\n" "1:\tjmp 2f\n" ".align 16\n" "2:\tdecl %0\n\tjns 2b" - :/* no outputs */ - :"a" (loops) - :"ax"); + :"=&a" (d0) + :"0" (loops)); } inline void __const_udelay(unsigned long xloops) { + int d0; __asm__("mull %0" - :"=d" (xloops) - :"a" (xloops),"0" (current_cpu_data.loops_per_sec) - :"ax"); + :"=d" (xloops), "=&a" (d0) + :"1" (xloops),"0" (current_cpu_data.loops_per_sec)); __delay(xloops); } diff -ur --new-file old/linux/arch/i386/lib/old-checksum.c new/linux/arch/i386/lib/old-checksum.c --- old/linux/arch/i386/lib/old-checksum.c Thu Jan 1 01:00:00 1970 +++ new/linux/arch/i386/lib/old-checksum.c Sun Dec 27 19:32:09 1998 @@ -0,0 +1,19 @@ +/* + * FIXME: old compatibility stuff, will be removed soon. + */ + +#include + +unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum) +{ + int src_err=0, dst_err=0; + + sum = csum_partial_copy_generic ( src, dst, len, sum, &src_err, &dst_err); + + if (src_err || dst_err) + printk("old csum_partial_copy_fromuser(), tell mingo to convert me.\n"); + + return sum; +} + + diff -ur --new-file old/linux/arch/i386/lib/usercopy.c new/linux/arch/i386/lib/usercopy.c --- old/linux/arch/i386/lib/usercopy.c Mon Aug 24 21:29:35 1998 +++ new/linux/arch/i386/lib/usercopy.c Sun Dec 27 19:36:38 1998 @@ -29,6 +29,8 @@ */ #define __do_strncpy_from_user(dst,src,count,res) \ +do { \ + int __d0, __d1, __d2; \ __asm__ __volatile__( \ " testl %1,%1\n" \ " jz 2f\n" \ @@ -41,16 +43,18 @@ "1: subl %1,%0\n" \ "2:\n" \ ".section .fixup,\"ax\"\n" \ - "3: movl %2,%0\n" \ + "3: movl %5,%0\n" \ " jmp 2b\n" \ ".previous\n" \ ".section __ex_table,\"a\"\n" \ " .align 4\n" \ " .long 0b,3b\n" \ ".previous" \ - : "=d"(res), "=c"(count) \ - : "i"(-EFAULT), "0"(count), "1"(count), "S"(src), "D"(dst) \ - : "si", "di", "ax", "memory") + : "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \ + "=&D" (__d2) \ + : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \ + : "memory"); \ +} while (0) long __strncpy_from_user(char *dst, const char *src, long count) @@ -74,14 +78,16 @@ * Zero Userspace */ -#define __do_clear_user(addr,size) \ - __asm__ __volatile__( \ +#define __do_clear_user(addr,size) \ +do { \ + int __d0; \ + __asm__ __volatile__( \ "0: rep; stosl\n" \ - " movl %1,%0\n" \ + " movl %2,%0\n" \ "1: rep; stosb\n" \ "2:\n" \ ".section .fixup,\"ax\"\n" \ - "3: lea 0(%1,%0,4),%0\n" \ + "3: lea 0(%2,%0,4),%0\n" \ " jmp 2b\n" \ ".previous\n" \ ".section __ex_table,\"a\"\n" \ @@ -89,9 +95,9 @@ " .long 0b,3b\n" \ " .long 1b,2b\n" \ ".previous" \ - : "=&c"(size) \ - : "r"(size & 3), "0"(size / 4), "D"(addr), "a"(0) \ - : "di") + : "=&c"(size), "=&D" (__d0) \ + : "r"(size & 3), "0"(size / 4), "1"(addr), "a"(0)); \ +} while (0) unsigned long clear_user(void *to, unsigned long n) diff -ur --new-file old/linux/arch/i386/mm/fault.c new/linux/arch/i386/mm/fault.c --- old/linux/arch/i386/mm/fault.c Thu Oct 8 23:20:02 1998 +++ new/linux/arch/i386/mm/fault.c Sun Nov 22 18:38:19 1998 @@ -124,7 +124,7 @@ /* * 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) @@ -156,7 +156,14 @@ 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? @@ -243,4 +250,24 @@ } die("Oops", regs, error_code); do_exit(SIGKILL); + +/* + * 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 -ur --new-file old/linux/arch/i386/mm/init.c new/linux/arch/i386/mm/init.c --- old/linux/arch/i386/mm/init.c Wed Sep 9 17:56:58 1998 +++ new/linux/arch/i386/mm/init.c Thu Jan 21 20:28:40 1999 @@ -119,24 +119,28 @@ pte_t * __bad_pagetable(void) { extern char empty_bad_page_table[PAGE_SIZE]; + int d0, d1; - __asm__ __volatile__("cld ; rep ; stosl": - :"a" (pte_val(BAD_PAGE)), - "D" ((long) empty_bad_page_table), - "c" (PAGE_SIZE/4) - :"di","cx"); + __asm__ __volatile__("cld ; rep ; stosl" + : "=&D" (d0), "=&c" (d1) + : "a" (pte_val(BAD_PAGE)), + "0" ((long) empty_bad_page_table), + "1" (PAGE_SIZE/4) + : "memory"); return (pte_t *) empty_bad_page_table; } pte_t __bad_page(void) { extern char empty_bad_page[PAGE_SIZE]; + int d0, d1; - __asm__ __volatile__("cld ; rep ; stosl": - :"a" (0), - "D" ((long) empty_bad_page), - "c" (PAGE_SIZE/4) - :"di","cx"); + __asm__ __volatile__("cld ; rep ; stosl" + : "=&D" (d0), "=&c" (d1) + : "a" (0), + "0" ((long) empty_bad_page), + "1" (PAGE_SIZE/4) + : "memory"); return pte_mkdirty(mk_pte((unsigned long) empty_bad_page, PAGE_SHARED)); } @@ -275,31 +279,6 @@ * kernel. * It may also hold the MP configuration table when we are booting SMP. */ -#ifdef __SMP__ - /* - * FIXME: Linux assumes you have 640K of base ram.. - * this continues the error... - * - * 1) Scan the bottom 1K for a signature - * 2) Scan the top 1K of base RAM - * 3) Scan the 64K of bios - */ - if (!smp_scan_config(0x0,0x400) && - !smp_scan_config(639*0x400,0x400) && - !smp_scan_config(0xF0000,0x10000)) { - /* - * If it is an SMP machine we should know now, unless the - * configuration is in an EISA/MCA bus machine with an - * extended bios data area. - * - * there is a real-mode segmented pointer pointing to the - * 4K EBDA area at 0x40E, calculate and scan it here: - */ - address = *(unsigned short *)phys_to_virt(0x40E); - address<<=4; - smp_scan_config(address, 0x1000); - } -#endif start_mem = PAGE_ALIGN(start_mem); address = PAGE_OFFSET; pg_dir = swapper_pg_dir; @@ -396,7 +375,7 @@ if (boot_cpu_data.wp_works_ok < 0) { boot_cpu_data.wp_works_ok = 0; printk("No.\n"); -#ifndef CONFIG_M386 +#ifdef CONFIG_X86_WP_WORKS_OK panic("This kernel doesn't support CPU's with broken WP. Recompile it for a 386!"); #endif } else diff -ur --new-file old/linux/arch/i386/mm/ioremap.c new/linux/arch/i386/mm/ioremap.c --- old/linux/arch/i386/mm/ioremap.c Sun Jul 26 23:28:07 1998 +++ new/linux/arch/i386/mm/ioremap.c Sat Nov 28 00:03:14 1998 @@ -84,11 +84,16 @@ * 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 @@ /* * 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 @@ 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 -ur --new-file old/linux/arch/i386/vmlinux.lds new/linux/arch/i386/vmlinux.lds --- old/linux/arch/i386/vmlinux.lds Wed Sep 9 08:10:10 1998 +++ new/linux/arch/i386/vmlinux.lds Mon Dec 28 07:45:13 1998 @@ -45,8 +45,12 @@ . = ALIGN(4096); __init_end = .; + . = ALIGN(32); + .data.cacheline_aligned : { *(.data.cacheline_aligned) } + . = ALIGN(4096); .data.page_aligned : { *(.data.idt) } + __bss_start = .; /* BSS */ .bss : { diff -ur --new-file old/linux/arch/m68k/Makefile new/linux/arch/m68k/Makefile --- old/linux/arch/m68k/Makefile Sat Jun 13 22:14:31 1998 +++ new/linux/arch/m68k/Makefile Tue Jan 19 19:58:26 1999 @@ -29,14 +29,21 @@ # without -fno-strength-reduce the 53c7xx.c driver fails ;-( CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 -ifdef CONFIG_OPTIMIZE_040 +# enable processor switch if compiled only for a single cpu +ifndef CONFIG_M68020 +ifndef CONFIG_M68030 + +ifndef CONFIG_M68060 CFLAGS := $(CFLAGS) -m68040 endif -ifdef CONFIG_OPTIMIZE_060 +ifndef CONFIG_M68040 CFLAGS := $(CFLAGS) -m68060 endif +endif +endif + ifdef CONFIG_KGDB # If configured for kgdb support, include debugging infos and keep the # frame pointer @@ -116,6 +123,7 @@ archclean: rm -f vmlinux.gz + rm -f arch/m68k/kernel/m68k_defs.h arch/m68k/kernel/m68k_defs.d archmrproper: diff -ur --new-file old/linux/arch/m68k/amiga/amiints.c new/linux/arch/m68k/amiga/amiints.c --- old/linux/arch/m68k/amiga/amiints.c Mon Oct 5 22:54:39 1998 +++ new/linux/arch/m68k/amiga/amiints.c Thu Jan 7 17:41:55 1999 @@ -15,7 +15,7 @@ * - IRQ_FLG_SLOW: handler is inserted at bottom of list and before * they're executed irq level is set to the previous * one, but handlers don't need to be reentrant, if - * reentrance occured, slow handlers will be just + * reentrance occurred, slow handlers will be just * called again. * The whole interrupt handling for CIAs is moved to cia.c * /Roman Zippel @@ -367,7 +367,7 @@ for (;;) { for (; node; node = node->next) node->handler(irq, node->dev_id, fp); - /* if reentrance occured, serve slow handlers again */ + /* if reentrance occurred, serve slow handlers again */ custom.intena = ami_intena_vals[irq]; if (!server->reentrance) { server->count--; diff -ur --new-file old/linux/arch/m68k/amiga/config.c new/linux/arch/m68k/amiga/config.c --- old/linux/arch/m68k/amiga/config.c Mon Oct 5 22:54:39 1998 +++ new/linux/arch/m68k/amiga/config.c Tue Jan 19 19:58:26 1999 @@ -52,7 +52,6 @@ /* amiga specific keyboard functions */ extern int amiga_keyb_init(void); extern int amiga_kbdrate (struct kbd_repeat *); -extern void amiga_kbd_reset_setup(char*, int); /* amiga specific irq functions */ extern void amiga_init_IRQ (void); extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *); @@ -343,7 +342,6 @@ mach_sched_init = amiga_sched_init; mach_keyb_init = amiga_keyb_init; mach_kbdrate = amiga_kbdrate; - kbd_reset_setup = amiga_kbd_reset_setup; mach_init_IRQ = amiga_init_IRQ; mach_default_handler = &amiga_default_handler; mach_request_irq = amiga_request_irq; diff -ur --new-file old/linux/arch/m68k/amiga/pcmcia.c new/linux/arch/m68k/amiga/pcmcia.c --- old/linux/arch/m68k/amiga/pcmcia.c Sat Aug 1 20:33:50 1998 +++ new/linux/arch/m68k/amiga/pcmcia.c Thu Dec 17 18:06:25 1998 @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -26,7 +27,7 @@ unsigned char b; gayle_reset = 0x00; - while (jiffies - reset_start_time < 1*HZ/100); + while (time_before(jiffies, reset_start_time + 1*HZ/100)); b = gayle_reset; } diff -ur --new-file old/linux/arch/m68k/apollo/dn_ints.c new/linux/arch/m68k/apollo/dn_ints.c --- old/linux/arch/m68k/apollo/dn_ints.c Fri Feb 13 01:30:12 1998 +++ new/linux/arch/m68k/apollo/dn_ints.c Thu Jan 7 17:41:55 1999 @@ -30,7 +30,7 @@ dn_irqs[irq-160].handler(irq,dn_irqs[irq-160].dev_id,fp); } else { - printk("spurious irq %d occured\n",irq); + printk("spurious irq %d occurred\n",irq); } #if 0 diff -ur --new-file old/linux/arch/m68k/atari/atakeyb.c new/linux/arch/m68k/atari/atakeyb.c --- old/linux/arch/m68k/atari/atakeyb.c Thu Jul 30 20:08:19 1998 +++ new/linux/arch/m68k/atari/atakeyb.c Tue Jan 19 19:58:26 1999 @@ -825,7 +825,7 @@ /* wait for a period of inactivity (here: 0.25s), then assume the IKBD's * self-test is finished */ self_test_last_rcv = jiffies; - while( jiffies < self_test_last_rcv + HZ/4 ) + while (time_before(jiffies, self_test_last_rcv + HZ/4)) barrier(); /* if not incremented: no 0xf1 received */ if (ikbd_self_test == 1) @@ -860,9 +860,4 @@ k->rate = key_repeat_rate * 1000 / HZ; return( 0 ); -} - -/* for "kbd-reset" cmdline param */ -__initfunc(void atari_kbd_reset_setup(char *str, int *ints)) -{ } diff -ur --new-file old/linux/arch/m68k/atari/config.c new/linux/arch/m68k/atari/config.c --- old/linux/arch/m68k/atari/config.c Wed Sep 2 18:39:18 1998 +++ new/linux/arch/m68k/atari/config.c Tue Jan 19 19:58:26 1999 @@ -60,7 +60,6 @@ extern int atari_keyb_init(void); extern int atari_kbdrate (struct kbd_repeat *); extern void atari_kbd_leds (unsigned int); -extern void atari_kbd_reset_setup(char*, int); /* atari specific irq functions */ extern void atari_init_IRQ (void); extern int atari_request_irq (unsigned int irq, void (*handler)(int, void *, struct pt_regs *), @@ -251,7 +250,6 @@ mach_keyb_init = atari_keyb_init; mach_kbdrate = atari_kbdrate; mach_kbd_leds = atari_kbd_leds; - kbd_reset_setup = atari_kbd_reset_setup; mach_init_IRQ = atari_init_IRQ; mach_request_irq = atari_request_irq; mach_free_irq = atari_free_irq; diff -ur --new-file old/linux/arch/m68k/atari/stram.c new/linux/arch/m68k/atari/stram.c --- old/linux/arch/m68k/atari/stram.c Mon Oct 5 22:54:39 1998 +++ new/linux/arch/m68k/atari/stram.c Wed Nov 11 20:50:00 1998 @@ -19,6 +19,8 @@ #include #include #include +#include + #include #include #include @@ -26,6 +28,7 @@ #include #include #include +#include #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 @@ /* 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 @@ #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 @@ * 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; @@ -294,7 +285,7 @@ * 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 @@ * 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 @@ /* * 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 @@ 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 @@ 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 @@ #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 @@ } 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 @@ "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 @@ --nr_swap_pages; } - if (page) - free_page(page); - return( 0 ); + return 0; } /* @@ -1015,7 +979,9 @@ 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 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ block_fsync /* fsync */ }; -__initfunc(int stram_device_init(void)) +int __init stram_device_init(void) { if (!MACH_IS_ATARI) diff -ur --new-file old/linux/arch/m68k/atari/time.c new/linux/arch/m68k/atari/time.c --- old/linux/arch/m68k/atari/time.c Sat Jun 13 22:14:32 1998 +++ new/linux/arch/m68k/atari/time.c Thu Nov 5 18:58:29 1998 @@ -279,8 +279,7 @@ 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 -ur --new-file old/linux/arch/m68k/bvme6000/bvmeints.c new/linux/arch/m68k/bvme6000/bvmeints.c --- old/linux/arch/m68k/bvme6000/bvmeints.c Sat Jun 13 22:14:31 1998 +++ new/linux/arch/m68k/bvme6000/bvmeints.c Thu Dec 17 18:06:29 1998 @@ -119,9 +119,12 @@ void bvme6000_process_int (unsigned long vec, struct pt_regs *fp) { if (vec > 255) - panic ("bvme6000_process_int: Illegal vector %ld", vec); - irq_tab[vec].count++; - irq_tab[vec].handler(vec, irq_tab[vec].dev_id, fp); + printk ("bvme6000_process_int: Illegal vector %ld", vec); + else + { + irq_tab[vec].count++; + irq_tab[vec].handler(vec, irq_tab[vec].dev_id, fp); + } } int bvme6000_get_irq_list (char *buf) diff -ur --new-file old/linux/arch/m68k/bvme6000/config.c new/linux/arch/m68k/bvme6000/config.c --- old/linux/arch/m68k/bvme6000/config.c Sat Jun 13 22:14:31 1998 +++ new/linux/arch/m68k/bvme6000/config.c Thu Dec 17 18:06:29 1998 @@ -91,8 +91,7 @@ static void bvme6000_get_model(char *model) { - /* XXX Need to detect if BVME4000 or BVME6000 */ - sprintf(model, "BVME6000"); + sprintf(model, "BVME%d000", m68k_cputype == CPU_68060 ? 6 : 4); } @@ -152,13 +151,17 @@ pit->pbddr = 0xf3; /* Mostly outputs */ pit->pcdr = 0x01; /* PA transceiver disabled */ pit->pcddr = 0x03; /* WDOG disable */ + + /* Disable snooping for Ethernet and VME accesses */ + + bvme_acr_addrctl = 0; } void bvme6000_abort_int (int irq, void *dev_id, struct pt_regs *fp) { unsigned long *new = (unsigned long *)vectors; - unsigned long *old = (unsigned long *)0xf8000000;; + unsigned long *old = (unsigned long *)0xf8000000; /* Wait for button release */ while (*config_reg_ptr & BVME_ABORT_STATUS) diff -ur --new-file old/linux/arch/m68k/config.in new/linux/arch/m68k/config.in --- old/linux/arch/m68k/config.in Mon Oct 5 22:54:39 1998 +++ new/linux/arch/m68k/config.in Tue Jan 19 19:58:26 1999 @@ -44,6 +44,7 @@ if [ "$CONFIG_HP300" = "y" ]; then bool 'DIO bus support' CONFIG_DIO fi +define_bool CONFIG_SUN3 n if [ "$CONFIG_PCI" = "y" ]; then bool 'Backward-compatible /proc/pci' CONFIG_PCI_OLD_PROC fi @@ -53,22 +54,11 @@ bool '68030 support' CONFIG_M68030 bool '68040 support' CONFIG_M68040 bool '68060 support' CONFIG_M68060 -if [ "$CONFIG_M68020" = "n" -a "$CONFIG_M68030" = "n" ]; then - if [ "$CONFIG_M68040" = "y" -a "$CONFIG_M68060" = "n" ]; then - bool 'Use 68040 specific optimizations' CONFIG_OPTIMIZE_040 - fi - if [ "$CONFIG_M68040" = "n" -a "$CONFIG_M68060" = "y" ]; then - bool 'Use 68060 specific optimizations' CONFIG_OPTIMIZE_060 - fi -fi -if [ "$CONFIG_VME" = "y" -a "$CONFIG_M68060" = "y" ]; then - define_bool CONFIG_060_WRITETHROUGH y -fi bool 'Advanced configuration options' CONFIG_ADVANCED if [ "$CONFIG_ADVANCED" = "y" ]; then bool 'Use read-modify-write instructions' CONFIG_RMW_INSNS bool 'Use one physical chunk of memory only' CONFIG_SINGLE_MEMORY_CHUNK - if [ "$CONFIG_M68060" = "y" -a "$CONFIG_VME" = "n" ]; then + if [ "$CONFIG_M68060" = "y" ]; then bool 'Use write-through caching for 68060 supervisor accesses' CONFIG_060_WRITETHROUGH fi fi @@ -140,19 +130,19 @@ comment 'SCSI low-level drivers' if [ "$CONFIG_AMIGA" = "y" ]; then - tristate 'A3000 WD33C93A support' CONFIG_A3000_SCSI + dep_tristate 'A3000 WD33C93A support' CONFIG_A3000_SCSI $CONFIG_SCSI if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then bool 'A4000T SCSI support' CONFIG_A4000T_SCSI fi fi if [ "$CONFIG_ZORRO" = "y" ]; then - tristate 'A2091 WD33C93A support' CONFIG_A2091_SCSI - tristate 'GVP Series II WD33C93A support' CONFIG_GVP11_SCSI - bool 'CyberStorm SCSI support' CONFIG_CYBERSTORM_SCSI - bool 'CyberStorm Mk II SCSI support' CONFIG_CYBERSTORMII_SCSI - bool 'Blizzard 2060 SCSI support' CONFIG_BLZ2060_SCSI - bool 'Blizzard 1230IV/1260 SCSI support' CONFIG_BLZ1230_SCSI - bool 'Fastlane SCSI support' CONFIG_FASTLANE_SCSI + dep_tristate 'A2091 WD33C93A support' CONFIG_A2091_SCSI $CONFIG_SCSI + dep_tristate 'GVP Series II WD33C93A support' CONFIG_GVP11_SCSI $CONFIG_SCSI + dep_tristate 'CyberStorm SCSI support' CONFIG_CYBERSTORM_SCSI $CONFIG_SCSI + dep_tristate 'CyberStorm Mk II SCSI support' CONFIG_CYBERSTORMII_SCSI $CONFIG_SCSI + dep_tristate 'Blizzard 2060 SCSI support' CONFIG_BLZ2060_SCSI $CONFIG_SCSI + dep_tristate 'Blizzard 1230IV/1260 SCSI support' CONFIG_BLZ1230_SCSI $CONFIG_SCSI + dep_tristate 'Fastlane SCSI support' CONFIG_FASTLANE_SCSI $CONFIG_SCSI if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then bool 'A4091 SCSI support' CONFIG_A4091_SCSI bool 'WarpEngine SCSI support' CONFIG_WARPENGINE_SCSI @@ -173,7 +163,7 @@ fi if [ "$CONFIG_MAC" = "y" ]; then bool 'MAC NCR5380 SCSI' CONFIG_MAC_SCSI - bool 'MAC NCR53c9[46] SCSI' CONFIG_SCSI_MAC_ESP + dep_tristate 'MAC NCR53c9[46] SCSI' CONFIG_SCSI_MAC_ESP $CONFIG_SCSI fi #dep_tristate 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG $CONFIG_SCSI @@ -226,14 +216,14 @@ 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 +# bool 'Macintosh (AV) onboard MACE ethernet' CONFIG_MACMACE + bool 'Macintosh (Quadra) onboard SONIC ethernet' CONFIG_MACSONIC fi if [ "$CONFIG_VME" = "y" -a "$CONFIG_MVME16x" = "y" ]; then - bool 'MVME16x Ethernet support' CONFIG_MVME16x_NET + tristate 'MVME16x Ethernet support' CONFIG_MVME16x_NET fi if [ "$CONFIG_VME" = "y" -a "$CONFIG_BVME6000" = "y" ]; then - bool 'BVME6000 Ethernet support' CONFIG_BVME6000_NET + tristate 'BVME6000 Ethernet support' CONFIG_BVME6000_NET fi if [ "$CONFIG_ATARI" = "y" ]; then tristate 'Atari Lance support' CONFIG_ATARILANCE @@ -266,7 +256,7 @@ 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 @@ -334,11 +324,6 @@ 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 @@ -371,8 +356,6 @@ source drivers/video/Config.in endmenu fi - -source fs/nls/Config.in mainmenu_option next_comment comment 'Kernel hacking' diff -ur --new-file old/linux/arch/m68k/defconfig new/linux/arch/m68k/defconfig --- old/linux/arch/m68k/defconfig Wed Sep 2 18:39:18 1998 +++ new/linux/arch/m68k/defconfig Tue Jan 19 19:58:26 1999 @@ -28,8 +28,6 @@ CONFIG_M68030=y CONFIG_M68040=y # CONFIG_M68060 is not set -# CONFIG_OPTIMIZE_040 is not set -# CONFIG_OPTIMIZE_060 is not set # CONFIG_ADVANCED is not set # CONFIG_SINGLE_MEMORY_CHUNK is not set # CONFIG_RMW_INSNS is not set @@ -77,21 +75,26 @@ # # Networking options # +CONFIG_PACKET=y # CONFIG_NETLINK is not set # CONFIG_FIREWALL is not set # CONFIG_NET_ALIAS is not set +# CONFIG_FILTER is not set +CONFIG_UNIX=y CONFIG_INET=y # CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ACCT is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set # CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_ALIAS is not set +# CONFIG_SYN_COOKIES is not set # # (it is safe to leave these untouched) # -# CONFIG_INET_PCTCP is not set # CONFIG_INET_RARP is not set -CONFIG_PATH_MTU_DISCOVERY=y CONFIG_IP_NOSR=y # CONFIG_SKB_LARGE is not set # CONFIG_IPV6 is not set @@ -101,8 +104,20 @@ # # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_AX25 is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set # CONFIG_BRIDGE is not set +# CONFIG_LLC is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set +# CONFIG_CPU_IS_SLOW is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set # # SCSI support @@ -115,12 +130,15 @@ CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_ST=y CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set # CONFIG_CHR_DEV_SG is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # # CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set # # SCSI low-level drivers @@ -149,6 +167,7 @@ # CONFIG_SLIP is not set # CONFIG_PPP is not set # CONFIG_ARIADNE is not set +# CONFIG_ARIADNE2 is not set # CONFIG_A2065 is not set # CONFIG_HYDRA is not set # CONFIG_APNE is not set @@ -186,7 +205,10 @@ CONFIG_FB_AMIGA_ECS=y CONFIG_FB_AMIGA_AGA=y # CONFIG_FB_CYBER is not set +# CONFIG_FB_VIRGE is not set +# CONFIG_FB_CVPPC is not set # CONFIG_FB_RETINAZ3 is not set +# CONFIG_FB_CLGEN is not set # CONFIG_FB_ATARI is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set diff -ur --new-file old/linux/arch/m68k/fpsp040/skeleton.S new/linux/arch/m68k/fpsp040/skeleton.S --- old/linux/arch/m68k/fpsp040/skeleton.S Mon Aug 10 20:02:24 1998 +++ new/linux/arch/m68k/fpsp040/skeleton.S Tue Jan 19 19:58:26 1999 @@ -40,6 +40,7 @@ #include #include +#include "../kernel/m68k_defs.h" |SKELETON idnt 2,1 | Motorola 040 Floating Point Software Package @@ -375,12 +376,12 @@ .global fpsp_done fpsp_done: btst #0x5,%sp@ | supervisor bit set in saved SR? - beq Lnotkern + beq .Lnotkern rte -Lnotkern: +.Lnotkern: SAVE_ALL_INT GET_CURRENT(%d0) - tstl %curptr@(LTASK_NEEDRESCHED) + tstl %curptr@(TASK_NEEDRESCHED) jne SYMBOL_NAME(ret_from_exception) | deliver signals, | reschedule etc.. RESTORE_ALL diff -ur --new-file old/linux/arch/m68k/hp300/config.c new/linux/arch/m68k/hp300/config.c --- old/linux/arch/m68k/hp300/config.c Wed Sep 2 18:39:18 1998 +++ new/linux/arch/m68k/hp300/config.c Tue Jan 19 19:58:26 1999 @@ -55,11 +55,6 @@ { } -/* for "kbd-reset" cmdline param */ -__initfunc(void hp300_kbd_reset_setup(char *str, int i)) -{ -} - static void hp300_get_model(char *model) { strcpy(model, "HP9000/300"); @@ -74,7 +69,6 @@ mach_init_IRQ = hp300_init_IRQ; mach_request_irq = hp300_request_irq; mach_free_irq = hp300_free_irq; - kbd_reset_setup = hp300_kbd_reset_setup; mach_get_model = hp300_get_model; mach_get_irq_list = hp300_get_irq_list; mach_gettimeoffset = hp300_gettimeoffset; diff -ur --new-file old/linux/arch/m68k/ifpsp060/iskeleton.S new/linux/arch/m68k/ifpsp060/iskeleton.S --- old/linux/arch/m68k/ifpsp060/iskeleton.S Thu Jul 30 20:08:19 1998 +++ new/linux/arch/m68k/ifpsp060/iskeleton.S Tue Jan 19 19:58:26 1999 @@ -36,6 +36,7 @@ #include #include +#include "../kernel/m68k_defs.h" |################################ @@ -69,12 +70,12 @@ .global _060_isp_done _060_isp_done: btst #0x5,%sp@ | supervisor bit set in saved SR? - beq Lnotkern + beq .Lnotkern rte -Lnotkern: +.Lnotkern: SAVE_ALL_INT GET_CURRENT(%d0) - tstl %curptr@(LTASK_NEEDRESCHED) + tstl %curptr@(TASK_NEEDRESCHED) jne SYMBOL_NAME(ret_from_exception) | deliver signals, | reschedule etc.. RESTORE_ALL diff -ur --new-file old/linux/arch/m68k/kernel/Makefile new/linux/arch/m68k/kernel/Makefile --- old/linux/arch/m68k/kernel/Makefile Fri Feb 13 01:30:12 1998 +++ new/linux/arch/m68k/kernel/Makefile Thu Dec 17 18:06:29 1998 @@ -26,10 +26,13 @@ head.o: head.S m68k_defs.h -m68k_defs.h: m68k_defs.c m68k_defs.head $(TOPDIR)/include/linux/sched.h - $(CC) ${CFLAGS} -S m68k_defs.c +m68k_defs.h: m68k_defs.c m68k_defs.head + rm -f m68k_defs.d + SUNPRO_DEPENDENCIES="m68k_defs.d m68k_defs.h" \ + $(CC) $(filter-out -MD,$(CFLAGS)) -S m68k_defs.c cp m68k_defs.head m68k_defs.h - sed -n < m68k_defs.s >> m68k_defs.h '/^#define/s/ #/ /p' + grep '^#define' m68k_defs.s >> m68k_defs.h rm m68k_defs.s +-include m68k_defs.d include $(TOPDIR)/Rules.make diff -ur --new-file old/linux/arch/m68k/kernel/entry.S new/linux/arch/m68k/kernel/entry.S --- old/linux/arch/m68k/kernel/entry.S Mon Oct 5 22:54:39 1998 +++ new/linux/arch/m68k/kernel/entry.S Tue Jan 19 19:58:26 1999 @@ -34,8 +34,10 @@ #include #include #include +#include #include #include +#include #include "m68k_defs.h" @@ -43,7 +45,7 @@ .globl SYMBOL_NAME(resume), SYMBOL_NAME(ret_from_exception) .globl SYMBOL_NAME(ret_from_signal) .globl SYMBOL_NAME(inthandler), SYMBOL_NAME(sys_call_table) -.globl SYMBOL_NAME(sys_fork), SYMBOL_NAME(sys_clone) +.globl SYMBOL_NAME(sys_fork), SYMBOL_NAME(sys_clone), SYMBOL_NAME(sys_vfork) .globl SYMBOL_NAME(ret_from_interrupt), SYMBOL_NAME(bad_interrupt) .text @@ -65,24 +67,24 @@ ENTRY(reschedule) | save top of frame - movel %sp,%curptr@(TS_ESP0) + movel %sp,%curptr@(TASK_TSS+TSS_ESP0) pea SYMBOL_NAME(ret_from_exception) jmp SYMBOL_NAME(schedule) badsys: - movel #-LENOSYS,LPT_OFF_D0(%sp) + movel #-ENOSYS,PT_D0(%sp) jra SYMBOL_NAME(ret_from_exception) do_trace: - movel #-LENOSYS,LPT_OFF_D0(%sp) | needed for strace + movel #-ENOSYS,PT_D0(%sp) | needed for strace subql #4,%sp SAVE_SWITCH_STACK jbsr SYMBOL_NAME(syscall_trace) RESTORE_SWITCH_STACK addql #4,%sp jbsr @(SYMBOL_NAME(sys_call_table),%d2:l:4)@(0) - movel %d0,%sp@(LPT_OFF_D0) | save the return value + movel %d0,%sp@(PT_D0) | save the return value subql #4,%sp | dummy return address SAVE_SWITCH_STACK jbsr SYMBOL_NAME(syscall_trace) @@ -98,34 +100,34 @@ GET_CURRENT(%d0) | save top of frame - movel %sp,%curptr@(TS_ESP0) + movel %sp,%curptr@(TASK_TSS+TSS_ESP0) cmpl #NR_syscalls,%d2 jcc badsys - btst #LPF_TRACESYS_BIT,%curptr@(LTASK_FLAGS+LPF_TRACESYS_OFF) + btst #PF_TRACESYS_BIT,%curptr@(TASK_FLAGS+PF_TRACESYS_OFF) jne do_trace jbsr @(SYMBOL_NAME(sys_call_table),%d2:l:4)@(0) - movel %d0,%sp@(LPT_OFF_D0) | save the return value + movel %d0,%sp@(PT_D0) | save the return value SYMBOL_NAME_LABEL(ret_from_exception) - btst #5,%sp@(LPT_OFF_SR) | check if returning to kernel + btst #5,%sp@(PT_SR) | check if returning to kernel bnes 2f | if so, skip resched, signals | only allow interrupts when we are really the last one on the | kernel stack, otherwise stack overflow can occur during | heavy interupt load andw #ALLOWINT,%sr - tstl %curptr@(LTASK_NEEDRESCHED) + tstl %curptr@(TASK_NEEDRESCHED) jne SYMBOL_NAME(reschedule) cmpl #SYMBOL_NAME(task),%curptr | task[0] cannot have signals jeq 2f | check for delayed trace - bclr #LPF_DTRACE_BIT,%curptr@(LTASK_FLAGS+LPF_DTRACE_OFF) + bclr #PF_DTRACE_BIT,%curptr@(TASK_FLAGS+PF_DTRACE_OFF) jne do_delayed_trace 5: - tstl %curptr@(LTASK_STATE) | state + tstl %curptr@(TASK_STATE) | state jne SYMBOL_NAME(reschedule) - tstl %curptr@(LTASK_SIGPENDING) + tstl %curptr@(TASK_SIGPENDING) jne Lsignal_return 2: RESTORE_ALL @@ -141,7 +143,7 @@ RESTORE_ALL do_delayed_trace: - bclr #7,%sp@(LPT_OFF_SR) | clear trace bit in SR + bclr #7,%sp@(PT_SR) | clear trace bit in SR pea 1 | send SIGTRAP movel %curptr,%sp@- pea LSIGTRAP @@ -158,7 +160,7 @@ GET_CURRENT(%d0) addql #1,SYMBOL_NAME(local_irq_count) | put exception # in d0 - bfextu %sp@(LPT_OFF_FORMATVEC){#4,#10},%d0 + bfextu %sp@(PT_VECTOR){#4,#10},%d0 movel %sp,%sp@- movel %d0,%sp@- | put vector # on stack @@ -172,7 +174,7 @@ RESTORE_ALL 1: #if 1 - bfextu %sp@(LPT_OFF_SR){#5,#3},%d0 | Check for nested interrupt. + bfextu %sp@(PT_SR){#5,#3},%d0 | Check for nested interrupt. #if MAX_NOINT_IPL > 0 cmpiw #MAX_NOINT_IPL,%d0 #endif @@ -210,6 +212,14 @@ RESTORE_SWITCH_STACK rts +ENTRY(sys_vfork) + SAVE_SWITCH_STACK + pea %sp@(SWITCH_STACK_SIZE) + jbsr SYMBOL_NAME(m68k_vfork) + addql #4,%sp + RESTORE_SWITCH_STACK + rts + ENTRY(sys_sigsuspend) SAVE_SWITCH_STACK pea %sp@(SWITCH_STACK_SIZE) @@ -240,37 +250,31 @@ SYMBOL_NAME_LABEL(resume) /* - * Beware - when entering resume, offset of tss is in d1, - * prev (the current task) is in a0, next (the new task) - * is in a1 and d2.b is non-zero if the mm structure is - * shared between the tasks, so don't change these + * Beware - when entering resume, prev (the current task) is + * in a0, next (the new task) is in a1,so don't change these * registers until their contents are no longer needed. */ - /* offset of tss struct (processor state) from beginning - of task struct */ - addl %d1,%a0 - /* save sr */ - movew %sr,%a0@(LTSS_SR) + movew %sr,%a0@(TASK_TSS+TSS_SR) /* save fs (sfc,%dfc) (may be pointing to kernel memory) */ movec %sfc,%d0 - movew %d0,%a0@(LTSS_FS) + movew %d0,%a0@(TASK_TSS+TSS_FS) /* save usp */ /* it is better to use a movel here instead of a movew 8*) */ movec %usp,%d0 - movel %d0,%a0@(LTSS_USP) + movel %d0,%a0@(TASK_TSS+TSS_USP) /* save non-scratch registers on stack */ SAVE_SWITCH_STACK /* save current kernel stack pointer */ - movel %sp,%a0@(LTSS_KSP) + movel %sp,%a0@(TASK_TSS+TSS_KSP) /* save floating point context */ - fsave %a0@(LTSS_FPCTXT+27*4) + fsave %a0@(TASK_TSS+TSS_FPSTATE) #if defined(CONFIG_M68060) #if !defined(CPU_M68060_ONLY) @@ -278,27 +282,27 @@ beqs 1f #endif /* The 060 FPU keeps status in bits 15-8 of the first longword */ - tstb %a0@(LTSS_FPCTXT+27*4+2) + tstb %a0@(TASK_TSS+TSS_FPSTATE+2) jeq 3f #if !defined(CPU_M68060_ONLY) jra 2f #endif #endif /* CONFIG_M68060 */ #if !defined(CPU_M68060_ONLY) -1: tstb %a0@(LTSS_FPCTXT+27*4) +1: tstb %a0@(TASK_TSS+TSS_FPSTATE) jeq 3f #endif -2: fmovemx %fp0-%fp7,%a0@(LTSS_FPCTXT) - fmoveml %fpcr/%fpsr/%fpiar,%a0@(LTSS_FPCTXT+24*4) +2: fmovemx %fp0-%fp7,%a0@(TASK_TSS+TSS_FPREG) + fmoveml %fpcr/%fpsr/%fpiar,%a0@(TASK_TSS+TSS_FPCNTL) 3: - /* get pointer to tss struct (a1 contains new task) */ + /* switch to new task (a1 contains new task) */ movel %a1,%curptr - addl %d1,%a1 /* Skip address space switching if they are the same. */ - tstb %d2 - jne 4f + movel %a0@(TASK_MM),%d0 + cmpl %a1@(TASK_MM),%d0 + jeq 4f #if defined(CPU_M68020_OR_M68030) && defined(CPU_M68040_OR_M68060) /* 68040 or 68060 ? */ @@ -316,7 +320,7 @@ movec %d0,%cacr /* switch the root pointer */ - pmove %a1@(LTSS_CRP),%crp + pmove %a1@(TASK_TSS+TSS_CRP),%crp #endif #if defined(CPU_M68020_OR_M68030) && defined(CPU_M68040_OR_M68060) @@ -333,7 +337,7 @@ pflushan /* switch the root pointer */ - movel %a1@(LTSS_CRP+4),%d0 + movel %a1@(TASK_TSS+TSS_CRP+4),%d0 movec %d0,%urp #if defined (CONFIG_M68060) @@ -359,37 +363,37 @@ beqs 1f #endif /* The 060 FPU keeps status in bits 15-8 of the first longword */ - tstb %a1@(LTSS_FPCTXT+27*4+2) + tstb %a1@(TASK_TSS+TSS_FPSTATE+2) jeq 3f #if !defined(CPU_M68060_ONLY) jra 2f #endif #endif /* CONFIG_M68060 */ #if !defined(CPU_M68060_ONLY) -1: tstb %a1@(LTSS_FPCTXT+27*4) +1: tstb %a1@(TASK_TSS+TSS_FPSTATE) jeq 3f #endif -2: fmovemx %a1@(LTSS_FPCTXT),%fp0-%fp7 - fmoveml %a1@(LTSS_FPCTXT+24*4),%fpcr/%fpsr/%fpiar -3: frestore %a1@(LTSS_FPCTXT+27*4) +2: fmovemx %a1@(TASK_TSS+TSS_FPREG),%fp0-%fp7 + fmoveml %a1@(TASK_TSS+TSS_FPCNTL),%fpcr/%fpsr/%fpiar +3: frestore %a1@(TASK_TSS+TSS_FPSTATE) /* restore the kernel stack pointer */ - movel %a1@(LTSS_KSP),%sp + movel %a1@(TASK_TSS+TSS_KSP),%sp /* restore non-scratch registers */ RESTORE_SWITCH_STACK /* restore user stack pointer */ - movel %a1@(LTSS_USP),%a0 + movel %a1@(TASK_TSS+TSS_USP),%a0 movel %a0,%usp /* restore fs (sfc,%dfc) */ - movew %a1@(LTSS_FS),%a0 + movew %a1@(TASK_TSS+TSS_FS),%a0 movec %a0,%sfc movec %a0,%dfc /* restore status register */ - movew %a1@(LTSS_SR),%sr + movew %a1@(TASK_TSS+TSS_SR),%sr rts @@ -586,6 +590,7 @@ .long SYMBOL_NAME(sys_sendfile) .long SYMBOL_NAME(sys_ni_syscall) /* streams1 */ .long SYMBOL_NAME(sys_ni_syscall) /* streams2 */ + .long SYMBOL_NAME(sys_vfork) /* 190 */ .rept NR_syscalls-(.-SYMBOL_NAME(sys_call_table))/4 .long SYMBOL_NAME(sys_ni_syscall) diff -ur --new-file old/linux/arch/m68k/kernel/head.S new/linux/arch/m68k/kernel/head.S --- old/linux/arch/m68k/kernel/head.S Sat Jun 13 22:14:32 1998 +++ new/linux/arch/m68k/kernel/head.S Tue Jan 19 19:58:26 1999 @@ -7,9 +7,12 @@ ** ** 68040 fixes by Michael Rausch ** 68060 fixes by Roman Hodek +** MMU cleanup by Randy Thelen +** Final MMU cleanup by Roman Zippel ** ** Atari support by Andreas Schwab, using ideas of Robert de Vries ** and Bjoern Brauel +** VME Support by Richard Hirst ** ** 94/11/14 Andreas Schwab: put kernel at PAGESIZE ** 94/11/18 Andreas Schwab: remove identity mapping of STRAM for Atari @@ -18,6 +21,8 @@ ** 96/04/26 Guenther Kelleter: fixed identity mapping for Falcon with ** Magnum- and FX-alternate ram ** 98/04/25 Phil Blundell: added HP300 support +** 1998/08/30 David Kilzer: Added support for fbcon_font_desc structures +** for linux-2.1.115 ** ** This file is subject to the terms and conditions of the GNU General Public ** License. See the file README.legal in the main directory of this archive @@ -34,69 +39,275 @@ * Put us in supervisor state. * * The kernel setup code takes the following steps: - * Raise interrupt level - * Set up initial kernel memory mapping. - * This sets up a mapping of the 4M of memory the kernel - * is located in. It also does a mapping of any initial - * machine specific areas. - * Note that the kernel is located at virtual address 0x1000 == _start - * Enable cache memories - * Jump to kernel startup - * - * Register d6 contains the CPU flags and d4 the machine type - * from the boot_info information for most of this file. - * The upper word of d6 contains a bit for '040 or '060, since these two - * are quite similar for initial mm setup. Another bit in d6 allows - * distinction of the '060. The lower word of d6 contains the cache mode - * that should be applied to pages containing descriptors. This mode is - * non-cached/non-serialized for the '040 and cacheable/write-through for - * the '060. - * - * General register usage: - * a6 - start of unused memory - * new pages can be allocated from here - * a5 - mmu root table - * a4 - mmu pointer table - * a3 - mmu page tables - * a2 - points to the page table entry for a6 - * cache status can be changed (used for '0[46]0) - * you must increase a2 if alloc a new page - * d7 - used for debug output and some macros - * d6 - cpu type and cache mode - * d5 - physical start address of kernel - * d4 - machine type + * . Raise interrupt level + * . Set up initial kernel memory mapping. + * . This sets up a mapping of the 4M of memory the kernel is located in. + * . It also does a mapping of any initial machine specific areas. + * . Enable the MMU + * . Enable cache memories + * . Jump to kernel startup + * + * Much of the file restructuring was to accomplish: + * 1) Remove register dependency through-out the file. + * 2) Increase use of subroutines to perform functions + * 3) Increase readability of the code + * + * Of course, readability is a subjective issue, so it will never be + * argued that that goal was accomplished. It was merely a goal. + * A key way to help make code more readable is to give good + * documentation. So, the first thing you will find is exaustive + * write-ups on the structure of the file, and the features of the + * functional subroutines. + * + * General Structure: + * ------------------ + * Without a doubt the single largest chunk of head.S is spent + * mapping the kernel and I/O physical space into the logical range + * for the kernel. + * There are new subroutines and data structures to make MMU + * support cleaner and easier to understand. + * First, you will find a routine call "mmu_map" which maps + * a logical to a physical region for some length given a cache + * type on behalf of the caller. This routine makes writing the + * actual per-machine specific code very simple. + * A central part of the code, but not a subroutine in itself, + * is the mmu_init code which is broken down into mapping the kernel + * (the same for all machines) and mapping machine-specific I/O + * regions. + * Also, there will be a description of engaging the MMU and + * caches. + * You will notice that there is a chunk of code which + * can emit the entire MMU mapping of the machine. This is present + * only in debug modes and can be very helpful. + * Further, there is a new console driver in head.S that is + * also only engaged in debug mode. Currently, it's only supported + * on the Macintosh class of machines. However, it is hoped that + * others will plug-in support for specific machines. + * + * ###################################################################### + * + * mmu_map + * ------- + * mmu_map was written for two key reasons. First, it was clear + * that it was very difficult to read the previous code for mapping + * regions of memory. Second, the Macintosh required such extensive + * memory allocations that it didn't make sense to propogate the + * existing code any further. + * mmu_map requires some parameters: + * + * mmu_map (logical, physical, length, cache_type) + * + * While this essentially describes the function in the abstract, you'll + * find more indepth description of other parameters at the implementation site. + * + * mmu_get_root_table_entry + * ------------------------ + * mmu_get_ptr_table_entry + * ----------------------- + * mmu_get_page_table_entry + * ------------------------ + * + * These routines are used by other mmu routines to get a pointer into + * a table, if necessary a new table is allocated. These routines are working + * basically like pmd_alloc() and pte_alloc() in . The root + * table needs of course only to be allocated once in mmu_get_root_table_entry, + * so that here also some mmu specific initialization is done. The second page + * at the start of the kernel (the first page is unmapped later) is used for + * the kernel_pg_dir. It must be at a position known at link time (as it's used + * to initialize the init task struct) and since it needs special cache + * settings, it's the easiest to use this page, the rest of the page is used + * for further pointer tables. + * mmu_get_page_table_entry allocates always a whole page for page tables, this + * means 1024 pages and so 4MB of memory can be mapped. It doesn't make sense + * to manage page tables in smaller pieces as nearly all mappings have that + * size. + * + * ###################################################################### + * + * + * ###################################################################### + * + * mmu_engage + * ---------- + * Thanks to a small helping routine enabling the mmu got quiet simple + * and there is only one way left. mmu_engage makes a complete a new mapping + * that only includes the absolute necessary to be able to jump to the final + * postion and to restore the original mapping. + * As this code doesn't need a transparent translation register anymore this + * means all registers are free to be used by machines that needs them for + * other purposes. + * + * ###################################################################### + * + * mmu_print + * --------- + * This algorithm will print out the page tables of the system as + * appropriate for an 030 or an 040. This is useful for debugging purposes + * and as such is enclosed in #ifdef MMU_PRINT/#endif clauses. + * + * ###################################################################### + * + * console_init + * ------------ + * The console is also able to be turned off. The console in head.S + * is specifically for debugging and can be very useful. It is surrounded by + * #ifdef CONSOLE/#endif clauses so it doesn't have to ship in known-good + * kernels. It's basic algorithm is to determine the size of the screen + * (in height/width and bit depth) and then use that information for + * displaying an 8x8 font or an 8x16 (widthxheight). I prefer the 8x8 for + * debugging so I can see more good data. But it was trivial to add support + * for both fonts, so I included it. + * Also, the algorithm for plotting pixels is abstracted so that in + * theory other platforms could add support for different kinds of frame + * buffers. This could be very useful. + * + * console_put_penguin + * ------------------- + * An important part of any Linux bring up is the penguin and there's + * nothing like getting the Penguin on the screen! This algorithm will work + * on any machine for which there is a console_plot_pixel. + * + * console_scroll + * -------------- + * My hope is that the scroll algorithm does the right thing on the + * various platforms, but it wouldn't be hard to add the test conditions + * and new code if it doesn't. + * + * console_putc + * ------------- + * + * ###################################################################### + * + * Register usage has greatly simplified within head.S. Every subroutine + * saves and restores all registers that it modifies (except it returns a + * value in there of course). So the only register that needs to be initialized + * is the stack pointer. + * All other init code and data is now placed in the init section, so it will + * be automatically freed at the end of the kernel initialization. + * + * ###################################################################### + * + * options + * ------- + * There are many options availble in a build of this file. I've + * taken the time to describe them here to save you the time of searching + * for them and trying to understand what they mean. + * + * CONFIG_xxx: These are the obvious machine configuration defines created + * during configuration. These are defined in include/linux/autoconf.h. + * + * CONSOLE: There is support for head.S console in this file. This + * console can talk to a Mac frame buffer, but could easily be extrapolated + * to extend it to support other platforms. + * + * TEST_MMU: This is a test harness for running on any given machine but + * getting an MMU dump for another class of machine. The classes of machines + * that can be tested are any of the makes (Atari, Amiga, Mac, VME, etc.) + * and any of the models (030, 040, 060, etc.). + * + * NOTE: TEST_MMU is NOT permanent! It is scheduled to be removed + * When head.S boots on Atari, Amiga, Macintosh, and VME + * machines. At that point the underlying logic will be + * believed to be solid enough to be trusted, and TEST_MMU + * can be dropped. Do note that that will clean up the + * head.S code significantly as large blocks of #if/#else + * clauses can be removed. + * + * MMU_NOCACHE_KERNEL: On the Macintosh platform there was an inquiry into + * determing why devices don't appear to work. A test case was to remove + * the cacheability of the kernel bits. + * + * MMU_PRINT: There is a routine built into head.S that can display the + * MMU data structures. It outputs its result through the serial_putc + * interface. So where ever that winds up driving data, that's where the + * mmu struct will appear. On the Macintosh that's typically the console. + * + * SERIAL_DEBUG: There are a series of putc() macro statements + * scattered through out the code to give progress of status to the + * person sitting at the console. This constant determines whether those + * are used. + * + * DEBUG: This is the standard DEBUG flag that can be set for building + * the kernel. It has the effect adding additional tests into + * the code. + * + * FONT_6x11: + * FONT_8x8: + * FONT_8x16: + * In theory these could be determined at run time or handed + * over by the booter. But, let's be real, it's a fine hard + * coded value. (But, you will notice the code is run-time + * flexible!) A pointer to the font's struct fbcon_font_desc + * is kept locally in Lconsole_font. It is used to determine + * font size information dynamically. + * + * Atari constants: + * USE_PRINTER: Use the printer port for serial debug. + * USE_SCC_B: Use the SCC port A (Serial2) for serial debug. + * USE_SCC_A: Use the SCC port B (Modem2) for serial debug. + * USE_MFP: Use the ST-MFP port (Modem1) for serial debug. + * + * Macintosh constants: + * MAC_SERIAL_DEBUG: Turns on serial debug output for the Macintosh. + * MAC_USE_SCC_A: Use the SCC port A (modem) for serial debug. + * MAC_USE_SCC_B: Use the SCC port B (printer) for serial debug (default). */ #include #include +#include #include #include #include +#include "m68k_defs.h" -.globl SYMBOL_NAME(kernel_pg_dir), SYMBOL_NAME(kpt) -.globl SYMBOL_NAME(availmem) -.globl SYMBOL_NAME(m68k_pgtable_cachemode) -.globl SYMBOL_NAME(kernel_pmd_table), SYMBOL_NAME(swapper_pg_dir) +#ifdef CONFIG_MAC -#if defined(CONFIG_MVME16x) -.globl SYMBOL_NAME(mvme_bdid_ptr) -#endif +#include /* - * Added m68k_supervisor_cachemode for 68060 boards where some drivers - * need writethrough caching for supervisor accesses. Drivers known to - * be effected are 53c7xx.c and apricot.c (when used on VME boards). - * Richard Hirst. + * Macintosh console support */ -#ifdef CONFIG_060_WRITETHROUGH +#define CONSOLE + +/* + * Macintosh serial debug support; outputs boot info to the printer + * and/or modem serial ports + */ +#undef MAC_SERIAL_DEBUG + +/* + * Macintosh serial debug port selection; define one or both; + * requires MAC_SERIAL_DEBUG to be defined + */ +#define MAC_USE_SCC_A /* Macintosh modem serial port */ +#define MAC_USE_SCC_B /* Macintosh printer serial port */ + +#endif /* CONFIG_MAC */ + +#undef MMU_PRINT +#undef MMU_NOCACHE_KERNEL +#define SERIAL_DEBUG +#undef DEBUG + +/* + * For the head.S console, there are three supported fonts, 6x11, 8x16 and 8x8. + * The 8x8 font is harder to read but fits more on the screen. + */ +#define FONT_8x8 /* default */ +/* #define FONT_8x16 */ /* 2nd choice */ +/* #define FONT_6x11 */ /* 3rd choice */ + +.globl SYMBOL_NAME(kernel_pg_dir) +.globl SYMBOL_NAME(availmem) +.globl SYMBOL_NAME(m68k_pgtable_cachemode) .globl SYMBOL_NAME(m68k_supervisor_cachemode) -#endif -D6B_0460 = 16 /* indicates 680[46]0 in d6 */ -D6B_060 = 17 /* indicates 68060 in d6 */ -D6F_040 = 1< pointer table descriptor address - * a1 -> pointer table descriptor - * d1 -> counter - * d2 -> pointer table descriptor increment (varies according to CPU) + * This block of code does what's necessary to map in the various kinds + * of machines for execution of Linux. + * First map the first 4 MB of kernel code & data */ - /* clear the kernel pointer table */ - movel %a4,%a0 - moveq #PTR_TABLE_SIZE-1,%d1 -1: clrl %a0@+ - dbra %d1,1b - - movel %a4,%a0 - moveq #15,%d1 - - /* - * base value of pointer table descriptor is either - * the address of the first page table (680[46]0) - * or the base address of physical memory (68030). - */ - is_040_or_060(1f) - - /* 680[23]0 */ - movel %d5,%a1 /* base address */ - addql #_PAGE_PRESENT,%a1 /* descriptor type */ - movel #PAGE_TABLE_SIZE*PAGESIZE,%d2 /* increment */ - jra 2f - -1: /* 680[46]0 */ - movel %a6,%a3 /* base address */ - addw #PAGESIZE,%a6 /* allocate page for 16 page tables */ - lea %pc@(SYMBOL_NAME(kpt)),%a1 - movel %a3,%a1@ /* save address of page table */ - movel %a3,%a1 - addw #_PAGE_TABLE+_PAGE_ACCESSED,%a1 /* descriptor type */ - movel #PAGE_TABLE_SIZE<<2,%d2 /* increment */ - -2: movel %a1,%a0@+ - addl %d2,%a1 - dbra %d1,2b - - putc('D') - -/* - * If we are running on a 680[46]0, we have a kernel page table and - * must initialize it. Make the entries point to the first - * 4M of physical memory (the memory we are residing in). - * Set the cache mode bits to Cacheable, Copyback. Set the Global bits - * in the descriptors also. - */ - is_not_040_or_060(Lnot040) - - putc('F') - - movel %a3,%a0 - movel %d5,%a1 -#if defined(CONFIG_060_WRITETHROUGH) - addw #_PAGE_GLOBAL040+_PAGE_PRESENT+_PAGE_ACCESSED,%a1 - addl m68k_supervisor_cachemode,%a1 -#else - addw #_PAGE_GLOBAL040+_PAGE_CACHE040+_PAGE_PRESENT+_PAGE_ACCESSED,%a1 -#endif - movew #(PAGE_TABLE_SIZE*TABLENR_4MB)-1,%d1 - movel #PAGESIZE,%d2 -1: movel %a1,%a0@+ - addl %d2,%a1 - dbra %d1,1b - - /* - * on the 68040, pages used to hold mmu tables should - * be initialized as noncachable; the '060 allows write-through. - * Do this for the root table page (which also contains - * all pointer tables utilized thus far) and the - * kernel page table. - */ - movel %a5,%d0 - subl %d5,%d0 - moveq #PAGE_INDEX_SHIFT,%d2 - lsrl %d2,%d0 - lea %a3@(%d0:l:4),%a2 - movel %a2@,%d1 - andw #_CACHEMASK040,%d1 - orw %d6,%d1 - movel %d1,%a2@ + mmu_map #0,%pc@(L(phys_kernel_start)),#4*1024*1024,\ + %pc@(SYMBOL_NAME(m68k_supervisor_cachemode)) - movel %a3,%d0 - subl %d5,%d0 - lsrl %d2,%d0 - lea %a3@(%d0:l:4),%a2 - movel %a2@,%d1 - andw #_CACHEMASK040,%d1 - orw %d6,%d1 - movel %d1,%a2@+ - /* - * %a2 points now to the page table entry for available pages at %a6, - * hence caching modes for new pages can easily set unless increasing - * of %a2 are forgotten. - */ -Lnot040: + putc 'C' - leds(0x4) - -/* - * Do any machine specific page table initializations. - */ #ifdef CONFIG_AMIGA - is_not_amiga(Lnotami) +L(mmu_init_amiga): + + is_not_amiga(L(mmu_init_not_amiga)) /* - * Setup a mapping of the first 16M of physical address space at virtual - * address 0x80000000, using early termination page descriptors for the - * 68030, and proper page tables for the 680[46]0. Set this area as - * non-cacheable. + * mmu_init_amiga */ - putc('H') - - is_040_or_060(Lspami68040) - - /* - * for the 68030, just setup a translation to map in the first - * 32M of physical address space at virtual address 0x80000000 - * using an early termination page descriptor. - */ - - putc('I') - - movel #_PAGE_NOCACHE030+_PAGE_PRESENT+_PAGE_ACCESSED,%d0 - movel %d0,%a5@(0x40<<2) - - jra Lmapphys + putc 'D' -Lspami68040: + is_not_040_or_060(1f) /* - * for the 680[46]0, use another pointer table, and allocate 4 more - * page tables. Initialize the pointer table to point to the - * page tables. Then initialize the page tables to point to - * the first 16M of memory, with no caching (noncachable/serialized). + * 040: Map the 16Meg range physical 0x0 upto logical 0x8000.0000 */ + mmu_map #0x80000000,#0,#0x01000000,#_PAGE_NOCACHE_S - /* clear the amiga pointer table */ - lea %a4@(PTR_TABLE_SIZE<<2),%a4 - moveq #PTR_TABLE_SIZE-1,%d1 -1: clrl %a0@+ - dbra %d1,1b - - /* allocate 4 pages for 64 page tables */ - movel %a6,%a3 - addw #4*PAGESIZE,%a6 - - /* initialize the pointer table */ - movel %a4,%a0 - movel %a3,%a1 - addw #_PAGE_TABLE+_PAGE_ACCESSED,%a1 /* base descriptor */ - movel #PAGE_TABLE_SIZE<<2,%d2 /* increment */ - moveq #TABLENR_16MB-1,%d1 - -1: movel %a1,%a0@+ - addl %d2,%a1 - dbra %d1,1b - - /* ensure that the root table points to the pointer table */ - movel %a4,%a0 - addw #_PAGE_TABLE+_PAGE_ACCESSED,%a0 - movel %a0,%a5@(0x40<<2) + jbra L(mmu_init_done) +1: /* - * initialize the page tables - * descriptor bits include noncachable/serialized and global bits. + * 030: Map the 32Meg range physical 0x0 upto logical 0x8000.0000 */ - movel %a3,%a0 - movew #_PAGE_GLOBAL040+_PAGE_NOCACHE_S+_PAGE_PRESENT+_PAGE_ACCESSED,%a1 - movel #PAGESIZE,%d2 - movew #(PAGE_TABLE_SIZE*TABLENR_16MB)-1,%d1 - -1: movel %a1,%a0@+ - addl %d2,%a1 - dbra %d1,1b - - /* - * Finally, since we just allocated 4 page tables, make sure that - * the virtual mapping of the 4 page tables indicates - * noncachable/serialized. - */ - moveq #3,%d0 -1: movel %a2@,%d1 /* a2 already points to root table offset */ - andw #_CACHEMASK040,%d1 - orw %d6,%d1 - movel %d1,%a2@+ - dbra %d0,1b + mmu_map #0x80000000,#0,#0x02000000,#_PAGE_NOCACHE030 - jra Lmapphys + jbra L(mmu_init_done) -Lnotami: +L(mmu_init_not_amiga): #endif #ifdef CONFIG_ATARI - is_not_atari(Lnotatari) - move.w #PAGESIZE,%sp +L(mmu_init_atari): + + is_not_atari(L(mmu_init_not_atari)) + + putc 'E' /* On the Atari, we map the I/O region (phys. 0x00ffxxxx) by mapping the last 16 MB of virtual address space to the first 16 MB (i.e. @@ -591,103 +897,57 @@ /* I/O base addr for non-Medusa, non-Hades: 0x00000000 */ moveq #0,%d0 + movel %pc@(SYMBOL_NAME(atari_mch_type)),%d3 cmpl #ATARI_MACH_MEDUSA,%d3 jbeq 2f cmpl #ATARI_MACH_HADES,%d3 jbne 1f 2: movel #0xff000000,%d0 /* Medusa/Hades base addr: 0xff000000 */ 1: movel %d0,%d3 - - /* Let the root table point to the new pointer table */ - lea %a4@(PTR_TABLE_SIZE<<2),%a4 - movel %a4,%a0 - addw #_PAGE_TABLE+_PAGE_ACCESSED,%a0 - movel %a0,%a5@(0x7f<<2) /* 0xFE000000 - 0xFFFFFFFF */ - /* clear lower half of the pointer table (0xfexxxxxx) */ - movel %a4,%a0 - movel #(PTR_TABLE_SIZE/2)-1,%d2 -1: clrl %a0@+ - dbra %d2,1b - - is_040_or_060(Lspata68040) - -/* Mapping of the last 16M of virtual address space to the first 16M - for efficient addressing of hardware registers */ - movel #PAGE_TABLE_SIZE*PAGESIZE,%d1 - movel #(PTR_TABLE_SIZE/2)-1,%d2 - movel %d3,%d0 - orw #_PAGE_PRESENT+_PAGE_ACCESSED,%d0 -1: movel %d0,%a0@+ - addl %d1,%d0 - dbra %d2,1b - moveq #_PAGE_NOCACHE030,%d0 /* make non-cachable */ - addl %d0,%a4@(0x7f<<2) /* 0xFFFC0000-0xFFFFFFFF (I/O space) */ -/* GK: 0xFFF00000-0xFFF3FFFF (IDE-bus) has to be non-cachable too */ - addl %d0,%a4@(0x7c<<2) - - jra Lmapphys - -Lspata68040: - /* allocate 4 page tables */ - movel %a6,%a3 - addw #4*PAGESIZE,%a6 - - /* Initialize the upper half of the pointer table (a0 is still valid) */ - movel %a3,%a1 - addw #_PAGE_TABLE+_PAGE_ACCESSED,%a1 - movel #PAGE_TABLE_SIZE<<2,%d2 - moveq #TABLENR_16MB-1,%d1 -1: movel %a1,%a0@+ - addl %d2,%a1 - dbra %d1,1b - - /* Initialize the page tables as noncacheable/serialized! */ - movel %a3,%a0 - movel %d3,%a1 - addw #_PAGE_GLOBAL040+_PAGE_NOCACHE_S+_PAGE_PRESENT+_PAGE_ACCESSED,%a1 - movel #PAGESIZE,%d2 - movew #(PAGE_TABLE_SIZE*TABLENR_16MB)-1,%d1 -1: movel %a1,%a0@+ - addl %d2,%a1 - dbra %d1,1b + is_040_or_060(L(spata68040)) - /* - * Finally, since we just allocated 4 page tables, make sure that - * the virtual mapping of the 4 page tables indicates - * noncachable or write-through. - */ - moveq #3,%d0 -1: movel %a2@,%d1 /* a2 already points to root table offset */ - andw #_CACHEMASK040,%d1 - orw %d6,%d1 - movel %d1,%a2@+ - dbra %d0,1b + /* Map everything non-cacheable, though not all parts really + * need to disable caches (crucial only for 0xff8000..0xffffff + * (standard I/O) and 0xf00000..0xf3ffff (IDE)). The remainder + * isn't really used, except for sometimes peeking into the + * ROMs (mirror at phys. 0x0), so caching isn't necessary for + * this. */ + mmu_map #0xff000000,%d3,#0x01000000,#_PAGE_NOCACHE030 + + jbra L(mmu_init_done) + +L(spata68040): -Lnotatari: + mmu_map #0xff000000,%d3,#0x01000000,#_PAGE_NOCACHE_S + + jbra L(mmu_init_done) + +L(mmu_init_not_atari): #endif #ifdef CONFIG_HP300 - is_not_hp300(Lnothp300) + is_not_hp300(L(nothp300)) /* On the HP300, we map the ROM, INTIO and DIO regions (phys. 0x00xxxxxx) - by mapping 32MB from 0xf0xxxxxx -> 0x00xxxxxx) using an 030 early - termination page descriptor. The ROM mapping is needed because the LEDs + by mapping 32MB from 0xf0xxxxxx -> 0x00xxxxxx) using an 030 early + termination page descriptor. The ROM mapping is needed because the LEDs are mapped there too. */ - movel #_PAGE_NOCACHE030+_PAGE_PRESENT+_PAGE_ACCESSED,%d0 - movel %d0,%a5@(0x78<<2) + mmu_map #0xf0000000,#0,#0x02000000,#_PAGE_NOCACHE030 + +L(nothp300): -Lnothp300: - #endif -#if defined(CONFIG_MVME16x) - is_not_mvme16x(Lnot16x) +#ifdef CONFIG_MVME16x + + is_not_mvme16x(L(not16x)) /* Get pointer to board ID data */ movel %d2,%sp@- - .long 0x4e4f0070 /* trap 0x70 - .BRD_ID */ + trap #15 + .word 0x70 /* trap 0x70 - .BRD_ID */ movel %sp@+,%d2 lea %pc@(SYMBOL_NAME(mvme_bdid_ptr)),%a0 movel %d2,%a0@ @@ -696,415 +956,1542 @@ * On MVME16x we have already created kernel page tables for * 4MB of RAM at address 0, so now need to do a transparent * mapping of the top of memory space. Make it 0.5GByte for now. + * Supervisor only access, so transparent mapping doesn't + * clash with User code virtual address space. + * this covers IO devices, PROM and SRAM. The PROM and SRAM + * mapping is needed to allow 167Bug to run. + * IO is in the range 0xfff00000 to 0xfffeffff. + * PROM is 0xff800000->0xffbfffff and SRAM is + * 0xffe00000->0xffe1ffff. */ - movel #0xe01f0000,%d2 /* logical address base */ - orw #0xa040,%d2 /* add in magic bits */ - .long 0x4e7b2005 /* movec d2,ittr1 */ - .long 0x4e7b2007 /* movec d2,dttr1 */ + mmu_map_tt 1,#0xe0000000,#0x20000000,#_PAGE_NOCACHE_S -Lnot16x: -#endif + jbra L(mmu_init_done) + +L(not16x): +#endif /* CONFIG_MVME162 | CONFIG_MVME167 */ + +#ifdef CONFIG_BVME6000 -#if defined(CONFIG_BVME6000) - is_not_bvme6000(Lnotbvm) + is_not_bvme6000(L(not6000)) /* * On BVME6000 we have already created kernel page tables for * 4MB of RAM at address 0, so now need to do a transparent - * mapping of the top of memory space. Make it 0.5GByte for now. + * mapping of the top of memory space. Make it 0.5GByte for now, + * so we can access on-board i/o areas. + * Supervisor only access, so transparent mapping doesn't + * clash with User code virtual address space. */ - movel #0xe01f0000,%d2 /* logical address base */ - orw #0xa040,%d2 /* add in magic bits */ - .long 0x4e7b2005 /* movec d2,ittr1 */ - .long 0x4e7b2007 /* movec d2,dttr1 */ - .long 0x4e7b2004 /* movec d2,ittr0 */ - .long 0x4e7b2006 /* movec d2,dttr0 */ + mmu_map_tt 1,#0xe0000000,#0x20000000,#_PAGE_NOCACHE_S -Lnotbvm: -#endif + jbra L(mmu_init_done) + +L(not6000): +#endif /* CONFIG_BVME6000 */ /* - * Setup a transparent mapping of the physical memory we are executing in. + * mmu_init_mac + * + * The Macintosh mappings are less clear. + * + * Even as of this writing, it is unclear how the + * Macintosh mappings will be done. However, as + * the first author of this code I'm proposing the + * following model: + * + * Map the kernel (that's already done), + * Map the I/O (on most machines that's the + * 0x5000.0000 ... 0x5200.0000 range, + * Map the video frame buffer using as few pages + * as absolutely (this requirement mostly stems from + * the fact that when the frame buffer is at + * 0x0000.0000 then we know there is valid RAM just + * above the screen that we don't want to waste!). + * + * By the way, if the frame buffer is at 0x0000.0000 + * then the Macintosh is known as an RBV based Mac. * - * Only do this if the physical memory is not in the first 16M Meg, or not on - * an Amiga since the first 16M is already identity mapped on the Amiga. + * By the way 2, the code currently maps in a bunch of + * regions. But I'd like to cut that out. (And move most + * of the mappings up into the kernel proper ... or only + * map what's necessary.) */ -Lmapphys: - putc('J') - leds(0x8) -#ifdef CONFIG_AMIGA - is_not_amiga(Lmapphysnotamiga) +#ifdef CONFIG_MAC -/* - * The virtual address of the start of the kernel is 0x1000. We transparently - * translate the memory where we running in and can enable then the MMU. Hence - * we have now two locations of the kernel in memory and can jump to the final - * place. Except if the physical location is in the first 16MB, translation - * will overlap later virtual location, but as we already mapped the first - * 16MB to 0x80000000, we can jump there after translation and MMU is enabled - * and then we can switch off translation and go to the final place. - * On 020/030 we must emulate transparant translation, since 020 doesn't know - * it, but due to early termination pointer this is easy to do. - * When MMU is enabled, stack pointer and Lcustom will become again valid and - * stack points to the unused first page. - */ +L(mmu_init_mac): -/* - * Setup Supervisor Root Pointer register to point to page directory, - * setup translation register contents and enable translation. - */ - putc('K') + is_not_mac(L(mmu_init_not_mac)) - movew #PAGESIZE,%sp + putc 'F' - /* fixup the Amiga custom register location before printing */ - lea %pc@(Lcustom),%a0 - movel #0x80000000,%a0@ + lea %pc@(L(mac_videobase)),%a0 + lea %pc@(L(console_video_virtual)),%a1 + movel %a0@,%a1@ - is_040_or_060(Lamimmu68040) + is_not_040_or_060(1f) - moveq #ROOT_INDEX_SHIFT,%d2 - movel %d5,%d0 - lsrl %d2,%d0 - movel %d0,%d1 - lsll %d2,%d1 - orw #_PAGE_PRESENT+_PAGE_ACCESSED,%d1 - lsll #2,%d0 - movel %a5@(%d0:w),%d2 - movel %d1,%a5@(%d0:w) - lea %pc@(Lmmu),%a3 - /* no limit, 4byte descriptors */ - movel #0x80000002,%a3@ - movel %a5,%a3@(4) - pmove %a3@,%srp - pmove %a3@,%crp - pflusha + moveq #_PAGE_NOCACHE_S,%d3 + jbra 2f +1: + moveq #_PAGE_NOCACHE030,%d3 +2: /* - * enable,super root enable,4096 byte pages,7 bit root index, - * 7 bit pointer index, 6 bit page table index. + * Mac Note: screen address of logical 0xF000.0000 -> + * we simply map the 4MB that contains the videomem */ - movel #0x82c07760,%a3@ - pmove %a3@,%tc /* enable the MMU */ - tstl %d0 - jne 1f - jmp %pc@(2f+0x80000000) -1: jmp 2f:w -2: movel %d2,%a5@(%d0:w) - pflusha - jmp LdoneMMUenable:w -Lamimmu68040: + movel #VIDEOMEMMASK,%d0 + andl L(mac_videobase),%d0 - .chip 68040 - lea 2f:w,%a0 - movel %d5,%d0 - andl #0xff000000,%d0 - jne 1f - lea %pc@(2f+0x80000000),%a0 -1: orw #TTR_ENABLE+TTR_KERNELMODE+_PAGE_NOCACHE_S,%d0 - movec %d0,%itt0 - movec %a5,%urp - movec %a5,%srp - pflusha - movel #TC_ENABLE+TC_PAGE4K,%d0 - /* - * this value is also ok for the 68060, we don`t use the cache - * mode/protection defaults - */ - movec %d0,%tc /* enable the MMU */ - jmp %a0@ -2: moveq #0,%d0 - movec %d0,%itt0 - jmp LdoneMMUenable:w - .chip 68k + mmu_map #VIDEOMEMBASE,%d0,#VIDEOMEMSIZE,%d3 + mmu_map_eq #0x40800000,#0x02000000,%d3 /* rom ? */ + mmu_map_eq #0x50000000,#0x02000000,%d3 + mmu_map_eq #0x60000000,#0x00400000,%d3 + mmu_map_eq #0x9c000000,#0x00400000,%d3 + mmu_map_tt 1,#0xf8000000,#0x08000000,%d3 -Lmapphysnotamiga: + jbra L(mmu_init_done) + +L(mmu_init_not_mac): #endif -#ifdef CONFIG_ATARI - is_not_atari(Lmapphysnotatari) +L(mmu_init_done): + + putc 'G' + leds 0x8 /* - * If the kernel physical address is different from its virtual address, we - * will temporarily set up an identity mapping of the 16MB chunk with - * transparent translation where the kernel is executing. + * mmu_fixup + * + * On the 040 class machines, all pages that are used for the + * mmu have to be fixed up. According to Motorola, pages holding mmu + * tables should be non-cacheable on a '040 and write-through on a + * '060. But analysis of the reasons for this, and practical + * experience, showed that write-through also works on a '040. + * + * Allocated memory so far goes from kernel_end to memory_start that + * is used for all kind of tables, for that the cache attributes + * are now fixed. */ - putc('L') +L(mmu_fixup): - /* fixup the Atari iobase register location before printing */ - lea %pc@(Liobase),%a0 - movel #0xff000000,%a0@ + is_not_040_or_060(L(mmu_fixup_done)) - is_040_or_060(Latarimmu68040) +#ifdef MMU_NOCACHE_KERNEL + jbra L(mmu_fixup_done) +#endif - .chip 68030 - lea %pc@(Lmmu),%a3 - movel %d5,%d0 - jne 1f - lea LdoneMMUenable:w,%a0 - jra 3f -1: lea 4f:w,%a0 - andl #0xff000000,%d0 /* logical address base */ - jeq 2f - orw #TTR_ENABLE+TTR_CI+TTR_RWM+TTR_FCB2+TTR_FCM1+TTR_FCM0,%d0 - movel %d0,%a3@ - pmove %a3@,%tt0 - jra 3f - /* tt0 doesn't work if physical and virtual address of kernel is in - * the same 16M area (Falcon with Magnum/FX, kernel in alternate ram) - * Transparent translation through kernel pointer table - * Requires that this code until after MMU enabling lies in - * the 256K page around %d5 - */ -2: movel %a5@,%d1 - andw #0xfff0,%d1 - movel %d1,%a1 - movel %d5,%d1 - moveq #PTR_INDEX_SHIFT,%d0 - lsrl %d0,%d1 - lea %a1@(%d1:l:4),%a1 - movel %d5,%d1 - orw #_PAGE_PRESENT+_PAGE_ACCESSED,%d1 - movel %a1@,%d2 - movel %d1,%a1@ - lea 5f:w,%a0 - /* no limit, 4byte descriptors */ -3: movel #0x80000002,%a3@ - movel %a5,%a3@(4) - pmove %a3@,%srp - pmove %a3@,%crp - pflusha - /* - * enable,super root enable,4096 byte pages,7 bit root index, - * 7 bit pointer index, 6 bit page table index. - */ - movel #0x82c07760,%a3@ - pmove %a3@,%tc /* enable the MMU */ - jmp %a0@ -4: clrl %a3@ - pmove %a3@,%tt0 - jra LdoneMMUenable -5: movel %d2,%a1@ - jra LdoneMMUenable - .chip 68k - -Latarimmu68040: - .chip 68040 - movel %d5,%d0 - jne 1f - lea LdoneMMUenable:w,%a0 - jra 2f -1: lea 3f:w,%a0 - andl #0xff000000,%d0 /* logical address base */ - orw #TTR_ENABLE+TTR_KERNELMODE+_PAGE_NOCACHE_S,%d0 - movec %d0,%itt0 -2: nop - pflusha - movec %a5,%srp - movec %a5,%urp - movel #TC_ENABLE+TC_PAGE4K,%d0 - /* - * this value is also ok for the 68060, we don`t use the cache - * mode/protection defaults + /* first fix the page at the start of the kernel, that + * contains also kernel_pg_dir. */ - movec %d0,%tc /* enable the MMU */ - jmp %a0@ -3: moveq #0,%d0 - movec %d0,%itt0 - jra LdoneMMUenable - .chip 68k - -Lmapphysnotatari: -#endif + movel %pc@(L(phys_kernel_start)),%d0 + lea %pc@(SYMBOL_NAME(_stext)),%a0 + subl %d0,%a0 + mmu_fixup_page_mmu_cache %a0 -#if defined(CONFIG_MVME16x) - is_not_mvme16x(Lmapphysnot16x) - /* - * save physaddr of phys mem in register a3 - */ - moveq #'L',%d7 - jbsr Lserial_putc - - .word 0xf4d8 /* CINVA I/D */ - .word 0xf518 /* pflusha */ - .long 0x4e7bd807 /* movec a5,srp */ - .long 0x4e7bd806 /* movec a5,urp */ - movel #(TC_ENABLE+TC_PAGE4K),%d0 - .long 0x4e7b0003 /* movec d0,tc (enable the MMU) */ - jra LdoneMMUenable /* branch to continuation of startup */ + movel %pc@(L(kernel_end)),%a0 + subl %d0,%a0 + movel %pc@(L(memory_start)),%a1 + subl %d0,%a1 + bra 2f +1: + mmu_fixup_page_mmu_cache %a0 + addw #PAGESIZE,%a0 +2: + cmpl %a0,%a1 + jgt 1b -Lmapphysnot16x: +L(mmu_fixup_done): +#ifdef MMU_PRINT + mmu_print #endif -#if defined(CONFIG_HP300) - is_not_hp300(Lmapphysnothp300) - /* - * Physical RAM is at 0xff000000. We want to map the kernel at 0x00000000. - * In order to avoid disaster when we enable the MMU we need to make a - * transparent mapping of the RAM we're executing out of as well. + * mmu_engage + * + * This chunk of code performs the gruesome task of engaging the MMU. + * The reason its gruesome is because when the MMU becomes engaged it + * maps logical addresses to physical addresses. The Program Counter + * register is then passed through the MMU before the next instruction + * is fetched (the instruction following the engage MMU instruction). + * This may mean one of two things: + * 1. The Program Counter falls within the logical address space of + * the kernel of which there are two sub-possibilities: + * A. The PC maps to the correct instruction (logical PC == physical + * code location), or + * B. The PC does not map through and the processor will read some + * data (or instruction) which is not the logically next instr. + * As you can imagine, A is good and B is bad. + * Alternatively, + * 2. The Program Counter does not map through the MMU. The processor + * will take a Bus Error. + * Clearly, 2 is bad. + * It doesn't take a wiz kid to figure you want 1.A. + * This code creates that possibility. + * There are two possible 1.A. states (we now ignore the other above states): + * A. The kernel is located at physical memory addressed the same as + * the logical memory for the kernel, i.e., 0x01000. + * B. The kernel is located some where else. e.g., 0x0400.0000 + * + * Under some conditions the Macintosh can look like A or B. + * [A friend and I once noted that Apple hardware engineers should be + * wacked twice each day: once when they show up at work (as in, Whack!, + * "This is for the screwy hardware we know you're going to design today."), + * and also at the end of the day (as in, Whack! "I don't know what + * you designed today, but I'm sure it wasn't good."). -- rst] + * + * This code works on the following premise: + * If the kernel start (%d5) is within the first 16 Meg of RAM, + * then create a mapping for the kernel at logical 0x8000.0000 to + * the physical location of the pc. And, create a transparent + * translation register for the first 16 Meg. Then, after the MMU + * is engaged, the PC can be moved up into the 0x8000.0000 range + * and then the transparent translation can be turned off and then + * the PC can jump to the correct logical location and it will be + * home (finally). This is essentially the code that the Amiga used + * to use. Now, it's generalized for all processors. Which means + * that a fresh (but temporary) mapping has to be created. The mapping + * is made in page 0 (an as of yet unused location -- except for the + * stack!). This temporary mapping will only require 1 pointer table + * and a single page table (it can map 256K). + * + * OK, alternatively, imagine that the Program Counter is not within + * the first 16 Meg. Then, just use Transparent Translation registers + * to do the right thing. + * + * Last, if _start is already at 0x01000, then there's nothing special + * to do (in other words, in a degenerate case of the first case above, + * do nothing). + * + * Let's do it. + * + * */ - /* - * save physaddr of phys mem in register a3 - */ - .chip 68030 - lea %pc@(Lmmu),%a3 - movel %d5,%d0 - andl #0xff000000,%d0 /* logical address base */ - orw #TTR_ENABLE+TTR_CI+TTR_RWM+TTR_FCB2+TTR_FCM1+TTR_FCM0,%d0 - movel %d0,%a3@ - pmove %a3@,%tt0 - /* no limit, 4byte descriptors */ - movel #0x80000002,%a3@ - movel %a5,%a3@(4) - pmove %a3@,%srp - pmove %a3@,%crp - pflusha - /* - * enable,super root enable,4096 byte pages,7 bit root index, - * 7 bit pointer index, 6 bit page table index. - */ - movel #0x82c07760,%a3@ - pmove %a3@,%tc /* enable the MMU */ - jmp 1f -1: - .chip 68k + putc 'H' - /* - * Fix up the custom register to point to the new location of the LEDs. - */ - lea %pc@(Lcustom),%a1 - movel #0xf0000000,%a1@ + mmu_engage - /* - * Energise the FPU and caches. - */ - orl #0x64, 0xf05f400c - -Lmapphysnothp300: +#ifdef CONFIG_AMIGA + is_not_amiga(1f) + /* fixup the Amiga custom register location before printing */ + clrl L(custom) +1: +#endif +#ifdef CONFIG_ATARI + is_not_atari(1f) + /* fixup the Atari iobase register location before printing */ + movel #0xff000000,L(iobase) +1: +#endif + +#ifdef CONFIG_MAC + is_not_mac(1f) + movel #~VIDEOMEMMASK,%d0 + andl L(mac_videobase),%d0 + addl #VIDEOMEMBASE,%d0 + movel %d0,L(mac_videobase) +1: #endif -#if defined(CONFIG_BVME6000) - is_not_bvme6000(Lmapphysnotbvm) +#ifdef CONFIG_HP300 + is_not_hp300(1f) /* - * save physaddr of phys mem in register a3 + * Fix up the custom register to point to the new location of the LEDs. */ - moveq #'L',%d7 - jbsr Lserial_putc + movel #0xf0000000,L(custom) - .word 0xf4d8 /* CINVA I/D */ - .word 0xf518 /* pflusha */ - .long 0x4e7bd807 /* movec a5,srp */ - .long 0x4e7bd806 /* movec a5,urp */ - movel #(TC_ENABLE+TC_PAGE4K),%d0 /* - * this value is also ok for the 68060, we don`t use the cache - * mode/protection defaults + * Energise the FPU and caches. */ - .long 0x4e7b0003 /* movec d0,tc (enable the MMU) */ - jra LdoneMMUenable /* branch to continuation of startup */ - -Lmapphysnotbvm: - + movel #0x60,0xf05f400c +1: #endif -LdoneMMUenable: - /* * Fixup the addresses for the kernel pointer table and availmem. * Convert them from physical addresses to virtual addresses. */ - putc('M') - leds(0x10) + putc 'I' + leds 0x10 - /* - * d5 contains physaddr of kernel start - */ - subl %d5,SYMBOL_NAME(kpt) - - /* - * do the same conversion on the first available memory + /* do the same conversion on the first available memory * address (in a6). */ - subl %d5,%a6 - movel %a6,SYMBOL_NAME(availmem) /* first available memory address */ - - putc('N') + movel L(memory_start),%d0 + movel %d0,SYMBOL_NAME(availmem) /* * Enable caches */ - is_040_or_060(Lcache680460) - movel #CC3_ENABLE_DB+CC3_CLR_D+CC3_ENABLE_D+CC3_ENABLE_IB+CC3_CLR_I+CC3_ENABLE_I,%d0 - movec %d0,%cacr - jra 1f + is_not_040_or_060(L(cache_not_680460)) -Lcache680460: +L(cache680460): .chip 68040 + nop cpusha %bc - .chip 68k + nop - is_060(Lcache68060) + is_060(L(cache68060)) movel #CC6_ENABLE_D+CC6_ENABLE_I,%d0 /* MMU stuff works in copyback mode now, so enable the cache */ movec %d0,%cacr - jra 1f + jra L(cache_done) -Lcache68060: - .chip 68060 +L(cache68060): movel #CC6_ENABLE_D+CC6_ENABLE_I+CC6_ENABLE_SB+CC6_PUSH_DPI+CC6_ENABLE_B+CC6_CLRA_B,%d0 /* MMU stuff works in copyback mode now, so enable the cache */ movec %d0,%cacr /* enable superscalar dispatch in PCR */ moveq #1,%d0 + .chip 68060 movec %d0,%pcr + + jbra L(cache_done) +L(cache_not_680460): +L(cache68030): + .chip 68030 + movel #CC3_ENABLE_DB+CC3_CLR_D+CC3_ENABLE_D+CC3_ENABLE_IB+CC3_CLR_I+CC3_ENABLE_I,%d0 + movec %d0,%cacr + + jra L(cache_done) .chip 68k -1: +L(cache_done): + + putc 'J' /* * Setup initial stack pointer - * We need to get current loaded up with our first task... */ lea SYMBOL_NAME(init_task_union),%a2 - lea 8192(%a2),%sp + lea 0x2000(%a2),%sp /* jump to the kernel start */ - putr() - leds(0x55) + putc '\n' + leds 0x55 - subl %a6,%a6 /* clear a6 for gdb */ + subl %a6,%a6 /* clear a6 for gdb */ jbsr SYMBOL_NAME(start_kernel) -/* - * Find a tag record in the bootinfo structure - * The bootinfo structure is located right after the kernel bss - * Returns: d0: size (-1 if not found) - * a0: data pointer (end-of-records if not found) - */ -Lget_bi_record: - lea %pc@(SYMBOL_NAME(_end)),%a0 -1: tstw %a0@(BIR_tag) - jeq 3f - cmpw %a0@(BIR_tag),%d0 - jeq 2f - addw %a0@(BIR_size),%a0 - jra 1b -2: moveq #0,%d0 - movew %a0@(BIR_size),%d0 - lea %a0@(BIR_data),%a0 - rts -3: moveq #-1,%d0 - lea %a0@(BIR_size),%a0 - rts +/* + * Find a tag record in the bootinfo structure + * The bootinfo structure is located right after the kernel bss + * Returns: d0: size (-1 if not found) + * a0: data pointer (end-of-records if not found) + */ +func_start get_bi_record,%d1 + + movel ARG1,%d0 + lea %pc@(SYMBOL_NAME(_end)),%a0 +1: tstw %a0@(BIR_TAG) + jeq 3f + cmpw %a0@(BIR_TAG),%d0 + jeq 2f + addw %a0@(BIR_SIZE),%a0 + jra 1b +2: moveq #0,%d0 + movew %a0@(BIR_SIZE),%d0 + lea %a0@(BIR_DATA),%a0 + jra 4f +3: moveq #-1,%d0 + lea %a0@(BIR_SIZE),%a0 +4: +func_return get_bi_record + + +/* + * MMU Initialization Begins Here + * + * The structure of the MMU tables on the 68k machines + * is thus: + * Root Table + * Logical addresses are translated through + * a hierarchical translation mechanism where the high-order + * seven bits of the logical address (LA) are used as an + * index into the "root table." Each entry in the root + * table has a bit which specifies if it's a valid pointer to a + * pointer table. Each entry defines a 32KMeg range of memory. + * If an entry is invalid then that logical range of 32M is + * invalid and references to that range of memory (when the MMU + * is enabled) will fault. If the entry is valid, then it does + * one of two things. On 040/060 class machines, it points to + * a pointer table which then describes more finely the memory + * within that 32M range. On 020/030 class machines, a technique + * called "early terminating descriptors" are used. This technique + * allows an entire 32Meg to be described by a single entry in the + * root table. Thus, this entry in the root table, contains the + * physical address of the memory or I/O at the logical address + * which the entry represents and it also contains the necessary + * cache bits for this region. + * + * Pointer Tables + * Per the Root Table, there will be one or more + * pointer tables. Each pointer table defines a 32M range. + * Not all of the 32M range need be defined. Again, the next + * seven bits of the logical address are used an index into + * the pointer table to point to page tables (if the pointer + * is valid). There will undoubtedly be more than one + * pointer table for the kernel because each pointer table + * defines a range of only 32M. Valid pointer table entries + * point to page tables, or are early terminating entries + * themselves. + * + * Page Tables + * Per the Pointer Tables, each page table entry points + * to the physical page in memory that supports the logical + * address that translates to the particular index. + * + * In short, the Logical Address gets translated as follows: + * bits 31..26 - index into the Root Table + * bits 25..18 - index into the Pointer Table + * bits 17..12 - index into the Page Table + * bits 11..0 - offset into a particular 4K page + * + * The algorithms which follows do one thing: they abstract + * the MMU hardware. For example, there are three kinds of + * cache settings that are relevant. Either, memory is + * being mapped in which case it is either Kernel Code (or + * the RamDisk) or it is MMU data. On the 030, the MMU data + * option also describes the kernel. Or, I/O is being mapped + * in which case it has its own kind of cache bits. There + * are constants which abstract these notions from the code that + * actually makes the call to map some range of memory. + * + * + * + */ + +#ifdef MMU_PRINT +/* + * mmu_print + * + * This algorithm will print out the current MMU mappings. + * + * Input: + * %a5 points to the root table. Everything else is calculated + * from this. + */ + +#define mmu_next_valid 0 +#define mmu_start_logical 4 +#define mmu_next_logical 8 +#define mmu_start_physical 12 +#define mmu_next_physical 16 + +#define MMU_PRINT_INVALID -1 +#define MMU_PRINT_VALID 1 +#define MMU_PRINT_UNINITED 0 + +#define putZc(z,n) jbne 1f; putc z; jbra 2f; 1: putc n; 2: + +func_start mmu_print,%a0-%a6/%d0-%d7 + + movel %pc@(L(kernel_pgdir_ptr)),%a5 + lea %pc@(L(mmu_print_data)),%a0 + movel #MMU_PRINT_UNINITED,%a0@(mmu_next_valid) + + is_not_040_or_060(mmu_030_print) + +mmu_040_print: + puts "\nMMU040\n" + puts "rp:" + putn %a5 + putc '\n' +#if 0 + /* + * The following #if/#endif block is a tight algorithm for dumping the 040 + * MMU Map in gory detail. It really isn't that practical unless the + * MMU Map algorithm appears to go awry and you need to debug it at the + * entry per entry level. + */ + movel #ROOT_TABLE_SIZE,%d5 +#if 0 + movel %a5@+,%d7 | Burn an entry to skip the kernel mappings, + subql #1,%d5 | they (might) work +#endif +1: tstl %d5 + jbeq mmu_print_done + subq #1,%d5 + movel %a5@+,%d7 + btst #1,%d7 + jbeq 1b + +2: putn %d7 + andil #0xFFFFFE00,%d7 + movel %d7,%a4 + movel #PTR_TABLE_SIZE,%d4 + putc ' ' +3: tstl %d4 + jbeq 11f + subq #1,%d4 + movel %a4@+,%d7 + btst #1,%d7 + jbeq 3b + +4: putn %d7 + andil #0xFFFFFF00,%d7 + movel %d7,%a3 + movel #PAGE_TABLE_SIZE,%d3 +5: movel #8,%d2 +6: tstl %d3 + jbeq 31f + subq #1,%d3 + movel %a3@+,%d6 + btst #0,%d6 + jbeq 6b +7: tstl %d2 + jbeq 8f + subq #1,%d2 + putc ' ' + jbra 91f +8: putc '\n' + movel #8+1+8+1+1,%d2 +9: putc ' ' + dbra %d2,9b + movel #7,%d2 +91: putn %d6 + jbra 6b + +31: putc '\n' + movel #8+1,%d2 +32: putc ' ' + dbra %d2,32b + jbra 3b + +11: putc '\n' + jbra 1b +#endif /* MMU 040 Dumping code that's gory and detailed */ + + lea %pc@(SYMBOL_NAME(kernel_pg_dir)),%a5 + movel %a5,%a0 /* a0 has the address of the root table ptr */ + movel #0x00000000,%a4 /* logical address */ + moveql #0,%d0 +40: + /* Increment the logical address and preserve in d5 */ + movel %a4,%d5 + addil #PAGESIZE<<13,%d5 + movel %a0@+,%d6 + btst #1,%d6 + jbne 41f + jbsr mmu_print_tuple_invalidate + jbra 48f +41: + movel #0,%d1 + andil #0xfffffe00,%d6 + movel %d6,%a1 +42: + movel %a4,%d5 + addil #PAGESIZE<<6,%d5 + movel %a1@+,%d6 + btst #1,%d6 + jbne 43f + jbsr mmu_print_tuple_invalidate + jbra 47f +43: + movel #0,%d2 + andil #0xffffff00,%d6 + movel %d6,%a2 +44: + movel %a4,%d5 + addil #PAGESIZE,%d5 + movel %a2@+,%d6 + btst #0,%d6 + jbne 45f + jbsr mmu_print_tuple_invalidate + jbra 46f +45: + moveml %d0-%d1,%sp@- + movel %a4,%d0 + movel %d6,%d1 + andil #0xfffff4e0,%d1 + lea %pc@(mmu_040_print_flags),%a6 + jbsr mmu_print_tuple + moveml %sp@+,%d0-%d1 +46: + movel %d5,%a4 + addq #1,%d2 + cmpib #64,%d2 + jbne 44b +47: + movel %d5,%a4 + addq #1,%d1 + cmpib #128,%d1 + jbne 42b +48: + movel %d5,%a4 /* move to the next logical address */ + addq #1,%d0 + cmpib #128,%d0 + jbne 40b + + .chip 68040 + movec %dtt1,%d0 + movel %d0,%d1 + andiw #0x8000,%d1 /* is it valid ? */ + jbeq 1f /* No, bail out */ + + movel %d0,%d1 + andil #0xff000000,%d1 /* Get the address */ + putn %d1 + puts "==" + putn %d1 + + movel %d0,%d6 + jbsr mmu_040_print_flags_tt +1: + movec %dtt0,%d0 + movel %d0,%d1 + andiw #0x8000,%d1 /* is it valid ? */ + jbeq 1f /* No, bail out */ + + movel %d0,%d1 + andil #0xff000000,%d1 /* Get the address */ + putn %d1 + puts "==" + putn %d1 + + movel %d0,%d6 + jbsr mmu_040_print_flags_tt +1: + .chip 68k + + jbra mmu_print_done + +mmu_040_print_flags: + btstl #10,%d6 + putZc(' ','G') /* global bit */ + btstl #7,%d6 + putZc(' ','S') /* supervisor bit */ +mmu_040_print_flags_tt: + btstl #6,%d6 + jbne 3f + putc 'C' + btstl #5,%d6 + putZc('w','c') /* write through or copy-back */ + jbra 4f +3: + putc 'N' + btstl #5,%d6 + putZc('s',' ') /* serialized non-cacheable, or non-cacheable */ +4: + rts + +mmu_030_print_flags: + btstl #6,%d6 + putZc('C','I') /* write through or copy-back */ + rts + +mmu_030_print: + puts "\nMMU030\n" + puts "\nrp:" + putn %a5 + putc '\n' + movel %a5,%d0 + andil #0xfffffff0,%d0 + movel %d0,%a0 + movel #0x00000000,%a4 /* logical address */ + movel #0,%d0 +30: + movel %a4,%d5 + addil #PAGESIZE<<13,%d5 + movel %a0@+,%d6 + btst #1,%d6 /* is it a ptr? */ + jbne 31f /* yes */ + btst #0,%d6 /* is it early terminating? */ + jbeq 1f /* no */ + jbsr mmu_030_print_helper + jbra 38f +1: + jbsr mmu_print_tuple_invalidate + jbra 38f +31: + movel #0,%d1 + andil #0xfffffff0,%d6 + movel %d6,%a1 +32: + movel %a4,%d5 + addil #PAGESIZE<<6,%d5 + movel %a1@+,%d6 + btst #1,%d6 + jbne 33f + btst #0,%d6 + jbeq 1f /* no */ + jbsr mmu_030_print_helper + jbra 37f +1: + jbsr mmu_print_tuple_invalidate + jbra 37f +33: + movel #0,%d2 + andil #0xfffffff0,%d6 + movel %d6,%a2 +34: + movel %a4,%d5 + addil #PAGESIZE,%d5 + movel %a2@+,%d6 + btst #0,%d6 + jbne 35f + jbsr mmu_print_tuple_invalidate + jbra 36f +35: + jbsr mmu_030_print_helper +36: + movel %d5,%a4 + addq #1,%d2 + cmpib #64,%d2 + jbne 34b +37: + movel %d5,%a4 + addq #1,%d1 + cmpib #128,%d1 + jbne 32b +38: + movel %d5,%a4 /* move to the next logical address */ + addq #1,%d0 + cmpib #128,%d0 + jbne 30b + +mmu_print_done: + puts "\n\n" + +func_return mmu_print + + +mmu_030_print_helper: + moveml %d0-%d1,%sp@- + movel %a4,%d0 + movel %d6,%d1 + lea %pc@(mmu_030_print_flags),%a6 + jbsr mmu_print_tuple + moveml %sp@+,%d0-%d1 + rts + +mmu_print_tuple_invalidate: + moveml %a0/%d7,%sp@- + + lea %pc@(L(mmu_print_data)),%a0 + tstl %a0@(mmu_next_valid) + jbmi mmu_print_tuple_invalidate_exit + + movel #MMU_PRINT_INVALID,%a0@(mmu_next_valid) + + putn %a4 + + puts "##\n" + +mmu_print_tuple_invalidate_exit: + moveml %sp@+,%a0/%d7 + rts + + +mmu_print_tuple: + moveml %d0-%d7/%a0,%sp@- + + lea %pc@(L(mmu_print_data)),%a0 + + tstl %a0@(mmu_next_valid) + jble mmu_print_tuple_print + + cmpl %a0@(mmu_next_physical),%d1 + jbeq mmu_print_tuple_increment + +mmu_print_tuple_print: + putn %d0 + puts "->" + putn %d1 + + movel %d1,%d6 + jbsr %a6@ + +mmu_print_tuple_record: + movel #MMU_PRINT_VALID,%a0@(mmu_next_valid) + + movel %d1,%a0@(mmu_next_physical) + +mmu_print_tuple_increment: + movel %d5,%d7 + subl %a4,%d7 + addl %d7,%a0@(mmu_next_physical) + +mmu_print_tuple_exit: + moveml %sp@+,%d0-%d7/%a0 + rts + +mmu_print_machine_cpu_types: + puts "machine: " + + is_not_amiga(1f) + puts "amiga" + jbra 9f +1: + is_not_atari(2f) + puts "atari" + jbra 9f +2: + is_not_mac(3f) + puts "macintosh" + jbra 9f +3: puts "unknown" +9: putc '\n' + + puts "cputype: 0" + is_not_060(1f) + putc '6' + jbra 9f +1: + is_not_040_or_060(2f) + putc '4' + jbra 9f +2: putc '3' +9: putc '0' + putc '\n' + + rts +#endif /* MMU_PRINT */ + +/* + * mmu_map_tt + * + * This is a specific function which works on all 680x0 machines. + * On 030, 040 & 060 it will attempt to use Transparent Translation + * registers (tt1). + * On 020 it will call the standard mmu_map which will use early + * terminating descriptors. + */ +func_start mmu_map_tt,%d0/%d1/%a0,4 + + dputs "mmu_map_tt:" + dputn ARG1 + dputn ARG2 + dputn ARG3 + dputn ARG4 + dputc '\n' + + is_020(L(do_map)) + + /* Extract the highest bit set + */ + bfffo ARG3{#0,#32},%d1 + cmpw #8,%d0 + jcc L(do_map) + + /* And get the mask + */ + moveq #-1,%d0 + lsrl %d1,%d0 + lsrl #1,%d0 + + /* Mask the address + */ + movel %d0,%d1 + notl %d1 + andl ARG2,%d1 + + /* Generate the upper 16bit of the tt register + */ + lsrl #8,%d0 + orl %d0,%d1 + clrw %d1 + + is_040_or_060(L(mmu_map_tt_040)) + + /* set 030 specific bits (read/write access for supervisor mode + * (highest function code set, lower two bits masked)) + */ + orw #TTR_ENABLE+TTR_RWM+TTR_FCB2+TTR_FCM1+TTR_FCM0,%d1 + movel ARG4,%d0 + btst #6,%d0 + jeq 1f + orw #TTR_CI,%d1 + +1: lea STACK,%a0 + dputn %d1 + movel %d1,%a0@ + .chip 68030 + tstl ARG1 + jne 1f + pmove %a0@,%tt0 + jra 2f +1: pmove %a0@,%tt1 +2: .chip 68k + jra L(mmu_map_tt_done) + + /* set 040 specific bits + */ +L(mmu_map_tt_040): + orw #TTR_ENABLE+TTR_KERNELMODE,%d1 + orl ARG4,%d1 + dputn %d1 + + .chip 68040 + tstl ARG1 + jne 1f + movec %d1,%itt0 + movec %d1,%dtt0 + jra 2f +1: movec %d1,%itt1 + movec %d1,%dtt1 +2: .chip 68k + + jra L(mmu_map_tt_done) + +L(do_map): + mmu_map_eq ARG2,ARG3,ARG4 + +L(mmu_map_tt_done): + +func_return mmu_map_tt + +/* + * mmu_map + * + * This routine will map a range of memory using a pointer + * table and allocating the pages on the fly from the kernel. + * The pointer table does not have to be already linked into + * the root table, this routine will do that if necessary. + * + * NOTE + * This routine will assert failure and use the serial_putc + * routines in the case of a run-time error. For example, + * if the address is already mapped. + * + * NOTE-2 + * This routine will use early terminating descriptors + * where possible for the 68020+68851 and 68030 type + * processors. + */ +func_start mmu_map,%d0-%d4/%a0-%a4 + + dputs "\nmmu_map:" + dputn ARG1 + dputn ARG2 + dputn ARG3 + dputn ARG4 + dputc '\n' + + /* Get logical address and round it down to 256KB + */ + movel ARG1,%d0 + andl #-(PAGESIZE*PAGE_TABLE_SIZE),%d0 + movel %d0,%a3 + + /* Get the end address + */ + movel ARG1,%a4 + addl ARG3,%a4 + subql #1,%a4 + + /* Get physical address and round it down to 256KB + */ + movel ARG2,%d0 + andl #-(PAGESIZE*PAGE_TABLE_SIZE),%d0 + movel %d0,%a2 + + /* Add page attributes to the physical address + */ + movel ARG4,%d0 + orw #_PAGE_PRESENT+_PAGE_ACCESSED+_PAGE_DIRTY,%d0 + addw %d0,%a2 + + dputn %a2 + dputn %a3 + dputn %a4 + + is_not_040_or_060(L(mmu_map_030)) + + addw #_PAGE_GLOBAL040,%a2 +/* + * MMU 040 & 060 Support + * + * The MMU usage for the 040 and 060 is different enough from + * the 030 and 68851 that there is separate code. This comment + * block describes the data structures and algorithms built by + * this code. + * + * The 040 does not support early terminating descriptors, as + * the 030 does. Therefore, a third level of table is needed + * for the 040, and that would be the page table. In Linux, + * page tables are allocated directly from the memory above the + * kernel. + * + */ + +L(mmu_map_040): + /* Calculate the offset into the root table + */ + movel %a3,%d0 + moveq #ROOT_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + mmu_get_root_table_entry %d0 + + /* Calculate the offset into the pointer table + */ + movel %a3,%d0 + moveq #PTR_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + andl #PTR_TABLE_SIZE-1,%d0 + mmu_get_ptr_table_entry %a0,%d0 + + /* Calculate the offset into the page table + */ + movel %a3,%d0 + moveq #PAGE_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + andl #PAGE_TABLE_SIZE-1,%d0 + mmu_get_page_table_entry %a0,%d0 + + /* The page table entry must not no be busy + */ + tstl %a0@ + jne L(mmu_map_error) + + /* Do the mapping and advance the pointers + */ + movel %a2,%a0@ +2: + addw #PAGESIZE,%a2 + addw #PAGESIZE,%a3 + + /* Ready with mapping? + */ + lea %a3@(-1),%a0 + cmpl %a0,%a4 + jhi L(mmu_map_040) + jra L(mmu_map_done) + +L(mmu_map_030): + /* Calculate the offset into the root table + */ + movel %a3,%d0 + moveq #ROOT_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + mmu_get_root_table_entry %d0 + + /* Check if logical address 32MB aligned, + * so we can try to map it once + */ + movel %a3,%d0 + andl #(PTR_TABLE_SIZE*PAGE_TABLE_SIZE*PAGESIZE-1)&(-ROOT_TABLE_SIZE),%d0 + jne 1f + + /* Is there enough to map for 32MB at once + */ + lea %a3@(PTR_TABLE_SIZE*PAGE_TABLE_SIZE*PAGESIZE-1),%a1 + cmpl %a1,%a4 + jcs 1f + + addql #1,%a1 + + /* The root table entry must not no be busy + */ + tstl %a0@ + jne L(mmu_map_error) + + /* Do the mapping and advance the pointers + */ + dputs "early term1" + dputn %a2 + dputn %a3 + dputn %a1 + dputc '\n' + movel %a2,%a0@ + + movel %a1,%a3 + lea %a2@(PTR_TABLE_SIZE*PAGE_TABLE_SIZE*PAGESIZE),%a2 + jra L(mmu_mapnext_030) +1: + /* Calculate the offset into the pointer table + */ + movel %a3,%d0 + moveq #PTR_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + andl #PTR_TABLE_SIZE-1,%d0 + mmu_get_ptr_table_entry %a0,%d0 + + /* The pointer table entry must not no be busy + */ + tstl %a0@ + jne L(mmu_map_error) + + /* Do the mapping and advance the pointers + */ + dputs "early term2" + dputn %a2 + dputn %a3 + dputc '\n' + movel %a2,%a0@ + + addl #PAGE_TABLE_SIZE*PAGESIZE,%a2 + addl #PAGE_TABLE_SIZE*PAGESIZE,%a3 + +L(mmu_mapnext_030): + /* Ready with mapping? + */ + lea %a3@(-1),%a0 + cmpl %a0,%a4 + jhi L(mmu_map_030) + jra L(mmu_map_done) + +L(mmu_map_error): + + dputs "mmu_map error:" + dputn %a2 + dputn %a3 + dputc '\n' + +L(mmu_map_done): + +func_return mmu_map + +/* + * mmu_fixup + * + * On the 040 class machines, all pages that are used for the + * mmu have to be fixed up. + */ + +func_start mmu_fixup_page_mmu_cache,%d0/%a0 + + dputs "mmu_fixup_page_mmu_cache" + dputn ARG1 + + /* Calculate the offset into the root table + */ + movel ARG1,%d0 + moveq #ROOT_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + mmu_get_root_table_entry %d0 + + /* Calculate the offset into the pointer table + */ + movel ARG1,%d0 + moveq #PTR_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + andl #PTR_TABLE_SIZE-1,%d0 + mmu_get_ptr_table_entry %a0,%d0 + + /* Calculate the offset into the page table + */ + movel ARG1,%d0 + moveq #PAGE_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + andl #PAGE_TABLE_SIZE-1,%d0 + mmu_get_page_table_entry %a0,%d0 + + movel %a0@,%d0 + andil #_CACHEMASK040,%d0 + orl %pc@(SYMBOL_NAME(m68k_pgtable_cachemode)),%d0 + movel %d0,%a0@ + + dputc '\n' + +func_return mmu_fixup_page_mmu_cache + +/* + * mmu_temp_map + * + * create a temporary mapping to enable the mmu, + * this we don't need any transparation translation tricks. + */ + +func_start mmu_temp_map,%d0/%d1/%a0/%a1 + + dputs "mmu_temp_map" + dputn ARG1 + dputn ARG2 + dputc '\n' + + lea %pc@(L(temp_mmap_mem)),%a1 + + /* Calculate the offset in the root table + */ + movel ARG2,%d0 + moveq #ROOT_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + mmu_get_root_table_entry %d0 + + /* Check if the table is temporary allocated, so we have to reuse it + */ + movel %a0@,%d0 + cmpl %pc@(L(memory_start)),%d0 + jcc 1f + + /* Temporary allocate a ptr table and insert it into the root table + */ + movel %a1@,%d0 + addl #PTR_TABLE_SIZE*4,%a1@ + orw #_PAGE_TABLE+_PAGE_ACCESSED,%d0 + movel %d0,%a0@ + dputs " (new)" +1: + dputn %d0 + /* Mask the root table entry for the ptr table + */ + andw #-ROOT_TABLE_SIZE,%d0 + movel %d0,%a0 + + /* Calculate the offset into the pointer table + */ + movel ARG2,%d0 + moveq #PTR_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + andl #PTR_TABLE_SIZE-1,%d0 + lea %a0@(%d0*4),%a0 + dputn %a0 + + /* Check if a temporary page table is already allocated + */ + movel %a0@,%d0 + jne 1f + + /* Temporary allocate a page table and insert it into the ptr table + */ + movel %a1@,%d0 + addl #PTR_TABLE_SIZE*4,%a1@ + orw #_PAGE_TABLE+_PAGE_ACCESSED,%d0 + movel %d0,%a0@ + dputs " (new)" +1: + dputn %d0 + /* Mask the ptr table entry for the page table + */ + andw #-PTR_TABLE_SIZE,%d0 + movel %d0,%a0 + + /* Calculate the offset into the page table + */ + movel ARG2,%d0 + moveq #PAGE_INDEX_SHIFT,%d1 + lsrl %d1,%d0 + andl #PAGE_TABLE_SIZE-1,%d0 + lea %a0@(%d0*4),%a0 + dputn %a0 + + /* Insert the address into the page table + */ + movel ARG1,%d0 + andw #-PAGESIZE,%d0 + orw #_PAGE_PRESENT+_PAGE_ACCESSED+_PAGE_DIRTY,%d0 + movel %d0,%a0@ + dputn %d0 + + dputc '\n' + +func_return mmu_temp_map + +func_start mmu_engage,%d0-%d2/%a0-%a3 + + moveq #ROOT_TABLE_SIZE-1,%d0 + /* Temporarily use a different root table. */ + lea %pc@(L(kernel_pgdir_ptr)),%a0 + movel %a0@,%a2 + movel %pc@(L(memory_start)),%a1 + movel %a1,%a0@ + movel %a2,%a0 +1: + movel %a0@+,%a1@+ + dbra %d0,1b + + lea %pc@(L(temp_mmap_mem)),%a0 + movel %a1,%a0@ + + movew #PAGESIZE-1,%d0 +1: + clrl %a1@+ + dbra %d0,1b + + lea %pc@(1b),%a0 + movel #1b,%a1 + /* Skip temp mappings if phys == virt */ + cmpl %a0,%a1 + jeq 1f + + mmu_temp_map %a0,%a0 + mmu_temp_map %a0,%a1 + + addw #PAGESIZE,%a0 + addw #PAGESIZE,%a1 + mmu_temp_map %a0,%a0 + mmu_temp_map %a0,%a1 +1: + movel %pc@(L(memory_start)),%a3 + movel %pc@(L(phys_kernel_start)),%d2 + + is_not_040_or_060(L(mmu_engage_030)) + +L(mmu_engage_040): + .chip 68040 + nop + cinva %bc + nop + pflusha + nop + movec %a3,%srp + movel #TC_ENABLE+TC_PAGE4K,%d0 + movec %d0,%tc /* enable the MMU */ + jmp 1f:l +1: nop + movec %a2,%srp + nop + cinva %bc + nop + pflusha + .chip 68k + jra L(mmu_engage_cleanup) + +L(mmu_engage_030_temp): + .space 12 +L(mmu_engage_030): + .chip 68030 + lea %pc@(L(mmu_engage_030_temp)),%a0 + movel #0x80000002,%a0@ + movel %a3,%a0@(4) + movel #0x0808,%d0 + movec %d0,%cacr + pmove %a0@,%srp + pflusha + /* + * enable,super root enable,4096 byte pages,7 bit root index, + * 7 bit pointer index, 6 bit page table index. + */ + movel #0x82c07760,%a0@(8) + pmove %a0@(8),%tc /* enable the MMU */ + jmp 1f:l +1: movel %a2,%a0@(4) + movel #0x0808,%d0 + movec %d0,%cacr + pmove %a0@,%srp + pflusha + .chip 68k + +L(mmu_engage_cleanup): + subl %d2,%a2 + movel %a2,L(kernel_pgdir_ptr) + subl %d2,%fp + subl %d2,%sp + subl %d2,ARG0 + subl %d2,L(memory_start) + +func_return mmu_engage + +func_start mmu_get_root_table_entry,%d0/%a1 + +#if 0 + dputs "mmu_get_root_table_entry:" + dputn ARG1 + dputs " =" +#endif + + movel %pc@(L(kernel_pgdir_ptr)),%a0 + tstl %a0 + jne 2f + + dputs "\nmmu_init:" + + /* Find the start of free memory, get_bi_record does this for us, + * as the bootinfo structure is located directly behind the kernel + * and and we simply search for the last entry. + */ + get_bi_record BI_LAST + addw #PAGESIZE-1,%a0 + movel %a0,%d0 + andw #-PAGESIZE,%d0 + + dputn %d0 + + lea %pc@(L(memory_start)),%a0 + movel %d0,%a0@ + lea %pc@(L(kernel_end)),%a0 + movel %d0,%a0@ + + /* we have to return the first page at _stext since the init code + * in mm/init.c simply expects kernel_pg_dir there, the rest of + * page is used for further ptr tables in get_ptr_table. + */ + lea %pc@(SYMBOL_NAME(_stext)),%a0 + lea %pc@(L(mmu_cached_pointer_tables)),%a1 + movel %a0,%a1@ + addl #ROOT_TABLE_SIZE*4,%a1@ + + lea %pc@(L(mmu_num_pointer_tables)),%a1 + addql #1,%a1@ + + /* clear the page + */ + movel %a0,%a1 + movew #PAGESIZE/4-1,%d0 +1: + clrl %a1@+ + dbra %d0,1b + + lea %pc@(L(kernel_pgdir_ptr)),%a1 + movel %a0,%a1@ + + dputn %a0 + dputc '\n' +2: + movel ARG1,%d0 + lea %a0@(%d0*4),%a0 + +#if 0 + dputn %a0 + dputc '\n' +#endif + +func_return mmu_get_root_table_entry + + + +func_start mmu_get_ptr_table_entry,%d0/%a1 + +#if 0 + dputs "mmu_get_ptr_table_entry:" + dputn ARG1 + dputn ARG2 + dputs " =" +#endif + + movel ARG1,%a0 + movel %a0@,%d0 + jne 2f + + /* Keep track of the number of pointer tables we use + */ + dputs "\nmmu_get_new_ptr_table:" + lea %pc@(L(mmu_num_pointer_tables)),%a0 + movel %a0@,%d0 + addql #1,%a0@ + + /* See if there is a free pointer table in our cache of pointer tables + */ + lea %pc@(L(mmu_cached_pointer_tables)),%a1 + andw #7,%d0 + jne 1f + + /* Get a new pointer table page from above the kernel memory + */ + get_new_page + movel %a0,%a1@ +1: + /* There is an unused pointer table in our cache... use it + */ + movel %a1@,%d0 + addl #PTR_TABLE_SIZE*4,%a1@ + + dputn %d0 + dputc '\n' + + /* Insert the new pointer table into the root table + */ + movel ARG1,%a0 + orw #_PAGE_TABLE+_PAGE_ACCESSED,%d0 + movel %d0,%a0@ +2: + /* Extract the pointer table entry + */ + andw #-PTR_TABLE_SIZE,%d0 + movel %d0,%a0 + movel ARG2,%d0 + lea %a0@(%d0*4),%a0 + +#if 0 + dputn %a0 + dputc '\n' +#endif + +func_return mmu_get_ptr_table_entry + + +func_start mmu_get_page_table_entry,%d0/%a1 + +#if 0 + dputs "mmu_get_page_table_entry:" + dputn ARG1 + dputn ARG2 + dputs " =" +#endif + + movel ARG1,%a0 + movel %a0@,%d0 + jne 2f + + /* If the page table entry doesn't exist, we allocate a complete new + * page and use it as one continues big page table which can cover + * 4MB of memory, nearly almost all mappings have that alignment. + */ + get_new_page + addw #_PAGE_TABLE+_PAGE_ACCESSED,%a0 + + /* align pointer table entry for a page of page tables + */ + movel ARG1,%d0 + andw #-(PAGESIZE/PAGE_TABLE_SIZE),%d0 + movel %d0,%a1 + + /* Insert the page tables into the pointer entries + */ + moveq #PAGESIZE/PAGE_TABLE_SIZE/4-1,%d0 +1: + movel %a0,%a1@+ + lea %a0@(PAGE_TABLE_SIZE*4),%a0 + dbra %d0,1b + + /* Now we can get the initialized pointer table entry + */ + movel ARG1,%a0 + movel %a0@,%d0 +2: + /* Extract the page table entry + */ + andw #-PAGE_TABLE_SIZE,%d0 + movel %d0,%a0 + movel ARG2,%d0 + lea %a0@(%d0*4),%a0 + +#if 0 + dputn %a0 + dputc '\n' +#endif + +func_return mmu_get_page_table_entry + +/* + * get_new_page + * + * Return a new page from the memory start and clear it. + */ +func_start get_new_page,%d0/%a1 + + dputs "\nget_new_page:" + + /* allocate the page and adjust memory_start + */ + lea %pc@(L(memory_start)),%a0 + movel %a0@,%a1 + addl #PAGESIZE,%a0@ + + /* clear the new page + */ + movel %a1,%a0 + movew #PAGESIZE/4-1,%d0 +1: + clrl %a1@+ + dbra %d0,1b + + dputn %a0 + dputc '\n' + +func_return get_new_page + + /* * Debug output support @@ -1112,11 +2499,49 @@ * from the MFP or a serial port of the SCC */ +#ifdef CONFIG_MAC + +L(scc_initable_mac): + .byte 9,12 /* Reset */ + .byte 4,0x44 /* x16, 1 stopbit, no parity */ + .byte 3,0xc0 /* receiver: 8 bpc */ + .byte 5,0xe2 /* transmitter: 8 bpc, assert dtr/rts */ + .byte 9,0 /* no interrupts */ + .byte 10,0 /* NRZ */ + .byte 11,0x50 /* use baud rate generator */ + .byte 12,10,13,0 /* 9600 baud */ + .byte 14,1 /* Baud rate generator enable */ + .byte 3,0xc1 /* enable receiver */ + .byte 5,0xea /* enable transmitter */ + .byte -1 + .even +#endif + #ifdef CONFIG_ATARI /* #define USE_PRINTER */ -/* #define USE_SCC */ +/* #define USE_SCC_B */ +/* #define USE_SCC_A */ #define USE_MFP +#if defined(USE_SCC_A) || defined(USE_SCC_B) +#define USE_SCC +/* Initialisation table for SCC */ +L(scc_initable): + .byte 9,12 /* Reset */ + .byte 4,0x44 /* x16, 1 stopbit, no parity */ + .byte 3,0xc0 /* receiver: 8 bpc */ + .byte 5,0xe2 /* transmitter: 8 bpc, assert dtr/rts */ + .byte 9,0 /* no interrupts */ + .byte 10,0 /* NRZ */ + .byte 11,0x50 /* use baud rate generator */ + .byte 12,24,13,0 /* 9600 baud */ + .byte 14,2,14,3 /* use master clock for BRG, enable */ + .byte 3,0xc1 /* enable receiver */ + .byte 5,0xea /* enable transmitter */ + .byte -1 + .even +#endif + #ifdef USE_PRINTER LPSG_SELECT = 0xff8800 @@ -1129,13 +2554,18 @@ LSTMFP_DDR = 0xfffa05 LSTMFP_IERB = 0xfffa09 -#elif defined(USE_SCC) - -LSCC_CTRL_B = 0xff8c85 -LSCC_DATA_B = 0xff8c87 +#elif defined(USE_SCC_B) + +LSCC_CTRL = 0xff8c85 +LSCC_DATA = 0xff8c87 + +#elif defined(USE_SCC_A) + +LSCC_CTRL = 0xff8c81 +LSCC_DATA = 0xff8c83 /* Initialisation table for SCC */ -scc_initable: +L(scc_initable): .byte 9,12 /* Reset */ .byte 4,0x44 /* x16, 1 stopbit, no parity */ .byte 3,0xc0 /* receiver: 8 bpc */ @@ -1159,45 +2589,48 @@ LMFP_UDR = 0xfffa2f #endif -#endif - -#if defined (CONFIG_BVME6000) -BVME_SCC_CTRL_A = 0xffb0000b -BVME_SCC_DATA_A = 0xffb0000f -#endif +#endif /* CONFIG_ATARI */ /* * Serial port output support. */ -LSERPER = 0xdff032 -LSERDAT = 0xdff030 -LSERDATR = 0xdff018 -LSERIAL_CNTRL = 0xbfd000 -LSERIAL_DTR = 7 /* * Initialize serial port hardware for 9600/8/1 - * a0 thrashed - * Amiga d0 trashed - * Atari d0 trashed (a1 in case of SCC) */ - .even -Lserial_init: +func_start serial_init,%d0/%d1/%a0/%a1 + /* + * Some of the register usage that follows + * CONFIG_AMIGA + * a0 = pointer to boot info record + * d0 = boot info offset + * CONFIG_ATARI + * a0 = address of SCC + * a1 = Liobase address/address of scc_initable + * d0 = init data for serial port + * CONFIG_MAC + * a0 = address of SCC + * a1 = address of scc_initable_mac + * d0 = init data for serial port + */ + #ifdef CONFIG_AMIGA - cmpil #MACH_AMIGA,%d4 - jne 1f - bclr #LSERIAL_DTR,LSERIAL_CNTRL - movew #BI_AMIGA_SERPER,%d0 - jbsr Lget_bi_record - movew %a0@,LSERPER - jra 9f +#define SERIAL_DTR 7 +#define SERIAL_CNTRL CIABBASE+C_PRA + + is_not_amiga(1f) + lea %pc@(L(custom)),%a0 + movel #-ZTWOBASE,%a0@ + bclr #SERIAL_DTR,SERIAL_CNTRL-ZTWOBASE + get_bi_record BI_AMIGA_SERPER + movew %a0@,CUSTOMBASE+C_SERPER-ZTWOBASE +| movew #61,CUSTOMBASE+C_SERPER-ZTWOBASE 1: #endif #ifdef CONFIG_ATARI - cmpil #MACH_ATARI,%d4 - jne 4f - movel %pc@(Liobase),%a1 -#ifdef USE_PRINTER + is_not_atari(4f) + movel %pc@(L(iobase)),%a1 +#if defined(USE_PRINTER) bclr #0,%a1@(LSTMFP_IERB) bclr #0,%a1@(LSTMFP_DDR) moveb #LPSG_CONTROL,%a1@(LPSG_SELECT) @@ -1209,8 +2642,8 @@ bset #5,%d0 moveb %d0,%a1@(LPSG_WRITE) #elif defined(USE_SCC) - lea %a1@(LSCC_CTRL_B),%a0 - lea %pc@(scc_initable:w),%a1 + lea %a1@(LSCC_CTRL),%a0 + lea %pc@(L(scc_initable)),%a1 2: moveb %a1@+,%d0 jmi 3f moveb %d0,%a0@ @@ -1225,174 +2658,854 @@ orb #1,%a1@(LMFP_TDCDR) bset #1,%a1@(LMFP_TSR) #endif + jra L(serial_init_done) 4: #endif -9: - rts +#ifdef CONFIG_MAC + is_not_mac(L(serial_init_not_mac)) +#ifdef MAC_SERIAL_DEBUG +#if !defined(MAC_USE_SCC_A) && !defined(MAC_USE_SCC_B) +#define MAC_USE_SCC_B +#endif +#define mac_scc_cha_b_ctrl_offset 0x0 +#define mac_scc_cha_a_ctrl_offset 0x2 +#define mac_scc_cha_b_data_offset 0x4 +#define mac_scc_cha_a_data_offset 0x6 + +#ifdef MAC_USE_SCC_A + /* Initialize channel A */ + movel %pc@(L(mac_sccbase)),%a0 + lea %pc@(L(scc_initable_mac)),%a1 +5: moveb %a1@+,%d0 + jmi 6f + moveb %d0,%a0@(mac_scc_cha_a_ctrl_offset) + moveb %a1@+,%a0@(mac_scc_cha_a_ctrl_offset) + jra 5b +6: +#endif /* MAC_USE_SCC_A */ + +#ifdef MAC_USE_SCC_B + /* Initialize channel B */ +#ifndef MAC_USE_SCC_A /* Load mac_sccbase only if needed */ + movel %pc@(L(mac_sccbase)),%a0 +#endif /* MAC_USE_SCC_A */ + lea %pc@(L(scc_initable_mac)),%a1 +7: moveb %a1@+,%d0 + jmi 8f + moveb %d0,%a0@(mac_scc_cha_b_ctrl_offset) + moveb %a1@+,%a0@(mac_scc_cha_b_ctrl_offset) + jra 7b +8: +#endif /* MAC_USE_SCC_B */ +#endif /* MAC_SERIAL_DEBUG */ + + jra L(serial_init_done) +L(serial_init_not_mac): +#endif /* CONFIG_MAC */ + +L(serial_init_done): +func_return serial_init -#ifdef CONFIG_HP300 -/* Set LEDs to %d7 */ - .even -Lset_leds: - moveml %a0/%a1,%sp@- - movel %pc@(Lcustom),%a1 - moveb %d7,%a1@(0x1ffff) - moveml %sp@+,%a0/%a1 - rts -#endif - /* - * Output character in d7 on serial port. - * d7 thrashed. + * Output character on serial port. */ -Lserial_putc: - moveml %a0/%a1,%sp@- -#if defined(CONFIG_MVME16x) - cmpil #MACH_MVME16x,%d4 - jne 2f - moveb %d7,%sp@- - .long 0x4e4f0020 - jra 9f -2: -#endif -#ifdef CONFIG_BVME6000 - cmpil #MACH_BVME6000,%d4 - jne 2f -1: btst #2,BVME_SCC_CTRL_A - jeq 1b - moveb %d7,BVME_SCC_DATA_A - jra 9f -2: -#endif +func_start serial_putc,%d0/%d1/%a0/%a1 + + movel ARG1,%d0 + cmpib #'\n',%d0 + jbne 1f + + /* A little safe recursion is good for the soul */ + serial_putc #'\r' +1: + #ifdef CONFIG_AMIGA - cmpil #MACH_AMIGA,%d4 - jne 2f - andw #0x00ff,%d7 - oriw #0x0100,%d7 - movel %pc@(Lcustom),%a1 - movew %d7,%a1@(LSERDAT) -1: movew %a1@(LSERDATR),%d7 - andw #0x2000,%d7 + is_not_amiga(2f) + andw #0x00ff,%d0 + oriw #0x0100,%d0 + movel %pc@(L(custom)),%a0 + movew %d0,%a0@(CUSTOMBASE+C_SERDAT) +1: movew %a0@(CUSTOMBASE+C_SERDATR),%d0 + andw #0x2000,%d0 jeq 1b - jra 9f + jra L(serial_putc_done) 2: #endif + +#ifdef CONFIG_MAC + is_not_mac(5f) + +#ifdef CONSOLE + console_putc %d0 +#endif /* CONSOLE */ + +#ifdef MAC_SERIAL_DEBUG + +#ifdef MAC_USE_SCC_A + movel %pc@(L(mac_sccbase)),%a1 +3: btst #2,%a1@(mac_scc_cha_a_ctrl_offset) + jeq 3b + moveb %d0,%a1@(mac_scc_cha_a_data_offset) +#endif /* MAC_USE_SCC_A */ + +#ifdef MAC_USE_SCC_B +#ifndef MAC_USE_SCC_A /* Load mac_sccbase only if needed */ + movel %pc@(L(mac_sccbase)),%a1 +#endif /* MAC_USE_SCC_A */ +4: btst #2,%a1@(mac_scc_cha_b_ctrl_offset) + jeq 4b + moveb %d0,%a1@(mac_scc_cha_b_data_offset) +#endif /* MAC_USE_SCC_B */ + +#endif /* MAC_SERIAL_DEBUG */ + + jra L(serial_putc_done) +5: +#endif /* CONFIG_MAC */ + #ifdef CONFIG_ATARI - cmpil #MACH_ATARI,%d4 - jne 4f - movel %pc@(Liobase),%a1 -#ifdef USE_PRINTER + is_not_atari(4f) + movel %pc@(L(iobase)),%a1 +#if defined(USE_PRINTER) 3: btst #0,%a1@(LSTMFP_GPIP) jne 3b moveb #LPSG_IO_B,%a1@(LPSG_SELECT) - moveb %d7,%a1@(LPSG_WRITE) + moveb %d0,%a1@(LPSG_WRITE) moveb #LPSG_IO_A,%a1@(LPSG_SELECT) - moveb %a1@(LPSG_READ),%d7 - bclr #5,%d7 - moveb %d7,%a1@(LPSG_WRITE) + moveb %a1@(LPSG_READ),%d0 + bclr #5,%d0 + moveb %d0,%a1@(LPSG_WRITE) nop nop - bset #5,%d7 - moveb %d7,%a1@(LPSG_WRITE) + bset #5,%d0 + moveb %d0,%a1@(LPSG_WRITE) #elif defined(USE_SCC) -3: btst #2,%a1@(LSCC_CTRL_B) +3: btst #2,%a1@(LSCC_CTRL) jeq 3b - moveb %d7,%a1@(LSCC_DATA_B) + moveb %d0,%a1@(LSCC_DATA) #elif defined(USE_MFP) 3: btst #7,%a1@(LMFP_TSR) jeq 3b - moveb %d7,%a1@(LMFP_UDR) + moveb %d0,%a1@(LMFP_UDR) #endif + jra L(serial_putc_done) 4: +#endif /* CONFIG_ATARI */ + +#ifdef CONFIG_MVME16x + is_not_mvme16x(2f) + /* + * The VME 16x class has PROM support for serial output + * of some kind; the TRAP table is still valid. + */ + moveml %d0-%d7/%a2-%a6,%sp@- + moveb %d0,%sp@- + trap #15 + .word 0x0020 /* TRAP 0x020 */ + moveml %sp@+,%d0-%d7/%a2-%a6 + jbra L(serial_putc_done) +2: +#endif CONFIG_MVME162 | CONFIG_MVME167 + +#ifdef CONFIG_BVME6000 + is_not_bvme6000(2f) + /* + * The BVME6000 machine has a serial port ... + */ +1: btst #2,BVME_SCC_CTRL_A + jeq 1b + moveb %d0,BVME_SCC_DATA_A + jbra L(serial_putc_done) +2: #endif -9: - moveml %sp@+,%a0/%a1 - rts + +L(serial_putc_done): +func_return serial_putc /* - * Output string pointed to by a0 to serial port. - * a0 trashed. + * Output a string. */ -Lserial_puts: - movel %d7,%sp@- -1: moveb %a0@+,%d7 - jeq 2f - jbsr Lserial_putc - jra 1b -2: movel %sp@+,%d7 - rts +func_start puts,%d0/%a0 + + movel ARG1,%a0 + jra 2f +1: +#ifdef CONSOLE + console_putc %d0 +#endif +#ifdef SERIAL_DEBUG + serial_putc %d0 +#endif +2: moveb %a0@+,%d0 + jne 1b + +func_return puts /* - * Output number in d7 in hex notation on serial port. + * Output number in hex notation. */ -Lserial_putnum: - moveml %d0-%d2/%d7,%sp@- - movel %d7,%d1 - moveq #4,%d0 - moveq #7,%d2 -L1: roll %d0,%d1 - moveb %d1,%d7 - andb #0x0f,%d7 - cmpb #0x0a,%d7 - jcc 1f - addb #'0',%d7 +func_start putn,%d0-%d2 + + putc ' ' + + movel ARG1,%d0 + moveq #7,%d1 +1: roll #4,%d0 + move %d0,%d2 + andb #0x0f,%d2 + addb #'0',%d2 + cmpb #'9',%d2 + jls 2f + addb #'A'-('9'+1),%d2 +2: +#ifdef CONSOLE + console_putc %d2 +#endif +#ifdef SERIAL_DEBUG + serial_putc %d2 +#endif + dbra %d1,1b + +func_return putn + +#ifdef CONFIG_MAC +/* + * mac_serial_print + * + * This routine takes its parameters on the stack. It then + * turns around and calls the internal routine. This routine + * is used until the Linux console driver initializes itself. + * + * The calling parameters are: + * void mac_serial_print(const char *str); + * + * This routine does NOT understand variable arguments only + * simple strings! + */ +ENTRY(mac_serial_print) + moveml %d0/%a0,%sp@- +#if 1 + move %sr,%sp@- + ori #0x0700,%sr +#endif + movel %sp@(10),%a0 /* fetch parameter */ jra 2f -1: addb #'A'-10,%d7 -2: jbsr Lserial_putc - dbra %d2,L1 - moveq #32,%d7 - jbsr Lserial_putc - moveml %sp@+,%d0-%d2/%d7 +1: serial_putc %d0 +2: moveb %a0@+,%d0 + jne 1b +#if 1 + move %sp@+,%sr +#endif + moveml %sp@+,%d0/%a0 + rts +#endif /* CONFIG_MAC */ + +#ifdef CONFIG_HP300 +func_start set_leds,%d0/%a0 + movel ARG1,%d0 + movel %pc@(Lcustom),%a0 + moveb %d0,%a0@(0x1ffff) +func_return set_leds +#endif + +#ifdef CONSOLE +/* + * For continuity, see the data alignment + * to which this structure is tied. + */ +#define Lconsole_struct_cur_column 0 +#define Lconsole_struct_cur_row 4 +#define Lconsole_struct_num_columns 8 +#define Lconsole_struct_num_rows 12 +#define Lconsole_struct_left_edge 16 +#define Lconsole_struct_penguin_putc 20 + +L(console_init): + /* + * Some of the register usage that follows + * a0 = pointer to boot_info + * a1 = pointer to screen + * a2 = pointer to Lconsole_globals + * d3 = pixel width of screen + * d4 = pixel height of screen + * (d3,d4) ~= (x,y) of a point just below + * and to the right of the screen + * NOT on the screen! + * d5 = number of bytes per scan line + * d6 = number of bytes on the entire screen + */ + moveml %a0-%a4/%d0-%d7,%sp@- + + lea %pc@(L(console_globals)),%a2 + lea %pc@(L(mac_videobase)),%a0 + movel %a0@,%a1 + lea %pc@(L(mac_rowbytes)),%a0 + movel %a0@,%d5 + lea %pc@(L(mac_dimensions)),%a0 + movel %a0@,%d3 /* -> low byte */ + movel %d3,%d4 + swap %d4 /* -> high byte */ + andl #0xffff,%d3 /* d3 = screen width in pixels */ + andl #0xffff,%d4 /* d4 = screen height in pixels */ + + movel %d5,%d6 + subl #20,%d6 + mulul %d4,%d6 /* scan line bytes x num scan lines */ + divul #8,%d6 /* we'll clear 8 bytes at a time */ + subq #1,%d6 + +console_clear_loop: + movel #0xffffffff,%a1@+ /* Mac_black */ + movel #0xffffffff,%a1@+ /* Mac_black */ + dbra %d6,console_clear_loop + + /* Calculate font size */ + +#if defined(FONT_8x8) + lea %pc@(SYMBOL_NAME(font_vga_8x8)), %a0 +#elif defined(FONT_8x16) + lea %pc@(SYMBOL_NAME(font_vga_8x16)),%a0 +#elif defined(FONT_6x11) + lea %pc@(SYMBOL_NAME(font_vga_6x11)),%a0 +#else /* (FONT_8x8) default */ + lea %pc@(SYMBOL_NAME(font_vga_8x8)), %a0 +#endif + + /* + * At this point we make a shift in register usage + * a1 = address of Lconsole_font pointer + */ + lea %pc@(L(console_font)),%a1 + movel %a0,%a1@ /* store pointer to struct fbcon_font_desc in Lconsole_font */ + + /* + * Calculate global maxs + * Note - we can use either an + * 8 x 16 or 8 x 8 character font + * 6 x 11 also supported + */ + /* ASSERT: a0 = contents of Lconsole_font */ + movel %d3,%d0 /* screen width in pixels */ + divul %a0@(FBCON_FONT_DESC_WIDTH),%d0 /* d0 = max num chars per row */ + + movel %d4,%d1 /* screen height in pixels */ + divul %a0@(FBCON_FONT_DESC_HEIGHT),%d1 /* d1 = max num rows */ + + movel %d0,%a2@(Lconsole_struct_num_columns) + movel %d1,%a2@(Lconsole_struct_num_rows) + + /* + * Clear the current row and column + */ + clrl %a2@(Lconsole_struct_cur_column) + clrl %a2@(Lconsole_struct_cur_row) + clrl %a2@(Lconsole_struct_left_edge) + + /* + * Initialization is complete + */ + moveml %sp@+,%a0-%a4/%d0-%d7 + rts + +L(console_put_stats): + /* + * Some of the register usage that follows + * a0 = pointer to boot_info + * d7 = value of boot_info fields + */ + moveml %a0/%d7,%sp@- + + puts "\nMacLinux\n\n" + +#ifdef SERIAL_DEBUG + puts " vidaddr:" + putn %pc@(L(mac_videobase)) /* video addr. */ + + puts "\n _stext:" + lea %pc@(SYMBOL_NAME(_stext)),%a0 + putn %a0 + + puts "\nbootinfo:" + lea %pc@(SYMBOL_NAME(_end)),%a0 + putn %a0 + + puts "\ncpuid:" + putn %pc@(L(cputype)) + putc '\n' + +# if defined(MMU_PRINT) + jbsr mmu_print_machine_cpu_types +# endif /* MMU_PRINT */ +#endif /* SERIAL_DEBUG */ + + moveml %sp@+,%a0/%d7 + rts + +#ifdef CONSOLE_PENGUIN +L(console_put_penguin): + /* + * Get 'that_penguin' onto the screen in the upper right corner + * penguin is 64 x 74 pixels, align against right edge of screen + */ + moveml %a0-%a1/%d0-%d7,%sp@- + + lea %pc@(L(mac_dimensions)),%a0 + movel %a0@,%d0 + andil #0xffff,%d0 + subil #64,%d0 /* snug up against the right edge */ + clrl %d1 /* start at the top */ + movel #73,%d7 + lea %pc@(SYMBOL_NAME(that_penguin)),%a1 +console_penguin_row: + movel #31,%d6 +console_penguin_pixel_pair: + moveb %a1@,%d2 + lsrb #4,%d2 + jbsr console_plot_pixel + addq #1,%d0 + moveb %a1@+,%d2 + jbsr console_plot_pixel + addq #1,%d0 + dbra %d6,console_penguin_pixel_pair + + subil #64,%d0 + addq #1,%d1 + dbra %d7,console_penguin_row + + moveml %sp@+,%a0-%a1/%d0-%d7 + rts +#endif + +console_scroll: + moveml %a0-%a4/%d0-%d7,%sp@- + + /* + * Calculate source and destination addresses + * output a1 = dest + * a2 = source + */ + lea %pc@(L(mac_videobase)),%a0 + movel %a0@,%a1 + movel %a1,%a2 + lea %pc@(L(mac_rowbytes)),%a0 + movel %a0@,%d5 + movel %pc@(L(console_font)),%a0 + mulul %a0@(FBCON_FONT_DESC_HEIGHT),%d5 /* account for # scan lines per character */ + addal %d5,%a2 + + /* + * Get dimensions + */ + lea %pc@(L(mac_dimensions)),%a0 + movel %a0@,%d3 + movel %d3,%d4 + swap %d4 + andl #0xffff,%d3 /* d3 = screen width in pixels */ + andl #0xffff,%d4 /* d4 = screen height in pixels */ + + /* + * Calculate number of bytes to move + */ + lea %pc@(L(mac_rowbytes)),%a0 + movel %a0@,%d6 + movel %pc@(L(console_font)),%a0 + subl %a0@(FBCON_FONT_DESC_HEIGHT),%d4 /* we're not scrolling the top row! */ + mulul %d4,%d6 /* scan line bytes x num scan lines */ + divul #32,%d6 /* we'll move 8 longs at a time */ + subq #1,%d6 + +console_scroll_loop: + movel %a2@+,%a1@+ + movel %a2@+,%a1@+ + movel %a2@+,%a1@+ + movel %a2@+,%a1@+ + movel %a2@+,%a1@+ + movel %a2@+,%a1@+ + movel %a2@+,%a1@+ + movel %a2@+,%a1@+ + dbra %d6,console_scroll_loop + + lea %pc@(L(mac_rowbytes)),%a0 + movel %a0@,%d6 + movel %pc@(L(console_font)),%a0 + mulul %a0@(FBCON_FONT_DESC_HEIGHT),%d6 /* scan line bytes x font height */ + divul #32,%d6 /* we'll move 8 words at a time */ + subq #1,%d6 + + moveq #-1,%d0 +console_scroll_clear_loop: + movel %d0,%a1@+ + movel %d0,%a1@+ + movel %d0,%a1@+ + movel %d0,%a1@+ + movel %d0,%a1@+ + movel %d0,%a1@+ + movel %d0,%a1@+ + movel %d0,%a1@+ + dbra %d6,console_scroll_clear_loop + + moveml %sp@+,%a0-%a4/%d0-%d7 + rts + + +func_start console_putc,%a0/%a1/%d0-%d7 + + is_not_mac(console_exit) + + /* Output character in d7 on console. + */ + movel ARG1,%d7 + cmpib #'\n',%d7 + jbne 1f + + /* A little safe recursion is good for the soul */ + console_putc #'\r' +1: + lea %pc@(L(console_globals)),%a0 + + cmpib #10,%d7 + jne console_not_lf + movel %a0@(Lconsole_struct_cur_row),%d0 + addil #1,%d0 + movel %d0,%a0@(Lconsole_struct_cur_row) + movel %a0@(Lconsole_struct_num_rows),%d1 + cmpl %d1,%d0 + jcs 1f + subil #1,%d0 + movel %d0,%a0@(Lconsole_struct_cur_row) + jbsr console_scroll +1: + jra console_exit + +console_not_lf: + cmpib #13,%d7 + jne console_not_cr + clrl %a0@(Lconsole_struct_cur_column) + jra console_exit + +console_not_cr: + cmpib #1,%d7 + jne console_not_home + clrl %a0@(Lconsole_struct_cur_row) + clrl %a0@(Lconsole_struct_cur_column) + jra console_exit + +/* + * At this point we know that the %d7 character is going to be + * rendered on the screen. Register usage is - + * a0 = pointer to console globals + * a1 = font data + * d0 = cursor column + * d1 = cursor row to draw the character + * d7 = character number + */ +console_not_home: + movel %a0@(Lconsole_struct_cur_column),%d0 + addil #1,%a0@(Lconsole_struct_cur_column) + movel %a0@(Lconsole_struct_num_columns),%d1 + cmpl %d1,%d0 + jcs 1f + putc '\n' /* recursion is OK! */ +1: + movel %a0@(Lconsole_struct_cur_row),%d1 + + /* + * At this point we make a shift in register usage + * a0 = address of pointer to font data (fbcon_font_desc) + */ + movel %pc@(L(console_font)),%a0 + movel %a0@(FBCON_FONT_DESC_DATA),%a1 /* Load fbcon_font_desc.data into a1 */ + andl #0x000000ff,%d7 + /* ASSERT: a0 = contents of Lconsole_font */ + mulul %a0@(FBCON_FONT_DESC_HEIGHT),%d7 /* d7 = index into font data */ + addl %d7,%a1 /* a1 = points to char image */ + + /* + * At this point we make a shift in register usage + * d0 = pixel coordinate, x + * d1 = pixel coordinate, y + * d2 = (bit 0) 1/0 for white/black (!) pixel on screen + * d3 = font scan line data (8 pixels) + * d6 = count down for the font's pixel width (8) + * d7 = count down for the font's pixel count in height + */ + /* ASSERT: a0 = contents of Lconsole_font */ + mulul %a0@(FBCON_FONT_DESC_WIDTH),%d0 + mulul %a0@(FBCON_FONT_DESC_HEIGHT),%d1 + movel %a0@(FBCON_FONT_DESC_HEIGHT),%d7 /* Load fbcon_font_desc.height into d7 */ + subq #1,%d7 +console_read_char_scanline: + moveb %a1@+,%d3 + + /* ASSERT: a0 = contents of Lconsole_font */ + movel %a0@(FBCON_FONT_DESC_WIDTH),%d6 /* Load fbcon_font_desc.width into d6 */ + subql #1,%d6 + +console_do_font_scanline: + lslb #1,%d3 + scsb %d2 /* convert 1 bit into a byte */ + jbsr console_plot_pixel + addq #1,%d0 + dbra %d6,console_do_font_scanline + + /* ASSERT: a0 = contents of Lconsole_font */ + subl %a0@(FBCON_FONT_DESC_WIDTH),%d0 + addq #1,%d1 + dbra %d7,console_read_char_scanline + +console_exit: + +func_return console_putc + +console_plot_pixel: + /* + * Input: + * d0 = x coordinate + * d1 = y coordinate + * d2 = (bit 0) 1/0 for white/black (!) + * All registers are preserved + */ + moveml %a0-%a1/%d0-%d4,%sp@- + + lea %pc@(L(mac_videobase)),%a0 + movel %a0@,%a1 + lea %pc@(L(mac_videodepth)),%a0 + movel %a0@,%d3 + lea %pc@(L(mac_rowbytes)),%a0 + mulul %a0@,%d1 + + /* + * Register usage: + * d0 = x coord becomes byte offset into frame buffer + * d1 = y coord + * d2 = black or white (0/1) + * d3 = video depth + * d4 = temp of x (d0) for many bit depths + * d5 = unused + * d6 = unused + * d7 = unused + */ +test_1bit: + cmpb #1,%d3 + jbne test_2bit + movel %d0,%d4 /* we need the low order 3 bits! */ + divul #8,%d0 + addal %d0,%a1 + addal %d1,%a1 + andb #7,%d4 + eorb #7,%d4 /* reverse the x-coordinate w/ screen-bit # */ + andb #1,%d2 + jbne white_1 + bsetb %d4,%a1@ + jbra console_plot_pixel_exit +white_1: + bclrb %d4,%a1@ + jbra console_plot_pixel_exit + +test_2bit: + cmpb #2,%d3 + jbne test_4bit + movel %d0,%d4 /* we need the low order 2 bits! */ + divul #4,%d0 + addal %d0,%a1 + addal %d1,%a1 + andb #3,%d4 + eorb #3,%d4 /* reverse the x-coordinate w/ screen-bit # */ + lsll #1,%d4 /* ! */ + andb #1,%d2 + jbne white_2 + bsetb %d4,%a1@ + addq #1,%d4 + bsetb %d4,%a1@ + jbra console_plot_pixel_exit +white_2: + bclrb %d4,%a1@ + addq #1,%d4 + bclrb %d4,%a1@ + jbra console_plot_pixel_exit + +test_4bit: + cmpb #4,%d3 + jbne test_8bit + movel %d0,%d4 /* we need the low order bit! */ + divul #2,%d0 + addal %d0,%a1 + addal %d1,%a1 + andb #1,%d4 + eorb #1,%d4 + lsll #2,%d4 /* ! */ + andb #1,%d2 + jbne white_4 + bsetb %d4,%a1@ + addq #1,%d4 + bsetb %d4,%a1@ + addq #1,%d4 + bsetb %d4,%a1@ + addq #1,%d4 + bsetb %d4,%a1@ + jbra console_plot_pixel_exit +white_4: + bclrb %d4,%a1@ + addq #1,%d4 + bclrb %d4,%a1@ + addq #1,%d4 + bclrb %d4,%a1@ + addq #1,%d4 + bclrb %d4,%a1@ + jbra console_plot_pixel_exit + +test_8bit: + cmpb #8,%d3 + jbne test_16bit + addal %d0,%a1 + addal %d1,%a1 + andb #1,%d2 + jbne white_8 + moveb #0xff,%a1@ + jbra console_plot_pixel_exit +white_8: + clrb %a1@ + jbra console_plot_pixel_exit + +test_16bit: + cmpb #16,%d3 + jbne console_plot_pixel_exit + addal %d0,%a1 + addal %d0,%a1 + addal %d1,%a1 + andb #1,%d2 + jbne white_16 + clrw %a1@ + jbra console_plot_pixel_exit +white_16: + movew #0x0fff,%a1@ + jbra console_plot_pixel_exit + +console_plot_pixel_exit: + moveml %sp@+,%a0-%a1/%d0-%d4 rts +#endif /* CONSOLE */ #if 0 -Lshowtest: +/* + * This is some old code lying around. I don't believe + * it's used or important anymore. My guess is it contributed + * to getting to this point, but it's done for now. + * It was still in the 2.1.77 head.S, so it's still here. + * (And still not used!) + */ +L(showtest): moveml %a0/%d7,%sp@- - putc('A') - putc('=') - putn(%a1) - - ptestr #5,%a1@,#7,%a0 - - putc('D') - putc('A') - putc('=') - putn(%a0) - - putc('D') - putc('=') - putn(%a0@) - - putc('S') - putc('=') - lea %pc@(Lmmu),%a0 - pmove %psr,%a0@ + puts "A=" + putn %a1 + + .long 0xf0119f15 | ptestr #5,%a1@,#7,%a0 + + puts "DA=" + putn %a0 + + puts "D=" + putn %a0@ + + puts "S=" + lea %pc@(L(mmu)),%a0 + .long 0xf0106200 | pmove %psr,%a0@ clrl %d7 movew %a0@,%d7 - jbsr Lserial_putnum + putn %d7 - putr() + putc '\n' moveml %sp@+,%a0/%d7 rts +#endif /* 0 */ + +__INITDATA + .align 4 + +#if defined(CONFIG_ATARI) || defined(CONFIG_AMIGA) || defined(CONFIG_HP300) +L(custom): +L(iobase): + .long 0 +#endif + +#ifdef CONFIG_MAC +L(console_video_virtual): + .long 0 +#endif /* CONFIG_MAC */ + +#if defined(CONSOLE) +L(console_globals): + .long 0 /* cursor column */ + .long 0 /* cursor row */ + .long 0 /* max num columns */ + .long 0 /* max num rows */ + .long 0 /* left edge */ + .long 0 /* mac putc */ +L(console_font): + .long 0 /* pointer to console font (struct fbcon_font_desc) */ +#endif /* CONSOLE */ + +#if defined(MMU_PRINT) +L(mmu_print_data): + .long 0 /* valid flag */ + .long 0 /* start logical */ + .long 0 /* next logical */ + .long 0 /* start physical */ + .long 0 /* next physical */ +#endif /* MMU_PRINT */ + +L(cputype): + .long 0 +L(mmu_cached_pointer_tables): + .long 0 +L(mmu_num_pointer_tables): + .long 0 +L(phys_kernel_start): + .long 0 +L(kernel_end): + .long 0 +L(memory_start): + .long 0 +L(kernel_pgdir_ptr): + .long 0 +L(temp_mmap_mem): + .long 0 + + +#if defined (CONFIG_BVME6000) +BVME_SCC_CTRL_A = 0xffb0000b +BVME_SCC_DATA_A = 0xffb0000f +#endif + +#if defined(CONFIG_MAC) +L(mac_booter_data): + .long 0 +L(mac_videobase): + .long 0 +L(mac_videodepth): + .long 0 +L(mac_dimensions): + .long 0 +L(mac_rowbytes): + .long 0 +#ifdef MAC_SERIAL_DEBUG +L(mac_sccbase): + .long 0 +#endif /* MAC_SERIAL_DEBUG */ #endif + +__FINIT .data - .even -Lcustom: -Liobase: - .long 0 -Lmmu: .quad 0 -SYMBOL_NAME_LABEL(kpt) - .long 0 + .align 4 + SYMBOL_NAME_LABEL(availmem) - .long 0 + .long 0 SYMBOL_NAME_LABEL(m68k_pgtable_cachemode) - .long 0 -#ifdef CONFIG_060_WRITETHROUGH + .long 0 SYMBOL_NAME_LABEL(m68k_supervisor_cachemode) - .long 0 -#endif + .long 0 #if defined(CONFIG_MVME16x) SYMBOL_NAME_LABEL(mvme_bdid_ptr) - .long 0 + .long 0 #endif diff -ur --new-file old/linux/arch/m68k/kernel/m68k_defs.c new/linux/arch/m68k/kernel/m68k_defs.c --- old/linux/arch/m68k/kernel/m68k_defs.c Fri Feb 13 01:30:12 1998 +++ new/linux/arch/m68k/kernel/m68k_defs.c Tue Jan 19 19:58:26 1999 @@ -10,14 +10,78 @@ #include #include +#include +#include +#include +#include +#include