diff -u --recursive --new-file v2.2.7/linux/CREDITS linux/CREDITS
--- v2.2.7/linux/CREDITS Wed Apr 28 11:37:29 1999
+++ linux/CREDITS Mon May 10 10:32:45 1999
@@ -256,6 +256,10 @@
D: Configuration help text support
D: Linux CD and Support Giveaway List
+N: Zoltan Boszormenyi
+E: zboszor@mol.hu
+D: MTRR emulation with Cyrix style ARR registers
+
N: John Boyd
E: boyd@cis.ohio-state.edu
D: Co-author of wd7000 SCSI driver
diff -u --recursive --new-file v2.2.7/linux/Documentation/00-INDEX linux/Documentation/00-INDEX
--- v2.2.7/linux/Documentation/00-INDEX Tue Feb 23 15:21:31 1999
+++ linux/Documentation/00-INDEX Thu Apr 29 11:53:41 1999
@@ -38,7 +38,7 @@
digiepca.txt
- info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards.
exception.txt
- - how linux v2.1 handles exceptions without verify_area etc.
+ - how Linux v2.2 handles exceptions without verify_area etc.
filesystems/
- directory with info on the various filesystems that Linux supports.
ftape.txt
@@ -52,11 +52,11 @@
ioctl-number.txt
- how to implement and register device/driver ioctl calls.
isdn/
- - directory with info on the linux ISDN support, and supported cards.
+ - directory with info on the Linux ISDN support, and supported cards.
java.txt
- info on the in-kernel binary support for Java(tm)
joystick.txt
- - info on using joystick devices (and driver) with linux.
+ - info on using joystick devices (and driver) with Linux.
kbuild/
- directory with info about the kernel build process
kmod.txt
@@ -72,7 +72,7 @@
magic-number.txt
- list of magic numbers used to mark/protect kernel data structures.
mandatory.txt
- - info on the linux implementation of Sys V mandatory file locking.
+ - info on the Linux implementation of Sys V mandatory file locking.
mca.txt
- info on supporting Micro Channel Architecture (e.g. PS/2) systems.
md.txt
@@ -100,7 +100,7 @@
pcwd-watchdog.txt
- info and sample code for using with the PC Watchdog reset card.
powerpc/
- - directory with info on using linux with the PowerPC.
+ - directory with info on using Linux with the PowerPC.
ramdisk.txt
- short guide on how to set up and use the RAM disk.
riscom8.txt
@@ -110,7 +110,7 @@
scsi.txt
- short blurb on using SCSI support as a module.
serial-console.txt
- - how to set up linux with a serial line console as the default.
+ - how to set up Linux with a serial line console as the default.
smart-config.txt
- description of the Smart Config makefile feature.
smp.tex
diff -u --recursive --new-file v2.2.7/linux/Documentation/ARM-README linux/Documentation/ARM-README
--- v2.2.7/linux/Documentation/ARM-README Sun Jun 7 11:16:25 1998
+++ linux/Documentation/ARM-README Thu Apr 29 11:53:41 1999
@@ -70,8 +70,8 @@
a 'make zImage' instead of 'make all'.
-Bug reports etc
----------------
+Bug reports etc.
+----------------
Please send patches, bug reports and code for the ARM Linux project
to linux@arm.uk.linux.org. Patches will not be included into future
@@ -116,7 +116,7 @@
at the top of the screen. The colours have the following significance
when run in a 16 colour mode with the default palette:
- Stripes of White,Red,Yellow,Green:
+ Stripes of white, red, yellow, and green:
Kernel does not support the processor architecture detected.
@@ -142,11 +142,11 @@
HDC base to the source.
As of 31/3/96 it works with two drives (you should get the ADFS
- *configure harddrive set to 2). I've got an internal 20MB and a great
- big external 5.25" FH 64MB drive (who could ever want more :-) ).
+ *configure hard drive set to 2). I've got an internal 20 MB and a great
+ big external 5.25" FH 64 MB drive (who could ever want more :-) ).
- I've just got 240K/s off it (a dd with bs=128k); thats about half of what
- RiscOS gets; but it's a heck of a lot better than the 50K/s I was getting
+ I've just got 240 K/s off it (a dd with bs=128k); that's about half of what
+ RiscOS gets, but it's a heck of a lot better than the 50 K/s I was getting
last week :-)
Known bug: Drive data errors can cause a hang; including cases where
diff -u --recursive --new-file v2.2.7/linux/Documentation/Changes linux/Documentation/Changes
--- v2.2.7/linux/Documentation/Changes Fri Apr 16 14:47:30 1999
+++ linux/Documentation/Changes Fri May 7 09:31:25 1999
@@ -105,7 +105,7 @@
none /dev/pts devpts gid=5,mode=620 0 0
- (Note: gid=5 is applicable for RedHat systems for which group "tty" has
+ (Note: gid=5 is applicable for Red Hat systems for which group "tty" has
gid 5. Adjust according to your distribution. Use mode=600 if you want
"mesg n" to be default.)
- Mount /dev/pts
@@ -433,7 +433,7 @@
Xosview
=======
- /proc interface changes require a recent xosview.
+ Changes to the /proc interface require a recent xosview.
RealPlayer
==========
@@ -444,8 +444,8 @@
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
+ 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....
diff -u --recursive --new-file v2.2.7/linux/Documentation/Configure.help linux/Documentation/Configure.help
--- v2.2.7/linux/Documentation/Configure.help Wed Apr 28 11:37:29 1999
+++ linux/Documentation/Configure.help Mon May 10 10:32:45 1999
@@ -17,6 +17,8 @@
# 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
+# - German, by Jörg Strebel (jstrebel@suse.de) and Karl Eichwalder
+# (ke@suse.de), at http://www.suse.de/~ke/kernel/Configure.de.help.gz
#
# 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
@@ -69,7 +71,7 @@
in some special cases. Detailed bug reports from people familiar
with the kernel internals are usually welcomed by the developers
(before submitting bug reports, please read the documents README,
- MAINTAINERS, Documentation/BUG-HUNTING, and
+ MAINTAINERS, REPORTING_BUGS, Documentation/BUG-HUNTING, and
Documentation/oops-tracing.txt in the kernel source).
Unless you intend to help test and develop a feature or driver that
@@ -127,12 +129,38 @@
available via FTP (user: anonymous) in
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.
+ different machines.
+
+ More information about the internals of the 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 45 KB bigger
kernel, it won't hurt.
+
+Timer and CPU usage LEDs
+CONFIG_LEDS
+ If you define this option, the LEDs on your machine will be used
+ to provide useful information about your current system status.
+
+ If you are compiling a kernel for a NetWinder or EBSA-285, you
+ will be able to select which LEDs are active using the options
+ below. If you are compiling a kernel for the EBSA-110 however,
+ the red LED will simply flash regularly to indicate that the
+ system is still functional. It is still safe to say yes here if
+ you have a CATS system, but the driver will do nothing.
+
+Timer LED
+CONFIG_LEDS_TIMER
+ If you say yes here, one of the system LEDs (the green one on the
+ NetWinder or the amber one on the EBSA285) will flash regularly to
+ indicate that the system is still operational. This is mainly
+ useful to kernel hackers who are debugging unstable kernels.
+
+CPU usage LED
+CONFIG_LEDS_CPU
+ If you say yes here, the red LED will be used to give a good real
+ time indication of CPU usage, by lighting whenever the idle task
+ is not currently executing.
Kernel FP software completion
CONFIG_MATHEMU
@@ -218,8 +246,8 @@
To use the loop device, you need the losetup utility and a recent
version of the mount program, both contained in the util-linux
- package (available via FTP (user: anonymous) from
- ftp://ftp.win.tue.nl/pub/linux/util/).
+ package. The location and current version number of util-linux is
+ contained in the file Documentation/Changes.
Note that this loop device has nothing to do with the loopback
device used for network connections from the machine to itself.
@@ -276,7 +304,7 @@
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/
+ ftp://metalab.unc.edu/pub/Linux/kernel/patches/diskdrives/
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),
@@ -475,7 +503,7 @@
Generic PCI IDE chipset support
CONFIG_BLK_DEV_IDEPCI
- Enable this for PCI systems which use IDE drive(s).
+ Say Y here 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.
@@ -560,15 +588,16 @@
This driver is enabled at runtime using the "ide0=dtc2278" kernel
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
- info.
+ well. See the Documentation/ide.txt and drivers/block/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
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.
+ See the Documentation/ide.txt and drivers/block/ht6560b.c files for
+ more info.
PROMISE DC4030 support (EXPERIMENTAL)
CONFIG_BLK_DEV_PDC4030
@@ -618,36 +647,26 @@
If you say Y here, you also need to say Y to "Use DMA by default
when available", above.
- Please read the comments at the top of drivers/block/via82C586.c
-
If unsure, say N.
CMD646 chipset support (EXPERIMENTAL)
CONFIG_BLK_DEV_CMD646
Say Y here if you have an IDE controller like this.
-HPT343 chipset support (EXPERIMENTAL)
-CONFIG_BLK_DEV_HPT343
- This driver adds up to 4 more EIDE devices sharing a single
- interrupt. The HPT343 chipset in its current form is a non-bootable
- PCI UDMA controller. This driver requires dynamic tuning of the
- chipset during the ide-probe at boot. It is reported to support DVD
- II drives, by the manufacturer.
-
- Please read the comments at the top of drivers/block/hpt343.c
-
QDI QD6580 support
CONFIG_BLK_DEV_QD6580
This driver is enabled at runtime using the "ide0=qd6580" kernel
boot parameter. It permits faster I/O speeds to be set. See the
- files Documentation/ide.txt and qd6580.c for more info.
+ files Documentation/ide.txt and drivers/block/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
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.
+ See the files Documentation/ide.txt and drivers/block/umc8672.c for
+ more info.
ALI M14xx support
CONFIG_BLK_DEV_ALI14XX
@@ -655,7 +674,7 @@
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.
+ and drivers/block/ali14xx.c for more info.
XT hard disk support
CONFIG_BLK_DEV_XD
@@ -1034,6 +1053,24 @@
board uses the R4300 and a R5230 CPUs. For more information about
this board see http://www.algor.co.uk.
+IDE card support
+CONFIG_BLK_DEV_IDE_CARDS
+ On Acorn systems, enable this if you wish to use an IDE interface
+ expansion card. If you do not or are unsure, say N to this.
+
+ICS IDE interface
+CONFIG_BLK_DEV_IDE_ICS
+ On Acorn systems, enable this if you wish to use the ICS IDE
+ interface card. This is not required for ICS partition support.
+ If you are unsure, say N to this.
+
+ADFS partition support
+CONFIG_BLK_DEV_PART
+ This allows Linux on Acorn systems to determine its partitions in
+ the 'non-ADFS' partition area of the hard disk - usually located
+ after the ADFS partition. You are probably using this system, so
+ you should enable it.
+
Support for Mips Magnum 4000
CONFIG_MIPS_MAGNUM_4000
This is a machine with a R4000 100 MHz CPU. To compile a Linux
@@ -1870,7 +1907,7 @@
card. You do this by inserting several instances of the module
matroxfb.o into the kernel with insmod, supplying the parameter
"dev=N" where N is 0, 1, etc. for the different Matrox devices.
-
+
MDA text console (dual-headed)
CONFIG_MDA_CONSOLE
Say Y here if you have an old MDA or monochrome Hercules graphics
@@ -2030,7 +2067,7 @@
Parallel-port support
CONFIG_PARPORT
If you want to use devices connected to your machine's parallel port
- (the connector at the computer with 25 holes), e.g. printer, Zip
+ (the connector at the computer with 25 holes), e.g. printer, ZIP
drive, PLIP link (Parallel Line Internet Protocol is mainly used to
create a mini network by connecting the parallel ports of two local
machines) etc., then you need to say Y here; please read
@@ -2057,10 +2094,13 @@
CONFIG_PARPORT_PC
You should say Y here if you have a PC-style parallel port. All IBM
PC compatible computers and some Alphas have PC-style parallel
- ports. This code is also available as a module. If you want to it as
- a module ( = code which can be inserted in and removed from the
+ ports.
+
+ This code is also available as a module. If you want to compile it
+ 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_pc.o.
+
If unsure, say Y.
Support foreign hardware
@@ -2231,8 +2271,18 @@
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.
-
+ packet can be used for routing decisions as well. In addition, if
+ you say Y here and to "IP: fast network address translation" below,
+ the router will also be able to modify source and destination
+ addresses of forwarded packets.
+
+ If you are interested in this, please see the preliminary
+ documentation at http://www.compendium.com.ar/policy-routing.txt and
+ ftp://post.tepkom.ru/pub/vol2/Linux/docs/advanced-routing.tex. You
+ will need supporting software from ftp://ftp.inr.ac.ru/ip-routing/
+
+ If unsure, say N.
+
IP: equal cost multipath
CONFIG_IP_ROUTE_MULTIPATH
Normally, the routing tables specify a single action to be taken in
@@ -2275,9 +2325,9 @@
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, in a manner
- you specify. Please see
- http://www.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html for
- details.
+ you specify. General information about Network Address Translation
+ can be gotten from the document
+ http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/nat.html
IP: optimize as router not host
CONFIG_IP_ROUTER
@@ -2601,12 +2651,12 @@
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
+ to the outside depending on 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,
+ like lynx or netscape) and also in the Virtual-Services-HOWTO,
available via FTP (user: anonymous) from
ftp://metalab.unc.edu/pub/Linux/docs/HOWTO.
@@ -2920,36 +2970,45 @@
CONFIG_IPDDP
This allows IP networking for users who only have AppleTalk
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
- zoo of AppleTalk connected Macs). You decide which one of the two
- you want in the following two questions; you can say Y to only one
- of them. Please see Documentation/networking/ipddp.txt for more
- information.
+ driver, you can 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 zoo of
+ AppleTalk connected Macs). Please see the file
+ Documentation/networking/ipddp.txt for more information.
+
+ If you say Y here, the AppleTalk-IP support will be compiled into
+ the kernel. In this case, you can either use encapsulation or
+ decapsulation, but not both. With the following two questions, you
+ decide which one you want.
- 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 ipddp.o. If you want to compile it as a module,
- say M here and read Documentation/modules.txt.
+ If you say M here, the AppleTalk-IP support will be compiled as a
+ module ( = code which can be inserted in and removed from the
+ running kernel whenever you want, read Documentation/modules.txt).
+ The module is called ipddp.o. In this case, you will be able to use
+ both encapsulation and decapsulation simultaneously, by loading two
+ copies of the module and specifying different values for the module
+ option ipddp_mode.
IP to AppleTalk-IP Encapsulation support
CONFIG_IPDDP_ENCAP
- If you say Y here, the kernel will be able to encapsulate IP packets
- inside AppleTalk frames; this is useful if your Linux box is stuck
- on an AppleTalk network (which hopefully contains a decapsulator
- somewhere). Please see Documentation/networking/ipddp.txt for more
- information. If you say Y here, you cannot say Y to "AppleTalk-IP to
- IP Decapsulation support", below.
+ If you say Y here, the AppleTalk-IP code will be able to encapsulate
+ IP packets inside AppleTalk frames; this is useful if your Linux box
+ is stuck on an AppleTalk network (which hopefully contains a
+ decapsulator somewhere). Please see
+ Documentation/networking/ipddp.txt for more information. If you said
+ Y to "AppleTalk-IP driver support" above and you say Y here, then
+ you cannot say Y to "AppleTalk-IP to IP Decapsulation support",
+ below.
AppleTalk-IP to IP Decapsulation support
CONFIG_IPDDP_DECAP
- If you say Y here, the kernel will be able to decapsulate
+ If you say Y here, the AppleTalk-IP code will be able to decapsulate
AppleTalk-IP frames to IP packets; this is useful if you want your
- Linux box to act as an Internet gateway for an AppleTalk
- network. Please see Documentation/networking/ipddp.txt for more
- information. If you say Y here, you cannot say Y to "IP to
- AppleTalk-IP Encapsulation support", above.
+ Linux box to act as an Internet gateway for an AppleTalk network.
+ Please see Documentation/networking/ipddp.txt for more information.
+ If you said Y to "AppleTalk-IP driver support" above and you say Y
+ here, then you cannot say Y to "IP to AppleTalk-IP Encapsulation
+ support", above.
Apple/Farallon LocalTalk PC card support
CONFIG_LTPC
@@ -3526,7 +3585,7 @@
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
- ftp://metalab.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
or M to "ISO 9660 CDROM filesystem support" later.
This driver is also available as a module ( = code which can be
@@ -3554,7 +3613,8 @@
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
- ftp://metalab.unc.edu:/pub/Linux/docs/HOWTO.
+ ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. Please read the file
+ Documentation/scsi-generic.txt for more information.
If you want to compile this as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
@@ -3956,33 +4016,33 @@
tagged command queuing and fast synchronous data transfers up to 80
MB/s with wide FAST-40 LVD devices and controllers.
- An additionnal driver named SYM53C8XX (a.k.a 896 driver) can also be
- configured. See the help on the SYM53C8XX driver for more information.
+ Recent versions of the 53C8XX chips are better supported by the
+ option "SYM53C8XX SCSI support", below.
- Note: there is another driver for the 53c8xx family of controllers
+ Note: there is yet another driver for the 53c8xx family of controllers
("NCR53c7,8xx SCSI support" above). If you want to use them both,
you need to 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.
+ may be active at a time. If you have a 53c8xx board, you probably do
+ not want to use the "NCR53c7,8xx SCSI support".
Please read drivers/scsi/README.ncr53c8xx for more information.
SYM53C8XX SCSI support
CONFIG_SCSI_SYM53C8XX
- The 896 driver for Linux (a.k.a. sym53c8xx) is derivated from the
- ncr53c8xx driver and has been heavily reworked and enhanced to
- fully support all the features of recent 53C8XX chips, notably the
- hardware phase mismatch feature of the SYM53C896.
-
- For that to be achieved without additionnal complexity, support of
- old 8XX chips has been dropped. If your system uses either a
- 810 rev. < 16, a 815, or a 825 rev. < 16 PCI SCSI processor, you must
- use the generic NCR53C8XX driver or configure both the NCR53C8XX and
- the SYM53C8XX drivers either as module or linked to the kernel image.
+ This driver supports all the features of recent 53C8XX chips (used
+ in PCI SCSI controllers), notably the hardware phase mismatch
+ feature of the SYM53C896.
+
+ Older versions of the 53C8XX chips are not supported by this
+ driver. If your system uses either a 810 rev. < 16, a 815, or a 825
+ rev. < 16 PCI SCSI processor, you must use the generic NCR53C8XX
+ driver ("NCR53C8XX SCSI support" above) or configure both the
+ NCR53C8XX and this SYM53C8XX drivers either as module or linked to
+ the kernel image.
When both drivers are linked to the kernel, the SYM53C8XX driver is
called first at initialization and you can use the 'excl=ioaddr'
- driver boot option to exclude attachement of adapters by the SYM53C8XX
+ driver boot option to exclude attachment of adapters by the SYM53C8XX
driver. For instance, entering 'sym53c8xx=excl:0xb400,excl=0xc000' at
lilo prompt prevents adapters at io address 0xb400 and 0xc000 from
being attached by the SYM53C8XX driver, thus allowing the NCR53C8XX
@@ -4105,12 +4165,11 @@
include support for the NCR PQS/PDS SCSI card
CONFIG_SCSI_NCR53C8XX_PQS_PDS
- This allows the driver to detect a special adapter produced by NCR
+ Say Y here if you have a special SCSI adapter produced by NCR
corporation called a PCI Quad SCSI or PCI Dual SCSI. You do not need
- this if you do not have one of these adapters. However, since this
- device is detected as a specific PCI device, this option is quite
- safe. This option is only supported by the SYM53C8XX driver (not
- by the NCR53C8XX driver).
+ this if you do not have one of these adapters. However, since this
+ device is detected as a specific PCI device, this option is quite
+ safe.
The common answer here is N, but answering Y is safe.
@@ -4215,17 +4274,6 @@
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
@@ -4243,7 +4291,7 @@
CONFIG_SCSI_INIA100
This is support for the Initio INI-A100U2W SCSI host adapter.
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.
If you want to compile this as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
@@ -4309,8 +4357,8 @@
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 choose "BIOS" at the
- question "PCI access mode".
+ If you say Y here, make sure to choose "BIOS" at the question "PCI
+ access mode".
Please read the file drivers/scsi/README.qlogicisp. You should also
read the SCSI-HOWTO, available via FTP (user: anonymous) at
@@ -4321,6 +4369,15 @@
The module will be called qlogicisp.o. If you want to compile it as
a module, say M here and read Documentation/modules.txt.
+Qlogic ISP FC SCSI support
+CONFIG_SCSI_QLOGIC_FC
+ This is a driver for the QLogic ISP2100 SCSI-FCP host adapter.
+
+ 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 qlogicfc.o. If you want to compile it as
+ a module, say M here and read Documentation/modules.txt.
+
Seagate ST-02 and Future Domain TMC-8xx SCSI support
CONFIG_SCSI_SEAGATE
These are 8-bit SCSI controllers; the ST-01 is also supported by
@@ -4444,20 +4501,22 @@
Symbios Logic sym53c416 support
CONFIG_SCSI_SYM53C416
- This is support for the sym53c416 SCSI host adapter. This is the
- SCSI adapter that comes with some hp scanners. This driver requires that
- the sym53c416 is configured first using some sort of pnp configuration
- program (e.g. isapnp) or by a PnP aware BIOS. If you are using isapnp then
- you need to compile it as a module and then load it using insmod after
- isapnp has run. The parameters of the configured card(s) should be passed
- to the driver. The format is:
+ This is support for the sym53c416 SCSI host adapter, the SCSI
+ adapter that comes with some HP scanners. This driver requires that
+ the sym53c416 is configured first using some sort of pnp
+ configuration program (e.g. isapnp) or by a PnP aware BIOS. If you
+ are using isapnp then you need to compile this driver as a module
+ and then load it using insmod after isapnp has run. The parameters
+ of the configured card(s) should be passed to the driver. The format
+ is:
insmod sym53c416 sym53c416=, [sym53c416_1=,]
- There is support for up to four adapters. 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.
+ There is support for up to four adapters. 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
+ sym53c416.o.
Tekram DC390(T) and Am53/79C974 (PCscsi) SCSI support
CONFIG_SCSI_DC390T
@@ -4518,6 +4577,12 @@
say M here and read Documentation/modules.txt. The module will be
called megaraid.o.
+###
+### What is this?
+###
+#Concurrent IO commands on MegaRAID
+#CONFIG_MEGARAID_MULTI_IO
+
GDT SCSI Disk Array Controller support
CONFIG_SCSI_GDTH
This is a driver for all SCSI Disk Array Controllers (EISA/ISA/PCI)
@@ -4710,7 +4775,7 @@
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
- ftp://metalab.unc.edu:/pub/Linux/docs/HOWTO/mini) or if you want to
+ 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
@@ -4721,7 +4786,7 @@
Make sure to read the NET-3-HOWTO. Eventually, you will have to read
Olaf Kirch's excellent and free book "Network Administrator's
- Guide", to be found in ftp://metalab.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
@@ -4827,7 +4892,7 @@
To use PPP, you need an additional program called pppd as described
in Documentation/networking/ppp.txt and in the PPP-HOWTO, available
- from ftp://metalab.unc.edu:/pub/Linux/docs/HOWTO. If you upgrade
+ 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.
@@ -5142,11 +5207,13 @@
*** This option is NOT COMPATIBLE with several important ***
*** networking options: especially CONFIG*FIREWALL. ***
+ *** Say N here if you intend to use Linux as a firewall. ***
However, it will work with all options in CONFIG_IP_ADVANCED_ROUTER
- section (except for CONFIG_IP_ROUTE_TOS&FWMARK). At the moment, few devices
- support fast switching (tulip is one of them, modified 8390 can be
- found at ftp://ftp.inr.ac.ru/ip-routing/fastroute-8390.tar.gz).
+ section (except for CONFIG_IP_ROUTE_TOS and CONFIG_IP_ROUTE_FWMARK).
+ At the moment, few devices support fast switching (tulip is one of
+ them, modified 8390 can be found at
+ ftp://ftp.inr.ac.ru/ip-routing/fastroute-8390.tar.gz).
If unsure, say N.
@@ -5752,6 +5819,18 @@
module, say M here and read Documentation/modules.txt as well as
Documentation/networking/net-modules.txt.
+3c527 support
+CONFIG_ELMC_II
+ 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 3c527.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.
+
3c509/3c579 support
CONFIG_EL3
If you have a network (Ethernet) card belonging to the 3Com
@@ -6560,6 +6639,20 @@
The module will be called mcd.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.
+IRQ channel for Mitsumi CD-ROM
+CONFIG_MCD_IRQ
+ This allows you to specify the default value of the IRQ used by the
+ driver. This setting can be overridden by passing the "mcd="
+ parameter to the kernel at boot time (or at module load time if you
+ said M to "Standard Mitsumi CDROM support").
+
+I/O base address for Mitsumi CD-ROM
+CONFIG_MCD_BASE
+ This allows you to specify the default value of the I/O base address
+ used by the driver. This setting can be overridden by passing the
+ "mcd=" parameter to the kernel at boot time (or at module load time
+ if you said M to "Standard Mitsumi CDROM support").
+
Mitsumi [XA/MultiSession] support
CONFIG_MCDX
Use this driver if you want to be able to read XA or MultiSession
@@ -6750,6 +6843,13 @@
ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini. Probably the quota
support is only useful for multi user systems. If unsure, say N.
+Acorn's ADFS filesystem support (read only) (EXPERIMENTAL)
+CONFIG_ADFS_FS
+ The Advanced Disk File System is the filesystem used on floppy and
+ hard disks by Acorn Systems. Currently in development, as a read-
+ only driver for hard disks. These should be the first partition
+ (eg. /dev/[sh]d?1) on each of your drives. If unsure, say N.
+
Minix fs support
CONFIG_MINIX_FS
Minix is a simple operating system used in many classes about OS's.
@@ -7032,10 +7132,13 @@
should say N here, or you can say Y and use this new experimental
kernel based NFS server. The advantage of the kernel based solution
is that it is faster; it might not be completely stable yet, though.
- You will need the support software from the linux-nfs package
- available at ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir/.
+
+ In either case, you will need support software; the respective
+ locations are given in the file Documentation/Changes in the NFS
+ section.
+
Please read the NFS-HOWTO, available via FTP (user: anonymous) from
- ftp://metalab.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).
@@ -7213,7 +7316,8 @@
Unixes can create and mount hard disk partitions and diskettes using
this filesystem as well. Saying Y here will allow you to read from
these partitions; if you also want to write to them, say Y to the
- experimental "UFS filesystem write support", below.
+ experimental "UFS filesystem write support", below. Please read the
+ file Documentation/filesystems/ufs.txt for more information.
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
@@ -7333,7 +7437,7 @@
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 OS/2 Lan Manager use to share
+ (WfW), Windows 95/98, 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
@@ -7397,7 +7501,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 ftp://metalab.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.
@@ -7445,23 +7549,22 @@
Lowercase DOS filenames on LONG namespace volume
CONFIG_NCPFS_SMALLDOS
- Saying Y here will convert every filename with creator/owner DOS
- namespace on NetWare servers to lowercase characters as silently
- kernel does when you mount NetWare file server volumes with DOS
- namespace without OS2/LONG namespace support. Saying N here will
- give you these filenames with uppercase characters.
-
- This is only cosmetic option because of OS2/LONG namespace is
- case insensitive. The only major reason for this option is
- backward compatibility when you want to do step from DOS to
- OS2/LONG namespace support. Long filenames (created by Win95)
- will not be affected.
-
- This option does not solve a problem that filenames appear
- differently in Linux box and in MS environment because of MS
- does an additional conversions on client side. You can achieve
- simillar effects enabling ncpfs option "Allow using of Native
- Language Support" below.
+ If you say Y here, every filename on a NetWare server volume using
+ the OS2/LONG namespace will be converted to lowercase characters.
+ (For regular NetWare file server volumes with DOS namespace, this is
+ done automatically, even if you say N here.) Saying N here will give
+ you these filenames in uppercase.
+
+ This is only a cosmetic option since the OS2/LONG namespace is case
+ insensitive. The only major reason for this option is backward
+ compatibility when moving from DOS to OS2/LONG namespace support.
+ Long filenames (created by Win95) will not be affected.
+
+ This option does not solve the problem that filenames appear
+ differently under Linux and under Windows, since Windows does an
+ additional conversions on the client side. You can achieve similar
+ effects by saying Y to "Allow using of Native Language Support"
+ below.
Allow mounting of volume subdirectories
CONFIG_NCPFS_MOUNT_SUBDIR
@@ -7483,10 +7586,10 @@
Allow using of Native Language Support
CONFIG_NCPFS_NLS
- Allows you to use codepages and I/O charsets for file name translation
- between file system on server and input/output. This may be useful,
- if you want to access to the server with other operating systems,
- e.g. Windows 95. See also NLS for more Information.
+ Allows you to use codepages and I/O charsets for file name
+ translation between the server file system and input/output. This
+ may be useful, if you want to access the server with other operating
+ systems, e.g. Windows 95. See also NLS for more Information.
To select codepages and I/O charsets use ncpfs-2.2.0.13 or newer.
@@ -7494,12 +7597,11 @@
CONFIG_NCPFS_EXTRAS
This enables the use of symbolic links and an execute permission
bit on NCPFS. The file server need not have long name space or NFS
- name space loaded for these to work, they are stored using rarely
- found combinations of Hidden, System and Shared flags.
+ name space loaded for these to work.
+
+ To use the new attributes, it is recommended to use the flags
+ '-f 600 -d 755' on the ncpmount command line.
- To use the new attributes, you are recommended to use the flags
- '-f 600 -d 755' on the ncpmount commandline.
-
nls codepage 437
CONFIG_NLS_CODEPAGE_437
The Microsoft fat filesystem family can deal with filenames in
@@ -8035,14 +8137,24 @@
Provides support for the SyncLink ISA and PCI
multiprotocol serial adapters. These adapters
support asynchronous and HDLC bit synchronous
- communication up to 10Mbps (PCI adapter)
+ communication up to 10Mbps (PCI adapter).
+
+ This driver can only be built as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called synclink.o. If you want to do that, say M
+ here.
Synchronous HDLC line discipline support
CONFIG_N_HDLC
Allows synchronous HDLC communications with
tty device drivers that support synchronous
HDLC such as the Microgate SyncLink adapter.
-
+
+ This driver can only be built as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called n_hdlc.o. If you want to do that, say M
+ here.
+
Hayes ESP serial port support
CONFIG_ESPSERIAL
This is a driver which supports Hayes ESP serial ports. Both single
@@ -8087,7 +8199,7 @@
If you want to say Y here, you need to have the C library glibc 2.1
or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
Read the instructions in Documentation/Changes pertaining to pseudo
- terminals. It's save to say N.
+ terminals. It's safe to say N.
Maximum number of Unix98 PTYs in use (0-2048)
CONFIG_UNIX98_PTY_COUNT
@@ -8183,7 +8295,7 @@
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
+ 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)
@@ -8554,17 +8666,24 @@
MTRR control and configuration
CONFIG_MTRR
- On Intel Pentium Pro and Pentium II systems the Memory Type Range
- Registers (MTRRs) may be used to control processor access to memory
- ranges. This is most useful when you have a video (VGA) card on a
- 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.
+ On Intel P6 family processors (Pentium Pro, Pentium II and later)
+ the Memory Type Range Registers (MTRRs) may be used to control
+ processor access to memory ranges. This is most useful when you have
+ a video (VGA) card on a 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.
+
+ The Cyrix 6x86, 6x86MX and M II processors have Address Range
+ Registers (ARRs) which provide a similar functionality to MTRRs. For
+ these, the ARRs are used to emulate the MTRRs.
+
+ The AMD K6-2 (stepping 8 and above) and K6-3 processors have two
+ MTRRs. These are 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
@@ -8893,6 +9012,17 @@
The module will be called nvram.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.
+Atomwide Serial Support
+CONFIG_ATOMWIDE_SERIAL
+ If you have an Atomwide Serial card for an Acorn system, say Y to
+ this option. The driver can handle 1, 2, or 3 port cards.
+ 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
+
Joystick support
CONFIG_JOYSTICK
If you have a joystick, you can say Y here to enable generic
@@ -8996,6 +9126,35 @@
If you have the Serial Port's dual serial card for an Acorn system,
say Y to this option. If unsure, say N
+NetWinder Button
+CONFIG_NWBUTTON
+ If you enable this driver and create a character device node
+ /dev/nwbutton with major and minor numbers 10 and 158 ("man mknod"),
+ then every time the orange button is pressed a number of times, the
+ number of times the button was pressed will be written to that device.
+ This is most useful for applications, as yet unwritten, which perform
+ actions based on how many times the button is pressed in a row.
+ Do not hold the button down for too long, as the driver does not alter
+ the behaviour of the hardware reset circuitry attached to the button;
+ it will still execute a hard reset if the button is held down for
+ longer than approximately five seconds.
+ 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. The module will be called nwbutton.o.
+ Most people will answer Y to this question and "Reboot Using Button"
+ below to be able to initiate a system shutdown from the button.
+
+Reboot Using Button
+CONFIG_NWBUTTON_REBOOT
+ If you enable this option, then you will be able to initiate a system
+ shutdown and reboot by pressing the orange button a number of times.
+ The number of presses to initiate the shutdown is two by default, but
+ this can be altered by modifying the value of NUM_PRESSES_REBOOT in
+ nwbutton.h and recompiling the driver or, if you compile the driver as
+ a module, you can specify the number of presses at load time with
+ "insmod button reboot_count=".
+
Sound card support
CONFIG_SOUND
If you have a sound card in your computer, i.e. if it can say more
@@ -9037,18 +9196,19 @@
Persistent DMA buffers
CONFIG_SOUND_DMAP
- Linux can often have problems allocating DMA buffers for ISA cards on
- machines with more than 16MB of 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. If you say Y here the DMA
- buffers (64Kb) will be allocated at boot time and kept until the
- shutdown. This option is only usefull if you say Y to OSS sound
- modules. If you say M to OSS sound modules then you can just pass to
- the sound.o module a "dmabuf=1" command-line argument.
+ Linux can often have problems allocating DMA buffers for ISA sound
+ cards on machines with more than 16MB of RAM. This is because ISA
+ DMA buffers must exist below the 16MB boundary and it is quite
+ possible that a large enough free block in this region cannot be
+ found after the machine has been running for a while. If you say Y
+ here the DMA buffers (64Kb) will be allocated at boot time and kept
+ until the shutdown. This option is only useful if you said Y to
+ "OSS sound modules", above. If you said M to "OSS sound modules"
+ then you can get the persistent DMA buffer functionality by passing
+ the command-line argument "dmabuf=1" to the sound.o module.
Say Y unless you have 16MB or less RAM or a PCI sound card.
-
+
Support for Aztech Sound Galaxy (non-PnP) cards
CONFIG_SOUND_SGALAXY
This module initializes the older non Plug and Play sound galaxy
@@ -9556,6 +9716,11 @@
differs slightly from OSS/Free, so PLEASE READ
Documentation/sound/sonicvibes.
+Rockwell WaveArtist
+CONFIG_SOUND_WAVEARTIST
+ Say Y here to include support for the Rockwell WaveArtist sound
+ system. This driver is mainly for the NetWinder.
+
Are you using a crosscompiler
CONFIG_CROSSCOMPILE
Say Y here if you are compiling the kernel on a different
@@ -10513,11 +10678,21 @@
motherboard will usually use a MACE (Medium Access Control for
Ethernet) interface. Say Y to include support for the MACE chip.
+ This driver is also available as a module called mace.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.
+
BMAC (G3 ethernet) support
CONFIG_BMAC
Say Y for support of BMAC Ethernet interfaces. These are used on G3
computers.
+ This driver is also available as a module called bmac.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.
+
Video For Linux
CONFIG_VIDEO_DEV
Support for audio/video capture and overlay devices and FM radio
@@ -10686,11 +10861,27 @@
CONFIG_RADIO_ZOLTRIX_PORT
Enter the I/O port of your Zoltrix radio card.
+ADS Cadet AM/FM Tuner
+CONFIG_RADIO_CADET
+ Say Y here if this is your AM/FM radio card.
+
+ 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-cadet.o
+
Miro PCM20 Radio
CONFIG_RADIO_MIROPCM20
- 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.
+ Choose Y here if you have this FM radio card. You also need to say Y
+ to "ACI mixer (miroPCM12/PCM20)" (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
@@ -10772,6 +10963,9 @@
from the running kernel whenever you want). If you want to compile
it as a module, say M here and read Documentation/modules.txt.
+#
+# ARM options
+#
CPU Optimization
CONFIG_CPU_ARM2
This selects the processor type of your CPU. This is only used to
@@ -10788,40 +10982,154 @@
to set this option to, please consult any information supplied with
your system.
-Include support for CATS boards
+Include support for Chalice 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.
+ Say Y here if you intend to run this kernel on a CATS system.
+
+Include support for Intel EBSA285
+CONFIG_ARCH_EBSA285
+ Say Y here if you intend to run this kernel on an EBSA-285 evaluation
+ board.
+
+Include support for the NetWinder
+CONFIG_ARCH_NETWINDER
+ Say Y here if you intend to run this kernel on the NetWinder.
+
+Math emulation
+CONFIG_NWFPE
+ Say Y to include the NWFPE floating point emulator in the kernel. This
+ is necessary to run most binaries. Linux does not currently support
+ floating point hardware so you need to say Y here even if your machine
+ has an FPA or floating point co-processor podule.
+
+ It is also possible to say M to build the emulator as a module
+ (nwfpe.o) or indeed to leave it out altogether. However, unless you
+ know what you are doing this can easily render your machine unbootable.
+ Saying Y is the safe option.
+
+ You may say N here if you are going to load the Acorn FPEmulator
+ early in the bootup.
+
+DS1620 Thermometer support
+CONFIG_DS1620
+ Say Y here to include support for the thermal management hardware
+ found in the NetWinder. This driver allows the user to control the
+ temperature set points and to read the current temperature.
+
+ It is also possible to say M here to build it as a module (ds1620.o)
+ It is recommended to be used on a NetWinder, but it is not a
+ necessity.
-Debug kernel errors
+Verbose kernel error messages
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
- binutils version >= 2.8.1 to compile the kernel (check with "gcc
- --version" and "ld -v").
+ printed when the kernel detects an internal error. This debugging
+ information is useful to kernel hackers when tracking down problems,
+ but mostly meaningless to other people. It's safe to say Y unless
+ you are concerned with the code size or don't want to see these
+ messages.
Compile kernel with frame pointer
CONFIG_FRAME_POINTER
- If you say Y here, the resulting kernel will be slightly larger, but
- it will give useful debugging/error results. If you don't debug the
- kernel, you can say N.
+ If you say Y here, the resulting kernel will be slightly larger and
+ slower, but it will give useful debugging information. If you don't
+ debug the kernel, you can say N.
+
+User fault debugging
+CONFIG_DEBUG_USER
+ When a user program crashes due to an exception, the kernel can print
+ a brief message explaining what the problem was. This is sometimes
+ helpful for debugging but serves no purpose on a production system.
+ Most people should say N here.
+
+Include gdb debugging information in kernel binary
+CONFIG_DEBUG_INFO
+ Say Y here to include source-level debugging information in the
+ `vmlinux' binary image. This is handy if you want to use gdb or
+ addr2line to debug the kernel. It has no impact on the in-memory
+ footprint of the running kernel but it can increase the amount of
+ time and disk space needed for compilation. If in doubt say N.
+
+Split initialisation functions into discardable section
+CONFIG_TEXT_SECTIONS
+ Normally code that is only used during initialisation is collected
+ into a special area of the kernel so that it can be discarded and
+ the memory reclaimed when initialisation is complete. In addition,
+ if the kernel you wish to build is able to run on multiple
+ architectures, it allows the unused code to be discarded. Some
+ versions of binutils, however, have a bug that causes the kernel
+ to crash during startup when this option is enabled. Say Y unless
+ you experience problems that you suspect may be caused by this.
+
+Disable pgtable cache
+CONFIG_NO_PGT_CACHE
+ Normally the kernel maintains a `quicklist' of preallocated pagetable
+ structures in order to increase performance. On machines with very
+ few pages this may however be a loss. Say Y here to disable the pgtable
+ cache.
+
+RISC OS personality
+CONFIG_ARTHUR
+ Say Y here to include the kernel code necessary if you want to run
+ Acorn RISC OS/Arthur binaries under Linux. This code is still very
+ experimental; if this sounds frightening, say N and sleep in peace.
+ You can also say M here to compile this support as a module (which
+ will be called arthur.o).
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 (e.g., mem=64M
- root=/dev/nfs)
+ On some architectures (EBSA110 and CATS), 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)
+
+Hardware alignment trap
+CONFIG_ALIGNMENT_TRAP
+ ARM processors can not fetch/store information which is not naturally
+ aligned on the bus, ie, a 4 byte fetch must start at an address divisable
+ by 4. On 32-bit ARM processors, these instructions can be emulated in
+ software with a severe performance impact. This is necessary for correct
+ operation of some network protocols. With an IP-only configuration
+ it is safe to say N, otherwise say Y.
+
+21285 serial port support
+CONFIG_SERIAL_21285
+ If you have a machine based on a 21285 (Footbridge) StrongARM/PCI
+ bridge you can enable its onboard serial port by enabling this
+ option. The device has major ID 4, minor 64.
+
+Console on 21285 serial port
+CONFIG_SERIAL_21285_CONSOLE
+ If you have enabled the serial port on the 21285 footbridge you can
+ make it the console by answering 'Y' to this option.
+
+Footbridge Mode
+CONFIG_HOST_FOOTBRIDGE
+ The 21285 Footbridge chip can operate in either `host mode' or
+ `add-in' mode. Say Y if your 21285 is in host mode, and therefore
+ is the configuration master, otherwise say N.
+
+MFM harddisk support
+CONFIG_BLK_DEV_MFM
+ Support the MFM hard drives on the Acorn Archimedes both
+ on-board the A4x0 motherboards and via the Acorn MFM podules.
+ Drives upto 64MB are supported. If you haven't got one of these
+ machines or drives just say 'N'.
+
+Old Archimedes floppy (1772) support
+CONFIG_BLK_DEV_FD1772
+ Support the floppy drive on the Acorn Archimedes (A300, A4x0, A540,
+ R140 and R260) series of computers; it supports only 720K floppies
+ at the moment. If you don't have one of these machines just answer
+ 'N'.
+
+Autodetect hard drive geometry
+CONFIG_BLK_DEV_MFM_AUTODETECT
+ If you answer 'Y' the MFM code will attempt to automatically detect
+ the cylinders/heads/sectors count on your hard drive. WARNING: This
+ sometimes doesn't work and it also does some dodgy stuff which
+ potentially might damage your drive.
IrDA Protocols
CONFIG_IRDA
@@ -10834,7 +11142,7 @@
as well. For more information, see the file
Documentation/networking/irda.txt. You also want to read the
IR-HOWTO, available from
- ftp://metalab.unc.edu:/pub/Linux/docs/HOWTO.
+ ftp://metalab.unc.edu/pub/Linux/docs/HOWTO.
This support is also available as a module. If you want to compile
it as a module, say M here and read Documentation/modules.txt. The
@@ -10864,17 +11172,6 @@
If unsure, say N.
-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
@@ -10912,21 +11209,9 @@
The IrLAN 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 protocol for ac-hoc
+ to another Linux machine running the IrLAN protocol for ad-hoc
networking!
-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 user space, 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
@@ -11331,7 +11616,7 @@
# LocalWords: COSA SRP muni cz kas cosa Alteon AceNIC acenic VTOC OSes GMT SAx
# LocalWords: Inspiron localtime INTS Thinkpads Ralf Brown's Flightstick NNN
# LocalWords: Xterminator Blackhawk NN mpu ioports DCA HPDCA HPLANCE DIO Corel
-# LocalWords: GemTek gemtek CMDLINE IrDA PDA's irmanager irattach RR AVA DN
+# LocalWords: GemTek gemtek CMDLINE IrDA PDA's irmanager irattach RR AVA DN rg
# LocalWords: uit dagb irda LSAP IrLMP RR's IrLAP IR alloc skb's kfree skb's
# LocalWords: GZIP IrLAN NetbeamIR ESI JetEye IrOBEX IrCOMM TTY's minicom dti
# LocalWords: ircomm ircomm pluto thiguchi IrTTY Linux's bps NetWinder MIR NSC
@@ -11340,3 +11625,4 @@
# LocalWords: alphalinux GOBIOS csn chemnitz nat ACARD AMI MegaRAID megaraid
# LocalWords: QNXFS ISI isicom xterms Apollos VPN RCPCI rcpci sgi visws pcmcia
# LocalWords: IrLPT UIRCC Tecra
+
diff -u --recursive --new-file v2.2.7/linux/Documentation/arm/Netwinder linux/Documentation/arm/Netwinder
--- v2.2.7/linux/Documentation/arm/Netwinder Wed Dec 31 16:00:00 1969
+++ linux/Documentation/arm/Netwinder Sun May 2 09:51:16 1999
@@ -0,0 +1,78 @@
+NetWinder specific documentation
+================================
+
+The NetWinder is a small low-power computer, primarily designed
+to run Linux. It is based around the StrongARM RISC processor,
+DC21285 PCI bridge, with PC-type hardware glued around it.
+
+Port usage
+==========
+
+Min - Max Description
+---------------------------
+0x0000 - 0x000f DMA1
+0x0020 - 0x0021 PIC1
+0x0060 - 0x006f Keyboard
+0x0070 - 0x007f RTC
+0x0080 - 0x0087 DMA1
+0x0088 - 0x008f DMA2
+0x00a0 - 0x00a3 PIC2
+0x00c0 - 0x00df DMA2
+0x0180 - 0x0187 IRDA
+0x01f0 - 0x01f6 ide0
+0x0201 Game port
+0x0203 RWA010 configuration read
+0x0220 - ? SoundBlaster
+0x0250 - ? WaveArtist
+0x0279 RWA010 configuration index
+0x02f8 - 0x02ff Serial ttyS1
+0x0300 - 0x031f Ether10
+0x0338 GPIO1
+0x033a GPIO2
+0x0370 - 0x0371 W83977F configuration registers
+0x0388 - ? AdLib
+0x03c0 - 0x03df VGA
+0x03f6 ide0
+0x03f8 - 0x03ff Serial ttyS0
+0x0400 - 0x0408 DC21143
+0x0480 - 0x0487 DMA1
+0x0488 - 0x048f DMA2
+0x0a79 RWA010 configuration write
+0xe800 - 0xe80f ide0/ide1 BM DMA
+
+
+Interrupt usage
+===============
+
+IRQ type Description
+---------------------------
+ 0 ISA 100Hz timer
+ 1 ISA Keyboard
+ 2 ISA cascade
+ 3 ISA Serial ttyS1
+ 4 ISA Serial ttyS0
+ 5 ISA PS/2 mouse
+ 6 ISA IRDA
+ 7 ISA Printer
+ 8 ISA RTC alarm
+ 9 ISA
+10 ISA GP10 (Orange reset button)
+11 ISA
+12 ISA WaveArtist
+13 ISA
+14 ISA hda1
+15 ISA
+
+DMA usage
+=========
+
+DMA type Description
+---------------------------
+ 0 ISA IRDA
+ 1 ISA
+ 2 ISA cascade
+ 3 ISA WaveArtist
+ 4 ISA
+ 5 ISA
+ 6 ISA
+ 7 ISA WaveArtist
diff -u --recursive --new-file v2.2.7/linux/Documentation/arm/README linux/Documentation/arm/README
--- v2.2.7/linux/Documentation/arm/README Wed Dec 31 16:00:00 1969
+++ linux/Documentation/arm/README Sun May 2 09:51:16 1999
@@ -0,0 +1,139 @@
+ ARM Linux 2.2.3
+ ===============
+
+ * NOTE * The ARM support in the mainstream Linux kernel sources
+ is not up to date. Please check ftp.arm.uk.linux.org:/pub/armlinux
+ for latest updates.
+
+Compilation of kernel
+---------------------
+
+ In order to compile ARM Linux, you will need a compiler capable of
+ generating ARM ELF code with GNU extensions. GCC-2.7.2.2 ELF, GCC 2.8.1
+ and EGCS are good compilers. Note that GCC-2.7.2.2 ELF is rare, and
+ you probably don't have it.
+
+ To build ARM Linux natively, you shouldn't have to alter the ARCH = line in
+ the top level Makefile. However, if you don't have the ARM Linux ELF tools
+ installed as default, then you should change the CROSS_COMPILE line as
+ detailed below.
+
+ If you wish to cross-compile, then alter the following lines in the top
+ level make file:
+
+ ARCH =
+ with
+ ARCH = arm
+
+ and
+
+ CROSS_COMPILE=
+ to
+ CROSS_COMPILE=
+ eg.
+ CROSS_COMPILE=arm-linux-
+
+ Do a 'make config', followed by 'make dep', and finally 'make Image' to
+ build the kernel (arch/arm/boot/Image). A compressed image can be built
+ by doing a 'make zImage' instead of 'make Image'.
+
+
+Bug reports etc
+---------------
+
+ Please send patches, bug reports and code for the ARM Linux project
+ to linux@arm.linux.org.uk Patches will not be included into future
+ kernels unless they come to me (or the relevant person concerned).
+
+ When sending bug reports, please ensure that they contain all relevant
+ information, eg. the kernel messages that were printed before/during
+ the problem, what you were doing, etc.
+
+ For patches, please include some explanation as to what the patch does
+ and why (if relevant).
+
+
+Modules
+-------
+
+ Although modularisation is supported (and required for the FP emulator),
+ each module on an arm2/arm250/arm3 machine when is loaded will take
+ memory up to the next 32k boundary due to the size of the pages. Hence is
+ modularisation on these machines really worth it?
+
+ However, arm6 and up machines allow modules to take multiples of 4k, and
+ as such Acorn RiscPCs and other architectures using these processors can
+ make good use of modularisation.
+
+
+ADFS Image files
+----------------
+
+ You can access image files on your ADFS partitions by mounting the ADFS
+ partition, and then using the loopback device driver. You must have
+ losetup installed.
+
+ Please note that the PCEmulator DOS partitions have a partition table at
+ the start, and as such, you will have to give '-o offset' to losetup.
+
+
+Request to developers
+---------------------
+
+ When writing device drivers which include a separate assembler file, please
+ include it in with the C file, and not the arch/arm/lib directory. This
+ allows the driver to be compiled as a loadable module without requiring
+ half the code to be compiled into the kernel image.
+
+ In general, try to avoid using assembler unless it is really necessary. It
+ makes drivers far less easy to port to other hardware.
+
+
+ST506 hard drives
+-----------------
+
+ The ST506 hard drive controllers seem to be working fine (if a little
+ slowly). At the moment they will only work off the controllers on an
+ A4x0's motherboard, but for it to work off a Podule just requires
+ someone with a podule to add the addresses for the IRQ mask and the
+ HDC base to the source.
+
+ As of 31/3/96 it works with two drives (you should get the ADFS
+ *configure harddrive set to 2). I've got an internal 20MB and a great
+ big external 5.25" FH 64MB drive (who could ever want more :-) ).
+
+ I've just got 240K/s off it (a dd with bs=128k); thats about half of what
+ RiscOS gets; but it's a heck of a lot better than the 50K/s I was getting
+ last week :-)
+
+ Known bug: Drive data errors can cause a hang; including cases where
+ the controller has fixed the error using ECC. (Possibly ONLY
+ in that case...hmm).
+
+
+1772 Floppy
+-----------
+ This also seems to work OK, but hasn't been stressed much lately. It
+ hasn't got any code for disc change detection in there at the moment which
+ could be a bit of a problem! Suggestions on the correct way to do this
+ are welcome.
+
+
+Kernel entry (head-armv.S)
+--------------------------
+ The initial entry into the kernel made via head-armv.S uses architecture
+ independent code. The architecture is selected by the value of 'r1' on
+ entry, which must be kept unique. You can register a new architecture
+ by mailing the following details to rmk@arm.uk.linux.org. Please give
+ the mail a subject of 'Register new architecture':
+
+ Name:
+ ARCHDIR:
+ Description:
+
+
+ Please follow this format - it is an automated system. You should
+ receive a reply the next day.
+
+---
+Russell King (27/03/1999)
diff -u --recursive --new-file v2.2.7/linux/Documentation/arm/nwfpe/NOTES linux/Documentation/arm/nwfpe/NOTES
--- v2.2.7/linux/Documentation/arm/nwfpe/NOTES Wed Dec 31 16:00:00 1969
+++ linux/Documentation/arm/nwfpe/NOTES Sun May 2 09:51:16 1999
@@ -0,0 +1,29 @@
+There seems to be a problem with exp(double) and our emulator. I haven't
+been able to track it down yet. This does not occur with the emulator
+supplied by Russell King.
+
+I also found one oddity in the emulator. I don't think it is serious but
+will point it out. The ARM calling conventions require floating point
+registers f4-f7 to be preserved over a function call. The compiler quite
+often uses an stfe instruction to save f4 on the stack upon entry to a
+function, and an ldfe instruction to restore it before returning.
+
+I was looking at some code, that calculated a double result, stored it in f4
+then made a function call. Upon return from the function call the number in
+f4 had been converted to an extended value in the emulator.
+
+This is a side effect of the stfe instruction. The double in f4 had to be
+converted to extended, then stored. If an lfm/sfm combination had been used,
+then no conversion would occur. This has performance considerations. The
+result from the function call and f4 were used in a multiplication. If the
+emulator sees a multiply of a double and extended, it promotes the double to
+extended, then does the multiply in extended precision.
+
+This code will cause this problem:
+
+double x, y, z;
+z = log(x)/log(y);
+
+The result of log(x) (a double) will be calculated, returned in f0, then
+moved to f4 to preserve it over the log(y) call. The division will be done
+in extended precision, due to the stfe instruction used to save f4 in log(y).
diff -u --recursive --new-file v2.2.7/linux/Documentation/arm/nwfpe/README linux/Documentation/arm/nwfpe/README
--- v2.2.7/linux/Documentation/arm/nwfpe/README Wed Dec 31 16:00:00 1969
+++ linux/Documentation/arm/nwfpe/README Sun May 2 09:51:16 1999
@@ -0,0 +1,70 @@
+This directory contains the version 0.92 test release of the NetWinder
+Floating Point Emulator.
+
+The majority of the code was written by me, Scott Bambrough It is
+written in C, with a small number of routines in inline assembler
+where required. It was written quickly, with a goal of implementing a
+working version of all the floating point instructions the compiler
+emits as the first target. I have attempted to be as optimal as
+possible, but there remains much room for improvement.
+
+I have attempted to make the emulator as portable as possible. One of
+the problems is with leading underscores on kernel symbols. Elf
+kernels have no leading underscores, a.out compiled kernels do. I
+have attempted to use the C_SYMBOL_NAME macro wherever this may be
+important.
+
+Another choice I made was in the file structure. I have attempted to
+contain all operating system specfic code in one module (fpmodule.*).
+All the other files contain emulator specific code. This should allow
+others to port the emulator to NetBSD for instance relatively easily.
+
+The floating point operations are based on SoftFloat Release 2, by
+John Hauser. SoftFloat is a software implementation of floating-point
+that conforms to the IEC/IEEE Standard for Binary Floating-point
+Arithmetic. As many as four formats are supported: single precision,
+double precision, extended double precision, and quadruple precision.
+All operations required by the standard are implemented, except for
+conversions to and from decimal. We use only the single precision,
+double precision and extended double precision formats. The port of
+SoftFloat to the ARM was done by Phil Blundell, based on an earlier
+port of SoftFloat version 1 by Neil Carson for NetBSD/arm32.
+
+The file README.FPE contains a description of what has been implemented
+so far in the emulator. The file TODO contains a information on what
+remains to be done, and other ideas for the emulator.
+
+Bug reports, comments, suggestions should be directed to me at
+. General reports of "this program doesn't
+work correctly when your emulator is installed" are useful for
+determining that bugs still exist; but are virtually useless when
+attempting to isolate the problem. Please report them, but don't
+expect quick action. Bugs still exist. The problem remains in isolating
+which instruction contains the bug. Small programs illustrating a specific
+problem are a godsend.
+
+Legal Notices
+-------------
+
+The NetWinder Floating Point Emulator is free software. Everything Corel
+has written is provided under the GNU GPL. See the file COPYING for copying
+conditions. Excluded from the above is the SoftFloat code. John Hauser's
+legal notice for SoftFloat is included below.
+
+-------------------------------------------------------------------------------
+SoftFloat Legal Notice
+
+SoftFloat was written by John R. Hauser. This work was made possible in
+part by the International Computer Science Institute, located at Suite 600,
+1947 Center Street, Berkeley, California 94704. Funding was partially
+provided by the National Science Foundation under grant MIP-9311980. The
+original version of this code was written as part of a project to build
+a fixed-point vector processor in collaboration with the University of
+California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort
+has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
+TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO
+PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
+AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
+-------------------------------------------------------------------------------
diff -u --recursive --new-file v2.2.7/linux/Documentation/arm/nwfpe/README.FPE linux/Documentation/arm/nwfpe/README.FPE
--- v2.2.7/linux/Documentation/arm/nwfpe/README.FPE Wed Dec 31 16:00:00 1969
+++ linux/Documentation/arm/nwfpe/README.FPE Sun May 2 09:51:16 1999
@@ -0,0 +1,156 @@
+The following describes the current state of the NetWinder's floating point
+emulator.
+
+In the following nomenclature is used to describe the floating point
+instructions. It follows the conventions in the ARM manual.
+
+ = , no default
+{P|M|Z} = {round to +infinity,round to -infinity,round to zero},
+ default = round to nearest
+
+Note: items enclosed in {} are optional.
+
+Floating Point Coprocessor Data Transfer Instructions (CPDT)
+------------------------------------------------------------
+
+LDF/STF - load and store floating
+
+{cond} Fd, Rn
+{cond} Fd, [Rn, #]{!}
+{cond} Fd, [Rn], #
+
+These instructions are fully implemented.
+
+LFM/SFM - load and store multiple floating
+
+Form 1 syntax:
+{cond} Fd, , [Rn]
+{cond} Fd, , [Rn, #]{!}
+{cond} Fd, , [Rn], #
+
+Form 2 syntax:
+{cond} Fd, , [Rn]{!}
+
+These instructions are fully implemented. They store/load three words
+for each floating point register into the memory location given in the
+instruction. The format in memory is unlikely to be compatible with
+other implementations, in particular the actual hardware. Specific
+mention of this is made in the ARM manuals.
+
+Floating Point Coprocessor Register Transfer Instructions (CPRT)
+----------------------------------------------------------------
+
+Conversions, read/write status/control register instructions
+
+FLT{cond}{P,M,Z} Fn, Rd Convert integer to floating point
+FIX{cond}{P,M,Z} Rd, Fn Convert floating point to integer
+WFS{cond} Rd Write floating point status register
+RFS{cond} Rd Read floating point status register
+WFC{cond} Rd Write floating point control register
+RFC{cond} Rd Read floating point control register
+
+FLT/FIX are fully implemented.
+
+RFS/WFS are fully implemented.
+
+RFC/WFC are fully implemented. RFC/WFC are supervisor only instructions, and
+presently check the CPU mode, and do an invalid instruction trap if not called
+from supervisor mode.
+
+Compare instructions
+
+CMF{cond} Fn, Fm Compare floating
+CMFE{cond} Fn, Fm Compare floating with exception
+CNF{cond} Fn, Fm Compare negated floating
+CNFE{cond} Fn, Fm Compare negated floating with exception
+
+These are fully implemented.
+
+Floating Point Coprocessor Data Instructions (CPDT)
+---------------------------------------------------
+
+Dyadic operations:
+
+ADF{cond}{P,M,Z} Fd, Fn, - add
+SUF{cond}{P,M,Z} Fd, Fn, - subtract
+RSF{cond}{P,M,Z} Fd, Fn, - reverse subtract
+MUF{cond}{P,M,Z} Fd, Fn, - multiply
+DVF{cond}{P,M,Z} Fd, Fn, - divide
+RDV{cond}{P,M,Z} Fd, Fn, - reverse divide
+
+These are fully implemented.
+
+FML{cond}{P,M,Z} Fd, Fn, - fast multiply
+FDV{cond}{P,M,Z} Fd, Fn, - fast divide
+FRD{cond}{P,M,Z} Fd, Fn, - fast reverse divide
+
+These are fully implemented as well. They use the same algorithm as the
+non-fast versions. Hence, in this implementation their performance is
+equivalent to the MUF/DVF/RDV instructions. This is acceptable according
+to the ARM manual. The manual notes these are defined only for single
+operands, on the actual FPA11 hardware they do not work for double or
+extended precision operands. The emulator currently does not check
+the requested permissions conditions, and performs the requested operation.
+
+RMF{cond}{P,M,Z} Fd, Fn, - IEEE remainder
+
+This is fully implemented.
+
+Monadic operations:
+
+MVF{cond}{P,M,Z} Fd, - move
+MNF{cond}{P,M,Z} Fd, - move negated
+
+These are fully implemented.
+
+ABS{cond}{P,M,Z} Fd, - absolute value
+SQT{cond}{P,M,Z} Fd, - square root
+RND{cond}{P,M,Z} Fd, - round
+
+These are fully implemented.
+
+URD{cond}{P,M,Z} Fd, - unnormalized round
+NRM{cond}{P,M,Z} Fd, - normalize
+
+These are implemented. URD is implemented using the same code as the RND
+instruction. Since URD cannot return a unnormalized number, NRM becomes
+a NOP.
+
+Library calls:
+
+POW{cond}{P,M,Z} Fd, Fn, - power
+RPW{cond}{P,M,Z} Fd, Fn, - reverse power
+POL{cond}{P,M,Z} Fd, Fn, - polar angle (arctan2)
+
+LOG{cond}{P,M,Z} Fd, - logarithm to base 10
+LGN{cond}{P,M,Z} Fd, - logarithm to base e
+EXP{cond}{P,M,Z} Fd, - exponent
+SIN{cond}{P,M,Z} Fd, - sine
+COS{cond}{P,M,Z} Fd, - cosine
+TAN{cond}{P,M,Z} Fd, - tangent
+ASN{cond}{P,M,Z} Fd, - arcsine
+ACS{cond}{P,M,Z} Fd, - arccosine
+ATN{cond}{P,M,Z} Fd, - arctangent
+
+These are not implemented. They are not currently issued by the compiler,
+and are handled by routines in libc. These are not implemented by the FPA11
+hardware, but are handled by the floating point support code. They should
+be implemented in future versions.
+
+Signalling:
+
+Signals are implemented. However current ELF kernels produced by Corel
+Computer have a bug in them that prevents the module from generating a
+SIGFPE. This is caused by a failure to alias fp_current to the kernel
+variable current_set[0] correctly.
+
+The kernel provided with this distribution (vmlinux-nwfpe-0.93) contains
+a fix for this problem and also incorporates the current version of the
+emulator directly. It is possible to run with no floating point module
+loaded with this kernel. It is provided as a demonstration of the
+technology and for those who want to do floating point work that depends
+on signals. It is not strictly necessary to use the module.
+
+A module (either the one provided by Russell King, or the one in this
+distribution) can be loaded to replace the functionality of the emulator
+built into the kernel.
diff -u --recursive --new-file v2.2.7/linux/Documentation/arm/nwfpe/TODO linux/Documentation/arm/nwfpe/TODO
--- v2.2.7/linux/Documentation/arm/nwfpe/TODO Wed Dec 31 16:00:00 1969
+++ linux/Documentation/arm/nwfpe/TODO Sun May 2 09:51:16 1999
@@ -0,0 +1,67 @@
+TODO LIST
+---------
+
+POW{cond}{P,M,Z} Fd, Fn, - power
+RPW{cond}{P,M,Z} Fd, Fn, - reverse power
+POL{cond}{P,M,Z} Fd, Fn, - polar angle (arctan2)
+
+LOG{cond}{P,M,Z} Fd, - logarithm to base 10
+LGN{cond}{P,M,Z} Fd, - logarithm to base e
+EXP{cond}{P,M,Z} Fd, - exponent
+SIN{cond}{P,M,Z} Fd, - sine
+COS{cond}{P,M,Z} Fd, - cosine
+TAN{cond}{P,M,Z} Fd, - tangent
+ASN{cond}{P,M,Z} Fd, - arcsine
+ACS{cond}{P,M,Z} Fd, - arccosine
+ATN{cond}{P,M,Z} Fd, - arctangent
+
+These are not implemented. They are not currently issued by the compiler,
+and are handled by routines in libc. These are not implemented by the FPA11
+hardware, but are handled by the floating point support code. They should
+be implemented in future versions.
+
+There are a couple of ways to approach the implementation of these. One
+method would be to use accurate table methods for these routines. I have
+a couple of papers by S. Gal from IBM's research labs in Haifa, Israel that
+seem to promise extreme accuracy (in the order of 99.8%) and reasonable speed.
+These methods are used in GLIBC for some of the transcendental functions.
+
+Another approach, which I know little about is CORDIC. This stands for
+Coordinate Rotation Digital Computer, and is a method of computing
+transcendental functions using mostly shifts and adds and a few
+multiplications and divisions. The ARM excels at shifts and adds,
+so such a method could be promising, but requires more research to
+determine if it is feasible.
+
+Rounding Methods
+
+The IEEE standard defines 4 rounding modes. Round to nearest is the
+default, but rounding to + or - infinity or round to zero are also allowed.
+Many architectures allow the rounding mode to be specified by modifying bits
+in a control register. Not so with the ARM FPA11 architecture. To change
+the rounding mode one must specify it with each instruction.
+
+This has made porting some benchmarks difficult. It is possible to
+introduce such a capability into the emulator. The FPCR contains
+bits describing the rounding mode. The emulator could be altered to
+examine a flag, which if set forced it to ignore the rounding mode in
+the instruction, and use the mode specified in the bits in the FPCR.
+
+This would require a method of getting/setting the flag, and the bits
+in the FPCR. This requires a kernel call in ArmLinux, as WFC/RFC are
+supervisor only instructions. If anyone has any ideas or comments I
+would like to hear them.
+
+[NOTE: pulled out from some docs on ARM floating point, specifically
+ for the Acorn FPE, but not limited to it:
+
+ The floating point control register (FPCR) may only be present in some
+ implementations: it is there to control the hardware in an implementation-
+ specific manner, for example to disable the floating point system. The user
+ mode of the ARM is not permitted to use this register (since the right is
+ reserved to alter it between implementations) and the WFC and RFC
+ instructions will trap if tried in user mode.
+
+ Hence, the answer is yes, you could do this, but then you will run a high
+ risk of becoming isolated if and when hardware FP emulation comes out
+ -- Russell].
diff -u --recursive --new-file v2.2.7/linux/Documentation/digiboard.txt linux/Documentation/digiboard.txt
--- v2.2.7/linux/Documentation/digiboard.txt Fri Jan 8 22:35:58 1999
+++ linux/Documentation/digiboard.txt Thu Apr 29 11:53:41 1999
@@ -111,7 +111,7 @@
Boot-time configuration when linked into the kernel
---------------------------------------------------
-Per Board to be configured, pass a digi= commandline parameter to the
+Per board to be configured, pass a digi= command-line parameter to the
kernel using lilo or loadlin. It consists of a string of comma separated
identifiers or integers. The 6 values in order are:
@@ -142,7 +142,7 @@
append="digi=1,0,0,16,512,851968"
-If you don't give a digi= commandline, the compiled-in defaults of
+If you don't give a digi= command line, the compiled-in defaults of
board 1: io=0x200, membase=0xd0000, altpin=off and numports=16 are used.
If you have the resources (io&mem) free for use, configure your board to
@@ -153,9 +153,9 @@
Sources of Information
----------------------
-Webpage: http://private.fuller.edu/clameter/digi.html
+Web page: http://private.fuller.edu/clameter/digi.html
-Mailing List: digiboard@list.fuller.edu
+Mailing list: digiboard@list.fuller.edu
(Write e-mail to that address to subscribe. Common ListServ commands work.
Archive of messages available)
diff -u --recursive --new-file v2.2.7/linux/Documentation/digiepca.txt linux/Documentation/digiepca.txt
--- v2.2.7/linux/Documentation/digiepca.txt Fri Jan 8 22:35:58 1999
+++ linux/Documentation/digiepca.txt Thu Apr 29 11:53:41 1999
@@ -11,7 +11,7 @@
The Linux MAKEDEV command does not support generating the Digiboard
Devices. Users executing digiConfig to setup EISA and PC series cards
-will have their device nodes automaticly constructed (cud?? for ~CLOCAL,
+will have their device nodes automatically constructed (cud?? for ~CLOCAL,
and ttyD?? for CLOCAL). Users wishing to boot their board from the LILO
prompt, or those users booting PCI cards may use buildDIGI to construct
the necessary nodes.
@@ -19,7 +19,7 @@
Notes:
------
This driver may be configured via LILO. For users who have already configured
-their driver using digiConfig, configuring from lilo will override previous
+their driver using digiConfig, configuring from LILO will override previous
settings. Multiple boards may be configured by issuing multiple LILO command
lines. For examples see the bottom of this document.
diff -u --recursive --new-file v2.2.7/linux/Documentation/fb/matroxfb.txt linux/Documentation/fb/matroxfb.txt
--- v2.2.7/linux/Documentation/fb/matroxfb.txt Wed Apr 28 11:37:29 1999
+++ linux/Documentation/fb/matroxfb.txt Thu Apr 29 11:53:41 1999
@@ -95,11 +95,11 @@
=======
Driver contains SVGALib compatibility code. It is turned on by choosing textual
-mode for console. You can do it at boottime by using videomode
+mode for console. You can do it at boot time 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.
+Switching to another console and back fixes it. I hope that it is SVGALib's
+problem and not mine, but I'm not sure.
Configuration
@@ -113,7 +113,7 @@
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).
+ memory usable for on-screen display (i.e. max. 8 MB).
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
@@ -159,7 +159,7 @@
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.
+noinv24 - use standard timings. It is the 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,
@@ -252,25 +252,25 @@
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,
+ + interlaced text mode is not supported; it looks like hardware limitation,
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
+ 83 MHz on G200
+ 66 MHz on Millennium I
+ 60 MHz on Millennium II
+ Because I have no 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).
+ set frequency higher that this. It causes sparks, black holes and other
+ pretty effects on screen. Device was not destroyed during tests. :-)
+ + my Millennium G200 oscillator has frequency range from 35 MHz to 380 MHz
+ (and it works with 8bpp on about 320 MHz dotclocks (and changed mclk)).
+ But Matrox says on product sheet that VCO limit is 50-250 MHz, so I believe
+ them (maybe that chip overheats, but it has a very big cooler (G100 has
+ none), so it should work).
+ special mixed video/graphics videomodes of Mystique and Gx00 - 2G8V16 and
G16V16 are not supported
+ color keying is not supported
@@ -281,14 +281,14 @@
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.
+ + 4bpp is available only on Millennium I and Millennium II. It is hardware
+ limitation.
+ 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.
+ 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.
+ Millennium I/II and SVGALib compatibility.
Benchmarks
@@ -296,14 +296,14 @@
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).
+16 seconds, i.e. 187 MBps).
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
+faster, it is kernel-space only time on P-II/350 MHz, Millennium I in 33 MHz
PCI slot, G200 in AGP 2x slot. I did not test vgacon.
NOACCEL
8x16 12x22
- MilleniumI G200 MilleniumI G200
+ Millennium I G200 Millennium I 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
@@ -311,7 +311,7 @@
ACCEL, nofastfont
8x16 12x22 6x11
- MilleniumI G200 MilleniumI G200 MilleniumI G200
+ Millennium I G200 Millennium I G200 Millennium I 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
@@ -319,7 +319,7 @@
ACCEL, fastfont
8x16 12x22 6x11
- MilleniumI G200 MilleniumI G200 MilleniumI G200
+ Millennium I G200 Millennium I G200 Millennium I 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
@@ -327,10 +327,10 @@
TEXT
8x16
- MilleniumI G200
+ Millennium I G200
TEXT 3.29 1.50
-* Yes, it is slower than Millenium I.
+* Yes, it is slower than Millennium I.
--
Petr Vandrovec
diff -u --recursive --new-file v2.2.7/linux/Documentation/fb/vesafb.txt linux/Documentation/fb/vesafb.txt
--- v2.2.7/linux/Documentation/fb/vesafb.txt Fri Apr 16 14:47:30 1999
+++ linux/Documentation/fb/vesafb.txt Thu Apr 29 11:53:41 1999
@@ -10,7 +10,7 @@
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 Extensions
Version 2.0 are required, because we need a linear frame buffer.
Advantages:
@@ -66,10 +66,10 @@
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.
+If this does not work, this might be because your BIOS does not support
+linear framebuffers or because 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
+Extensions 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
@@ -99,8 +99,8 @@
available) and boot linux with loadlin.
* use a native driver (matroxfb/atyfb) instead if vesafb. If none
is available, write a new one!
- * VBE 3.0 might work too. I havn't neither a gfx board with VBE 3.0
- support nor the specs, so I havn't checked this yet. But maybe...
+ * VBE 3.0 might work too. I have neither a gfx board with VBE 3.0
+ support nor the specs, so I have not checked this yet.
Configuration
@@ -108,7 +108,7 @@
The VESA BIOS provides protected mode interface for changing
some parameters. vesafb can use it for palette changes and
-to pan the display. It is turned off by default becauce it
+to pan the display. It is turned off by default because it
seems not to work with some BIOS versions, but there are options
to turn it on.
@@ -124,7 +124,7 @@
interface. The visible screen is just a window of the
video memory, console scrolling is done by changing the
start of the window.
- pro: * scrolling (fullscreen) is fast, becauce there is
+ pro: * scrolling (fullscreen) is fast, because there is
no need to copy around data.
* You'll get scrollback (the Shift-PgUp thing),
the video memory can be used as scrollback buffer
diff -u --recursive --new-file v2.2.7/linux/Documentation/filesystems/00-INDEX linux/Documentation/filesystems/00-INDEX
--- v2.2.7/linux/Documentation/filesystems/00-INDEX Fri Apr 16 14:47:30 1999
+++ linux/Documentation/filesystems/00-INDEX Sun May 2 09:51:16 1999
@@ -1,5 +1,7 @@
00-INDEX
- this file (info on some of the filesystems supported by linux).
+adfs.txt
+ - info and mount options for the Acorn Advanced Disc Filing System.
affs.txt
- info and mount options for the Amiga Fast File System.
coda.txt
diff -u --recursive --new-file v2.2.7/linux/Documentation/filesystems/adfs.txt linux/Documentation/filesystems/adfs.txt
--- v2.2.7/linux/Documentation/filesystems/adfs.txt Wed Dec 31 16:00:00 1969
+++ linux/Documentation/filesystems/adfs.txt Sun May 2 09:51:16 1999
@@ -0,0 +1,57 @@
+Mount options for ADFS
+----------------------
+
+ uid=nnn All files in the partition will be owned by
+ user id nnn. Default 0 (root).
+ gid=nnn All files in the partition willbe in group
+ nnn. Default 0 (root).
+ ownmask=nnn The permission mask for ADFS 'owner' permissions
+ will be nnn. Default 0700.
+ othmask=nnn The permission mask for ADFS 'other' permissions
+ will be nnn. Default 0077.
+
+Mapping of ADFS permissions to Linux permissions
+------------------------------------------------
+
+ ADFS permissions consist of the following:
+
+ Owner read
+ Owner write
+ Other read
+ Other write
+
+ (In older versions, an 'execute' permission did exist, but this
+ does not hold the same meaning as the Linux 'execute' permission
+ and is now obsolete).
+
+ The mapping is performed as follows:
+
+ Owner read -> -r--r--r--
+ Owner write -> --w--w---w
+ Owner read and filetype UnixExec -> ---x--x--x
+ These are then masked by ownmask, eg 700 -> -rwx------
+ Possible owner mode permissions -> -rwx------
+
+ Other read -> -r--r--r--
+ Other write -> --w--w--w-
+ Other read and filetype UnixExec -> ---x--x--x
+ These are then masked by othmask, eg 077 -> ----rwxrwx
+ Possible other mode permissions -> ----rwxrwx
+
+ Hence, with the default masks, if a file is owner read/write, and
+ not a UnixExec filetype, then the permissions will be:
+
+ -rw-------
+
+ However, if the masks were ownmask=0770,othmask=0007, then this would
+ be modified to:
+ -rw-rw----
+
+ There is no restriction on what you can do with these masks. You may
+ wish that either read bits give read access to the file for all, but
+ keep the default write protection (ownmask=0755,othmask=0577):
+
+ -rw-r--r--
+
+ You can therefore tailor the permission translation to whatever you
+ desire the permissions should be under Linux.
diff -u --recursive --new-file v2.2.7/linux/Documentation/filesystems/coda.txt linux/Documentation/filesystems/coda.txt
--- v2.2.7/linux/Documentation/filesystems/coda.txt Wed Jun 24 22:54:02 1998
+++ linux/Documentation/filesystems/coda.txt Thu Apr 29 11:53:41 1999
@@ -776,7 +776,7 @@
indicate confusion between the system call creat and the VFS operation
create. The VFS operation create is only called to create new objects.
This create call differs from the Unix one in that it is not invoked
- to return a file descriptor. The trunctate and exclusive options,
+ to return a file descriptor. The truncate and exclusive options,
together with the mode, could simply be part of the mode as it is
under Unix. There should be no flags argument; this is used in open
(2) to return a file descriptor for READ or WRITE mode.
diff -u --recursive --new-file v2.2.7/linux/Documentation/filesystems/smbfs.txt linux/Documentation/filesystems/smbfs.txt
--- v2.2.7/linux/Documentation/filesystems/smbfs.txt Fri Jan 23 18:10:31 1998
+++ linux/Documentation/filesystems/smbfs.txt Thu Apr 29 11:53:41 1999
@@ -1,7 +1,7 @@
Smbfs is a filesystem that implements the SMB protocol, which is the
protocol used by Windows for Workgroups, Windows 95 and Windows NT.
Smbfs was inspired by Samba, the program written by Andrew Tridgell
-that turns any unix host into a file server for DOS or Windows clients.
+that turns any Unix host into a file server for DOS or Windows clients.
See ftp://nimbus.anu.edu.au/pub/tridge/samba/ for this interesting
program suite and much more information on SMB, NetBIOS over TCP/IP,
and explanations for concepts like netbios name or share.
diff -u --recursive --new-file v2.2.7/linux/Documentation/filesystems/vfat.txt linux/Documentation/filesystems/vfat.txt
--- v2.2.7/linux/Documentation/filesystems/vfat.txt Wed Jun 24 22:54:02 1998
+++ linux/Documentation/filesystems/vfat.txt Thu Apr 29 11:53:41 1999
@@ -177,7 +177,7 @@
Because the extended FAT system is backward compatible, it is
possible for old software to modify directory entries. Measures must
-be taken to insure the validity of slots. An extended FAT system can
+be taken to ensure the validity of slots. An extended FAT system can
verify that a slot does in fact belong to an 8.3 directory entry by
the following:
diff -u --recursive --new-file v2.2.7/linux/Documentation/ftape.txt linux/Documentation/ftape.txt
--- v2.2.7/linux/Documentation/ftape.txt Sun Jun 7 11:16:25 1998
+++ linux/Documentation/ftape.txt Mon May 10 13:00:10 1999
@@ -267,9 +267,9 @@
ii. Hardware setup
BASE is the base address of your floppy disk controller,
- IRQ and DMA give its interrupt and dma channel, respectively.
- BOOL is an integer, "0" means: "NO!", any other value means:
- "YES!". You don't need to specify anything if connecting your tape
+ IRQ and DMA give its interrupt and DMA channel, respectively.
+ BOOL is an integer, "0" means "no"; any other value means
+ "yes". You don't need to specify anything if connecting your tape
drive to the standard floppy disk controller. All of these
values have reasonable defaults. The defaults can be modified
during kernel configuration, i.e. while running "make config",
diff -u --recursive --new-file v2.2.7/linux/Documentation/kernel-docs.txt linux/Documentation/kernel-docs.txt
--- v2.2.7/linux/Documentation/kernel-docs.txt Thu Jan 7 15:11:35 1999
+++ linux/Documentation/kernel-docs.txt Mon May 10 13:00:10 1999
@@ -18,7 +18,7 @@
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.
+ philosophy and design decisions 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
@@ -33,7 +33,7 @@
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"
+ helpful when searching for specific topics, and a brief "Description"
of the Document.
Enjoy!
@@ -170,9 +170,9 @@
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.
+ directory. Each file has a one- or two-line paragraph to
+ describe it. Also, sk_buffs is explained with some
+ beautiful pictures. A little bit outdated.
+ Title: "Linux ioctl() Primer"
Author: Vipul Gupta.
@@ -222,7 +222,7 @@
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.
+ accessing 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.
@@ -298,7 +298,7 @@
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.
+ Thursday.
+ Name: CuTTiNG.eDGe.LiNuX.
URL: http://edge.linuxhq.com
diff -u --recursive --new-file v2.2.7/linux/Documentation/mtrr.txt linux/Documentation/mtrr.txt
--- v2.2.7/linux/Documentation/mtrr.txt Thu May 7 22:51:46 1998
+++ linux/Documentation/mtrr.txt Mon May 10 10:32:45 1999
@@ -62,6 +62,23 @@
ioctl() interface, so users won't have to do anything. If you use a
commercial X server, lobby your vendor to add support for MTRRs.
===============================================================================
+Creating overlapping MTRRs:
+
+%echo "base=0xfb000000 size=0x1000000 type=write-combining" >/proc/mtrr
+%echo "base=0xfb000000 size=0x1000 type=uncachable" >/proc/mtrr
+
+And the results: cat /proc/mtrr
+reg00: base=0x00000000 ( 0MB), size= 64MB: write-back, count=1
+reg01: base=0xfb000000 (4016MB), size= 16MB: write-combining, count=1
+reg02: base=0xfb000000 (4016MB), size= 4kB: uncachable, count=1
+
+Some cards (especially Voodoo Graphics boards) need this 4 kB area
+excluded from the beginning of the region because it is used for
+registers.
+
+NOTE: You can only create type=uncachable region, if the first
+region that you created is type=write-combining.
+===============================================================================
Removing MTRRs from the shell:
% echo "disable=2" >! /proc/mtrr
===============================================================================
diff -u --recursive --new-file v2.2.7/linux/Documentation/networking/filter.txt linux/Documentation/networking/filter.txt
--- v2.2.7/linux/Documentation/networking/filter.txt Sun Jun 7 11:16:26 1998
+++ linux/Documentation/networking/filter.txt Thu Apr 29 11:53:41 1999
@@ -12,7 +12,7 @@
attach a filter onto any socket and allow or disallow certain
types of data to come through the socket. LSF follows exactly
the same filter code structure as the BSD Berkeley Packet Filter
-(BPF), so refering to the BSD bpf.4 manpage is very helpful in
+(BPF), so referring to the BSD bpf.4 manpage is very helpful in
creating filters.
LSF is much simpler than BPF. One does not have to worry about
diff -u --recursive --new-file v2.2.7/linux/Documentation/networking/ip-sysctl.txt linux/Documentation/networking/ip-sysctl.txt
--- v2.2.7/linux/Documentation/networking/ip-sysctl.txt Thu Jan 7 15:11:35 1999
+++ linux/Documentation/networking/ip-sysctl.txt Mon May 10 09:55:25 1999
@@ -96,7 +96,7 @@
Enable timestamps as defined in RFC1323.
tcp_sack - BOOLEAN
- Enable select acknowledgements.
+ Enable select acknowledgments.
tcp_retrans_collapse - BOOLEAN
Bug-to-bug compatibility with some broken printers.
@@ -119,7 +119,7 @@
icmp_paramprob_rate - INTEGER
icmp_timeexceed_rate - INTEGER
icmp_echoreply_rate - INTEGER (not enabled per default)
- Limit the maximal rates for sending ICMP packets to specifc targets.
+ Limit the maximal rates for sending ICMP packets to specific targets.
0 to disable any limiting, otherwise the maximal rate in jiffies(1)
See the source for more information.
@@ -173,7 +173,7 @@
bootp_relay - BOOLEAN
Accept packets with source address 0.b.c.d destined
not to this host as local ones. It is supposed, that
- BOOTP relay deamon will catch and forward such packets.
+ BOOTP relay daemon will catch and forward such packets.
default FALSE
Not Implemented Yet.
@@ -211,4 +211,4 @@
Updated by:
Andi Kleen
ak@muc.de
-$Id: ip-sysctl.txt,v 1.8 1999/01/02 16:37:06 davem Exp $
+$Id: ip-sysctl.txt,v 1.9 1999/05/08 02:58:44 davem Exp $
diff -u --recursive --new-file v2.2.7/linux/Documentation/networking/ipddp.txt linux/Documentation/networking/ipddp.txt
--- v2.2.7/linux/Documentation/networking/ipddp.txt Sat May 2 14:19:51 1998
+++ linux/Documentation/networking/ipddp.txt Thu Apr 29 11:53:41 1999
@@ -14,7 +14,7 @@
IP over an AppleTalk network or you can provide IP gatewaying functions
for your AppleTalk users.
-You can currently Encapsulate or Decapsulate AppleTalk-IP on LocalTalk,
+You can currently encapsulate or decapsulate AppleTalk-IP on LocalTalk,
EtherTalk and PPPTalk. The only limit on the protocol is that of what
kernel AppleTalk layer and drivers are available.
@@ -23,22 +23,22 @@
Compiling AppleTalk-IP Decapsulation/Encapsulation
=================================================
-AppleTalk-IP Decapsulation needs to be compiled into your kernel. You
-will need to turn on Appletalk-IP driver support. Then you will need to
-select ONE of the two options; IP to AppleTalk-IP Encapsulation support or
-AppleTalk-IP to IP Decapsulation support. If you compile the driver
+AppleTalk-IP decapsulation needs to be compiled into your kernel. You
+will need to turn on AppleTalk-IP driver support. Then you will need to
+select ONE of the two options; IP to AppleTalk-IP encapsulation support or
+AppleTalk-IP to IP decapsulation support. If you compile the driver
statically you will only be able to use the driver for the function you have
enabled in the kernel. If you compile the driver as a module you can
select what mode you want it to run in via a module loading param.
-ipddp_mode=1 for AppleTalk-IP Encapsulation and ipddp_mode=2 for
-AppleTalk-IP to IP Decapsulation.
+ipddp_mode=1 for AppleTalk-IP encapsulation and ipddp_mode=2 for
+AppleTalk-IP to IP decapsulation.
Basic instructions for user space tools
=======================================
-To enable AppleTalk-IP Decapsulation/Encapsulation you will need the
-proper tools. You can get the tools for Decapsulation from
-http://spacs1.spacs.k12.wi.us/~jschlst/MacGate and for Encapsulation
+To enable AppleTalk-IP decapsulation/encapsulation you will need the
+proper tools. You can get the tools for decapsulation from
+http://spacs1.spacs.k12.wi.us/~jschlst/MacGate and for encapsulation
from http://www.maths.unm.edu/~bradford/ltpc.html
I will briefly describe the operation of the tools, but you will
@@ -61,8 +61,8 @@
Common Uses of ipddp.c
----------------------
-Of course AppleTalk-IP Decapsulation and Encapsulation, but specificly
-Decapsulation is being used most for connecting LocalTalk networks to
+Of course AppleTalk-IP decapsulation and encapsulation, but specifically
+decapsulation is being used most for connecting LocalTalk networks to
IP networks. Although it has been used on EtherTalk networks to allow
Macs that are only able to tunnel IP over EtherTalk.
@@ -73,6 +73,6 @@
Further Assistance
-------------------
You can contact me (Jay Schulist ) with any
-questions reguarding Decapsulation or Encapsulation. Bradford W. Johnson
+questions regarding decapsulation or encapsulation. Bradford W. Johnson
originally wrote the ipddp.c driver for IP
encapsulation in AppleTalk.
diff -u --recursive --new-file v2.2.7/linux/Documentation/networking/lapb-module.txt linux/Documentation/networking/lapb-module.txt
--- v2.2.7/linux/Documentation/networking/lapb-module.txt Sun Jun 7 11:16:26 1998
+++ linux/Documentation/networking/lapb-module.txt Mon May 10 13:00:10 1999
@@ -216,7 +216,7 @@
This is called by the LAPB module when an event occurs after the device
driver has called lapb_disconnect_request (see above). The reason indicates
-what has happended. In all cases the LAPB link can be regarded as being
+what has happened. In all cases the LAPB link can be regarded as being
terminated. The values for reason are:
LAPB_OK The LAPB link was terminated normally.
diff -u --recursive --new-file v2.2.7/linux/Documentation/networking/pt.txt linux/Documentation/networking/pt.txt
--- v2.2.7/linux/Documentation/networking/pt.txt Sat May 2 14:19:51 1998
+++ linux/Documentation/networking/pt.txt Mon May 10 13:00:10 1999
@@ -2,7 +2,7 @@
ALPHA for Linux 1.3.43.
These files will allow you to talk to the PackeTwin (now know as PT) and
-connect through it just like a pair of TNC's. To do this you will also
+connect through it just like a pair of TNCs. To do this you will also
require the AX.25 code in the kernel enabled.
There are four files in this archive; this readme, a patch file, a .c file
diff -u --recursive --new-file v2.2.7/linux/Documentation/networking/routing.txt linux/Documentation/networking/routing.txt
--- v2.2.7/linux/Documentation/networking/routing.txt Thu May 14 19:47:37 1998
+++ linux/Documentation/networking/routing.txt Mon May 10 13:00:10 1999
@@ -1,6 +1,6 @@
The directory ftp.inr.ac.ru:/ip-routing contains:
-- iproute.c - "professional" routing table maintainance utility.
+- iproute.c - "professional" routing table maintenance utility.
- rdisc.tar.gz - rdisc daemon, ported from Sun.
STRONGLY RECOMMENDED FOR ALL HOSTS.
diff -u --recursive --new-file v2.2.7/linux/Documentation/powerpc/smp.txt linux/Documentation/powerpc/smp.txt
--- v2.2.7/linux/Documentation/powerpc/smp.txt Fri Oct 23 22:01:18 1998
+++ linux/Documentation/powerpc/smp.txt Thu Apr 29 12:39:07 1999
@@ -5,11 +5,10 @@
(Cort Dougan, cort@cs.nmt.edu) please email me if you have questions,
comments or corrections.
-Last Change: 10.8.98
+Last Change: 3.31.99
-SMP support for Linux/PPC is still in its early stages and likely to
-be buggy for a while. If you want to help by writing code or testing
-different hardware please email me!
+If you want to help by writing code or testing different hardware please
+email me!
1. State of Supported Hardware
@@ -29,3 +28,7 @@
BeBox
BeBox support hasn't been added to the 2.1.X kernels from 2.0.X
but work is being done and SMP support for BeBox is in the works.
+
+ CHRP
+ CHRP SMP works and is fairly solid. It's been tested on the IBM F50
+ with 4 processors for quite some time now.
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/AD1816 linux/Documentation/sound/AD1816
--- v2.2.7/linux/Documentation/sound/AD1816 Tue Dec 22 14:16:53 1998
+++ linux/Documentation/sound/AD1816 Mon May 10 13:00:10 1999
@@ -70,7 +70,16 @@
- Acer FX-3D
- SY-1816
- Highscreen Sound-Boostar 32 Wave 3D
-- ...
+- Highscreen Sound-Boostar 16
+- AVM Apex Pro card
+- (Aztech SC-16 3D)
+- (Newcom SC-16 3D)
+- (Terratec EWS64S)
+
+Cards listed in brackets are not supported reliable. If you have such a card
+you should add the extra parameter:
+ options=1
+when loading the ad1816 module via modprobe.
Troubleshooting:
@@ -105,7 +114,7 @@
As the driver is still experimental and under development, you should
watch out for updates. Updates of the driver are available on the
-internet from one of my home pages:
+Internet from one of my home pages:
http://www.student.informatik.tu-darmstadt.de/~tek/projects/linux.html
or:
http://www.tu-darmstadt.de/~tek01/projects/linux.html
@@ -115,4 +124,4 @@
Thorsten Knabe
- Last modified: 1998/11/06
+ Last modified: 1999/05/02
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/AWE32 linux/Documentation/sound/AWE32
--- v2.2.7/linux/Documentation/sound/AWE32 Thu Jan 7 15:11:35 1999
+++ linux/Documentation/sound/AWE32 Thu Apr 29 11:53:41 1999
@@ -53,7 +53,7 @@
(IO 2 (BASE 0x0E20)) (ACT Y) ))"
Resources 0x0620, 0x0A20 and 0x0E20 should work. Other on-board devices:
-Gameport and StereoEnhance are not required to be inited.
+Gameport and StereoEnhance are not required to be initialized.
Now you can execute "isapnp /etc/isapnp.conf". No errors should be reported.
If you correctly installed isapnptools, then isapnp will run every boot time.
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/AudioExcelDSP16 linux/Documentation/sound/AudioExcelDSP16
--- v2.2.7/linux/Documentation/sound/AudioExcelDSP16 Fri Jan 8 22:35:59 1999
+++ linux/Documentation/sound/AudioExcelDSP16 Thu Apr 29 11:53:41 1999
@@ -80,7 +80,7 @@
2) Install your new kernel as the default boot kernel.
3) Boot MS-DOS and configure the audio card with the boot time device
driver, for MSS irq10 dma3 in our example.
-4) -- and boot Linux. This will mantain the DOS configuration
+4) -- and boot Linux. This will maintain the DOS configuration
and will boot the new kernel with sound driver. The sound driver will find
the audio card and will recognize and attach it.
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/ChangeLog.awe linux/Documentation/sound/ChangeLog.awe
--- v2.2.7/linux/Documentation/sound/ChangeLog.awe Tue Dec 22 14:16:53 1998
+++ linux/Documentation/sound/ChangeLog.awe Thu Apr 29 11:53:41 1999
@@ -81,7 +81,7 @@
ver.0.3.3b
- Fix version number in awe_version.h
- - Fix a small bug in noteoff/relese all
+ - Fix a small bug in noteoff/release all
ver.0.3.3a
- Fix all notes/sounds off
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/INSTALL.awe linux/Documentation/sound/INSTALL.awe
--- v2.2.7/linux/Documentation/sound/INSTALL.awe Tue Dec 22 14:16:53 1998
+++ linux/Documentation/sound/INSTALL.awe Thu Apr 29 11:53:41 1999
@@ -17,7 +17,7 @@
http://www-jcr.lmh.ox.ac.uk/~pnp/
----------------------------------------------------------------
-* Installation on RedHat 5.0 Sound Driver
+* Installation on Red Hat 5.0 Sound Driver
Please use install-rh.sh under RedHat5.0 directory.
DO NOT USE install.sh below.
@@ -31,7 +31,7 @@
% su
2. If you have never configured the kernel tree yet, run make config
- once (to make depencies and symlinks).
+ once (to make dependencies and symlinks).
# cd /usr/src/linux
# make xconfig
@@ -40,7 +40,7 @@
# sh ./install.sh
- 4. Configure your kenrel
+ 4. Configure your kernel
(for Linux 2.[01].x user)
# cd /usr/src/linux
@@ -77,7 +77,7 @@
do it by isapnp tools. Otherwise, skip to 8.
This section described only a brief explanation. For more
- detaills, please see AWE64-Mini-HOWTO or isapnp tools FAQ.
+ details, please see the AWE64-Mini-HOWTO or isapnp tools FAQ.
7a. If you have no isapnp.conf file, generate it by pnpdump.
Otherwise, skip to 7d.
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/Introduction linux/Documentation/sound/Introduction
--- v2.2.7/linux/Documentation/sound/Introduction Tue Dec 22 14:16:53 1998
+++ linux/Documentation/sound/Introduction Thu Apr 29 11:53:41 1999
@@ -214,7 +214,7 @@
3) In /etc/conf.modules when using modprobe.
-4) Via RedHat's /usr/sbin/sndconfig program (text based).
+4) Via Red Hat's /usr/sbin/sndconfig program (text based).
5) Via the OSS soundconf program (with the commercial version
of the OSS driver.
@@ -240,7 +240,7 @@
6) The comments and code in linux/drivers/sound.
-7) The sndconfig and rhsound documentation from RedHat.
+7) The sndconfig and rhsound documentation from Red Hat.
8) The Linux-sound mailing list: sound-list@redhat.com
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/MAD16 linux/Documentation/sound/MAD16
--- v2.2.7/linux/Documentation/sound/MAD16 Wed Apr 8 19:36:24 1998
+++ linux/Documentation/sound/MAD16 Thu Apr 29 11:53:41 1999
@@ -23,3 +23,12 @@
alias char-major-14 mad16
options sb mad16=1
options mad16 io=0x530 irq=7 dma=0 dma16=1 && /usr/local/bin/aumix -w 15 -p 20 -m 0 -1 0 -2 0 -3 0 -i 0
+
+
+To get the built in mixer to work this needs to be:
+
+options adlib_card io=0x388 # FM synthesizer
+options sb mad16=1
+options mad16 io=0x530 irq=7 dma=0 dma16=1 mpu_io=816 mpu_irq=5 && /usr/local/bin/aumix -w 15 -p 20 -m 0 -1 0 -2 0 -3 0 -i 0
+
+The addition of the "mpu_io=816 mpu_irq=5" to the mad16 options line is
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/OPL3-SA linux/Documentation/sound/OPL3-SA
--- v2.2.7/linux/Documentation/sound/OPL3-SA Tue Feb 23 15:21:32 1999
+++ linux/Documentation/sound/OPL3-SA Thu Apr 29 11:53:41 1999
@@ -15,7 +15,7 @@
You'll need to know all of the relevant info (irq, dma, and io port) for the
chip's WSS mode, since that is the mode the kernel sound driver uses, and of
course you'll also need to know about where the MPU401 and OPL3 ports and
-irq's are if you want to use those.
+IRQs are if you want to use those.
Here's the skinny on how to load it as a module:
@@ -24,14 +24,14 @@
Module options in detail:
io: This is the WSS's port base.
- irq: This is the WSS's irq.
- dma: This is the WSS's dma line. In my BIOS setup screen this was
+ irq: This is the WSS's IRQ.
+ dma: This is the WSS's DMA line. In my BIOS setup screen this was
listed as "WSS Play DMA"
- dma2: This is the WSS's secondary dma line. My BIOS calls it the
+ dma2: This is the WSS's secondary DMA line. My BIOS calls it the
"WSS capture DMA"
mpu_io: This is the MPU401's port base.
- mpu_irq: This is the MPU401's irq.
+ mpu_irq: This is the MPU401's IRQ.
If you'd like to use the OPL3 FM Synthesizer, make sure you enable
CONFIG_YM3812 (in 'make config'). That'll build the opl3.o module.
@@ -43,7 +43,7 @@
Say 'y' or 'm' to "SoftOSS software wave table engine" in make config.
-If you said yes, the software synth is availible once you boot your new
+If you said yes, the software synth is available once you boot your new
kernel.
If you chose to build it as a module, just insmod the resulting softoss2.o
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/README.OSS linux/Documentation/sound/README.OSS
--- v2.2.7/linux/Documentation/sound/README.OSS Tue Jan 19 11:32:50 1999
+++ linux/Documentation/sound/README.OSS Thu Apr 29 11:53:41 1999
@@ -58,7 +58,7 @@
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.
+ lots of valuable suggestions.
Andy Warner ISC port
Jim Lowe,
Amancio Hasty Jr FreeBSD/NetBSD port
@@ -96,7 +96,7 @@
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
+implemented there. In general it's a major waste of time to try to improve a
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.
@@ -1314,8 +1314,8 @@
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
+recommended by ESS (5, 7, 9/2 and 10). In this case all IRQs don't work.
+At least a card called (Pearl?) Hypersound 16 supports IRQ 15 but it doesn't
work.
ES1868 is a PnP chip which is (supposed to be) compatible with ESS1688
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/README.awe linux/Documentation/sound/README.awe
--- v2.2.7/linux/Documentation/sound/README.awe Tue Dec 22 14:16:53 1998
+++ linux/Documentation/sound/README.awe Thu Apr 29 11:53:41 1999
@@ -9,8 +9,8 @@
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
+the wave synth operations. The driver is provided for Linux 1.2.x
+and 2.[012].x kernels, as well as FreeBSD, on Intel x86 and DEC
Alpha systems.
This driver was written by Takashi Iwai ,
@@ -76,7 +76,7 @@
% sfxload synthgm
% drvmidi -L 2mbgmgs foo.mid
-This makes a big differece (believe me)! For more details, please
+This makes a big difference (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
@@ -97,14 +97,14 @@
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).
+ indicates your Linux kernel supports module for each sound card
+ (in recent 2.1 or 2.2 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)
+ memsize = DRAM size in kilobytes (eg. 512)
As default, AWE driver probes these values automatically.
@@ -117,15 +117,15 @@
0 means to autodetect the address.
- AWE_DEFAULT_MEM_SIZE (default: not defined)
- specifies the memory size of your AWE32 card in kilo bytes.
+ specifies the memory size of your AWE32 card in kilobytes.
-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.
+Linux-1.2.x users may need to increase these values to appropriate size
+if the sound card is equipped with more DRAM.
- AWE_MAX_SF_LISTS, AWE_MAX_SAMPLES, AWE_MAX_INFOS
@@ -139,7 +139,7 @@
passthrough channels.
- AWE_DEBUG_ON (default: defined)
- turns on debuggin messages if defined.
+ turns on debugging messages if defined.
- AWE_HAS_GUS_COMPATIBILITY (default: defined)
Enables GUS compatibility mode if defined, reading GUS patches and
@@ -170,7 +170,7 @@
- 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.
+ Note that this is still an experimental option.
- DEF_FM_CHORUS_DEPTH (default: 0x10)
The default strength to be sent to the chorus effect engine.
@@ -183,8 +183,8 @@
* ACKNOWLEDGMENTS
-Thanks to Witold Jachimczyk (witek@xfactor.wpi.edu) for many advices
-to programming of AWE32. Many codes are brought from his AWE32-native
+Thanks to Witold Jachimczyk (witek@xfactor.wpi.edu) for much advice
+on programming of AWE32. Much code is brought from his AWE32-native
MOD player, ALMP.
The port of awedrv to FreeBSD is done by Randall Hopper
(rhh@ct.picker.com).
diff -u --recursive --new-file v2.2.7/linux/Documentation/sound/Wavefront linux/Documentation/sound/Wavefront
--- v2.2.7/linux/Documentation/sound/Wavefront Thu Sep 17 17:53:34 1998
+++ linux/Documentation/sound/Wavefront Thu Apr 29 11:53:41 1999
@@ -149,7 +149,7 @@
.
.
.
- make modules_isntall
+ make modules_install
Here's my autoconf.h SOUND section:
diff -u --recursive --new-file v2.2.7/linux/Documentation/sysctl/vm.txt linux/Documentation/sysctl/vm.txt
--- v2.2.7/linux/Documentation/sysctl/vm.txt Fri Apr 16 14:47:30 1999
+++ linux/Documentation/sysctl/vm.txt Thu Apr 29 11:53:41 1999
@@ -178,7 +178,7 @@
The Linux VM subsystem avoids excessive disk seeks by reading
multiple pages on a page fault. The number of pages it reads
-is dependant on the amount of memory in your machine.
+is dependent on the amount of memory in your machine.
The number of pages the kernel reads in at once is equal to
2 ^ page-cluster. Values above 2 ^ 5 don't make much sense
diff -u --recursive --new-file v2.2.7/linux/Documentation/video4linux/bttv/INSTALL linux/Documentation/video4linux/bttv/INSTALL
--- v2.2.7/linux/Documentation/video4linux/bttv/INSTALL Tue Feb 23 15:21:32 1999
+++ linux/Documentation/video4linux/bttv/INSTALL Mon May 10 13:00:10 1999
@@ -38,7 +38,7 @@
7: Matrix Vision MV-Delta
8: Fly Video II
9: TurboTV
- 10: Newer Hauppage (Bt878)
+ 10: Newer Hauppauge (Bt878)
11: Miro PCTV Pro
12: ADS Tech Channel Surfer TV (and maybe TV+FM)
13: AVerMedia TVCapture 98
diff -u --recursive --new-file v2.2.7/linux/MAINTAINERS linux/MAINTAINERS
--- v2.2.7/linux/MAINTAINERS Wed Apr 28 11:37:29 1999
+++ linux/MAINTAINERS Sat May 8 12:49:46 1999
@@ -779,14 +779,14 @@
USB HUB AND UHCI DRIVERS
P: Johannes Erdfelt
M: jerdfelt@sventech.com
-L: linux-usb@peloncho.fis.ucm.es
+L: linux-usb@suse.com
S: Maintained
USB OHCI DRIVER
P: Gregory P. Smith
M: greg@electricrain.com
M: greg@suitenine.com
-L: linux-usb@peloncho.fis.ucm.es
+L: linux-usb@suse.com
S: Maintained (not yet usable)
W: http://suitenine.com/usb/
diff -u --recursive --new-file v2.2.7/linux/Makefile linux/Makefile
--- v2.2.7/linux/Makefile Wed Apr 28 11:37:29 1999
+++ linux/Makefile Wed Apr 28 11:38:52 1999
@@ -1,6 +1,6 @@
VERSION = 2
PATCHLEVEL = 2
-SUBLEVEL = 7
+SUBLEVEL = 8
EXTRAVERSION =
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
diff -u --recursive --new-file v2.2.7/linux/REPORTING-BUGS linux/REPORTING-BUGS
--- v2.2.7/linux/REPORTING-BUGS Tue Jan 19 11:32:50 1999
+++ linux/REPORTING-BUGS Thu Apr 29 11:53:41 1999
@@ -1,6 +1,6 @@
[Some of this is taken from Frohwalt Egerer's original linux-kernel FAQ]
- What follows is a suggested proceedure for reporting Linux bugs. You
+ What follows is a suggested procedure 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.
@@ -23,11 +23,11 @@
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.
+information they're really interested in. Don't feel you have to follow it.
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
+the version of some important subsystems. Run it with the command
"sh scripts/ver_linux"
Use that information to fill in all fields of the bug report form, and
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/config.in linux/arch/alpha/config.in
--- v2.2.7/linux/arch/alpha/config.in Tue Feb 23 15:21:32 1999
+++ linux/arch/alpha/config.in Mon May 10 09:55:21 1999
@@ -54,12 +54,10 @@
unset CONFIG_ALPHA_LCA CONFIG_ALPHA_APECS CONFIG_ALPHA_CIA
unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS CONFIG_ALPHA_POLARIS
unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA
-unset CONFIG_ALPHA_NEED_ROUNDING_EMULATION
if [ "$CONFIG_ALPHA_GENERIC" = "y" ]
then
define_bool CONFIG_PCI y
- define_bool CONFIG_ALPHA_NEED_ROUNDING_EMULATION y
fi
if [ "$CONFIG_ALPHA_BOOK1" = "y" ]
then
@@ -108,7 +106,7 @@
then
define_bool CONFIG_ALPHA_EV5 y
else
- define_bool CONFIG_ALPHA_EV4 y
+ define_bool CONFIG_ALPHA_EV4 y
fi
define_bool CONFIG_ALPHA_T2 y
fi
@@ -140,11 +138,6 @@
if [ "$CONFIG_ALPHA_JENSEN" = "y" ]
then
define_bool CONFIG_ALPHA_EV4 y
-fi
-if [ "$CONFIG_ALPHA_EV4" = "y" ]
-then
- # EV45 and older do not support all rounding modes in hw:
- define_bool CONFIG_ALPHA_NEED_ROUNDING_EMULATION y
fi
if [ "$CONFIG_ALPHA_CABRIOLET" = "y" -o "$CONFIG_ALPHA_AVANTI" = "y" \
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
--- v2.2.7/linux/arch/alpha/kernel/entry.S Tue Feb 23 15:21:32 1999
+++ linux/arch/alpha/kernel/entry.S Mon May 10 09:55:21 1999
@@ -6,8 +6,6 @@
#include
-#define halt .long PAL_halt
-#define rti .long PAL_rti
#define SIGCHLD 20
#define NR_SYSCALLS 371
@@ -98,7 +96,7 @@
call_pal PAL_swpipl; \
stq $21,HAE_CACHE($19); \
stq $21,0($20); \
- bis $0,$0,$16; \
+ mov $0,$16; \
call_pal PAL_swpipl; \
ldq $0,0($30); \
ldq $1,8($30); \
@@ -127,8 +125,8 @@
entInt:
SAVE_ALL
lda $8,0x3fff
- bic $30,$8,$8
lda $26,ret_from_sys_call
+ bic $30,$8,$8
jsr $31,do_entInt
.end entInt
@@ -170,8 +168,8 @@
entArith:
SAVE_ALL
lda $8,0x3fff
- bic $30,$8,$8
lda $26,ret_from_sys_call
+ bic $30,$8,$8
jsr $31,do_entArith
.end entArith
@@ -181,8 +179,8 @@
entIF:
SAVE_ALL
lda $8,0x3fff
- bic $30,$8,$8
lda $26,ret_from_sys_call
+ bic $30,$8,$8
jsr $31,do_entIF
.end entIF
@@ -192,8 +190,8 @@
entDbg:
SAVE_ALL
lda $8,0x3fff
- bic $30,$8,$8
lda $26,ret_from_sys_call
+ bic $30,$8,$8
jsr $31,do_entDbg
.end entDbg
@@ -212,18 +210,18 @@
kernel_clone:
.frame $30, 0, $26
.prologue 0
- subq $30,6*8,$30
- stq $31,0($30)
- stq $26,8($30)
- stq $29,16($30)
- stq $16,24($30)
- stq $17,32($30)
- stq $18,40($30)
- bis $31,2,$0 /* Register v0: syscall nr for fork() */
+ subq $30,6*8,$30
+ stq $31,0($30)
+ stq $26,8($30)
+ stq $29,16($30)
+ stq $16,24($30)
+ stq $17,32($30)
+ stq $18,40($30)
+ bis $31,2,$0 /* Register v0: syscall nr for fork() */
SAVE_ALL
- bsr $26,sys_clone
- stq $0,0($30)
- br $31,ret_from_sys_call
+ bsr $26,sys_clone
+ stq $0,0($30)
+ br ret_from_sys_call
.end kernel_clone
/*
@@ -233,32 +231,32 @@
.globl __kernel_thread
.ent __kernel_thread
__kernel_thread:
- ldgp $29,0($27) /* we can be called from a module */
+ ldgp $29,0($27) /* we can be called from a module */
.frame $30, 4*8, $26
- subq $30,4*8,$30
- stq $10,16($30)
- stq $9,8($30)
- stq $26,0($30)
+ subq $30,4*8,$30
+ stq $10,16($30)
+ stq $9,8($30)
+ stq $26,0($30)
.prologue 1
- bis $17,$17,$9 /* save fn */
- bis $18,$18,$10 /* save arg */
- bsr $26,kernel_clone
- bne $20,1f /* $20 is non-zero in child */
- ldq $26,0($30)
- ldq $9,8($30)
- ldq $10,16($30)
- addq $30,4*8,$30
- ret $31,($26),1
+ mov $17,$9 /* save fn */
+ mov $18,$10 /* save arg */
+ bsr $26,kernel_clone
+ bne $20,1f /* $20 is non-zero in child */
+ ldq $26,0($30)
+ ldq $9,8($30)
+ ldq $10,16($30)
+ addq $30,4*8,$30
+ ret $31,($26),1
/* this is in child: look out as we don't have any stack here.. */
-1: bis $9,$9,$27 /* get fn */
- lda $8,0x3fff
- bis $10,$10,$16 /* get arg */
- bic $30,$8,$8 /* get current */
- jsr $26,($27)
+1: mov $9,$27 /* get fn */
+ lda $8,0x3fff
+ mov $10,$16 /* get arg */
+ bic $30,$8,$8 /* get current */
+ jsr $26,($27)
ldgp $29,0($26)
- bis $0,$0,$16
- jsr $26,sys_exit
- call_pal PAL_halt
+ mov $0,$16
+ mov $31,$26
+ jsr $31,sys_exit
.end __kernel_thread
/*
@@ -286,202 +284,199 @@
.align 3
.ent do_switch_stack
do_switch_stack:
- lda $30,-SWITCH_STACK_SIZE($30)
- stq $9,0($30)
- stq $10,8($30)
- stq $11,16($30)
- stq $12,24($30)
- stq $13,32($30)
- stq $14,40($30)
- stq $15,48($30)
- stq $26,56($30)
- stt $f0,64($30)
- stt $f1,72($30)
- stt $f2,80($30)
- stt $f3,88($30)
- stt $f4,96($30)
- stt $f5,104($30)
- stt $f6,112($30)
- stt $f7,120($30)
- stt $f8,128($30)
- stt $f9,136($30)
- stt $f10,144($30)
- stt $f11,152($30)
- stt $f12,160($30)
- stt $f13,168($30)
- stt $f14,176($30)
- stt $f15,184($30)
- stt $f16,192($30)
- stt $f17,200($30)
- stt $f18,208($30)
- stt $f19,216($30)
- stt $f20,224($30)
- stt $f21,232($30)
- stt $f22,240($30)
- stt $f23,248($30)
- stt $f24,256($30)
- stt $f25,264($30)
- stt $f26,272($30)
- stt $f27,280($30)
- mf_fpcr $f0 # get fpcr
- stt $f28,288($30)
- stt $f29,296($30)
- stt $f30,304($30)
- stt $f0,312($30) # save fpcr in slot of $f31
- ldt $f0,64($30) # dont let "do_switch_stack" change fp state.
- ret $31,($1),1
+ lda $30,-SWITCH_STACK_SIZE($30)
+ stq $9,0($30)
+ stq $10,8($30)
+ stq $11,16($30)
+ stq $12,24($30)
+ stq $13,32($30)
+ stq $14,40($30)
+ stq $15,48($30)
+ stq $26,56($30)
+ stt $f0,64($30)
+ stt $f1,72($30)
+ stt $f2,80($30)
+ stt $f3,88($30)
+ stt $f4,96($30)
+ stt $f5,104($30)
+ stt $f6,112($30)
+ stt $f7,120($30)
+ stt $f8,128($30)
+ stt $f9,136($30)
+ stt $f10,144($30)
+ stt $f11,152($30)
+ stt $f12,160($30)
+ stt $f13,168($30)
+ stt $f14,176($30)
+ stt $f15,184($30)
+ stt $f16,192($30)
+ stt $f17,200($30)
+ stt $f18,208($30)
+ stt $f19,216($30)
+ stt $f20,224($30)
+ stt $f21,232($30)
+ stt $f22,240($30)
+ stt $f23,248($30)
+ stt $f24,256($30)
+ stt $f25,264($30)
+ stt $f26,272($30)
+ stt $f27,280($30)
+ mf_fpcr $f0 # get fpcr
+ stt $f28,288($30)
+ stt $f29,296($30)
+ stt $f30,304($30)
+ stt $f0,312($30) # save fpcr in slot of $f31
+ ldt $f0,64($30) # dont let "do_switch_stack" change fp state.
+ ret $31,($1),1
.end do_switch_stack
.align 3
.ent undo_switch_stack
undo_switch_stack:
- ldq $9,0($30)
- ldq $10,8($30)
- ldq $11,16($30)
- ldq $12,24($30)
- ldq $13,32($30)
- ldq $14,40($30)
- ldq $15,48($30)
- ldq $26,56($30)
- ldt $f30,312($30) # get saved fpcr
- ldt $f0,64($30)
- ldt $f1,72($30)
- ldt $f2,80($30)
- ldt $f3,88($30)
- mt_fpcr $f30 # install saved fpcr
- ldt $f4,96($30)
- ldt $f5,104($30)
- ldt $f6,112($30)
- ldt $f7,120($30)
- ldt $f8,128($30)
- ldt $f9,136($30)
- ldt $f10,144($30)
- ldt $f11,152($30)
- ldt $f12,160($30)
- ldt $f13,168($30)
- ldt $f14,176($30)
- ldt $f15,184($30)
- ldt $f16,192($30)
- ldt $f17,200($30)
- ldt $f18,208($30)
- ldt $f19,216($30)
- ldt $f20,224($30)
- ldt $f21,232($30)
- ldt $f22,240($30)
- ldt $f23,248($30)
- ldt $f24,256($30)
- ldt $f25,264($30)
- ldt $f26,272($30)
- ldt $f27,280($30)
- ldt $f28,288($30)
- ldt $f29,296($30)
- ldt $f30,304($30)
- lda $30,SWITCH_STACK_SIZE($30)
- ret $31,($1),1
+ ldq $9,0($30)
+ ldq $10,8($30)
+ ldq $11,16($30)
+ ldq $12,24($30)
+ ldq $13,32($30)
+ ldq $14,40($30)
+ ldq $15,48($30)
+ ldq $26,56($30)
+ ldt $f30,312($30) # get saved fpcr
+ ldt $f0,64($30)
+ ldt $f1,72($30)
+ ldt $f2,80($30)
+ ldt $f3,88($30)
+ mt_fpcr $f30 # install saved fpcr
+ ldt $f4,96($30)
+ ldt $f5,104($30)
+ ldt $f6,112($30)
+ ldt $f7,120($30)
+ ldt $f8,128($30)
+ ldt $f9,136($30)
+ ldt $f10,144($30)
+ ldt $f11,152($30)
+ ldt $f12,160($30)
+ ldt $f13,168($30)
+ ldt $f14,176($30)
+ ldt $f15,184($30)
+ ldt $f16,192($30)
+ ldt $f17,200($30)
+ ldt $f18,208($30)
+ ldt $f19,216($30)
+ ldt $f20,224($30)
+ ldt $f21,232($30)
+ ldt $f22,240($30)
+ ldt $f23,248($30)
+ ldt $f24,256($30)
+ ldt $f25,264($30)
+ ldt $f26,272($30)
+ ldt $f27,280($30)
+ ldt $f28,288($30)
+ ldt $f29,296($30)
+ ldt $f30,304($30)
+ lda $30,SWITCH_STACK_SIZE($30)
+ ret $31,($1),1
.end undo_switch_stack
.align 3
.globl entUna
.ent entUna
entUna:
- lda $30,-256($30)
- stq $0,0($30)
- ldq $0,256($30) /* get PS */
- stq $1,8($30)
- stq $2,16($30)
- stq $3,24($30)
- and $0,8,$0 /* user mode? */
- stq $4,32($30)
- bne $0,entUnaUser /* yup -> do user-level unaligned fault */
- stq $5,40($30)
- stq $6,48($30)
- stq $7,56($30)
- stq $8,64($30)
- stq $9,72($30)
- stq $10,80($30)
- stq $11,88($30)
- stq $12,96($30)
- stq $13,104($30)
- stq $14,112($30)
- stq $15,120($30)
+ lda $30,-256($30)
+ stq $0,0($30)
+ ldq $0,256($30) /* get PS */
+ stq $1,8($30)
+ stq $2,16($30)
+ stq $3,24($30)
+ and $0,8,$0 /* user mode? */
+ stq $4,32($30)
+ bne $0,entUnaUser /* yup -> do user-level unaligned fault */
+ stq $5,40($30)
+ stq $6,48($30)
+ stq $7,56($30)
+ stq $8,64($30)
+ stq $9,72($30)
+ stq $10,80($30)
+ stq $11,88($30)
+ stq $12,96($30)
+ stq $13,104($30)
+ stq $14,112($30)
+ stq $15,120($30)
/* 16-18 PAL-saved */
- stq $19,152($30)
- stq $20,160($30)
- stq $21,168($30)
- stq $22,176($30)
- stq $23,184($30)
- stq $24,192($30)
- stq $25,200($30)
- stq $26,208($30)
- stq $27,216($30)
- stq $28,224($30)
- stq $29,232($30)
- stq $30,240($30)
- stq $31,248($30)
- lda $8,0x3fff
- bic $30,$8,$8
- jsr $26,do_entUna
- ldq $0,0($30)
- ldq $1,8($30)
- ldq $2,16($30)
- ldq $3,24($30)
- ldq $4,32($30)
- ldq $5,40($30)
- ldq $6,48($30)
- ldq $7,56($30)
- ldq $8,64($30)
- ldq $9,72($30)
- ldq $10,80($30)
- ldq $11,88($30)
- ldq $12,96($30)
- ldq $13,104($30)
- ldq $14,112($30)
- ldq $15,120($30)
+ stq $19,152($30)
+ stq $20,160($30)
+ stq $21,168($30)
+ stq $22,176($30)
+ stq $23,184($30)
+ stq $24,192($30)
+ stq $25,200($30)
+ stq $26,208($30)
+ stq $27,216($30)
+ stq $28,224($30)
+ stq $29,232($30)
+ lda $8,0x3fff
+ stq $31,248($30)
+ bic $30,$8,$8
+ jsr $26,do_entUna
+ ldq $0,0($30)
+ ldq $1,8($30)
+ ldq $2,16($30)
+ ldq $3,24($30)
+ ldq $4,32($30)
+ ldq $5,40($30)
+ ldq $6,48($30)
+ ldq $7,56($30)
+ ldq $8,64($30)
+ ldq $9,72($30)
+ ldq $10,80($30)
+ ldq $11,88($30)
+ ldq $12,96($30)
+ ldq $13,104($30)
+ ldq $14,112($30)
+ ldq $15,120($30)
/* 16-18 PAL-saved */
- ldq $19,152($30)
- ldq $20,160($30)
- ldq $21,168($30)
- ldq $22,176($30)
- ldq $23,184($30)
- ldq $24,192($30)
- ldq $25,200($30)
- ldq $26,208($30)
- ldq $27,216($30)
- ldq $28,224($30)
- ldq $29,232($30)
- ldq $30,240($30)
- lda $30,256($30)
- rti
+ ldq $19,152($30)
+ ldq $20,160($30)
+ ldq $21,168($30)
+ ldq $22,176($30)
+ ldq $23,184($30)
+ ldq $24,192($30)
+ ldq $25,200($30)
+ ldq $26,208($30)
+ ldq $27,216($30)
+ ldq $28,224($30)
+ ldq $29,232($30)
+ lda $30,256($30)
+ call_pal PAL_rti
.end entUna
.align 3
.ent entUnaUser
entUnaUser:
- ldq $0,0($30) /* restore original $0 */
- lda $30,256($30) /* pop entUna's stack frame */
- SAVE_ALL /* setup normal kernel stack */
- lda $30,-56($30)
- stq $9,0($30)
- stq $10,8($30)
- stq $11,16($30)
- stq $12,24($30)
- stq $13,32($30)
- stq $14,40($30)
- stq $15,48($30)
- lda $8,0x3fff
- addq $30,56,$19
- bic $30,$8,$8
- jsr $26,do_entUnaUser
- ldq $9,0($30)
- ldq $10,8($30)
- ldq $11,16($30)
- ldq $12,24($30)
- ldq $13,32($30)
- ldq $14,40($30)
- ldq $15,48($30)
- lda $30,56($30)
- br $31,ret_from_sys_call
-
+ ldq $0,0($30) /* restore original $0 */
+ lda $30,256($30) /* pop entUna's stack frame */
+ SAVE_ALL /* setup normal kernel stack */
+ lda $30,-56($30)
+ stq $9,0($30)
+ stq $10,8($30)
+ stq $11,16($30)
+ stq $12,24($30)
+ stq $13,32($30)
+ stq $14,40($30)
+ stq $15,48($30)
+ lda $8,0x3fff
+ addq $30,56,$19
+ bic $30,$8,$8
+ jsr $26,do_entUnaUser
+ ldq $9,0($30)
+ ldq $10,8($30)
+ ldq $11,16($30)
+ ldq $12,24($30)
+ ldq $13,32($30)
+ ldq $14,40($30)
+ ldq $15,48($30)
+ lda $30,56($30)
+ br ret_from_sys_call
.end entUnaUser
/*
@@ -491,36 +486,36 @@
.globl sys_fork
.ent sys_fork
sys_fork:
- bsr $1,do_switch_stack
- bis $31,SIGCHLD,$16
- bis $31,$31,$17
- bis $30,$30,$18
- jsr $26,alpha_clone
- bsr $1,undo_switch_stack
- ret $31,($26),1
+ bsr $1,do_switch_stack
+ bis $31,SIGCHLD,$16
+ mov $31,$17
+ mov $30,$18
+ jsr $26,alpha_clone
+ bsr $1,undo_switch_stack
+ ret $31,($26),1
.end sys_fork
.align 3
.globl sys_clone
.ent sys_clone
sys_clone:
- bsr $1,do_switch_stack
+ bsr $1,do_switch_stack
/* arg1 and arg2 come from the user */
- bis $30,$30,$18
- jsr $26,alpha_clone
- bsr $1,undo_switch_stack
- ret $31,($26),1
+ mov $30,$18
+ jsr $26,alpha_clone
+ bsr $1,undo_switch_stack
+ ret $31,($26),1
.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
+ bsr $1,do_switch_stack
+ mov $30,$16
+ jsr $26,alpha_vfork
+ bsr $1,undo_switch_stack
+ ret $31,($26),1
.end sys_vfork
.align 3
@@ -528,12 +523,12 @@
.ent alpha_switch_to
alpha_switch_to:
.prologue 0
- bsr $1,do_switch_stack
+ bsr $1,do_switch_stack
call_pal PAL_swpctx
- lda $16,-2($31)
- call_pal PAL_tbi
- bsr $1,undo_switch_stack
- ret $31,($26),1
+ unop
+ bsr $1,undo_switch_stack
+ mov $17,$0
+ ret $31,($26),1
.end alpha_switch_to
/*
@@ -592,7 +587,7 @@
bne $5,signal_return
restore_all:
RESTORE_ALL
- rti
+ call_pal PAL_rti
/* PTRACE syscall handler */
@@ -620,7 +615,7 @@
s8addq $0,$2,$2
beq $1,1f
ldq $27,0($2)
-1: jsr $26,($27),alpha_ni_syscall
+1: jsr $26,($27),sys_gettimeofday
ldgp $29,0($26)
/* check return.. */
@@ -646,15 +641,15 @@
stq $1,72($30) /* a3 for return */
bsr $1,do_switch_stack
- bis $19,$19,$9 /* save old syscall number */
- bis $20,$20,$10 /* save old a3 */
+ mov $19,$9 /* save old syscall number */
+ mov $20,$10 /* save old a3 */
jsr $26,syscall_trace
- bis $9,$9,$19
- bis $10,$10,$20
+ mov $9,$19
+ mov $10,$20
bsr $1,undo_switch_stack
- bis $31,$31,$26 /* tell "ret_from_sys_call" that we can restart */
- br $31,ret_from_sys_call
+ mov $31,$26 /* tell "ret_from_sys_call" we can restart */
+ br ret_from_sys_call
.align 3
handle_bottom_half:
@@ -665,7 +660,7 @@
ldq $19,0($30)
ldq $20,8($30)
addq $30,16,$30
- br $31,ret_from_handle_bh
+ br ret_from_handle_bh
.align 3
syscall_error:
@@ -683,38 +678,35 @@
subq $31,$0,$0 /* with error in v0 */
addq $31,1,$1 /* set a3 for errno return */
stq $0,0($30)
- bis $31,$31,$26 /* tell "ret_from_sys_call" we can restart */
+ mov $31,$26 /* tell "ret_from_sys_call" we can restart */
stq $1,72($30) /* a3 for return */
- br $31,ret_from_sys_call
+ br ret_from_sys_call
ret_success:
stq $0,0($30)
stq $31,72($30) /* a3=0 => no error */
- br $31,ret_from_sys_call
+ br ret_from_sys_call
.align 3
signal_return:
- bis $30,$30,$17
+ mov $30,$17
br $1,do_switch_stack
- bis $30,$30,$18
- bis $31,$31,$16
+ mov $30,$18
+ mov $31,$16
jsr $26,do_signal
bsr $1,undo_switch_stack
- br $31,restore_all
+ br restore_all
.end entSys
#ifdef __SMP__
- .globl ret_from_smpfork
+ .globl ret_from_smp_fork
.align 3
-.ent ret_from_smpfork
-ret_from_smpfork:
- .set at
- mb /* Make the changed data visible before the freed lock. */
- stq $31,scheduler_lock
+.ent ret_from_smp_fork
+ret_from_smp_fork:
lda $26,ret_from_sys_call
+ mov $17,$16
jsr $31,schedule_tail
- .set noat
-.end ret_from_smpfork
+.end ret_from_smp_fork
#endif /* __SMP__ */
.align 3
@@ -727,51 +719,51 @@
ldq $19,0($30)
ldq $20,8($30)
addq $30,16,$30
- br $31,ret_from_reschedule
+ br ret_from_reschedule
.end reschedule
.align 3
.ent sys_sigreturn
sys_sigreturn:
- bis $30,$30,$17
+ mov $30,$17
+ lda $18,-SWITCH_STACK_SIZE($30)
lda $30,-SWITCH_STACK_SIZE($30)
- bis $30,$30,$18
jsr $26,do_sigreturn
br $1,undo_switch_stack
- br $31,ret_from_sys_call
+ br ret_from_sys_call
.end sys_sigreturn
.align 3
.ent sys_rt_sigreturn
sys_rt_sigreturn:
- bis $30,$30,$17
+ mov $30,$17
+ lda $18,-SWITCH_STACK_SIZE($30)
lda $30,-SWITCH_STACK_SIZE($30)
- bis $30,$30,$18
jsr $26,do_rt_sigreturn
br $1,undo_switch_stack
- br $31,ret_from_sys_call
+ br ret_from_sys_call
.end sys_rt_sigreturn
.align 3
.ent sys_sigsuspend
sys_sigsuspend:
- bis $30,$30,$17
+ mov $30,$17
br $1,do_switch_stack
- bis $30,$30,$18
+ mov $30,$18
jsr $26,do_sigsuspend
lda $30,SWITCH_STACK_SIZE($30)
- br $31,ret_from_sys_call
+ br ret_from_sys_call
.end sys_sigsuspend
.align 3
.ent sys_rt_sigsuspend
sys_rt_sigsuspend:
- bis $30,$30,$18
+ mov $30,$18
br $1,do_switch_stack
- bis $30,$30,$19
+ mov $30,$19
jsr $26,do_rt_sigsuspend
lda $30,SWITCH_STACK_SIZE($30)
- br $31,ret_from_sys_call
+ br ret_from_sys_call
.end sys_rt_sigsuspend
.data
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
--- v2.2.7/linux/arch/alpha/kernel/osf_sys.c Tue Mar 23 14:35:46 1999
+++ linux/arch/alpha/kernel/osf_sys.c Mon May 10 09:55:21 1999
@@ -141,6 +141,7 @@
struct inode *inode;
struct osf_dirent_callback buf;
+ lock_kernel();
error = -EBADF;
file = fget(fd);
if (!file)
@@ -173,6 +174,7 @@
out_putf:
fput(file);
out:
+ unlock_kernel();
return error;
}
@@ -883,7 +885,21 @@
case GSI_IEEE_FP_CONTROL:
/* Return current software fp control & status bits. */
/* Note that DU doesn't verify available space here. */
- w = current->tss.flags & IEEE_SW_MASK;
+
+ /* EV6 implements most of the bits in hardware. If
+ UNDZ is not set, UNFD is maintained in software. */
+ if (implver() == IMPLVER_EV6) {
+ unsigned long fpcr = rdfpcr();
+ w = ieee_fpcr_to_swcr(fpcr);
+ if (!(fpcr & FPCR_UNDZ)) {
+ w &= ~IEEE_TRAP_ENABLE_UNF;
+ w |= current->tss.flags & IEEE_TRAP_ENABLE_UNF;
+ }
+ } else {
+ /* Otherwise we are forced to do everything in sw. */
+ w = current->tss.flags & IEEE_SW_MASK;
+ }
+
if (put_user(w, (unsigned long *) buffer))
return -EFAULT;
return 0;
@@ -933,7 +949,7 @@
{
switch (op) {
case SSI_IEEE_FP_CONTROL: {
- unsigned long swcr, fpcr;
+ unsigned long swcr, fpcr, undz;
/*
* Alpha Architecture Handbook 4.7.7.3:
@@ -948,11 +964,12 @@
current->tss.flags &= ~IEEE_SW_MASK;
current->tss.flags |= swcr & IEEE_SW_MASK;
- /* Update the real fpcr. For exceptions that are disabled in
- software but have not been seen, enable the exception in
- hardware so that we can update our software status mask. */
- fpcr = rdfpcr() & (~FPCR_MASK | FPCR_DYN_MASK);
- fpcr |= ieee_swcr_to_fpcr(swcr | (~swcr & IEEE_STATUS_MASK)>>16);
+ /* Update the real fpcr. Keep UNFD off if not UNDZ. */
+ fpcr = rdfpcr();
+ undz = (fpcr & FPCR_UNDZ);
+ fpcr &= ~(FPCR_MASK | FPCR_DYN_MASK | FPCR_UNDZ);
+ fpcr |= ieee_swcr_to_fpcr(swcr);
+ fpcr &= ~(undz << 1);
wrfpcr(fpcr);
return 0;
@@ -1407,8 +1424,9 @@
copy_from_user(&txc.tick, &txc_p->tick, sizeof(struct timex32) -
offsetof(struct timex32, time)))
return -EFAULT;
-
- if ((ret = do_adjtimex(&txc)))
+
+ ret = do_adjtimex(&txc);
+ if (ret < 0)
return ret;
/* copy back to timex32 */
@@ -1418,5 +1436,5 @@
(put_tv32(&txc_p->time, &txc.time)))
return -EFAULT;
- return 0;
+ return ret;
}
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c
--- v2.2.7/linux/arch/alpha/kernel/process.c Wed Jan 20 23:14:04 1999
+++ linux/arch/alpha/kernel/process.c Mon May 10 09:55:21 1999
@@ -237,10 +237,13 @@
void flush_thread(void)
{
- /* Arrange for each exec'ed process to start off with a
- clean slate with respect to the FPU. */
+ /* Arrange for each exec'ed process to start off with a clean slate
+ with respect to the FPU. This is all exceptions disabled. Note
+ that EV6 defines UNFD valid only with UNDZ, which we don't want
+ for IEEE conformance -- so that disabled bit remains in software. */
+
current->tss.flags &= ~IEEE_SW_MASK;
- wrfpcr(FPCR_DYN_NORMAL);
+ wrfpcr(FPCR_DYN_NORMAL | FPCR_INVD | FPCR_DZED | FPCR_OVFD | FPCR_INED);
}
void release_thread(struct task_struct *dead_task)
@@ -270,8 +273,6 @@
(struct pt_regs *) (swstack+1));
}
-extern void ret_from_sys_call(void);
-extern void ret_from_smpfork(void);
/*
* Copy an alpha thread..
*
@@ -282,9 +283,13 @@
* Use the passed "regs" pointer to determine how much space we need
* for a kernel fork().
*/
+
int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
struct task_struct * p, struct pt_regs * regs)
{
+ extern void ret_from_sys_call(void);
+ extern void ret_from_smp_fork(void);
+
struct pt_regs * childregs;
struct switch_stack * childstack, *stack;
unsigned long stack_offset;
@@ -292,18 +297,18 @@
stack_offset = PAGE_SIZE - sizeof(struct pt_regs);
if (!(regs->ps & 8))
stack_offset = (PAGE_SIZE-1) & (unsigned long) regs;
- childregs = (struct pt_regs *) (stack_offset + PAGE_SIZE + (unsigned long)p);
+ childregs = (struct pt_regs *) (stack_offset + PAGE_SIZE + (long)p);
*childregs = *regs;
childregs->r0 = 0;
childregs->r19 = 0;
- childregs->r20 = 1; /* OSF/1 has some strange fork() semantics.. */
+ childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */
regs->r20 = 0;
stack = ((struct switch_stack *) regs) - 1;
childstack = ((struct switch_stack *) childregs) - 1;
*childstack = *stack;
#ifdef __SMP__
- childstack->r26 = (unsigned long) ret_from_smpfork;
+ childstack->r26 = (unsigned long) ret_from_smp_fork;
#else
childstack->r26 = (unsigned long) ret_from_sys_call;
#endif
@@ -328,10 +333,12 @@
dump->start_code = current->mm->start_code;
dump->start_data = current->mm->start_data;
dump->start_stack = rdusp() & ~(PAGE_SIZE - 1);
- dump->u_tsize = (current->mm->end_code - dump->start_code) >> PAGE_SHIFT;
- dump->u_dsize = (current->mm->brk + (PAGE_SIZE - 1) - dump->start_data) >> PAGE_SHIFT;
- dump->u_ssize =
- (current->mm->start_stack - dump->start_stack + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ dump->u_tsize = ((current->mm->end_code - dump->start_code)
+ >> PAGE_SHIFT);
+ dump->u_dsize = ((current->mm->brk + PAGE_SIZE-1 - dump->start_data)
+ >> PAGE_SHIFT);
+ dump->u_ssize = (current->mm->start_stack - dump->start_stack
+ + PAGE_SIZE-1) >> PAGE_SHIFT;
/*
* We store the registers in an order/format that is
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/kernel/smp.c linux/arch/alpha/kernel/smp.c
--- v2.2.7/linux/arch/alpha/kernel/smp.c Mon Mar 29 11:09:11 1999
+++ linux/arch/alpha/kernel/smp.c Mon May 10 09:55:21 1999
@@ -37,7 +37,18 @@
#define DBGS(args)
#endif
-struct ipi_msg_flush_tb_struct ipi_msg_flush_tb __cacheline_aligned;
+struct ipi_msg_flush_tb_struct {
+ volatile unsigned int flush_tb_mask;
+ union {
+ struct mm_struct * flush_mm;
+ struct vm_area_struct * flush_vma;
+ } p;
+ unsigned long flush_addr;
+ unsigned long flush_end;
+};
+
+static struct ipi_msg_flush_tb_struct ipi_msg_flush_tb __cacheline_aligned;
+static spinlock_t flush_tb_lock = SPIN_LOCK_UNLOCKED;
struct cpuinfo_alpha cpu_data[NR_CPUS];
@@ -786,7 +797,7 @@
unsigned long to_whom = cpu_present_map ^ (1 << smp_processor_id());
long timeout = 1000000;
- spin_lock_own(&kernel_flag, "flush_tlb_all");
+ spin_lock(&flush_tb_lock);
ipi_msg_flush_tb.flush_tb_mask = to_whom;
send_ipi_message(to_whom, IPI_TLB_ALL);
@@ -803,6 +814,8 @@
ipi_msg_flush_tb.flush_tb_mask);
ipi_msg_flush_tb.flush_tb_mask = 0;
}
+
+ spin_unlock(&flush_tb_lock);
}
void
@@ -811,7 +824,7 @@
unsigned long to_whom = cpu_present_map ^ (1 << smp_processor_id());
long timeout = 1000000;
- spin_lock_own(&kernel_flag, "flush_tlb_mm");
+ spin_lock(&flush_tb_lock);
ipi_msg_flush_tb.flush_tb_mask = to_whom;
ipi_msg_flush_tb.p.flush_mm = mm;
@@ -833,6 +846,8 @@
ipi_msg_flush_tb.flush_tb_mask);
ipi_msg_flush_tb.flush_tb_mask = 0;
}
+
+ spin_unlock(&flush_tb_lock);
}
void
@@ -843,7 +858,7 @@
struct mm_struct * mm = vma->vm_mm;
int timeout = 1000000;
- spin_lock_own(&kernel_flag, "flush_tlb_page");
+ spin_lock(&flush_tb_lock);
ipi_msg_flush_tb.flush_tb_mask = to_whom;
ipi_msg_flush_tb.p.flush_vma = vma;
@@ -866,6 +881,8 @@
ipi_msg_flush_tb.flush_tb_mask);
ipi_msg_flush_tb.flush_tb_mask = 0;
}
+
+ spin_unlock(&flush_tb_lock);
}
void
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/kernel/traps.c linux/arch/alpha/kernel/traps.c
--- v2.2.7/linux/arch/alpha/kernel/traps.c Tue Feb 23 15:21:32 1999
+++ linux/arch/alpha/kernel/traps.c Mon May 10 09:55:21 1999
@@ -125,13 +125,16 @@
unsigned long a2, unsigned long a3, unsigned long a4,
unsigned long a5, struct pt_regs regs)
{
- if ((summary & 1)) {
- /*
- * Software-completion summary bit is set, so try to
- * emulate the instruction.
- */
- if (alpha_fp_emul_imprecise(®s, write_mask)) {
- return; /* emulation was successful */
+ if (summary & 1) {
+ /* Software-completion summary bit is set, so try to
+ emulate the instruction. */
+ if (implver() == IMPLVER_EV6) {
+ /* Whee! EV6 has precice exceptions. */
+ if (alpha_fp_emul(regs.pc - 4))
+ return;
+ } else {
+ if (alpha_fp_emul_imprecise(®s, write_mask))
+ return;
}
}
@@ -141,7 +144,7 @@
current->comm, regs.pc, summary, write_mask);
#endif
die_if_kernel("Arithmetic fault", ®s, 0, 0);
- force_sig(SIGFPE, current);
+ send_sig(SIGFPE, current, 1);
unlock_kernel();
}
@@ -150,14 +153,17 @@
unsigned long a2, unsigned long a3, unsigned long a4,
unsigned long a5, struct pt_regs regs)
{
- lock_kernel();
die_if_kernel("Instruction fault", ®s, type, 0);
switch (type) {
case 0: /* breakpoint */
if (ptrace_cancel_bpt(current)) {
regs.pc -= 4; /* make pc point to former bpt */
}
- force_sig(SIGTRAP, current);
+ send_sig(SIGTRAP, current, 1);
+ break;
+
+ case 1: /* bugcheck */
+ send_sig(SIGTRAP, current, 1);
break;
case 2: /* gentrap */
@@ -171,14 +177,13 @@
switch ((long) regs.r16) {
case GEN_INTOVF: case GEN_INTDIV: case GEN_FLTOVF:
case GEN_FLTDIV: case GEN_FLTUND: case GEN_FLTINV:
- case GEN_FLTINE:
- force_sig(SIGFPE, current);
+ case GEN_FLTINE: case GEN_ROPRAND:
+ send_sig(SIGFPE, current, 1);
break;
case GEN_DECOVF:
case GEN_DECDIV:
case GEN_DECINV:
- case GEN_ROPRAND:
case GEN_ASSERTERR:
case GEN_NULPTRERR:
case GEN_STKOVF:
@@ -193,42 +198,29 @@
case GEN_SUBRNG5:
case GEN_SUBRNG6:
case GEN_SUBRNG7:
- force_sig(SIGILL, current);
+ send_sig(SIGTRAP, current, 1);
break;
}
break;
- case 1: /* bugcheck */
case 3: /* FEN fault */
- force_sig(SIGILL, current);
+ send_sig(SIGILL, current, 1);
break;
case 4: /* opDEC */
-#ifdef CONFIG_ALPHA_NEED_ROUNDING_EMULATION
- {
- unsigned int opcode;
-
- /* get opcode of faulting instruction: */
- get_user(opcode, (__u32*)(regs.pc - 4));
- opcode >>= 26;
- if (opcode == 0x16) {
- /*
- * It's a FLTI instruction, emulate it
- * (we don't do no stinkin' VAX fp...)
- */
- if (!alpha_fp_emul(regs.pc - 4))
- force_sig(SIGFPE, current);
- break;
- }
+ if (implver() == IMPLVER_EV4) {
+ /* EV4 does not implement anything except normal
+ rounding. Everything else will come here as
+ an illegal instruction. Emulate them. */
+ if (alpha_fp_emul(regs.pc - 4))
+ return;
}
-#endif
- force_sig(SIGILL, current);
+ send_sig(SIGILL, current, 1);
break;
default:
panic("do_entIF: unexpected instruction-fault type");
}
- unlock_kernel();
}
/* There is an ifdef in the PALcode in MILO that enables a
@@ -877,14 +869,14 @@
give_sigsegv:
regs->pc -= 4; /* make pc point to faulting insn */
lock_kernel();
- force_sig(SIGSEGV, current);
+ send_sig(SIGSEGV, current, 1);
unlock_kernel();
return;
give_sigbus:
regs->pc -= 4;
lock_kernel();
- force_sig(SIGBUS, current);
+ send_sig(SIGBUS, current, 1);
unlock_kernel();
return;
}
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/lib/copy_user.S linux/arch/alpha/lib/copy_user.S
--- v2.2.7/linux/arch/alpha/lib/copy_user.S Wed Apr 28 11:37:29 1999
+++ linux/arch/alpha/lib/copy_user.S Fri Apr 30 08:22:19 1999
@@ -109,7 +109,7 @@
$66:
EXI( ldq $1,0($7) )
subq $4,8,$4
- stq $1,0($6)
+ EXO( stq $1,0($6) )
addq $7,8,$7
subq $0,8,$0
addq $6,8,$6
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/math-emu/fp-emul.c linux/arch/alpha/math-emu/fp-emul.c
--- v2.2.7/linux/arch/alpha/math-emu/fp-emul.c Tue Aug 18 22:02:02 1998
+++ linux/arch/alpha/math-emu/fp-emul.c Mon May 10 09:55:21 1999
@@ -13,6 +13,7 @@
#define OPC_INTL 0x11
#define OPC_INTS 0x12
#define OPC_INTM 0x13
+#define OPC_FLTC 0x14
#define OPC_FLTV 0x15
#define OPC_FLTI 0x16
#define OPC_FLTL 0x17
@@ -21,33 +22,37 @@
#define OPC_JSR 0x1a
+#define OP_FUN(OP,FUN) ((OP << 26) | (FUN << 5))
+
/*
- * "Base" function codes for the FLTI-class instructions. These
- * instructions all have opcode 0x16. Note that in most cases these
- * actually correspond to the "chopped" form of the instruction. Not
- * to worry---we extract the qualifier bits separately and deal with
- * them separately. Notice that base function code 0x2c is used for
- * both CVTTS and CVTST. The other bits in the function code are used
- * to distinguish the two.
+ * "Base" function codes for the FLTI-class instructions.
+ * Note that in most cases these actually correspond to the "chopped"
+ * form of the instruction. Not to worry---we extract the qualifier
+ * bits separately and deal with them separately. Notice that base
+ * function code 0x2c is used for both CVTTS and CVTST. The other bits
+ * in the function code are used to distinguish the two.
*/
-#define FLTI_FUNC_ADDS 0x000
-#define FLTI_FUNC_ADDT 0x020
-#define FLTI_FUNC_CMPTEQ 0x025
-#define FLTI_FUNC_CMPTLT 0x026
-#define FLTI_FUNC_CMPTLE 0x027
-#define FLTI_FUNC_CMPTUN 0x024
-#define FLTI_FUNC_CVTTS_or_CVTST 0x02c
-#define FLTI_FUNC_CVTTQ 0x02f
-#define FLTI_FUNC_CVTQS 0x03c
-#define FLTI_FUNC_CVTQT 0x03e
-#define FLTI_FUNC_DIVS 0x003
-#define FLTI_FUNC_DIVT 0x023
-#define FLTI_FUNC_MULS 0x002
-#define FLTI_FUNC_MULT 0x022
-#define FLTI_FUNC_SUBS 0x001
-#define FLTI_FUNC_SUBT 0x021
+#define FLTI_FUNC_ADDS OP_FUN(OPC_FLTI, 0x000)
+#define FLTI_FUNC_ADDT OP_FUN(OPC_FLTI, 0x020)
+#define FLTI_FUNC_CMPTEQ OP_FUN(OPC_FLTI, 0x025)
+#define FLTI_FUNC_CMPTLT OP_FUN(OPC_FLTI, 0x026)
+#define FLTI_FUNC_CMPTLE OP_FUN(OPC_FLTI, 0x027)
+#define FLTI_FUNC_CMPTUN OP_FUN(OPC_FLTI, 0x024)
+#define FLTI_FUNC_CVTTS_or_CVTST OP_FUN(OPC_FLTI, 0x02c)
+#define FLTI_FUNC_CVTTQ OP_FUN(OPC_FLTI, 0x02f)
+#define FLTI_FUNC_CVTQS OP_FUN(OPC_FLTI, 0x03c)
+#define FLTI_FUNC_CVTQT OP_FUN(OPC_FLTI, 0x03e)
+#define FLTI_FUNC_DIVS OP_FUN(OPC_FLTI, 0x003)
+#define FLTI_FUNC_DIVT OP_FUN(OPC_FLTI, 0x023)
+#define FLTI_FUNC_MULS OP_FUN(OPC_FLTI, 0x002)
+#define FLTI_FUNC_MULT OP_FUN(OPC_FLTI, 0x022)
+#define FLTI_FUNC_SUBS OP_FUN(OPC_FLTI, 0x001)
+#define FLTI_FUNC_SUBT OP_FUN(OPC_FLTI, 0x021)
+
+#define FLTC_FUNC_SQRTS OP_FUN(OPC_FLTC, 0x00B)
+#define FLTC_FUNC_SQRTT OP_FUN(OPC_FLTC, 0x02B)
-#define FLTI_FUNC_CVTQL 0x030 /* opcode 0x17 */
+#define FLTL_FUNC_CVTQL OP_FUN(OPC_FLTL, 0x030)
#define MISC_TRAPB 0x0000
#define MISC_EXCB 0x0400
@@ -101,7 +106,7 @@
long
alpha_fp_emul (unsigned long pc)
{
- unsigned long opcode, fa, fb, fc, func, mode;
+ unsigned long op_fun, fa, fb, fc, func, mode;
unsigned long fpcw = current->tss.flags;
unsigned long va, vb, vc, res, fpcr;
__u32 insn;
@@ -110,10 +115,11 @@
get_user(insn, (__u32*)pc);
fc = (insn >> 0) & 0x1f; /* destination register */
- func = (insn >> 5) & 0x7ff;
fb = (insn >> 16) & 0x1f;
fa = (insn >> 21) & 0x1f;
- opcode = insn >> 26;
+ func = (insn >> 5) & 0x7ff;
+ mode = (insn >> 5) & 0xc0;
+ op_fun = insn & OP_FUN(0x3f, 0x3f);
va = alpha_read_fp_reg(fa);
vb = alpha_read_fp_reg(fb);
@@ -123,7 +129,6 @@
* Try the operation in software. First, obtain the rounding
* mode...
*/
- mode = func & 0xc0;
if (mode == 0xc0) {
/* dynamic---get rounding mode from fpcr: */
mode = ((fpcr & FPCR_DYN_MASK) >> FPCR_DYN_SHIFT) << ROUND_SHIFT;
@@ -135,8 +140,7 @@
something_is_wrong();
}
- /* least 6 bits contain operation code: */
- switch (func & 0x3f) {
+ switch (op_fun) {
case FLTI_FUNC_CMPTEQ:
res = ieee_CMPTEQ(va, vb, &vc);
break;
@@ -153,7 +157,7 @@
res = ieee_CMPTUN(va, vb, &vc);
break;
- case FLTI_FUNC_CVTQL:
+ case FLTL_FUNC_CVTQL:
/*
* Notice: We can get here only due to an integer
* overflow. Such overflows are reported as invalid
@@ -222,6 +226,14 @@
res = ieee_CVTTQ(mode, vb, &vc);
break;
+ case FLTC_FUNC_SQRTS:
+ res = ieee_SQRTS(mode, vb, &vc);
+ break;
+
+ case FLTC_FUNC_SQRTT:
+ res = ieee_SQRTT(mode, vb, &vc);
+ break;
+
default:
printk("alpha_fp_emul: unexpected function code %#lx at %#lx\n",
func & 0x3f, pc);
@@ -247,7 +259,7 @@
/* Update hardware control register */
fpcr &= (~FPCR_MASK | FPCR_DYN_MASK);
- fpcr |= ieee_swcr_to_fpcr(fpcw | (~fpcw&IEEE_STATUS_MASK)>>16);
+ fpcr |= ieee_swcr_to_fpcr(fpcw);
wrfpcr(fpcr);
/* Do we generate a signal? */
@@ -319,6 +331,7 @@
write_mask &= ~(1UL << rc);
break;
+ case OPC_FLTC:
case OPC_FLTV:
case OPC_FLTI:
case OPC_FLTL:
@@ -326,13 +339,11 @@
break;
}
if (!write_mask) {
- if ((opcode == OPC_FLTI || opcode == OPC_FLTL)
- && alpha_fp_emul(trigger_pc))
- {
- /* re-execute insns in trap-shadow: */
- regs->pc = trigger_pc + 4;
- MOD_DEC_USE_COUNT;
- return 1;
+ if (alpha_fp_emul(trigger_pc)) {
+ /* re-execute insns in trap-shadow: */
+ regs->pc = trigger_pc + 4;
+ MOD_DEC_USE_COUNT;
+ return 1;
}
break;
}
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/math-emu/ieee-math.c linux/arch/alpha/math-emu/ieee-math.c
--- v2.2.7/linux/arch/alpha/math-emu/ieee-math.c Wed Sep 9 14:51:04 1998
+++ linux/arch/alpha/math-emu/ieee-math.c Mon May 10 09:55:21 1999
@@ -22,6 +22,7 @@
* functions are used on exceptional numbers only (well, assuming you
* don't turn on the "trap on inexact"...).
*/
+#include
#include "ieee-math.h"
#define STICKY_S 0x20000000 /* both in longword 0 of fraction */
@@ -1339,4 +1340,42 @@
normalize(&op_c);
op_c.e -= 9; /* remove excess exp from original shift */
return round_t_ieee(f, &op_c, c);
+}
+
+/*
+ * Sqrt a = b, where a and b are ieee s-floating numbers. "f"
+ * contains the rounding mode etc.
+ */
+unsigned long
+ieee_SQRTS (int f, unsigned long a, unsigned long *b)
+{
+ fpclass_t a_type;
+ EXTENDED op_a, op_b;
+
+ *b = IEEE_QNaN;
+ a_type = extend_ieee(a, &op_a, SINGLE);
+ if (op_a.s == 0) {
+ /* FIXME -- handle positive denormals. */
+ send_sig(SIGFPE, current, 1);
+ }
+ return FPCR_INV;
+}
+
+/*
+ * Sqrt a = b, where a and b are ieee t-floating numbers. "f"
+ * contains the rounding mode etc.
+ */
+unsigned long
+ieee_SQRTT (int f, unsigned long a, unsigned long *b)
+{
+ fpclass_t a_type;
+ EXTENDED op_a, op_b;
+
+ *b = IEEE_QNaN;
+ a_type = extend_ieee(a, &op_a, DOUBLE);
+ if (op_a.s == 0) {
+ /* FIXME -- handle positive denormals. */
+ send_sig(SIGFPE, current, 1);
+ }
+ return FPCR_INV;
}
diff -u --recursive --new-file v2.2.7/linux/arch/alpha/math-emu/ieee-math.h linux/arch/alpha/math-emu/ieee-math.h
--- v2.2.7/linux/arch/alpha/math-emu/ieee-math.h Thu Dec 21 22:22:05 1995
+++ linux/arch/alpha/math-emu/ieee-math.h Mon May 10 09:55:21 1999
@@ -48,5 +48,7 @@
unsigned long *c);
extern unsigned long ieee_DIVT (int rm, unsigned long a, unsigned long b,
unsigned long *c);
+extern unsigned long ieee_SQRTS (int rm, unsigned long a, unsigned long *b);
+extern unsigned long ieee_SQRTT (int rm, unsigned long a, unsigned long *b);
#endif /* __ieee_math_h__ */
diff -u --recursive --new-file v2.2.7/linux/arch/arm/kernel/sys_arm.c linux/arch/arm/kernel/sys_arm.c
--- v2.2.7/linux/arch/arm/kernel/sys_arm.c Tue Dec 22 14:16:53 1998
+++ linux/arch/arm/kernel/sys_arm.c Sat May 8 11:14:01 1999
@@ -77,12 +77,14 @@
goto out;
if (!(a.flags & MAP_ANONYMOUS)) {
error = -EBADF;
- if (a.fd >= current->files->max_fds ||
- !(file = current->files->fd[a.fd]))
+ file = fget(a.fd);
+ if (!file)
goto out;
}
a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
error = do_mmap(file, a.addr, a.len, a.prot, a.flags, a.offset);
+ if (file)
+ fput(file);
out:
unlock_kernel();
return error;
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/Makefile linux/arch/arm/mm/Makefile
--- v2.2.7/linux/arch/arm/mm/Makefile Fri May 8 23:14:42 1998
+++ linux/arch/arm/mm/Makefile Sat May 8 11:06:56 1999
@@ -8,37 +8,30 @@
# Note 2! The CFLAGS definition is now in the main makefile...
all: lib first_rule
-ifeq ($(MACHINE),a5k)
-MMARCH=arc
-else
-MMARCH=$(MACHINE)
-endif
O_TARGET := mm.o
-O_OBJS := init.o extable.o fault-$(PROCESSOR).o mm-$(MMARCH).o
+O_OBJS := init.o extable.o fault-$(PROCESSOR).o small_page.o
ifeq ($(PROCESSOR),armo)
O_OBJS += proc-arm2,3.o
endif
ifeq ($(PROCESSOR),armv)
- O_OBJS += small_page.o proc-arm6,7.o proc-sa110.o
+ O_OBJS += mm-$(MACHINE).o proc-arm6,7.o proc-sa110.o ioremap.o
endif
include $(TOPDIR)/Rules.make
-proc-arm2,3.o: ../lib/constants.h
-proc-arm6,7.o: ../lib/constants.h
-proc-sa110.o: ../lib/constants.h
-
%.o: %.S
-ifneq ($(CONFIG_BINUTILS_NEW),y)
- $(CC) $(CFLAGS) -D__ASSEMBLY__ -E $< | tr ';$$' '\n#' > ..$@.tmp.s
- $(CC) $(CFLAGS:-pipe=) -c -o $@ ..$@.tmp.s
- $(RM) ..$@.tmp.s
-else
$(CC) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
-endif
.PHONY: lib
lib:; @$(MAKE) -C ../lib constants.h
+
+# Special dependencies
+fault-armv.o: fault-common.c
+fault-armo.o: fault-common.c
+proc-arm2,3.o: ../lib/constants.h
+proc-arm6,7.o: ../lib/constants.h
+proc-sa110.o: ../lib/constants.h
+
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/fault-armo.c linux/arch/arm/mm/fault-armo.c
--- v2.2.7/linux/arch/arm/mm/fault-armo.c Tue Dec 22 14:16:53 1998
+++ linux/arch/arm/mm/fault-armo.c Sat May 8 11:06:56 1999
@@ -1,11 +1,10 @@
/*
- * linux/arch/arm/mm/fault.c
+ * linux/arch/arm/mm/fault-armo.c
*
* Copyright (C) 1995 Linus Torvalds
- * Modifications for ARM processor (c) 1995, 1996 Russell King
+ * Modifications for ARM processor (c) 1995-1999 Russell King
*/
-#include
#include
#include
#include
@@ -15,8 +14,7 @@
#include
#include
#include
-#include
-#include
+#include
#include
#include
@@ -27,35 +25,32 @@
#define FAULT_CODE_WRITE 0x02
#define FAULT_CODE_USER 0x01
-struct pgtable_cache_struct quicklists;
+#define DO_COW(m) ((m) & (FAULT_CODE_WRITE|FAULT_CODE_FORCECOW))
+#define READ_FAULT(m) (!((m) & FAULT_CODE_WRITE))
-void __bad_pmd(pmd_t *pmd)
+#include "fault-common.c"
+
+static void *alloc_table(int size, int prio)
{
- printk("Bad pmd in pte_alloc: %08lx\n", pmd_val(*pmd));
-#ifdef CONFIG_DEBUG_ERRORS
- __backtrace();
-#endif
- set_pmd(pmd, mk_pmd(BAD_PAGETABLE));
+ if (size != 128)
+ printk("invalid table size\n");
+ return (void *)get_page_8k(prio);
}
-void __bad_pmd_kernel(pmd_t *pmd)
+void free_table(void *table)
{
- printk("Bad pmd in pte_alloc_kernel: %08lx\n", pmd_val(*pmd));
-#ifdef CONFIG_DEBUG_ERRORS
- __backtrace();
-#endif
- set_pmd(pmd, mk_pmd(BAD_PAGETABLE));
+ free_page_8k((unsigned long)table);
}
pgd_t *get_pgd_slow(void)
{
- pgd_t *pgd = (pgd_t *) kmalloc(PTRS_PER_PGD * BYTES_PER_PTR, GFP_KERNEL);
+ pgd_t *pgd = (pgd_t *)alloc_table(PTRS_PER_PGD * BYTES_PER_PTR, GFP_KERNEL);
pgd_t *init;
-
+
if (pgd) {
init = pgd_offset(&init_mm, 0);
- memzero (pgd, USER_PTRS_PER_PGD * BYTES_PER_PTR);
- memcpy (pgd + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
+ memzero(pgd, USER_PTRS_PER_PGD * BYTES_PER_PTR);
+ memcpy(pgd + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
(PTRS_PER_PGD - USER_PTRS_PER_PGD) * BYTES_PER_PTR);
}
return pgd;
@@ -65,17 +60,17 @@
{
pte_t *pte;
- pte = (pte_t *) kmalloc (PTRS_PER_PTE * BYTES_PER_PTR, GFP_KERNEL);
+ pte = (pte_t *)alloc_table(PTRS_PER_PTE * BYTES_PER_PTR, GFP_KERNEL);
if (pmd_none(*pmd)) {
if (pte) {
- memzero (pte, PTRS_PER_PTE * BYTES_PER_PTR);
+ memzero(pte, PTRS_PER_PTE * BYTES_PER_PTR);
set_pmd(pmd, mk_pmd(pte));
return pte + offset;
}
set_pmd(pmd, mk_pmd(BAD_PAGETABLE));
return NULL;
}
- kfree (pte);
+ free_table((void *)pte);
if (pmd_bad(*pmd)) {
__bad_pmd(pmd);
return NULL;
@@ -83,126 +78,22 @@
return (pte_t *) pmd_page(*pmd) + offset;
}
-extern void die_if_kernel(char *msg, struct pt_regs *regs, unsigned int err, unsigned int ret);
-
-static void kernel_page_fault (unsigned long addr, int mode, struct pt_regs *regs,
- struct task_struct *tsk, struct mm_struct *mm)
-{
- /*
- * Oops. The kernel tried to access some bad page. We'll have to
- * terminate things with extreme prejudice.
- */
- pgd_t *pgd;
- if (addr < PAGE_SIZE)
- printk (KERN_ALERT "Unable to handle kernel NULL pointer dereference");
- else
- printk (KERN_ALERT "Unable to handle kernel paging request");
- printk (" at virtual address %08lx\n", addr);
- printk (KERN_ALERT "current->tss.memmap = %08lX\n", tsk->tss.memmap);
- pgd = pgd_offset (mm, addr);
- printk (KERN_ALERT "*pgd = %08lx", pgd_val (*pgd));
- if (!pgd_none (*pgd)) {
- pmd_t *pmd;
- pmd = pmd_offset (pgd, addr);
- printk (", *pmd = %08lx", pmd_val (*pmd));
- if (!pmd_none (*pmd))
- printk (", *pte = %08lx", pte_val (*pte_offset (pmd, addr)));
- }
- printk ("\n");
- die_if_kernel ("Oops", regs, mode, SIGKILL);
- do_exit (SIGKILL);
-}
-
-static void
-handle_dataabort (unsigned long addr, int mode, struct pt_regs *regs)
-{
- struct task_struct *tsk;
- struct mm_struct *mm;
- struct vm_area_struct *vma;
- unsigned long fixup;
-
- lock_kernel();
- tsk = current;
- mm = tsk->mm;
-
- down(&mm->mmap_sem);
- vma = find_vma (mm, addr);
- if (!vma)
- goto bad_area;
- if (addr >= vma->vm_start)
- goto good_area;
- if (!(vma->vm_flags & VM_GROWSDOWN) || expand_stack (vma, addr))
- goto bad_area;
-
- /*
- * Ok, we have a good vm_area for this memory access, so
- * we can handle it..
- */
-good_area:
- if (!(mode & FAULT_CODE_WRITE)) { /* write? */
- if (!(vma->vm_flags & (VM_READ|VM_EXEC)))
- goto bad_area;
- } else {
- if (!(vma->vm_flags & VM_WRITE))
- goto bad_area;
- }
- handle_mm_fault (tsk, vma, addr, mode & (FAULT_CODE_WRITE|FAULT_CODE_FORCECOW));
- up(&mm->mmap_sem);
- goto out;
-
- /*
- * Something tried to access memory that isn't in our memory map..
- * Fix it, but check if it's kernel or user first..
- */
-bad_area:
- up(&mm->mmap_sem);
- if (mode & FAULT_CODE_USER) {
-//extern int console_loglevel;
-//cli();
- tsk->tss.error_code = mode;
- tsk->tss.trap_no = 14;
-//console_loglevel = 9;
- printk ("%s: memory violation at pc=0x%08lx, lr=0x%08lx (bad address=0x%08lx, code %d)\n",
- tsk->comm, regs->ARM_pc, regs->ARM_lr, addr, mode);
-//#ifdef DEBUG
- show_regs (regs);
- c_backtrace (regs->ARM_fp, 0);
-//#endif
- force_sig(SIGSEGV, tsk);
-//while (1);
- goto out;
- }
-
- /* Are we prepared to handle this kernel fault? */
- 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;
- goto out;
- }
-
-
- kernel_page_fault (addr, mode, regs, tsk, mm);
-out:
- unlock_kernel();
-}
-
/*
* Handle a data abort. Note that we have to handle a range of addresses
* on ARM2/3 for ldm. If both pages are zero-mapped, then we have to force
- * a copy-on-write
+ * a copy-on-write. However, on the second page, we always force COW.
*/
asmlinkage void
-do_DataAbort (unsigned long min_addr, unsigned long max_addr, int mode, struct pt_regs *regs)
+do_DataAbort(unsigned long min_addr, unsigned long max_addr, int mode, struct pt_regs *regs)
{
- handle_dataabort (min_addr, mode, regs);
+ do_page_fault(min_addr, mode, regs);
if ((min_addr ^ max_addr) >> PAGE_SHIFT)
- handle_dataabort (max_addr, mode | FAULT_CODE_FORCECOW, regs);
+ do_page_fault(max_addr, mode | FAULT_CODE_FORCECOW, regs);
}
asmlinkage int
-do_PrefetchAbort (unsigned long addr, int mode, struct pt_regs *regs)
+do_PrefetchAbort(unsigned long addr, struct pt_regs *regs)
{
#if 0
if (the memc mapping for this page exists - can check now...) {
@@ -210,6 +101,6 @@
return 0;
}
#endif
- handle_dataabort (addr, mode, regs);
+ do_page_fault(addr, FAULT_CODE_USER|FAULT_CODE_PREFETCH, regs);
return 1;
}
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/fault-armv.c linux/arch/arm/mm/fault-armv.c
--- v2.2.7/linux/arch/arm/mm/fault-armv.c Tue Dec 22 14:16:53 1998
+++ linux/arch/arm/mm/fault-armv.c Sat May 8 11:06:56 1999
@@ -1,10 +1,11 @@
/*
- * linux/arch/arm/mm/fault.c
+ * linux/arch/arm/mm/fault-armv.c
*
* Copyright (C) 1995 Linus Torvalds
- * Modifications for ARM processor (c) 1995, 1996 Russell King
+ * Modifications for ARM processor (c) 1995-1999 Russell King
*/
+#include
#include
#include
#include
@@ -14,43 +15,37 @@
#include
#include
#include
-#include
-#include
+#include
+#include
+#include
#include
#include
#include
+#include
#define FAULT_CODE_READ 0x02
#define FAULT_CODE_USER 0x01
-struct pgtable_cache_struct quicklists;
+#define DO_COW(m) (!((m) & FAULT_CODE_READ))
+#define READ_FAULT(m) ((m) & FAULT_CODE_READ)
-void __bad_pmd(pmd_t *pmd)
-{
- printk("Bad pmd in pte_alloc: %08lx\n", pmd_val(*pmd));
- set_pmd(pmd, mk_user_pmd(BAD_PAGETABLE));
-}
-
-void __bad_pmd_kernel(pmd_t *pmd)
-{
- printk("Bad pmd in pte_alloc: %08lx\n", pmd_val(*pmd));
- set_pmd(pmd, mk_kernel_pmd(BAD_PAGETABLE));
-}
+#include "fault-common.c"
pgd_t *get_pgd_slow(void)
{
/*
* need to get a 16k page for level 1
*/
- pgd_t *pgd = (pgd_t *) __get_free_pages(GFP_KERNEL,2);
+ pgd_t *pgd = (pgd_t *)__get_free_pages(GFP_KERNEL,2);
pgd_t *init;
-
+
if (pgd) {
init = pgd_offset(&init_mm, 0);
- memzero ((void *)pgd, USER_PTRS_PER_PGD * BYTES_PER_PTR);
- memcpy (pgd + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
+ memzero(pgd, USER_PTRS_PER_PGD * BYTES_PER_PTR);
+ memcpy(pgd + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
(PTRS_PER_PGD - USER_PTRS_PER_PGD) * BYTES_PER_PTR);
+ clean_cache_area(pgd, PTRS_PER_PGD * BYTES_PER_PTR);
}
return pgd;
}
@@ -59,17 +54,19 @@
{
pte_t *pte;
- pte = (pte_t *) get_small_page(GFP_KERNEL);
+ pte = (pte_t *)get_page_2k(GFP_KERNEL);
if (pmd_none(*pmd)) {
if (pte) {
- memzero (pte, PTRS_PER_PTE * BYTES_PER_PTR);
+ memzero(pte, 2 * PTRS_PER_PTE * BYTES_PER_PTR);
+ clean_cache_area(pte, PTRS_PER_PTE * BYTES_PER_PTR);
+ pte += PTRS_PER_PTE;
set_pmd(pmd, mk_user_pmd(pte));
return pte + offset;
}
set_pmd(pmd, mk_user_pmd(BAD_PAGETABLE));
return NULL;
}
- free_small_page ((unsigned long) pte);
+ free_page_2k((unsigned long)pte);
if (pmd_bad(*pmd)) {
__bad_pmd(pmd);
return NULL;
@@ -81,17 +78,19 @@
{
pte_t *pte;
- pte = (pte_t *) get_small_page(GFP_KERNEL);
+ pte = (pte_t *)get_page_2k(GFP_KERNEL);
if (pmd_none(*pmd)) {
if (pte) {
- memzero (pte, PTRS_PER_PTE * BYTES_PER_PTR);
+ memzero(pte, 2 * PTRS_PER_PTE * BYTES_PER_PTR);
+ clean_cache_area(pte, PTRS_PER_PTE * BYTES_PER_PTR);
+ pte += PTRS_PER_PTE;
set_pmd(pmd, mk_kernel_pmd(pte));
return pte + offset;
}
set_pmd(pmd, mk_kernel_pmd(BAD_PAGETABLE));
return NULL;
}
- free_small_page ((unsigned long) pte);
+ free_page_2k((unsigned long)pte);
if (pmd_bad(*pmd)) {
__bad_pmd_kernel(pmd);
return NULL;
@@ -99,10 +98,8 @@
return (pte_t *) pmd_page(*pmd) + offset;
}
-extern void die_if_kernel(char *msg, struct pt_regs *regs, unsigned int err, unsigned int ret);
-
#ifdef DEBUG
-static int sp_valid (unsigned long *sp)
+static int sp_valid(unsigned long *sp)
{
unsigned long addr = (unsigned long) sp;
@@ -114,187 +111,371 @@
}
#endif
-static void kernel_page_fault (unsigned long addr, int mode, struct pt_regs *regs,
- struct task_struct *tsk, struct mm_struct *mm)
+#ifdef CONFIG_ALIGNMENT_TRAP
+/*
+ * 32-bit misaligned trap handler (c) 1998 San Mehat (CCC) -July 1998
+ * /proc/sys/debug/alignment, modified and integrated into
+ * Linux 2.1 by Russell King
+ *
+ * NOTE!!! This is not portable onto the ARM6/ARM7 processors yet. Also,
+ * it seems to give a severe performance impact (1 abort/ms - NW runs at
+ * ARM6 speeds) with GCC 2.7.2.2 - needs checking with a later GCC/EGCS.
+ *
+ * IMHO, I don't think that the trap handler is advantageous on ARM6,7
+ * processors (they'll run like an ARM3). We'll see.
+ */
+#define CODING_BITS(i) (i & 0x0e000000)
+
+#define LDST_I_BIT(i) (i & (1 << 26)) /* Immediate constant */
+#define LDST_P_BIT(i) (i & (1 << 24)) /* Preindex */
+#define LDST_U_BIT(i) (i & (1 << 23)) /* Add offset */
+#define LDST_W_BIT(i) (i & (1 << 21)) /* Writeback */
+#define LDST_L_BIT(i) (i & (1 << 20)) /* Load */
+
+#define LDSTH_I_BIT(i) (i & (1 << 22)) /* half-word immed */
+#define LDM_S_BIT(i) (i & (1 << 22)) /* write CPSR from SPSR */
+
+#define RN_BITS(i) ((i >> 16) & 15) /* Rn */
+#define RD_BITS(i) ((i >> 12) & 15) /* Rd */
+#define RM_BITS(i) (i & 15) /* Rm */
+
+#define REGMASK_BITS(i) (i & 0xffff)
+#define OFFSET_BITS(i) (i & 0x0fff)
+
+#define IS_SHIFT(i) (i & 0x0ff0)
+#define SHIFT_BITS(i) ((i >> 7) & 0x1f)
+#define SHIFT_TYPE(i) (i & 0x60)
+#define SHIFT_LSL 0x00
+#define SHIFT_LSR 0x20
+#define SHIFT_ASR 0x40
+#define SHIFT_RORRRX 0x60
+
+static unsigned long ai_user;
+static unsigned long ai_sys;
+static unsigned long ai_skipped;
+static unsigned long ai_half;
+static unsigned long ai_word;
+static unsigned long ai_multi;
+
+static int proc_alignment_read(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
- /*
- * Oops. The kernel tried to access some bad page. We'll have to
- * terminate things with extreme prejudice.
- */
- pgd_t *pgd;
- if (addr < PAGE_SIZE)
- printk (KERN_ALERT "Unable to handle kernel NULL pointer dereference");
- else
- printk (KERN_ALERT "Unable to handle kernel paging request");
- printk (" at virtual address %08lx\n", addr);
- printk (KERN_ALERT "current->tss.memmap = %08lX\n", tsk->tss.memmap);
- pgd = pgd_offset (mm, addr);
- printk (KERN_ALERT "*pgd = %08lx", pgd_val (*pgd));
- if (!pgd_none (*pgd)) {
- pmd_t *pmd;
- pmd = pmd_offset (pgd, addr);
- printk (", *pmd = %08lx", pmd_val (*pmd));
- if (!pmd_none (*pmd))
- printk (", *pte = %08lx", pte_val (*pte_offset (pmd, addr)));
- }
- printk ("\n");
- die_if_kernel ("Oops", regs, mode, SIGKILL);
- do_exit (SIGKILL);
+ char *p = page;
+ int len;
+
+ p += sprintf(p, "User:\t\t%li\n", ai_user);
+ p += sprintf(p, "System:\t\t%li\n", ai_sys);
+ p += sprintf(p, "Skipped:\t%li\n", ai_skipped);
+ p += sprintf(p, "Half:\t\t%li\n", ai_half);
+ p += sprintf(p, "Word:\t\t%li\n", ai_word);
+ p += sprintf(p, "Multi:\t\t%li\n", ai_multi);
+
+ len = (p - page) - off;
+ if (len < 0)
+ len = 0;
+
+ *eof = (len <= count) ? 1 : 0;
+ *start = page + off;
+
+ return len;
}
-static void page_fault (unsigned long addr, int mode, struct pt_regs *regs)
+/*
+ * This needs to be done after sysctl_init, otherwise sys/
+ * will be overwritten.
+ */
+void __init alignment_init(void)
{
- struct task_struct *tsk;
- struct mm_struct *mm;
- struct vm_area_struct *vma;
- unsigned long fixup;
-
- lock_kernel();
- tsk = current;
- mm = tsk->mm;
-
- down(&mm->mmap_sem);
- vma = find_vma (mm, addr);
- if (!vma)
- goto bad_area;
- if (vma->vm_start <= addr)
- goto good_area;
- if (!(vma->vm_flags & VM_GROWSDOWN) || expand_stack (vma, addr))
- goto bad_area;
+ struct proc_dir_entry *e;
- /*
- * Ok, we have a good vm_area for this memory access, so
- * we can handle it..
- */
-good_area:
- if (mode & FAULT_CODE_READ) { /* read? */
- if (!(vma->vm_flags & (VM_READ|VM_EXEC)))
- goto bad_area;
- } else {
- if (!(vma->vm_flags & VM_WRITE))
- goto bad_area;
+ e = create_proc_entry("sys/debug/alignment", S_IFREG | S_IRUGO, NULL);
+
+ if (e)
+ e->read_proc = proc_alignment_read;
+}
+
+static int
+do_alignment_exception(struct pt_regs *regs)
+{
+ unsigned int instr, rd, rn, correction, nr_regs, regbits;
+ unsigned long eaddr;
+ union { unsigned long un; signed long sn; } offset;
+
+ if (user_mode(regs)) {
+ set_cr(cr_no_alignment);
+ ai_user += 1;
+ return 0;
}
- handle_mm_fault (tsk, vma, addr & PAGE_MASK, !(mode & FAULT_CODE_READ));
- up(&mm->mmap_sem);
- goto out;
- /*
- * Something tried to access memory that isn't in our memory map..
- * Fix it, but check if it's kernel or user first..
- */
-bad_area:
- up(&mm->mmap_sem);
- if (mode & FAULT_CODE_USER) {
- tsk->tss.error_code = mode;
- tsk->tss.trap_no = 14;
- printk ("%s: memory violation at pc=0x%08lx, lr=0x%08lx (bad address=0x%08lx, code %d)\n",
- tsk->comm, regs->ARM_pc, regs->ARM_lr, addr, mode);
-#ifdef DEBUG
- {
- unsigned int i, j;
- unsigned long *sp = (unsigned long *) (regs->ARM_sp - 128);
- for (j = 0; j < 20 && sp_valid (sp); j++) {
- printk ("%p: ", sp);
- for (i = 0; i < 8 && sp_valid (sp); i += 1, sp++)
- printk ("%08lx ", *sp);
- printk ("\n");
+ ai_sys += 1;
+
+ instr = *(unsigned long *)instruction_pointer(regs);
+ correction = 4; /* sometimes 8 on ARMv3 */
+ regs->ARM_pc += correction + 4;
+
+ rd = RD_BITS(instr);
+ rn = RN_BITS(instr);
+ eaddr = regs->uregs[rn];
+
+ switch(CODING_BITS(instr)) {
+ case 0x00000000:
+ if ((instr & 0x0ff00ff0) == 0x01000090) {
+ ai_skipped += 1;
+ printk(KERN_ERR "Unaligned trap: not handling swp instruction\n");
+ return 1;
+ }
+
+ if (((instr & 0x0e000090) == 0x00000090) && (instr & 0x60) != 0) {
+ ai_half += 1;
+ if (LDSTH_I_BIT(instr))
+ offset.un = (instr & 0xf00) >> 4 | (instr & 15);
+ else
+ offset.un = regs->uregs[RM_BITS(instr)];
+
+ if (LDST_P_BIT(instr)) {
+ if (LDST_U_BIT(instr))
+ eaddr += offset.un;
+ else
+ eaddr -= offset.un;
}
+
+ if (LDST_L_BIT(instr))
+ regs->uregs[rd] = get_unaligned((unsigned short *)eaddr);
+ else
+ put_unaligned(regs->uregs[rd], (unsigned short *)eaddr);
+
+ /* signed half-word? */
+ if (instr & 0x40)
+ regs->uregs[rd] = (long)((short) regs->uregs[rd]);
+
+ if (!LDST_P_BIT(instr)) {
+ if (LDST_U_BIT(instr))
+ eaddr += offset.un;
+ else
+ eaddr -= offset.un;
+ regs->uregs[rn] = eaddr;
+ } else if (LDST_W_BIT(instr))
+ regs->uregs[rn] = eaddr;
+ break;
}
- show_regs (regs);
- c_backtrace (regs->ARM_fp, regs->ARM_cpsr);
-#endif
- force_sig(SIGSEGV, tsk);
- goto out;
- }
- /* Are we prepared to handle this kernel fault? */
- 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;
- goto out;
+ default:
+ ai_skipped += 1;
+ panic("Alignment trap: not handling instruction %08X at %08lX",
+ instr, regs->ARM_pc - correction - 4);
+ break;
+
+ case 0x04000000:
+ offset.un = OFFSET_BITS(instr);
+ goto ldr_str;
+
+ case 0x06000000:
+ offset.un = regs->uregs[RM_BITS(instr)];
+
+ if (IS_SHIFT(instr)) {
+ unsigned int shiftval = SHIFT_BITS(instr);
+
+ switch(SHIFT_TYPE(instr)) {
+ case SHIFT_LSL:
+ offset.un <<= shiftval;
+ break;
+
+ case SHIFT_LSR:
+ offset.un >>= shiftval;
+ break;
+
+ case SHIFT_ASR:
+ offset.sn >>= shiftval;
+ break;
+
+ case SHIFT_RORRRX:
+ if (shiftval == 0) {
+ offset.un >>= 1;
+ if (regs->ARM_cpsr & CC_C_BIT)
+ offset.un |= 1 << 31;
+ } else
+ offset.un = offset.un >> shiftval |
+ offset.un << (32 - shiftval);
+ break;
+ }
+ }
+
+ ldr_str:
+ ai_word += 1;
+ if (LDST_P_BIT(instr)) {
+ if (LDST_U_BIT(instr))
+ eaddr += offset.un;
+ else
+ eaddr -= offset.un;
+ } else {
+ if (LDST_W_BIT(instr)) {
+ printk(KERN_ERR "Not handling ldrt/strt correctly\n");
+ return 1;
+ }
+ }
+
+ if (LDST_L_BIT(instr)) {
+ regs->uregs[rd] = get_unaligned((unsigned long *)eaddr);
+ if (rd == 15)
+ correction = 0;
+ } else
+ put_unaligned(regs->uregs[rd], (unsigned long *)eaddr);
+
+ if (!LDST_P_BIT(instr)) {
+ if (LDST_U_BIT(instr))
+ eaddr += offset.un;
+ else
+ eaddr -= offset.un;
+
+ regs->uregs[rn] = eaddr;
+ } else if (LDST_W_BIT(instr))
+ regs->uregs[rn] = eaddr;
+ break;
+
+ case 0x08000000:
+ if (LDM_S_BIT(instr))
+ panic("Alignment trap: not handling LDM with s-bit\n");
+ ai_multi += 1;
+
+ for (regbits = REGMASK_BITS(instr), nr_regs = 0; regbits; regbits >>= 1)
+ nr_regs += 4;
+
+ if (!LDST_U_BIT(instr))
+ eaddr -= nr_regs;
+
+ if ((LDST_U_BIT(instr) == 0 && LDST_P_BIT(instr) == 0) ||
+ (LDST_U_BIT(instr) && LDST_P_BIT(instr)))
+ eaddr += 4;
+
+ for (regbits = REGMASK_BITS(instr), rd = 0; regbits; regbits >>= 1, rd += 1)
+ if (regbits & 1) {
+ if (LDST_L_BIT(instr)) {
+ regs->uregs[rd] = get_unaligned((unsigned long *)eaddr);
+ if (rd == 15)
+ correction = 0;
+ } else
+ put_unaligned(regs->uregs[rd], (unsigned long *)eaddr);
+ eaddr += 4;
+ }
+
+ if (LDST_W_BIT(instr)) {
+ if (LDST_P_BIT(instr) && !LDST_U_BIT(instr))
+ eaddr -= nr_regs;
+ else if (LDST_P_BIT(instr))
+ eaddr -= 4;
+ else if (!LDST_U_BIT(instr))
+ eaddr -= 4 + nr_regs;
+ regs->uregs[rn] = eaddr;
+ }
+ break;
}
- kernel_page_fault (addr, mode, regs, tsk, mm);
-out:
- unlock_kernel();
+ regs->ARM_pc -= correction;
+
+ return 0;
}
-/*
- * Handle a data abort. Note that we have to handle a range of addresses
- * on ARM2/3 for ldm. If both pages are zero-mapped, then we have to force
- * a copy-on-write
- */
+#endif
+
asmlinkage void
-do_DataAbort (unsigned long addr, int fsr, int error_code, struct pt_regs *regs)
+do_DataAbort(unsigned long addr, int fsr, int error_code, struct pt_regs *regs)
{
if (user_mode(regs))
error_code |= FAULT_CODE_USER;
+
#define DIE(signr,nam)\
force_sig(signr, current);\
- die_if_kernel(nam, regs, fsr, signr);\
- break;
+ die(nam, regs, fsr);\
+ do_exit(signr);\
+ break
switch (fsr & 15) {
- case 2:
- DIE(SIGKILL, "Terminal exception")
+ /*
+ * 0 - vector exception
+ */
case 0:
- DIE(SIGSEGV, "Vector exception")
+ force_sig(SIGSEGV, current);
+ if (!user_mode(regs)) {
+ die("vector exception", regs, fsr);
+ do_exit(SIGSEGV);
+ }
+ break;
+
+ /*
+ * 15 - permission fault on page
+ * 5 - page-table entry descriptor fault
+ * 7 - first-level descriptor fault
+ */
+ case 15: case 5: case 7:
+ do_page_fault(addr, error_code, regs);
+ break;
+
+ /*
+ * 13 - permission fault on section
+ */
+ case 13:
+ force_sig(SIGSEGV, current);
+ if (!user_mode(regs)) {
+ die("section permission fault", regs, fsr);
+ do_exit(SIGSEGV);
+ } else {
+#ifdef CONFIG_DEBUG_USER
+ printk("%s: permission fault on section, "
+ "address=0x%08lx, code %d\n",
+ current->comm, addr, error_code);
+#ifdef DEBUG
+ {
+ unsigned int i, j;
+ unsigned long *sp;
+
+ sp = (unsigned long *) (regs->ARM_sp - 128);
+ for (j = 0; j < 20 && sp_valid(sp); j++) {
+ printk("%p: ", sp);
+ for (i = 0; i < 8 && sp_valid(sp); i += 1, sp++)
+ printk("%08lx ", *sp);
+ printk("\n");
+ }
+ show_regs(regs);
+ c_backtrace(regs->ARM_fp, regs->ARM_cpsr);
+ }
+#endif
+#endif
+ }
+ break;
+
case 1:
case 3:
- DIE(SIGBUS, "Alignment exception")
+#ifdef CONFIG_ALIGNMENT_TRAP
+ if (!do_alignment_exception(regs))
+ break;
+#endif
+ /*
+ * this should never happen
+ */
+ DIE(SIGBUS, "Alignment exception");
+ break;
+
+ case 2:
+ DIE(SIGKILL, "Terminal exception");
case 12:
case 14:
- DIE(SIGBUS, "External abort on translation")
+ DIE(SIGBUS, "External abort on translation");
case 9:
case 11:
- DIE(SIGSEGV, "Domain fault")
- case 13:/* permission fault on section */
-#ifdef DEBUG
- {
- unsigned int i, j;
- unsigned long *sp;
-
- printk ("%s: section permission fault (bad address=0x%08lx, code %d)\n",
- current->comm, addr, error_code);
- sp = (unsigned long *) (regs->ARM_sp - 128);
- for (j = 0; j < 20 && sp_valid (sp); j++) {
- printk ("%p: ", sp);
- for (i = 0; i < 8 && sp_valid (sp); i += 1, sp++)
- printk ("%08lx ", *sp);
- printk ("\n");
- }
- show_regs (regs);
- c_backtrace(regs->ARM_fp, regs->ARM_cpsr);
- }
-#endif
- DIE(SIGSEGV, "Permission fault")
+ DIE(SIGSEGV, "Domain fault");
- case 15:/* permission fault on page */
- case 5: /* page-table entry descriptor fault */
- case 7: /* first-level descriptor fault */
- page_fault (addr, error_code, regs);
- break;
case 4:
case 6:
- DIE(SIGBUS, "External abort on linefetch")
+ DIE(SIGBUS, "External abort on linefetch");
case 8:
case 10:
- DIE(SIGBUS, "External abort on non-linefetch")
+ DIE(SIGBUS, "External abort on non-linefetch");
}
}
asmlinkage int
-do_PrefetchAbort (unsigned long addr, struct pt_regs *regs)
+do_PrefetchAbort(unsigned long addr, struct pt_regs *regs)
{
-#if 0
- /* does this still apply ? */
- if (the memc mapping for this page exists - can check now...) {
- printk ("Page in, but got abort (undefined instruction?)\n");
- return 0;
- }
-#endif
- page_fault (addr, FAULT_CODE_USER|FAULT_CODE_READ, regs);
+ do_page_fault(addr, FAULT_CODE_USER|FAULT_CODE_READ, regs);
return 1;
}
-
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/fault-common.c linux/arch/arm/mm/fault-common.c
--- v2.2.7/linux/arch/arm/mm/fault-common.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mm/fault-common.c Sat May 8 11:06:56 1999
@@ -0,0 +1,188 @@
+/*
+ * linux/arch/arm/mm/fault-common.c
+ *
+ * Copyright (C) 1995 Linus Torvalds
+ * Modifications for ARM processor (c) 1995-1999 Russell King
+ */
+#include
+
+extern void die(char *msg, struct pt_regs *regs, unsigned int err);
+
+void __bad_pmd(pmd_t *pmd)
+{
+ printk("Bad pmd in pte_alloc: %08lx\n", pmd_val(*pmd));
+#ifdef CONFIG_DEBUG_ERRORS
+ __backtrace();
+#endif
+ set_pmd(pmd, mk_user_pmd(BAD_PAGETABLE));
+}
+
+void __bad_pmd_kernel(pmd_t *pmd)
+{
+ printk("Bad pmd in pte_alloc_kernel: %08lx\n", pmd_val(*pmd));
+#ifdef CONFIG_DEBUG_ERRORS
+ __backtrace();
+#endif
+ set_pmd(pmd, mk_kernel_pmd(BAD_PAGETABLE));
+}
+
+static void
+kernel_page_fault(unsigned long addr, int mode, struct pt_regs *regs,
+ struct task_struct *tsk, struct mm_struct *mm)
+{
+ char *reason;
+ /*
+ * Oops. The kernel tried to access some bad page. We'll have to
+ * terminate things with extreme prejudice.
+ */
+ pgd_t *pgd;
+
+ if (addr < PAGE_SIZE)
+ reason = "NULL pointer dereference";
+ else
+ reason = "paging request";
+
+ printk(KERN_ALERT "Unable to handle kernel %s at virtual address %08lx\n",
+ reason, addr);
+ printk(KERN_ALERT "memmap = %08lX, pgd = %p\n", tsk->tss.memmap, mm->pgd);
+ pgd = pgd_offset(mm, addr);
+ printk(KERN_ALERT "*pgd = %08lx", pgd_val(*pgd));
+
+ do {
+ pmd_t *pmd;
+ pte_t *pte;
+
+ if (pgd_none(*pgd))
+ break;
+
+ if (pgd_bad(*pgd)) {
+ printk("(bad)\n");
+ break;
+ }
+
+ pmd = pmd_offset(pgd, addr);
+ printk(", *pmd = %08lx", pmd_val(*pmd));
+
+ if (pmd_none(*pmd))
+ break;
+
+ if (pmd_bad(*pmd)) {
+ printk("(bad)\n");
+ break;
+ }
+
+ pte = pte_offset(pmd, addr);
+ printk(", *pte = %08lx", pte_val(*pte));
+ printk(", *ppte = %08lx", pte_val(pte[-PTRS_PER_PTE]));
+ } while(0);
+
+ printk("\n");
+ die("Oops", regs, mode);
+
+ do_exit(SIGKILL);
+}
+
+static void do_page_fault(unsigned long addr, int mode, struct pt_regs *regs)
+{
+ struct task_struct *tsk;
+ struct mm_struct *mm;
+ struct vm_area_struct *vma;
+ unsigned long fixup;
+
+ tsk = current;
+ mm = tsk->mm;
+
+ /*
+ * If we're in an interrupt or have no user
+ * context, we must not take the fault..
+ */
+ if (in_interrupt() || mm == &init_mm)
+ goto no_context;
+
+ down(&mm->mmap_sem);
+ vma = find_vma(mm, addr);
+ if (!vma)
+ goto bad_area;
+ if (vma->vm_start <= addr)
+ goto good_area;
+ if (!(vma->vm_flags & VM_GROWSDOWN) || expand_stack(vma, addr))
+ goto bad_area;
+
+ /*
+ * Ok, we have a good vm_area for this memory access, so
+ * we can handle it..
+ */
+good_area:
+ if (READ_FAULT(mode)) { /* read? */
+ if (!(vma->vm_flags & (VM_READ|VM_EXEC)))
+ goto bad_area;
+ } else {
+ if (!(vma->vm_flags & VM_WRITE))
+ goto bad_area;
+ }
+
+ /*
+ * 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, addr & PAGE_MASK, DO_COW(mode)))
+ goto do_sigbus;
+
+ up(&mm->mmap_sem);
+ return;
+
+ /*
+ * Something tried to access memory that isn't in our memory map..
+ * Fix it, but check if it's kernel or user first..
+ */
+bad_area:
+ up(&mm->mmap_sem);
+
+ /* User mode accesses just cause a SIGSEGV */
+ if (mode & FAULT_CODE_USER) {
+ tsk->tss.error_code = mode;
+ tsk->tss.trap_no = 14;
+#ifdef CONFIG_DEBUG_USER
+ printk("%s: memory violation at pc=0x%08lx, lr=0x%08lx (bad address=0x%08lx, code %d)\n",
+ tsk->comm, regs->ARM_pc, regs->ARM_lr, addr, mode);
+#endif
+ force_sig(SIGSEGV, tsk);
+ return;
+ }
+
+no_context:
+ /* Are we prepared to handle this kernel fault? */
+ if ((fixup = search_exception_table(instruction_pointer(regs))) != 0) {
+#ifdef DEBUG
+ printk(KERN_DEBUG "%s: Exception at [<%lx>] addr=%lx (fixup: %lx)\n",
+ tsk->comm, regs->ARM_pc, addr, fixup);
+#endif
+ regs->ARM_pc = fixup;
+ return;
+ }
+
+ kernel_page_fault(addr, mode, regs, tsk, mm);
+ return;
+
+do_sigbus:
+ /*
+ * We ran out of memory, or some other thing happened to us that made
+ * us unable to handle the page fault gracefully.
+ */
+ up(&mm->mmap_sem);
+
+ /*
+ * Send a sigbus, regardless of whether we were in kernel
+ * or user mode.
+ */
+ tsk->tss.error_code = mode;
+ tsk->tss.trap_no = 14;
+ force_sig(SIGBUS, tsk);
+
+ /* Kernel mode? Handle exceptions or die */
+ if (!(mode & FAULT_CODE_USER))
+ goto no_context;
+}
+
+
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/init.c linux/arch/arm/mm/init.c
--- v2.2.7/linux/arch/arm/mm/init.c Tue Dec 22 14:16:53 1998
+++ linux/arch/arm/mm/init.c Sat May 8 11:06:56 1999
@@ -29,6 +29,9 @@
#include
pgd_t swapper_pg_dir[PTRS_PER_PGD];
+#ifndef CONFIG_NO_PGT_CACHE
+struct pgtable_cache_struct quicklists;
+#endif
extern char _etext, _stext, _edata, __bss_start, _end;
extern char __init_begin, __init_end;
@@ -36,6 +39,7 @@
int do_check_pgt_cache(int low, int high)
{
int freed = 0;
+#ifndef CONFIG_NO_PGT_CACHE
if(pgtable_cache_size > high) {
do {
if(pgd_quicklist)
@@ -46,6 +50,7 @@
free_pte_slow(get_pte_fast()), freed++;
} while(pgtable_cache_size > low);
}
+#endif
return freed;
}
@@ -63,17 +68,18 @@
* data and COW.
*/
#if PTRS_PER_PTE != 1
-unsigned long *empty_bad_page_table;
+pte_t *empty_bad_page_table;
pte_t *__bad_pagetable(void)
{
- int i;
pte_t bad_page;
+ int i;
bad_page = BAD_PAGE;
for (i = 0; i < PTRS_PER_PTE; i++)
- empty_bad_page_table[i] = (unsigned long)pte_val(bad_page);
- return (pte_t *) empty_bad_page_table;
+ set_pte(empty_bad_page_table + i, bad_page);
+
+ return empty_bad_page_table;
}
#endif
@@ -128,8 +134,11 @@
empty_bad_page = (unsigned long *)start_mem;
start_mem += PAGE_SIZE;
#if PTRS_PER_PTE != 1
- empty_bad_page_table = (unsigned long *)start_mem;
- start_mem += PTRS_PER_PTE * sizeof (void *);
+#ifdef CONFIG_CPU_32
+ start_mem += PTRS_PER_PTE * BYTES_PER_PTR;
+#endif
+ empty_bad_page_table = (pte_t *)start_mem;
+ start_mem += PTRS_PER_PTE * BYTES_PER_PTR;
#endif
memzero (empty_zero_page, PAGE_SIZE);
start_mem = setup_pagetables (start_mem, end_mem);
@@ -137,6 +146,9 @@
flush_tlb_all();
update_memc_all();
+ end_mem &= PAGE_MASK;
+ high_memory = (void *)end_mem;
+
return free_area_init(start_mem, end_mem);
}
@@ -161,19 +173,18 @@
/* mark usable pages in the mem_map[] */
mark_usable_memory_areas(&start_mem, end_mem);
+#define BETWEEN(w,min,max) ((w) >= (unsigned long)(min) && \
+ (w) < (unsigned long)(max))
+
for (tmp = PAGE_OFFSET; tmp < end_mem ; tmp += PAGE_SIZE) {
if (PageReserved(mem_map+MAP_NR(tmp))) {
- if (tmp >= KERNTOPHYS(_stext) &&
- tmp < KERNTOPHYS(_edata)) {
- if (tmp < KERNTOPHYS(_etext))
- codepages++;
- else
- datapages++;
- } else if (tmp >= KERNTOPHYS(__init_begin)
- && tmp < KERNTOPHYS(__init_end))
+ if (BETWEEN(tmp, &__init_begin, &__init_end))
initpages++;
- else if (tmp >= KERNTOPHYS(__bss_start)
- && tmp < (unsigned long) start_mem)
+ else if (BETWEEN(tmp, &_stext, &_etext))
+ codepages++;
+ else if (BETWEEN(tmp, &_etext, &_edata))
+ datapages++;
+ else if (BETWEEN(tmp, &__bss_start, start_mem))
datapages++;
else
reservedpages++;
@@ -181,13 +192,16 @@
}
atomic_set(&mem_map[MAP_NR(tmp)].count, 1);
#ifdef CONFIG_BLK_DEV_INITRD
- if (!initrd_start || (tmp < initrd_start || tmp >= initrd_end))
+ if (!initrd_start || !BETWEEN(tmp, initrd_start, initrd_end))
#endif
free_page(tmp);
}
- printk ("Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init)\n",
+
+#undef BETWEEN
+
+ printk ("Memory: %luk/%luM available (%dk code, %dk reserved, %dk data, %dk init)\n",
(unsigned long) nr_free_pages << (PAGE_SHIFT-10),
- max_mapnr << (PAGE_SHIFT-10),
+ max_mapnr >> (20 - PAGE_SHIFT),
codepages << (PAGE_SHIFT-10),
reservedpages << (PAGE_SHIFT-10),
datapages << (PAGE_SHIFT-10),
@@ -203,17 +217,45 @@
#endif
}
-void free_initmem (void)
+static void free_area(unsigned long addr, unsigned long end, char *s)
{
- unsigned long addr;
+ unsigned int size = (end - addr) >> 10;
- addr = (unsigned long)(&__init_begin);
- for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
+ for (; addr < end; addr += PAGE_SIZE) {
mem_map[MAP_NR(addr)].flags &= ~(1 << PG_reserved);
atomic_set(&mem_map[MAP_NR(addr)].count, 1);
free_page(addr);
}
- printk ("Freeing unused kernel memory: %dk freed\n", (&__init_end - &__init_begin) >> 10);
+
+ if (size)
+ printk(" %dk %s", size, s);
+}
+
+void free_initmem (void)
+{
+ printk("Freeing unused kernel memory:");
+
+ free_area((unsigned long)(&__init_begin),
+ (unsigned long)(&__init_end),
+ "init");
+
+#ifdef CONFIG_FOOTBRIDGE
+ {
+ extern int __netwinder_begin, __netwinder_end, __ebsa285_begin, __ebsa285_end;
+
+ if (!machine_is_netwinder())
+ free_area((unsigned long)(&__netwinder_begin),
+ (unsigned long)(&__netwinder_end),
+ "netwinder");
+
+ if (!machine_is_ebsa285() && !machine_is_cats())
+ free_area((unsigned long)(&__ebsa285_begin),
+ (unsigned long)(&__ebsa285_end),
+ "ebsa285/cats");
+ }
+#endif
+
+ printk("\n");
}
void si_meminfo(struct sysinfo *val)
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/ioremap.c linux/arch/arm/mm/ioremap.c
--- v2.2.7/linux/arch/arm/mm/ioremap.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mm/ioremap.c Sat May 8 11:06:56 1999
@@ -0,0 +1,149 @@
+/*
+ * arch/arm/mm/ioremap.c
+ *
+ * Re-map IO memory to kernel address space so that we can access it.
+ *
+ * (C) Copyright 1995 1996 Linus Torvalds
+ *
+ * Hacked for ARM by Phil Blundell
+ * Hacked to allow all architectures to build, and various cleanups
+ * by Russell King
+ */
+
+/*
+ * This allows a driver to remap an arbitrary region of bus memory into
+ * virtual space. One should *only* use readl, writel, memcpy_toio and
+ * so on with such remapped areas.
+ *
+ * Because the ARM only has a 32-bit address space we can't address the
+ * whole of the (physical) PCI space at once. PCI huge-mode addressing
+ * allows us to circumvent this restriction by splitting PCI space into
+ * two 2GB chunks and mapping only one at a time into processor memory.
+ * We use MMU protection domains to trap any attempt to access the bank
+ * that is not currently mapped. (This isn't fully implemented yet.)
+ *
+ * DC21285 currently has a bug in that the PCI address extension
+ * register affects the address of any writes waiting in the outbound
+ * FIFO. Unfortunately, it is not possible to tell the DC21285 to
+ * flush this - flushing the area causes the bus to lock.
+ */
+
+#include
+#include
+
+static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
+ unsigned long phys_addr, pgprot_t pgprot)
+{
+ unsigned long end;
+
+ address &= ~PMD_MASK;
+ end = address + size;
+ if (end > PMD_SIZE)
+ end = PMD_SIZE;
+ do {
+ if (!pte_none(*pte))
+ printk("remap_area_pte: page already exists\n");
+ set_pte(pte, mk_pte_phys(phys_addr, pgprot));
+ address += PAGE_SIZE;
+ phys_addr += PAGE_SIZE;
+ pte++;
+ } while (address < end);
+}
+
+static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size,
+ unsigned long phys_addr, unsigned long flags)
+{
+ unsigned long end;
+ pgprot_t pgprot;
+
+ address &= ~PGDIR_MASK;
+ end = address + size;
+
+ if (end > PGDIR_SIZE)
+ end = PGDIR_SIZE;
+
+ phys_addr -= address;
+ pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags);
+ do {
+ pte_t * pte = pte_alloc_kernel(pmd, address);
+ if (!pte)
+ return -ENOMEM;
+ remap_area_pte(pte, address, end - address, address + phys_addr, pgprot);
+ address = (address + PMD_SIZE) & PMD_MASK;
+ pmd++;
+ } while (address < end);
+ return 0;
+}
+
+static int remap_area_pages(unsigned long address, unsigned long phys_addr,
+ unsigned long size, unsigned long flags)
+{
+ pgd_t * dir;
+ unsigned long end = address + size;
+
+ phys_addr -= address;
+ dir = pgd_offset(&init_mm, address);
+ flush_cache_all();
+ while (address < end) {
+ pmd_t *pmd = pmd_alloc_kernel(dir, address);
+ if (!pmd)
+ return -ENOMEM;
+ if (remap_area_pmd(pmd, address, end - address,
+ phys_addr + address, flags))
+ return -ENOMEM;
+ set_pgdir(address, *dir);
+ address = (address + PGDIR_SIZE) & PGDIR_MASK;
+ dir++;
+ }
+ flush_tlb_all();
+ return 0;
+}
+
+/*
+ * 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.
+ *
+ * 'flags' are the extra L_PTE_ flags that you want to specify for this
+ * mapping. See include/asm-arm/proc-armv/pgtable.h for more information.
+ */
+void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
+{
+ void * addr;
+ struct vm_struct * area;
+ unsigned long offset;
+
+ /*
+ * Mappings have to be page-aligned
+ */
+ offset = phys_addr & ~PAGE_MASK;
+ size = PAGE_ALIGN(size + offset);
+
+ /*
+ * Don't allow mappings that wrap..
+ */
+ if (!size || size > phys_addr + size)
+ return NULL;
+
+ /*
+ * Ok, go for it..
+ */
+ area = get_vm_area(size);
+ if (!area)
+ return NULL;
+ addr = area->addr;
+ if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) {
+ vfree(addr);
+ return NULL;
+ }
+ return (void *) (offset + (char *)addr);
+}
+
+void iounmap(void *addr)
+{
+ return vfree((void *) (PAGE_MASK & (unsigned long) addr));
+}
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/mm-arc.c linux/arch/arm/mm/mm-arc.c
--- v2.2.7/linux/arch/arm/mm/mm-arc.c Tue Jul 21 00:15:30 1998
+++ linux/arch/arm/mm/mm-arc.c Wed Dec 31 16:00:00 1969
@@ -1,82 +0,0 @@
-/*
- * arch/arm/mm/mm-arc.c
- *
- * Extra MM routines for the Archimedes architecture
- *
- * Copyright (C) 1998 Russell King
- */
-#include
-#include
-#include
-
-unsigned long phys_screen_end;
-
-/*
- * This routine needs more work to make it dynamically release/allocate mem!
- */
-__initfunc(unsigned long map_screen_mem(unsigned long log_start, unsigned long kmem, int update))
-{
- static int updated = 0;
-
- if (updated)
- return 0;
-
- updated = update;
-
- if (update) {
- unsigned long address = log_start, offset;
- pgd_t *pgdp;
-
- kmem = (kmem + 3) & ~3;
-
- pgdp = pgd_offset (&init_mm, address); /* +31 */
- offset = SCREEN_START;
- while (address < SCREEN1_END) {
- unsigned long addr_pmd, end_pmd;
- pmd_t *pmdp;
-
- /* if (pgd_none (*pgdp)) alloc pmd */
- pmdp = pmd_offset (pgdp, address); /* +0 */
- addr_pmd = address & ~PGDIR_MASK; /* 088000 */
- end_pmd = addr_pmd + SCREEN1_END - address; /* 100000 */
- if (end_pmd > PGDIR_SIZE)
- end_pmd = PGDIR_SIZE;
-
- do {
- unsigned long addr_pte, end_pte;
- pte_t *ptep;
-
- if (pmd_none (*pmdp)) {
- pte_t *new_pte = (pte_t *)kmem;
- kmem += PTRS_PER_PTE * BYTES_PER_PTR;
- memzero (new_pte, PTRS_PER_PTE * BYTES_PER_PTR);
- set_pmd (pmdp, mk_pmd(new_pte));
- }
-
- ptep = pte_offset (pmdp, addr_pmd); /* +11 */
- addr_pte = addr_pmd & ~PMD_MASK; /* 088000 */
- end_pte = addr_pte + end_pmd - addr_pmd; /* 100000 */
- if (end_pte > PMD_SIZE)
- end_pte = PMD_SIZE;
-
- do {
- set_pte (ptep, mk_pte(offset, PAGE_KERNEL));
- addr_pte += PAGE_SIZE;
- offset += PAGE_SIZE;
- ptep++;
- } while (addr_pte < end_pte);
-
- pmdp++;
- addr_pmd = (addr_pmd + PMD_SIZE) & PMD_MASK;
- } while (addr_pmd < end_pmd);
-
- address = (address + PGDIR_SIZE) & PGDIR_MASK;
- pgdp ++;
- }
-
- phys_screen_end = offset;
- flush_tlb_all ();
- update_memc_all ();
- }
- return kmem;
-}
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/mm-armv.c linux/arch/arm/mm/mm-armv.c
--- v2.2.7/linux/arch/arm/mm/mm-armv.c Wed Sep 9 14:51:05 1998
+++ linux/arch/arm/mm/mm-armv.c Sat May 8 11:06:57 1999
@@ -37,7 +37,8 @@
virtual = mp->virtual;
physical = mp->physical;
length = mp->length;
- prot = (mp->prot_read ? PTE_AP_READ : 0) | (mp->prot_write ? PTE_AP_WRITE : 0);
+ prot = (mp->prot_read ? L_PTE_USER : 0) | (mp->prot_write ? L_PTE_WRITE : 0)
+ | L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY;
while ((virtual & 1048575 || physical & 1048575) && length >= PAGE_SIZE) {
alloc_init_page(&start_mem, virtual, physical, mp->domain, prot);
@@ -56,7 +57,8 @@
physical += 1048576;
}
- prot = (mp->prot_read ? PTE_AP_READ : 0) | (mp->prot_write ? PTE_AP_WRITE : 0);
+ prot = (mp->prot_read ? L_PTE_USER : 0) | (mp->prot_write ? L_PTE_WRITE : 0)
+ | L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY;
while (length >= PAGE_SIZE) {
alloc_init_page(&start_mem, virtual, physical, mp->domain, prot);
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/mm-ebsa285.c linux/arch/arm/mm/mm-ebsa285.c
--- v2.2.7/linux/arch/arm/mm/mm-ebsa285.c Tue Dec 22 14:16:53 1998
+++ linux/arch/arm/mm/mm-ebsa285.c Wed Dec 31 16:00:00 1969
@@ -1,39 +0,0 @@
-/*
- * arch/arm/mm/mm-ebsa285.c
- *
- * Extra MM routines for the EBSA285 architecture
- *
- * Copyright (C) 1998 Russell King, Dave Gilbert.
- */
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-/*
- * This is to allow us to fiddle with the EEPROM
- * This entry will go away in time, once the fmu
- * can mmap() the flash.
- *
- * These ones are so that we can fiddle
- * with the various cards (eg VGA)
- * until we're happy with them...
- */
-#define MAPPING \
- { 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 -u --recursive --new-file v2.2.7/linux/arch/arm/mm/mm-footbridge.c linux/arch/arm/mm/mm-footbridge.c
--- v2.2.7/linux/arch/arm/mm/mm-footbridge.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mm/mm-footbridge.c Sat May 8 11:06:57 1999
@@ -0,0 +1,91 @@
+/*
+ * arch/arm/mm/mm-ebsa285.c
+ *
+ * Extra MM routines for the EBSA285 architecture
+ *
+ * Copyright (C) 1998 Russell King, Dave Gilbert.
+ */
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+/*
+ * The first entry allows us to fiddle with the EEPROM from user-space.
+ * This entry will go away in time, once the fmu32 can mmap() the
+ * flash. It can't at the moment.
+ *
+ * If you want to fiddle with PCI VGA cards from user space, then
+ * change the '0, 1 }' for the PCI MEM and PCI IO to '1, 1 }'
+ * You can then access the PCI bus at 0xe0000000 and 0xffe00000.
+ */
+
+#ifdef CONFIG_HOST_FOOTBRIDGE
+
+/*
+ * The mapping when the footbridge is in host mode.
+ */
+#define MAPPING \
+ { FLASH_BASE, DC21285_FLASH, FLASH_SIZE, DOMAIN_IO, 0, 1 }, \
+ { PCIMEM_BASE, DC21285_PCI_MEM, PCIMEM_SIZE, DOMAIN_IO, 0, 1 }, \
+ { PCICFG0_BASE, DC21285_PCI_TYPE_0_CONFIG, PCICFG0_SIZE, DOMAIN_IO, 0, 1 }, \
+ { PCICFG1_BASE, DC21285_PCI_TYPE_1_CONFIG, PCICFG1_SIZE, DOMAIN_IO, 0, 1 }, \
+ { PCIIACK_BASE, DC21285_PCI_IACK, PCIIACK_SIZE, DOMAIN_IO, 0, 1 }, \
+ { WFLUSH_BASE, DC21285_OUTBOUND_WRITE_FLUSH, WFLUSH_SIZE, DOMAIN_IO, 0, 1 }, \
+ { ARMCSR_BASE, DC21285_ARMCSR_BASE, ARMCSR_SIZE, DOMAIN_IO, 0, 1 }, \
+ { PCIO_BASE, DC21285_PCI_IO, PCIO_SIZE, DOMAIN_IO, 0, 1 }, \
+ { XBUS_BASE, 0x40000000, XBUS_SIZE, DOMAIN_IO, 0, 1 }
+
+#else
+
+/*
+ * These two functions convert virtual addresses to PCI addresses
+ * and PCI addresses to virtual addresses. Note that it is only
+ * legal to use these on memory obtained via get_free_page or
+ * kmalloc.
+ */
+unsigned long __virt_to_bus(unsigned long res)
+{
+#ifdef CONFIG_DEBUG_ERRORS
+ if (res < PAGE_OFFSET || res >= (unsigned long)high_memory) {
+ printk("__virt_to_phys: invalid virtual address 0x%08lx\n", res);
+ __backtrace();
+ }
+#endif
+ return (res - PAGE_OFFSET) + (*CSR_PCISDRAMBASE & 0xfffffff0);
+}
+
+unsigned long __bus_to_virt(unsigned long res)
+{
+ res -= (*CSR_PCISDRAMBASE & 0xfffffff0);
+ res += PAGE_OFFSET;
+
+#ifdef CONFIG_DEBUG_ERRORS
+ if (res < PAGE_OFFSET || res >= (unsigned long)high_memory) {
+ printk("__phys_to_virt: invalid virtual address 0x%08lx\n", res);
+ __backtrace();
+ }
+#endif
+ return res;
+}
+
+/*
+ * The mapping when the footbridge is in add-in mode.
+ */
+#define MAPPING \
+ { PCIO_BASE, DC21285_PCI_IO, PCIO_SIZE, DOMAIN_IO, 0, 1 }, \
+ { XBUS_BASE, 0x40000000, XBUS_SIZE, DOMAIN_IO, 0, 1 }, \
+ { ARMCSR_BASE, DC21285_ARMCSR_BASE, ARMCSR_SIZE, DOMAIN_IO, 0, 1 }, \
+ { WFLUSH_BASE, DC21285_OUTBOUND_WRITE_FLUSH, WFLUSH_SIZE, DOMAIN_IO, 0, 1 }, \
+ { FLASH_BASE, DC21285_FLASH, FLASH_SIZE, DOMAIN_IO, 0, 1 }, \
+ { PCIMEM_BASE, DC21285_PCI_MEM, PCIMEM_SIZE, DOMAIN_IO, 0, 1 }
+
+#endif
+
+#include "mm-armv.c"
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/mm-vnc.c linux/arch/arm/mm/mm-vnc.c
--- v2.2.7/linux/arch/arm/mm/mm-vnc.c Tue Dec 22 14:16:53 1998
+++ linux/arch/arm/mm/mm-vnc.c Wed Dec 31 16:00:00 1969
@@ -1,31 +0,0 @@
-/*
- * arch/arm/mm/mm-vnc.c
- *
- * Extra MM routines for the Corel VNC architecture
- *
- * Copyright (C) 1998 Russell King
- */
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-/* Table describing the MMU translation mapping
- * mainly used to set up the I/O mappings.
- */
-#define MAPPING \
- { 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 -u --recursive --new-file v2.2.7/linux/arch/arm/mm/proc-arm2,3.S linux/arch/arm/mm/proc-arm2,3.S
--- v2.2.7/linux/arch/arm/mm/proc-arm2,3.S Sun Jun 7 11:16:26 1998
+++ linux/arch/arm/mm/proc-arm2,3.S Sat May 8 11:07:16 1999
@@ -193,7 +193,7 @@
movs pc, lr
_arm2_3_check_bugs:
- movs pc, lr
+ bics pc, lr, #0x04000000 @ Clear FIQ disable bit
/*
* Processor specific - ARM2
@@ -206,6 +206,8 @@
* Params : prev Old task structure
* : next New task structure for process to run
*
+ * Returns : prev
+ *
* Purpose : Perform a task switch, saving the old processes state, and restoring
* the new.
*
@@ -218,15 +220,15 @@
str sp, [r0, #TSS_SAVE] @ Save sp_SVC
ldr sp, [r1, #TSS_SAVE] @ Get saved sp_SVC
mov r4, r1
- add r0, r1, #TSS_MEMCMAP @ Remap MEMC
+ add r7, r1, #TSS_MEMCMAP @ Remap MEMC
ldr r1, LC0
ldr r1, [r1]
-1: ldmia r0!, {r2, r3, r5, r6}
+1: ldmia r7!, {r2, r3, r5, r6}
strb r2, [r2]
strb r3, [r3]
strb r5, [r5]
strb r6, [r6]
- ldmia r0!, {r2, r3, r5, r6}
+ ldmia r7!, {r2, r3, r5, r6}
strb r2, [r2]
strb r3, [r3]
strb r5, [r5]
@@ -318,6 +320,8 @@
* Params : prev Old task structure
* : next New task structure for process to run
*
+ * Returns : prev
+ *
* Purpose : Perform a task switch, saving the old processes state, and restoring
* the new.
*
@@ -330,22 +334,22 @@
str sp, [r0, #TSS_SAVE] @ Save sp_SVC
ldr sp, [r1, #TSS_SAVE] @ Get saved sp_SVC
mov r4, r1
- add r0, r1, #TSS_MEMCMAP @ Remap MEMC
+ add r7, r1, #TSS_MEMCMAP @ Remap MEMC
ldr r1, LC0
ldr r1, [r1]
-1: ldmia r0!, {r2, r3, r5, r6}
+1: ldmia r7!, {r2, r3, r5, r6}
strb r2, [r2]
strb r3, [r3]
strb r5, [r5]
strb r6, [r6]
- ldmia r0!, {r2, r3, r5, r6}
+ ldmia r7!, {r2, r3, r5, r6}
strb r2, [r2]
strb r3, [r3]
strb r5, [r5]
strb r6, [r6]
subs r1, r1, #8
bhi 1b
- mcr p15, 0, r0, c1, c0, 0 @ flush cache
+ mcr p15, 0, r7, c1, c0, 0 @ flush cache
ldmfd sp!, {r4 - r9, fp, pc}^ @ Load all regs saved previously
/*
* Function: arm3_remap_memc (struct task_struct *tsk)
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/proc-arm6,7.S linux/arch/arm/mm/proc-arm6,7.S
--- v2.2.7/linux/arch/arm/mm/proc-arm6,7.S Wed Sep 9 14:51:05 1998
+++ linux/arch/arm/mm/proc-arm6,7.S Sat May 8 11:07:16 1999
@@ -52,13 +52,14 @@
blt 1b
mov pc, lr
-@LC0: .word _current
/*
* Function: arm6_7_switch_to (struct task_struct *prev, struct task_struct *next)
*
* Params : prev Old task structure
* : next New task structure for process to run
*
+ * Returns : prev
+ *
* Purpose : Perform a task switch, saving the old processes state, and restoring
* the new.
*
@@ -72,15 +73,15 @@
stmfd sp!, {ip} @ Save cpsr_SVC
str sp, [r0, #TSS_SAVE] @ Save sp_SVC
ldr sp, [r1, #TSS_SAVE] @ Get saved sp_SVC
- ldr r0, [r1, #TSK_ADDR_LIMIT]
- teq r0, #0
- moveq r0, #DOM_KERNELDOMAIN
- movne r0, #DOM_USERDOMAIN
- mcr p15, 0, r0, c3, c0 @ Set domain reg
- ldr r0, [r1, #TSS_MEMMAP] @ Page table pointer
+ ldr r2, [r1, #TSK_ADDR_LIMIT]
+ teq r2, #0
+ moveq r2, #DOM_KERNELDOMAIN
+ movne r2, #DOM_USERDOMAIN
+ mcr p15, 0, r2, c3, c0 @ Set domain reg
+ ldr r2, [r1, #TSS_MEMMAP] @ Page table pointer
mov r1, #0
mcr p15, 0, r1, c7, c0, 0 @ flush cache
- mcr p15, 0, r0, c2, c0, 0 @ update page table ptr
+ mcr p15, 0, r2, c2, c0, 0 @ update page table ptr
mcr p15, 0, r1, c5, c0, 0 @ flush TLBs
ldmfd sp!, {ip}
msr spsr, ip @ Save tasks CPSR into SPSR for this return
@@ -369,6 +370,35 @@
mov pc, lr
/*
+ * Function: arm6_7_set_pte(pte_t *ptep, pte_t pte)
+ * Params : r0 = Address to set
+ * : r1 = value to set
+ * Purpose : Set a PTE and flush it out of any WB cache
+ */
+ .align 5
+_arm6_7_set_pte:
+ str r1, [r0], #-1024 @ linux version
+
+ bic r2, r1, #0xff0
+ bic r2, r2, #3
+ orr r2, r2, #HPTE_TYPE_SMALL
+
+ tst r1, #LPTE_USER | LPTE_EXEC
+ orrne r2, r2, #HPTE_AP_READ
+
+ tst r1, #LPTE_WRITE
+ tstne r1, #LPTE_DIRTY
+ orrne r2, r2, #HPTE_AP_WRITE
+
+ tst r1, #LPTE_PRESENT
+ tstne r1, #LPTE_YOUNG
+ moveq r2, #0
+
+ str r2, [r0] @ hardware version
+ mcr p15, 0, r0, c7, c10, 1 @ clean D entry (drain is done by TLB fns)
+ mov pc, lr
+
+/*
* Function: _arm6_7_reset
*
* Notes : This sets up everything for a reset
@@ -405,8 +435,12 @@
.word _arm6_7_flush_tlb_all @ 44
.word _arm6_7_flush_tlb_area @ 48
.word _arm6_set_pmd @ 52
- .word _arm6_7_reset @ 54
- .word _arm6_7_flush_cache @ 58
+ .word _arm6_7_set_pte @ 56
+ .word _arm6_7_reset @ 60
+ .word _arm6_7_flush_cache @ 64
+
+ .word _arm6_7_flush_cache @ 68
+ .word _arm6_7_flush_cache @ 72
/*
* Purpose : Function pointers used to access above functions - all calls
@@ -431,8 +465,9 @@
.word _arm6_7_flush_tlb_all @ 44
.word _arm6_7_flush_tlb_area @ 48
.word _arm7_set_pmd @ 52
- .word _arm6_7_reset @ 56
- .word _arm6_7_flush_cache @ 60
-
+ .word _arm6_7_set_pte @ 56
+ .word _arm6_7_reset @ 60
.word _arm6_7_flush_cache @ 64
+
.word _arm6_7_flush_cache @ 68
+ .word _arm6_7_flush_cache @ 72
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/proc-sa110.S linux/arch/arm/mm/proc-sa110.S
--- v2.2.7/linux/arch/arm/mm/proc-sa110.S Tue Dec 22 14:16:53 1998
+++ linux/arch/arm/mm/proc-sa110.S Sat May 8 11:07:16 1999
@@ -8,6 +8,7 @@
*/
#include
#include
+#include
#include "../lib/constants.h"
/* This is the maximum size of an area which will be flushed. If the area
@@ -21,7 +22,6 @@
/*
* Function: sa110_flush_cache_all (void)
- *
* Purpose : Flush all cache lines
*/
.align 5
@@ -33,7 +33,7 @@
ands r1, r1, #1
eor r1, r1, #1
str r1, [r3]
- ldr ip, =0xdf000000
+ ldr ip, =FLUSH_BASE
addne ip, ip, #32768
add r1, ip, #16384 @ only necessary for 16k
1: ldr r3, [ip], #32
@@ -47,11 +47,9 @@
/*
* Function: sa110_flush_cache_area (unsigned long address, int end, int flags)
- *
* Params : address Area start address
* : end Area end address
* : flags b0 = I cache as well
- *
* Purpose : clean & flush all cache lines associated with this area of memory
*/
.align 5
@@ -74,10 +72,8 @@
/*
* Function: sa110_cache_wback_area(unsigned long address, unsigned long end)
- *
* Params : address Area start address
* : end Area end address
- *
* Purpose : ensure all dirty cachelines in the specified area have been
* written out to memory (for DMA)
*/
@@ -99,13 +95,10 @@
/*
* Function: sa110_cache_purge_area(unsigned long address, unsigned long end)
- *
* Params : address Area start address
* : end Area end address
- *
* Purpose : throw away all D-cached data in specified region without
- * an obligation to write it ack.
- *
+ * an obligation to write it back.
* Note : Must clean the D-cached entries around the boundaries if the
* start and/or end address are not cache aligned.
*/
@@ -124,9 +117,7 @@
/*
* Function: sa110_flush_cache_entry (unsigned long address)
- *
* Params : address Address of cache line to flush
- *
* Purpose : clean & flush an entry
*/
.align 5
@@ -138,24 +129,23 @@
mov pc, lr
/*
- * Function: sa110_flush_cache_pte (unsigned long address)
- *
+ * Function: sa110_clean_cache_area(unsigned long start, unsigned long size)
* Params : address Address of cache line to clean
- *
* Purpose : Ensure that physical memory reflects cache at this location
* for page table purposes.
*/
-_sa110_flush_cache_pte:
- mcr p15, 0, r0, c7, c10, 1 @ clean D entry (drain is done by TLB fns)
+_sa110_clean_cache_area:
+1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry (drain is done by TLB fns)
+ add r0, r0, #32
+ subs r1, r1, #32
+ bhi 1b
mov pc, lr
/*
* Function: sa110_flush_ram_page (unsigned long page)
- *
* Params : address Area start address
* : size size of area
* : flags b0 = I cache as well
- *
* Purpose : clean & flush all cache lines associated with this area of memory
*/
.align 5
@@ -176,7 +166,6 @@
/*
* Function: sa110_flush_tlb_all (void)
- *
* Purpose : flush all TLB entries in all caches
*/
.align 5
@@ -188,11 +177,9 @@
/*
* Function: sa110_flush_tlb_area (unsigned long address, unsigned long end, int flags)
- *
* Params : address Area start address
* : end Area end address
* : flags b0 = I cache as well
- *
* Purpose : flush a TLB entry
*/
.align 5
@@ -212,22 +199,21 @@
.align 5
_sa110_flush_icache_area:
- mov r3, #0
1: mcr p15, 0, r0, c7, c10, 1 @ Clean D entry
add r0, r0, #32
- cmp r0, r1
- blt 1b
+ subs r1, r1, #32
+ bhi 1b
+ mov r0, #0
+ mcr p15, 0, r0, c7, c10, 4 @ drain WB
mcr p15, 0, r0, c7, c5, 0 @ flush I cache
mov pc, lr
/*
* Function: sa110_switch_to (struct task_struct *prev, struct task_struct *next)
- *
* Params : prev Old task structure
* : next New task structure for process to run
- *
+ * Returns : prev
* Purpose : Perform a task switch, saving the old processes state, and restoring
* the new.
- *
* Notes : We don't fiddle with the FP registers here - we postpone this until
* the new task actually uses FP. This way, we don't swap FP for tasks
* that do not require it.
@@ -237,20 +223,30 @@
stmfd sp!, {r4 - r9, fp, lr} @ Store most regs on stack
mrs ip, cpsr
stmfd sp!, {ip} @ Save cpsr_SVC
+ ldr r2, [r0, #TSS_MEMMAP] @ Get old page tables
str sp, [r0, #TSS_SAVE] @ Save sp_SVC
ldr sp, [r1, #TSS_SAVE] @ Get saved sp_SVC
- ldr r0, [r1, #TSK_ADDR_LIMIT]
- teq r0, #0
- moveq r0, #DOM_KERNELDOMAIN
- movne r0, #DOM_USERDOMAIN
- mcr p15, 0, r0, c3, c0 @ Set segment
- ldr r0, [r1, #TSS_MEMMAP] @ Page table pointer
+ ldr r4, [r1, #TSK_ADDR_LIMIT]
+ teq r4, #0
+ moveq r4, #DOM_KERNELDOMAIN
+ movne r4, #DOM_USERDOMAIN
+ mcr p15, 0, r4, c3, c0 @ Set segment
+ ldr r4, [r1, #TSS_MEMMAP] @ Page table pointer
+/*
+ * Flushing the cache is nightmarishly slow, so we take any excuse
+ * to get out of it. If the old page table is the same as the new,
+ * this is a CLONE_VM relative of the old task and there is no need
+ * to flush. The overhead of the tests isn't even on the radar
+ * compared to the cost of the flush itself.
+ */
+ teq r4, r2
+ beq 2f
ldr r3, =Lclean_switch
ldr r2, [r3]
ands r2, r2, #1
eor r2, r2, #1
str r2, [r3]
- ldr r2, =0xdf000000
+ ldr r2, =FLUSH_BASE
addne r2, r2, #32768
add r1, r2, #16384 @ only necessary for 16k
1: ldr r3, [r2], #32
@@ -259,19 +255,16 @@
mov r1, #0
mcr p15, 0, r1, c7, c5, 0 @ flush I cache
mcr p15, 0, r1, c7, c10, 4 @ drain WB
- mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
+ mcr p15, 0, r4, c2, c0, 0 @ load page table pointer
mcr p15, 0, r1, c8, c7, 0 @ flush TLBs
- ldmfd sp!, {ip}
+2: ldmfd sp!, {ip}
msr spsr, ip @ Save tasks CPSR into SPSR for this return
ldmfd sp!, {r4 - r9, fp, pc}^ @ Load all regs saved previously
/*
* Function: sa110_data_abort ()
- *
* Params : r0 = address of aborted instruction
- *
* Purpose : obtain information about current aborted instruction
- *
* Returns : r0 = address of abort
* : r1 = FSR
* : r2 != 0 if writing
@@ -288,12 +281,10 @@
mov pc, lr
/*
- * Function: sa110_set_pmd ()
- *
+ * Function: sa110_set_pmd(pmd_t *pmdp, pmd_t pmd)
* Params : r0 = Address to set
* : r1 = value to set
- *
- * Purpose : Set a PMD and flush it out of any WB cache
+ * Purpose : Set a PMD and flush it out
*/
.align 5
_sa110_set_pmd: str r1, [r0]
@@ -301,23 +292,51 @@
mov pc, lr
/*
+ * Function: sa110_set_pte(pte_t *ptep, pte_t pte)
+ * Params : r0 = Address to set
+ * : r1 = value to set
+ * Purpose : Set a PTE and flush it out
+ */
+ .align 5
+_sa110_set_pte: str r1, [r0], #-1024 @ linux version
+
+ eor r1, r1, #LPTE_PRESENT | LPTE_YOUNG | LPTE_WRITE | LPTE_DIRTY
+
+ bic r2, r1, #0xff0
+ bic r2, r2, #3
+ orr r2, r2, #HPTE_TYPE_SMALL
+
+ tst r1, #LPTE_USER | LPTE_EXEC @ User or Exec?
+ orrne r2, r2, #HPTE_AP_READ
+
+ tst r1, #LPTE_WRITE | LPTE_DIRTY @ Write and Dirty?
+ orreq r2, r2, #HPTE_AP_WRITE
+
+ tst r1, #LPTE_PRESENT | LPTE_YOUNG @ Present and Young?
+ movne r2, #0
+
+ str r2, [r0] @ hardware version
+ mov r0, r0
+ mcr p15, 0, r0, c7, c10, 1 @ clean D entry (drain is done by TLB fns)
+ mov pc, lr
+
+/*
* Function: sa110_check_bugs (void)
* : sa110_proc_init (void)
* : sa110_proc_fin (void)
- *
* Notes : This processor does not require these
*/
_sa110_check_bugs:
mrs ip, cpsr
bic ip, ip, #F_BIT
msr cpsr, ip
+
_sa110_proc_init:
_sa110_proc_fin:
mov pc, lr
/*
* Function: sa110_reset
- *
* Notes : This sets up everything for a reset
*/
_sa110_reset: mrs r1, cpsr
@@ -350,14 +369,15 @@
.word _sa110_flush_cache_all @ 24
.word _sa110_flush_cache_area @ 28
.word _sa110_flush_cache_entry @ 32
- .word _sa110_flush_cache_pte @ 36
+ .word _sa110_clean_cache_area @ 36
.word _sa110_flush_ram_page @ 40
.word _sa110_flush_tlb_all @ 44
.word _sa110_flush_tlb_area @ 48
.word _sa110_set_pmd @ 52
- .word _sa110_reset @ 56
- .word _sa110_flush_icache_area @ 60
+ .word _sa110_set_pte @ 56
+ .word _sa110_reset @ 60
+ .word _sa110_flush_icache_area @ 64
- .word _sa110_cache_wback_area @ 64
- .word _sa110_cache_purge_area @ 68
+ .word _sa110_cache_wback_area @ 68
+ .word _sa110_cache_purge_area @ 72
diff -u --recursive --new-file v2.2.7/linux/arch/arm/mm/small_page.c linux/arch/arm/mm/small_page.c
--- v2.2.7/linux/arch/arm/mm/small_page.c Wed Sep 9 14:51:05 1998
+++ linux/arch/arm/mm/small_page.c Sat May 8 11:06:57 1999
@@ -5,6 +5,8 @@
*
* Changelog:
* 26/01/1996 RMK Cleaned up various areas to make little more generic
+ * 07/02/1999 RMK Support added for 16K and 32K page sizes
+ * containing 8K blocks
*/
#include
@@ -19,21 +21,32 @@
#include
#include
-#define SMALL_ALLOC_SHIFT (10)
+#if PAGE_SIZE == 4096
+/* 2K blocks */
+#define SMALL_ALLOC_SHIFT (11)
+#define NAME(x) x##_2k
+#elif PAGE_SIZE == 32768 || PAGE_SIZE == 16384
+/* 8K blocks */
+#define SMALL_ALLOC_SHIFT (13)
+#define NAME(x) x##_8k
+#endif
+
#define SMALL_ALLOC_SIZE (1 << SMALL_ALLOC_SHIFT)
#define NR_BLOCKS (PAGE_SIZE / SMALL_ALLOC_SIZE)
+#define BLOCK_MASK ((1 << NR_BLOCKS) - 1)
-#if NR_BLOCKS != 4
-#error I only support 4 blocks per page!
-#endif
-
-#define USED(pg) ((atomic_read(&(pg)->count) >> 8) & 15)
+#define USED(pg) ((atomic_read(&(pg)->count) >> 8) & BLOCK_MASK)
#define SET_USED(pg,off) (atomic_read(&(pg)->count) |= 256 << off)
#define CLEAR_USED(pg,off) (atomic_read(&(pg)->count) &= ~(256 << off))
+#define ALL_USED BLOCK_MASK
#define IS_FREE(pg,off) (!(atomic_read(&(pg)->count) & (256 << off)))
-#define PAGE_PTR(page,block) ((struct free_small_page *)((page) + \
+#define SM_PAGE_PTR(page,block) ((struct free_small_page *)((page) + \
((block) << SMALL_ALLOC_SHIFT)))
+#if NR_BLOCKS != 2 && NR_BLOCKS != 4
+#error I only support 2 or 4 blocks per page
+#endif
+
struct free_small_page {
unsigned long next;
unsigned long prev;
@@ -52,6 +65,7 @@
1, /* 0001 */
0, /* 0010 */
2, /* 0011 */
+#if NR_BLOCKS == 4
0, /* 0100 */
1, /* 0101 */
0, /* 0110 */
@@ -64,6 +78,7 @@
1, /* 1101 */
0, /* 1110 */
4 /* 1111 */
+#endif
};
static inline void clear_page_links(unsigned long page)
@@ -72,7 +87,7 @@
int i;
for (i = 0; i < NR_BLOCKS; i++) {
- fsp = PAGE_PTR(page, i);
+ fsp = SM_PAGE_PTR(page, i);
fsp->next = fsp->prev = 0;
}
}
@@ -90,7 +105,7 @@
for (i = 0; i < NR_BLOCKS; i++) {
if (mask & (1 << i))
continue;
- fsp = PAGE_PTR(page, i);
+ fsp = SM_PAGE_PTR(page, i);
fsp->prev = prev;
}
}
@@ -108,12 +123,12 @@
for (i = 0; i < NR_BLOCKS; i++) {
if (mask & (1 << i))
continue;
- fsp = PAGE_PTR(page, i);
+ fsp = SM_PAGE_PTR(page, i);
fsp->next = next;
}
}
-unsigned long get_small_page(int priority)
+unsigned long NAME(get_page)(int priority)
{
struct free_small_page *fsp;
unsigned long new_page;
@@ -129,8 +144,8 @@
page = mem_map + MAP_NR(small_page_ptr);
offset = offsets[USED(page)];
SET_USED(page, offset);
- new_page = (unsigned long)PAGE_PTR(small_page_ptr, offset);
- if (USED(page) == 15) {
+ new_page = (unsigned long)SM_PAGE_PTR(small_page_ptr, offset);
+ if (USED(page) == ALL_USED) {
fsp = (struct free_small_page *)new_page;
set_page_links_prev (fsp->next, 0);
small_page_ptr = fsp->next;
@@ -156,30 +171,31 @@
goto again;
}
-void free_small_page(unsigned long spage)
+void NAME(free_page)(unsigned long spage)
{
struct free_small_page *ofsp, *cfsp;
unsigned long flags;
struct page *page;
int offset, oldoffset;
+ if (!spage)
+ goto none;
+
offset = (spage >> SMALL_ALLOC_SHIFT) & (NR_BLOCKS - 1);
spage -= offset << SMALL_ALLOC_SHIFT;
page = mem_map + MAP_NR(spage);
- if (!PageReserved(page) || !USED(page)) {
- printk ("Trying to free non-small page from %p\n", __builtin_return_address(0));
- return;
- }
- if (IS_FREE(page, offset)) {
- printk ("Trying to free free small page from %p\n", __builtin_return_address(0));
- return;
- }
+ if (!PageReserved(page) || !USED(page))
+ goto non_small;
+
+ if (IS_FREE(page, offset))
+ goto free;
+
save_flags_cli (flags);
oldoffset = offsets[USED(page)];
CLEAR_USED(page, offset);
- ofsp = PAGE_PTR(spage, oldoffset);
- cfsp = PAGE_PTR(spage, offset);
+ ofsp = SM_PAGE_PTR(spage, oldoffset);
+ cfsp = SM_PAGE_PTR(spage, offset);
if (oldoffset == NR_BLOCKS) { /* going from totally used to mostly used */
cfsp->prev = 0;
@@ -197,4 +213,13 @@
} else
*cfsp = *ofsp;
restore_flags(flags);
+ return;
+
+non_small:
+ printk ("Trying to free non-small page from %p\n", __builtin_return_address(0));
+ return;
+free:
+ printk ("Trying to free free small page from %p\n", __builtin_return_address(0));
+none:
+ return;
}
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- v2.2.7/linux/arch/i386/kernel/entry.S Wed Jan 20 23:14:04 1999
+++ linux/arch/i386/kernel/entry.S Fri Apr 30 08:13:37 1999
@@ -154,7 +154,9 @@
.globl ret_from_fork
ret_from_fork:
#ifdef __SMP__
+ pushl %ebx
call SYMBOL_NAME(schedule_tail)
+ addl $4, %esp
#endif /* __SMP__ */
GET_CURRENT(%ebx)
jmp ret_from_sys_call
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/i386_ksyms.c linux/arch/i386/kernel/i386_ksyms.c
--- v2.2.7/linux/arch/i386/kernel/i386_ksyms.c Tue Mar 23 14:35:46 1999
+++ linux/arch/i386/kernel/i386_ksyms.c Mon May 10 10:32:45 1999
@@ -39,6 +39,7 @@
EXPORT_SYMBOL(local_irq_count);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
+EXPORT_SYMBOL(disable_irq_nosync);
EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL_NOVERS(__down_failed);
@@ -91,7 +92,7 @@
EXPORT_SYMBOL(__global_sti);
EXPORT_SYMBOL(__global_save_flags);
EXPORT_SYMBOL(__global_restore_flags);
-EXPORT_SYMBOL(mtrr_hook);
+EXPORT_SYMBOL(smp_call_function);
#endif
#ifdef CONFIG_MCA
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
--- v2.2.7/linux/arch/i386/kernel/io_apic.c Fri Apr 16 14:47:30 1999
+++ linux/arch/i386/kernel/io_apic.c Thu May 6 16:07:03 1999
@@ -1049,7 +1049,7 @@
* and do not need to be masked.
*/
ack_APIC_irq();
- status = desc->status & ~IRQ_REPLAY;
+ status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
status |= IRQ_PENDING;
/*
@@ -1060,8 +1060,9 @@
if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
action = desc->action;
status &= ~IRQ_PENDING;
+ status |= IRQ_INPROGRESS;
}
- desc->status = status | IRQ_INPROGRESS;
+ desc->status = status;
spin_unlock(&irq_controller_lock);
/*
@@ -1103,7 +1104,7 @@
* So this all has to be within the spinlock.
*/
mask_IO_APIC_irq(irq);
- status = desc->status & ~IRQ_REPLAY;
+ status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
/*
* If the IRQ is disabled for whatever reason, we must
@@ -1112,8 +1113,9 @@
action = NULL;
if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
action = desc->action;
+ status |= IRQ_INPROGRESS;
}
- desc->status = status | IRQ_INPROGRESS;
+ desc->status = status;
ack_APIC_irq();
spin_unlock(&irq_controller_lock);
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/irq.c linux/arch/i386/kernel/irq.c
--- v2.2.7/linux/arch/i386/kernel/irq.c Fri Apr 16 14:47:30 1999
+++ linux/arch/i386/kernel/irq.c Mon May 10 10:32:45 1999
@@ -203,7 +203,7 @@
void make_8259A_irq(unsigned int irq)
{
- disable_irq(irq);
+ disable_irq_nosync(irq);
io_apic_irqs &= ~(1<status & ~IRQ_REPLAY;
+ status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
action = NULL;
- if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))
+ if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
action = desc->action;
- desc->status = status | IRQ_INPROGRESS;
+ status |= IRQ_INPROGRESS;
+ }
+ desc->status = status;
}
spin_unlock(&irq_controller_lock);
@@ -320,7 +322,7 @@
BUILD_SMP_INTERRUPT(reschedule_interrupt)
BUILD_SMP_INTERRUPT(invalidate_interrupt)
BUILD_SMP_INTERRUPT(stop_cpu_interrupt)
-BUILD_SMP_INTERRUPT(mtrr_interrupt)
+BUILD_SMP_INTERRUPT(call_function_interrupt)
BUILD_SMP_INTERRUPT(spurious_interrupt)
/*
@@ -747,7 +749,7 @@
* hardware disable after having gotten the irq
* controller lock.
*/
-void disable_irq(unsigned int irq)
+void disable_irq_nosync(unsigned int irq)
{
unsigned long flags;
@@ -757,9 +759,21 @@
irq_desc[irq].handler->disable(irq);
}
spin_unlock_irqrestore(&irq_controller_lock, flags);
+}
+
+/*
+ * Synchronous version of the above, making sure the IRQ is
+ * no longer running on any other IRQ..
+ */
+void disable_irq(unsigned int irq)
+{
+ disable_irq_nosync(irq);
- if (irq_desc[irq].status & IRQ_INPROGRESS)
- synchronize_irq();
+ if (!local_irq_count[smp_processor_id()]) {
+ do {
+ barrier();
+ } while (irq_desc[irq].status & IRQ_INPROGRESS);
+ }
}
void enable_irq(unsigned int irq)
@@ -769,7 +783,7 @@
spin_lock_irqsave(&irq_controller_lock, flags);
switch (irq_desc[irq].depth) {
case 1:
- irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS);
+ irq_desc[irq].status &= ~IRQ_DISABLED;
irq_desc[irq].handler->enable(irq);
/* fall throught */
default:
@@ -864,7 +878,7 @@
if (!shared) {
irq_desc[irq].depth = 0;
- irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS);
+ irq_desc[irq].status &= ~IRQ_DISABLED;
irq_desc[irq].handler->startup(irq);
}
spin_unlock_irqrestore(&irq_controller_lock,flags);
@@ -936,7 +950,7 @@
*
* This depends on the fact that any interrupt that
* comes in on to an unassigned handler will get stuck
- * with "IRQ_INPROGRESS" asserted and the interrupt
+ * with "IRQ_WAITING" cleared and the interrupt
* disabled.
*/
unsigned long probe_irq_on(void)
@@ -950,8 +964,7 @@
spin_lock_irq(&irq_controller_lock);
for (i = NR_IRQS-1; i > 0; i--) {
if (!irq_desc[i].action) {
- unsigned int status = irq_desc[i].status | IRQ_AUTODETECT;
- irq_desc[i].status = status & ~IRQ_INPROGRESS;
+ irq_desc[i].status |= IRQ_AUTODETECT | IRQ_WAITING;
irq_desc[i].handler->startup(i);
}
}
@@ -974,7 +987,7 @@
continue;
/* It triggered already - consider it spurious. */
- if (status & IRQ_INPROGRESS) {
+ if (!(status & IRQ_WAITING)) {
irq_desc[i].status = status & ~IRQ_AUTODETECT;
irq_desc[i].handler->shutdown(i);
}
@@ -1000,7 +1013,7 @@
if (!(status & IRQ_AUTODETECT))
continue;
- if (status & IRQ_INPROGRESS) {
+ if (!(status & IRQ_WAITING)) {
if (!nr_irqs)
irq_found = i;
nr_irqs++;
@@ -1081,8 +1094,8 @@
/* self generated IPI for local APIC timer */
set_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
- /* IPI for MTRR control */
- set_intr_gate(MTRR_CHANGE_VECTOR, mtrr_interrupt);
+ /* IPI for generic function call */
+ set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
/* IPI vector for APIC spurious interrupts */
set_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/irq.h linux/arch/i386/kernel/irq.h
--- v2.2.7/linux/arch/i386/kernel/irq.h Fri Apr 16 14:47:30 1999
+++ linux/arch/i386/kernel/irq.h Mon May 10 11:16:39 1999
@@ -26,6 +26,7 @@
#define IRQ_PENDING 4 /* IRQ pending - replay on enable */
#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */
+#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
/*
* This is the "IRQ descriptor", which contains various information
@@ -64,7 +65,7 @@
#define INVALIDATE_TLB_VECTOR 0x31
#define STOP_CPU_VECTOR 0x40
#define LOCAL_TIMER_VECTOR 0x41
-#define MTRR_CHANGE_VECTOR 0x50
+#define CALL_FUNCTION_VECTOR 0x50
/*
* First APIC vector available to drivers: (vectors 0x51-0xfe)
@@ -98,7 +99,6 @@
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);
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/mca.c linux/arch/i386/kernel/mca.c
--- v2.2.7/linux/arch/i386/kernel/mca.c Fri Apr 16 14:47:30 1999
+++ linux/arch/i386/kernel/mca.c Mon May 10 13:00:10 1999
@@ -92,7 +92,7 @@
* is set to zero.
*/
-static struct MCA_info* mca_info = 0;
+static struct MCA_info* mca_info = NULL;
/* MCA registers */
@@ -160,7 +160,10 @@
/* id = 0x0000 usually indicates hardware failure,
* however, ZP Gu (zpg@castle.net> reports that his 9556
- * has 0x0000 as id and everything still works.
+ * has 0x0000 as id and everything still works. There
+ * also seem to be an adapter with id = 0x0000; the
+ * NCR Parallel Bus Memory Card. Until this is confirmed,
+ * however, this code will stay.
*/
mca_info->slot[slot].status = MCA_ADAPTER_ERROR;
@@ -222,7 +225,13 @@
/* Allocate MCA_info structure (at address divisible by 8) */
- mca_info = kmalloc(sizeof(struct MCA_info), GFP_ATOMIC);
+ mca_info = kmalloc(sizeof(struct MCA_info), GFP_KERNEL);
+
+ if(mca_info == NULL) {
+ printk("Failed to allocate memory for mca_info!");
+ restore_flags(flags);
+ return;
+ }
/* Make sure adapter setup is off */
@@ -382,7 +391,7 @@
int mca_find_adapter(int id, int start)
{
- if(mca_info == 0 || id == 0 || id == 0xffff) {
+ if(mca_info == NULL || id == 0xffff) {
return MCA_NOTFOUND;
}
@@ -412,7 +421,7 @@
int mca_find_unused_adapter(int id, int start)
{
- if(mca_info == 0 || id == 0 || id == 0xffff) {
+ if(mca_info == NULL || id == 0xffff) {
return MCA_NOTFOUND;
}
@@ -443,7 +452,7 @@
unsigned char mca_read_stored_pos(int slot, int reg)
{
- if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == 0) return 0;
+ if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == NULL) return 0;
if(reg < 0 || reg >= 8) return 0;
return mca_info->slot[slot].pos[reg];
} /* mca_read_stored_pos() */
@@ -455,7 +464,7 @@
unsigned int byte = 0;
unsigned long flags;
- if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == 0) return 0;
+ if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == NULL) return 0;
if(reg < 0 || reg >= 8) return 0;
save_flags(flags);
@@ -527,7 +536,7 @@
return;
if(reg < 0 || reg >= 8)
return;
- if(mca_info == 0)
+ if(mca_info == NULL)
return;
save_flags(flags);
@@ -554,7 +563,7 @@
void mca_set_adapter_name(int slot, char* name)
{
- if(mca_info == 0) return;
+ if(mca_info == NULL) return;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
if(name != NULL) {
@@ -570,7 +579,7 @@
void mca_set_adapter_procfn(int slot, MCA_ProcFn procfn, void* dev)
{
- if(mca_info == 0) return;
+ if(mca_info == NULL) return;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
mca_info->slot[slot].procfn = procfn;
@@ -597,7 +606,7 @@
char *mca_get_adapter_name(int slot)
{
- if(mca_info == 0) return 0;
+ if(mca_info == NULL) return 0;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
return mca_info->slot[slot].name;
@@ -608,7 +617,7 @@
int mca_isadapter(int slot)
{
- if(mca_info == 0) return 0;
+ if(mca_info == NULL) return 0;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
return ((mca_info->slot[slot].status == MCA_ADAPTER_NORMAL)
@@ -620,7 +629,7 @@
int mca_isenabled(int slot)
{
- if(mca_info == 0) return 0;
+ if(mca_info == NULL) return 0;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
return (mca_info->slot[slot].status == MCA_ADAPTER_NORMAL);
@@ -637,7 +646,7 @@
{
int i, j, len = 0;
- if(MCA_bus && mca_info != 0)
+ if(MCA_bus && mca_info != NULL)
{
/* Format POS registers of eight MCA slots */
@@ -676,10 +685,10 @@
__initfunc(void mca_do_proc_init(void))
{
- int i = 0;
- struct proc_dir_entry* node = 0;
+ int i;
+ struct proc_dir_entry* node = NULL;
- if(mca_info == 0) return; /* Should never happen */
+ if(mca_info == NULL) return; /* Should never happen */
proc_register(&proc_mca, &(struct proc_dir_entry) {
PROC_MCA_REGISTERS, 3, "pos", S_IFREG|S_IRUGO,
@@ -696,8 +705,12 @@
mca_info->slot[i].dev = 0;
if(!mca_isadapter(i)) continue;
- node = kmalloc(sizeof(struct proc_dir_entry), GFP_ATOMIC);
+ node = kmalloc(sizeof(struct proc_dir_entry), GFP_KERNEL);
+ if(node == NULL) {
+ printk("Failed to allocate memory for MCA proc-entries!");
+ return;
+ }
if(i < MCA_MAX_SLOT_NR) {
node->low_ino = PROC_MCA_SLOT + i;
node->namelen = sprintf(mca_info->slot[i].procname,
@@ -727,7 +740,7 @@
/* This really shouldn't happen... */
- if(mca_info == 0) {
+ if(mca_info == NULL) {
*buf = 0;
return 0;
}
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/mtrr.c linux/arch/i386/kernel/mtrr.c
--- v2.2.7/linux/arch/i386/kernel/mtrr.c Mon Dec 28 15:00:52 1998
+++ linux/arch/i386/kernel/mtrr.c Mon May 10 10:32:45 1999
@@ -132,6 +132,70 @@
Fixed harmless compiler warning in include/asm-i386/mtrr.h
Fixed version numbering and history for v1.23 -> v1.24.
v1.26
+ 19990118 Richard Gooch
+ PLACEHOLDER.
+ v1.27
+ 19990123 Richard Gooch
+ Changed locking to spin with reschedule.
+ Made use of new .
+ v1.28
+ 19990201 Zoltan Boszormenyi
+ Extended the driver to be able to use Cyrix style ARRs.
+ 19990204 Richard Gooch
+ Restructured Cyrix support.
+ v1.29
+ 19990204 Zoltan Boszormenyi
+ Refined ARR support: enable MAPEN in set_mtrr_prepare()
+ and disable MAPEN in set_mtrr_done().
+ 19990205 Richard Gooch
+ Minor cleanups.
+ v1.30
+ 19990208 Zoltan Boszormenyi
+ Protect plain 6x86s (and other processors without the
+ Page Global Enable feature) against accessing CR4 in
+ set_mtrr_prepare() and set_mtrr_done().
+ 19990210 Richard Gooch
+ Turned and into function pointers.
+ v1.31
+ 19990212 Zoltan Boszormenyi
+ Major rewrite of cyrix_arr_init(): do not touch ARRs,
+ leave them as the BIOS have set them up.
+ Enable usage of all 8 ARRs.
+ Avoid multiplications by 3 everywhere and other
+ code clean ups/speed ups.
+ 19990213 Zoltan Boszormenyi
+ Set up other Cyrix processors identical to the boot cpu.
+ Since Cyrix don't support Intel APIC, this is l'art pour l'art.
+ Weigh ARRs by size:
+ If size <= 32M is given, set up ARR# we were given.
+ If size > 32M is given, set up ARR7 only if it is free,
+ fail otherwise.
+ 19990214 Zoltan Boszormenyi
+ Also check for size >= 256K if we are to set up ARR7,
+ mtrr_add() returns the value it gets from set_mtrr()
+ 19990218 Zoltan Boszormenyi
+ Remove Cyrix "coma bug" workaround from here.
+ Moved to linux/arch/i386/kernel/setup.c and
+ linux/include/asm-i386/bugs.h
+ 19990228 Richard Gooch
+ Added #ifdef CONFIG_DEVFS_FS
+ Added MTRRIOC_KILL_ENTRY ioctl(2)
+ Trap for counter underflow in .
+ Trap for 4 MiB aligned regions for PPro, stepping <= 7.
+ 19990301 Richard Gooch
+ Created hook.
+ 19990305 Richard Gooch
+ Temporarily disable AMD support now MTRR capability flag is set.
+ v1.32
+ 19990308 Zoltan Boszormenyi
+ Adjust my changes (19990212-19990218) to Richard Gooch's
+ latest changes. (19990228-19990305)
+ v1.33
+ 19990309 Richard Gooch
+ Fixed typo in message.
+ 19990310 Richard Gooch
+ Support K6-II/III based on Alan Cox's patches.
+ v1.34
*/
#include
#include
@@ -163,11 +227,12 @@
#include
#include
#include
+#include
#include
#include "irq.h"
-#define MTRR_VERSION "1.26 (19981001)"
+#define MTRR_VERSION "1.34 (19990310)"
#define TRUE 1
#define FALSE 0
@@ -197,7 +262,7 @@
# define MTRR_CHANGE_MASK_DEFTYPE 0x04
#endif
-/* In the processor's MTRR interface, the MTRR type is always held in
+/* In the Intel processor's MTRR interface, the MTRR type is always held in
an 8 bit field: */
typedef u8 mtrr_type;
@@ -207,9 +272,12 @@
#ifdef __SMP__
# define set_mtrr(reg,base,size,type) set_mtrr_smp (reg, base, size, type)
#else
-# define set_mtrr(reg,base,size,type) set_mtrr_up (reg, base, size, type,TRUE)
+# define set_mtrr(reg,base,size,type) (*set_mtrr_up) (reg, base, size, type, \
+ TRUE)
#endif
+#define spin_lock_reschedule(lock) while (!spin_trylock(lock)) schedule ();
+
#ifndef CONFIG_PROC_FS
# define compute_ascii() while (0)
#endif
@@ -233,49 +301,30 @@
unsigned long deftype_lo;
unsigned long deftype_hi;
unsigned long cr4val;
+ unsigned long ccr3;
};
-/*
- * Access to machine-specific registers (available on 586 and better only)
- * Note: the rd* operations modify the parameters directly (without using
- * pointer indirection), this allows gcc to optimize better
- */
-#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))
-
-#define rdtsc(low,high) \
- __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
-
-#define rdpmc(counter,low,high) \
- __asm__ __volatile__("rdpmc" \
- : "=a" (low), "=d" (high) \
- : "c" (counter))
-
-/* Put the processor into a state where MTRRs can be safely set. */
-static void set_mtrr_prepare(struct set_mtrr_context *ctxt)
+/* Put the processor into a state where MTRRs can be safely set */
+static void set_mtrr_prepare (struct set_mtrr_context *ctxt)
{
unsigned long tmp;
- /* disable interrupts locally */
+ /* Disable interrupts locally */
__save_flags (ctxt->flags); __cli ();
- /* save value of CR4 and clear Page Global Enable (bit 7) */
- asm volatile ("movl %%cr4, %0\n\t"
- "movl %0, %1\n\t"
- "andb $0x7f, %b1\n\t"
- "movl %1, %%cr4\n\t"
- : "=r" (ctxt->cr4val), "=q" (tmp) : : "memory");
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) return;
- /* disable and flush caches. Note that wbinvd flushes the TLBs as
- a side-effect. */
+ /* Save value of CR4 and clear Page Global Enable (bit 7) */
+ if (boot_cpu_data.x86_capability & X86_FEATURE_PGE)
+ asm volatile ("movl %%cr4, %0\n\t"
+ "movl %0, %1\n\t"
+ "andb $0x7f, %b1\n\t"
+ "movl %1, %%cr4\n\t"
+ : "=r" (ctxt->cr4val), "=q" (tmp) : : "memory");
+
+ /* Disable and flush caches. Note that wbinvd flushes the TLBs as
+ a side-effect */
asm volatile ("movl %%cr0, %0\n\t"
"orl $0x40000000, %0\n\t"
"wbinvd\n\t"
@@ -283,64 +332,108 @@
"wbinvd\n\t"
: "=r" (tmp) : : "memory");
- /* disable MTRRs, and set the default type to uncached. */
- rdmsr(MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi);
- wrmsr(MTRRdefType_MSR, ctxt->deftype_lo & 0xf300UL, ctxt->deftype_hi);
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_INTEL:
+ /* Disable MTRRs, and set the default type to uncached */
+ rdmsr (MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi);
+ wrmsr (MTRRdefType_MSR, ctxt->deftype_lo & 0xf300UL, ctxt->deftype_hi);
+ break;
+ case X86_VENDOR_CYRIX:
+ tmp = getCx86 (CX86_CCR3);
+ setCx86 (CX86_CCR3, (tmp & 0x0f) | 0x10);
+ ctxt->ccr3 = tmp;
+ break;
+ }
} /* End Function set_mtrr_prepare */
-
-/* Restore the processor after a set_mtrr_prepare */
-static void set_mtrr_done(struct set_mtrr_context *ctxt)
+/* Restore the processor after a set_mtrr_prepare */
+static void set_mtrr_done (struct set_mtrr_context *ctxt)
{
unsigned long tmp;
- /* flush caches and TLBs */
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+ {
+ __restore_flags (ctxt->flags);
+ return;
+ }
+
+ /* Flush caches and TLBs */
asm volatile ("wbinvd" : : : "memory" );
- /* restore MTRRdefType */
- wrmsr(MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi);
+ /* Restore MTRRdefType */
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_INTEL:
+ wrmsr (MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi);
+ break;
+ case X86_VENDOR_CYRIX:
+ setCx86 (CX86_CCR3, ctxt->ccr3);
+ break;
+ }
- /* enable caches */
+ /* Enable caches */
asm volatile ("movl %%cr0, %0\n\t"
"andl $0xbfffffff, %0\n\t"
"movl %0, %%cr0\n\t"
: "=r" (tmp) : : "memory");
- /* restore value of CR4 */
- asm volatile ("movl %0, %%cr4"
- : : "r" (ctxt->cr4val) : "memory");
+ /* Restore value of CR4 */
+ if (boot_cpu_data.x86_capability & X86_FEATURE_PGE)
+ asm volatile ("movl %0, %%cr4"
+ : : "r" (ctxt->cr4val) : "memory");
- /* re-enable interrupts locally (if enabled previously) */
+ /* Re-enable interrupts locally (if enabled previously) */
__restore_flags (ctxt->flags);
} /* End Function set_mtrr_done */
-
-/* this function returns the number of variable MTRRs */
+/* This function returns the number of variable MTRRs */
static unsigned int get_num_var_ranges (void)
{
unsigned long config, dummy;
- rdmsr(MTRRcap_MSR, config, dummy);
- return (config & 0xff);
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_INTEL:
+ rdmsr (MTRRcap_MSR, config, dummy);
+ return (config & 0xff);
+ /*break;*/
+ case X86_VENDOR_CYRIX:
+ /* Cyrix have 8 ARRs */
+ return 8;
+ /*break;*/
+ case X86_VENDOR_AMD:
+ return 2;
+ /*break;*/
+ }
+ return 0;
} /* End Function get_num_var_ranges */
-
-/* non-zero if we have the write-combining memory type. */
+/* Returns non-zero if we have the write-combining memory type */
static int have_wrcomb (void)
{
unsigned long config, dummy;
- rdmsr(MTRRcap_MSR, config, dummy);
- return (config & (1<<10));
-}
-
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_INTEL:
+ rdmsr (MTRRcap_MSR, config, dummy);
+ return (config & (1<<10));
+ /*break;*/
+ case X86_VENDOR_CYRIX:
+ case X86_VENDOR_AMD:
+ return 1;
+ /*break;*/
+ }
+ return 0;
+} /* End Function have_wrcomb */
-static void get_mtrr (unsigned int reg, unsigned long *base,
- unsigned long *size, mtrr_type *type)
+static void intel_get_mtrr (unsigned int reg, unsigned long *base,
+ unsigned long *size, mtrr_type *type)
{
unsigned long dummy, mask_lo, base_lo;
- rdmsr(MTRRphysMask_MSR(reg), mask_lo, dummy);
+ rdmsr (MTRRphysMask_MSR(reg), mask_lo, dummy);
if ((mask_lo & 0x800) == 0) {
/* Invalid (i.e. free) range. */
*base = 0;
@@ -364,11 +457,104 @@
*base = (base_lo & 0xfffff000UL);
*type = (base_lo & 0xff);
-} /* End Function get_mtrr */
+} /* End Function intel_get_mtrr */
+
+static void cyrix_get_arr (unsigned int reg, unsigned long *base,
+ unsigned long *size, mtrr_type *type)
+{
+ unsigned long flags;
+ unsigned char arr, ccr3, rcr, shift;
+
+ arr = CX86_ARR_BASE + (reg << 1) + reg; /* avoid multiplication by 3 */
+ /* Save flags and disable interrupts */
+ __save_flags (flags); __cli ();
-static void set_mtrr_up (unsigned int reg, unsigned long base,
- unsigned long size, mtrr_type type, int do_safe)
+ ccr3 = getCx86 (CX86_CCR3);
+ setCx86 (CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
+ ((unsigned char *) base)[3] = getCx86 (arr);
+ ((unsigned char *) base)[2] = getCx86 (arr+1);
+ ((unsigned char *) base)[1] = getCx86 (arr+2);
+ rcr = getCx86(CX86_RCR_BASE + reg);
+ setCx86 (CX86_CCR3, ccr3); /* disable MAPEN */
+
+ /* Enable interrupts if it was enabled previously */
+ __restore_flags (flags);
+
+ shift = ((unsigned char *) base)[1] & 0x0f;
+ *base &= 0xfffff000UL;
+
+ /* Power of two, at least 4K on ARR0-ARR6, 256K on ARR7
+ * Note: shift==0xf means 4G, this is unsupported.
+ */
+ if (shift)
+ *size = (reg < 7 ? 0x800UL : 0x20000UL) << shift;
+ else
+ *size = 0;
+
+ /* Bit 0 is Cache Enable on ARR7, Cache Disable on ARR0-ARR6 */
+ if (reg < 7) {
+ switch (rcr) {
+ case 1: *type = MTRR_TYPE_UNCACHABLE; break;
+ case 8: *type = MTRR_TYPE_WRBACK; break;
+ case 9: *type = MTRR_TYPE_WRCOMB; break;
+ case 24:
+ default: *type = MTRR_TYPE_WRTHROUGH; break;
+ }
+ } else {
+ switch (rcr) {
+ case 0: *type = MTRR_TYPE_UNCACHABLE; break;
+ case 8: *type = MTRR_TYPE_WRCOMB; break;
+ case 9: *type = MTRR_TYPE_WRBACK; break;
+ case 25:
+ default: *type = MTRR_TYPE_WRTHROUGH; break;
+ }
+ }
+} /* End Function cyrix_get_arr */
+
+static void amd_get_mtrr (unsigned int reg, unsigned long *base,
+ unsigned long *size, mtrr_type *type)
+{
+ unsigned long low, high;
+
+ rdmsr (0xC0000085, low, high);
+ /* Upper dword is region 1, lower is region 0 */
+ if (reg == 1) low = high;
+ /* The base masks off on the right alignment */
+ *base = low & 0xFFFE0000;
+ *type = 0;
+ if (low & 1) *type = MTRR_TYPE_UNCACHABLE;
+ if (low & 2) *type = MTRR_TYPE_WRCOMB;
+ if ( !(low & 3) )
+ {
+ *size = 0;
+ return;
+ }
+ /*
+ * This needs a little explaining. The size is stored as an
+ * inverted mask of bits of 128K granularity 15 bits long offset
+ * 2 bits
+ *
+ * So to get a size we do invert the mask and add 1 to the lowest
+ * mask bit (4 as its 2 bits in). This gives us a size we then shift
+ * to turn into 128K blocks
+ *
+ * eg 111 1111 1111 1100 is 512K
+ *
+ * invert 000 0000 0000 0011
+ * +1 000 0000 0000 0100
+ * *128K ...
+ */
+ low = (~low) & 0x1FFFC;
+ *size = (low + 4) << 15;
+ return;
+} /* End Function amd_get_mtrr */
+
+static void (*get_mtrr) (unsigned int reg, unsigned long *base,
+ unsigned long *size, mtrr_type *type) = NULL;
+
+static void intel_set_mtrr_up (unsigned int reg, unsigned long base,
+ unsigned long size, mtrr_type type, int do_safe)
/* [SUMMARY] Set variable MTRR register on the local CPU.
The register to set.
The base address of the region.
@@ -376,6 +562,7 @@
The type of the region.
If TRUE, do the change safely. If FALSE, safety measures should
be done externally.
+ [RETURNS] Nothing.
*/
{
struct set_mtrr_context ctxt;
@@ -393,8 +580,92 @@
wrmsr (MTRRphysMask_MSR (reg), ~(size - 1) | 0x800, 0);
}
if (do_safe) set_mtrr_done (&ctxt);
-} /* End Function set_mtrr_up */
+} /* End Function intel_set_mtrr_up */
+
+static void cyrix_set_arr_up (unsigned int reg, unsigned long base,
+ unsigned long size, mtrr_type type, int do_safe)
+{
+ struct set_mtrr_context ctxt;
+ unsigned char arr, arr_type, arr_size;
+
+ arr = CX86_ARR_BASE + (reg << 1) + reg; /* avoid multiplication by 3 */
+
+ /* count down from 32M (ARR0-ARR6) or from 2G (ARR7) */
+ size >>= (reg < 7 ? 12 : 18);
+ size &= 0x7fff; /* make sure arr_size <= 14 */
+ for(arr_size = 0; size; arr_size++, size >>= 1);
+
+ if (reg<7) {
+ switch (type) {
+ case MTRR_TYPE_UNCACHABLE: arr_type = 1; break;
+ case MTRR_TYPE_WRCOMB: arr_type = 9; break;
+ case MTRR_TYPE_WRTHROUGH: arr_type = 24; break;
+ default: arr_type = 8; break;
+ }
+ } else {
+ switch (type) {
+ case MTRR_TYPE_UNCACHABLE: arr_type = 0; break;
+ case MTRR_TYPE_WRCOMB: arr_type = 8; break;
+ case MTRR_TYPE_WRTHROUGH: arr_type = 25; break;
+ default: arr_type = 9; break;
+ }
+ }
+
+ if (do_safe) set_mtrr_prepare (&ctxt);
+ setCx86(arr, ((unsigned char *) &base)[3]);
+ setCx86(arr+1, ((unsigned char *) &base)[2]);
+ setCx86(arr+2, (((unsigned char *) &base)[1]) | arr_size);
+ setCx86(CX86_RCR_BASE + reg, arr_type);
+ if (do_safe) set_mtrr_done (&ctxt);
+} /* End Function cyrix_set_arr_up */
+
+static void amd_set_mtrr_up (unsigned int reg, unsigned long base,
+ unsigned long size, mtrr_type type, int do_safe)
+/* [SUMMARY] Set variable MTRR register on the local CPU.
+ The register to set.
+ The base address of the region.
+ The size of the region. If this is 0 the region is disabled.
+ The type of the region.
+ If TRUE, do the change safely. If FALSE, safety measures should
+ be done externally.
+ [RETURNS] Nothing.
+*/
+{
+ u32 low, high;
+ struct set_mtrr_context ctxt;
+
+ if (do_safe) set_mtrr_prepare (&ctxt);
+ /*
+ * Low is MTRR0 , High MTRR 1
+ */
+ rdmsr (0xC0000085, low, high);
+ /*
+ * Blank to disable
+ */
+ if (size == 0)
+ *(reg ? &high : &low) = 0;
+ else
+ /* Set the register to the base (already shifted for us), the
+ type (off by one) and an inverted bitmask of the size
+
+ The size is the only odd bit. We are fed say 512K
+ We invert this and we get 111 1111 1111 1011 but
+ if you subtract one and invert you get the desired
+ 111 1111 1111 1100 mask
+ */
+ *(reg ? &high : &low)=(((~(size-1))>>15)&0x0001FFFC)|base|(type+1);
+ /*
+ * The writeback rule is quite specific. See the manual. Its
+ * disable local interrupts, write back the cache, set the mtrr
+ */
+ __asm__ __volatile__ ("wbinvd" : : : "memory");
+ wrmsr (0xC0000085, low, high);
+ if (do_safe) set_mtrr_done (&ctxt);
+} /* End Function amd_set_mtrr_up */
+static void (*set_mtrr_up) (unsigned int reg, unsigned long base,
+ unsigned long size, mtrr_type type,
+ int do_safe) = NULL;
#ifdef __SMP__
@@ -407,7 +678,7 @@
};
-/* Get the MSR pair relating to a var range. */
+/* Get the MSR pair relating to a var range */
__initfunc(static void get_mtrr_var_range (unsigned int index,
struct mtrr_var_range *vr))
{
@@ -416,8 +687,8 @@
} /* End Function get_mtrr_var_range */
-/* Set the MSR pair relating to a var range. Returns TRUE if
- changes are made. */
+/* Set the MSR pair relating to a var range. Returns TRUE if
+ changes are made */
__initfunc(static int set_mtrr_var_range_testing (unsigned int index,
struct mtrr_var_range *vr))
{
@@ -441,8 +712,7 @@
}
return changed;
-}
-
+} /* End Function set_mtrr_var_range_testing */
__initfunc(static void get_fixed_ranges(mtrr_type *frs))
{
@@ -456,8 +726,7 @@
for (i = 0; i < 8; i++)
rdmsr(MTRRfix4K_C0000_MSR + i, p[6 + i*2], p[7 + i*2]);
-}
-
+} /* End Function get_fixed_ranges */
__initfunc(static int set_fixed_ranges_testing(mtrr_type *frs))
{
@@ -487,10 +756,8 @@
changed = TRUE;
}
}
-
return changed;
-}
-
+} /* End Function set_fixed_ranges_testing */
struct mtrr_state
{
@@ -502,7 +769,7 @@
};
-/* Grab all of the MTRR state for this CPU into *state. */
+/* Grab all of the MTRR state for this CPU into *state */
__initfunc(static void get_mtrr_state(struct mtrr_state *state))
{
unsigned int nvrs, i;
@@ -511,22 +778,22 @@
nvrs = state->num_var_ranges = get_num_var_ranges();
vrs = state->var_ranges
- = kmalloc(nvrs * sizeof(struct mtrr_var_range), GFP_KERNEL);
+ = kmalloc (nvrs * sizeof (struct mtrr_var_range), GFP_KERNEL);
if (vrs == NULL)
nvrs = state->num_var_ranges = 0;
for (i = 0; i < nvrs; i++)
- get_mtrr_var_range(i, &vrs[i]);
+ get_mtrr_var_range (i, &vrs[i]);
- get_fixed_ranges(state->fixed_ranges);
+ get_fixed_ranges (state->fixed_ranges);
- rdmsr(MTRRdefType_MSR, lo, dummy);
+ rdmsr (MTRRdefType_MSR, lo, dummy);
state->def_type = (lo & 0xff);
state->enabled = (lo & 0xc00) >> 10;
} /* End Function get_mtrr_state */
-/* Free resources associated with a struct mtrr_state */
+/* Free resources associated with a struct mtrr_state */
__initfunc(static void finalize_mtrr_state(struct mtrr_state *state))
{
if (state->var_ranges) kfree (state->var_ranges);
@@ -546,14 +813,14 @@
unsigned long change_mask = 0;
for (i = 0; i < state->num_var_ranges; i++)
- if (set_mtrr_var_range_testing(i, &state->var_ranges[i]))
+ if ( set_mtrr_var_range_testing (i, &state->var_ranges[i]) )
change_mask |= MTRR_CHANGE_MASK_VARIABLE;
- if (set_fixed_ranges_testing(state->fixed_ranges))
+ if ( set_fixed_ranges_testing(state->fixed_ranges) )
change_mask |= MTRR_CHANGE_MASK_FIXED;
- /* set_mtrr_restore restores the old value of MTRRdefType,
- so to set it we fiddle with the saved value. */
+ /* Set_mtrr_restore restores the old value of MTRRdefType,
+ so to set it we fiddle with the saved value */
if ((ctxt->deftype_lo & 0xff) != state->def_type
|| ((ctxt->deftype_lo & 0xc00) >> 10) != state->enabled)
{
@@ -566,76 +833,63 @@
static atomic_t undone_count;
-static void (*handler_func) (struct set_mtrr_context *ctxt, void *info);
-static void *handler_info;
static volatile int wait_barrier_execute = FALSE;
static volatile int wait_barrier_cache_enable = FALSE;
-static void sync_handler (void)
+struct set_mtrr_data
+{
+ unsigned long smp_base;
+ unsigned long smp_size;
+ unsigned int smp_reg;
+ mtrr_type smp_type;
+};
+
+static void ipi_handler (void *info)
/* [SUMMARY] Synchronisation handler. Executed by "other" CPUs.
[RETURNS] Nothing.
*/
{
+ struct set_mtrr_data *data = info;
struct set_mtrr_context ctxt;
set_mtrr_prepare (&ctxt);
- /* Notify master CPU that I'm at the barrier and then wait */
+ /* Notify master that I've flushed and disabled my cache */
atomic_dec (&undone_count);
while (wait_barrier_execute) barrier ();
/* The master has cleared me to execute */
- (*handler_func) (&ctxt, handler_info);
+ (*set_mtrr_up) (data->smp_reg, data->smp_base, data->smp_size,
+ data->smp_type, FALSE);
/* Notify master CPU that I've executed the function */
atomic_dec (&undone_count);
/* Wait for master to clear me to enable cache and return */
while (wait_barrier_cache_enable) barrier ();
set_mtrr_done (&ctxt);
-} /* End Function sync_handler */
+} /* End Function ipi_handler */
-static void do_all_cpus (void (*handler) (struct set_mtrr_context *ctxt,
- void *info),
- void *info, int local)
-/* [SUMMARY] Execute a function on all CPUs, with caches flushed and disabled.
- [PURPOSE] This function will synchronise all CPUs, flush and disable caches
- on all CPUs, then call a specified function. When the specified function
- finishes on all CPUs, caches are enabled on all CPUs.
- The function to execute.
- An arbitrary information pointer which is passed to <>.
- If TRUE <> is executed locally.
- [RETURNS] Nothing.
-*/
+static void set_mtrr_smp (unsigned int reg, unsigned long base,
+ unsigned long size, mtrr_type type)
{
- unsigned long timeout;
+ struct set_mtrr_data data;
struct set_mtrr_context ctxt;
- mtrr_hook = sync_handler;
- handler_func = handler;
- handler_info = info;
+ data.smp_reg = reg;
+ data.smp_base = base;
+ data.smp_size = size;
+ data.smp_type = type;
wait_barrier_execute = TRUE;
wait_barrier_cache_enable = TRUE;
- /* Send a message to all other CPUs and wait for them to enter the
- barrier */
atomic_set (&undone_count, smp_num_cpus - 1);
- smp_send_mtrr();
- /* Wait for it to be done */
- timeout = jiffies + JIFFIE_TIMEOUT;
- while ( (atomic_read (&undone_count) > 0) &&
- time_before(jiffies, timeout) )
- barrier ();
- if (atomic_read (&undone_count) > 0)
- {
+ /* Flush and disable the local CPU's cache and start the ball rolling on
+ other CPUs */
+ set_mtrr_prepare (&ctxt);
+ if (smp_call_function (ipi_handler, &data, 1, 0) != 0)
panic ("mtrr: timed out waiting for other CPUs\n");
- }
- mtrr_hook = NULL;
- /* All other CPUs should be waiting for the barrier, with their caches
- already flushed and disabled. Prepare for function completion
- notification */
+ /* Wait for all other CPUs to flush and disable their caches */
+ while (atomic_read (&undone_count) > 0) barrier ();
+ /* Set up for completion wait and then release other CPUs to change MTRRs*/
atomic_set (&undone_count, smp_num_cpus - 1);
- /* Flush and disable the local CPU's cache and release the barier, which
- should cause the other CPUs to execute the function. Also execute it
- locally if required */
- set_mtrr_prepare (&ctxt);
wait_barrier_execute = FALSE;
- if (local) (*handler) (&ctxt, info);
+ (*set_mtrr_up) (reg, base, size, type, FALSE);
/* Now wait for other CPUs to complete the function */
while (atomic_read (&undone_count) > 0) barrier ();
/* Now all CPUs should have finished the function. Release the barrier to
@@ -643,41 +897,10 @@
then enable the local cache and return */
wait_barrier_cache_enable = FALSE;
set_mtrr_done (&ctxt);
- handler_func = NULL;
- handler_info = NULL;
-} /* End Function do_all_cpus */
-
-
-struct set_mtrr_data
-{
- unsigned long smp_base;
- unsigned long smp_size;
- unsigned int smp_reg;
- mtrr_type smp_type;
-};
-
-static void set_mtrr_handler (struct set_mtrr_context *ctxt, void *info)
-{
- struct set_mtrr_data *data = info;
-
- set_mtrr_up (data->smp_reg, data->smp_base, data->smp_size, data->smp_type,
- FALSE);
-} /* End Function set_mtrr_handler */
-
-static void set_mtrr_smp (unsigned int reg, unsigned long base,
- unsigned long size, mtrr_type type)
-{
- struct set_mtrr_data data;
-
- data.smp_reg = reg;
- data.smp_base = base;
- data.smp_size = size;
- data.smp_type = type;
- do_all_cpus (set_mtrr_handler, &data, TRUE);
} /* End Function set_mtrr_smp */
-/* Some BIOS's are fucked and don't set all MTRRs the same! */
+/* Some BIOS's are fucked and don't set all MTRRs the same! */
__initfunc(static void mtrr_state_warn (unsigned long mask))
{
if (!mask) return;
@@ -720,6 +943,58 @@
#endif
} /* End Function init_table */
+static int generic_get_free_region (unsigned long base, unsigned long size)
+/* [SUMMARY] Get a free MTRR.
+ The starting (base) address of the region.
+ The size (in bytes) of the region.
+ [RETURNS] The index of the region on success, else -1 on error.
+*/
+{
+ int i, max;
+ mtrr_type ltype;
+ unsigned long lbase, lsize;
+
+ max = get_num_var_ranges ();
+ for (i = 0; i < max; ++i)
+ {
+ (*get_mtrr) (i, &lbase, &lsize, <ype);
+ if (lsize < 1) return i;
+ }
+ return -ENOSPC;
+} /* End Function generic_get_free_region */
+
+static int cyrix_get_free_region (unsigned long base, unsigned long size)
+/* [SUMMARY] Get a free ARR.
+ The starting (base) address of the region.
+ The size (in bytes) of the region.
+ [RETURNS] The index of the region on success, else -1 on error.
+*/
+{
+ int i;
+ mtrr_type ltype;
+ unsigned long lbase, lsize;
+
+ /* If we are to set up a region >32M then look at ARR7 immediately */
+ if (size > 0x2000000UL) {
+ cyrix_get_arr (7, &lbase, &lsize, <ype);
+ if (lsize < 1) return 7;
+ /* else try ARR0-ARR6 first */
+ } else {
+ for (i = 0; i < 7; i++)
+ {
+ cyrix_get_arr (i, &lbase, &lsize, <ype);
+ if (lsize < 1) return i;
+ }
+ /* ARR0-ARR6 isn't free, try ARR7 but its size must be at least 256K */
+ cyrix_get_arr (i, &lbase, &lsize, <ype);
+ if ((lsize < 1) && (size >= 0x40000)) return i;
+ }
+ return -ENOSPC;
+} /* End Function cyrix_get_free_region */
+
+static int (*get_free_region) (unsigned long base,
+ unsigned long size) = generic_get_free_region;
+
int mtrr_add (unsigned long base, unsigned long size, unsigned int type,
char increment)
/* [SUMMARY] Add an MTRR entry.
@@ -738,28 +1013,57 @@
unsigned long lbase, lsize, last;
if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return -ENODEV;
- if ( (base & 0xfff) || (size & 0xfff) )
- {
- printk ("mtrr: size and base must be multiples of 4kB\n");
- printk ("mtrr: size: %lx base: %lx\n", size, base);
- return -EINVAL;
- }
- if (base + size < 0x100000)
- {
- printk ("mtrr: cannot set region below 1 MByte (0x%lx,0x%lx)\n",
- base, size);
- return -EINVAL;
- }
- /* Check upper bits of base and last are equal and lower bits are 0 for
- base and 1 for last */
- last = base + size - 1;
- for (lbase = base; !(lbase & 1) && (last & 1);
- lbase = lbase >> 1, last = last >> 1);
- if (lbase != last)
+ switch (boot_cpu_data.x86_vendor)
{
- printk ("mtrr: base(0x%lx) is not aligned on a size(0x%lx) boundary\n",
- base, size);
+ case X86_VENDOR_INTEL:
+ /* For Intel PPro stepping <= 7, must be 4 MiB aligned */
+ if ( (boot_cpu_data.x86 == 6) && (boot_cpu_data.x86_model == 1) &&
+ (boot_cpu_data.x86_mask <= 7) && ( base & ( (1 << 22) - 1 ) ) )
+ {
+ printk ("mtrr: base(0x%lx) is not 4 MiB aligned\n", base);
+ return -EINVAL;
+ }
+ /* Fall through */
+ case X86_VENDOR_CYRIX:
+ if ( (base & 0xfff) || (size & 0xfff) )
+ {
+ printk ("mtrr: size and base must be multiples of 4 kiB\n");
+ printk ("mtrr: size: %lx base: %lx\n", size, base);
+ return -EINVAL;
+ }
+ if (base + size < 0x100000)
+ {
+ printk ("mtrr: cannot set region below 1 MiB (0x%lx,0x%lx)\n",
+ base, size);
+ return -EINVAL;
+ }
+ /* Check upper bits of base and last are equal and lower bits are 0
+ for base and 1 for last */
+ last = base + size - 1;
+ for (lbase = base; !(lbase & 1) && (last & 1);
+ lbase = lbase >> 1, last = last >> 1);
+ if (lbase != last)
+ {
+ printk ("mtrr: base(0x%lx) is not aligned on a size(0x%lx) boundary\n",
+ base, size);
+ return -EINVAL;
+ }
+ break;
+ case X86_VENDOR_AMD:
+ /* Apply the K6 block alignment and size rules
+ In order
+ o Uncached or gathering only
+ o 128K or bigger block
+ o Power of 2 block
+ o base suitably aligned to the power
+ */
+ if (type > MTRR_TYPE_WRCOMB || size < (1 << 17) ||
+ (size & ~(size-1))-size || (base & (size-1)))
+ return -EINVAL;
+ break;
+ default:
return -EINVAL;
+ /*break;*/
}
if (type >= MTRR_NUM_TYPES)
{
@@ -775,10 +1079,10 @@
increment = increment ? 1 : 0;
max = get_num_var_ranges ();
/* Search for existing MTRR */
- spin_lock (&main_lock);
+ spin_lock_reschedule (&main_lock);
for (i = 0; i < max; ++i)
{
- get_mtrr (i, &lbase, &lsize, <ype);
+ (*get_mtrr) (i, &lbase, &lsize, <ype);
if (base >= lbase + lsize) continue;
if ( (base < lbase) && (base + size <= lbase) ) continue;
/* At this point we know there is some kind of overlap/enclosure */
@@ -804,19 +1108,18 @@
return i;
}
/* Search for an empty MTRR */
- for (i = 0; i < max; ++i)
+ i = (*get_free_region) (base, size);
+ if (i < 0)
{
- get_mtrr (i, &lbase, &lsize, <ype);
- if (lsize > 0) continue;
- set_mtrr (i, base, size, type);
- usage_table[i] = 1;
- compute_ascii ();
spin_unlock (&main_lock);
+ printk ("mtrr: no more MTRRs available\n");
return i;
}
+ set_mtrr (i, base, size, type);
+ usage_table[i] = 1;
+ compute_ascii ();
spin_unlock (&main_lock);
- printk ("mtrr: no more MTRRs available\n");
- return -ENOSPC;
+ return i;
} /* End Function mtrr_add */
int mtrr_del (int reg, unsigned long base, unsigned long size)
@@ -836,13 +1139,13 @@
if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return -ENODEV;
max = get_num_var_ranges ();
- spin_lock (&main_lock);
+ spin_lock_reschedule (&main_lock);
if (reg < 0)
{
/* Search for existing MTRR */
for (i = 0; i < max; ++i)
{
- get_mtrr (i, &lbase, &lsize, <ype);
+ (*get_mtrr) (i, &lbase, &lsize, <ype);
if ( (lbase == base) && (lsize == size) )
{
reg = i;
@@ -862,7 +1165,7 @@
printk ("mtrr: register: %d too big\n", reg);
return -EINVAL;
}
- get_mtrr (reg, &lbase, &lsize, <ype);
+ (*get_mtrr) (reg, &lbase, &lsize, <ype);
if (lsize < 1)
{
spin_unlock (&main_lock);
@@ -913,7 +1216,9 @@
reg = mtrr_del (-1, base, size);
if (reg < 0) return reg;
- if (fcount != NULL) --fcount[reg];
+ if (fcount == NULL) return reg;
+ if (fcount[reg] < 1) return -EINVAL;
+ --fcount[reg];
return reg;
} /* End Function mtrr_file_del */
@@ -1019,11 +1324,18 @@
err = mtrr_file_del (sentry.base, sentry.size, file);
if (err < 0) return err;
break;
+ case MTRRIOC_KILL_ENTRY:
+ if ( !suser () ) return -EPERM;
+ if ( copy_from_user (&sentry, (void *) arg, sizeof sentry) )
+ return -EFAULT;
+ err = mtrr_del (-1, sentry.base, sentry.size);
+ if (err < 0) return err;
+ break;
case MTRRIOC_GET_ENTRY:
if ( copy_from_user (&gentry, (void *) arg, sizeof gentry) )
return -EFAULT;
if ( gentry.regnum >= get_num_var_ranges () ) return -EINVAL;
- get_mtrr (gentry.regnum, &gentry.base, &gentry.size, &type);
+ (*get_mtrr) (gentry.regnum, &gentry.base, &gentry.size, &type);
gentry.type = type;
if ( copy_to_user ( (void *) arg, &gentry, sizeof gentry) )
return -EFAULT;
@@ -1115,7 +1427,7 @@
max = get_num_var_ranges ();
for (i = 0; i < max; i++)
{
- get_mtrr (i, &base, &size, &type);
+ (*get_mtrr) (i, &base, &size, &type);
if (size < 1) usage_table[i] = 0;
else
{
@@ -1148,23 +1460,165 @@
#ifdef __SMP__
+typedef struct {
+ unsigned long base;
+ unsigned long size;
+ mtrr_type type;
+} arr_state_t;
+
+arr_state_t arr_state[8] __initdata = {
+ {0UL,0UL,0UL}, {0UL,0UL,0UL}, {0UL,0UL,0UL}, {0UL,0UL,0UL},
+ {0UL,0UL,0UL}, {0UL,0UL,0UL}, {0UL,0UL,0UL}, {0UL,0UL,0UL}
+};
+
+unsigned char ccr_state[7] __initdata = { 0, 0, 0, 0, 0, 0, 0 };
+
+__initfunc(static void cyrix_arr_init_secondary(void))
+{
+ struct set_mtrr_context ctxt;
+ int i;
+
+ set_mtrr_prepare (&ctxt); /* flush cache and enable MAPEN */
+
+ /* the CCRs are not contiguous */
+ for(i=0; i<4; i++) setCx86(CX86_CCR0 + i, ccr_state[i]);
+ for( ; i<7; i++) setCx86(CX86_CCR4 + i, ccr_state[i]);
+ for(i=0; i<8; i++)
+ cyrix_set_arr_up(i,
+ arr_state[i].base, arr_state[i].size, arr_state[i].type, FALSE);
+
+ set_mtrr_done (&ctxt); /* flush cache and disable MAPEN */
+} /* End Function cyrix_arr_init_secondary */
+
+#endif
+
+/*
+ * On Cyrix 6x86(MX) and M II the ARR3 is special: it has connection
+ * with the SMM (System Management Mode) mode. So we need the following:
+ * Check whether SMI_LOCK (CCR3 bit 0) is set
+ * if it is set, write a warning message: ARR3 cannot be changed!
+ * (it cannot be changed until the next processor reset)
+ * if it is reset, then we can change it, set all the needed bits:
+ * - disable access to SMM memory through ARR3 range (CCR1 bit 7 reset)
+ * - disable access to SMM memory (CCR1 bit 2 reset)
+ * - disable SMM mode (CCR1 bit 1 reset)
+ * - disable write protection of ARR3 (CCR6 bit 1 reset)
+ * - (maybe) disable ARR3
+ * Just to be sure, we enable ARR usage by the processor (CCR5 bit 5 set)
+ */
+__initfunc(static void cyrix_arr_init(void))
+{
+ struct set_mtrr_context ctxt;
+ unsigned char ccr[7];
+ int ccrc[7] = { 0, 0, 0, 0, 0, 0, 0 };
+#ifdef __SMP__
+ int i;
+#endif
+
+ set_mtrr_prepare (&ctxt); /* flush cache and enable MAPEN */
+
+ /* Save all CCRs locally */
+ ccr[0] = getCx86 (CX86_CCR0);
+ ccr[1] = getCx86 (CX86_CCR1);
+ ccr[2] = getCx86 (CX86_CCR2);
+ ccr[3] = ctxt.ccr3;
+ ccr[4] = getCx86 (CX86_CCR4);
+ ccr[5] = getCx86 (CX86_CCR5);
+ ccr[6] = getCx86 (CX86_CCR6);
+
+ if (ccr[3] & 1)
+ ccrc[3] = 1;
+ else {
+ /* Disable SMM mode (bit 1), access to SMM memory (bit 2) and
+ * access to SMM memory through ARR3 (bit 7).
+ */
+/*
+ if (ccr[1] & 0x80) { ccr[1] &= 0x7f; ccrc[1] |= 0x80; }
+ if (ccr[1] & 0x04) { ccr[1] &= 0xfb; ccrc[1] |= 0x04; }
+ if (ccr[1] & 0x02) { ccr[1] &= 0xfd; ccrc[1] |= 0x02; }
+*/
+ if (ccr[6] & 0x02) {
+ ccr[6] &= 0xfd; ccrc[6] = 1; /* Disable write protection of ARR3. */
+ setCx86 (CX86_CCR6, ccr[6]);
+ }
+ /* Disable ARR3. */
+ /* cyrix_set_arr_up (3, 0, 0, 0, FALSE); */
+ }
+ /* If we changed CCR1 in memory, change it in the processor, too. */
+ if (ccrc[1]) setCx86 (CX86_CCR1, ccr[1]);
+
+ /* Enable ARR usage by the processor */
+ if (!(ccr[5] & 0x20)) {
+ ccr[5] |= 0x20; ccrc[5] = 1;
+ setCx86 (CX86_CCR5, ccr[5]);
+ }
+
+#ifdef __SMP__
+ for(i=0; i<7; i++) ccr_state[i] = ccr[i];
+ for(i=0; i<8; i++)
+ cyrix_get_arr(i,
+ &arr_state[i].base, &arr_state[i].size, &arr_state[i].type);
+#endif
+
+ set_mtrr_done (&ctxt); /* flush cache and disable MAPEN */
+
+ if ( ccrc[5] ) printk ("mtrr: ARR usage was not enabled, enabled manually\n");
+ if ( ccrc[3] ) printk ("mtrr: ARR3 cannot be changed\n");
+/*
+ if ( ccrc[1] & 0x80) printk ("mtrr: SMM memory access through ARR3 disabled\n");
+ if ( ccrc[1] & 0x04) printk ("mtrr: SMM memory access disabled\n");
+ if ( ccrc[1] & 0x02) printk ("mtrr: SMM mode disabled\n");
+*/
+ if ( ccrc[6] ) printk ("mtrr: ARR3 was write protected, unprotected\n");
+} /* End Function cyrix_arr_init */
+
+__initfunc(static void mtrr_setup (void))
+{
+ printk ("mtrr: v%s Richard Gooch (rgooch@atnf.csiro.au)\n", MTRR_VERSION);
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_INTEL:
+ get_mtrr = intel_get_mtrr;
+ set_mtrr_up = intel_set_mtrr_up;
+ break;
+ case X86_VENDOR_CYRIX:
+ printk ("mtrr: Using Cyrix style ARRs\n");
+ get_mtrr = cyrix_get_arr;
+ set_mtrr_up = cyrix_set_arr_up;
+ get_free_region = cyrix_get_free_region;
+ break;
+ case X86_VENDOR_AMD:
+ get_mtrr = amd_get_mtrr;
+ set_mtrr_up = amd_set_mtrr_up;
+ break;
+ }
+} /* End Function mtrr_setup */
+
+#ifdef __SMP__
+
static volatile unsigned long smp_changes_mask __initdata = 0;
static struct mtrr_state smp_mtrr_state __initdata = {0, 0};
__initfunc(void mtrr_init_boot_cpu (void))
{
if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return;
- printk("mtrr: v%s Richard Gooch (rgooch@atnf.csiro.au)\n", MTRR_VERSION);
-
- get_mtrr_state (&smp_mtrr_state);
+ mtrr_setup ();
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_INTEL:
+ get_mtrr_state (&smp_mtrr_state);
+ break;
+ case X86_VENDOR_CYRIX:
+ cyrix_arr_init ();
+ break;
+ }
} /* End Function mtrr_init_boot_cpu */
-__initfunc(void mtrr_init_secondary_cpu (void))
+__initfunc(static void intel_mtrr_init_secondary_cpu (void))
{
unsigned long mask, count;
struct set_mtrr_context ctxt;
- if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return;
/* Note that this is not ideal, since the cache is only flushed/disabled
for this CPU while the MTRRs are changed, but changing this requires
more invasive changes to the way the kernel boots */
@@ -1177,21 +1631,52 @@
if (mask & 0x01) set_bit (count, &smp_changes_mask);
mask >>= 1;
}
-} /* End Function mtrr_init_secondary_cpu */
+} /* End Function intel_mtrr_init_secondary_cpu */
+__initfunc(void mtrr_init_secondary_cpu (void))
+{
+ if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return;
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_INTEL:
+ intel_mtrr_init_secondary_cpu ();
+ break;
+ case X86_VENDOR_CYRIX:
+ /* This is _completely theoretical_!
+ * I assume here that one day Cyrix will support Intel APIC.
+ * In reality on non-Intel CPUs we won't even get to this routine.
+ * Hopefully no one will plug two Cyrix processors in a dual P5 board.
+ * :-)
+ */
+ cyrix_arr_init_secondary ();
+ break;
+ default:
+ printk ("mtrr: SMP support incomplete for this vendor\n");
+ break;
+ }
+} /* End Function mtrr_init_secondary_cpu */
#endif /* __SMP__ */
__initfunc(int mtrr_init(void))
{
if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return 0;
-# ifndef __SMP__
- printk("mtrr: v%s Richard Gooch (rgooch@atnf.csiro.au)\n", MTRR_VERSION);
-# endif
-
# ifdef __SMP__
- finalize_mtrr_state (&smp_mtrr_state);
- mtrr_state_warn (smp_changes_mask);
-# endif /* __SMP__ */
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_INTEL:
+ finalize_mtrr_state (&smp_mtrr_state);
+ mtrr_state_warn (smp_changes_mask);
+ break;
+ }
+# else /* __SMP__ */
+ mtrr_setup ();
+ switch (boot_cpu_data.x86_vendor)
+ {
+ case X86_VENDOR_CYRIX:
+ cyrix_arr_init ();
+ break;
+ }
+# endif /* !__SMP__ */
# ifdef CONFIG_PROC_FS
proc_register (&proc_root, &proc_root_mtrr);
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
--- v2.2.7/linux/arch/i386/kernel/process.c Tue Mar 23 14:35:46 1999
+++ linux/arch/i386/kernel/process.c Fri Apr 30 08:13:37 1999
@@ -111,6 +111,8 @@
/* endless idle loop with no priority at all */
current->priority = 0;
current->counter = -100;
+ init_idle();
+
for (;;) {
if (work)
start_idle = jiffies;
@@ -139,6 +141,8 @@
/* endless idle loop with no priority at all */
current->priority = 0;
current->counter = -100;
+ init_idle();
+
while(1) {
if (current_cpu_data.hlt_works_ok && !hlt_counter &&
!current->need_resched)
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- v2.2.7/linux/arch/i386/kernel/setup.c Tue Mar 23 14:35:46 1999
+++ linux/arch/i386/kernel/setup.c Mon May 10 10:32:45 1999
@@ -5,6 +5,10 @@
*
* Enhanced CPU type detection by Mike Jagdis, Patrick St. Jean
* and Martin Mares, November 1997.
+ *
+ * Force Cyrix 6x86(MX) and M II processors to report MTRR capability
+ * and fix against Cyrix "coma bug" by
+ * Zoltan Boszormenyi February 1999.
*/
/*
@@ -39,6 +43,7 @@
#include
#include
#include
+#include
/*
* Machine setup..
@@ -57,6 +62,7 @@
unsigned int machine_id = 0;
unsigned int machine_submodel_id = 0;
unsigned int BIOS_revision = 0;
+unsigned int mca_pentium_flag = 0;
/*
* Setup options
@@ -244,11 +250,6 @@
unsigned long memory_start, memory_end;
char c = ' ', *to = command_line, *from = COMMAND_LINE;
int len = 0;
- static unsigned char smptrap=0;
-
- if (smptrap)
- return;
- smptrap=1;
#ifdef CONFIG_VISWS
visws_get_board_type_and_rev();
@@ -381,16 +382,6 @@
}
-#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))
-
__initfunc(static int get_model_name(struct cpuinfo_x86 *c))
{
unsigned int n, dummy, *v;
@@ -408,6 +399,14 @@
cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
c->x86_model_id[48] = 0;
+ /* Set MTRR capability flag if appropriate */
+ if(boot_cpu_data.x86 !=5)
+ return 1;
+ if((boot_cpu_data.x86_model == 9) ||
+ ((boot_cpu_data.x86_model == 8) &&
+ (boot_cpu_data.x86_mask >= 8)))
+ c->x86_capability |= X86_FEATURE_MTRR;
+
return 1;
}
@@ -587,6 +586,10 @@
(c->x86_model)++;
} else /* 686 */
p = Cx86_cb+1;
+ /* Emulate MTRRs using Cyrix's ARRs. */
+ c->x86_capability |= X86_FEATURE_MTRR;
+ /* 6x86's contain this bug */
+ c->coma_bug = 1;
break;
case 4: /* MediaGX/GXm */
@@ -611,11 +614,14 @@
case 5: /* 6x86MX/M II */
if (dir1 > 7) dir0_msn++; /* M II */
+ else c->coma_bug = 1; /* 6x86MX, it has the bug. */
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))
(c->x86_model)++;
+ /* Emulate MTRRs using Cyrix's ARRs. */
+ c->x86_capability |= X86_FEATURE_MTRR;
break;
case 0xf: /* Cyrix 486 without DEVID registers */
@@ -869,7 +875,7 @@
int sep_bug;
static char *x86_cap_flags[] = {
"fpu", "vme", "de", "pse", "tsc", "msr", "6", "mce",
- "cx8", "9", "10", "sep", "12", "pge", "14", "cmov",
+ "cx8", "9", "10", "sep", "mtrr", "pge", "14", "cmov",
"16", "17", "psn", "19", "20", "21", "22", "mmx",
"24", "kni", "26", "27", "28", "29", "30", "31"
};
@@ -917,7 +923,6 @@
} 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";
@@ -936,6 +941,7 @@
"hlt_bug\t\t: %s\n"
"sep_bug\t\t: %s\n"
"f00f_bug\t: %s\n"
+ "coma_bug\t: %s\n"
"fpu\t\t: %s\n"
"fpu_exception\t: %s\n"
"cpuid level\t: %d\n"
@@ -945,6 +951,7 @@
c->hlt_works_ok ? "no" : "yes",
sep_bug ? "yes" : "no",
c->f00f_bug ? "yes" : "no",
+ c->coma_bug ? "yes" : "no",
c->hard_math ? "yes" : "no",
(c->hard_math && ignore_irq13) ? "yes" : "no",
c->cpuid_level,
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- v2.2.7/linux/arch/i386/kernel/smp.c Wed Apr 28 11:37:29 1999
+++ linux/arch/i386/kernel/smp.c Mon May 10 10:32:45 1999
@@ -40,10 +40,12 @@
#include
#include
#include
+#include
#include "irq.h"
-extern unsigned long start_kernel;
+#define JIFFIE_TIMEOUT 100
+
extern void update_one_process( struct task_struct *p,
unsigned long ticks, unsigned long user,
unsigned long system, int cpu);
@@ -147,16 +149,7 @@
*/
#define APIC_DEFAULT_PHYS_BASE 0xfee00000
-/*
- * Reads and clears the Pentium Timestamp-Counter
- */
-#define READ_TSC(x) __asm__ __volatile__ ( "rdtsc" \
- :"=a" (((unsigned long*)&(x))[0]), \
- "=d" (((unsigned long*)&(x))[1]))
-
-#define CLEAR_TSC \
- __asm__ __volatile__ ("\t.byte 0x0f, 0x30;\n"::\
- "a"(0x00001000), "d"(0x00001000), "c"(0x10):"memory")
+#define CLEAR_TSC wrmsr(0x10, 0x00001000, 0x00001000)
/*
* Setup routine for controlling SMP activation
@@ -899,6 +892,7 @@
* Everything has been set up for the secondary
* CPUs - they just need to reload everything
* from the task structure
+ * This function must not return.
*/
void __init initialize_secondary(void)
{
@@ -940,7 +934,6 @@
/*
* We need an idle process for each processor.
*/
-
kernel_thread(start_secondary, NULL, CLONE_PID);
cpucount++;
@@ -951,6 +944,8 @@
idle->processor = i;
__cpu_logical_map[cpucount] = i;
cpu_number_map[i] = cpucount;
+ idle->has_cpu = 1; /* we schedule the first task manually */
+ idle->tss.eip = (unsigned long) start_secondary;
/* start_eip had better be page-aligned! */
start_eip = setup_trampoline();
@@ -1183,6 +1178,7 @@
/* Must be done before other processors booted */
mtrr_init_boot_cpu ();
#endif
+ init_idle();
/*
* Initialize the logical to physical CPU number mapping
* and the per-CPU profiling counter/multiplier
@@ -1657,15 +1653,84 @@
send_IPI_allbutself(STOP_CPU_VECTOR);
}
-/*
- * this function sends an 'reload MTRR state' IPI to all other CPUs
- * in the system. it goes straight through, completion processing
- * is done on the mttr.c level.
+/* Structure and data for smp_call_function(). This is designed to minimise
+ * static memory requirements. It also looks cleaner.
*/
-
-void smp_send_mtrr(void)
+struct smp_call_function_struct {
+ void (*func) (void *info);
+ void *info;
+ atomic_t unstarted_count;
+ atomic_t unfinished_count;
+ int wait;
+};
+static volatile struct smp_call_function_struct *smp_call_function_data = NULL;
+
+/*
+ * this function sends a 'generic call function' IPI to all other CPUs
+ * in the system.
+ */
+
+int smp_call_function (void (*func) (void *info), void *info, int retry,
+ int wait)
+/* [SUMMARY] Run a function on all other CPUs.
+ The function to run. This must be fast and non-blocking.
+