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 Thu May 6 14:02:34 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)
@@ -8893,6 +9005,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 +9119,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 +9189,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 +9709,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 +10671,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 +10854,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 +10956,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 +10975,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 +11135,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 +11165,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 +11202,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 +11609,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 +11618,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/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 Thu Apr 29 11:53:41 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.
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/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 Thu Apr 29 11:53:41 1999
@@ -105,7 +105,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
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/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/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 Sat May 8 11:14:01 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;
}
@@ -1407,8 +1409,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 +1421,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/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/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 Thu May 6 15:13:05 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);
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 Thu May 6 16:22:36 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);
@@ -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++;
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 Sat May 8 20:52:26 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
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 Thu Apr 29 11:53:41 1999
@@ -132,6 +132,11 @@
Fixed harmless compiler warning in include/asm-i386/mtrr.h
Fixed version numbering and history for v1.23 -> v1.24.
v1.26
+
+ v1.26ac Alan Cox
+ Added some K6-II/III support. This needs back merging with
+ Richard's current code before it goes to Linus really.
+
*/
#include
#include
@@ -163,6 +168,7 @@
#include
#include
#include
+#include
#include
#include "irq.h"
@@ -197,7 +203,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;
@@ -225,6 +231,7 @@
#ifdef CONFIG_PROC_FS
static void compute_ascii (void);
#endif
+static int k6_has_ranges(void);
struct set_mtrr_context
@@ -236,28 +243,13 @@
};
/*
- * 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
+ * No point continually digging through complex CPU conditionals..
*/
-#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))
+
+static int mtrr_flags;
+#define MTRR_PRESENT 1
+#define MTRR_WRCOMB 2
/* Put the processor into a state where MTRRs can be safely set. */
static void set_mtrr_prepare(struct set_mtrr_context *ctxt)
@@ -267,13 +259,15 @@
/* disable interrupts locally */
__save_flags (ctxt->flags); __cli ();
+ if(boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+ return;
+
/* 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");
-
/* disable and flush caches. Note that wbinvd flushes the TLBs as
a side-effect. */
asm volatile ("movl %%cr0, %0\n\t"
@@ -294,6 +288,9 @@
{
unsigned long tmp;
+ if(boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+ return;
+
/* flush caches and TLBs */
asm volatile ("wbinvd" : : : "memory" );
@@ -319,6 +316,9 @@
static unsigned int get_num_var_ranges (void)
{
unsigned long config, dummy;
+
+ if(boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+ return 2;
rdmsr(MTRRcap_MSR, config, dummy);
return (config & 0xff);
@@ -340,6 +340,46 @@
{
unsigned long dummy, mask_lo, base_lo;
+ if(boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+ {
+ 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;
+ }
rdmsr(MTRRphysMask_MSR(reg), mask_lo, dummy);
if ((mask_lo & 0x800) == 0) {
/* Invalid (i.e. free) range. */
@@ -381,16 +421,56 @@
struct set_mtrr_context ctxt;
if (do_safe) set_mtrr_prepare (&ctxt);
- if (size == 0)
+
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
{
- /* The invalid bit is kept in the mask, so we simply clear the
- relevant mask register to disable a range. */
- wrmsr (MTRRphysMask_MSR (reg), 0, 0);
+ if (size == 0)
+ {
+ /* The invalid bit is kept in the mask, so we simply clear the
+ relevant mask register to disable a range. */
+ wrmsr (MTRRphysMask_MSR (reg), 0, 0);
+ }
+ else
+ {
+ wrmsr (MTRRphysBase_MSR (reg), base | type, 0);
+ wrmsr (MTRRphysMask_MSR (reg), ~(size - 1) | 0x800, 0);
+ }
}
- else
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
{
- wrmsr (MTRRphysBase_MSR (reg), base | type, 0);
- wrmsr (MTRRphysMask_MSR (reg), ~(size - 1) | 0x800, 0);
+ u32 low, high;
+ unsigned long flags;
+ /*
+ * 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
+ */
+
+ save_flags(flags);
+ __cli();
+ __asm__ __volatile__("wbinvd" : : : "memory");
+ wrmsr(0xC0000085, low, high);
+ restore_flags(flags);
}
if (do_safe) set_mtrr_done (&ctxt);
} /* End Function set_mtrr_up */
@@ -518,11 +598,17 @@
for (i = 0; i < nvrs; i++)
get_mtrr_var_range(i, &vrs[i]);
- get_fixed_ranges(state->fixed_ranges);
+ if(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
+ {
+ get_fixed_ranges(state->fixed_ranges);
- rdmsr(MTRRdefType_MSR, lo, dummy);
- state->def_type = (lo & 0xff);
- state->enabled = (lo & 0xc00) >> 10;
+ rdmsr(MTRRdefType_MSR, lo, dummy);
+ state->def_type = (lo & 0xff);
+ state->enabled = (lo & 0xc00) >> 10;
+ return;
+ }
+ state->def_type = 0;
+ state->enabled = 1;
} /* End Function get_mtrr_state */
@@ -545,6 +631,9 @@
unsigned int i;
unsigned long change_mask = 0;
+ if(boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+ return 0UL;
+
for (i = 0; i < state->num_var_ranges; i++)
if (set_mtrr_var_range_testing(i, &state->var_ranges[i]))
change_mask |= MTRR_CHANGE_MASK_VARIABLE;
@@ -737,40 +826,58 @@
mtrr_type ltype;
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 (!(mtrr_flags&MTRR_PRESENT))
+ return -ENODEV;
+
+ if (boot_cpu_data.x86_vendor == 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 > 1 || size < (1<<17) || (size & ~(size-1))-size || (base&(size-1)))
+ return -EINVAL;
}
- if (base + size < 0x100000)
+
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
{
- 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)
- {
- printk ("mtrr: base(0x%lx) is not aligned on a size(0x%lx) boundary\n",
- base, size);
- return -EINVAL;
- }
- if (type >= MTRR_NUM_TYPES)
- {
- printk ("mtrr: type: %u illegal\n", type);
- return -EINVAL;
- }
- /* If the type is WC, check that this processor supports it */
- if ( (type == MTRR_TYPE_WRCOMB) && !have_wrcomb () )
- {
- printk ("mtrr: your processor doesn't support write-combining\n");
- return -ENOSYS;
+ 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)
+ {
+ printk ("mtrr: base(0x%lx) is not aligned on a size(0x%lx) boundary\n",
+ base, size);
+ return -EINVAL;
+ }
+ if (type >= MTRR_NUM_TYPES)
+ {
+ printk ("mtrr: type: %u illegal\n", type);
+ return -EINVAL;
+ }
+ /* If the type is WC, check that this processor supports it */
+ if ( (type == MTRR_TYPE_WRCOMB) && !have_wrcomb () )
+ {
+ printk ("mtrr: your processor doesn't support write-combining\n");
+ return -EINVAL;
+ }
}
increment = increment ? 1 : 0;
max = get_num_var_ranges ();
@@ -834,7 +941,7 @@
mtrr_type ltype;
unsigned long lbase, lsize;
- if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return -ENODEV;
+ if ( !(mtrr_flags&MTRR_PRESENT) ) return -ENODEV;
max = get_num_var_ranges ();
spin_lock (&main_lock);
if (reg < 0)
@@ -1153,10 +1260,15 @@
__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);
+ if (boot_cpu_data.x86_capability & X86_FEATURE_MTRR)
+ {
+ get_mtrr_state (&smp_mtrr_state);
+ }
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && k6_has_ranges())
+ {
+ get_mtrr_state (&smp_mtrr_state);
+ }
} /* End Function mtrr_init_boot_cpu */
__initfunc(void mtrr_init_secondary_cpu (void))
@@ -1181,9 +1293,35 @@
#endif /* __SMP__ */
+/*
+ * The extended memory handling is available on the K6-III and the
+ * K6-II stepping 8 and higher only.
+ */
+
+static int k6_has_ranges(void)
+{
+ if(boot_cpu_data.x86 !=5)
+ return 0;
+ if(boot_cpu_data.x86_model == 9 ||
+ (boot_cpu_data.x86_model == 8 &&
+ boot_cpu_data.x86_mask >= 8))
+ return 1;
+ return 0;
+}
+
__initfunc(int mtrr_init(void))
{
- if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return 0;
+ if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD && k6_has_ranges())
+ {
+# ifdef CONFIG_PROC_FS
+ proc_register (&proc_root, &proc_root_mtrr);
+# endif
+ mtrr_flags|=MTRR_PRESENT|MTRR_WRCOMB;
+ init_table();
+ return 0;
+ }
+ 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
@@ -1197,6 +1335,7 @@
proc_register (&proc_root, &proc_root_mtrr);
# endif
+ mtrr_flags|=MTRR_PRESENT;
init_table ();
return 0;
} /* End Function mtrr_init */
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 Thu Apr 29 11:53:41 1999
@@ -39,6 +39,7 @@
#include
#include
#include
+#include
/*
* Machine setup..
@@ -57,6 +58,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 +246,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();
@@ -380,16 +377,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))
{
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 Fri Apr 30 08:13:37 1999
@@ -40,10 +40,10 @@
#include
#include
#include
+#include
#include "irq.h"
-extern unsigned long start_kernel;
extern void update_one_process( struct task_struct *p,
unsigned long ticks, unsigned long user,
unsigned long system, int cpu);
@@ -147,16 +147,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 +890,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 +932,6 @@
/*
* We need an idle process for each processor.
*/
-
kernel_thread(start_secondary, NULL, CLONE_PID);
cpucount++;
@@ -951,6 +942,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 +1176,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
@@ -1781,6 +1775,7 @@
local_flush_tlb();
ack_APIC_irq();
+
}
static void stop_this_cpu (void)
@@ -1949,7 +1944,7 @@
/*
* We wrapped around just now. Let's start:
*/
- READ_TSC(t1);
+ rdtscll(t1);
tt1=apic_read(APIC_TMCCT);
#define LOOPS (HZ/10)
@@ -1960,7 +1955,7 @@
wait_8254_wraparound ();
tt2=apic_read(APIC_TMCCT);
- READ_TSC(t2);
+ rdtscll(t2);
/*
* The APIC bus clock counter is 32 bits only, it
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/time.c linux/arch/i386/kernel/time.c
--- v2.2.7/linux/arch/i386/kernel/time.c Tue Mar 23 14:35:46 1999
+++ linux/arch/i386/kernel/time.c Thu Apr 29 11:53:41 1999
@@ -47,6 +47,7 @@
#include
#include
#include
+#include
#include
#include
@@ -83,8 +84,8 @@
register unsigned long edx asm("dx");
/* Read the Time Stamp Counter */
- __asm__("rdtsc"
- :"=a" (eax), "=d" (edx));
+
+ rdtsc(eax,edx);
/* .. relative to previous jiffy (32 bits is enough) */
eax -= last_tsc_low; /* tsc_low delta */
@@ -443,7 +444,8 @@
*/
/* read Pentium cycle counter */
- __asm__("rdtsc" : "=a" (last_tsc_low) : : "edx");
+
+ rdtscl(last_tsc_low);
outb_p(0x00, 0x43); /* latch the count ASAP */
@@ -566,12 +568,12 @@
unsigned long endlow, endhigh;
unsigned long count;
- __asm__ __volatile__("rdtsc":"=a" (startlow),"=d" (starthigh));
+ rdtsc(startlow,starthigh);
count = 0;
do {
count++;
} while ((inb(0x61) & 0x20) == 0);
- __asm__ __volatile__("rdtsc":"=a" (endlow),"=d" (endhigh));
+ rdtsc(endlow,endhigh);
last_tsc_low = endlow;
diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/visws_apic.c linux/arch/i386/kernel/visws_apic.c
--- v2.2.7/linux/arch/i386/kernel/visws_apic.c Wed Jan 20 23:14:04 1999
+++ linux/arch/i386/kernel/visws_apic.c Thu May 6 16:12:23 1999
@@ -201,11 +201,13 @@
{
unsigned int status;
/* XXX APIC EOI? */
- status = desc->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);
diff -u --recursive --new-file v2.2.7/linux/arch/mips/kernel/irixioctl.c linux/arch/mips/kernel/irixioctl.c
--- v2.2.7/linux/arch/mips/kernel/irixioctl.c Fri Oct 23 22:01:19 1998
+++ linux/arch/mips/kernel/irixioctl.c Sat May 8 11:14:01 1999
@@ -33,13 +33,15 @@
{
struct file *filp;
- if(fd >= NR_OPEN || !(filp = current->files->fd[fd]))
+ file = fcheck(fd);
+ if(!file)
return ((struct tty_struct *) 0);
if(filp->private_data) {
struct tty_struct *ttyp = (struct tty_struct *) filp->private_data;
- if(ttyp->magic == TTY_MAGIC)
+ if(ttyp->magic == TTY_MAGIC) {
return ttyp;
+ }
}
return ((struct tty_struct *) 0);
}
diff -u --recursive --new-file v2.2.7/linux/arch/mips/kernel/sysirix.c linux/arch/mips/kernel/sysirix.c
--- v2.2.7/linux/arch/mips/kernel/sysirix.c Tue Mar 23 14:35:46 1999
+++ linux/arch/mips/kernel/sysirix.c Sat May 8 11:14:01 1999
@@ -23,6 +23,7 @@
#include
#include
#include
+#include
#include
#include
@@ -734,6 +735,7 @@
int error, i;
/* We don't support this feature yet. */
+ lock_kernel();
if(fs_type) {
error = -EINVAL;
goto out;
@@ -776,7 +778,6 @@
asmlinkage int irix_fstatfs(unsigned int fd, struct irix_statfs *buf)
{
- struct dentry *dentry;
struct inode *inode;
struct statfs kbuf;
mm_segment_t old_fs;
@@ -787,25 +788,22 @@
error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statfs));
if (error)
goto out;
- if (fd >= NR_OPEN || !(file = current->files->fd[fd])) {
+ if (!(file = fget(fd))) {
error = -EBADF;
goto out;
}
- if (!(dentry = file->f_dentry)) {
+
+ if (!(inode = file->f_dentry->d_inode)) {
error = -ENOENT;
- goto out;
- }
- if (!(inode = dentry->d_inode)) {
- error = -ENOENT;
- goto out;
+ goto out_f;
}
if (!inode->i_sb) {
error = -ENODEV;
- goto out;
+ goto out_f;
}
if (!inode->i_sb->s_op->statfs) {
error = -ENOSYS;
- goto out;
+ goto out_f;
}
old_fs = get_fs(); set_fs(get_ds());
@@ -813,7 +811,7 @@
sizeof(struct statfs));
set_fs(old_fs);
if (error)
- goto out;
+ goto out_f;
__put_user(kbuf.f_type, &buf->f_type);
__put_user(kbuf.f_bsize, &buf->f_bsize);
@@ -826,9 +824,9 @@
__put_user(0, &buf->f_fname[i]);
__put_user(0, &buf->f_fpack[i]);
}
- error = 0;
- dput(dentry);
+out_f:
+ fput(file);
out:
unlock_kernel();
return error;
@@ -1110,7 +1108,7 @@
lock_kernel();
if(!(flags & MAP_ANONYMOUS)) {
- if(fd >= NR_OPEN || !(file = current->files->fd[fd])) {
+ if(!(file = fget(fd))) {
retval = -EBADF;
goto out;
}
@@ -1130,6 +1128,8 @@
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
retval = do_mmap(file, addr, len, prot, flags, offset);
+ if (file)
+ fput(file);
out:
unlock_kernel();
@@ -1568,7 +1568,6 @@
asmlinkage int irix_fstatvfs(int fd, struct irix_statvfs *buf)
{
- struct dentry *dentry;
struct inode *inode;
mm_segment_t old_fs;
struct statfs kbuf;
@@ -1582,21 +1581,21 @@
error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs));
if (error)
goto out;
- if (fd >= NR_OPEN || !(file = current->files->fd[fd])) {
+ if (!(file = fget(fd))) {
error = -EBADF;
goto out;
}
- if (!(dentry = file->f_dentry)) {
+ if (!(inode = file->f_dentry->d_inode)) {
error = -ENOENT;
- goto out;
+ goto out_f;
}
- if (!(inode = dentry->d_inode)) {
- error = -ENOENT;
- goto out;
+ if (!inode->i_sb) {
+ error = -ENODEV;
+ goto out_f;
}
if (!inode->i_sb->s_op->statfs) {
error = -ENOSYS;
- goto out;
+ goto out_f;
}
old_fs = get_fs(); set_fs(get_ds());
@@ -1604,7 +1603,7 @@
sizeof(struct statfs));
set_fs(old_fs);
if (error)
- goto out;
+ goto out_f;
__put_user(kbuf.f_bsize, &buf->f_bsize);
__put_user(kbuf.f_frsize, &buf->f_frsize);
@@ -1626,9 +1625,8 @@
for(i = 0; i < 32; i++)
__put_user(0, &buf->f_fstr[i]);
- error = 0;
-
- dput(dentry);
+out_f:
+ fput(file);
out:
unlock_kernel();
return error;
@@ -1726,7 +1724,7 @@
}
if(!(flags & MAP_ANONYMOUS)) {
- if(fd >= NR_OPEN || !(file = current->files->fd[fd])) {
+ if(!(file = fcheck(fd))) {
error = -EBADF;
goto out;
}
@@ -1812,6 +1810,7 @@
struct statfs kbuf;
int error, i;
+ lock_kernel();
printk("[%s:%ld] Wheee.. irix_statvfs(%s,%p)\n",
current->comm, current->pid, fname, buf);
error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs));
@@ -1864,7 +1863,6 @@
asmlinkage int irix_fstatvfs64(int fd, struct irix_statvfs *buf)
{
- struct dentry *dentry;
struct inode *inode;
mm_segment_t old_fs;
struct statfs kbuf;
@@ -1878,21 +1876,21 @@
error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs));
if (error)
goto out;
- if (fd >= NR_OPEN || !(file = current->files->fd[fd])) {
+ if (!(file = fget(fd))) {
error = -EBADF;
goto out;
}
- if (!(dentry = file->f_dentry)) {
+ if (!(inode = file->f_dentry->d_inode)) {
error = -ENOENT;
- goto out;
+ goto out_f;
}
- if (!(inode = dentry->d_inode)) {
- error = -ENOENT;
- goto out;
+ if (!inode->i_sb) {
+ error = -ENODEV;
+ goto out_f;
}
if (!inode->i_sb->s_op->statfs) {
error = -ENOSYS;
- goto out;
+ goto out_f;
}
old_fs = get_fs(); set_fs(get_ds());
@@ -1900,7 +1898,7 @@
sizeof(struct statfs));
set_fs(old_fs);
if (error)
- goto out;
+ goto out_f;
__put_user(kbuf.f_bsize, &buf->f_bsize);
__put_user(kbuf.f_frsize, &buf->f_frsize);
@@ -1921,10 +1919,8 @@
__put_user(kbuf.f_namelen, &buf->f_namemax);
for(i = 0; i < 32; i++)
__put_user(0, &buf->f_fstr[i]);
-
- error = 0;
-
- dput(dentry);
+out_f:
+ fput(file);
out:
unlock_kernel();
return error;
@@ -1994,7 +1990,6 @@
unsigned short reclen = ROUND_UP32(NAME_OFFSET32(dirent) + namlen + 1);
int retval;
- lock_kernel();
#ifdef DEBUG_GETDENTS
printk("\nirix_filldir32[reclen<%d>namlen<%d>count<%d>]",
reclen, namlen, buf->count);
@@ -2020,14 +2015,12 @@
retval = 0;
out:
- unlock_kernel();
return retval;
}
asmlinkage int irix_ngetdents(unsigned int fd, void * dirent, unsigned int count, int *eob)
{
struct file *file;
- struct dentry *dentry;
struct inode *inode;
struct irix_dirent32 *lastdirent;
struct irix_dirent32_callback buf;
@@ -2039,46 +2032,56 @@
current->pid, fd, dirent, count, eob);
#endif
error = -EBADF;
- if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
+ file = fget(fd);
+ if (!file)
goto out;
- dentry = file->f_dentry;
- if (!dentry)
- goto out;
+ inode = file->f_dentry->d_inode;
+ if (!inode)
+ goto out_putf;
inode = dentry->d_inode;
if (!inode)
- goto out;
+ goto out_putf;
- error = -ENOTDIR;
- if (!file->f_op || !file->f_op->readdir)
- goto out;
-
- error = -EFAULT;
- if(!access_ok(VERIFY_WRITE, dirent, count) ||
- !access_ok(VERIFY_WRITE, eob, sizeof(*eob)))
- goto out;
-
- __put_user(0, eob);
buf.current_dir = (struct irix_dirent32 *) dirent;
buf.previous = NULL;
buf.count = count;
buf.error = 0;
+ error = -ENOTDIR;
+ if (!file->f_op || !file->f_op->readdir)
+ goto out_putf;
+
+ /*
+ * Get the inode's semaphore to prevent changes
+ * to the directory while we read it.
+ */
+ down(&inode->i_sem);
error = file->f_op->readdir(file, &buf, irix_filldir32);
+ up(&inode->i_sem);
if (error < 0)
- goto out;
+ goto out_putf;
+ error = buf.error;
lastdirent = buf.previous;
- if (!lastdirent) {
- error = buf.error;
- goto out;
+ if (lastdirent) {
+ put_user(file->f_pos, &lastdirent->d_off);
+ error = count - buf.count;
}
- lastdirent->d_off = (u32) file->f_pos;
+
+ if (put_user(0, eob) < 0) {
+ error = EFAULT;
+ goto out_putf;
+ }
+
+
#ifdef DEBUG_GETDENTS
printk("eob=%d returning %d\n", *eob, count - buf.count);
#endif
error = count - buf.count;
+out_putf:
+ fput(file);
out:
unlock_kernel();
return error;
@@ -2110,7 +2113,6 @@
unsigned short reclen = ROUND_UP64(NAME_OFFSET64(dirent) + namlen + 1);
int retval;
- lock_kernel();
buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count) {
retval = -EINVAL;
@@ -2131,14 +2133,12 @@
retval = 0;
out:
- unlock_kernel();
return retval;
}
asmlinkage int irix_getdents64(int fd, void *dirent, int cnt)
{
struct file *file;
- struct dentry *dentry;
struct inode *inode;
struct irix_dirent64 *lastdirent;
struct irix_dirent64_callback buf;
@@ -2150,40 +2150,38 @@
current->pid, fd, dirent, cnt);
#endif
error = -EBADF;
- if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
- goto out;
-
- dentry = file->f_dentry;
- if (!dentry)
+ if (!(file = fget(fd)))
goto out;
- inode = dentry->d_inode;
+ inode = file->f_dentry->d_inode;
if (!inode)
- goto out;
+ goto out_f;
error = -ENOTDIR;
if (!file->f_op || !file->f_op->readdir)
- goto out;
+ goto out_f;
error = -EFAULT;
if(!access_ok(VERIFY_WRITE, dirent, cnt))
- goto out;
+ goto out_f;
error = -EINVAL;
if(cnt < (sizeof(struct irix_dirent64) + 255))
- goto out;
+ goto out_f;
buf.curr = (struct irix_dirent64 *) dirent;
buf.previous = NULL;
buf.count = cnt;
buf.error = 0;
+ down(&inode->i_sem);
error = file->f_op->readdir(file, &buf, irix_filldir64);
+ up(&inode->i_sem);
if (error < 0)
- goto out;
+ goto out_f;
lastdirent = buf.previous;
if (!lastdirent) {
error = buf.error;
- goto out;
+ goto out_f;
}
lastdirent->d_off = (u64) file->f_pos;
#ifdef DEBUG_GETDENTS
@@ -2191,6 +2189,8 @@
#endif
error = cnt - buf.count;
+out_f:
+ fput(file);
out:
unlock_kernel();
return error;
@@ -2199,7 +2199,6 @@
asmlinkage int irix_ngetdents64(int fd, void *dirent, int cnt, int *eob)
{
struct file *file;
- struct dentry *dentry;
struct inode *inode;
struct irix_dirent64 *lastdirent;
struct irix_dirent64_callback buf;
@@ -2211,42 +2210,40 @@
current->pid, fd, dirent, cnt);
#endif
error = -EBADF;
- if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
- goto out;
-
- dentry = file->f_dentry;
- if (!dentry)
+ if (!(file = fget(fd)))
goto out;
- inode = dentry->d_inode;
+ inode = file->f_dentry->d_inode;
if (!inode)
- goto out;
+ goto out_f;
error = -ENOTDIR;
if (!file->f_op || !file->f_op->readdir)
- goto out;
+ goto out_f;
error = -EFAULT;
if(!access_ok(VERIFY_WRITE, dirent, cnt) ||
!access_ok(VERIFY_WRITE, eob, sizeof(*eob)))
- goto out;
+ goto out_f;
error = -EINVAL;
if(cnt < (sizeof(struct irix_dirent64) + 255))
- goto out;
+ goto out_f;
*eob = 0;
buf.curr = (struct irix_dirent64 *) dirent;
buf.previous = NULL;
buf.count = cnt;
buf.error = 0;
+ down(&inode->i_sem);
error = file->f_op->readdir(file, &buf, irix_filldir64);
+ up(&inode->i_sem);
if (error < 0)
- goto out;
+ goto out_f;
lastdirent = buf.previous;
if (!lastdirent) {
error = buf.error;
- goto out;
+ goto out_f;
}
lastdirent->d_off = (u64) file->f_pos;
#ifdef DEBUG_GETDENTS
@@ -2254,6 +2251,8 @@
#endif
error = cnt - buf.count;
+out_f:
+ fput(file);
out:
unlock_kernel();
return error;
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/boot/Makefile linux/arch/ppc/boot/Makefile
--- v2.2.7/linux/arch/ppc/boot/Makefile Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/boot/Makefile Thu Apr 29 12:39:01 1999
@@ -14,7 +14,7 @@
.s.o:
$(AS) -o $*.o $<
.c.o:
- $(CC) $(CFLAGS) -DINITRD_OFFSET=$(IOFF) -DINITRD_SIZE=$(ISZ) -DZIMAGE_OFFSET=$(ZOFF) -DZIMAGE_SIZE=$(ZSZ) -DKERNELBASE=$(KERNELBASE) -c -o $*.o $<
+ $(CC) $(CFLAGS) -DINITRD_OFFSET=$(IOFF) -DINITRD_SIZE=$(ISZ) -DZIMAGE_OFFSET=$(ZOFF) -DZIMAGE_SIZE=$(ZSZ) -c -o $*.o $<
.S.s:
$(CC) -D__ASSEMBLY__ -traditional -E -o $*.o $<
.S.o:
@@ -57,7 +57,7 @@
-DINITRD_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd initrd` \
-DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd image` \
-DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd image` \
- -DKERNELBASE=$(KERNELBASE) -c -o misc.o misc.c
+ -c -o misc.o misc.c
$(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section=initrd=ramdisk.image.gz \
@@ -84,7 +84,7 @@
#
$(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 \
-DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux image` \
- -DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux image` -DKERNELBASE=$(KERNELBASE) \
+ -DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux image` \
-c -o misc.o misc.c
$(LD) $(ZLINKFLAGS) -o zvmlinux.tmp $(OBJECTS)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment --add-section=image=../coffboot/vmlinux.gz \
@@ -95,7 +95,7 @@
dd if=zImage of=/dev/fd0H1440 bs=64b
mkprep : mkprep.c
- $(HOSTCC) -DKERNELBASE=$(KERNELBASE) -o mkprep mkprep.c
+ $(HOSTCC) -o mkprep mkprep.c
znetboot : zImage
cp zImage $(TFTPIMAGE)
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/boot/head.S linux/arch/ppc/boot/head.S
--- v2.2.7/linux/arch/ppc/boot/head.S Fri Apr 16 14:47:30 1999
+++ linux/arch/ppc/boot/head.S Thu Apr 29 12:39:01 1999
@@ -6,7 +6,7 @@
.text
/*
- * $Id: head.S,v 1.29 1999/03/08 23:41:17 cort Exp $
+ * $Id: head.S,v 1.31 1999/04/22 06:32:00 davem Exp $
*
* Boot loader philosophy:
* ROM loads us to some arbitrary location
@@ -23,11 +23,7 @@
start_:
mr r11,r3 /* Save pointer to residual/board data */
mr r25,r5 /* Save OFW pointer */
-
- mfmsr r3 /* Turn off interrupts */
- li r4,0
- ori r4,r4,MSR_EE
- andc r3,r3,r4
+ li r3,MSR_IP /* Establish default MSR value */
mtmsr r3
/* check if we need to relocate ourselves to the link addr or were we
@@ -136,6 +132,20 @@
lis r10,0xdeadc0de@h
ori r10,r10,0xdeadc0de@l
stw r10,0(r9)
+/*
+ * The Radstone firmware maps PCI memory at 0xc0000000 using BAT2
+ * so disable BATs before setting this to avoid a clash
+ */
+ li r8,0
+ mtspr DBAT0U,r8
+ mtspr DBAT1U,r8
+ mtspr DBAT2U,r8
+ mtspr DBAT3U,r8
+ mtspr IBAT0U,r8
+ mtspr IBAT1U,r8
+ mtspr IBAT2U,r8
+ mtspr IBAT3U,r8
+
blr
hang:
b hang
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/boot/kbd.c linux/arch/ppc/boot/kbd.c
--- v2.2.7/linux/arch/ppc/boot/kbd.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/boot/kbd.c Thu Apr 29 12:39:01 1999
@@ -127,6 +127,11 @@
unsigned char c;
int i;
+ /* flush input queue */
+ while ((inb(KBSTATP) & KBINRDY))
+ {
+ (void)inb(KBDATAP);
+ }
/* Send self-test */
while (inb(KBSTATP) & KBOUTRDY) ;
outb(KBSTATP,0xAA);
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/boot/misc.c linux/arch/ppc/boot/misc.c
--- v2.2.7/linux/arch/ppc/boot/misc.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/boot/misc.c Thu Apr 29 12:39:01 1999
@@ -1,7 +1,7 @@
/*
* misc.c
*
- * $Id: misc.c,v 1.61 1999/03/08 23:51:02 cort Exp $
+ * $Id: misc.c,v 1.63 1999/04/05 21:48:20 cort Exp $
*
* Adapted for PowerPC by Gary Thomas
*
@@ -33,14 +33,16 @@
char *end_avail;
extern char _end[];
-#if defined(CONFIG_SERIAL_CONSOLE)
-char cmd_preset[] = "console=ttyS0,9600n8";
+#ifdef CONFIG_CMDLINE
+#define CMDLINE CONFIG_CMDLINE
#else
-char cmd_preset[] = "";
+#define CMDLINE "";
#endif
-char cmd_buf[256];
-char *cmd_line = cmd_buf;
+char cmd_preset[] = CMDLINE;
+char cmd_buf[256];
+char *cmd_line = cmd_buf;
+int keyb_present = 1; /* keyboard controller is present by default */
RESIDUAL hold_resid_buf;
RESIDUAL *hold_residual = &hold_resid_buf;
unsigned long initrd_start = 0, initrd_end = 0;
@@ -58,7 +60,8 @@
void * memcpy(void * __dest, __const void * __src,
int __n);
void gunzip(void *, int, unsigned char *, int *);
-int _cvt(unsigned long val, char *buf, long radix, char *digits);
+static int _cvt(unsigned long val, char *buf, long radix, char *digits);
+unsigned char inb(int);
void pause()
{
@@ -93,11 +96,14 @@
tstc(void)
{
- return (
#if defined(CONFIG_SERIAL_CONSOLE)
- NS16550_tstc(com_port) ||
+ if (keyb_present)
+ return (CRT_tstc() || NS16550_tstc(com_port));
+ else
+ NS16550_tstc(com_port);
+#else
+ return (CRT_tstc() );
#endif /* CONFIG_SERIAL_CONSOLE */
- CRT_tstc());
}
getc(void)
@@ -106,7 +112,8 @@
#if defined(CONFIG_SERIAL_CONSOLE)
if (NS16550_tstc(com_port)) return (NS16550_getc(com_port));
#endif /* CONFIG_SERIAL_CONSOLE */
- if (CRT_tstc()) return (CRT_getc());
+ if (keyb_present)
+ if (CRT_tstc()) return (CRT_getc());
}
}
@@ -188,6 +195,8 @@
}
}
+ cursor(x, y);
+
orig_x = x;
orig_y = y;
}
@@ -317,6 +326,8 @@
int dev_handle;
int mem_info[2];
int res, size;
+ unsigned char board_type;
+ unsigned char base_mod;
lines = 25;
cols = 80;
@@ -333,14 +344,30 @@
flush_instruction_cache();
_put_HID0(_get_HID0() & ~0x0000C000);
_put_MSR((orig_MSR = _get_MSR()) & ~0x0030);
- vga_init(0xC0000000);
#if defined(CONFIG_SERIAL_CONSOLE)
- com_port = (struct NS16550 *)NS16550_init(1);
+ com_port = (struct NS16550 *)NS16550_init(0);
#endif /* CONFIG_SERIAL_CONSOLE */
+ vga_init(0xC0000000);
if (residual)
{
+ /* Is this Motorola PPCBug? */
+ if ((1 & residual->VitalProductData.FirmwareSupports) &&
+ (1 == residual->VitalProductData.FirmwareSupplier)) {
+ board_type = inb(0x800) & 0xF0;
+
+ /* If this is genesis 2 board then check for no
+ * keyboard controller and more than one processor.
+ */
+ if (board_type == 0xe0) {
+ base_mod = inb(0x803);
+ /* if a MVME2300 or a MCME2400 then no keyboard */
+ if((base_mod == 0x9) || (base_mod == 0xF9)) {
+ keyb_present = 0; /* no keyboard */
+ }
+ }
+ }
memcpy(hold_residual,residual,sizeof(RESIDUAL));
} else {
/* Assume 32M in the absence of more info... */
@@ -429,7 +456,7 @@
avail_ram = (char *)PAGE_ALIGN((unsigned long)_end);
puts("zimage at: "); puthex((unsigned long)zimage_start);
puts(" "); puthex((unsigned long)(zimage_size+zimage_start)); puts("\n");
- if ( (unsigned long)zimage_start <= 0x008000000 )
+ if ( (unsigned long)zimage_start <= 0x00800000 )
{
memcpy( (void *)avail_ram, (void *)zimage_start, zimage_size );
zimage_start = (char *)avail_ram;
@@ -458,9 +485,8 @@
puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" ");
puthex((unsigned long)end_avail); puts("\n");
-#if !defined(CONFIG_SERIAL_CONSOLE)
- CRT_tstc(); /* Forces keyboard to be initialized */
-#endif
+ if (keyb_present)
+ CRT_tstc(); /* Forces keyboard to be initialized */
puts("\nLinux/PPC load: ");
timer = 0;
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/boot/mkprep.c linux/arch/ppc/boot/mkprep.c
--- v2.2.7/linux/arch/ppc/boot/mkprep.c Mon Oct 5 13:13:36 1998
+++ linux/arch/ppc/boot/mkprep.c Thu Apr 29 12:39:01 1999
@@ -14,15 +14,8 @@
* Modified for x86 hosted builds by Matt Porter
*/
-#ifdef linux
-#include
-/*#include */
-/*#include */ /* the byte swap funcs don't work here -- Cort */
-#else
#include
-#endif
#include
-
#include
#include
@@ -168,10 +161,10 @@
/* set entry point and boot image size skipping over elf header */
#ifdef __i386__
*entry = 0x400/*+65536*/;
- *length = info.st_size+0x400;
+ *length = info.st_size-elfhdr_size+0x400;
#else
*entry = cpu_to_le32(0x400/*+65536*/);
- *length = cpu_to_le32(info.st_size+0x400);
+ *length = cpu_to_le32(info.st_size-elfhdr_size+0x400);
#endif /* __i386__ */
/* sets magic number for msdos partition (used by linux) */
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/common_defconfig linux/arch/ppc/common_defconfig
--- v2.2.7/linux/arch/ppc/common_defconfig Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/common_defconfig Thu Apr 29 12:39:01 1999
@@ -1,5 +1,5 @@
#
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
#
#
@@ -14,7 +14,7 @@
CONFIG_ALL_PPC=y
# CONFIG_APUS is not set
# CONFIG_MBX is not set
-# CONFIG_SMP is not set
+CONFIG_SMP=y
#
# General setup
@@ -43,12 +43,11 @@
CONFIG_MAC_FLOPPY=y
CONFIG_MAC_SERIAL=y
CONFIG_ADBMOUSE=y
-CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_PROC_DEVICETREE=y
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
# CONFIG_TOTALMP is not set
CONFIG_BOOTX_TEXT=y
+# CONFIG_MOTOROLA_HOTSWAP is not set
+# CONFIG_CMDLINE_BOOL is not set
#
# Plug and Play support
@@ -60,6 +59,10 @@
#
# CONFIG_BLK_DEV_FD is not set
CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
@@ -70,8 +73,14 @@
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_BLK_DEV_SL82C105 is not set
+CONFIG_BLK_DEV_IDE_PMAC=y
+# CONFIG_BLK_DEV_IDEDMA_PMAC is not set
# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_BLK_DEV_LOOP is not set
+
+#
+# Additional Block Devices
+#
+CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=y
@@ -101,10 +110,17 @@
# CONFIG_IP_MROUTE is not set
CONFIG_IP_ALIAS=y
# CONFIG_SYN_COOKIES is not set
+
+#
+# (it is safe to leave these untouched)
+#
CONFIG_INET_RARP=y
-CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
# CONFIG_IPV6 is not set
+
+#
+#
+#
# CONFIG_IPX is not set
CONFIG_ATALK=m
# CONFIG_X25 is not set
@@ -126,12 +142,20 @@
# SCSI support
#
CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
-# CONFIG_CHR_DEV_SG is not set
-# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_CHR_DEV_SG=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
@@ -159,10 +183,15 @@
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_G_NCR5380_PORT is not set
+# CONFIG_SCSI_G_NCR5380_MEM is not set
# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_NCR53C7xx is not set
CONFIG_SCSI_NCR53C8XX=y
+# CONFIG_SCSI_SYM53C8XX is not set
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
CONFIG_SCSI_NCR53C8XX_SYNC=20
@@ -175,6 +204,7 @@
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_SEAGATE is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
@@ -205,7 +235,7 @@
# CONFIG_ACENIC is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_EISA=y
-# CONFIG_PCNET32 is not set
+CONFIG_PCNET32=y
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
@@ -229,6 +259,10 @@
# CONFIG_COPS is not set
# CONFIG_IPDDP is not set
CONFIG_PPP=y
+
+#
+# CCP compressors for PPP are only built as modules.
+#
# CONFIG_SLIP is not set
# CONFIG_NET_RADIO is not set
# CONFIG_TR is not set
@@ -256,22 +290,37 @@
# Console drivers
#
CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FB_PM2 is not set
CONFIG_FB_OF=y
CONFIG_FB_CONTROL=y
CONFIG_FB_PLATINUM=y
CONFIG_FB_VALKYRIE=y
-CONFIG_FB_ATY=y
+# CONFIG_FB_ATY is not set
CONFIG_FB_IMSTT=y
CONFIG_FB_CT65550=y
# CONFIG_FB_S3TRIO is not set
-# CONFIG_FB_MATROX is not set
-CONFIG_FB_ATY=y
+CONFIG_FB_MATROX=y
+CONFIG_FB_MATROX_MILLENIUM=y
+CONFIG_FB_MATROX_MYSTIQUE=y
+CONFIG_FB_MATROX_G100=y
+# CONFIG_FB_MATROX_MULTIHEAD is not set
+# CONFIG_FB_ATY is not set
# CONFIG_FB_VIRTUAL is not set
-# CONFIG_FBCON_ADVANCED is not set
+CONFIG_FBCON_ADVANCED=y
+# CONFIG_FBCON_MFB is not set
+# CONFIG_FBCON_CFB2 is not set
+# CONFIG_FBCON_CFB4 is not set
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_CFB16=y
CONFIG_FBCON_CFB24=y
CONFIG_FBCON_CFB32=y
+# CONFIG_FBCON_AFB is not set
+# CONFIG_FBCON_ILBM is not set
+# CONFIG_FBCON_IPLAN2P2 is not set
+# CONFIG_FBCON_IPLAN2P4 is not set
+# CONFIG_FBCON_IPLAN2P8 is not set
+# CONFIG_FBCON_MAC is not set
+# CONFIG_FBCON_VGA is not set
# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
CONFIG_FBCON_FONTS=y
# CONFIG_FONT_8x8 is not set
@@ -292,7 +341,17 @@
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
-# CONFIG_MOUSE is not set
+CONFIG_MOUSE=y
+
+#
+# Mice
+#
+# CONFIG_ATIXL_BUSMOUSE is not set
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MS_BUSMOUSE is not set
+CONFIG_PSMOUSE=y
+# CONFIG_82C710_MOUSE is not set
+# CONFIG_PC110_PAD is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
@@ -307,11 +366,20 @@
# Joystick support
#
# CONFIG_JOYSTICK is not set
+# CONFIG_DTLK is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
+# CONFIG_FT_NORMAL_DEBUG is not set
+# CONFIG_FT_FULL_DEBUG is not set
+# CONFIG_FT_NO_TRACE is not set
+# CONFIG_FT_NO_TRACE_AT_ALL is not set
+# CONFIG_FT_STD_FDC is not set
+# CONFIG_FT_MACH2 is not set
+# CONFIG_FT_PROBE_FC10 is not set
+# CONFIG_FT_ALT_FDC is not set
#
# Filesystems
@@ -402,3 +470,10 @@
# CONFIG_SOUND_MSNDCLAS is not set
# CONFIG_SOUND_MSNDPIN is not set
# CONFIG_SOUND_OSS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/config.in linux/arch/ppc/config.in
--- v2.2.7/linux/arch/ppc/config.in Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/config.in Thu Apr 29 12:39:01 1999
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.84 1999/02/23 08:08:38 davem Exp $
+# $Id: config.in,v 1.91 1999/04/09 07:07:47 cort Exp $
# For a description of the syntax of this configuration file,
# see the Configure script.
#
@@ -19,12 +19,10 @@
APUS CONFIG_APUS \
MBX CONFIG_MBX" PowerMac
+bool 'Symmetric multi-processing support' CONFIG_SMP
if [ "$CONFIG_ALL_PPC" != "y" ];then
define_bool CONFIG_MACH_SPECIFIC y
fi
-
-bool 'Symmetric multi-processing support' CONFIG_SMP
-
endmenu
if [ "$CONFIG_MBX" = "y" ];then
@@ -82,13 +80,20 @@
bool 'Support for PowerMac keyboard' CONFIG_MAC_KEYBOARD
bool 'Support for PowerMac floppy' CONFIG_MAC_FLOPPY
bool 'Support for PowerMac serial ports' CONFIG_MAC_SERIAL
+if [ "$CONFIG_MAC_SERIAL" = "y" ]; then
+ bool ' Support for console on serial port' CONFIG_SERIAL_CONSOLE
+fi
bool 'Support for PowerMac ADB mouse' CONFIG_ADBMOUSE
-bool 'Support for PowerMac IDE devices (must also enable IDE)' CONFIG_BLK_DEV_IDE_PMAC
bool 'Support for Open Firmware device tree in /proc' CONFIG_PROC_DEVICETREE
-bool 'Include kgdb kernel debugger' CONFIG_KGDB
-bool 'Include xmon kernel debugger' CONFIG_XMON
bool 'Support for TotalImpact TotalMP' CONFIG_TOTALMP
bool 'Support for early boot text console (BootX only)' CONFIG_BOOTX_TEXT
+bool 'Support for Motorola Hot Swap' CONFIG_MOTOROLA_HOTSWAP
+if [ "$CONFIG_PREP" = "y" -o "$CONFIG_ALL_PPC" = "y" ]; then
+ bool 'PReP bootloader ernel arguments' CONFIG_CMDLINE_BOOL n
+ if [ "$CONFIG_CMDLINE_BOOL" = "y" ] ; then
+ string 'Initial kernel command string' CONFIG_CMDLINE ""
+ fi
+fi
if [ "$CONFIG_APUS" = "y" ]; then
define_bool CONFIG_FB_CONSOLE y
@@ -176,4 +181,12 @@
source drivers/sound/Config.in
fi
+endmenu
+
+mainmenu_option next_comment
+comment 'Kernel hacking'
+
+bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+bool 'Include kgdb kernel debugger' CONFIG_KGDB
+bool 'Include xmon kernel debugger' CONFIG_XMON
endmenu
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/Makefile linux/arch/ppc/kernel/Makefile
--- v2.2.7/linux/arch/ppc/kernel/Makefile Mon Dec 28 15:00:52 1998
+++ linux/arch/ppc/kernel/Makefile Thu Apr 29 12:39:01 1999
@@ -27,7 +27,7 @@
endif
ifeq ($(CONFIG_MBX),y)
-O_OBJS += mbx_setup.o mbx_pci.o softemu8xx.o
+O_OBJS += mbx_setup.o mbx_pci.o softemu8xx.o i8259.o ppc8xx_pic.o
else
ifeq ($(CONFIG_APUS),y)
O_OBJS += apus_setup.o prom.o openpic.o
@@ -36,7 +36,8 @@
O_OBJS += prep_time.o pmac_time.o chrp_time.o \
pmac_setup.o pmac_support.o \
prep_pci.o pmac_pci.o chrp_pci.o \
- residual.o prom.o openpic.o feature.o
+ residual.o prom.o openpic.o feature.o \
+ prep_nvram.o open_pic.o i8259.o pmac_pic.o indirect_pci.o
OX_OBJS += chrp_setup.o prep_setup.o
endif
endif
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/align.c linux/arch/ppc/kernel/align.c
--- v2.2.7/linux/arch/ppc/kernel/align.c Mon Oct 5 13:13:36 1998
+++ linux/arch/ppc/kernel/align.c Thu Apr 29 12:39:01 1999
@@ -194,13 +194,8 @@
return -EFAULT; /* bad address */
}
-#ifdef __SMP__
- if ((flags & F) && (regs->msr & MSR_FP) )
- smp_giveup_fpu(current);
-#else
- if ((flags & F) && last_task_used_math == current)
- giveup_fpu();
-#endif
+ if ((flags & F) && (regs->msr & MSR_FP))
+ giveup_fpu(current);
if (flags & M)
return 0; /* too hard for now */
@@ -254,27 +249,16 @@
data.d = current->tss.fpr[reg];
break;
/* these require some floating point conversions... */
- /* note that giveup_fpu enables the FPU for the kernel */
/* we'd like to use the assignment, but we have to compile
* the kernel with -msoft-float so it doesn't use the
* fp regs for copying 8-byte objects. */
case LD+F+S:
-#ifdef __SMP__
- if (regs->msr & MSR_FP )
- smp_giveup_fpu(current);
-#else
- giveup_fpu();
-#endif
+ enable_kernel_fp();
cvt_fd(&data.f, ¤t->tss.fpr[reg], ¤t->tss.fpscr);
/* current->tss.fpr[reg] = data.f; */
break;
case ST+F+S:
-#ifdef __SMP__
- if (regs->msr & MSR_FP )
- smp_giveup_fpu(current);
-#else
- giveup_fpu();
-#endif
+ enable_kernel_fp();
cvt_df(¤t->tss.fpr[reg], &data.f, ¤t->tss.fpscr);
/* data.f = current->tss.fpr[reg]; */
break;
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/apus_setup.c linux/arch/ppc/kernel/apus_setup.c
--- v2.2.7/linux/arch/ppc/kernel/apus_setup.c Tue Dec 22 14:16:54 1998
+++ linux/arch/ppc/kernel/apus_setup.c Thu Apr 29 12:39:01 1999
@@ -14,12 +14,50 @@
#include
#include
#include
+#include
+
+/* Get the IDE stuff from the 68k file */
+#define ide_init_hwif_ports m68k_ide_init_hwif_ports
+#define ide_default_irq m68k_ide_default_irq
+#define ide_default_io_base m68k_ide_default_io_base
+#define ide_check_region m68k_ide_check_region
+#define ide_request_region m68k_ide_request_region
+#define ide_release_region m68k_ide_release_region
+#define ide_fix_driveid m68k_ide_fix_driveid
+#include
+#undef ide_init_hwif_ports
+#define ide_default_irq
+#define ide_default_io_base
+#define ide_check_region
+#define ide_request_region
+#define ide_release_region
+#define ide_fix_driveid
+
#include
#include
#include
#include
#include
+#include
+#include
+
+#include "time.h"
+#include "local_irq.h"
+
+unsigned long apus_get_rtc_time(void);
+int apus_set_rtc_time(unsigned long nowtime);
+
+/* APUS defs */
+extern int parse_bootinfo(const struct bi_record *);
+extern char _end[];
+#ifdef CONFIG_APUS
+struct mem_info ramdisk;
+unsigned long isa_io_base;
+unsigned long isa_mem_base;
+unsigned long pci_dram_offset;
+#endif
+/* END APUS defs */
unsigned long m68k_machtype;
char debug_device[6] = "";
@@ -72,6 +110,8 @@
int i;
char *p, *q;
+ m68k_machtype = MACH_AMIGA;
+
/* Parse the command line for arch-specific options.
* For the m68k, this is currently only "debug=xxx" to enable printing
* certain kernel messages to some machine-specific device. */
@@ -408,4 +448,195 @@
"icbi 0,%0 \n\t"
"isync \n\t"
: : "r" (addr));
+}
+
+void
+apus_restart(char *cmd)
+{
+ cli();
+
+ APUS_WRITE(APUS_REG_LOCK,
+ REGLOCK_BLACKMAGICK1|REGLOCK_BLACKMAGICK2);
+ APUS_WRITE(APUS_REG_LOCK,
+ REGLOCK_BLACKMAGICK1|REGLOCK_BLACKMAGICK3);
+ APUS_WRITE(APUS_REG_LOCK,
+ REGLOCK_BLACKMAGICK2|REGLOCK_BLACKMAGICK3);
+ APUS_WRITE(APUS_REG_SHADOW, REGSHADOW_SELFRESET);
+ APUS_WRITE(APUS_REG_RESET, REGRESET_AMIGARESET);
+ for(;;);
+}
+
+void
+apus_power_off(void)
+{
+ for (;;);
+}
+
+void
+apus_halt(void)
+{
+ apus_restart(NULL);
+}
+
+void
+apus_do_IRQ(struct pt_regs *regs,
+ int cpu,
+ int isfake)
+{
+ int old_level, new_level;
+
+ /* I don't think we need SMP code here - Corey */
+
+ old_level = ~(regs->mq) & IPLEMU_IPLMASK;
+ new_level = (~(regs->mq) >> 3) & IPLEMU_IPLMASK;
+ if (new_level != 0)
+ {
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_IPLMASK);
+ APUS_WRITE(APUS_IPL_EMU, (IPLEMU_SETRESET
+ | (~(new_level) & IPLEMU_IPLMASK)));
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT);
+
+ process_int (VEC_SPUR+new_level, regs);
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET | IPLEMU_DISABLEINT);
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_IPLMASK);
+ APUS_WRITE(APUS_IPL_EMU, (IPLEMU_SETRESET
+ | (~(old_level) & IPLEMU_IPLMASK)));
+ }
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT);
+}
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+/*
+ * IDE stuff.
+ */
+void
+apus_ide_insw(ide_ioreg_t port, void *buf, int ns)
+{
+ ide_insw(port, buf, ns);
+}
+
+void
+apus_ide_outsw(ide_ioreg_t port, void *buf, int ns)
+{
+ ide_outsw(port, buf, ns);
+}
+
+int
+apus_ide_default_irq(ide_ioreg_t base)
+{
+ m68k_ide_default_irq(base);
+}
+
+ide_ioreg_t
+apus_ide_default_io_base(int index)
+{
+ m68k_ide_default_io_base(index);
+}
+
+int
+apus_ide_check_region(ide_ioreg_t from, unsigned int extent)
+{
+ return m68k_ide_check_region(from, extent);
+}
+
+void
+apus_ide_request_region(ide_ioreg_t from,
+ unsigned int extent,
+ const char *name)
+{
+ m68k_ide_request_region(from, extent, name);
+}
+
+void
+apus_ide_release_region(ide_ioreg_t from,
+ unsigned int extent)
+{
+ m68k_ide_release_region(from, extent);
+}
+
+void
+apus_ide_fix_driveid(struct hd_driveid *id)
+{
+ m68k_ide_fix_driveid(id);
+}
+
+__initfunc(void
+apus_ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int *irq))
+{
+ m68k_ide_init_hwif_ports(p, base, irq);
+}
+#endif
+
+__initfunc(void
+apus_local_init_IRQ(void))
+{
+ ppc_md.mask_irq = amiga_disable_irq;
+ ppc_md.unmask_irq = amiga_enable_irq;
+ apus_init_IRQ();
+}
+
+__initfunc(void
+apus_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ unsigned long r6, unsigned long r7))
+{
+ /* Parse bootinfo. The bootinfo is located right after
+ the kernel bss */
+ parse_bootinfo((const struct bi_record *)&_end);
+#ifdef CONFIG_BLK_DEV_INITRD
+ /* Take care of initrd if we have one. Use data from
+ bootinfo to avoid the need to initialize PPC
+ registers when kernel is booted via a PPC reset. */
+ if ( ramdisk.addr ) {
+ initrd_start = (unsigned long) __va(ramdisk.addr);
+ initrd_end = (unsigned long)
+ __va(ramdisk.size + ramdisk.addr);
+ }
+ /* Make sure code below is not executed. */
+ r4 = 0;
+ r6 = 0;
+#endif /* CONFIG_BLK_DEV_INITRD */
+
+ ISA_DMA_THRESHOLD = 0x00ffffff;
+
+ ppc_md.setup_arch = apus_setup_arch;
+ ppc_md.setup_residual = NULL;
+ ppc_md.get_cpuinfo = apus_get_cpuinfo;
+ ppc_md.irq_cannonicalize = NULL;
+ ppc_md.init_IRQ = apus_init_IRQ;
+ ppc_md.do_IRQ = apus_do_IRQ;
+ ppc_md.get_irq_source = NULL;
+ ppc_md.init = NULL;
+
+ ppc_md.restart = apus_restart;
+ ppc_md.power_off = apus_power_off;
+ ppc_md.halt = apus_halt;
+
+ ppc_md.time_init = NULL;
+ ppc_md.set_rtc_time = apus_set_rtc_time;
+ ppc_md.get_rtc_time = apus_get_rtc_time;
+ ppc_md.calibrate_decr = apus_calibrate_decr;
+
+ /* These should not be used for the APUS yet, since it uses
+ the M68K keyboard now. */
+ ppc_md.kbd_setkeycode = NULL;
+ ppc_md.kbd_getkeycode = NULL;
+ ppc_md.kbd_translate = NULL;
+ ppc_md.kbd_unexpected_up = NULL;
+ ppc_md.kbd_leds = NULL;
+ ppc_md.kbd_init_hw = NULL;
+ ppc_md.kbd_sysrq_xlate = NULL;
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+ ppc_ide_md.insw = apus_ide_insw;
+ ppc_ide_md.outsw = apus_ide_outsw;
+ ppc_ide_md.default_irq = apus_ide_default_irq;
+ ppc_ide_md.default_io_base = apus_ide_default_io_base;
+ ppc_ide_md.check_region = apus_ide_check_region;
+ ppc_ide_md.request_region = apus_ide_request_region;
+ ppc_ide_md.release_region = apus_ide_release_region;
+ ppc_ide_md.fix_driveid = apus_ide_fix_driveid;
+ ppc_ide_md.ide_init_hwif = apus_ide_init_hwif_ports;
+
+ ppc_ide_md.io_base = _IO_BASE;
+#endif
}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/chrp_pci.c linux/arch/ppc/kernel/chrp_pci.c
--- v2.2.7/linux/arch/ppc/kernel/chrp_pci.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/chrp_pci.c Thu Apr 29 12:39:01 1999
@@ -15,10 +15,14 @@
#include
#include
#include
+#include
+#include
+
+#include "pci.h"
/* LongTrail */
#define pci_config_addr(bus, dev, offset) \
- (GG2_PCI_CONFIG_BASE | ((bus)<<16) | ((dev)<<8) | (offset))
+(GG2_PCI_CONFIG_BASE | ((bus)<<16) | ((dev)<<8) | (offset))
volatile struct Hydra *Hydra = NULL;
@@ -30,149 +34,67 @@
int gg2_pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned char *val)
{
- if (bus > 7) {
- *val = 0xff;
- return PCIBIOS_DEVICE_NOT_FOUND;
- }
- *val = in_8((unsigned char *)pci_config_addr(bus, dev_fn, offset));
- return PCIBIOS_SUCCESSFUL;
+ if (bus > 7) {
+ *val = 0xff;
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ }
+ *val = in_8((unsigned char *)pci_config_addr(bus, dev_fn, offset));
+ return PCIBIOS_SUCCESSFUL;
}
int gg2_pcibios_read_config_word(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned short *val)
{
- if (bus > 7) {
- *val = 0xffff;
- return PCIBIOS_DEVICE_NOT_FOUND;
- }
- *val = in_le16((unsigned short *)pci_config_addr(bus, dev_fn, offset));
- return PCIBIOS_SUCCESSFUL;
+ if (bus > 7) {
+ *val = 0xffff;
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ }
+ *val = in_le16((unsigned short *)pci_config_addr(bus, dev_fn, offset));
+ return PCIBIOS_SUCCESSFUL;
}
int gg2_pcibios_read_config_dword(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned int *val)
{
- if (bus > 7) {
- *val = 0xffffffff;
- return PCIBIOS_DEVICE_NOT_FOUND;
- }
- *val = in_le32((unsigned int *)pci_config_addr(bus, dev_fn, offset));
- return PCIBIOS_SUCCESSFUL;
+ if (bus > 7) {
+ *val = 0xffffffff;
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ }
+ *val = in_le32((unsigned int *)pci_config_addr(bus, dev_fn, offset));
+ return PCIBIOS_SUCCESSFUL;
}
int gg2_pcibios_write_config_byte(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned char val)
{
- if (bus > 7)
- return PCIBIOS_DEVICE_NOT_FOUND;
- out_8((unsigned char *)pci_config_addr(bus, dev_fn, offset), val);
- return PCIBIOS_SUCCESSFUL;
+ if (bus > 7)
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ out_8((unsigned char *)pci_config_addr(bus, dev_fn, offset), val);
+ return PCIBIOS_SUCCESSFUL;
}
int gg2_pcibios_write_config_word(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned short val)
{
- if (bus > 7)
- return PCIBIOS_DEVICE_NOT_FOUND;
- out_le16((unsigned short *)pci_config_addr(bus, dev_fn, offset), val);
- return PCIBIOS_SUCCESSFUL;
+ if (bus > 7)
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ out_le16((unsigned short *)pci_config_addr(bus, dev_fn, offset), val);
+ return PCIBIOS_SUCCESSFUL;
}
int gg2_pcibios_write_config_dword(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned int val)
{
- if (bus > 7)
- return PCIBIOS_DEVICE_NOT_FOUND;
- out_le32((unsigned int *)pci_config_addr(bus, dev_fn, offset), val);
- return PCIBIOS_SUCCESSFUL;
-}
-
-extern volatile unsigned int *pci_config_address;
-extern volatile unsigned char *pci_config_data;
-
-#define DEV_FN_MAX (31<<3)
-
-int raven_pcibios_read_config_byte(unsigned char bus,
- unsigned char dev_fn,
- unsigned char offset,
- unsigned char *val)
-{
- if (dev_fn >= DEV_FN_MAX) return PCIBIOS_DEVICE_NOT_FOUND;
- out_be32(pci_config_address,
- 0x80|(bus<<8)|(dev_fn<<16)|((offset&~3)<<24));
- *val = in_8(pci_config_data+(offset&3));
- return PCIBIOS_SUCCESSFUL;
-}
-
-int raven_pcibios_read_config_word(unsigned char bus,
- unsigned char dev_fn,
- unsigned char offset,
- unsigned short *val)
-{
- if (dev_fn >= DEV_FN_MAX) return PCIBIOS_DEVICE_NOT_FOUND;
- if (offset&1)return PCIBIOS_BAD_REGISTER_NUMBER;
- out_be32(pci_config_address,
- 0x80|(bus<<8)|(dev_fn<<16)|((offset&~3)<<24));
- *val = in_le16((volatile unsigned short *)
- (pci_config_data+(offset&3)));
- return PCIBIOS_SUCCESSFUL;
-}
-
-int raven_pcibios_read_config_dword(unsigned char bus,
- unsigned char dev_fn,
- unsigned char offset,
- unsigned int *val)
-{
- if (dev_fn >= DEV_FN_MAX) return PCIBIOS_DEVICE_NOT_FOUND;
- if (offset&3)return PCIBIOS_BAD_REGISTER_NUMBER;
- out_be32(pci_config_address,
- 0x80|(bus<<8)|(dev_fn<<16)|(offset<<24));
- *val = in_le32((volatile unsigned int *)(pci_config_data));
- return PCIBIOS_SUCCESSFUL;
-}
-
-int raven_pcibios_write_config_byte(unsigned char bus,
- unsigned char dev_fn,
- unsigned char offset,
- unsigned char val)
-{
- if (dev_fn >= DEV_FN_MAX) return PCIBIOS_DEVICE_NOT_FOUND;
- out_be32(pci_config_address,
- 0x80|(bus<<8)|(dev_fn<<16)|((offset&~3)<<24));
- out_8(pci_config_data+(offset&3),val);
- return PCIBIOS_SUCCESSFUL;
-}
-
-int raven_pcibios_write_config_word(unsigned char bus,
- unsigned char dev_fn,
- unsigned char offset,
- unsigned short val)
-{
- if (dev_fn >= DEV_FN_MAX) return PCIBIOS_DEVICE_NOT_FOUND;
- if (offset&1)return PCIBIOS_BAD_REGISTER_NUMBER;
- out_be32(pci_config_address,
- 0x80|(bus<<8)|(dev_fn<<16)|((offset&~3)<<24));
- out_le16((volatile unsigned short *)(pci_config_data+(offset&3)),val);
- return PCIBIOS_SUCCESSFUL;
-}
-
-int raven_pcibios_write_config_dword(unsigned char bus,
- unsigned char dev_fn,
- unsigned char offset,
- unsigned int val)
-{
- if (dev_fn >= DEV_FN_MAX) return PCIBIOS_DEVICE_NOT_FOUND;
- if (offset&3)return PCIBIOS_BAD_REGISTER_NUMBER;
- out_be32(pci_config_address,
- 0x80|(bus<<8)|(dev_fn<<16)|(offset<<24));
- out_le32((volatile unsigned int *)pci_config_data,val);
- return PCIBIOS_SUCCESSFUL;
+ if (bus > 7)
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ out_le32((unsigned int *)pci_config_addr(bus, dev_fn, offset), val);
+ return PCIBIOS_SUCCESSFUL;
}
#define python_config_address(bus) (unsigned *)((0xfef00000+0xf8000)-(bus*0x100000))
#define python_config_data(bus) ((0xfef00000+0xf8010)-(bus*0x100000))
-#define PYTHON_CFA(b, d, o) (0x80 | ((b) << 8) | ((d) << 16) \
+#define PYTHON_CFA(b, d, o) (0x80 | ((b<<6) << 8) | ((d) << 16) \
| (((o) & ~3) << 24))
int python_pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn,
@@ -182,7 +104,7 @@
*val = 0xff;
return PCIBIOS_DEVICE_NOT_FOUND;
}
- out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset) );
+ out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset));
*val = in_8((unsigned char *)python_config_data(bus) + (offset&3));
return PCIBIOS_SUCCESSFUL;
}
@@ -194,7 +116,7 @@
*val = 0xffff;
return PCIBIOS_DEVICE_NOT_FOUND;
}
- out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset) );
+ out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset));
*val = in_le16((unsigned short *)(python_config_data(bus) + (offset&3)));
return PCIBIOS_SUCCESSFUL;
}
@@ -207,7 +129,7 @@
*val = 0xffffffff;
return PCIBIOS_DEVICE_NOT_FOUND;
}
- out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset) );
+ out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset));
*val = in_le32((unsigned *)python_config_data(bus));
return PCIBIOS_SUCCESSFUL;
}
@@ -217,7 +139,7 @@
{
if (bus > 2)
return PCIBIOS_DEVICE_NOT_FOUND;
- out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset) );
+ out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset));
out_8((volatile unsigned char *)python_config_data(bus) + (offset&3), val);
return PCIBIOS_SUCCESSFUL;
}
@@ -227,7 +149,7 @@
{
if (bus > 2)
return PCIBIOS_DEVICE_NOT_FOUND;
- out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset) );
+ out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset));
out_le16((volatile unsigned short *)python_config_data(bus) + (offset&3),
val);
return PCIBIOS_SUCCESSFUL;
@@ -238,7 +160,7 @@
{
if (bus > 2)
return PCIBIOS_DEVICE_NOT_FOUND;
- out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset) );
+ out_be32( python_config_address( bus ), PYTHON_CFA(bus,dev_fn,offset));
out_le32((unsigned *)python_config_data(bus) + (offset&3), val);
return PCIBIOS_SUCCESSFUL;
}
@@ -264,7 +186,8 @@
/* all others are 1 (= default) */
};
-__initfunc(int hydra_init(void))
+int __init
+hydra_init(void)
{
struct device_node *np;
@@ -287,4 +210,83 @@
OpenPIC_InitSenses = hydra_openpic_initsenses;
OpenPIC_NumInitSenses = sizeof(hydra_openpic_initsenses);
return 1;
+}
+
+void __init
+chrp_pcibios_fixup(void)
+{
+ struct pci_dev *dev;
+
+ /* get the other 2 busses on the F50 */
+ if ( !strncmp("F5", get_property(find_path_device("/"),
+ "ibm,model-class", NULL),2) )
+ {
+ pci_scan_peer_bridge(1);
+ pci_scan_peer_bridge(2);
+ }
+
+ /* PCI interrupts are controlled by the OpenPIC */
+ for( dev=pci_devices ; dev; dev=dev->next )
+ {
+ if ( dev->irq )
+ dev->irq = openpic_to_irq( dev->irq );
+ /* adjust the io_port for the NCR cards for busses other than 0 -- Cort */
+ if ( (dev->bus->number > 0) && (dev->vendor == PCI_VENDOR_ID_NCR) )
+ dev->base_address[0] += (dev->bus->number*0x08000000);
+ /* these need to be absolute addrs for OF and Matrox FB -- Cort */
+ if ( dev->vendor == PCI_VENDOR_ID_MATROX )
+ {
+ if ( dev->base_address[0] < isa_mem_base )
+ dev->base_address[0] += isa_mem_base;
+ if ( dev->base_address[1] < isa_mem_base )
+ dev->base_address[1] += isa_mem_base;
+ }
+ /* the F50 identifies the amd as a trident */
+ if ( (dev->vendor == PCI_VENDOR_ID_TRIDENT) &&
+ (dev->class == PCI_CLASS_NETWORK_ETHERNET) )
+ {
+ dev->vendor = PCI_VENDOR_ID_AMD;
+ pcibios_write_config_word(dev->bus->number, dev->devfn,
+ PCI_VENDOR_ID, PCI_VENDOR_ID_AMD);
+ }
+ }
+}
+
+decl_config_access_method(grackle);
+decl_config_access_method(indirect);
+
+void __init
+chrp_setup_pci_ptrs(void)
+{
+ if ( !strncmp("MOT",
+ get_property(find_path_device("/"), "model", NULL),3) )
+ {
+ pci_dram_offset = 0;
+ isa_mem_base = 0xf7000000;
+ isa_io_base = 0xfe000000;
+ set_config_access_method(grackle);
+ }
+ else
+ {
+ if ( find_compatible_devices( "pci", "IBM,python" ) )
+ {
+ /*
+ * We assume these values but should someday get them
+ * from the device tree or python itself instead -- Cort
+ */
+ pci_dram_offset = 0x80000000;
+ isa_mem_base = 0xa0000000;
+ isa_io_base = 0x88000000;
+ set_config_access_method(python);
+ }
+ else
+ {
+ pci_dram_offset = 0;
+ isa_mem_base = 0xf7000000;
+ isa_io_base = 0xf8000000;
+ set_config_access_method(gg2);
+ }
+ }
+
+ ppc_md.pcibios_fixup = chrp_pcibios_fixup;
}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/chrp_setup.c linux/arch/ppc/kernel/chrp_setup.c
--- v2.2.7/linux/arch/ppc/kernel/chrp_setup.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/chrp_setup.c Thu Apr 29 12:39:01 1999
@@ -41,8 +41,50 @@
#include
#include
#include
-
-extern void hydra_init(void);
+#include
+#include
+#include
+#include