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 Thu Apr 29 11:53:41 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
==========
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/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 Fri Apr 30 08:23:23 1999
@@ -1407,8 +1407,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 +1419,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/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 Thu May 6 16:48:51 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/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
+#include
+
+#include "time.h"
+#include "local_irq.h"
+#include "i8259.h"
+#include "open_pic.h"
+
+/* Fixme - need to move these into their own .c and .h file */
+extern void i8259_mask_and_ack_irq(unsigned int irq_nr);
+extern void i8259_set_irq_mask(unsigned int irq_nr);
+extern void i8259_mask_irq(unsigned int irq_nr);
+extern void i8259_unmask_irq(unsigned int irq_nr);
+extern void i8259_init(void);
+
+/* Fixme - remove this when it is fixed. - Corey */
+extern volatile unsigned char *chrp_int_ack_special;
+
+unsigned long chrp_get_rtc_time(void);
+int chrp_set_rtc_time(unsigned long nowtime);
+void chrp_calibrate_decr(void);
+void chrp_time_init(void);
+
+void chrp_setup_pci_ptrs(void);
+
+extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
+extern int pckbd_getkeycode(unsigned int scancode);
+extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
+ char raw_mode);
+extern char pckbd_unexpected_up(unsigned char keycode);
+extern void pckbd_leds(unsigned char leds);
+extern void pckbd_init_hw(void);
+extern unsigned char pckbd_sysrq_xlate[128];
+extern int mackbd_setkeycode(unsigned int scancode, unsigned int keycode);
+extern int mackbd_getkeycode(unsigned int scancode);
+extern int mackbd_translate(unsigned char scancode, unsigned char *keycode,
+ char raw_mode);
+extern char mackbd_unexpected_up(unsigned char keycode);
+extern void mackbd_leds(unsigned char leds);
+extern void mackbd_init_hw(void);
+extern unsigned char mackbd_sysrq_xlate[128];
/* for the mac fs */
kdev_t boot_dev;
@@ -61,17 +103,17 @@
#endif
static const char *gg2_memtypes[4] = {
- "FPM", "SDRAM", "EDO", "BEDO"
+ "FPM", "SDRAM", "EDO", "BEDO"
};
static const char *gg2_cachesizes[4] = {
- "256 KB", "512 KB", "1 MB", "Reserved"
+ "256 KB", "512 KB", "1 MB", "Reserved"
};
static const char *gg2_cachetypes[4] = {
- "Asynchronous", "Reserved", "Flow-Through Synchronous",
- "Pipelined Synchronous"
+ "Asynchronous", "Reserved", "Flow-Through Synchronous",
+ "Pipelined Synchronous"
};
static const char *gg2_cachemodes[4] = {
- "Disabled", "Write-Through", "Copy-Back", "Transparent Mode"
+ "Disabled", "Write-Through", "Copy-Back", "Transparent Mode"
};
int
@@ -84,7 +126,7 @@
root = find_path_device("/");
if (root)
- model = get_property(root, "model", NULL);
+ model = get_property(root, "model", NULL);
len = sprintf(buffer,"machine\t\t: CHRP %s\n", model);
/* longtrail (goldengate) stuff */
@@ -137,7 +179,7 @@
return len;
}
- /*
+/*
* Fixes for the National Semiconductor PC78308VUL SuperI/O
*
* Some versions of Open Firmware incorrectly initialize the IRQ settings
@@ -146,56 +188,56 @@
__initfunc(static inline void sio_write(u8 val, u8 index))
{
- outb(index, 0x15c);
- outb(val, 0x15d);
+ outb(index, 0x15c);
+ outb(val, 0x15d);
}
__initfunc(static inline u8 sio_read(u8 index))
{
- outb(index, 0x15c);
- return inb(0x15d);
+ outb(index, 0x15c);
+ return inb(0x15d);
}
__initfunc(static void sio_fixup_irq(const char *name, u8 device, u8 level,
u8 type))
{
- u8 level0, type0, active;
+ u8 level0, type0, active;
- /* select logical device */
- sio_write(device, 0x07);
- active = sio_read(0x30);
- level0 = sio_read(0x70);
- type0 = sio_read(0x71);
- printk("sio: %s irq level %d, type %d, %sactive: ", name, level0, type0,
- !active ? "in" : "");
- if (level0 == level && type0 == type && active)
- printk("OK\n");
- else {
- printk("remapping to level %d, type %d, active\n", level, type);
- sio_write(0x01, 0x30);
- sio_write(level, 0x70);
- sio_write(type, 0x71);
- }
+ /* select logical device */
+ sio_write(device, 0x07);
+ active = sio_read(0x30);
+ level0 = sio_read(0x70);
+ type0 = sio_read(0x71);
+ printk("sio: %s irq level %d, type %d, %sactive: ", name, level0, type0,
+ !active ? "in" : "");
+ if (level0 == level && type0 == type && active)
+ printk("OK\n");
+ else {
+ printk("remapping to level %d, type %d, active\n", level, type);
+ sio_write(0x01, 0x30);
+ sio_write(level, 0x70);
+ sio_write(type, 0x71);
+ }
}
__initfunc(static void sio_init(void))
{
- /* logical device 0 (KBC/Keyboard) */
- sio_fixup_irq("keyboard", 0, 1, 2);
- /* select logical device 1 (KBC/Mouse) */
- sio_fixup_irq("mouse", 1, 12, 2);
+ /* logical device 0 (KBC/Keyboard) */
+ sio_fixup_irq("keyboard", 0, 1, 2);
+ /* select logical device 1 (KBC/Mouse) */
+ sio_fixup_irq("mouse", 1, 12, 2);
}
__initfunc(void
-chrp_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p))
+ chrp_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p))
{
extern char cmd_line[];
/* init to some ~sane value until calibrate_delay() runs */
loops_per_sec = 50000000;
-
+
#ifdef CONFIG_BLK_DEV_INITRD
/* this is fine for chrp */
initrd_below_start_ok = 1;
@@ -243,27 +285,207 @@
if ( !strncmp("MOT", get_property(find_path_device("/"),
"model", NULL),3) )
*memory_start_p = pmac_find_bridges(*memory_start_p, *memory_end_p);
+ /*
+ * The f50 has a lot of IO space - we need to map some in that
+ * isn't covered by the BAT mappings in MMU_init() -- Cort
+ */
+ if ( !strncmp("F5", get_property(find_path_device("/"),
+ "ibm,model-class", NULL),2) )
+ {
+#if 0
+ /*
+ * This ugly hack allows us to force ioremap() to
+ * create a 1-to-1 mapping for us, even though
+ * the address is < ioremap_base. This is necessary
+ * since we want our PCI IO space to have contiguous
+ * virtual addresses and I think it's worse to have
+ * calls to map_page() here.
+ * -- Cort
+ */
+ unsigned long hold = ioremap_base;
+ ioremap_base = 0;
+ __ioremap(0x90000000, 0x10000000, _PAGE_NO_CACHE);
+ ioremap_base = hold;
+#endif
+ }
}
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+void
+chrp_restart(char *cmd)
+{
+#if 0
+ extern unsigned int rtas_entry, rtas_data, rtas_size;
+ printk("RTAS system-reboot returned %d\n",
+ call_rtas("system-reboot", 0, 1, NULL));
+ printk("rtas_entry: %08lx rtas_data: %08lx rtas_size: %08lx\n",
+ rtas_entry,rtas_data,rtas_size);
+ for (;;);
+#else
+ printk("System Halted\n");
+ while(1);
+#endif
+}
-unsigned int chrp_ide_irq = 0;
-int chrp_ide_ports_known = 0;
-ide_ioreg_t chrp_ide_regbase[MAX_HWIFS];
-ide_ioreg_t chrp_idedma_regbase;
+void
+chrp_power_off(void)
+{
+ /* RTAS doesn't seem to work on Longtrail.
+ For now, do it the same way as the PReP. */
+#if 0
+ extern unsigned int rtas_entry, rtas_data, rtas_size;
+ printk("RTAS power-off returned %d\n",
+ call_rtas("power-off", 2, 1, NULL, 0, 0));
+ printk("rtas_entry: %08lx rtas_data: %08lx rtas_size: %08lx\n",
+ rtas_entry,rtas_data,rtas_size);
+ for (;;);
+#else
+ chrp_restart(NULL);
+#endif
+}
-void chrp_ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int *irq)
+void
+chrp_halt(void)
{
- ide_ioreg_t port = base;
- int i = 8;
+ chrp_restart(NULL);
+}
- while (i--)
- *p++ = port++;
- *p++ = port;
- if (irq != NULL)
- *irq = chrp_ide_irq;
+u_int
+chrp_irq_cannonicalize(u_int irq)
+{
+ if (irq == 2)
+ {
+ return 9;
+ }
+ else
+ {
+ return irq;
+ }
+}
+
+void
+chrp_do_IRQ(struct pt_regs *regs,
+ int cpu,
+ int isfake)
+{
+ int irq;
+ unsigned long bits = 0;
+ int openpic_eoi_done = 0;
+
+#ifdef __SMP__
+ {
+ unsigned int loops = 1000000;
+ while (test_bit(0, &global_irq_lock)) {
+ if (smp_processor_id() == global_irq_holder) {
+ printk("uh oh, interrupt while we hold global irq lock!\n");
+#ifdef CONFIG_XMON
+ xmon(0);
+#endif
+ break;
+ }
+ if (loops-- == 0) {
+ printk("do_IRQ waiting for irq lock (holder=%d)\n", global_irq_holder);
+#ifdef CONFIG_XMON
+ xmon(0);
+#endif
+ }
+ }
+ }
+#endif /* __SMP__ */
+
+ irq = openpic_irq(0);
+ if (irq == IRQ_8259_CASCADE)
+ {
+ /*
+ * This magic address generates a PCI IACK cycle.
+ *
+ * This should go in the above mask/ack code soon. -- Cort
+ */
+ irq = *chrp_int_ack_special;
+ /*
+ * Acknowledge as soon as possible to allow i8259
+ * interrupt nesting */
+ openpic_eoi(0);
+ openpic_eoi_done = 1;
+ }
+ if (irq == OPENPIC_VEC_SPURIOUS)
+ {
+ /*
+ * Spurious interrupts should never be
+ * acknowledged
+ */
+ ppc_spurious_interrupts++;
+ openpic_eoi_done = 1;
+ goto out;
+ }
+ bits = 1UL << irq;
+
+ if (irq < 0)
+ {
+ printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n",
+ irq, regs->nip);
+ ppc_spurious_interrupts++;
+ }
+ else
+ {
+ ppc_irq_dispatch_handler( regs, irq );
+ }
+out:
+ if (!openpic_eoi_done)
+ openpic_eoi(0);
}
+__initfunc(void
+ chrp_init_IRQ(void))
+{
+ struct device_node *np;
+ int i;
+
+ if ( !(np = find_devices("pci") ) )
+ printk("Cannot find pci to get ack address\n");
+ else
+ {
+ chrp_int_ack_special = (volatile unsigned char *)
+ (*(unsigned long *)get_property(np,
+ "8259-interrupt-acknowledge", NULL));
+ }
+ for ( i = 16 ; i < NR_IRQS ; i++ )
+ irq_desc[i].ctl = &open_pic;
+ /* openpic knows that it's at irq 16 offset
+ * so we don't need to set it in the pic structure
+ * -- Cort
+ */
+ openpic_init(1);
+ for ( i = 0 ; i < 16 ; i++ )
+ irq_desc[i].ctl = &i8259_pic;
+ i8259_init();
+#ifdef CONFIG_XMON
+ request_irq(openpic_to_irq(HYDRA_INT_ADB_NMI),
+ xmon_irq, 0, "NMI", 0);
+#endif /* CONFIG_XMON */
+#ifdef __SMP__
+ request_irq(openpic_to_irq(OPENPIC_VEC_IPI),
+ openpic_ipi_action, 0, "IPI0", 0);
+#endif /* __SMP__ */
+}
+
+__initfunc(void
+ chrp_init2(void))
+{
+ adb_init();
+
+ /* Should this be here? - Corey */
+ pmac_nvram_init();
+}
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+/*
+ * IDE stuff.
+ */
+unsigned int chrp_ide_irq = 0;
+int chrp_ide_ports_known = 0;
+ide_ioreg_t chrp_ide_regbase[MAX_HWIFS];
+ide_ioreg_t chrp_idedma_regbase;
+
void chrp_ide_probe(void) {
struct pci_dev *pdev = pci_find_device(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, NULL);
@@ -281,9 +503,167 @@
}
}
+void
+chrp_ide_insw(ide_ioreg_t port, void *buf, int ns)
+{
+ ide_insw(port+_IO_BASE, buf, ns);
+}
+
+void
+chrp_ide_outsw(ide_ioreg_t port, void *buf, int ns)
+{
+ ide_outsw(port+_IO_BASE, buf, ns);
+}
+
+int
+chrp_ide_default_irq(ide_ioreg_t base)
+{
+ if (chrp_ide_ports_known == 0)
+ chrp_ide_probe();
+ return chrp_ide_irq;
+}
+
+ide_ioreg_t
+chrp_ide_default_io_base(int index)
+{
+ if (chrp_ide_ports_known == 0)
+ chrp_ide_probe();
+ return chrp_ide_regbase[index];
+}
+
+int
+chrp_ide_check_region(ide_ioreg_t from, unsigned int extent)
+{
+ return check_region(from, extent);
+}
+
+void
+chrp_ide_request_region(ide_ioreg_t from,
+ unsigned int extent,
+ const char *name)
+{
+ request_region(from, extent, name);
+}
+
+void
+chrp_ide_release_region(ide_ioreg_t from,
+ unsigned int extent)
+{
+ release_region(from, extent);
+}
+
+void
+chrp_ide_fix_driveid(struct hd_driveid *id)
+{
+ ppc_generic_ide_fix_driveid(id);
+}
+
+void chrp_ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int *irq)
+{
+ ide_ioreg_t port = base;
+ int i = 8;
+
+ while (i--)
+ *p++ = port++;
+ *p++ = port;
+ if (irq != NULL)
+ *irq = chrp_ide_irq;
+}
+
EXPORT_SYMBOL(chrp_ide_irq);
EXPORT_SYMBOL(chrp_ide_ports_known);
EXPORT_SYMBOL(chrp_ide_regbase);
EXPORT_SYMBOL(chrp_ide_probe);
#endif
+
+__initfunc(void
+ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ unsigned long r6, unsigned long r7))
+{
+ chrp_setup_pci_ptrs();
+#ifdef CONFIG_BLK_DEV_INITRD
+ /* take care of initrd if we have one */
+ if ( r3 )
+ {
+ initrd_start = r3 + KERNELBASE;
+ initrd_end = r3 + r4 + KERNELBASE;
+ }
+#endif /* CONFIG_BLK_DEV_INITRD */
+
+ /* pci_dram_offset/isa_io_base/isa_mem_base set by setup_pci_ptrs() */
+ ISA_DMA_THRESHOLD = ~0L;
+ DMA_MODE_READ = 0x44;
+ DMA_MODE_WRITE = 0x48;
+
+ ppc_md.setup_arch = chrp_setup_arch;
+ ppc_md.setup_residual = NULL;
+ ppc_md.get_cpuinfo = chrp_get_cpuinfo;
+ ppc_md.irq_cannonicalize = chrp_irq_cannonicalize;
+ ppc_md.init_IRQ = chrp_init_IRQ;
+ ppc_md.do_IRQ = chrp_do_IRQ;
+
+ ppc_md.init = chrp_init2;
+
+ ppc_md.restart = chrp_restart;
+ ppc_md.power_off = chrp_power_off;
+ ppc_md.halt = chrp_halt;
+
+ ppc_md.time_init = chrp_time_init;
+ ppc_md.set_rtc_time = chrp_set_rtc_time;
+ ppc_md.get_rtc_time = chrp_get_rtc_time;
+ ppc_md.calibrate_decr = chrp_calibrate_decr;
+
+#ifdef CONFIG_VT
+#ifdef CONFIG_MAC_KEYBOAD
+ if ( adb_hardware == ADB_NONE )
+ {
+ ppc_md.kbd_setkeycode = pckbd_setkeycode;
+ ppc_md.kbd_getkeycode = pckbd_getkeycode;
+ ppc_md.kbd_translate = pckbd_translate;
+ ppc_md.kbd_unexpected_up = pckbd_unexpected_up;
+ ppc_md.kbd_leds = pckbd_leds;
+ ppc_md.kbd_init_hw = pckbd_init_hw;
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+#endif
+ }
+ else
+ {
+ ppc_md.kbd_setkeycode = mackbd_setkeycode;
+ ppc_md.kbd_getkeycode = mackbd_getkeycode;
+ ppc_md.kbd_translate = mackbd_translate;
+ ppc_md.kbd_unexpected_up = mackbd_unexpected_up;
+ ppc_md.kbd_leds = mackbd_leds;
+ ppc_md.kbd_init_hw = mackbd_init_hw;
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.kbd_sysrq_xlate = mackbd_sysrq_xlate;
+#endif
+ }
+#else
+ ppc_md.kbd_setkeycode = pckbd_setkeycode;
+ ppc_md.kbd_getkeycode = pckbd_getkeycode;
+ ppc_md.kbd_translate = pckbd_translate;
+ ppc_md.kbd_unexpected_up = pckbd_unexpected_up;
+ ppc_md.kbd_leds = pckbd_leds;
+ ppc_md.kbd_init_hw = pckbd_init_hw;
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+#endif
+#endif
+#endif
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+ ppc_ide_md.insw = chrp_ide_insw;
+ ppc_ide_md.outsw = chrp_ide_outsw;
+ ppc_ide_md.default_irq = chrp_ide_default_irq;
+ ppc_ide_md.default_io_base = chrp_ide_default_io_base;
+ ppc_ide_md.check_region = chrp_ide_check_region;
+ ppc_ide_md.request_region = chrp_ide_request_region;
+ ppc_ide_md.release_region = chrp_ide_release_region;
+ ppc_ide_md.fix_driveid = chrp_ide_fix_driveid;
+ ppc_ide_md.ide_init_hwif = chrp_ide_init_hwif_ports;
+
+ ppc_ide_md.io_base = _IO_BASE;
+#endif
+}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/head.S linux/arch/ppc/kernel/head.S
--- v2.2.7/linux/arch/ppc/kernel/head.S Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/head.S Thu Apr 29 12:39:01 1999
@@ -1,7 +1,7 @@
/*
* arch/ppc/kernel/head.S
*
- * $Id: head.S,v 1.121 1999/03/16 10:40:29 cort Exp $
+ * $Id: head.S,v 1.127 1999/04/07 07:26:55 paulus Exp $
*
* PowerPC version
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
@@ -91,7 +91,7 @@
#define tlbia \
li r4,128; \
mtctr r4; \
- lis r4,0xC000; \
+ lis r4,KERNELBASE@h; \
0: tlbie r4; \
addi r4,r4,0x1000; \
bdnz 0b
@@ -415,7 +415,7 @@
* this, we leave this much untouched space on the stack on exception
* entry.
*/
-#define STACK_UNDERHEAD 64
+#define STACK_UNDERHEAD 0
/*
* Exception entry code. This code runs with address translation
@@ -1495,27 +1495,25 @@
* On SMP we know the fpu is free, since we give it up every
* switch. -- Cort
*/
+ mfmsr r5
+ ori r5,r5,MSR_FP
+ SYNC
+ mtmsr r5 /* enable use of fpu now */
+ SYNC
+/*
+ * For SMP, we don't do lazy FPU switching because it just gets too
+ * horrendously complex, especially when a task switches from one CPU
+ * to another. Instead we call giveup_fpu in switch_to.
+ */
+#ifndef __SMP__
#ifndef CONFIG_APUS
lis r6,-KERNELBASE@h
#else
lis r6,CYBERBASEp@h
lwz r6,0(r6)
#endif
-
addis r3,r6,last_task_used_math@ha
lwz r4,last_task_used_math@l(r3)
- mfmsr r5
- ori r5,r5,MSR_FP
- SYNC
- mtmsr r5 /* enable use of fpu now */
-/*
- * All the saving of last_task_used_math is handled
- * by a switch_to() call to smp_giveup_fpu() in SMP so
- * last_task_used_math is not used.
- * -- Cort
- */
-#ifndef __SMP__
- SYNC
cmpi 0,r4,0
beq 1f
add r4,r4,r6
@@ -1529,15 +1527,17 @@
li r20,MSR_FP|MSR_FE0|MSR_FE1
andc r4,r4,r20 /* disable FP for previous task */
stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+1:
#endif /* __SMP__ */
-1: ori r23,r23,MSR_FP|MSR_FE0|MSR_FE1 /* enable use of FP after return */
+ /* enable use of FP after return */
+ ori r23,r23,MSR_FP|MSR_FE0|MSR_FE1
mfspr r5,SPRG3 /* current task's TSS (phys) */
lfd fr0,TSS_FPSCR-4(r5)
mtfsf 0xff,fr0
REST_32FPRS(0, r5)
+#ifndef __SMP__
subi r4,r5,TSS
sub r4,r4,r6
-#ifndef __SMP__
stw r4,last_task_used_math@l(r3)
#endif /* __SMP__ */
/* restore registers and return */
@@ -1574,48 +1574,44 @@
.align 4
/*
- * Disable FP for the task which had the FPU previously,
- * and save its floating-point registers in its thread_struct.
+ * giveup_fpu(tsk)
+ * Disable FP for the task given as the argument,
+ * and save the floating-point registers in its thread_struct.
* Enables the FPU for use in the kernel on return.
*/
-/* smp_giveup_fpu() takes an arg to tell it where to save the fpu
- * regs since last_task_used_math can't be trusted (many many race
- * conditions). -- Cort
- */
- .globl smp_giveup_fpu
-smp_giveup_fpu:
- mr r4,r3
- b 12f
.globl giveup_fpu
giveup_fpu:
- lis r3,last_task_used_math@ha
- lwz r4,last_task_used_math@l(r3)
-12:
mfmsr r5
ori r5,r5,MSR_FP
SYNC
mtmsr r5 /* enable use of fpu now */
SYNC
- cmpi 0,r4,0
+ cmpi 0,r3,0
beqlr- /* if no previous owner, done */
- addi r4,r4,TSS /* want TSS of last_task_used_math */
+ addi r3,r3,TSS /* want TSS of task */
+ lwz r5,PT_REGS(r3)
+ cmpi 0,r5,0
+ SAVE_32FPRS(0, r3)
+ mffs fr0
+ stfd fr0,TSS_FPSCR-4(r3)
+ beq 1f
+ lwz r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+ li r3,MSR_FP|MSR_FE0|MSR_FE1
+ andc r4,r4,r3 /* disable FP for previous task */
+ stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+1:
#ifndef __SMP__
li r5,0
- stw r5,last_task_used_math@l(r3)
+ lis r4,last_task_used_math@ha
+ stw r5,last_task_used_math@l(r4)
#endif /* __SMP__ */
- SAVE_32FPRS(0, r4)
- mffs fr0
- stfd fr0,TSS_FPSCR-4(r4)
- lwz r5,PT_REGS(r4)
- lwz r3,_MSR-STACK_FRAME_OVERHEAD(r5)
- li r4,MSR_FP|MSR_FE0|MSR_FE1
- andc r3,r3,r4 /* disable FP for previous task */
- stw r3,_MSR-STACK_FRAME_OVERHEAD(r5)
+ blr
+
#else /* CONFIG_8xx */
.globl giveup_fpu
giveup_fpu:
-#endif /* CONFIG_8xx */
blr
+#endif /* CONFIG_8xx */
/*
* This code is jumped to from the startup code to copy
@@ -2127,8 +2123,8 @@
lwz r5,_MSR(r1)
and. r5,r5,r4
beq 2f
-3: lis r4,n_lost_interrupts@ha
- lwz r4,n_lost_interrupts@l(r4)
+3: lis r4,ppc_n_lost_interrupts@ha
+ lwz r4,ppc_n_lost_interrupts@l(r4)
cmpi 0,r4,0
beq+ 1f
addi r3,r1,STACK_FRAME_OVERHEAD
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/i8259.c linux/arch/ppc/kernel/i8259.c
--- v2.2.7/linux/arch/ppc/kernel/i8259.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/i8259.c Thu Apr 29 12:39:01 1999
@@ -0,0 +1,96 @@
+
+#include
+#include
+#include
+#include
+#include
+#include "i8259.h"
+
+unsigned char cached_8259[2] = { 0xff, 0xff };
+#define cached_A1 (cached_8259[0])
+#define cached_21 (cached_8259[1])
+
+static void i8259_mask_and_ack_irq(unsigned int irq_nr)
+{
+ if ( irq_nr >= i8259_pic.irq_offset )
+ irq_nr -= i8259_pic.irq_offset;
+
+ if (irq_nr > 7) {
+ cached_A1 |= 1 << (irq_nr-8);
+ inb(0xA1); /* DUMMY */
+ outb(cached_A1,0xA1);
+ outb(0x20,0xA0); /* Non-specific EOI */
+ outb(0x20,0x20); /* Non-specific EOI to cascade */
+ } else {
+ cached_21 |= 1 << irq_nr;
+ inb(0x21); /* DUMMY */
+ outb(cached_21,0x21);
+ outb(0x20,0x20); /* Non-specific EOI */
+ }
+}
+
+static void i8259_set_irq_mask(int irq_nr)
+{
+ outb(cached_A1,0xA1);
+ outb(cached_21,0x21);
+}
+
+static void i8259_mask_irq(unsigned int irq_nr)
+{
+ if ( irq_nr >= i8259_pic.irq_offset )
+ irq_nr -= i8259_pic.irq_offset;
+ if ( irq_nr < 8 )
+ cached_21 |= 1 << irq_nr;
+ else
+ cached_A1 |= 1 << (irq_nr-8);
+ i8259_set_irq_mask(irq_nr);
+}
+
+static void i8259_unmask_irq(unsigned int irq_nr)
+{
+
+ if ( irq_nr >= i8259_pic.irq_offset )
+ irq_nr -= i8259_pic.irq_offset;
+ if ( irq_nr < 8 )
+ cached_21 &= ~(1 << irq_nr);
+ else
+ cached_A1 &= ~(1 << (irq_nr-8));
+ i8259_set_irq_mask(irq_nr);
+}
+
+struct hw_interrupt_type i8259_pic = {
+ " i8259 ",
+ NULL,
+ NULL,
+ NULL,
+ i8259_unmask_irq,
+ i8259_mask_irq,
+ i8259_mask_and_ack_irq,
+ 0
+};
+
+static void
+no_action(int cpl, void *dev_id, struct pt_regs *regs)
+{
+}
+
+void __init i8259_init(void)
+{
+ /* init master interrupt controller */
+ outb(0x11, 0x20); /* Start init sequence */
+ outb(0x00, 0x21); /* Vector base */
+ outb(0x04, 0x21); /* edge tiggered, Cascade (slave) on IRQ2 */
+ outb(0x01, 0x21); /* Select 8086 mode */
+ outb(0xFF, 0x21); /* Mask all */
+ /* init slave interrupt controller */
+ outb(0x11, 0xA0); /* Start init sequence */
+ outb(0x08, 0xA1); /* Vector base */
+ outb(0x02, 0xA1); /* edge triggered, Cascade (slave) on IRQ2 */
+ outb(0x01, 0xA1); /* Select 8086 mode */
+ outb(0xFF, 0xA1); /* Mask all */
+ outb(cached_A1, 0xA1);
+ outb(cached_21, 0x21);
+ request_irq( i8259_pic.irq_offset + 2, no_action, SA_INTERRUPT,
+ "82c59 secondary cascade", NULL );
+ enable_irq(i8259_pic.irq_offset + 2); /* Enable cascade interrupt */
+}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/i8259.h linux/arch/ppc/kernel/i8259.h
--- v2.2.7/linux/arch/ppc/kernel/i8259.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/i8259.h Thu Apr 29 12:39:01 1999
@@ -0,0 +1,11 @@
+
+#ifndef _PPC_KERNEL_i8259_H
+#define _PPC_KERNEL_i8259_H
+
+#include "local_irq.h"
+
+extern struct hw_interrupt_type i8259_pic;
+
+void i8259_init(void);
+
+#endif /* _PPC_KERNEL_i8259_H */
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/idle.c linux/arch/ppc/kernel/idle.c
--- v2.2.7/linux/arch/ppc/kernel/idle.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/idle.c Thu Apr 29 12:39:01 1999
@@ -1,5 +1,5 @@
/*
- * $Id: idle.c,v 1.60 1999/02/12 07:06:26 cort Exp $
+ * $Id: idle.c,v 1.61 1999/03/18 04:15:45 cort Exp $
*
* Idle daemon for PowerPC. Idle daemon will handle any action
* that needs to be taken when the system becomes idle.
@@ -303,7 +303,14 @@
hid0 &= ~(HID0_NAP | HID0_SLEEP | HID0_DOZE);
hid0 |= (powersave_nap? HID0_NAP: HID0_DOZE) | HID0_DPM;
asm("mtspr 1008,%0" : : "r" (hid0));
- msr |= MSR_POW;
+
+ /* set the POW bit in the MSR, and enable interrupts
+ * so we wake up sometime! */
+ _nmask_and_or_msr(0, MSR_POW | MSR_EE);
+
+ /* Disable interrupts again so restore_flags will
+ * work. */
+ _nmask_and_or_msr(MSR_EE, 0);
}
restore_flags(msr);
default:
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/indirect_pci.c linux/arch/ppc/kernel/indirect_pci.c
--- v2.2.7/linux/arch/ppc/kernel/indirect_pci.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/indirect_pci.c Thu Apr 29 12:39:01 1999
@@ -0,0 +1,121 @@
+/*
+ * Support for indirect PCI bridges.
+ *
+ * Copyright (C) 1998 Gabriel Paubert.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include
+#include
+#include
+
+unsigned int * pci_config_address;
+unsigned char * pci_config_data;
+
+int indirect_pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn,
+ unsigned char offset, unsigned char *val)
+{
+ unsigned flags;
+
+ save_flags(flags); cli();
+
+ out_be32(pci_config_address,
+ ((offset&0xfc)<<24) | (dev_fn<<16) | (bus<<8) | 0x80);
+
+ *val= in_8(pci_config_data + (offset&3));
+
+ restore_flags(flags);
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int indirect_pcibios_read_config_word(unsigned char bus, unsigned char dev_fn,
+ unsigned char offset, unsigned short *val)
+{
+ unsigned flags;
+
+ if (offset&1) return PCIBIOS_BAD_REGISTER_NUMBER;
+
+ save_flags(flags); cli();
+
+ out_be32(pci_config_address,
+ ((offset&0xfc)<<24) | (dev_fn<<16) | (bus<<8) | 0x80);
+
+ *val= in_le16((unsigned short *)(pci_config_data + (offset&3)));
+
+ restore_flags(flags);
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int indirect_pcibios_read_config_dword(unsigned char bus, unsigned char dev_fn,
+ unsigned char offset, unsigned int *val)
+{
+ unsigned flags;
+
+ if (offset&3) return PCIBIOS_BAD_REGISTER_NUMBER;
+
+ save_flags(flags); cli();
+
+ out_be32(pci_config_address,
+ ((offset&0xfc)<<24) | (dev_fn<<16) | (bus<<8) | 0x80);
+
+ *val= in_le32((unsigned *)pci_config_data);
+
+ restore_flags(flags);
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int indirect_pcibios_write_config_byte(unsigned char bus, unsigned char dev_fn,
+ unsigned char offset, unsigned char val)
+{
+ unsigned flags;
+
+ save_flags(flags); cli();
+
+ out_be32(pci_config_address,
+ ((offset&0xfc)<<24) | (dev_fn<<16) | (bus<<8) | 0x80);
+
+ out_8(pci_config_data + (offset&3), val);
+
+ restore_flags(flags);
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int indirect_pcibios_write_config_word(unsigned char bus, unsigned char dev_fn,
+ unsigned char offset, unsigned short val)
+{
+ unsigned flags;
+
+ if (offset&1) return PCIBIOS_BAD_REGISTER_NUMBER;
+
+ save_flags(flags); cli();
+
+ out_be32(pci_config_address,
+ ((offset&0xfc)<<24) | (dev_fn<<16) | (bus<<8) | 0x80);
+
+ out_le16((unsigned short *)(pci_config_data + (offset&3)), val);
+
+ restore_flags(flags);
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int indirect_pcibios_write_config_dword(unsigned char bus, unsigned char dev_fn,
+ unsigned char offset, unsigned short val)
+{
+ unsigned flags;
+
+ if (offset&3) return PCIBIOS_BAD_REGISTER_NUMBER;
+
+ save_flags(flags); cli();
+
+ out_be32(pci_config_address,
+ ((offset&0xfc)<<24) | (dev_fn<<16) | (bus<<8) | 0x80);
+
+ out_le32((unsigned *)pci_config_data, val);
+
+ restore_flags(flags);
+ return PCIBIOS_SUCCESSFUL;
+}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/irq.c linux/arch/ppc/kernel/irq.c
--- v2.2.7/linux/arch/ppc/kernel/irq.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/irq.c Thu Apr 29 12:39:01 1999
@@ -1,5 +1,5 @@
/*
- * $Id: irq.c,v 1.102 1999/02/03 01:36:59 paulus Exp $
+ * $Id: irq.c,v 1.105 1999/03/25 19:51:51 cort Exp $
*
* arch/ppc/kernel/irq.c
*
@@ -58,44 +58,15 @@
#include
#include
#include
-#ifdef CONFIG_8xx
-#include
-#include
-#endif
-static void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
+#include "local_irq.h"
+
extern volatile unsigned long ipi_count;
-static void dispatch_handler(struct pt_regs *regs, int irq);
void enable_irq(unsigned int irq_nr);
void disable_irq(unsigned int irq_nr);
-static void i8259_mask_and_ack_irq(unsigned int irq_nr);
-static void i8259_mask_irq(unsigned int irq_nr);
-static void i8259_unmask_irq(unsigned int irq_nr);
-#ifdef CONFIG_8xx
-static void mbx_mask_and_ack(unsigned int irq_nr);
-static void mbx_mask_irq(unsigned int irq_nr);
-static void mbx_unmask_irq(unsigned int irq_nr);
-static void mbx_i8259_action(int cpl, void *dev_id, struct pt_regs *regs);
-#else /* CONFIG_8xx */
-static volatile unsigned char *chrp_int_ack_special;
-extern void process_int(unsigned long vec, struct pt_regs *fp);
-extern void apus_init_IRQ(void);
-extern void amiga_disable_irq(unsigned int irq);
-extern void amiga_enable_irq(unsigned int irq);
-static void pmac_fix_gatwick_interrupts(struct device_node *gw, int irq_base);
-static void gatwick_action(int cpl, void *dev_id, struct pt_regs *regs);
-static void pmac_mask_irq(unsigned int irq_nr);
-static void pmac_unmask_irq(unsigned int irq_nr);
-static void pmac_mask_and_ack_irq(unsigned int irq_nr);
-static void chrp_mask_and_ack_irq(unsigned int irq_nr);
-static void chrp_unmask_irq(unsigned int irq_nr);
-static void chrp_mask_irq(unsigned int irq_nr);
-#ifdef __SMP__
-static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs);
-extern void smp_message_recv(void);
-#endif /* __SMP__ */
-#endif /* CONFIG_8xx */
+/* Fixme - Need to figure out a way to get rid of this - Corey */
+volatile unsigned char *chrp_int_ack_special;
#ifdef CONFIG_APUS
/* Rename a few functions. Requires the CONFIG_APUS protection. */
@@ -105,39 +76,19 @@
#define VEC_SPUR (24)
#endif
+#define MAXCOUNT 10000000
+
#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
-unsigned char cached_8259[2] = { 0xff, 0xff };
-#define cached_A1 (cached_8259[0])
-#define cached_21 (cached_8259[1])
-
-unsigned int local_bh_count[NR_CPUS];
-unsigned int local_irq_count[NR_CPUS];
-int max_irqs;
-int max_real_irqs;
-static int spurious_interrupts = 0;
-static unsigned int cached_irq_mask[NR_MASK_WORDS];
-unsigned int lost_interrupts[NR_MASK_WORDS];
-atomic_t n_lost_interrupts;
-
-#ifndef CONFIG_8xx
-#define GATWICK_IRQ_POOL_SIZE 10
-static struct interrupt_info gatwick_int_pool[GATWICK_IRQ_POOL_SIZE];
-/* pmac */
-struct pmac_irq_hw {
- unsigned int flag;
- unsigned int enable;
- unsigned int ack;
- unsigned int level;
-};
-
-/* these addresses are obtained from the device tree now -- Cort */
-volatile struct pmac_irq_hw *pmac_irq_hw[4] __pmac = {
- (struct pmac_irq_hw *) 0xf3000020,
- (struct pmac_irq_hw *) 0xf3000010,
- (struct pmac_irq_hw *) 0xf4000020,
- (struct pmac_irq_hw *) 0xf4000010,
-};
-#endif /* CONFIG_8xx */
+
+int ppc_spurious_interrupts = 0;
+
+unsigned int ppc_local_bh_count[NR_CPUS];
+unsigned int ppc_local_irq_count[NR_CPUS];
+struct irqaction *ppc_irq_action[NR_IRQS];
+unsigned int ppc_cached_irq_mask[NR_MASK_WORDS];
+unsigned int ppc_lost_interrupts[NR_MASK_WORDS];
+atomic_t ppc_n_lost_interrupts;
+
/* nasty hack for shared irq's since we need to do kmalloc calls but
* can't very early in the boot when we need to do a request irq.
@@ -174,82 +125,7 @@
kfree(ptr);
}
-struct hw_interrupt_type {
- const char * typename;
- void (*startup)(unsigned int irq);
- void (*shutdown)(unsigned int irq);
- void (*handle)(unsigned int irq, struct pt_regs * regs);
- void (*enable)(unsigned int irq);
- void (*disable)(unsigned int irq);
- void (*mask_and_ack)(unsigned int irq);
- int irq_offset;
-};
-
-#define mask_irq(irq) ({if (irq_desc[irq].ctl && irq_desc[irq].ctl->disable) irq_desc[irq].ctl->disable(irq);})
-#define unmask_irq(irq) ({if (irq_desc[irq].ctl && irq_desc[irq].ctl->enable) irq_desc[irq].ctl->enable(irq);})
-#define mask_and_ack_irq(irq) ({if (irq_desc[irq].ctl && irq_desc[irq].ctl->mask_and_ack) irq_desc[irq].ctl->mask_and_ack(irq);})
-
-struct irqdesc {
- struct irqaction *action;
- struct hw_interrupt_type *ctl;
-};
-static struct irqdesc irq_desc[NR_IRQS] = {{0, 0}, };
-
-static struct hw_interrupt_type i8259_pic = {
- " i8259 ",
- NULL,
- NULL,
- NULL,
- i8259_unmask_irq,
- i8259_mask_irq,
- i8259_mask_and_ack_irq,
- 0
-};
-#ifndef CONFIG_8xx
-static struct hw_interrupt_type pmac_pic = {
- " PMAC-PIC ",
- NULL,
- NULL,
- NULL,
- pmac_unmask_irq,
- pmac_mask_irq,
- pmac_mask_and_ack_irq,
- 0
-};
-
-static struct hw_interrupt_type gatwick_pic = {
- " GATWICK ",
- NULL,
- NULL,
- NULL,
- pmac_unmask_irq,
- pmac_mask_irq,
- pmac_mask_and_ack_irq,
- 0
-};
-
-static struct hw_interrupt_type open_pic = {
- " OpenPIC ",
- NULL,
- NULL,
- NULL,
- chrp_unmask_irq,
- chrp_mask_irq,
- chrp_mask_and_ack_irq,
- 0
-};
-#else
-static struct hw_interrupt_type ppc8xx_pic = {
- " 8xx SIU ",
- NULL,
- NULL,
- NULL,
- mbx_unmask_irq,
- mbx_mask_irq,
- mbx_mask_and_ack,
- 0
-};
-#endif /* CONFIG_8xx */
+struct irqdesc irq_desc[NR_IRQS] = {{0, 0}, };
int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
@@ -357,19 +233,17 @@
}
#ifdef __SMP__
/* should this be per processor send/receive? */
- len += sprintf(buf+len, "IPI: %10lu", ipi_count);
- for ( i = 0 ; i <= smp_num_cpus-1; i++ )
- len += sprintf(buf+len," ");
- len += sprintf(buf+len, " interprocessor messages received\n");
+ len += sprintf(buf+len, "IPI: %10lu\n", ipi_count);
#endif
- len += sprintf(buf+len, "BAD: %10u",spurious_interrupts);
- for ( i = 0 ; i <= smp_num_cpus-1; i++ )
- len += sprintf(buf+len," ");
- len += sprintf(buf+len, " spurious or short\n");
+ len += sprintf(buf+len, "BAD: %10u\n", ppc_spurious_interrupts);
return len;
}
-static void dispatch_handler(struct pt_regs *regs, int irq)
+/*
+ * Eventually, this should take an array of interrupts and an array size
+ * so it can dispatch multiple interrupts.
+ */
+void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)
{
int status;
struct irqaction *action;
@@ -390,209 +264,18 @@
__cli();
unmask_irq(irq);
} else {
- spurious_interrupts++;
+ ppc_spurious_interrupts++;
disable_irq( irq );
}
}
-#define MAXCOUNT 100000000
asmlinkage void do_IRQ(struct pt_regs *regs, int isfake)
{
- int irq;
- unsigned long bits = 0;
int cpu = smp_processor_id();
- int openpic_eoi_done = 0;
-
- hardirq_enter(cpu);
-#ifndef CONFIG_8xx
-#ifdef __SMP__
- /* IPI's are a hack on the powersurge -- Cort */
- if ( (_machine == _MACH_Pmac) && (cpu != 0) )
- {
- if (!isfake)
- {
-#ifdef CONFIG_XMON
- static int xmon_2nd;
- if (xmon_2nd)
- xmon(regs);
-#endif
- smp_message_recv();
- goto out;
- }
- /* could be here due to a do_fake_interrupt call but we don't
- mess with the controller from the second cpu -- Cort */
- goto out;
- }
-
- {
- unsigned int loops = MAXCOUNT;
- while (test_bit(0, &global_irq_lock)) {
- if (smp_processor_id() == global_irq_holder) {
- printk("uh oh, interrupt while we hold global irq lock!\n");
-#ifdef CONFIG_XMON
- xmon(0);
-#endif
- break;
- }
- if (loops-- == 0) {
- printk("do_IRQ waiting for irq lock (holder=%d)\n", global_irq_holder);
-#ifdef CONFIG_XMON
- xmon(0);
-#endif
- }
- }
- }
-#endif /* __SMP__ */
-
- switch ( _machine )
- {
- case _MACH_Pmac:
- for (irq = max_real_irqs - 1; irq > 0; irq -= 32) {
- int i = irq >> 5;
- bits = ld_le32(&pmac_irq_hw[i]->flag)
- | lost_interrupts[i];
- if (bits == 0)
- continue;
- irq -= cntlzw(bits);
- break;
- }
- break;
- case _MACH_chrp:
- irq = openpic_irq(0);
- if (irq == IRQ_8259_CASCADE)
- {
- /*
- * This magic address generates a PCI IACK cycle.
- *
- * This should go in the above mask/ack code soon. -- Cort
- */
- irq = *chrp_int_ack_special;
- /*
- * Acknowledge as soon as possible to allow i8259
- * interrupt nesting
- */
- openpic_eoi(0);
- openpic_eoi_done = 1;
- }
- if (irq == OPENPIC_VEC_SPURIOUS)
- {
- /*
- * Spurious interrupts should never be
- * acknowledged
- */
- spurious_interrupts++;
- openpic_eoi_done = 1;
- }
- bits = 1UL << irq;
- break;
- case _MACH_prep:
- outb(0x0C, 0x20);
- irq = inb(0x20) & 7;
- if (irq == 2)
- {
- outb(0x0C, 0xA0);
- irq = (inb(0xA0) & 7) + 8;
- bits |= 1UL << irq;
-#if 0
- /* It's possible to loose intrs here
- * if we get 2 intrs in the upper 8
- * bits. We eoi irq 2 and handle one of
- * the upper intrs but then ignore it
- * since we've already eoi-d 2. So,
- * we must keep track of lost intrs.
- * -- Cort
- */
- while (1)
- {
- int i;
- outb(0x0C, 0xA0);
- i = inb(0xA0);
- if ( !(i & 128) )
- break;
- irq &= 7;
- irq += 8;
- bits |= 1UL << irq;
- }
-#endif
- }
- else
- bits = 1UL << irq;
-
- break;
-#ifdef CONFIG_APUS
- case _MACH_apus:
- {
- int old_level, new_level;
-
- old_level = ~(regs->mq) & IPLEMU_IPLMASK;
- new_level = (~(regs->mq) >> 3) & IPLEMU_IPLMASK;
-
- if (new_level == 0)
- {
- goto apus_out;
- }
-
- 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_out:
- hardirq_exit(cpu);
- APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT);
- goto out2;
- }
-#endif
- }
- if (irq < 0)
- {
- printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n",
- irq, regs->nip);
- spurious_interrupts++;
- goto out;
- }
-
-#else /* CONFIG_8xx */
- /* For MPC8xx, read the SIVEC register and shift the bits down
- * to get the irq number.
- */
- bits = ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_sivec;
- irq = bits >> 26;
- irq += ppc8xx_pic.irq_offset;
- bits = 1UL << irq;
-#endif /* CONFIG_8xx */
-#if 0
- /*
- * this allows for > 1 interrupt at a time so we can
- * clear out any 'double' interrupts on prep and
- * finish up the lost interrupts.
- * It doesn't currently work for irqs > 31 so I'm leaving
- * it commented out for now.
- * -- Cort
- */
- for ( i = 0 ; i < sizeof(bits)*8 ; i++ )
- if ( bits & (1UL<= i8259_pic.irq_offset )
- irq_nr -= i8259_pic.irq_offset;
- if (irq_nr > 7) {
- cached_A1 |= 1 << (irq_nr-8);
- inb(0xA1); /* DUMMY */
- outb(cached_A1,0xA1);
- outb(0x62,0x20); /* Specific EOI to cascade */
- /*outb(0x20,0xA0);*/
- outb(0x60|(irq_nr-8), 0xA0); /* specific eoi */
- } else {
- cached_21 |= 1 << irq_nr;
- inb(0x21); /* DUMMY */
- outb(cached_21,0x21);
- /*outb(0x20,0x20);*/
- outb(0x60|irq_nr,0x20); /* specific eoi */
- }
-}
-
-static void i8259_set_irq_mask(int irq_nr)
-{
- outb(cached_A1,0xA1);
- outb(cached_21,0x21);
-}
-
-static void i8259_mask_irq(unsigned int irq_nr)
-{
- if ( irq_nr >= i8259_pic.irq_offset )
- irq_nr -= i8259_pic.irq_offset;
- if ( irq_nr < 8 )
- cached_21 |= 1 << irq_nr;
- else
- cached_A1 |= 1 << (irq_nr-8);
- i8259_set_irq_mask(irq_nr);
-}
-
-static void i8259_unmask_irq(unsigned int irq_nr)
-{
-
- if ( irq_nr >= i8259_pic.irq_offset )
- irq_nr -= i8259_pic.irq_offset;
- if ( irq_nr < 8 )
- cached_21 &= ~(1 << irq_nr);
- else
- cached_A1 &= ~(1 << (irq_nr-8));
- i8259_set_irq_mask(irq_nr);
-}
-
-#ifndef CONFIG_8xx
-static void gatwick_action(int cpl, void *dev_id, struct pt_regs *regs)
-{
- int irq, bits;
-
- for (irq = max_irqs - 1; irq > max_real_irqs; irq -= 32) {
- int i = irq >> 5;
- bits = ld_le32(&pmac_irq_hw[i]->flag)
- | lost_interrupts[i];
- if (bits == 0)
- continue;
- irq -= cntlzw(bits);
- break;
- }
- /* The previous version of this code allowed for this case, we
- * don't. Put this here to check for it.
- * -- Cort
- */
- if ( irq_desc[irq].ctl != &gatwick_pic )
- printk("gatwick irq not from gatwick pic\n");
- else
- dispatch_handler( regs, irq );
-}
-
-void pmac_mask_and_ack_irq(unsigned int irq_nr)
-{
- unsigned long bit = 1UL << (irq_nr & 0x1f);
- int i = irq_nr >> 5;
-
- if ((unsigned)irq_nr >= max_irqs)
- return;
-
- clear_bit(irq_nr, cached_irq_mask);
- if (test_and_clear_bit(irq_nr, lost_interrupts))
- atomic_dec(&n_lost_interrupts);
- out_le32(&pmac_irq_hw[i]->ack, bit);
- out_le32(&pmac_irq_hw[i]->enable, cached_irq_mask[i]);
- out_le32(&pmac_irq_hw[i]->ack, bit);
- do {
- /* make sure ack gets to controller before we enable interrupts */
- mb();
- } while(in_le32(&pmac_irq_hw[i]->flag) & bit);
-
-}
-
-void __openfirmware chrp_mask_and_ack_irq(unsigned int irq_nr)
-{
- if (is_8259_irq(irq_nr))
- i8259_mask_and_ack_irq(irq_nr);
-}
-
-static void pmac_set_irq_mask(int irq_nr)
-{
- unsigned long bit = 1UL << (irq_nr & 0x1f);
- int i = irq_nr >> 5;
-
- if ((unsigned)irq_nr >= max_irqs)
- return;
-
- /* enable unmasked interrupts */
- out_le32(&pmac_irq_hw[i]->enable, cached_irq_mask[i]);
-
- do {
- /* make sure mask gets to controller before we
- return to user */
- mb();
- } while((in_le32(&pmac_irq_hw[i]->enable) & bit)
- != (cached_irq_mask[i] & bit));
-
- /*
- * Unfortunately, setting the bit in the enable register
- * when the device interrupt is already on *doesn't* set
- * the bit in the flag register or request another interrupt.
- */
- if ((bit & cached_irq_mask[i])
- && (ld_le32(&pmac_irq_hw[i]->level) & bit)
- && !(ld_le32(&pmac_irq_hw[i]->flag) & bit)) {
- if (!test_and_set_bit(irq_nr, lost_interrupts))
- atomic_inc(&n_lost_interrupts);
- }
-}
-
-static void pmac_mask_irq(unsigned int irq_nr)
-{
- clear_bit(irq_nr, cached_irq_mask);
- pmac_set_irq_mask(irq_nr);
- mb();
-}
-
-static void pmac_unmask_irq(unsigned int irq_nr)
-{
- set_bit(irq_nr, cached_irq_mask);
- pmac_set_irq_mask(irq_nr);
-}
-
-static void __openfirmware chrp_mask_irq(unsigned int irq_nr)
-{
- if (is_8259_irq(irq_nr))
- i8259_mask_irq(irq_nr);
- else
- openpic_disable_irq(irq_to_openpic(irq_nr));
-}
-
-static void __openfirmware chrp_unmask_irq(unsigned int irq_nr)
-{
- if (is_8259_irq(irq_nr))
- i8259_unmask_irq(irq_nr);
- else
- openpic_enable_irq(irq_to_openpic(irq_nr));
-}
-
-/* This routine will fix some missing interrupt values in the device tree
- * on the gatwick mac-io controller used by some PowerBooks
- */
-static void __init pmac_fix_gatwick_interrupts(struct device_node *gw, int irq_base)
-{
- struct device_node *node;
- int count;
-
- memset(gatwick_int_pool, 0, sizeof(gatwick_int_pool));
- node = gw->child;
- count = 0;
- while(node)
- {
- /* Fix SCC */
- if (strcasecmp(node->name, "escc") == 0)
- if (node->child) {
- if (node->child->n_intrs < 3) {
- node->child->intrs = &gatwick_int_pool[count];
- count += 3;
- }
- node->child->n_intrs = 3;
- node->child->intrs[0].line = 15+irq_base;
- node->child->intrs[1].line = 4+irq_base;
- node->child->intrs[2].line = 5+irq_base;
- printk(KERN_INFO "irq: fixed SCC on second controller (%d,%d,%d)\n",
- node->child->intrs[0].line,
- node->child->intrs[1].line,
- node->child->intrs[2].line);
- }
- /* Fix media-bay & left SWIM */
- if (strcasecmp(node->name, "media-bay") == 0) {
- struct device_node* ya_node;
-
- if (node->n_intrs == 0)
- node->intrs = &gatwick_int_pool[count++];
- node->n_intrs = 1;
- node->intrs[0].line = 29+irq_base;
- printk(KERN_INFO "irq: fixed media-bay on second controller (%d)\n",
- node->intrs[0].line);
-
- ya_node = node->child;
- while(ya_node)
- {
- if (strcasecmp(ya_node->name, "floppy") == 0) {
- if (ya_node->n_intrs < 2) {
- ya_node->intrs = &gatwick_int_pool[count];
- count += 2;
- }
- ya_node->n_intrs = 2;
- ya_node->intrs[0].line = 19+irq_base;
- ya_node->intrs[1].line = 1+irq_base;
- printk(KERN_INFO "irq: fixed floppy on second controller (%d,%d)\n",
- ya_node->intrs[0].line, ya_node->intrs[1].line);
- }
- if (strcasecmp(ya_node->name, "ata4") == 0) {
- if (ya_node->n_intrs < 2) {
- ya_node->intrs = &gatwick_int_pool[count];
- count += 2;
- }
- ya_node->n_intrs = 2;
- ya_node->intrs[0].line = 14+irq_base;
- ya_node->intrs[1].line = 3+irq_base;
- printk(KERN_INFO "irq: fixed ide on second controller (%d,%d)\n",
- ya_node->intrs[0].line, ya_node->intrs[1].line);
- }
- ya_node = ya_node->sibling;
- }
- }
- node = node->sibling;
- }
- if (count > 10) {
- printk("WARNING !! Gatwick interrupt pool overflow\n");
- printk(" GATWICK_IRQ_POOL_SIZE = %d\n", GATWICK_IRQ_POOL_SIZE);
- printk(" requested = %d\n", count);
- }
-}
-
-#ifdef __SMP__
-static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
-{
- smp_message_recv();
-}
-#endif /* __SMP__ */
-
-
-#else /* CONFIG_8xx */
-
-static void mbx_i8259_action(int cpl, void *dev_id, struct pt_regs *regs)
-{
- int bits, irq;
-
- /* A bug in the QSpan chip causes it to give us 0xff always
- * when doing a character read. So read 32 bits and shift.
- * This doesn't seem to return useful values anyway, but
- * read it to make sure things are acked.
- * -- Cort
- */
- irq = (inl(0x508) >> 24)&0xff;
- if ( irq != 0xff ) printk("iack %d\n", irq);
-
- outb(0x0C, 0x20);
- irq = inb(0x20) & 7;
- if (irq == 2)
- {
- outb(0x0C, 0xA0);
- irq = inb(0xA0);
- irq = (irq&7) + 8;
- }
- bits = 1UL << irq;
- irq += i8259_pic.irq_offset;
- dispatch_handler( regs, irq );
-}
-
-static void mbx_mask_and_ack(unsigned int irq_nr)
-{
- /* this shouldn't be masked, we mask the 8259 if we need to -- Cort */
- if ( irq_nr != ISA_BRIDGE_INT )
- mbx_mask_irq(irq_nr);
- if ( irq_nr >= ppc8xx_pic.irq_offset )
- irq_nr -= ppc8xx_pic.irq_offset;
- /* clear the pending bits */
- ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_sipend = 1 << (31-irq_nr);
-}
-
-static void mbx_mask_irq(unsigned int irq_nr)
-{
- if ( irq_nr == ISA_BRIDGE_INT ) return;
- if ( irq_nr >= ppc8xx_pic.irq_offset )
- irq_nr -= ppc8xx_pic.irq_offset;
- cached_irq_mask[0] &= ~(1 << (31-irq_nr));
- ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_simask = cached_irq_mask[0];
-}
-
-static void mbx_unmask_irq(unsigned int irq_nr)
-{
- if ( irq_nr >= ppc8xx_pic.irq_offset )
- irq_nr -= ppc8xx_pic.irq_offset;
- cached_irq_mask[0] |= (1 << (31-irq_nr));
- ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_simask = cached_irq_mask[0];
-}
-#endif /* CONFIG_8xx */
-
-static void __init i8259_init(void)
-{
- /* init master interrupt controller */
- outb(0x11, 0x20); /* Start init sequence */
- outb(0x00, 0x21); /* Vector base */
- outb(0x04, 0x21); /* edge tiggered, Cascade (slave) on IRQ2 */
- outb(0x01, 0x21); /* Select 8086 mode */
- outb(0xFF, 0x21); /* Mask all */
- /* init slave interrupt controller */
- outb(0x11, 0xA0); /* Start init sequence */
- outb(0x08, 0xA1); /* Vector base */
- outb(0x02, 0xA1); /* edge triggered, Cascade (slave) on IRQ2 */
- outb(0x01, 0xA1); /* Select 8086 mode */
- outb(0xFF, 0xA1); /* Mask all */
- outb(cached_A1, 0xA1);
- outb(cached_21, 0x21);
- request_irq( i8259_pic.irq_offset + 2, no_action, SA_INTERRUPT,
- "8259 secondary cascade", NULL );
- enable_irq(i8259_pic.irq_offset + 2); /* Enable cascade interrupt */
-}
-
void __init init_IRQ(void)
{
- extern void xmon_irq(int, void *, struct pt_regs *);
- int i;
static int once = 0;
-#ifndef CONFIG_8xx
- struct device_node *irqctrler;
- unsigned long addr;
- struct device_node *np;
- int second_irq = -999;
-#endif
+
if ( once )
return;
else
once++;
-#ifndef CONFIG_8xx
- switch (_machine)
- {
- case _MACH_Pmac:
- /* G3 powermacs have 64 interrupts, G3 Series PowerBook have 128,
- others have 32 */
- max_irqs = max_real_irqs = 32;
- irqctrler = find_devices("mac-io");
- if (irqctrler)
- {
- max_real_irqs = 64;
- if (irqctrler->next)
- max_irqs = 128;
- else
- max_irqs = 64;
- }
- for ( i = 0; i < max_real_irqs ; i++ )
- irq_desc[i].ctl = &pmac_pic;
-
- /* get addresses of first controller */
- if (irqctrler) {
- if (irqctrler->n_addrs > 0) {
- addr = (unsigned long)
- ioremap(irqctrler->addrs[0].address, 0x40);
- for (i = 0; i < 2; ++i)
- pmac_irq_hw[i] = (volatile struct pmac_irq_hw*)
- (addr + (2 - i) * 0x10);
- }
-
- /* get addresses of second controller */
- irqctrler = (irqctrler->next) ? irqctrler->next : NULL;
- if (irqctrler && irqctrler->n_addrs > 0) {
- addr = (unsigned long)
- ioremap(irqctrler->addrs[0].address, 0x40);
- for (i = 2; i < 4; ++i)
- pmac_irq_hw[i] = (volatile struct pmac_irq_hw*)
- (addr + (4 - i) * 0x10);
- }
- }
-
- /* disable all interrupts in all controllers */
- for (i = 0; i * 32 < max_irqs; ++i)
- out_le32(&pmac_irq_hw[i]->enable, 0);
-
- /* get interrupt line of secondary interrupt controller */
- if (irqctrler) {
- second_irq = irqctrler->intrs[0].line;
- printk(KERN_INFO "irq: secondary controller on irq %d\n",
- (int)second_irq);
- if (device_is_compatible(irqctrler, "gatwick"))
- pmac_fix_gatwick_interrupts(irqctrler, max_real_irqs);
- for ( i = max_real_irqs ; i < max_irqs ; i++ )
- irq_desc[i].ctl = &gatwick_pic;
- request_irq( second_irq, gatwick_action, SA_INTERRUPT,
- "gatwick cascade", 0 );
- }
- printk("System has %d possible interrupts\n", max_irqs);
- if (max_irqs != max_real_irqs)
- printk(KERN_DEBUG "%d interrupts on main controller\n",
- max_real_irqs);
-
-#ifdef CONFIG_XMON
- request_irq(20, xmon_irq, 0, "NMI - XMON", 0);
-#endif /* CONFIG_XMON */
- break;
- case _MACH_chrp:
- if ( !(np = find_devices("pci") ) )
- printk("Cannot find pci to get ack address\n");
- else
- {
- chrp_int_ack_special = (volatile unsigned char *)
- (*(unsigned long *)get_property(np,
- "8259-interrupt-acknowledge", NULL));
- }
- for ( i = 16 ; i < 36 ; i++ )
- irq_desc[i].ctl = &open_pic;
- /* openpic knows that it's at irq 16 offset
- * so we don't need to set it in the pic structure
- * -- Cort
- */
- openpic_init(1);
- for ( i = 0 ; i < 16 ; i++ )
- irq_desc[i].ctl = &i8259_pic;
- i8259_init();
-#ifdef CONFIG_XMON
- request_irq(openpic_to_irq(HYDRA_INT_ADB_NMI),
- xmon_irq, 0, "NMI", 0);
-#endif /* CONFIG_XMON */
-#ifdef __SMP__
- request_irq(openpic_to_irq(OPENPIC_VEC_SPURIOUS),
- openpic_ipi_action, 0, "IPI0", 0);
-#endif /* __SMP__ */
- break;
- case _MACH_prep:
- for ( i = 0 ; i < 16 ; i++ )
- irq_desc[i].ctl = &i8259_pic;
- i8259_init();
- break;
-#ifdef CONFIG_APUS
- case _MACH_apus:
- apus_init_IRQ();
- break;
-#endif
- }
-#else /* CONFIG_8xx */
- ppc8xx_pic.irq_offset = 16;
- for ( i = 16 ; i < 32 ; i++ )
- irq_desc[i].ctl = &ppc8xx_pic;
- unmask_irq(CPM_INTERRUPT);
-
- for ( i = 0 ; i < 16 ; i++ )
- irq_desc[i].ctl = &i8259_pic;
- i8259_init();
- request_irq(ISA_BRIDGE_INT, mbx_i8259_action, 0, "8259 cascade", NULL);
- enable_irq(ISA_BRIDGE_INT);
-#endif /* CONFIG_8xx */
+ ppc_md.init_IRQ();
}
#ifdef __SMP__
@@ -1078,9 +316,13 @@
printk("\n%s, CPU %d:\n", str, cpu);
printk("irq: %d [%d %d]\n",
- atomic_read(&global_irq_count), local_irq_count[0], local_irq_count[1]);
+ atomic_read(&global_irq_count),
+ ppc_local_irq_count[0],
+ ppc_local_irq_count[1]);
printk("bh: %d [%d %d]\n",
- atomic_read(&global_bh_count), local_bh_count[0], local_bh_count[1]);
+ atomic_read(&global_bh_count),
+ ppc_local_bh_count[0],
+ ppc_local_bh_count[1]);
stack = (unsigned long *) &str;
for (i = 40; i ; i--) {
unsigned long x = *++stack;
@@ -1115,7 +357,8 @@
* already executing in one..
*/
if (!atomic_read(&global_irq_count)) {
- if (local_bh_count[cpu] || !atomic_read(&global_bh_count))
+ if (ppc_local_bh_count[cpu]
+ || !atomic_read(&global_bh_count))
break;
}
@@ -1136,7 +379,8 @@
continue;
if (global_irq_lock)
continue;
- if (!local_bh_count[cpu] && atomic_read(&global_bh_count))
+ if (!ppc_local_bh_count[cpu]
+ && atomic_read(&global_bh_count))
continue;
if (!test_and_set_bit(0,&global_irq_lock))
break;
@@ -1226,7 +470,7 @@
if (flags & (1 << 15)) {
int cpu = smp_processor_id();
__cli();
- if (!local_irq_count[cpu])
+ if (!ppc_local_irq_count[cpu])
get_irqlock(cpu);
}
}
@@ -1235,7 +479,7 @@
{
int cpu = smp_processor_id();
- if (!local_irq_count[cpu])
+ if (!ppc_local_irq_count[cpu])
release_irqlock(cpu);
__sti();
}
@@ -1259,7 +503,7 @@
retval = 2 + local_enabled;
/* check for global flags if we're not in an interrupt */
- if (!local_irq_count[smp_processor_id()]) {
+ if (!ppc_local_irq_count[smp_processor_id()]) {
if (local_enabled)
retval = 1;
if (global_irq_holder == (unsigned char) smp_processor_id())
@@ -1268,6 +512,31 @@
return retval;
}
+int
+tb(long vals[],
+ int max_size)
+{
+ register unsigned long *orig_sp __asm__ ("r1");
+ register unsigned long lr __asm__ ("r3");
+ unsigned long *sp;
+ int i;
+
+ asm volatile ("mflr 3");
+ vals[0] = lr;
+ sp = (unsigned long *) *orig_sp;
+ sp = (unsigned long *) *sp;
+ for (i=1; i
+#include
+
+void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq);
+
+/* Structure describing interrupts */
+struct hw_interrupt_type {
+ const char * typename;
+ void (*startup)(unsigned int irq);
+ void (*shutdown)(unsigned int irq);
+ void (*handle)(unsigned int irq, struct pt_regs * regs);
+ void (*enable)(unsigned int irq);
+ void (*disable)(unsigned int irq);
+ void (*mask_and_ack)(unsigned int irq);
+ int irq_offset;
+};
+
+#define mask_irq(irq) ({if (irq_desc[irq].ctl && irq_desc[irq].ctl->disable) irq_desc[irq].ctl->disable(irq);})
+#define unmask_irq(irq) ({if (irq_desc[irq].ctl && irq_desc[irq].ctl->enable) irq_desc[irq].ctl->enable(irq);})
+#define mask_and_ack_irq(irq) ({if (irq_desc[irq].ctl && irq_desc[irq].ctl->mask_and_ack) irq_desc[irq].ctl->mask_and_ack(irq);})
+
+struct irqdesc {
+ struct irqaction *action;
+ struct hw_interrupt_type *ctl;
+};
+
+extern struct irqdesc irq_desc[NR_IRQS];
+
+
+#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
+
+extern int ppc_spurious_interrupts;
+extern int ppc_second_irq;
+extern struct irqaction *ppc_irq_action[NR_IRQS];
+extern unsigned int ppc_local_bh_count[NR_CPUS];
+extern unsigned int ppc_local_irq_count[NR_CPUS];
+extern unsigned int ppc_cached_irq_mask[NR_MASK_WORDS];
+extern unsigned int ppc_lost_interrupts[NR_MASK_WORDS];
+extern atomic_t ppc_n_lost_interrupts;
+
+#endif /* _PPC_KERNEL_LOCAL_IRQ_H */
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/mbx_pci.c linux/arch/ppc/kernel/mbx_pci.c
--- v2.2.7/linux/arch/ppc/kernel/mbx_pci.c Thu Apr 23 20:21:29 1998
+++ linux/arch/ppc/kernel/mbx_pci.c Thu Apr 29 12:39:01 1999
@@ -252,3 +252,20 @@
}
return PCIBIOS_DEVICE_NOT_FOUND;
}
+
+__initfunc(
+void
+mbx_pcibios_fixup(void))
+{
+ /* Nothing to do here? */
+}
+
+__initfunc(
+void
+mbx_setup_pci_ptrs(void))
+{
+ set_config_access_method(mbx);
+
+ ppc_md.pcibios_fixup = mbx_pcibios_fixup;
+}
+
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/mbx_setup.c linux/arch/ppc/kernel/mbx_setup.c
--- v2.2.7/linux/arch/ppc/kernel/mbx_setup.c Fri Jan 8 22:36:02 1999
+++ linux/arch/ppc/kernel/mbx_setup.c Thu Apr 29 12:39:01 1999
@@ -1,5 +1,5 @@
/*
- * $Id: mbx_setup.c,v 1.5 1998/12/29 18:55:07 cort Exp $
+ * $Id: mbx_setup.c,v 1.9 1999/04/28 11:54:09 davem Exp $
*
* linux/arch/ppc/kernel/setup.c
*
@@ -39,6 +39,22 @@
#include
#include
#include
+#include
+
+#include "time.h"
+#include "local_irq.h"
+
+static int mbx_set_rtc_time(unsigned long time);
+unsigned long mbx_get_rtc_time(void);
+void mbx_calibrate_decr(void);
+
+extern int mackbd_setkeycode(unsigned int scancode, unsigned int keycode);
+extern int mackbd_getkeycode(unsigned int scancode);
+extern int mackbd_translate(unsigned char scancode, unsigned char *keycode,
+ char raw_mode);
+extern char mackbd_unexpected_up(unsigned char keycode);
+extern void mackbd_leds(unsigned char leds);
+extern void mackbd_init_hw(void);
extern unsigned long loops_per_sec;
@@ -55,35 +71,10 @@
extern unsigned long find_available_memory(void);
extern void m8xx_cpm_reset(uint);
-/* this really does make things cleaner -- Cort */
-void __init powermac_init(void)
-{
-}
-
void __init adbdev_init(void)
{
}
-void __init mbx_ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq)
-{
- ide_ioreg_t port = base;
- int i = 8;
-
- while (i--)
- *p++ = port++;
- *p++ = base + 0x206;
- if (irq != NULL)
- *irq = 0;
-#ifdef ATA_FLASH
- base = (unsigned long) ioremap(PCMCIA_MEM_ADDR, 0x200);
- for (i = 0; i < 8; ++i)
- *p++ = base++;
- *p = ++base; /* Does not matter */
- if (irq)
- *irq = 13;
-#endif
-}
-
__initfunc(void
mbx_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p))
{
@@ -144,4 +135,338 @@
xmon(0);
#endif
machine_restart(NULL);
+}
+
+/* The decrementer counts at the system (internal) clock frequency divided by
+ * sixteen, or external oscillator divided by four. Currently, we only
+ * support the MBX, which is system clock divided by sixteen.
+ */
+__initfunc(void mbx_calibrate_decr(void))
+{
+ bd_t *binfo = (bd_t *)&res;
+ int freq, fp, divisor;
+
+ if ((((immap_t *)MBX_IMAP_ADDR)->im_clkrst.car_sccr & 0x02000000) == 0)
+ printk("WARNING: Wrong decrementer source clock.\n");
+
+ /* The manual says the frequency is in Hz, but it is really
+ * as MHz. The value 'fp' is the number of decrementer ticks
+ * per second.
+ */
+ fp = (binfo->bi_intfreq * 1000000) / 16;
+ freq = fp*60; /* try to make freq/1e6 an integer */
+ divisor = 60;
+ printk("time_init: decrementer frequency = %d/%d\n", freq, divisor);
+ decrementer_count = freq / HZ / divisor;
+ count_period_num = divisor;
+ count_period_den = freq / 1000000;
+}
+
+/* A place holder for time base interrupts, if they are ever enabled.
+*/
+void timebase_interrupt(int irq, void * dev, struct pt_regs * regs)
+{
+ printk("timebase_interrupt()\n");
+}
+
+/* The RTC on the MPC8xx is an internal register.
+ * We want to protect this during power down, so we need to unlock,
+ * modify, and re-lock.
+ */
+static int
+mbx_set_rtc_time(unsigned long time)
+{
+ ((immap_t *)MBX_IMAP_ADDR)->im_sitk.sitk_rtck = KAPWR_KEY;
+ ((immap_t *)MBX_IMAP_ADDR)->im_sit.sit_rtc = time;
+ ((immap_t *)MBX_IMAP_ADDR)->im_sitk.sitk_rtck = ~KAPWR_KEY;
+ return(0);
+}
+
+initfunc(unsigned long
+mbx_get_rtc_time(void)
+{
+ /* First, unlock all of the registers we are going to modify.
+ * To protect them from corruption during power down, registers
+ * that are maintained by keep alive power are "locked". To
+ * modify these registers we have to write the key value to
+ * the key location associated with the register.
+ */
+ ((immap_t *)MBX_IMAP_ADDR)->im_sitk.sitk_tbscrk = KAPWR_KEY;
+ ((immap_t *)MBX_IMAP_ADDR)->im_sitk.sitk_rtcsck = KAPWR_KEY;
+
+
+ /* Disable the RTC one second and alarm interrupts.
+ */
+ ((immap_t *)MBX_IMAP_ADDR)->im_sit.sit_rtcsc &=
+ ~(RTCSC_SIE | RTCSC_ALE);
+
+ /* Enabling the decrementer also enables the timebase interrupts
+ * (or from the other point of view, to get decrementer interrupts
+ * we have to enable the timebase). The decrementer interrupt
+ * is wired into the vector table, nothing to do here for that.
+ */
+ ((immap_t *)MBX_IMAP_ADDR)->im_sit.sit_tbscr =
+ ((mk_int_int_mask(DEC_INTERRUPT) << 8) |
+ (TBSCR_TBF | TBSCR_TBE));
+ if (request_irq(DEC_INTERRUPT, timebase_interrupt, 0, "tbint", NULL) != 0)
+ panic("Could not allocate timer IRQ!");
+
+ /* Get time from the RTC.
+ */
+ return ((immap_t *)MBX_IMAP_ADDR)->im_sit.sit_rtc;
+}
+
+void
+mbx_restart(char *cmd)
+{
+ extern void MBX_gorom(void);
+
+ MBX_gorom();
+}
+
+void
+mbx_power_off(void)
+{
+ mbx_restart(NULL);
+}
+
+void
+mbx_halt(void)
+{
+ mbx_restart(NULL)
+}
+
+
+int mbx_setup_residual(char *buffer)
+{
+ int len = 0;
+ bd_t *bp;
+ extern RESIDUAL *res;
+
+ bp = (bd_t *)res;
+
+ len += sprintf(len+buffer,"clock\t\t: %dMHz\n"
+ "bus clock\t: %dMHz\n",
+ bp->bi_intfreq /*/ 1000000*/,
+ bp->bi_busfreq /*/ 1000000*/);
+
+ return len;
+}
+
+void
+mbx_do_IRQ(struct pt_regs *regs,
+ int cpu,
+ int isfake)
+{
+ int irq;
+ unsigned long bits = 0;
+
+ /* For MPC8xx, read the SIVEC register and shift the bits down
+ * to get the irq number. */
+ bits = ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_sivec;
+ irq = bits >> 26;
+ irq += ppc8xx_pic.irq_offset;
+ bits = 1UL << irq;
+
+ if (irq < 0) {
+ printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n",
+ irq, regs->nip);
+ spurious_interrupts++;
+ }
+ else {
+ ppc_irq_dispatch_handler( regs, irq );
+ }
+
+}
+
+static void mbx_i8259_action(int cpl, void *dev_id, struct pt_regs *regs)
+{
+ int bits, irq;
+
+ /* A bug in the QSpan chip causes it to give us 0xff always
+ * when doing a character read. So read 32 bits and shift.
+ * This doesn't seem to return useful values anyway, but
+ * read it to make sure things are acked.
+ * -- Cort
+ */
+ irq = (inl(0x508) >> 24)&0xff;
+ if ( irq != 0xff ) printk("iack %d\n", irq);
+
+ outb(0x0C, 0x20);
+ irq = inb(0x20) & 7;
+ if (irq == 2)
+ {
+ outb(0x0C, 0xA0);
+ irq = inb(0xA0);
+ irq = (irq&7) + 8;
+ }
+ bits = 1UL << irq;
+ irq += i8259_pic.irq_offset;
+ ppc_irq_dispatch_handler( regs, irq );
+}
+
+
+/* On MBX8xx, the interrupt control (SIEL) was set by EPPC-bug. External
+ * interrupts can be either edge or level triggered, but there is no
+ * reason for us to change the EPPC-bug values (it would not work if we did).
+ */
+__initfunc(void
+mbx_init_IRQ(void))
+{
+ int i;
+
+ ppc8xx_pic.irq_offset = 16;
+ for ( i = 16 ; i < 32 ; i++ )
+ irq_desc[i].ctl = &ppc8xx_pic;
+ unmask_irq(CPM_INTERRUPT);
+
+ for ( i = 0 ; i < 16 ; i++ )
+ irq_desc[i].ctl = &i8259_pic;
+ i8259_init();
+ request_irq(ISA_BRIDGE_INT, mbx_i8259_action, 0, "8259 cascade", NULL);
+ enable_irq(ISA_BRIDGE_INT);
+}
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+/*
+ * IDE stuff.
+ */
+void
+mbx_ide_insw(ide_ioreg_t port, void *buf, int ns)
+{
+ ide_insw(port+_IO_BASE), buf, ns);
+}
+
+void
+mbx_ide_outsw(ide_ioreg_t port, void *buf, int ns)
+{
+ ide_outsw(port+_IO_BASE, buf, ns);
+}
+
+int
+mbx_ide_default_irq(ide_ioreg_t base)
+{
+ return 14;
+}
+
+ide_ioreg_t
+mbx_ide_default_io_base(int index)
+{
+ return index;
+}
+
+int
+mbx_ide_check_region(ide_ioreg_t from, unsigned int extent)
+{
+ return 0
+}
+
+void
+mbx_ide_request_region(ide_ioreg_t from,
+ unsigned int extent,
+ const char *name)
+{
+}
+
+void
+mbx_ide_release_region(ide_ioreg_t from,
+ unsigned int extent)
+{
+}
+
+void
+mbx_ide_fix_driveid(struct hd_driveid *id)
+{
+ ppc_generic_ide_fix_driveid(id);
+}
+
+void __init mbx_ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq)
+{
+ ide_ioreg_t port = base;
+ int i = 8;
+
+ while (i--)
+ *p++ = port++;
+ *p++ = base + 0x206;
+ if (irq != NULL)
+ *irq = 0;
+#ifdef ATA_FLASH
+ base = (unsigned long) ioremap(PCMCIA_MEM_ADDR, 0x200);
+ for (i = 0; i < 8; ++i)
+ *p++ = base++;
+ *p = ++base; /* Does not matter */
+ if (irq)
+ *irq = 13;
+#endif
+}
+#endif
+
+__initfunc(void
+mbx_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ unsigned long r6, unsigned long r7))
+{
+
+ if ( r3 )
+ memcpy( (void *)&res,(void *)(r3+KERNELBASE), sizeof(bd_t) );
+
+#ifdef CONFIG_PCI
+ mbx_setup_pci_ptrs();
+#endif
+
+#ifdef CONFIG_BLK_DEV_INITRD
+ /* take care of initrd if we have one */
+ if ( r4 )
+ {
+ initrd_start = r4 + KERNELBASE;
+ initrd_end = r5 + KERNELBASE;
+ }
+#endif /* CONFIG_BLK_DEV_INITRD */
+ /* take care of cmd line */
+ if ( r6 )
+ {
+
+ *(char *)(r7+KERNELBASE) = 0;
+ strcpy(cmd_line, (char *)(r6+KERNELBASE));
+ }
+
+ ppc_md.setup_arch = mbx_setup_arch;
+ ppc_md.setup_residual = mbx_setup_residual;
+ ppc_md.get_cpuinfo = NULL;
+ ppc_md.irq_cannonicalize = NULL;
+ ppc_md.init_IRQ = mbx_init_IRQ;
+ ppc_md.do_IRQ = mbx_do_IRQ;
+ ppc_md.init = NULL;
+
+ ppc_md.restart = mbx_restart;
+ ppc_md.power_off = mbx_power_off;
+ ppc_md.halt = mbx_halt;
+
+ ppc_md.time_init = NULL;
+ ppc_md.set_rtc_time = mbx_set_rtc_time;
+ ppc_md.get_rtc_time = mbx_get_rtc_time;
+ ppc_md.calibrate_decr = mbx_calibrate_decr;
+
+ ppc_md.kbd_setkeycode = pckbd_setkeycode;
+ ppc_md.kbd_getkeycode = pckbd_getkeycode;
+ ppc_md.kbd_translate = pckbd_translate;
+ ppc_md.kbd_unexpected_up = pckbd_unexpected_up;
+ ppc_md.kbd_leds = pckbd_leds;
+ ppc_md.kbd_init_hw = pckbd_init_hw;
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+#endif
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+ ppc_ide_md.insw = mbx_ide_insw;
+ ppc_ide_md.outsw = mbx_ide_outsw;
+ ppc_ide_md.default_irq = mbx_ide_default_irq;
+ ppc_ide_md.default_io_base = mbx_ide_default_io_base;
+ ppc_ide_md.check_region = mbx_ide_check_region;
+ ppc_ide_md.request_region = mbx_ide_request_region;
+ ppc_ide_md.release_region = mbx_ide_release_region;
+ ppc_ide_md.fix_driveid = mbx_ide_fix_driveid;
+ ppc_ide_md.ide_init_hwif = mbx_ide_init_hwif_ports;
+
+ ppc_ide_md.io_base = _IO_BASE;
+#endif
}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/misc.S linux/arch/ppc/kernel/misc.S
--- v2.2.7/linux/arch/ppc/kernel/misc.S Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/misc.S Thu Apr 29 12:39:01 1999
@@ -36,6 +36,7 @@
* Returns (address we're running at) - (address we were linked at)
* for use before the text and data are mapped to KERNELBASE.
*/
+
_GLOBAL(reloc_offset)
mflr r0
bl 1f
@@ -72,8 +73,8 @@
beqlr /* nothing to do if state == 0 */
_GLOBAL(__sti)
_GLOBAL(_hard_sti)
- lis r4,n_lost_interrupts@ha
- lwz r4,n_lost_interrupts@l(r4)
+ lis r4,ppc_n_lost_interrupts@ha
+ lwz r4,ppc_n_lost_interrupts@l(r4)
mfmsr r3 /* Get current state */
ori r3,r3,MSR_EE /* Turn on 'EE' bit */
cmpi 0,r4,0 /* lost interrupts to process first? */
@@ -93,8 +94,8 @@
stw r0,20(r1)
stw r3,8(r1)
1: bl fake_interrupt
- lis r4,n_lost_interrupts@ha
- lwz r4,n_lost_interrupts@l(r4)
+ lis r4,ppc_n_lost_interrupts@ha
+ lwz r4,ppc_n_lost_interrupts@l(r4)
cmpi 0,r4,0
bne- 1b
lwz r3,8(r1)
@@ -105,6 +106,20 @@
addi r1,r1,16
blr
+
+/*
+ * complement mask on the msr then "or" some values on.
+ * _nmask_and_or_msr(nmask, value_to_or)
+ */
+ _GLOBAL(_nmask_and_or_msr)
+ mfmsr r0 /* Get current msr */
+ andc r0,r0,r3 /* And off the bits set in r3 (first parm) */
+ or r0,r0,r4 /* Or on the bits in r4 (second parm) */
+ sync /* Some chip revs have problems here... */
+ mtmsr r0 /* Update machine state */
+ blr /* Done */
+
+
/*
* Flush MMU TLB
*/
@@ -613,16 +628,6 @@
stfd 0,-4(r5)
blr
- .globl __clear_msr_me
-__clear_msr_me:
- mfmsr r0 /* Get current interrupt state */
- lis r3,0
- ori r3,r3,MSR_ME
- andc r0,r0,r3 /* Clears bit in (r4) */
- sync /* Some chip revs have problems here */
- mtmsr r0 /* Update machine state */
- blr
-
_GLOBAL(cvt_df)
cvt_df:
lfd 0,-4(r5) /* load up fpscr value */
@@ -633,6 +638,16 @@
stfd 0,-4(r5)
blr
+ .globl __clear_msr_me
+__clear_msr_me:
+ mfmsr r0 /* Get current interrupt state */
+ lis r3,0
+ ori r3,r3,MSR_ME
+ andc r0,r0,r3 /* Clears bit in (r4) */
+ sync /* Some chip revs have problems here */
+ mtmsr r0 /* Update machine state */
+ blr
+
/*
* Fetch the current SR register
* get_SR(int index)
@@ -651,6 +666,8 @@
sc
cmpi 0,r3,0 /* parent or child? */
bnelr /* return if parent */
+ li r0,0 /* clear out p->tss.regs */
+ stw r0,TSS+PT_REGS(r2) /* since we don't have user ctx */
mtlr r4 /* fn addr in lr */
mr r3,r5 /* load arg and call fn */
blrl
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/mk_defs.c linux/arch/ppc/kernel/mk_defs.c
--- v2.2.7/linux/arch/ppc/kernel/mk_defs.c Wed Sep 9 14:51:06 1998
+++ linux/arch/ppc/kernel/mk_defs.c Thu Apr 29 12:39:01 1999
@@ -29,7 +29,7 @@
int
main(void)
{
- DEFINE(KERNELBASE, KERNELBASE);
+ /*DEFINE(KERNELBASE, KERNELBASE);*/
DEFINE(STATE, offsetof(struct task_struct, state));
DEFINE(NEXT_TASK, offsetof(struct task_struct, next_task));
DEFINE(COUNTER, offsetof(struct task_struct, counter));
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/open_pic.c linux/arch/ppc/kernel/open_pic.c
--- v2.2.7/linux/arch/ppc/kernel/open_pic.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/open_pic.c Thu Apr 29 12:39:01 1999
@@ -0,0 +1,48 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include "open_pic.h"
+#include "i8259.h"
+
+#ifdef __SMP__
+void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
+{
+ smp_message_recv();
+}
+#endif /* __SMP__ */
+
+void __openfirmware chrp_mask_and_ack_irq(unsigned int irq_nr)
+{
+ if (is_8259_irq(irq_nr))
+ i8259_pic.mask_and_ack(irq_nr);
+}
+
+static void __openfirmware chrp_mask_irq(unsigned int irq_nr)
+{
+ if (is_8259_irq(irq_nr))
+ i8259_pic.disable(irq_nr);
+ else
+ openpic_disable_irq(irq_to_openpic(irq_nr));
+}
+
+static void __openfirmware chrp_unmask_irq(unsigned int irq_nr)
+{
+ if (is_8259_irq(irq_nr))
+ i8259_pic.enable(irq_nr);
+ else
+ openpic_enable_irq(irq_to_openpic(irq_nr));
+}
+
+struct hw_interrupt_type open_pic = {
+ " OpenPIC ",
+ NULL,
+ NULL,
+ NULL,
+ chrp_unmask_irq,
+ chrp_mask_irq,
+ chrp_mask_and_ack_irq,
+ 0
+};
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/open_pic.h linux/arch/ppc/kernel/open_pic.h
--- v2.2.7/linux/arch/ppc/kernel/open_pic.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/open_pic.h Thu Apr 29 12:39:01 1999
@@ -0,0 +1,11 @@
+
+#ifndef _PPC_KERNEL_OPEN_PIC_H
+#define _PPC_KERNEL_OPEN_PIC_H
+
+#include "local_irq.h"
+
+extern struct hw_interrupt_type open_pic;
+
+void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs);
+
+#endif /* _PPC_KERNEL_OPEN_PIC_H */
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/openpic.c linux/arch/ppc/kernel/openpic.c
--- v2.2.7/linux/arch/ppc/kernel/openpic.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/openpic.c Thu Apr 29 12:39:01 1999
@@ -190,6 +190,9 @@
case 2:
version = "1.2";
break;
+ case 3:
+ version = "1.3";
+ break;
default:
version = "?";
break;
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/pci.c linux/arch/ppc/kernel/pci.c
--- v2.2.7/linux/arch/ppc/kernel/pci.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/pci.c Thu Apr 29 12:39:01 1999
@@ -1,5 +1,5 @@
/*
- * $Id: pci.c,v 1.53 1999/03/12 23:38:02 cort Exp $
+ * $Id: pci.c,v 1.54 1999/03/18 04:16:04 cort Exp $
* Common pmac/prep/chrp pci routines. -- Cort
*/
@@ -21,97 +21,41 @@
#include
#include
-unsigned long isa_io_base;
-unsigned long isa_mem_base;
-unsigned long pci_dram_offset;
-unsigned int * pci_config_address;
-unsigned char * pci_config_data;
-
-static void fix_intr(struct device_node *node, struct pci_dev *dev);
-
-/*
- * It would be nice if we could create a include/asm/pci.h and have just
- * function ptrs for all these in there, but that isn't the case.
- * We have a function, pcibios_*() which calls the function ptr ptr_pcibios_*()
- * which has been setup by pcibios_init(). This is all to avoid a check
- * for pmac/prep every time we call one of these. It should also make the move
- * to a include/asm/pcibios.h easier, we can drop the ptr_ on these functions
- * and create pci.h
- * -- Cort
- */
-int (*ptr_pcibios_read_config_byte)(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned char *val);
-int (*ptr_pcibios_read_config_word)(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned short *val);
-int (*ptr_pcibios_read_config_dword)(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned int *val);
-int (*ptr_pcibios_write_config_byte)(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned char val);
-int (*ptr_pcibios_write_config_word)(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned short val);
-int (*ptr_pcibios_write_config_dword)(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned int val);
-
-#define decl_config_access_method(name) \
-extern int name##_pcibios_read_config_byte(unsigned char bus, \
- unsigned char dev_fn, unsigned char offset, unsigned char *val); \
-extern int name##_pcibios_read_config_word(unsigned char bus, \
- unsigned char dev_fn, unsigned char offset, unsigned short *val); \
-extern int name##_pcibios_read_config_dword(unsigned char bus, \
- unsigned char dev_fn, unsigned char offset, unsigned int *val); \
-extern int name##_pcibios_write_config_byte(unsigned char bus, \
- unsigned char dev_fn, unsigned char offset, unsigned char val); \
-extern int name##_pcibios_write_config_word(unsigned char bus, \
- unsigned char dev_fn, unsigned char offset, unsigned short val); \
-extern int name##_pcibios_write_config_dword(unsigned char bus, \
- unsigned char dev_fn, unsigned char offset, unsigned int val)
-
-#define set_config_access_method(name) \
- ptr_pcibios_read_config_byte = name##_pcibios_read_config_byte; \
- ptr_pcibios_read_config_word = name##_pcibios_read_config_word; \
- ptr_pcibios_read_config_dword = name##_pcibios_read_config_dword; \
- ptr_pcibios_write_config_byte = name##_pcibios_write_config_byte; \
- ptr_pcibios_write_config_word = name##_pcibios_write_config_word; \
- ptr_pcibios_write_config_dword = name##_pcibios_write_config_dword
-
-decl_config_access_method(mech1);
-decl_config_access_method(pmac);
-decl_config_access_method(grackle);
-decl_config_access_method(gg2);
-decl_config_access_method(raven);
-decl_config_access_method(prep);
-decl_config_access_method(mbx);
-decl_config_access_method(python);
+#include "pci.h"
+
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+unsigned long pci_dram_offset = 0;
int pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned char *val)
{
- return ptr_pcibios_read_config_byte(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_read_config_byte(bus,dev_fn,offset,val);
}
int pcibios_read_config_word(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned short *val)
{
- return ptr_pcibios_read_config_word(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_read_config_word(bus,dev_fn,offset,val);
}
int pcibios_read_config_dword(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned int *val)
{
- return ptr_pcibios_read_config_dword(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_read_config_dword(bus,dev_fn,offset,val);
}
int pcibios_write_config_byte(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned char val)
{
- return ptr_pcibios_write_config_byte(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_write_config_byte(bus,dev_fn,offset,val);
}
int pcibios_write_config_word(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned short val)
{
- return ptr_pcibios_write_config_word(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_write_config_word(bus,dev_fn,offset,val);
}
int pcibios_write_config_dword(unsigned char bus, unsigned char dev_fn,
unsigned char offset, unsigned int val)
{
- return ptr_pcibios_write_config_dword(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_write_config_dword(bus,dev_fn,offset,val);
}
int pcibios_present(void)
@@ -123,175 +67,10 @@
{
}
-void __init setup_pci_ptrs(void)
-{
-#ifndef CONFIG_MBX
- PPC_DEVICE *hostbridge;
- switch (_machine) {
- case _MACH_prep:
- printk("PReP architecture\n");
- if ( _prep_type == _PREP_Radstone )
- {
- printk("Setting PCI access method to mech1\n");
- set_config_access_method(mech1);
- break;
- }
-
- hostbridge=residual_find_device(PROCESSORDEVICE, NULL,
- BridgeController, PCIBridge,
- -1, 0);
- if (hostbridge &&
- hostbridge->DeviceId.Interface == PCIBridgeIndirect) {
- PnP_TAG_PACKET * pkt;
- set_config_access_method(raven);
- pkt=PnP_find_large_vendor_packet(
- res->DevicePnPHeap+hostbridge->AllocatedOffset,
- 3, 0);
- if(pkt) {
-#define p pkt->L4_Pack.L4_Data.L4_PPCPack
- pci_config_address= (unsigned *)
- ld_le32((unsigned *) p.PPCData);
- pci_config_data= (unsigned char *)
- ld_le32((unsigned *) (p.PPCData+8));
- } else {/* default values */
- pci_config_address= (unsigned *) 0x80000cf8;
- pci_config_data= (unsigned char *) 0x80000cfc;
- }
- } else {
- set_config_access_method(prep);
- }
- break;
- case _MACH_Pmac:
- if (find_devices("pci") != 0) {
- /* looks like a G3 powermac */
- set_config_access_method(grackle);
- } else {
- set_config_access_method(pmac);
- }
- break;
- case _MACH_chrp:
- 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 ( !strncmp("F5",
- get_property(find_path_device("/"),
- "ibm,model-class", NULL),2) )
-
- {
- 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);
- }
- }
- break;
- default:
- printk("setup_pci_ptrs(): unknown machine type!\n");
- }
-#else /* CONFIG_MBX */
- set_config_access_method(mbx);
-#endif /* CONFIG_MBX */
-#undef set_config_access_method
-}
void __init pcibios_fixup(void)
{
- extern unsigned long route_pci_interrupts(void);
- struct pci_dev *dev;
- extern struct bridge_data **bridges;
- extern unsigned char *Motherboard_map;
- extern unsigned char *Motherboard_routes;
- unsigned char i;
-#ifndef CONFIG_MBX
- switch (_machine )
- {
- case _MACH_prep:
- if ( _prep_type == _PREP_Radstone )
- {
- printk("Radstone boards require no PCI fixups\n");
- break;
- }
-
- route_pci_interrupts();
- for(dev=pci_devices; dev; dev=dev->next)
- {
- /*
- * Use our old hard-coded kludge to figure out what
- * irq this device uses. This is necessary on things
- * without residual data. -- Cort
- */
- unsigned char d = PCI_SLOT(dev->devfn);
- dev->irq = Motherboard_routes[Motherboard_map[d]];
- for ( i = 0 ; i <= 5 ; i++ )
- {
- if ( dev->base_address[i] > 0x10000000 )
- {
- printk("Relocating PCI address %lx -> %lx\n",
- dev->base_address[i],
- (dev->base_address[i] & 0x00FFFFFF)
- | 0x01000000);
- dev->base_address[i] =
- (dev->base_address[i] & 0x00FFFFFF) | 0x01000000;
- pci_write_config_dword(dev,
- PCI_BASE_ADDRESS_0+(i*0x4),
- dev->base_address[i] );
- }
- }
-#if 0
- /*
- * If we have residual data and if it knows about this
- * device ask it what the irq is.
- * -- Cort
- */
- ppcd = residual_find_device_id( ~0L, dev->device,
- -1,-1,-1, 0);
-#endif
- }
- break;
- case _MACH_chrp:
- /* 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);
- break;
- case _MACH_Pmac:
- for(dev=pci_devices; dev; dev=dev->next)
- {
- /*
- * Open Firmware often doesn't initialize the,
- * PCI_INTERRUPT_LINE config register properly, so we
- * should find the device node and se if it has an
- * AAPL,interrupts property.
- */
- struct bridge_data *bp = bridges[dev->bus->number];
- unsigned char pin;
-
- if (pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin) ||
- !pin)
- continue; /* No interrupt generated -> no fixup */
- fix_intr(bp->node->child, dev);
- }
- break;
- }
-#else /* CONFIG_MBX */
- for(dev=pci_devices; dev; dev=dev->next)
- {
- }
-#endif /* CONFIG_MBX */
+ ppc_md.pcibios_fixup();
}
void __init pcibios_fixup_bus(struct pci_bus *bus)
@@ -309,7 +88,7 @@
* fix IRQ's for cards located behind P2P bridges.
* - Ranjit Deshpande, 01/20/99
*/
-static void __init fix_intr(struct device_node *node, struct pci_dev *dev)
+void __init fix_intr(struct device_node *node, struct pci_dev *dev)
{
unsigned int *reg, *class_code;
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/pci.h linux/arch/ppc/kernel/pci.h
--- v2.2.7/linux/arch/ppc/kernel/pci.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/pci.h Thu Apr 29 12:39:01 1999
@@ -0,0 +1,36 @@
+
+#ifndef __PPC_KERNEL_PCI_H__
+#define __PPC_KERNEL_PCI_H__
+
+extern unsigned long isa_io_base;
+extern unsigned long isa_mem_base;
+extern unsigned long pci_dram_offset;
+
+extern unsigned int *pci_config_address;
+extern unsigned char *pci_config_data;
+
+void fix_intr(struct device_node *node, struct pci_dev *dev);
+
+#define decl_config_access_method(name) \
+extern int name##_pcibios_read_config_byte(unsigned char bus, \
+ unsigned char dev_fn, unsigned char offset, unsigned char *val); \
+extern int name##_pcibios_read_config_word(unsigned char bus, \
+ unsigned char dev_fn, unsigned char offset, unsigned short *val); \
+extern int name##_pcibios_read_config_dword(unsigned char bus, \
+ unsigned char dev_fn, unsigned char offset, unsigned int *val); \
+extern int name##_pcibios_write_config_byte(unsigned char bus, \
+ unsigned char dev_fn, unsigned char offset, unsigned char val); \
+extern int name##_pcibios_write_config_word(unsigned char bus, \
+ unsigned char dev_fn, unsigned char offset, unsigned short val); \
+extern int name##_pcibios_write_config_dword(unsigned char bus, \
+ unsigned char dev_fn, unsigned char offset, unsigned int val)
+
+#define set_config_access_method(name) \
+ ppc_md.pcibios_read_config_byte = name##_pcibios_read_config_byte; \
+ ppc_md.pcibios_read_config_word = name##_pcibios_read_config_word; \
+ ppc_md.pcibios_read_config_dword = name##_pcibios_read_config_dword; \
+ ppc_md.pcibios_write_config_byte = name##_pcibios_write_config_byte; \
+ ppc_md.pcibios_write_config_word = name##_pcibios_write_config_word; \
+ ppc_md.pcibios_write_config_dword = name##_pcibios_write_config_dword
+
+#endif /* __PPC_KERNEL_PCI_H__ */
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/pmac_pci.c linux/arch/ppc/kernel/pmac_pci.c
--- v2.2.7/linux/arch/ppc/kernel/pmac_pci.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/pmac_pci.c Thu Apr 29 12:39:01 1999
@@ -21,6 +21,9 @@
#include
#include
#include
+#include
+
+#include "pci.h"
struct bridge_data **bridges, *bridge_list;
static int max_bus;
@@ -437,5 +440,49 @@
if (strcmp(dev->name, "bandit") == 0)
init_bandit(bp);
}
+}
+
+__initfunc(
+void
+pmac_pcibios_fixup(void))
+{
+ struct pci_dev *dev;
+
+ /*
+ * FIXME: This is broken: We should not assign IRQ's to IRQless
+ * devices (look at PCI_INTERRUPT_PIN) and we also should
+ * honor the existence of multi-function devices where
+ * different functions have different interrupt pins. [mj]
+ */
+ for(dev=pci_devices; dev; dev=dev->next)
+ {
+ /*
+ * Open Firmware often doesn't initialize the,
+ * PCI_INTERRUPT_LINE config register properly, so we
+ * should find the device node and se if it has an
+ * AAPL,interrupts property.
+ */
+ struct bridge_data *bp = bridges[dev->bus->number];
+ unsigned char pin;
+
+ if (pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin) ||
+ !pin)
+ continue; /* No interrupt generated -> no fixup */
+ fix_intr(bp->node->child, dev);
+ }
+}
+
+__initfunc(
+void
+pmac_setup_pci_ptrs(void))
+{
+ if (find_devices("pci") != 0) {
+ /* looks like a G3 powermac */
+ set_config_access_method(grackle);
+ } else {
+ set_config_access_method(pmac);
+ }
+
+ ppc_md.pcibios_fixup = pmac_pcibios_fixup;
}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/pmac_pic.c linux/arch/ppc/kernel/pmac_pic.c
--- v2.2.7/linux/arch/ppc/kernel/pmac_pic.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/pmac_pic.c Thu Apr 29 12:39:01 1999
@@ -0,0 +1,362 @@
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "pmac_pic.h"
+
+/* pmac */struct pmac_irq_hw {
+ unsigned int flag;
+ unsigned int enable;
+ unsigned int ack;
+ unsigned int level;
+};
+
+/* XXX these addresses should be obtained from the device tree */
+static volatile struct pmac_irq_hw *pmac_irq_hw[4] = {
+ (struct pmac_irq_hw *) 0xf3000020,
+ (struct pmac_irq_hw *) 0xf3000010,
+ (struct pmac_irq_hw *) 0xf4000020,
+ (struct pmac_irq_hw *) 0xf4000010,
+};
+
+static int max_irqs;
+static int max_real_irqs;
+
+#define MAXCOUNT 10000000
+
+#define GATWICK_IRQ_POOL_SIZE 10
+static struct interrupt_info gatwick_int_pool[GATWICK_IRQ_POOL_SIZE];
+
+static void __pmac pmac_mask_and_ack_irq(unsigned int irq_nr)
+{
+ unsigned long bit = 1UL << (irq_nr & 0x1f);
+ int i = irq_nr >> 5;
+
+ if ((unsigned)irq_nr >= max_irqs)
+ return;
+
+ clear_bit(irq_nr, ppc_cached_irq_mask);
+ if (test_and_clear_bit(irq_nr, ppc_lost_interrupts))
+ atomic_dec(&ppc_n_lost_interrupts);
+ out_le32(&pmac_irq_hw[i]->ack, bit);
+ out_le32(&pmac_irq_hw[i]->enable, ppc_cached_irq_mask[i]);
+ out_le32(&pmac_irq_hw[i]->ack, bit);
+ do {
+ /* make sure ack gets to controller before we enable
+ interrupts */
+ mb();
+ } while(in_le32(&pmac_irq_hw[i]->flag) & bit);
+}
+
+static void __pmac pmac_set_irq_mask(unsigned int irq_nr)
+{
+ unsigned long bit = 1UL << (irq_nr & 0x1f);
+ int i = irq_nr >> 5;
+
+ if ((unsigned)irq_nr >= max_irqs)
+ return;
+
+ /* enable unmasked interrupts */
+ out_le32(&pmac_irq_hw[i]->enable, ppc_cached_irq_mask[i]);
+
+ do {
+ /* make sure mask gets to controller before we
+ return to user */
+ mb();
+ } while((in_le32(&pmac_irq_hw[i]->enable) & bit)
+ != (ppc_cached_irq_mask[i] & bit));
+
+ /*
+ * Unfortunately, setting the bit in the enable register
+ * when the device interrupt is already on *doesn't* set
+ * the bit in the flag register or request another interrupt.
+ */
+ if ((bit & ppc_cached_irq_mask[i])
+ && (ld_le32(&pmac_irq_hw[i]->level) & bit)
+ && !(ld_le32(&pmac_irq_hw[i]->flag) & bit)) {
+ if (!test_and_set_bit(irq_nr, ppc_lost_interrupts))
+ atomic_inc(&ppc_n_lost_interrupts);
+ }
+}
+
+static void __pmac pmac_mask_irq(unsigned int irq_nr)
+{
+ clear_bit(irq_nr, ppc_cached_irq_mask);
+ pmac_set_irq_mask(irq_nr);
+ mb();
+}
+
+static void __pmac pmac_unmask_irq(unsigned int irq_nr)
+{
+ set_bit(irq_nr, ppc_cached_irq_mask);
+ pmac_set_irq_mask(irq_nr);
+}
+
+struct hw_interrupt_type pmac_pic = {
+ " PMAC-PIC ",
+ NULL,
+ NULL,
+ NULL,
+ pmac_unmask_irq,
+ pmac_mask_irq,
+ pmac_mask_and_ack_irq,
+ 0
+};
+
+struct hw_interrupt_type gatwick_pic = {
+ " GATWICK ",
+ NULL,
+ NULL,
+ NULL,
+ pmac_unmask_irq,
+ pmac_mask_irq,
+ pmac_mask_and_ack_irq,
+ 0
+};
+
+static void gatwick_action(int cpl, void *dev_id, struct pt_regs *regs)
+{
+ int irq, bits;
+
+ for (irq = max_irqs - 1; irq > max_real_irqs; irq -= 32) {
+ int i = irq >> 5;
+ bits = ld_le32(&pmac_irq_hw[i]->flag)
+ | ppc_lost_interrupts[i];
+ if (bits == 0)
+ continue;
+ irq -= cntlzw(bits);
+ break;
+ }
+ /* The previous version of this code allowed for this case, we
+ * don't. Put this here to check for it.
+ * -- Cort
+ */
+ if ( irq_desc[irq].ctl != &gatwick_pic )
+ printk("gatwick irq not from gatwick pic\n");
+ else
+ ppc_irq_dispatch_handler( regs, irq );
+}
+
+void
+pmac_do_IRQ(struct pt_regs *regs,
+ int cpu,
+ int isfake)
+{
+ int irq;
+ unsigned long bits = 0;
+
+#ifdef __SMP__
+ /* IPI's are a hack on the powersurge -- Cort */
+ if ( cpu != 0 )
+ {
+ if (!isfake)
+ {
+#ifdef CONFIG_XMON
+ static int xmon_2nd;
+ if (xmon_2nd)
+ xmon(regs);
+#endif
+ smp_message_recv();
+ goto out;
+ }
+ /* could be here due to a do_fake_interrupt call but we don't
+ mess with the controller from the second cpu -- Cort */
+ goto out;
+ }
+
+ {
+ unsigned int loops = MAXCOUNT;
+ while (test_bit(0, &global_irq_lock)) {
+ if (smp_processor_id() == global_irq_holder) {
+ printk("uh oh, interrupt while we hold global irq lock!\n");
+#ifdef CONFIG_XMON
+ xmon(0);
+#endif
+ break;
+ }
+ if (loops-- == 0) {
+ printk("do_IRQ waiting for irq lock (holder=%d)\n", global_irq_holder);
+#ifdef CONFIG_XMON
+ xmon(0);
+#endif
+ }
+ }
+ }
+#endif /* __SMP__ */
+
+ for (irq = max_real_irqs - 1; irq > 0; irq -= 32) {
+ int i = irq >> 5;
+ bits = ld_le32(&pmac_irq_hw[i]->flag)
+ | ppc_lost_interrupts[i];
+ if (bits == 0)
+ continue;
+ irq -= cntlzw(bits);
+ break;
+ }
+
+ if (irq < 0)
+ {
+ printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n",
+ irq, regs->nip);
+ ppc_spurious_interrupts++;
+ }
+ else
+ {
+ ppc_irq_dispatch_handler( regs, irq );
+ }
+#ifdef CONFIG_SMP
+out:
+#endif /* CONFIG_SMP */
+}
+
+/* This routine will fix some missing interrupt values in the device tree
+ * on the gatwick mac-io controller used by some PowerBooks
+ */
+static void __init pmac_fix_gatwick_interrupts(struct device_node *gw, int irq_base)
+{
+ struct device_node *node;
+ int count;
+
+ memset(gatwick_int_pool, 0, sizeof(gatwick_int_pool));
+ node = gw->child;
+ count = 0;
+ while(node)
+ {
+ /* Fix SCC */
+ if (strcasecmp(node->name, "escc") == 0)
+ if (node->child) {
+ if (node->child->n_intrs < 3) {
+ node->child->intrs = &gatwick_int_pool[count];
+ count += 3;
+ }
+ node->child->n_intrs = 3;
+ node->child->intrs[0].line = 15+irq_base;
+ node->child->intrs[1].line = 4+irq_base;
+ node->child->intrs[2].line = 5+irq_base;
+ printk(KERN_INFO "irq: fixed SCC on second controller (%d,%d,%d)\n",
+ node->child->intrs[0].line,
+ node->child->intrs[1].line,
+ node->child->intrs[2].line);
+ }
+ /* Fix media-bay & left SWIM */
+ if (strcasecmp(node->name, "media-bay") == 0) {
+ struct device_node* ya_node;
+
+ if (node->n_intrs == 0)
+ node->intrs = &gatwick_int_pool[count++];
+ node->n_intrs = 1;
+ node->intrs[0].line = 29+irq_base;
+ printk(KERN_INFO "irq: fixed media-bay on second controller (%d)\n",
+ node->intrs[0].line);
+
+ ya_node = node->child;
+ while(ya_node)
+ {
+ if (strcasecmp(ya_node->name, "floppy") == 0) {
+ if (ya_node->n_intrs < 2) {
+ ya_node->intrs = &gatwick_int_pool[count];
+ count += 2;
+ }
+ ya_node->n_intrs = 2;
+ ya_node->intrs[0].line = 19+irq_base;
+ ya_node->intrs[1].line = 1+irq_base;
+ printk(KERN_INFO "irq: fixed floppy on second controller (%d,%d)\n",
+ ya_node->intrs[0].line, ya_node->intrs[1].line);
+ }
+ if (strcasecmp(ya_node->name, "ata4") == 0) {
+ if (ya_node->n_intrs < 2) {
+ ya_node->intrs = &gatwick_int_pool[count];
+ count += 2;
+ }
+ ya_node->n_intrs = 2;
+ ya_node->intrs[0].line = 14+irq_base;
+ ya_node->intrs[1].line = 3+irq_base;
+ printk(KERN_INFO "irq: fixed ide on second controller (%d,%d)\n",
+ ya_node->intrs[0].line, ya_node->intrs[1].line);
+ }
+ ya_node = ya_node->sibling;
+ }
+ }
+ node = node->sibling;
+ }
+ if (count > 10) {
+ printk("WARNING !! Gatwick interrupt pool overflow\n");
+ printk(" GATWICK_IRQ_POOL_SIZE = %d\n", GATWICK_IRQ_POOL_SIZE);
+ printk(" requested = %d\n", count);
+ }
+}
+
+__initfunc(void
+pmac_pic_init(void))
+{
+ int i;
+ struct device_node *irqctrler;
+ unsigned long addr;
+ int second_irq = -999;
+
+
+ /* G3 powermacs have 64 interrupts, G3 Series PowerBook have 128,
+ others have 32 */
+ max_irqs = max_real_irqs = 32;
+ irqctrler = find_devices("mac-io");
+ if (irqctrler)
+ {
+ max_real_irqs = 64;
+ if (irqctrler->next)
+ max_irqs = 128;
+ else
+ max_irqs = 64;
+ }
+ for ( i = 0; i < max_real_irqs ; i++ )
+ irq_desc[i].ctl = &pmac_pic;
+
+ /* get addresses of first controller */
+ if (irqctrler) {
+ if (irqctrler->n_addrs > 0) {
+ addr = (unsigned long)
+ ioremap(irqctrler->addrs[0].address, 0x40);
+ for (i = 0; i < 2; ++i)
+ pmac_irq_hw[i] = (volatile struct pmac_irq_hw*)
+ (addr + (2 - i) * 0x10);
+ }
+
+ /* get addresses of second controller */
+ irqctrler = (irqctrler->next) ? irqctrler->next : NULL;
+ if (irqctrler && irqctrler->n_addrs > 0) {
+ addr = (unsigned long)
+ ioremap(irqctrler->addrs[0].address, 0x40);
+ for (i = 2; i < 4; ++i)
+ pmac_irq_hw[i] = (volatile struct pmac_irq_hw*)
+ (addr + (4 - i) * 0x10);
+ }
+ }
+
+ /* disable all interrupts in all controllers */
+ for (i = 0; i * 32 < max_irqs; ++i)
+ out_le32(&pmac_irq_hw[i]->enable, 0);
+
+ /* get interrupt line of secondary interrupt controller */
+ if (irqctrler) {
+ second_irq = irqctrler->intrs[0].line;
+ printk(KERN_INFO "irq: secondary controller on irq %d\n",
+ (int)second_irq);
+ if (device_is_compatible(irqctrler, "gatwick"))
+ pmac_fix_gatwick_interrupts(irqctrler, max_real_irqs);
+ for ( i = max_real_irqs ; i < max_irqs ; i++ )
+ irq_desc[i].ctl = &gatwick_pic;
+ request_irq( second_irq, gatwick_action, SA_INTERRUPT,
+ "gatwick cascade", 0 );
+ }
+ printk("System has %d possible interrupts\n", max_irqs);
+ if (max_irqs != max_real_irqs)
+ printk(KERN_DEBUG "%d interrupts on main controller\n",
+ max_real_irqs);
+
+#ifdef CONFIG_XMON
+ request_irq(20, xmon_irq, 0, "NMI - XMON", 0);
+#endif /* CONFIG_XMON */
+}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/pmac_pic.h linux/arch/ppc/kernel/pmac_pic.h
--- v2.2.7/linux/arch/ppc/kernel/pmac_pic.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/pmac_pic.h Thu Apr 29 12:39:01 1999
@@ -0,0 +1,15 @@
+#ifndef _PPC_KERNEL_PMAC_PIC_H
+#define _PPC_KERNEL_PMAC_PIC_H
+
+#include "local_irq.h"
+
+extern struct hw_interrupt_type pmac_pic;
+
+void pmac_pic_init(void);
+void pmac_do_IRQ(struct pt_regs *regs,
+ int cpu,
+ int isfake);
+
+
+#endif /* _PPC_KERNEL_PMAC_PIC_H */
+
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/pmac_setup.c linux/arch/ppc/kernel/pmac_setup.c
--- v2.2.7/linux/arch/ppc/kernel/pmac_setup.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/pmac_setup.c Thu Apr 29 12:39:01 1999
@@ -44,6 +44,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -52,7 +53,36 @@
#include
#include
#include
+#include
+#include
+
#include "time.h"
+#include "local_irq.h"
+#include "pmac_pic.h"
+
+#undef SHOW_GATWICK_IRQS
+
+unsigned long pmac_get_rtc_time(void);
+int pmac_set_rtc_time(unsigned long nowtime);
+void pmac_read_rtc_time(void);
+void pmac_calibrate_decr(void);
+void pmac_setup_pci_ptrs(void);
+
+extern int mackbd_setkeycode(unsigned int scancode, unsigned int keycode);
+extern int mackbd_getkeycode(unsigned int scancode);
+extern int mackbd_translate(unsigned char scancode, unsigned char *keycode,
+ char raw_mode);
+extern char mackbd_unexpected_up(unsigned char keycode);
+extern void mackbd_leds(unsigned char leds);
+extern void mackbd_init_hw(void);
+extern unsigned char mackbd_sysrq_xlate[128];
+extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
+extern int pckbd_getkeycode(unsigned int scancode);
+extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
+ char raw_mode);
+extern char pckbd_unexpected_up(unsigned char keycode);
+extern void pckbd_leds(unsigned char leds);
+extern void pckbd_init_hw(void);
unsigned char drive_info;
@@ -291,15 +321,12 @@
int boot_part;
kdev_t boot_dev;
-void __init powermac_init(void)
+__initfunc(void
+pmac_init2(void))
{
- if ( (_machine != _MACH_chrp) && (_machine != _MACH_Pmac) )
- return;
adb_init();
pmac_nvram_init();
- if (_machine == _MACH_Pmac) {
- media_bay_init();
- }
+ media_bay_init();
}
#ifdef CONFIG_SCSI
@@ -402,5 +429,176 @@
boot_dev = NODEV;
printk(" (root)");
}
+}
+
+void
+pmac_restart(char *cmd)
+{
+ struct adb_request req;
+
+ switch (adb_hardware) {
+ case ADB_VIACUDA:
+ cuda_request(&req, NULL, 2, CUDA_PACKET,
+ CUDA_RESET_SYSTEM);
+ for (;;)
+ cuda_poll();
+ break;
+
+ case ADB_VIAPMU:
+ pmu_restart();
+ break;
+ default:
+ }
+}
+
+void
+pmac_power_off(void)
+{
+ struct adb_request req;
+
+ switch (adb_hardware) {
+ case ADB_VIACUDA:
+ cuda_request(&req, NULL, 2, CUDA_PACKET,
+ CUDA_POWERDOWN);
+ for (;;)
+ cuda_poll();
+ break;
+
+ case ADB_VIAPMU:
+ pmu_shutdown();
+ break;
+ default:
+ }
+}
+
+void
+pmac_halt(void)
+{
+ pmac_power_off();
+}
+
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+/*
+ * IDE stuff.
+ */
+void
+pmac_ide_insw(ide_ioreg_t port, void *buf, int ns)
+{
+ ide_insw(port, buf, ns);
+}
+
+void
+pmac_ide_outsw(ide_ioreg_t port, void *buf, int ns)
+{
+ ide_outsw(port, buf, ns);
+}
+
+int
+pmac_ide_default_irq(ide_ioreg_t base)
+{
+ return 0;
+}
+
+ide_ioreg_t
+pmac_ide_default_io_base(int index)
+{
+#if defined(CONFIG_BLK_DEV_IDE_PMAC)
+ return pmac_ide_regbase[index];
+#else
+ return 0;
+#endif
+}
+
+int
+pmac_ide_check_region(ide_ioreg_t from, unsigned int extent)
+{
+ return 0;
+}
+
+void
+pmac_ide_request_region(ide_ioreg_t from,
+ unsigned int extent,
+ const char *name)
+{
+}
+
+void
+pmac_ide_release_region(ide_ioreg_t from,
+ unsigned int extent)
+{
+}
+
+/* Convert the shorts/longs in hd_driveid from little to big endian;
+ * chars are endian independant, of course, but strings need to be flipped.
+ * (Despite what it says in drivers/block/ide.h, they come up as little
+ * endian...)
+ *
+ * Changes to linux/hdreg.h may require changes here. */
+void
+pmac_ide_fix_driveid(struct hd_driveid *id)
+{
+ ppc_generic_ide_fix_driveid(id);
+}
+
+/* This is declared in drivers/block/ide-pmac.c */
+void pmac_ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int *irq);
+#endif
+
+__initfunc(void
+pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ unsigned long r6, unsigned long r7))
+{
+ pmac_setup_pci_ptrs();
+
+ /* isa_io_base gets set in pmac_find_bridges */
+ isa_mem_base = PMAC_ISA_MEM_BASE;
+ pci_dram_offset = PMAC_PCI_DRAM_OFFSET;
+ ISA_DMA_THRESHOLD = ~0L;
+ DMA_MODE_READ = 1;
+ DMA_MODE_WRITE = 2;
+
+ ppc_md.setup_arch = pmac_setup_arch;
+ ppc_md.setup_residual = NULL;
+ ppc_md.get_cpuinfo = pmac_get_cpuinfo;
+ ppc_md.irq_cannonicalize = NULL;
+ ppc_md.init_IRQ = pmac_pic_init;
+ ppc_md.do_IRQ = pmac_do_IRQ;
+ ppc_md.init = pmac_init2;
+
+ ppc_md.restart = pmac_restart;
+ ppc_md.power_off = pmac_power_off;
+ ppc_md.halt = pmac_halt;
+
+ ppc_md.time_init = NULL;
+ ppc_md.set_rtc_time = pmac_set_rtc_time;
+ ppc_md.get_rtc_time = pmac_get_rtc_time;
+ ppc_md.calibrate_decr = pmac_calibrate_decr;
+
+#ifdef CONFIG_VT
+ ppc_md.kbd_setkeycode = mackbd_setkeycode;
+ ppc_md.kbd_getkeycode = mackbd_getkeycode;
+ ppc_md.kbd_translate = mackbd_translate;
+ ppc_md.kbd_unexpected_up = mackbd_unexpected_up;
+ ppc_md.kbd_leds = mackbd_leds;
+ ppc_md.kbd_init_hw = mackbd_init_hw;
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.kbd_sysrq_xlate = mackbd_sysrq_xlate;
+#endif
+#endif
+
+#if defined(CONFIG_BLK_DEV_IDE_PMAC)
+ ppc_ide_md.insw = pmac_ide_insw;
+ ppc_ide_md.outsw = pmac_ide_outsw;
+ ppc_ide_md.default_irq = pmac_ide_default_irq;
+ ppc_ide_md.default_io_base = pmac_ide_default_io_base;
+ ppc_ide_md.check_region = pmac_ide_check_region;
+ ppc_ide_md.request_region = pmac_ide_request_region;
+ ppc_ide_md.release_region = pmac_ide_release_region;
+ ppc_ide_md.fix_driveid = pmac_ide_fix_driveid;
+ ppc_ide_md.ide_init_hwif = pmac_ide_init_hwif_ports;
+
+ ppc_ide_md.io_base = 0;
+#endif
}
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/ppc8xx_pic.c linux/arch/ppc/kernel/ppc8xx_pic.c
--- v2.2.7/linux/arch/ppc/kernel/ppc8xx_pic.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/ppc8xx_pic.c Thu Apr 29 12:39:01 1999
@@ -0,0 +1,49 @@
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "ppc8xx_pic.h"
+
+
+static void mbx_mask_irq(unsigned int irq_nr)
+{
+ if ( irq_nr == ISA_BRIDGE_INT ) return;
+ if ( irq_nr >= ppc8xx_pic.irq_offset )
+ irq_nr -= ppc8xx_pic.irq_offset;
+ ppc_cached_irq_mask[0] &= ~(1 << (31-irq_nr));
+ ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_simask = ppc_cached_irq_mask[0];
+}
+
+static void mbx_unmask_irq(unsigned int irq_nr)
+{
+ if ( irq_nr >= ppc8xx_pic.irq_offset )
+ irq_nr -= ppc8xx_pic.irq_offset;
+ ppc_cached_irq_mask[0] |= (1 << (31-irq_nr));
+ ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_simask = ppc_cached_irq_mask[0];
+}
+
+static void mbx_mask_and_ack(unsigned int irq_nr)
+{
+ /* this shouldn't be masked, we mask the 8259 if we need to -- Cort */
+ if ( irq_nr != ISA_BRIDGE_INT )
+ mbx_mask_irq(irq_nr);
+ if ( irq_nr >= ppc8xx_pic.irq_offset )
+ irq_nr -= ppc8xx_pic.irq_offset;
+ /* clear the pending bits */
+ ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_sipend = 1 << (31-irq_nr);
+}
+
+struct hw_interrupt_type ppc8xx_pic = {
+ " 8xx SIU ",
+ NULL,
+ NULL,
+ NULL,
+ mbx_unmask_irq,
+ mbx_mask_irq,
+ mbx_mask_and_ack,
+ 0
+};
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/ppc8xx_pic.h linux/arch/ppc/kernel/ppc8xx_pic.h
--- v2.2.7/linux/arch/ppc/kernel/ppc8xx_pic.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/ppc8xx_pic.h Thu Apr 29 12:39:01 1999
@@ -0,0 +1,9 @@
+
+#ifndef _PPC_KERNEL_PPC8xx_H
+#define _PPC_KERNEL_PPC8xx_H
+
+#include "local_irq.h"
+
+extern struct hw_interrupt_type ppc8xx_pic;
+
+#endif /* _PPC_KERNEL_PPC8xx_H */
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/ppc_ksyms.c linux/arch/ppc/kernel/ppc_ksyms.c
--- v2.2.7/linux/arch/ppc/kernel/ppc_ksyms.c Tue Mar 23 14:35:46 1999
+++ linux/arch/ppc/kernel/ppc_ksyms.c Thu Apr 29 12:39:01 1999
@@ -27,6 +27,8 @@
#include
#include
#include
+#include
+#include
#define __KERNEL_SYSCALLS__
#include
@@ -40,7 +42,7 @@
extern void ProgramCheckException(struct pt_regs *regs);
extern void SingleStepException(struct pt_regs *regs);
extern int sys_sigreturn(struct pt_regs *regs);
-extern atomic_t n_lost_interrupts;
+extern atomic_t ppc_n_lost_interrupts;
extern void do_lost_interrupts(unsigned long);
extern int do_signal(sigset_t *, struct pt_regs *);
@@ -59,16 +61,21 @@
EXPORT_SYMBOL(ProgramCheckException);
EXPORT_SYMBOL(SingleStepException);
EXPORT_SYMBOL(sys_sigreturn);
-EXPORT_SYMBOL(n_lost_interrupts);
+EXPORT_SYMBOL(ppc_n_lost_interrupts);
EXPORT_SYMBOL(do_lost_interrupts);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
-EXPORT_SYMBOL(local_irq_count);
-EXPORT_SYMBOL(local_bh_count);
+EXPORT_SYMBOL(ppc_local_irq_count);
+EXPORT_SYMBOL(ppc_local_bh_count);
EXPORT_SYMBOL(isa_io_base);
EXPORT_SYMBOL(isa_mem_base);
EXPORT_SYMBOL(pci_dram_offset);
+EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
+EXPORT_SYMBOL(DMA_MODE_READ);
+EXPORT_SYMBOL(DMA_MODE_WRITE);
+EXPORT_SYMBOL(_prep_type);
+EXPORT_SYMBOL(ucSystemType);
EXPORT_SYMBOL(atomic_add);
EXPORT_SYMBOL(atomic_sub);
@@ -157,6 +164,7 @@
EXPORT_SYMBOL(flush_instruction_cache);
EXPORT_SYMBOL(_get_PVR);
EXPORT_SYMBOL(giveup_fpu);
+EXPORT_SYMBOL(enable_kernel_fp);
EXPORT_SYMBOL(flush_icache_range);
EXPORT_SYMBOL(xchg_u32);
#ifdef __SMP__
@@ -173,18 +181,14 @@
EXPORT_SYMBOL(_write_unlock);
#endif
-#ifndef CONFIG_MACH_SPECIFIC
EXPORT_SYMBOL(_machine);
-#endif
+EXPORT_SYMBOL(ppc_md);
EXPORT_SYMBOL(adb_request);
-EXPORT_SYMBOL(adb_autopoll);
EXPORT_SYMBOL(adb_register);
EXPORT_SYMBOL(cuda_request);
-EXPORT_SYMBOL(cuda_send_request);
EXPORT_SYMBOL(cuda_poll);
EXPORT_SYMBOL(pmu_request);
-EXPORT_SYMBOL(pmu_send_request);
EXPORT_SYMBOL(pmu_poll);
#ifdef CONFIG_PMAC_PBOOK
EXPORT_SYMBOL(sleep_notifier_list);
@@ -196,7 +200,6 @@
EXPORT_SYMBOL(find_path_device);
EXPORT_SYMBOL(find_phandle);
EXPORT_SYMBOL(get_property);
-EXPORT_SYMBOL(device_is_compatible);
EXPORT_SYMBOL(pci_io_base);
EXPORT_SYMBOL(pci_device_loc);
EXPORT_SYMBOL(feature_set);
@@ -211,9 +214,8 @@
EXPORT_SYMBOL(nvram_write_byte);
#endif /* CONFIG_PMAC */
-#ifdef CONFIG_SOUND_MODULE
EXPORT_SYMBOL(abs);
-#endif
+EXPORT_SYMBOL(device_is_compatible);
/* The following are special because they're not called
explicitly (the C compiler generates them). Fortunately,
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/kernel/prep_nvram.c linux/arch/ppc/kernel/prep_nvram.c
--- v2.2.7/linux/arch/ppc/kernel/prep_nvram.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/kernel/prep_nvram.c Thu Apr 29 12:39:01 1999
@@ -0,0 +1,173 @@
+/*
+ * linux/arch/ppc/kernel/prep_nvram.c
+ *
+ * Copyright (C) 1998 Corey Minyard
+ *
+ */
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include