Commit 7e842588 authored by Linus Torvalds's avatar Linus Torvalds

[PATCH] Linux-0.99.14 (November 28, 1993)

Original Changelog:

CHANGES since 0.99 patchlevel 13:

 - new kernel source layout: drivers separated
 - lots of networking bugs fixed, and new network card drivers (Alan Cox,
   Donald Becker &co)
 - sound driver added to the default source distribution (Hannu
   Savolainen)
 - updated SCSI driver code (Eric Youngdale, Drew Eckhardt &co)
 - readonly OS/2 filesystem support (HPFS) added (Chris Smith)
 - NTP support (Philip Gladstone, Torsten Duwe, ??)
 - fixed 16MB swap-area limit
 - lots of minor cleanups, buxfixes etc.
parent 537b6ff0
This diff is collapsed.
......@@ -202,6 +202,7 @@ do
:) [ "$branch" = "t" ] && echo "$raw_input_line" ;;
int) [ "$branch" = "t" ] && int "$rest" ;;
bool) [ "$branch" = "t" ] && bool "$rest" ;;
exec) [ "$branch" = "t" ] && ( sh -c "$rest" ) ;;
if) stack="$branch $stack"
if [ "$branch" = "t" ] && eval "$rest"; then
branch=t
......
VERSION = 0.99
PATCHLEVEL = 13
ALPHA = k
PATCHLEVEL = 14
ALPHA =
all: Version zImage
......@@ -44,8 +44,7 @@ ROOT_DEV = CURRENT
# The number is the same as you would ordinarily press at bootup.
#
# SVGA_MODE= -DSVGA_MODE=3
SVGA_MODE= -DSVGA_MODE=NORMAL_VGA
SVGA_MODE= -DSVGA_MODE=3
# Special options.
#OPTS = -pro
......@@ -58,6 +57,8 @@ CFLAGS = -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe # -x c++
ifdef CONFIG_M486
CFLAGS := $(CFLAGS) -m486
else
CFLAGS := $(CFLAGS) -m386
endif
#
......@@ -114,14 +115,13 @@ Version: dummy
config:
$(CONFIG_SHELL) Configure $(OPTS) < config.in
@if grep -s '^CONFIG_SOUND' .config~ ; then \
$(MAKE) -C drivers/sound config; \
else : ; fi
mv .config~ .config
$(MAKE) soundconf
soundconf:
cd drivers/sound;$(MAKE) config
linuxsubdirs: dummy
@for i in $(SUBDIRS); do (cd $$i && echo $$i && $(MAKE)) || exit; done
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done
tools/./version.h: tools/version.h
......@@ -149,7 +149,7 @@ init/main.o: $(CONFIGURE) init/main.c
$(CC) $(CFLAGS) $(PROFILING) -c -o $*.o $<
tools/system: boot/head.o init/main.o tools/version.o linuxsubdirs
$(LD) $(LDFLAGS) -M boot/head.o init/main.o tools/version.o \
$(LD) $(LDFLAGS) -T 1000 -M boot/head.o init/main.o tools/version.o \
$(ARCHIVES) \
$(FILESYSTEMS) \
$(DRIVERS) \
......@@ -171,7 +171,7 @@ boot/bootsect: boot/bootsect.s
$(LD86) -s -o boot/bootsect boot/bootsect.o
zBoot/zSystem: zBoot/*.c zBoot/*.S tools/zSystem
cd zBoot;$(MAKE)
$(MAKE) -C zBoot
zImage: $(CONFIGURE) boot/bootsect boot/setup zBoot/zSystem tools/build
tools/build boot/bootsect boot/setup zBoot/zSystem $(ROOT_DEV) > zImage
......@@ -209,16 +209,21 @@ kernel: dummy
drivers: dummy
$(MAKE) linuxsubdirs SUBDIRS=drivers
net: dummy
$(MAKE) linuxsubdirs SUBDIRS=net
clean:
rm -f core `find . -name '*.[oas]' -print`
rm -f core `find . -name 'core' -print`
rm -f zImage zSystem.map tools/zSystem tools/system
rm -f Image System.map boot/bootsect boot/setup \
boot/bootsect.s boot/setup.s boot/head.s init/main.s
rm -f Image System.map boot/bootsect boot/setup
rm -f zBoot/zSystem zBoot/xtract zBoot/piggyback
rm -f drivers/sound/configure
rm -f init/*.o tools/build boot/*.o tools/*.o
for i in zBoot $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
mrproper: clean
rm -f include/linux/autoconf.h tools/version.h
rm -f drivers/sound/local.h
rm -f .version .config* config.old
rm -f .depend `find . -name .depend -print`
......@@ -232,7 +237,7 @@ depend dep:
touch tools/version.h
for i in init/*.c;do echo -n "init/";$(CPP) -M $$i;done > .depend~
for i in tools/*.c;do echo -n "tools/";$(CPP) -M $$i;done >> .depend~
for i in $(SUBDIRS); do (cd $$i && $(MAKE) dep) || exit; done
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i dep; done
rm -f tools/version.h
mv .depend~ .depend
......
......@@ -16,104 +16,14 @@ result in bad kernels being built: 2.3.3 will fail even to build the
kernel, and I have at least one report of trouble with a 2.4.3-built
kernel that went away when the kernel was recompiled with 2.4.5.
CHANGES since 0.99 patchlevel 11 and earlier:
- The memory manager cleanup has continued, and seems to be mostly
ready, as proven by the ease of adding mmap() over NFS with the new
routines. So yes, the pl12 kernel will demand-load your binaries
over NFS, sharing code and clean data, as well as running shared
libraries over NFS. Memory management by Eric and me, while the NFS
mmap code was written by Jon Tombs,
- ** IMPORTANT **: The keyboard driver has been enhanced even further,
and almost everything is completely re-mappable. This means that
there is a new version of 'loadkeys' and 'dumpkeys' that you must use
with this kernel or you'll have problems. The default keyboard is
still the US mapping, but if you want to create your own mappings
you'll have to load them with the new binaries. Get the 'kbd.tar.gz'
archive from the same place you get the kernel.
The new keymappings allow things like function key string changes,
remapping of the control keys, and freedom to remap any of the normal
keyboard functions: including special features like rebooting,
console switching etc. The keyboard remapping code has been done
mostly by Risto Kankkunen (Risto.Kankkunen@Helsinki.FI).
- updated network drivers by Donald Becker
- updated serial drivers - tytso@Athena.mit.edu
- updated 387 emulation (Bill Metzenthen). The updated emulator code
has more exact trigonometric functions and improved exception
handling. It now behaves very much like a real 486, with only small
changes (greater accuracy, slightly different denormal NaN handling
etc - hard to detect the differences even if you are looking for
them).
- network timer fixes by Florian La Roche (much cleaned up net/inet/timer.c
and some bad race-conditions fixed).
- Scsi code updates by Eric Youngdale and others
- Sony CDU-31A CDROM driver by Corey Minyard added to the standard
kernel distribution.
- The Mitsumi CDROM driver is now part of the standard kernel. Driver
by Martin Harriss with patches by stud11@cc4.kuleuven.ac.be (yes, he
probably has a real name, but no, I haven't found it) and Jon Tombs.
- various other minor patches (preliminary ldt support etc)
NOTABLE changes since patchlevel 10 or earlier:
- The memory manager has been cleaned up substantially, and mmap()
works for MAP_PRIVATE. MAP_SHARED is still not supported for
anything else than /dev/mem, but even so it actually is usable for a
lot of applications. The shared library routines have been rewritten
to use mmap() instead of the old hardcoded behaviour.
- The kernel is now compiled with C++ instead of plain C. Very few
actual C++ features are used, but even so C++ allows for more
type-checking and type-safe linkage.
- The filesystem routines have been cleaned up for multiple block
sizes. None of the filesystems use it yet, but people are working on
it.
- named pipes and normal pipes should hopefully have the right select()
semantics in the presense/absense of writers.
- QIC-02 tape driver by Hennus Bergman
- selection patches in the default kernel
- fixed a bug in the pty code which led to busy waiting in some
circumstances instead of sleeping.
- Compressed SLIP support (Charles Hedrick). See net/inet/CONFIG
- the 'clear_bit()' function was changed to return the previous setting
of the bit instead of the old "error-code". This makes use of the
bit operations more logical.
- udelay() function for short delays (busy-waiting) added. Used
currently only by the QIC driver.
- fork() and sheduler changes to make task switches happen only from
kernel mode to kernel mode. Cleaner and more portable than the old
code which counted on being able to task-switch directly into user
mode.
- debugging malloc code.
INSTALLING the kernel:
- if you install by patching, you need a *clean* 0.99.11 source tree,
- if you install by patching, you need a *clean* 0.99.12 source tree,
which presumably exists in /usr/src/linux. If so, to get the kernel
patched, just do a
cd /usr/src
patch -p0 < linux-0.99.patch12
patch -p0 < linux-0.99.patch13
and you should be ok. You may want to remove the backup files (xxx~
or xxx.orig), and make sure that there are no failed patches (xxx# or
......@@ -122,7 +32,7 @@ INSTALLING the kernel:
- If you install the full sources, do a
cd /usr/src
tar xvf linux-0.99.12.tar
tar xvf linux-0.99.13.tar
to get it all put in place.
......
!
! SYS_SIZE is the number of clicks (16 bytes) to be loaded.
! 0x3000 is 0x30000 bytes = 196kB, more than enough for current
! versions of linux
! 0x7F00 is 0x7F000 bytes = 508kB, more than enough for current
! versions of linux which compress the kernel
!
#include <linux/config.h>
SYSSIZE = DEF_SYSSIZE
......@@ -19,10 +19,11 @@ SYSSIZE = DEF_SYSSIZE
! It then loads 'setup' directly after itself (0x90200), and the system
! at 0x10000, using BIOS interrupts.
!
! NOTE! currently system is at most 8*65536 bytes long. This should be no
! problem, even in the future. I want to keep it simple. This 512 kB
! NOTE! currently system is at most (8*65536-4096) bytes long. This should
! be no problem, even in the future. I want to keep it simple. This 508 kB
! kernel size should be enough, especially as this doesn't contain the
! buffer cache as in minix
! buffer cache as in minix (and especially now that the kernel is
! compressed :-)
!
! The loader has been made as simple as possible, and continuos
! read errors will result in a unbreakable loop. Reboot by hand. It
......
......@@ -25,7 +25,8 @@
#define CL_OFFSET 0x90022
/*
* swapper_pg_dir is the main page directory, address 0x00001000
* swapper_pg_dir is the main page directory, address 0x00001000 (or at
* address 0x00101000 for a compressed boot).
*/
startup_32:
cld
......@@ -237,6 +238,12 @@ setup_paging:
/*
* page 0 is made non-existent, so that kernel NULL pointer references get
* caught. Thus the swapper page directory has been moved to 0x1000
*
* XXX Actually, the swapper page directory is at 0x1000 plus 1 megabyte,
* with the introduction of the compressed boot code. Theoretically,
* the original design of overlaying the startup code with the swapper
* page directory is still possible --- it would reduce the size of the kernel
* by 2-3k. This would be a good thing to do at some point.....
*/
.org 0x1000
_swapper_pg_dir:
......
......@@ -152,19 +152,21 @@ no_psmouse:
mov al,#0x80 ! disable NMI for the bootup sequence
out #0x70,al
! first we move the system to it's rightful place
! first we move the system to its rightful place
xor ax,ax ! clear ax
mov ax,#0x100 ! start of destination segment
mov bx,#0x1000 ! start of source segment
cld ! 'direction'=0, movs moves forward
do_move:
mov es,ax ! destination segment
add ax,#0x1000
add ax,#0x100
cmp ax,#0x9000
jz end_move
mov ds,ax ! source segment
mov ds,bx ! source segment
add bx,#0x100
sub di,di
sub si,si
mov cx,#0x8000
mov cx,#0x800
rep
movsw
jmp do_move
......@@ -248,7 +250,7 @@ end_move:
lmsw ax ! This is it!
jmp flush_instr
flush_instr:
jmpi 0,KERNEL_CS ! jmp offset 0 of segment 0x10 (cs)
jmpi 0x1000,KERNEL_CS ! jmp offset 1000 of segment 0x10 (cs)
! This routine checks that the keyboard command queue is empty
! (after emptying the output buffers)
......@@ -392,7 +394,17 @@ vga28:
mov ax,#0x501c ! return 80x28
ret
/* svga modes */
svga: cld
svga: cld
lea si,id9GXE ! Check for the #9GXE (jyanowit@orixa.mtholyoke.edu,thanks dlm40629@uxa.cso.uiuc.edu)
mov di,#0x49 ! id string is at c000:049
mov cx,#0x11 ! length of "Graphics Power By"
repe
cmpsb
jne of1280
is9GXE: lea si,dsc9GXE ! table of descriptions of video modes for BIOS
lea di,mo9GXE ! table of sizes of video modes for my BIOS
br selmod ! go ask for video mode
of1280: cld
lea si,idf1280 ! Check for Orchid F1280 (dingbat@diku.dk)
mov di,#0x10a ! id string is at c000:010a
mov cx,#0x21 ! length
......@@ -806,6 +818,7 @@ idgenoa: .byte 0x77, 0x00, 0x99, 0x66
idparadise: .ascii "VGA="
idoakvga: .ascii "OAK VGA "
idf1280: .ascii "Orchid Technology Fahrenheit 1280"
id9GXE: .ascii "Graphics Power By"
idVRAM: .ascii "Stealth VRAM"
! Manufacturer: Numofmodes+2: Mode:
......@@ -823,6 +836,7 @@ motrident: .byte 0x09, 0x50, 0x51, 0x52, 0x57, 0x58, 0x59, 0x5a
motseng: .byte 0x07, 0x26, 0x2a, 0x23, 0x24, 0x22
movideo7: .byte 0x08, 0x40, 0x43, 0x44, 0x41, 0x42, 0x45
mooakvga: .byte 0x08, 0x00, 0x07, 0x4e, 0x4f, 0x50, 0x51
mo9GXE: .byte 0x04, 0x54, 0x55
mof1280: .byte 0x04, 0x54, 0x55
mounknown: .byte 0x02
......@@ -842,6 +856,7 @@ dsctseng: .word 0x5032, 0x501c, 0x503c, 0x6428, 0x8419, 0x841c, 0x842c
dscvideo7: .word 0x5032, 0x501c, 0x502b, 0x503c, 0x643c, 0x8419, 0x842c, 0x841c
dscoakvga: .word 0x5032, 0x501c, 0x2819, 0x5019, 0x503c, 0x843c, 0x8419, 0x842b
dscf1280: .word 0x5032, 0x501c, 0x842b, 0x8419
dsc9GXE: .word 0x5032, 0x501c, 0x842b, 0x8419
dsunknown: .word 0x5032, 0x501c
modesave: .word SVGA_MODE
......
......@@ -5,11 +5,11 @@
*
* General setup
*
bool 'Kernel math emulation' CONFIG_MATH_EMULATION n
bool 'Kernel math emulation' CONFIG_MATH_EMULATION y
bool 'Normal harddisk support' CONFIG_BLK_DEV_HD y
bool 'XT harddisk support' CONFIG_BLK_DEV_XD n
bool 'TCP/IP networking' CONFIG_INET y
bool 'Limit memory to low 16MB' CONFIG_MAX_16M y
bool 'Limit memory to low 16MB' CONFIG_MAX_16M n
bool 'System V IPC' CONFIG_SYSVIPC y
bool 'Use -m486 flag for 486-specific optimizations' CONFIG_M486 y
*
......@@ -49,30 +49,39 @@ fi
*
* Network device support
*
bool 'Network device support?' CONFIG_ETHERCARDS n
bool 'Network device support?' CONFIG_ETHERCARDS y
if [ "$CONFIG_ETHERCARDS" = "n" ]
:
: Skipping ethercard configuration options...
:
else
bool 'SLIP (serial line) support' CONFIG_SLIP n
if [ "$CONFIG_SLIP" = "y" ]
bool ' CSLIP compressed headers' SL_COMPRESSED y
bool ' SLIP debugging on' SL_DUMP y
fi
#bool 'PPP (point-to-point) support' CONFIG_PPP n
bool 'PLIP (parallel port) support' CONFIG_PLIP n
bool 'NE2000/NE1000 support' CONFIG_NE2000 n
bool 'WD80*3 support' CONFIG_WD80x3 y
bool 'SMC Ultra support' CONFIG_ULTRA n
bool '3c501 support' CONFIG_EL1 n
bool '3c503 support' CONFIG_EL2 n
#bool '3c505 support' CONFIG_ELPLUS n
#bool '3c507 support' CONFIG_EL16 n
bool '3c509 support' CONFIG_EL3 n
bool '3c509/3c579 support' CONFIG_EL3 n
bool 'HP PCLAN support' CONFIG_HPLAN n
bool 'AT1500 and NE2100 support' CONFIG_AT1500 n
bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
bool 'AT1500 and NE2100 (LANCE and PCnet-ISA) support' CONFIG_LANCE n
bool 'AT1700 support' CONFIG_AT1700 n
#bool 'Zenith Z-Note support' CONFIG_ZNET n
#bool 'EtherExpress support' CONFIG_EEXPRESS n
#bool 'DEPCA support' CONFIG_DEPCA n
#bool 'NI52** support' CONFIG_NI52 n
#bool 'NI65** support' CONFIG_NI65 n
#bool 'AT-LAN-TEC pocket adaptor support' CONFIG_ATP n
#bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
#bool 'Cabletron E21xx support (not recommended)' CONFIG_E21 n
bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
#bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n
fi
*
bool 'Sony CDU31A CDROM driver support' CONFIG_CDU31A n
......@@ -88,16 +97,17 @@ bool 'msdos fs support' CONFIG_MSDOS_FS y
bool '/proc filesystem support' CONFIG_PROC_FS y
bool 'NFS filesystem support' CONFIG_NFS_FS y
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n
bool 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
*
* character devices
*
bool 'Keyboard meta-key sends ESC-prefix' CONFIG_KBD_META y
bool 'Keyboard Num Lock on by default' CONFIG_KBD_NUML n
bool 'Keyboard Num Lock on by default' CONFIG_KBD_NUML y
bool 'Parallel printer support' CONFIG_PRINTER y
bool 'Logitech busmouse support' CONFIG_BUSMOUSE n
bool 'QuickPort mouse support' CONFIG_QUICKPORT_MOUSE n
if [ "$CONFIG_QUICKPORT_MOUSE" = "n" ]
bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE y
if [ "$CONFIG_PSMOUSE" = "y" ]
bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y
fi
bool 'Microsoft busmouse support' CONFIG_MS_BUSMOUSE n
bool 'ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE n
......@@ -106,12 +116,17 @@ bool 'QIC-02 tape support' CONFIG_TAPE_QIC02 n
*
* Sound
*
bool 'Sound card support (distributed separately)' CONFIG_SOUND n
bool 'Sound card support' CONFIG_SOUND n
*
* Kernel hacking
*
bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
bool 'Kernel profiling support' CONFIG_PROFILE n
if [ "$CONFIG_SCSI" = "y" ]
bool 'Verbose scsi error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS y
fi
if [ "$CONFIG_SOUND" = "y" ]
exec touch .makesound
else
exec rm -f .makesound
fi
......@@ -4,13 +4,14 @@
#DEBUG = -DDEBUGGING
DEBUG =
REENTRANT = -DREENTRANT_FPU
CFLAGS := $(CFLAGS) -DPARANOID $(DEBUG) -fno-builtin
.c.o:
$(CC) $(CFLAGS) $(MATH_EMULATION) -c $<
.S.o:
$(CC) -D__ASSEMBLER__ -c $<
$(CC) -D__ASSEMBLER__ $(REENTRANT) -c $<
.s.o:
$(CC) -c $<
......@@ -31,9 +32,6 @@ math.a: $(OBJS)
$(AR) rcs math.a $(OBJS)
sync
clean:
rm -f core *.o *.a *.s
dep:
$(CPP) -M *.c > .depend
$(CPP) -D__ASSEMBLER__ -M *.S >> .depend
......
......@@ -3,7 +3,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| This program is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License version 2 as |
......@@ -41,11 +41,13 @@ wm-FPU-emu does not implement all of the behaviour of the 80486 FPU.
See "Limitations" later in this file for a list of some differences.
Please report bugs, etc to me at:
apm233m@vaxc.cc.monash.edu.au
billm@vaxc.cc.monash.edu.au
or at:
billm@jacobi.maths.monash.edu.au
--Bill Metzenthen
July 1993
Sept 1993
----------------------- Internals of wm-FPU-emu -----------------------
......
......@@ -3,7 +3,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
+---------------------------------------------------------------------------*/
......
......@@ -5,7 +5,7 @@
| Divide a 64 bit integer by a 32 bit integer & return remainder. |
| |
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -42,8 +42,8 @@ void Un_impl(void)
byte1 = get_fs_byte((unsigned char *) FPU_ORIG_EIP);
FPU_modrm = get_fs_byte(1 + (unsigned char *) FPU_ORIG_EIP);
printk("Unimplemented FPU Opcode at eip=%08x : %02x ",
FPU_ORIG_EIP, byte1);
printk("Unimplemented FPU Opcode at eip=%p : %02x ",
(void *) FPU_ORIG_EIP, byte1);
if (FPU_modrm >= 0300)
printk("%02x (%02x+%d)\n", FPU_modrm, FPU_modrm & 0xf8, FPU_modrm & 7);
......@@ -86,14 +86,14 @@ if ( partial_status & SW_Denorm_Op ) printk("SW: denormalized operand\n");
if ( partial_status & SW_Invalid ) printk("SW: invalid operation\n");
#endif DEBUGGING
printk("At %08x: %02x ", FPU_ORIG_EIP, byte1);
printk("At %p: %02x ", (void *) FPU_ORIG_EIP, byte1);
if (FPU_modrm >= 0300)
printk("%02x (%02x+%d)\n", FPU_modrm, FPU_modrm & 0xf8, FPU_modrm & 7);
else
printk("/%d, mod=%d rm=%d\n",
(FPU_modrm >> 3) & 7, (FPU_modrm >> 6) & 3, FPU_modrm & 7);
printk(" SW: b=%d st=%d es=%d sf=%d cc=%d%d%d%d ef=%d%d%d%d%d%d\n",
printk(" SW: b=%d st=%ld es=%d sf=%d cc=%d%d%d%d ef=%d%d%d%d%d%d\n",
partial_status & 0x8000 ? 1 : 0, /* busy */
(partial_status & 0x3800) >> 11, /* stack top pointer */
partial_status & 0x80 ? 1 : 0, /* Error summary status */
......@@ -104,7 +104,7 @@ if ( partial_status & SW_Invalid ) printk("SW: invalid operation\n");
partial_status & SW_Overflow?1:0, partial_status & SW_Zero_Div?1:0,
partial_status & SW_Denorm_Op?1:0, partial_status & SW_Invalid?1:0);
printk(" CW: ic=%d rc=%d%d pc=%d%d iem=%d ef=%d%d%d%d%d%d\n",
printk(" CW: ic=%d rc=%ld%ld pc=%ld%ld iem=%d ef=%d%d%d%d%d%d\n",
control_word & 0x1000 ? 1 : 0,
(control_word & 0x800) >> 11, (control_word & 0x400) >> 10,
(control_word & 0x200) >> 9, (control_word & 0x100) >> 8,
......@@ -131,7 +131,7 @@ printk(" CW: ic=%d rc=%d%d pc=%d%d iem=%d ef=%d%d%d%d%d%d\n",
case TW_NaN:
/* case TW_Denormal: */
case TW_Infinity:
printk("st(%d) %c .%04x %04x %04x %04x e%+-6d ", i,
printk("st(%d) %c .%04lx %04lx %04lx %04lx e%+-6ld ", i,
r->sign ? '-' : '+',
(long)(r->sigh >> 16),
(long)(r->sigh & 0xFFFF),
......@@ -146,7 +146,7 @@ printk(" CW: ic=%d rc=%d%d pc=%d%d iem=%d ef=%d%d%d%d%d%d\n",
printk("%s\n", tag_desc[(int) (unsigned) r->tag]);
}
printk("[data] %c .%04x %04x %04x %04x e%+-6d ",
printk("[data] %c .%04lx %04lx %04lx %04lx e%+-6ld ",
FPU_loaded_data.sign ? '-' : '+',
(long)(FPU_loaded_data.sigh >> 16),
(long)(FPU_loaded_data.sigh & 0xFFFF),
......@@ -312,9 +312,9 @@ void exception(int n)
/* Real operation attempted on two operands, one a NaN. */
/* Returns nz if the exception is unmasked */
asmlinkage int real_2op_NaN(FPU_REG *a, FPU_REG *b, FPU_REG *dest)
asmlinkage int real_2op_NaN(FPU_REG const *a, FPU_REG const *b, FPU_REG *dest)
{
FPU_REG *x;
FPU_REG const *x;
int signalling;
/* The default result for the case of two "equal" NaNs (signs may
......
......@@ -2,7 +2,7 @@
| exception.h |
| |
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
+---------------------------------------------------------------------------*/
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......
......@@ -2,7 +2,7 @@
| fpu_asm.h |
| |
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
+---------------------------------------------------------------------------*/
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -47,7 +47,7 @@ void finit()
FPU_entry_eip = ip_offset = 0;
}
static FUNC finit_table[] = {
static FUNC const finit_table[] = {
Un_impl, Un_impl, fclex, finit, Un_impl, Un_impl, Un_impl, Un_impl
};
......@@ -63,7 +63,7 @@ static void fstsw_ax(void)
NO_NET_INSTR_EFFECT;
}
static FUNC fstsw_table[] = {
static FUNC const fstsw_table[] = {
fstsw_ax, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl
};
......@@ -78,7 +78,7 @@ static void fnop(void)
{
}
FUNC fp_nop_table[] = {
static FUNC const fp_nop_table[] = {
fnop, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl
};
......
......@@ -3,7 +3,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
+---------------------------------------------------------------------------*/
......@@ -117,25 +117,25 @@ extern FPU_REG FPU_loaded_data;
/*----- Prototypes for functions written in assembler -----*/
/* extern void reg_move(FPU_REG *a, FPU_REG *b); */
asmlinkage void mul64(unsigned long long *a, unsigned long long *b,
asmlinkage void mul64(unsigned long long const *a, unsigned long long const *b,
unsigned long long *result);
asmlinkage void poly_div2(unsigned long long *x);
asmlinkage void poly_div4(unsigned long long *x);
asmlinkage void poly_div16(unsigned long long *x);
asmlinkage void polynomial(unsigned accum[], unsigned x[],
unsigned short terms[][4], int n);
asmlinkage void polynomial(unsigned accum[], unsigned const x[],
unsigned short const terms[][4], int const n);
asmlinkage void normalize(FPU_REG *x);
asmlinkage void normalize_nuo(FPU_REG *x);
asmlinkage int reg_div(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ,
unsigned int control_w);
asmlinkage int reg_u_sub(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ,
unsigned int control_w);
asmlinkage int reg_u_mul(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ,
unsigned int control_w);
asmlinkage int reg_u_div(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ,
unsigned int control_w);
asmlinkage int reg_u_add(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ,
unsigned int control_w);
asmlinkage int reg_div(FPU_REG const *arg1, FPU_REG const *arg2,
FPU_REG *answ, unsigned int control_w);
asmlinkage int reg_u_sub(FPU_REG const *arg1, FPU_REG const *arg2,
FPU_REG *answ, unsigned int control_w);
asmlinkage int reg_u_mul(FPU_REG const *arg1, FPU_REG const *arg2,
FPU_REG *answ, unsigned int control_w);
asmlinkage int reg_u_div(FPU_REG const *arg1, FPU_REG const *arg2,
FPU_REG *answ, unsigned int control_w);
asmlinkage int reg_u_add(FPU_REG const *arg1, FPU_REG const *arg2,
FPU_REG *answ, unsigned int control_w);
asmlinkage int wm_sqrt(FPU_REG *n, unsigned int control_w);
asmlinkage unsigned shrx(void *l, unsigned x);
asmlinkage unsigned shrxs(void *v, unsigned x);
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| See the files "README" and "COPYING" for further copyright and warranty |
| information. |
......@@ -63,7 +63,7 @@
#define _df_d0_ fstp_i /* unofficial code (17) */
#define _df_d8_ fstp_i /* unofficial code (1f) */
static FUNC st_instr_table[64] = {
static FUNC const st_instr_table[64] = {
fadd__, fld_i_, __BAD__, __BAD__, fadd_i, ffree_, faddp_, _df_c0_,
fmul__, fxch_i, __BAD__, __BAD__, fmul_i, _dd_c8_, fmulp_, _df_c8_,
fcom_st, fp_nop, __BAD__, __BAD__, _dc_d0_, fst_i_, _de_d0_, _df_d0_,
......@@ -76,7 +76,7 @@ static FUNC st_instr_table[64] = {
#else /* Support only documented FPU op-codes */
static FUNC st_instr_table[64] = {
static FUNC const st_instr_table[64] = {
fadd__, fld_i_, __BAD__, __BAD__, fadd_i, ffree_, faddp_, __BAD__,
fmul__, fxch_i, __BAD__, __BAD__, fmul_i, __BAD__, fmulp_, __BAD__,
fcom_st, fp_nop, __BAD__, __BAD__, __BAD__, fst_i_, __BAD__, __BAD__,
......@@ -105,7 +105,7 @@ static FUNC st_instr_table[64] = {
/* Un-documented FPU op-codes supported by default. (see above) */
static unsigned char type_table[64] = {
static unsigned char const type_table[64] = {
_REGI_, _NONE_, _null_, _null_, _REGIi, _REGi_, _REGIp, _REGi_,
_REGI_, _REGIn, _null_, _null_, _REGIi, _REGI_, _REGIp, _REGI_,
_REGIc, _NONE_, _null_, _null_, _REGIc, _REG0_, _REGIc, _REG0_,
......@@ -118,7 +118,7 @@ static unsigned char type_table[64] = {
#else /* Support only documented FPU op-codes */
static unsigned char type_table[64] = {
static unsigned char const type_table[64] = {
_REGI_, _NONE_, _null_, _null_, _REGIi, _REGi_, _REGIp, _null_,
_REGI_, _REGIn, _null_, _null_, _REGIi, _null_, _REGIp, _null_,
_REGIc, _NONE_, _null_, _null_, _null_, _REG0_, _null_, _null_,
......@@ -189,12 +189,19 @@ asmlinkage void math_emulate(long arg)
}
/* user code space? */
if (FPU_CS != USER_CS)
if (FPU_CS == KERNEL_CS)
{
printk("math_emulate: %04x:%08x\n",FPU_CS,FPU_EIP);
printk("math_emulate: %04x:%08lx\n",FPU_CS,FPU_EIP);
panic("Math emulation needed in kernel");
}
/* We cannot handle multiple segments yet */
if (FPU_CS != USER_CS || FPU_DS != USER_DS)
{
FPU_ORIG_EIP = FPU_EIP;
math_abort(FPU_info,SIGILL);
}
FPU_lookahead = 1;
if (current->flags & PF_PTRACED)
FPU_lookahead = 0;
......@@ -523,6 +530,14 @@ asmlinkage void math_emulate(long arg)
FPU_instruction_done:
#ifdef DEBUG
{ /* !!!!!!!!!!! */
static unsigned int count = 0;
if ( (++count % 10000) == 0 )
printk("%d FP instr., current=0x%04x\n", count, code);
} /* !!!!!!!!!!! */
#endif DEBUG
ip_offset = FPU_entry_eip;
cs_selector = FPU_entry_op_cs;
data_operand_offset = (unsigned long)FPU_data_address;
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -117,7 +117,7 @@ static void fxam(void)
setcc(c);
}
static FUNC fp_etc_table[] = {
static FUNC const fp_etc_table[] = {
fchs, fabs, Un_impl, Un_impl, ftst_, fxam, Un_impl, Un_impl
};
......
......@@ -7,7 +7,7 @@ extern void stack_underflow_i(int i);
extern void stack_underflow_pop(int i);
extern int set_precision_flag(int flags);
asmlinkage void exception(int n);
asmlinkage int real_2op_NaN(FPU_REG *a, FPU_REG *b, FPU_REG *dest);
asmlinkage int real_2op_NaN(FPU_REG const *a, FPU_REG const *b, FPU_REG *dest);
asmlinkage int arith_invalid(FPU_REG *dest);
asmlinkage int divide_by_zero(int sign, FPU_REG *dest);
asmlinkage void set_precision_flag_up(void);
......@@ -57,7 +57,7 @@ extern void __math_abort(struct info *info, unsigned int signal);
extern void fp_etc(void);
/* fpu_trig.c */
extern void convert_l2reg(long *arg, FPU_REG *dest);
extern void convert_l2reg(long const *arg, FPU_REG *dest);
extern void trig_a(void);
extern void trig_b(void);
......@@ -68,28 +68,30 @@ extern void get_address(unsigned char FPU_modrm);
extern void load_store_instr(char type);
/* poly_2xm1.c */
extern int poly_2xm1(FPU_REG *arg, FPU_REG *result);
extern int poly_2xm1(FPU_REG const *arg, FPU_REG *result);
/* poly_atan.c */
extern void poly_atan(FPU_REG *arg);
extern void poly_add_1(FPU_REG *src);
/* poly_l2.c */
extern void poly_l2(FPU_REG *arg, FPU_REG *result);
extern int poly_l2p1(FPU_REG *arg, FPU_REG *result);
extern void poly_l2(FPU_REG const *arg, FPU_REG *result);
extern int poly_l2p1(FPU_REG const *arg, FPU_REG *result);
/* poly_sin.c */
extern void poly_sine(FPU_REG *arg, FPU_REG *result);
extern void poly_sine(FPU_REG const *arg, FPU_REG *result);
/* poly_tan.c */
extern void poly_tan(FPU_REG *arg, FPU_REG *y_reg, int invert);
extern void poly_tan(FPU_REG const *arg, FPU_REG *result, int invert);
/* reg_add_sub.c */
extern int reg_add(FPU_REG *a, FPU_REG *b, FPU_REG *dest, int control_w);
extern int reg_sub(FPU_REG *a, FPU_REG *b, FPU_REG *dest, int control_w);
extern int reg_add(FPU_REG const *a, FPU_REG const *b,
FPU_REG *dest, int control_w);
extern int reg_sub(FPU_REG const *a, FPU_REG const *b,
FPU_REG *dest, int control_w);
/* reg_compare.c */
extern int compare(FPU_REG *b);
extern int compare(FPU_REG const *b);
extern int compare_st_data(void);
extern void fcom_st(void);
extern void fcompst(void);
......@@ -124,4 +126,5 @@ extern char *fstenv(void);
extern void fsave(void);
/* reg_mul.c */
extern int reg_mul(FPU_REG *a, FPU_REG *b, FPU_REG *dest, unsigned int control_w);
extern int reg_mul(FPU_REG const *a, FPU_REG const *b,
FPU_REG *dest, unsigned int control_w);
......@@ -2,7 +2,7 @@
| fpu_system.h |
| |
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
+---------------------------------------------------------------------------*/
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -122,7 +122,7 @@ static int trig_arg(FPU_REG *X, int even)
/* Convert a long to register */
void convert_l2reg(long *arg, FPU_REG *dest)
void convert_l2reg(long const *arg, FPU_REG *dest)
{
long num = *arg;
......@@ -1696,7 +1696,7 @@ static void fscale(void)
/*---------------------------------------------------------------------------*/
static FUNC trig_table_a[] = {
static FUNC const trig_table_a[] = {
f2xm1, fyl2x, fptan, fpatan, fxtract, fprem1, fdecstp, fincstp
};
......@@ -1706,7 +1706,7 @@ void trig_a(void)
}
static FUNC trig_table_b[] =
static FUNC const trig_table_b[] =
{
fprem, fyl2xp1, fsqrt_, fsincos, frndint_, fscale, fsin, fcos
};
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......
......@@ -6,7 +6,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -35,7 +35,7 @@
#define pop_0() { pop_ptr->tag = TW_Empty; top++; }
static unsigned char type_table[32] = {
static unsigned char const type_table[32] = {
_PUSH_, _PUSH_, _PUSH_, _PUSH_,
_null_, _null_, _null_, _null_,
_REG0_, _REG0_, _REG0_, _REG0_,
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -17,7 +17,7 @@
#define HIPOWER 13
static unsigned short lterms[HIPOWER][4] =
static unsigned short const lterms[HIPOWER][4] =
{
{ 0x79b5, 0xd1cf, 0x17f7, 0xb172 },
{ 0x1b56, 0x058b, 0x7bff, 0x3d7f },
......@@ -38,7 +38,7 @@ static unsigned short lterms[HIPOWER][4] =
/*--- poly_2xm1() -----------------------------------------------------------+
| Requires a positive argument which is TW_Valid and < 1. |
+---------------------------------------------------------------------------*/
int poly_2xm1(FPU_REG *arg, FPU_REG *result)
int poly_2xm1(FPU_REG const *arg, FPU_REG *result)
{
short exponent;
long long Xll;
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -17,7 +17,7 @@
#define HIPOWERon 6 /* odd poly, negative terms */
static unsigned oddnegterms[HIPOWERon][2] =
static unsigned const oddnegterms[HIPOWERon][2] =
{
{ 0x00000000, 0x00000000 }, /* for + 1.0 */
{ 0x763b6f3d, 0x1adc4428 },
......@@ -28,7 +28,7 @@ static unsigned oddnegterms[HIPOWERon][2] =
} ;
#define HIPOWERop 6 /* odd poly, positive terms */
static unsigned oddplterms[HIPOWERop][2] =
static unsigned const oddplterms[HIPOWERop][2] =
{
{ 0xa6f67cb8, 0x94d910bd },
{ 0xa02ffab4, 0x0a43cb45 },
......@@ -38,7 +38,7 @@ static unsigned oddplterms[HIPOWERop][2] =
{ 0xf1dd2dbf, 0x000a530a }
};
static unsigned long long denomterm = 0xea2e6612fc4bd208LL;
static unsigned long long const denomterm = 0xea2e6612fc4bd208LL;
/*--- poly_atan() -----------------------------------------------------------+
......
......@@ -5,7 +5,7 @@
| A set of functions to divide 64 bit integers by fixed numbers. |
| |
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Call from C as: |
| void poly_div2(unsigned long long *x) |
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -19,7 +19,7 @@
#define HIPOWER 9
static unsigned short lterms[HIPOWER][4] =
static unsigned short const lterms[HIPOWER][4] =
{
/* Ideal computation with these coeffs gives about
64.6 bit rel accuracy. */
......@@ -40,7 +40,7 @@ static unsigned short lterms[HIPOWER][4] =
/*--- poly_l2() -------------------------------------------------------------+
| Base 2 logarithm by a polynomial approximation. |
+---------------------------------------------------------------------------*/
void poly_l2(FPU_REG *arg, FPU_REG *result)
void poly_l2(FPU_REG const *arg, FPU_REG *result)
{
short exponent;
char zero; /* flag for an Xx == 0 */
......@@ -224,7 +224,7 @@ void poly_l2(FPU_REG *arg, FPU_REG *result)
| Base 2 logarithm by a polynomial approximation. |
| log2(x+1) |
+---------------------------------------------------------------------------*/
int poly_l2p1(FPU_REG *arg, FPU_REG *result)
int poly_l2p1(FPU_REG const *arg, FPU_REG *result)
{
char sign = 0;
unsigned long long Xsq;
......
......@@ -4,7 +4,7 @@
| Multiply two 64 bit integers. |
| |
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Call from C as: |
| void mul64(long long *a, long long *b, long long *result) |
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -18,7 +18,7 @@
#define HIPOWER 5
static unsigned short lterms[HIPOWER][4] =
static unsigned short const lterms[HIPOWER][4] =
{
{ 0x846a, 0x42d1, 0xb544, 0x921f},
{ 0xe110, 0x75aa, 0xbc67, 0x1466},
......@@ -27,7 +27,7 @@ static unsigned short lterms[HIPOWER][4] =
{ 0xda03, 0x06aa, 0x0000, 0x0000},
};
static unsigned short negterms[HIPOWER][4] =
static unsigned short const negterms[HIPOWER][4] =
{
{ 0x95ed, 0x2df2, 0xe731, 0xa55d},
{ 0xd159, 0xe62b, 0xd2cc, 0x0132},
......@@ -40,7 +40,7 @@ static unsigned short negterms[HIPOWER][4] =
/*--- poly_sine() -----------------------------------------------------------+
| |
+---------------------------------------------------------------------------*/
void poly_sine(FPU_REG *arg, FPU_REG *result)
void poly_sine(FPU_REG const *arg, FPU_REG *result)
{
short exponent;
FPU_REG fixed_arg, arg_sqrd, arg_to_4, accum, negaccum;
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -17,7 +17,7 @@
#define HIPOWERop 3 /* odd poly, positive terms */
static unsigned short oddplterms[HIPOWERop][4] =
static unsigned short const oddplterms[HIPOWERop][4] =
{
{ 0x846a, 0x42d1, 0xb544, 0x921f},
{ 0x6fb2, 0x0215, 0x95c0, 0x099c},
......@@ -25,21 +25,21 @@ static unsigned short oddplterms[HIPOWERop][4] =
};
#define HIPOWERon 2 /* odd poly, negative terms */
static unsigned short oddnegterms[HIPOWERon][4] =
static unsigned short const oddnegterms[HIPOWERon][4] =
{
{ 0x6906, 0xe205, 0x25c8, 0x8838},
{ 0x1dd7, 0x3fe3, 0x944e, 0x002c}
};
#define HIPOWERep 2 /* even poly, positive terms */
static unsigned short evenplterms[HIPOWERep][4] =
static unsigned short const evenplterms[HIPOWERep][4] =
{
{ 0xdb8f, 0x3761, 0x1432, 0x2acf},
{ 0x16eb, 0x13c1, 0x3099, 0x0003}
};
#define HIPOWERen 2 /* even poly, negative terms */
static unsigned short evennegterms[HIPOWERen][4] =
static unsigned short const evennegterms[HIPOWERen][4] =
{
{ 0x3a7c, 0xe4c5, 0x7f87, 0x2945},
{ 0x572b, 0x664c, 0xc543, 0x018c}
......@@ -49,7 +49,7 @@ static unsigned short evennegterms[HIPOWERen][4] =
/*--- poly_tan() ------------------------------------------------------------+
| |
+---------------------------------------------------------------------------*/
void poly_tan(FPU_REG *arg, FPU_REG *y_reg, int invert)
void poly_tan(FPU_REG const *arg, FPU_REG *result, int invert)
{
short exponent;
FPU_REG odd_poly, even_poly, pos_poly, neg_poly;
......@@ -61,7 +61,7 @@ void poly_tan(FPU_REG *arg, FPU_REG *y_reg, int invert)
#ifdef PARANOID
if ( arg->sign != 0 ) /* Can't hack a number < 0.0 */
{ arith_invalid(y_reg); return; } /* Need a positive number */
{ arith_invalid(result); return; } /* Need a positive number */
#endif PARANOID
arg_signif = significand(arg);
......@@ -142,8 +142,8 @@ void poly_tan(FPU_REG *arg, FPU_REG *y_reg, int invert)
/* Now ready to copy the results */
if ( invert )
{ reg_div(&even_poly, &odd_poly, y_reg, FULL_PRECISION); }
{ reg_div(&even_poly, &odd_poly, result, FULL_PRECISION); }
else
{ reg_div(&odd_poly, &even_poly, y_reg, FULL_PRECISION); }
{ reg_div(&odd_poly, &even_poly, result, FULL_PRECISION); }
}
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Call from C as: |
| void polynomial(unsigned accum[], unsigned x[], unsigned terms[][2], |
......@@ -22,7 +22,7 @@
#include "fpu_asm.h"
/* #define EXTRA_PRECISE Do not use: not complete */
/* #define EXTRA_PRECISE // Do not use: not complete */
#define TERM_SIZE $8
#define SUM_MS -20(%ebp) /* sum ms long */
......@@ -70,7 +70,7 @@ L_accum_loop:
movl SUM_MIDDLE,%eax
mull (%esi) /* x ls long */
/* movl %eax,-16(%ebp) Not needed */
/* movl %eax,-16(%ebp) // Not needed */
movl %edx,ACCUM_LS
movl SUM_MIDDLE,%eax
......@@ -119,7 +119,7 @@ L_no_poly_round:
L_accum_done:
#ifdef EXTRA_PRECISE
/* And round the result */
/* Round the result */
testb $128,SUM_LS_HI
je L_poly_done
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -22,7 +22,7 @@
#include "fpu_system.h"
int reg_add(FPU_REG *a, FPU_REG *b, FPU_REG *dest, int control_w)
int reg_add(FPU_REG const *a, FPU_REG const *b, FPU_REG *dest, int control_w)
{
char saved_sign = dest->sign;
int diff;
......@@ -162,7 +162,7 @@ int reg_add(FPU_REG *a, FPU_REG *b, FPU_REG *dest, int control_w)
/* Subtract b from a. (a-b) -> dest */
int reg_sub(FPU_REG *a, FPU_REG *b, FPU_REG *dest, int control_w)
int reg_sub(FPU_REG const *a, FPU_REG const *b, FPU_REG *dest, int control_w)
{
char saved_sign = dest->sign;
int diff;
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -21,7 +21,7 @@
#include "status_w.h"
int compare(FPU_REG *b)
int compare(FPU_REG const *b)
{
int diff;
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -16,47 +16,47 @@
#include "reg_constant.h"
FPU_REG CONST_1 = { SIGN_POS, TW_Valid, EXP_BIAS,
FPU_REG const CONST_1 = { SIGN_POS, TW_Valid, EXP_BIAS,
0x00000000, 0x80000000 };
FPU_REG CONST_2 = { SIGN_POS, TW_Valid, EXP_BIAS+1,
FPU_REG const CONST_2 = { SIGN_POS, TW_Valid, EXP_BIAS+1,
0x00000000, 0x80000000 };
FPU_REG CONST_HALF = { SIGN_POS, TW_Valid, EXP_BIAS-1,
FPU_REG const CONST_HALF = { SIGN_POS, TW_Valid, EXP_BIAS-1,
0x00000000, 0x80000000 };
FPU_REG CONST_L2T = { SIGN_POS, TW_Valid, EXP_BIAS+1,
FPU_REG const CONST_L2T = { SIGN_POS, TW_Valid, EXP_BIAS+1,
0xcd1b8afe, 0xd49a784b };
FPU_REG CONST_L2E = { SIGN_POS, TW_Valid, EXP_BIAS,
FPU_REG const CONST_L2E = { SIGN_POS, TW_Valid, EXP_BIAS,
0x5c17f0bc, 0xb8aa3b29 };
FPU_REG CONST_PI = { SIGN_POS, TW_Valid, EXP_BIAS+1,
FPU_REG const CONST_PI = { SIGN_POS, TW_Valid, EXP_BIAS+1,
0x2168c235, 0xc90fdaa2 };
FPU_REG CONST_PI2 = { SIGN_POS, TW_Valid, EXP_BIAS,
FPU_REG const CONST_PI2 = { SIGN_POS, TW_Valid, EXP_BIAS,
0x2168c235, 0xc90fdaa2 };
FPU_REG CONST_PI4 = { SIGN_POS, TW_Valid, EXP_BIAS-1,
FPU_REG const CONST_PI4 = { SIGN_POS, TW_Valid, EXP_BIAS-1,
0x2168c235, 0xc90fdaa2 };
FPU_REG CONST_LG2 = { SIGN_POS, TW_Valid, EXP_BIAS-2,
FPU_REG const CONST_LG2 = { SIGN_POS, TW_Valid, EXP_BIAS-2,
0xfbcff799, 0x9a209a84 };
FPU_REG CONST_LN2 = { SIGN_POS, TW_Valid, EXP_BIAS-1,
FPU_REG const CONST_LN2 = { SIGN_POS, TW_Valid, EXP_BIAS-1,
0xd1cf79ac, 0xb17217f7 };
/* Extra bits to take pi/2 to more than 128 bits precision. */
FPU_REG CONST_PI2extra = { SIGN_NEG, TW_Valid, EXP_BIAS-66,
FPU_REG const CONST_PI2extra = { SIGN_NEG, TW_Valid, EXP_BIAS-66,
0xfc8f8cbb, 0xece675d1 };
/* Only the sign (and tag) is used in internal zeroes */
FPU_REG CONST_Z = { SIGN_POS, TW_Zero, EXP_UNDER, 0x0, 0x0 };
FPU_REG const CONST_Z = { SIGN_POS, TW_Zero, EXP_UNDER, 0x0, 0x0 };
/* Only the sign and significand (and tag) are used in internal NaNs */
/* The 80486 never generates one of these
FPU_REG CONST_SNAN = { SIGN_POS, TW_NaN, EXP_OVER, 0x00000001, 0x80000000 };
FPU_REG const CONST_SNAN = { SIGN_POS, TW_NaN, EXP_OVER, 0x00000001, 0x80000000 };
*/
/* This is the real indefinite QNaN */
FPU_REG CONST_QNaN = { SIGN_NEG, TW_NaN, EXP_OVER, 0x00000000, 0xC0000000 };
FPU_REG const CONST_QNaN = { SIGN_NEG, TW_NaN, EXP_OVER, 0x00000000, 0xC0000000 };
/* Only the sign (and tag) is used in internal infinities */
FPU_REG CONST_INF = { SIGN_POS, TW_Infinity, EXP_OVER, 0x00000000, 0x80000000 };
FPU_REG const CONST_INF = { SIGN_POS, TW_Infinity, EXP_OVER, 0x00000000, 0x80000000 };
static void fld_const(FPU_REG *c)
static void fld_const(FPU_REG const *c)
{
FPU_REG *st_new_ptr;
......
......@@ -2,7 +2,7 @@
| reg_constant.h |
| |
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
+---------------------------------------------------------------------------*/
......@@ -11,21 +11,21 @@
#include "fpu_emu.h"
extern FPU_REG CONST_1;
extern FPU_REG CONST_2;
extern FPU_REG CONST_HALF;
extern FPU_REG CONST_L2T;
extern FPU_REG CONST_L2E;
extern FPU_REG CONST_PI;
extern FPU_REG CONST_PI2;
extern FPU_REG CONST_PI2extra;
extern FPU_REG CONST_PI4;
extern FPU_REG CONST_LG2;
extern FPU_REG CONST_LN2;
extern FPU_REG CONST_Z;
extern FPU_REG CONST_PINF;
extern FPU_REG CONST_INF;
extern FPU_REG CONST_MINF;
extern FPU_REG CONST_QNaN;
extern FPU_REG const CONST_1;
extern FPU_REG const CONST_2;
extern FPU_REG const CONST_HALF;
extern FPU_REG const CONST_L2T;
extern FPU_REG const CONST_L2E;
extern FPU_REG const CONST_PI;
extern FPU_REG const CONST_PI2;
extern FPU_REG const CONST_PI2extra;
extern FPU_REG const CONST_PI4;
extern FPU_REG const CONST_LG2;
extern FPU_REG const CONST_LN2;
extern FPU_REG const CONST_Z;
extern FPU_REG const CONST_PINF;
extern FPU_REG const CONST_INF;
extern FPU_REG const CONST_MINF;
extern FPU_REG const CONST_QNaN;
#endif _REG_CONSTANT_H_
......@@ -6,7 +6,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Call from C as: |
| void reg_div(FPU_REG *a, FPU_REG *b, FPU_REG *dest, |
......@@ -17,6 +17,7 @@
#include "exception.h"
#include "fpu_asm.h"
.text
.align 2
......@@ -24,6 +25,9 @@
_reg_div:
pushl %ebp
movl %esp,%ebp
#ifdef REENTRANT_FPU
subl $28,%esp /* Needed by divide_kernel */
#endif REENTRANT_FPU
pushl %esi
pushl %edi
......@@ -45,7 +49,7 @@ _reg_div:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
xL_arg1_not_denormal:
cmpl EXP_UNDER,EXP(%ebx)
......@@ -53,7 +57,7 @@ xL_arg1_not_denormal:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
xL_arg2_not_denormal:
#endif DENORM_OPERAND
......@@ -86,7 +90,6 @@ L_div_special:
L_arg1_NaN:
L_arg2_NaN:
pushl %edi /* Destination */
/* pushl %ebx */
pushl %esi
pushl %ebx /* Ordering is important here */
call _real_2op_NaN
......@@ -125,7 +128,7 @@ L_inf_valid:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
#endif DENORM_OPERAND
jmp L_copy_arg1 /* Answer is Inf */
......@@ -164,7 +167,7 @@ L_arg2_not_zero:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
#endif DENORM_OPERAND
jmp L_return_zero /* Answer is zero */
......@@ -184,7 +187,7 @@ L_arg2_not_inf:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
#endif DENORM_OPERAND
L_copy_arg1:
......@@ -211,7 +214,11 @@ LDiv_negative_result:
xorl %eax,%eax /* Valid result */
LDiv_exit:
#ifdef REENTRANT_FPU
leal -40(%ebp),%esp
#else
leal -12(%ebp),%esp
#endif REENTRANT_FPU
popl %ebx
popl %edi
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......
......@@ -5,7 +5,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -21,7 +21,8 @@
/* This routine must be called with non-empty source registers */
int reg_mul(FPU_REG *a, FPU_REG *b, FPU_REG *dest, unsigned int control_w)
int reg_mul(FPU_REG const *a, FPU_REG const *b,
FPU_REG *dest, unsigned int control_w)
{
char saved_sign = dest->sign;
char sign = (a->sign ^ b->sign);
......
......@@ -3,7 +3,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Normalize the value in a FPU_REG. |
| |
......@@ -39,7 +39,6 @@ _normalize:
orl %eax,%eax
jz L_zero /* The contents are zero */
/* L_shift_32: */
movl %eax,%edx
xorl %eax,%eax
subl $32,EXP(%ebx) /* This can cause an underflow */
......@@ -109,7 +108,6 @@ _normalize_nuo:
orl %eax,%eax
jz L_zero /* The contents are zero */
/* L_nuo_shift_32: */
movl %eax,%edx
xorl %eax,%eax
subl $32,EXP(%ebx) /* This can cause an underflow */
......
......@@ -6,11 +6,11 @@
| |
| Copyright (C) 1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| This code has four possible entry points. |
| The following must be entered by a jmp intruction: |
| FPU_round, FPU_round_sqrt, and FPU_Arith_exit. |
| fpu_reg_round, fpu_reg_round_sqrt, and fpu_Arith_exit. |
| |
| The _round_reg entry point is intended to be used by C code. |
| From C, call as: |
......@@ -24,14 +24,14 @@
/*---------------------------------------------------------------------------+
| Four entry points. |
| |
| Needed by both the FPU_round and FPU_round_sqrt entry points: |
| Needed by both the fpu_reg_round and fpu_reg_round_sqrt entry points: |
| %eax:%ebx 64 bit significand |
| %edx 32 bit extension of the significand |
| %edi pointer to an FPU_REG for the result to be stored |
| stack calling function must have set up a C stack frame and |
| pushed %esi, %edi, and %ebx |
| |
| Needed just for the FPU_round_sqrt entry point: |
| Needed just for the fpu_reg_round_sqrt entry point: |
| %cx A control word in the same format as the FPU control word. |
| Otherwise, PARAM4 must give such a value. |
| |
......@@ -81,18 +81,30 @@
#define DENORMAL $1
#define UNMASKED_UNDERFLOW $2
#ifdef REENTRANT_FPU
/* Make the code re-entrant by putting
local storage on the stack: */
#define FPU_bits_lost (%esp)
#define FPU_denormal 1(%esp)
#else
/* Not re-entrant, so we can gain speed by putting
local storage in a static area: */
.data
.align 2,0
FPU_bits_lost:
.byte 0
FPU_denormal:
.byte 0
#endif REENTRANT_FPU
.text
.align 2,144
.globl FPU_round
.globl FPU_round_sqrt
.globl FPU_Arith_exit
.globl fpu_reg_round
.globl fpu_reg_round_sqrt
.globl fpu_Arith_exit
.globl _round_reg
/* Entry point when called from C */
......@@ -108,19 +120,21 @@ _round_reg:
movl SIGL(%edi),%ebx
movl PARAM2,%edx
movl PARAM3,%ecx
jmp FPU_round_sqrt
jmp fpu_reg_round_sqrt
FPU_round: /* Normal entry point */
fpu_reg_round: /* Normal entry point */
movl PARAM4,%ecx
FPU_round_sqrt: /* Entry point from wm_sqrt.S */
fpu_reg_round_sqrt: /* Entry point from wm_sqrt.S */
#ifdef REENTRANT_FPU
pushl %ebx /* adjust the stack pointer */
#endif REENTRANT_FPU
#ifdef PARANOID
/*
* Cannot use this here yet
* orl %eax,%eax
* jns L_entry_bugged
*/
/* Cannot use this here yet */
/* orl %eax,%eax */
/* jns L_entry_bugged */
#endif PARANOID
cmpl EXP_UNDER,EXP(%edi)
......@@ -218,7 +232,7 @@ LCheck_truncate_24:
andl $0x000000ff,%ecx
orl %ebx,%ecx
orl %edx,%ecx
jz LRe_normalise /* No truncation needed */
jz LRe_normalise /* No truncation needed */
LDo_truncate_24:
andl $0xffffff00,%eax /* Truncate to 24 bits */
......@@ -392,7 +406,12 @@ xL_Store_significand:
cmpl EXP_OVER,EXP(%edi)
jge L_overflow
FPU_Arith_exit:
fpu_reg_round_exit:
#ifdef REENTRANT_FPU
popl %ebx /* adjust the stack pointer */
#endif REENTRANT_FPU
fpu_Arith_exit:
popl %ebx
popl %edi
popl %esi
......@@ -427,8 +446,8 @@ xL_precision_lost_down:
* have to be undone later...
*/
xMake_denorm:
/* The action to be taken depends upon whether the underflow */
/* exception is masked */
/* The action to be taken depends upon whether the underflow
exception is masked */
testb CW_Underflow,%cl /* Underflow mask. */
jz xUnmasked_underflow /* Do not make a denormal. */
......@@ -601,7 +620,7 @@ L_overflow:
push %edi
call _arith_overflow
pop %edi
jmp FPU_Arith_exit
jmp fpu_reg_round_exit
xSignal_underflow:
......@@ -643,5 +662,5 @@ L_entry_bugged:
popl %ebx
L_exception_exit:
mov $1,%eax
jmp FPU_Arith_exit
jmp fpu_reg_round_exit
#endif PARANOID
......@@ -7,7 +7,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Call from C as: |
| void reg_u_add(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ, |
......@@ -34,7 +34,6 @@
_reg_u_add:
pushl %ebp
movl %esp,%ebp
/* subl $16,%esp */
pushl %esi
pushl %edi
pushl %ebx
......@@ -48,7 +47,7 @@ _reg_u_add:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
xOp1_not_denorm:
cmpl EXP_UNDER,EXP(%edi)
......@@ -56,15 +55,13 @@ xOp1_not_denorm:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
xOp2_not_denorm:
#endif DENORM_OPERAND
/* xorl %ecx,%ecx */
movl EXP(%esi),%ecx
subl EXP(%edi),%ecx /* exp1 - exp2 */
/* jnc L_arg1_larger */
jge L_arg1_larger
/* num1 is smaller */
......@@ -82,12 +79,12 @@ L_arg1_larger:
L_accum_loaded:
movl PARAM3,%edi /* destination */
/* movb SIGN(%esi),%dl */
/* movb %dl,SIGN(%edi) */ /* Copy the sign from the first arg */
/* movb SIGN(%esi),%dl
movb %dl,SIGN(%edi) */ /* Copy the sign from the first arg */
movl EXP(%esi),%edx
movl %edx,EXP(%edi) /* Copy exponent to destination */
movl %edx,EXP(%edi) /* Copy exponent to destination */
xorl %edx,%edx /* clear the extension */
......@@ -170,7 +167,7 @@ L_no_bit_lost:
incl EXP(%edi)
L_round_the_result:
jmp FPU_round /* Round the result */
jmp fpu_reg_round /* Round the result */
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......@@ -26,12 +26,21 @@
#include "control_w.h"
#ifdef REENTRANT_FPU
/* Local storage on the stack: */
#define FPU_accum_0 -4(%ebp) /* ms word */
#define FPU_accum_1 -8(%ebp)
#else
/* Local storage in a static area: */
.data
.align 2,0
accum_0:
.align 4,0
FPU_accum_0:
.long 0
accum_1:
FPU_accum_1:
.long 0
#endif REENTRANT_FPU
.text
......@@ -41,6 +50,10 @@ accum_1:
_reg_u_mul:
pushl %ebp
movl %esp,%ebp
#ifdef REENTRANT_FPU
subl $8,%esp
#endif REENTRANT_FPU
pushl %esi
pushl %edi
pushl %ebx
......@@ -62,7 +75,7 @@ _reg_u_mul:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
xOp1_not_denorm:
movl EXP(%edi),%eax
......@@ -71,7 +84,7 @@ xOp1_not_denorm:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
xOp2_not_denorm:
#endif DENORM_OPERAND
......@@ -81,18 +94,18 @@ xOp2_not_denorm:
movl SIGL(%esi),%eax
mull SIGL(%edi)
movl %eax,accum_0
movl %edx,accum_1
movl %eax,FPU_accum_0
movl %edx,FPU_accum_1
movl SIGL(%esi),%eax
mull SIGH(%edi)
addl %eax,accum_1
addl %eax,FPU_accum_1
adcl %edx,%ebx
/* adcl $0,%ecx // overflow here is not possible */
movl SIGH(%esi),%eax
mull SIGL(%edi)
addl %eax,accum_1
addl %eax,FPU_accum_1
adcl %edx,%ebx
adcl $0,%ecx
......@@ -104,6 +117,7 @@ xOp2_not_denorm:
movl EXP(%esi),%eax /* Compute the exponent */
addl EXP(%edi),%eax
subl EXP_BIAS-1,%eax
/* Have now finished with the sources */
movl PARAM3,%edi /* Point to the destination */
movl %eax,EXP(%edi)
......@@ -113,15 +127,15 @@ xOp2_not_denorm:
jnz LResult_Normalised
/* Normalize by shifting left one bit */
shll $1,accum_0
rcll $1,accum_1
shll $1,FPU_accum_0
rcll $1,FPU_accum_1
rcll $1,%ebx
rcll $1,%ecx
decl EXP(%edi)
LResult_Normalised:
movl accum_0,%eax
movl accum_1,%edx
movl FPU_accum_0,%eax
movl FPU_accum_1,%edx
orl %eax,%eax
jz L_extent_zero
......@@ -129,7 +143,7 @@ LResult_Normalised:
L_extent_zero:
movl %ecx,%eax
jmp FPU_round
jmp fpu_reg_round
#ifdef PARANOID
......
......@@ -6,7 +6,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Call from C as: |
| void reg_u_sub(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ, |
......@@ -48,7 +48,7 @@ _reg_u_sub:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
xOp1_not_denorm:
cmpl EXP_UNDER,EXP(%edi)
......@@ -56,7 +56,7 @@ xOp1_not_denorm:
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
jnz fpu_Arith_exit
xOp2_not_denorm:
#endif DENORM_OPERAND
......@@ -85,8 +85,8 @@ xOp2_not_denorm:
movl PARAM3,%edi /* destination */
movl EXP(%esi),%edx
movl %edx,EXP(%edi) /* Copy exponent to destination */
/* movb SIGN(%esi),%dl */
/* movb %dl,SIGN(%edi) */ /* Copy the sign from the first arg */
/* movb SIGN(%esi),%dl
movb %dl,SIGN(%edi) */ /* Copy the sign from the first arg */
xorl %edx,%edx /* register extension */
......@@ -214,7 +214,7 @@ L_subtr:
/* Shift left 64 bits */
subl $64,EXP(%edi)
xchg %edx,%eax
jmp FPU_round
jmp fpu_reg_round
L_must_be_zero:
#ifdef PARANOID
......@@ -246,7 +246,7 @@ L_shift_1:
subl %ecx,EXP(%edi) /* Can get underflow here */
L_round:
jmp FPU_round /* Round the result */
jmp fpu_reg_round /* Round the result */
#ifdef PARANOID
......
......@@ -3,7 +3,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
+---------------------------------------------------------------------------*/
......
......@@ -4,7 +4,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| |
+---------------------------------------------------------------------------*/
......
......@@ -5,7 +5,7 @@
| 64 bit right shift functions |
| |
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Call from C as: |
| unsigned shrx(void *arg1, unsigned arg2) |
......
......@@ -6,7 +6,7 @@
| |
| Copyright (C) 1992,1993 |
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
| Australia. E-mail apm233m@vaxc.cc.monash.edu.au |
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
| |
| Call from C as: |
| void wm_sqrt(FPU_REG *n, unsigned int control_word) |
......@@ -29,41 +29,60 @@
#include "fpu_asm.h"
.data
#ifdef REENTRANT_FPU
/* Local storage on the stack: */
#define FPU_accum_3 -4(%ebp) /* ms word */
#define FPU_accum_2 -8(%ebp)
#define FPU_accum_1 -12(%ebp)
#define FPU_accum_0 -16(%ebp)
/*
Local storage:
* The de-normalised argument:
* sq_2 sq_1 sq_0
* b b b b b b b ... b b b b b b .... b b b b 0 0 0 ... 0
* ^ binary point here
*/
#define FPU_fsqrt_arg_2 -20(%ebp) /* ms word */
#define FPU_fsqrt_arg_1 -24(%ebp)
#define FPU_fsqrt_arg_0 -28(%ebp) /* ls word, at most the ms bit is set */
#else
/* Local storage in a static area: */
.data
.align 4,0
accum_3:
FPU_accum_3:
.long 0 /* ms word */
accum_2:
FPU_accum_2:
.long 0
accum_1:
FPU_accum_1:
.long 0
accum_0:
FPU_accum_0:
.long 0
/*
* The de-normalised argument:
* sq_2 sq_1 sq_0
* b b b b b b b ... b b b b b b .... b b b b 0 0 0 ... 0
* ^ binary point here
/* The de-normalised argument:
sq_2 sq_1 sq_0
b b b b b b b ... b b b b b b .... b b b b 0 0 0 ... 0
^ binary point here
*/
fsqrt_arg_2:
FPU_fsqrt_arg_2:
.long 0 /* ms word */
fsqrt_arg_1:
FPU_fsqrt_arg_1:
.long 0
fsqrt_arg_0:
FPU_fsqrt_arg_0:
.long 0 /* ls word, at most the ms bit is set */
#endif REENTRANT_FPU
.text
.align 2,144
.globl _wm_sqrt
_wm_sqrt:
pushl %ebp
movl %esp,%ebp
#ifdef REENTRANT_FPU
subl $28,%esp
#endif REENTRANT_FPU
pushl %esi
pushl %edi
pushl %ebx
......@@ -84,12 +103,12 @@ _wm_sqrt:
rcrl $1,%edx
sqrt_arg_ge_2:
/* From here on, n is never accessed directly again until it is */
/* replaced by the answer. */
/* From here on, n is never accessed directly again until it is
replaced by the answer. */
movl %eax,fsqrt_arg_2 /* ms word of n */
movl %ecx,fsqrt_arg_1
movl %edx,fsqrt_arg_0
movl %eax,FPU_fsqrt_arg_2 /* ms word of n */
movl %ecx,FPU_fsqrt_arg_1
movl %edx,FPU_fsqrt_arg_0
/* Make a linear first estimate */
shrl $1,%eax
......@@ -108,7 +127,7 @@ sqrt_prelim_no_adjust:
/* We have now computed (approx) (2 + x) / 3, which forms the basis
for a few iterations of Newton's method */
movl fsqrt_arg_2,%ecx /* ms word */
movl FPU_fsqrt_arg_2,%ecx /* ms word */
/*
* From our initial estimate, three iterations are enough to get us
......@@ -148,14 +167,14 @@ sqrt_prelim_no_adjust:
mull %esi
/* guess^2 now in %edx:%eax */
movl fsqrt_arg_1,%ecx
movl FPU_fsqrt_arg_1,%ecx
subl %ecx,%eax
movl fsqrt_arg_2,%ecx /* ms word of normalized n */
movl FPU_fsqrt_arg_2,%ecx /* ms word of normalized n */
sbbl %ecx,%edx
jnc sqrt_stage_2_positive
/* subtraction gives a negative result */
/* negate the result before division */
/* Subtraction gives a negative result,
negate the result before division. */
notl %edx
notl %eax
addl $1,%eax
......@@ -192,7 +211,7 @@ sqrt_stage_2_finish:
#ifdef PARANOID
/* It should be possible to get here only if the arg is ffff....ffff */
cmp $0xffffffff,fsqrt_arg_1
cmp $0xffffffff,FPU_fsqrt_arg_1
jnz sqrt_stage_2_error
#endif PARANOID
......@@ -212,50 +231,50 @@ sqrt_stage_2_error:
sqrt_stage_2_done:
/* Now the square root has been computed to better than 60 bits */
/* Now the square root has been computed to better than 60 bits. */
/* Find the square of the guess */
/* Find the square of the guess. */
movl %edi,%eax /* ls word of guess */
mull %edi
movl %edx,accum_1
movl %edx,FPU_accum_1
movl %esi,%eax
mull %esi
movl %edx,accum_3
movl %eax,accum_2
movl %edx,FPU_accum_3
movl %eax,FPU_accum_2
movl %edi,%eax
mull %esi
addl %eax,accum_1
adcl %edx,accum_2
adcl $0,accum_3
addl %eax,FPU_accum_1
adcl %edx,FPU_accum_2
adcl $0,FPU_accum_3
/* movl %esi,%eax */
/* mull %edi */
addl %eax,accum_1
adcl %edx,accum_2
adcl $0,accum_3
/* guess^2 now in accum_3:accum_2:accum_1 */
movl fsqrt_arg_0,%eax /* get normalized n */
subl %eax,accum_1
movl fsqrt_arg_1,%eax
sbbl %eax,accum_2
movl fsqrt_arg_2,%eax /* ms word of normalized n */
sbbl %eax,accum_3
addl %eax,FPU_accum_1
adcl %edx,FPU_accum_2
adcl $0,FPU_accum_3
/* guess^2 now in FPU_accum_3:FPU_accum_2:FPU_accum_1 */
movl FPU_fsqrt_arg_0,%eax /* get normalized n */
subl %eax,FPU_accum_1
movl FPU_fsqrt_arg_1,%eax
sbbl %eax,FPU_accum_2
movl FPU_fsqrt_arg_2,%eax /* ms word of normalized n */
sbbl %eax,FPU_accum_3
jnc sqrt_stage_3_positive
/* subtraction gives a negative result */
/* negate the result before division */
notl accum_1
notl accum_2
notl accum_3
addl $1,accum_1
adcl $0,accum_2
/* Subtraction gives a negative result,
negate the result before division */
notl FPU_accum_1
notl FPU_accum_2
notl FPU_accum_3
addl $1,FPU_accum_1
adcl $0,FPU_accum_2
#ifdef PARANOID
adcl $0,accum_3 /* This must be zero */
adcl $0,FPU_accum_3 /* This must be zero */
jz sqrt_stage_3_no_error
sqrt_stage_3_error:
......@@ -265,8 +284,8 @@ sqrt_stage_3_error:
sqrt_stage_3_no_error:
#endif PARANOID
movl accum_2,%edx
movl accum_1,%eax
movl FPU_accum_2,%edx
movl FPU_accum_1,%eax
divl %esi
movl %eax,%ecx
......@@ -284,8 +303,8 @@ sqrt_stage_3_no_error:
jmp sqrt_stage_3_finished
sqrt_stage_3_positive:
movl accum_2,%edx
movl accum_1,%eax
movl FPU_accum_2,%edx
movl FPU_accum_1,%eax
divl %esi
movl %eax,%ecx
......@@ -333,7 +352,7 @@ sqrt_round_result:
movl PARAM1,%edi
movl EXP_BIAS,EXP(%edi) /* Result is in [1.0 .. 2.0) */
movl PARAM2,%ecx
jmp FPU_round_sqrt
jmp fpu_reg_round_sqrt
sqrt_near_exact_x:
......@@ -398,8 +417,8 @@ sqrt_near_exact_large:
sqrt_get_more_precision:
/* This case is almost the same as the above, except we start */
/* with an extra bit of precision in the estimate. */
/* This case is almost the same as the above, except we start
with an extra bit of precision in the estimate. */
stc /* The extra bit. */
rcll $1,%edi /* Shift the estimate left one bit */
rcll $1,%esi
......
......@@ -33,14 +33,10 @@ endif
all: driversubdirs
driversubdirs: dummy
@for i in $(SUBDIRS); do (cd $$i && echo $$i && $(MAKE)) || exit; done
clean:
rm -f core *.o *.a *.s
for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done
dep:
for i in $(SUBDIRS); do (cd $$i && $(MAKE) dep) || exit; done
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i dep; done
dummy:
......
......@@ -51,10 +51,6 @@ block.a: $(OBJS)
$(AR) rcs block.a $(OBJS)
sync
clean:
rm -f core *.o *.a *.s
for i in $(ALL_SUBDIRS); do (cd $$i && $(MAKE) clean); done
dep:
$(CPP) -M $(SRCS) > .depend
......
#ifndef _BLK_H
#define _BLK_H
#include <linux/major.h>
#include <linux/sched.h>
#include <linux/locks.h>
#include <linux/genhd.h>
......@@ -15,7 +16,7 @@
* buffers when they are in the queue. 64 seems to be too many (easily
* long pauses in reading when heavy writing/syncing is going on)
*/
#define NR_REQUEST 32
#define NR_REQUEST 64
/*
* Ok, this is an expanded form so that we can use the same
......@@ -71,7 +72,6 @@ struct sec_size {
extern struct sec_size * blk_sec[MAX_BLKDEV];
extern struct blk_dev_struct blk_dev[MAX_BLKDEV];
extern struct request request[NR_REQUEST];
extern struct wait_queue * wait_for_request;
extern void resetup_one_dev(struct gendisk *dev, int drive);
......@@ -104,7 +104,8 @@ extern unsigned long xd_init(unsigned long mem_start, unsigned long mem_end);
* supported are hard-disks and floppies.
*/
#if (MAJOR_NR == 1)
#if (MAJOR_NR == MEM_MAJOR)
/* ram disk */
#define DEVICE_NAME "ramdisk"
#define DEVICE_REQUEST do_rd_request
......@@ -112,8 +113,8 @@ extern unsigned long xd_init(unsigned long mem_start, unsigned long mem_end);
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == 2)
/* floppy */
#elif (MAJOR_NR == FLOPPY_MAJOR)
static void floppy_on(unsigned int nr);
static void floppy_off(unsigned int nr);
......@@ -124,7 +125,8 @@ static void floppy_off(unsigned int nr);
#define DEVICE_ON(device) floppy_on(DEVICE_NR(device))
#define DEVICE_OFF(device) floppy_off(DEVICE_NR(device))
#elif (MAJOR_NR == 3)
#elif (MAJOR_NR == HD_MAJOR)
/* harddisk: timeout is 6 seconds.. */
#define DEVICE_NAME "harddisk"
#define DEVICE_INTR do_hd
......@@ -135,8 +137,8 @@ static void floppy_off(unsigned int nr);
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == 8)
/* scsi disk */
#elif (MAJOR_NR == SCSI_DISK_MAJOR)
#define DEVICE_NAME "scsidisk"
#define DEVICE_INTR do_sd
#define TIMEOUT_VALUE 200
......@@ -145,17 +147,16 @@ static void floppy_off(unsigned int nr);
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == 9)
/* scsi tape */
#elif (MAJOR_NR == SCSI_TAPE_MAJOR)
#define DEVICE_NAME "scsitape"
#define DEVICE_INTR do_st
#define DEVICE_REQUEST do_st_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == 11)
/* scsi CD-ROM */
#elif (MAJOR_NR == SCSI_CDROM_MAJOR)
#define DEVICE_NAME "CD-ROM"
#define DEVICE_INTR do_sr
#define DEVICE_REQUEST do_sr_request
......@@ -163,24 +164,24 @@ static void floppy_off(unsigned int nr);
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == 13)
/* xt hard disk */
#elif (MAJOR_NR == XT_DISK_MAJOR)
#define DEVICE_NAME "xt disk"
#define DEVICE_REQUEST do_xd_request
#define DEVICE_NR(device) (MINOR(device) >> 6)
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == 15)
/* CDU31A CD-ROM */
#elif (MAJOR_NR == CDU31A_CDROM_MAJOR)
#define DEVICE_NAME "CDU31A"
#define DEVICE_REQUEST do_cdu31a_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == 23)
/* MITSUMI CD-ROM */
#elif (MAJOR_NR == MITSUMI_CDROM_MAJOR)
#define DEVICE_NAME "Mitsumi CD-ROM"
/* #define DEVICE_INTR do_mcd */
#define DEVICE_REQUEST do_mcd_request
......@@ -189,12 +190,12 @@ static void floppy_off(unsigned int nr);
#define DEVICE_OFF(device)
#else
/* unknown blk device */
#error "unknown blk device"
#endif
#if (MAJOR_NR != 9)
#if (MAJOR_NR != SCSI_TAPE_MAJOR)
#ifndef CURRENT
#define CURRENT (blk_dev[MAJOR_NR].current_request)
......@@ -227,8 +228,10 @@ else \
#endif
static void (DEVICE_REQUEST)(void);
/* SCSI devices have their own version */
#if (MAJOR_NR != 8 && MAJOR_NR != 9 && MAJOR_NR != 11)
/* end_request() - SCSI devices have their own version */
#if ! SCSI_MAJOR(MAJOR_NR)
static void end_request(int uptodate)
{
struct request * req;
......@@ -239,7 +242,8 @@ static void end_request(int uptodate)
req->errors = 0;
if (!uptodate) {
printk(DEVICE_NAME " I/O error\n");
printk("dev %04x, sector %d\n",req->dev,req->sector);
printk("dev %04lX, sector %lu\n",
(unsigned long)req->dev, req->sector);
req->nr_sectors--;
req->nr_sectors &= ~SECTOR_MASK;
req->sector += (BLOCK_SIZE / 512);
......
......@@ -68,6 +68,7 @@
#include <linux/kernel.h>
#include <linux/hdreg.h>
#include <linux/genhd.h>
#include <linux/ioport.h>
#include <asm/system.h>
#include <asm/io.h>
......@@ -76,7 +77,7 @@
#include <linux/cdrom.h>
#include <linux/cdu31a.h>
#define MAJOR_NR 15
#define MAJOR_NR CDU31A_CDROM_MAJOR
#include "blk.h"
......@@ -616,6 +617,9 @@ get_data(unsigned char *data,
&& (num_retries < MAX_CDU31A_RETRIES))
{
num_retries++;
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + 10; /* Wait .1 seconds on retries */
schedule();
goto retry_data_operation;
}
......@@ -693,6 +697,9 @@ do_sony_cd_cmd(unsigned char cmd,
&& (num_retries < MAX_CDU31A_RETRIES))
{
num_retries++;
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + 10; /* Wait .1 seconds on retries */
schedule();
goto retry_cd_operation;
}
......@@ -1129,8 +1136,8 @@ sony_get_subchnl_info(long arg)
static int
scd_ioctl(struct inode *inode,
struct file *file,
unsigned int cmd,
unsigned int arg)
unsigned int cmd,
unsigned long arg)
{
unsigned int dev;
unsigned char res_reg[2];
......@@ -1449,10 +1456,14 @@ scd_open(struct inode *inode,
{
unsigned char res_reg[2];
unsigned int res_size;
int num_spin_ups;
if (!sony_spun_up)
{
num_spin_ups = 0;
respinup_on_open:
do_sony_cd_cmd(SONY_SPIN_UP_CMD, NULL, 0, res_reg, &res_size);
/* The drive sometimes returns error 0. I don't know why, but ignore
......@@ -1475,6 +1486,15 @@ scd_open(struct inode *inode,
goto drive_spinning;
}
/* If the drive says it is not spun up (even though we just did it!)
then retry the operation at least a few times. */
if ( (res_reg[1] == SONY_NOT_SPIN_ERR)
&& (num_spin_ups < MAX_CDU31A_RETRIES))
{
num_spin_ups++;
goto respinup_on_open;
}
printk("Sony CDROM error 0x%2.2x (scd_open, read toc)\n", res_reg[1]);
do_sony_cd_cmd(SONY_SPIN_DOWN_CMD, NULL, 0, res_reg, &res_size);
......@@ -1539,7 +1559,8 @@ static struct file_operations scd_fops = {
scd_ioctl, /* ioctl */
NULL, /* mmap */
scd_open, /* open */
scd_release /* release */
scd_release, /* release */
NULL /* fsync */
};
......@@ -1641,12 +1662,17 @@ cdu31a_init(unsigned long mem_start, unsigned long mem_end)
while ( (cdu31a_addresses[i] != 0)
&& (!drive_found))
{
if (check_region(cdu31a_addresses[i], 4)) {
i++;
continue;
}
get_drive_configuration(cdu31a_addresses[i],
drive_config.exec_status,
&res_size);
if ((res_size > 2) && ((drive_config.exec_status[0] & 0x20) == 0x00))
{
drive_found = 1;
snarf_region(cdu31a_addresses[i], 4);
if (register_blkdev(MAJOR_NR,"cdu31a",&scd_fops))
{
......
......@@ -81,7 +81,7 @@
#include <asm/io.h>
#include <asm/segment.h>
#define MAJOR_NR 2
#define MAJOR_NR FLOPPY_MAJOR
#include "blk.h"
static unsigned int changed_floppies = 0, fake_change = 0;
......@@ -393,17 +393,19 @@ int floppy_change(struct buffer_head * bh)
{
unsigned int mask = 1 << (bh->b_dev & 0x03);
if (MAJOR(bh->b_dev) != 2) {
if (MAJOR(bh->b_dev) != MAJOR_NR) {
printk("floppy_changed: not a floppy\n");
return 0;
}
if (fake_change & mask) {
buffer_track = -1;
fake_change &= ~mask;
/* omitting the next line breaks formatting in a horrible way ... */
changed_floppies &= ~mask;
return 1;
}
if (changed_floppies & mask) {
buffer_track = -1;
changed_floppies &= ~mask;
recalibrate = 1;
return 1;
......@@ -453,7 +455,7 @@ static void setup_DMA(void)
if (read_track) {
/* mark buffer-track bad, in case all this fails.. */
buffer_drive = buffer_track = -1;
count = floppy->sect*2*512;
count = floppy->sect*floppy->head*512;
addr = (long) floppy_track_buffer;
} else if (addr >= LAST_DMA_ADDR) {
addr = (long) tmp_floppy_area;
......@@ -1166,6 +1168,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
sti();
okay = format_status == FORMAT_OKAY;
format_status = FORMAT_NONE;
floppy_off(drive & 3);
wake_up(&format_done);
return okay ? 0 : -EIO;
case FDFLUSH:
......
......@@ -17,8 +17,6 @@
*/
#define HD_IRQ 14
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
......@@ -34,9 +32,11 @@
#include <asm/io.h>
#include <asm/segment.h>
#define MAJOR_NR 3
#define MAJOR_NR HD_MAJOR
#include "blk.h"
#define HD_IRQ 14
static int revalidate_hddisk(int, int);
static inline unsigned char CMOS_READ(unsigned char addr)
......@@ -121,6 +121,7 @@ void hd_setup(char *str, int *ints)
hd_info[hdind].wpcom = 0;
hd_info[hdind].lzone = ints[1];
hd_info[hdind].ctl = (ints[2] > 8 ? 8 : 0);
NR_HD = hdind+1;
}
static int win_result(void)
......@@ -642,20 +643,20 @@ static struct sigaction hd_sigaction = {
static void hd_geninit(void)
{
int drive, i;
#ifndef HD_TYPE
extern struct drive_info drive_info;
void *BIOS = (void *) &drive_info;
unsigned char *BIOS = (unsigned char *) &drive_info;
int cmos_disks;
for (drive=0 ; drive<2 ; drive++) {
hd_info[drive].cyl = *(unsigned short *) BIOS;
hd_info[drive].head = *(unsigned char *) (2+BIOS);
hd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
hd_info[drive].ctl = *(unsigned char *) (8+BIOS);
hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
hd_info[drive].sect = *(unsigned char *) (14+BIOS);
BIOS += 16;
}
if (!NR_HD) {
for (drive=0 ; drive<2 ; drive++) {
hd_info[drive].cyl = *(unsigned short *) BIOS;
hd_info[drive].head = *(2+BIOS);
hd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
hd_info[drive].ctl = *(8+BIOS);
hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
hd_info[drive].sect = *(14+BIOS);
BIOS += 16;
}
/*
We querry CMOS about hard disks : it could be that
......@@ -679,14 +680,12 @@ static void hd_geninit(void)
*/
if ((cmos_disks = CMOS_READ(0x12)) & 0xf0)
if (cmos_disks & 0x0f)
NR_HD = 2;
else
NR_HD = 1;
else
NR_HD = 0;
#endif
if ((cmos_disks = CMOS_READ(0x12)) & 0xf0)
if (cmos_disks & 0x0f)
NR_HD = 2;
else
NR_HD = 1;
}
i = NR_HD;
while (i-- > 0) {
hd[i<<6].nr_sects = 0;
......
This diff is collapsed.
......@@ -44,8 +44,9 @@
#include <asm/io.h>
#include <asm/segment.h>
#define MAJOR_NR 23
#define MAJOR_NR MITSUMI_CDROM_MAJOR
#include "blk.h"
#include <linux/mcd.h>
#if 0
......
......@@ -17,13 +17,11 @@
#include <asm/system.h>
#include <asm/segment.h>
#define MAJOR_RAMDISK 1 /* should be in <linux/major.h> */
#define MAJOR_FLOPPY 2 /* should be in <linux/major.h> */
#define MINOR_RAMDISK 1
#define MAJOR_NR MAJOR_RAMDISK /* weird hack- FvK */
#define MAJOR_NR MEM_MAJOR
#include "blk.h"
#define RAMDISK_MINOR 1
char *rd_start;
int rd_length = 0;
......@@ -39,7 +37,7 @@ static void do_rd_request(void)
addr = rd_start + (CURRENT->sector << 9);
len = CURRENT->current_nr_sectors << 9;
if ((MINOR(CURRENT->dev) != MINOR_RAMDISK) ||
if ((MINOR(CURRENT->dev) != RAMDISK_MINOR) ||
(addr+len > rd_start+rd_length)) {
end_request(0);
goto repeat;
......@@ -79,11 +77,11 @@ long rd_init(long mem_start, int length)
int i;
char *cp;
if (register_blkdev(MAJOR_RAMDISK,"rd",&rd_fops)) {
printk("RAMDISK: Unable to get major %d.\n", MAJOR_RAMDISK);
if (register_blkdev(MEM_MAJOR,"rd",&rd_fops)) {
printk("RAMDISK: Unable to get major %d.\n", MEM_MAJOR);
return 0;
}
blk_dev[MAJOR_RAMDISK].request_fn = DEVICE_REQUEST;
blk_dev[MEM_MAJOR].request_fn = DEVICE_REQUEST;
rd_start = (char *) mem_start;
rd_length = length;
cp = rd_start;
......@@ -116,7 +114,7 @@ void rd_load(void)
rd_length, (int) rd_start);
/* If we are doing a diskette boot, we might have to pre-load it. */
if (MAJOR(ROOT_DEV) != MAJOR_FLOPPY) return;
if (MAJOR(ROOT_DEV) != FLOPPY_MAJOR) return;
/*
* Check for a super block on the diskette.
......@@ -174,7 +172,7 @@ void rd_load(void)
printk("\ndone\n");
/* We loaded the file system image. Prepare for mounting it. */
ROOT_DEV = ((MAJOR_RAMDISK << 8) | MINOR_RAMDISK);
ROOT_DEV = ((MEM_MAJOR << 8) | RAMDISK_MINOR);
return;
}
}
......@@ -23,7 +23,7 @@
#include <asm/segment.h>
#include <asm/dma.h>
#define MAJOR_NR 13
#define MAJOR_NR XT_DISK_MAJOR
#include "blk.h"
XD_INFO xd_info[XD_MAXDRIVES];
......
......@@ -72,14 +72,7 @@ all: char.a
char.a: $(OBJS)
$(AR) rcs char.a $(OBJS)
sync
defkeymap.c: defkeymap.map
./loadkeys defkeymap.map
./mktable > defkeymap.c
clean:
rm -f core *.o *.a *.s
sync
dep:
$(CPP) -M $(SRCS) > .depend
......
......@@ -2,6 +2,10 @@
* Logitech Bus Mouse Driver for Linux
* by James Banks
*
* Mods by Matthew Dillon
* calls verify_area()
* tracks better when X is busy or paging
*
* Heavily modified by David Giller
* changed from queue- to counter- driven
* hacked out a (probably incorrect) mouse_select
......@@ -59,83 +63,143 @@ static void mouse_interrupt(int unused)
if (dx != 0 || dy != 0 || buttons != mouse.buttons) {
mouse.buttons = buttons;
mouse.dx += dx;
mouse.dy += dy;
mouse.dy -= dy;
mouse.ready = 1;
wake_up_interruptible(&mouse.wait);
/*
* keep dx/dy reasonable, but still able to track when X (or
* whatever) must page or is busy (i.e. long waits between
* reads)
*/
if (mouse.dx < -2048)
mouse.dx = -2048;
if (mouse.dx > 2048)
mouse.dx = 2048;
if (mouse.dy < -2048)
mouse.dy = -2048;
if (mouse.dy > 2048)
mouse.dy = 2048;
}
MSE_INT_ON();
}
static void release_mouse(struct inode * inode, struct file * file)
/*
* close access to the mouse (can deal with multiple
* opens if allowed in the future)
*/
static void close_mouse(struct inode * inode, struct file * file)
{
MSE_INT_OFF();
mouse.active = 0;
mouse.ready = 0;
free_irq(mouse_irq);
if (--mouse.active == 0) {
MSE_INT_OFF();
free_irq(mouse_irq);
}
}
/*
* open access to the mouse, currently only one open is
* allowed.
*/
static int open_mouse(struct inode * inode, struct file * file)
{
if (!mouse.present)
return -EINVAL;
if (mouse.active)
return -EBUSY;
mouse.active = 1;
mouse.ready = 0;
mouse.dx = 0;
mouse.dy = 0;
mouse.buttons = 0x87;
if (request_irq(mouse_irq, mouse_interrupt)) {
mouse.active = 0;
if (request_irq(mouse_irq, mouse_interrupt))
return -EBUSY;
}
mouse.active = 1;
MSE_INT_ON();
return 0;
}
/*
* writes are disallowed
*/
static int write_mouse(struct inode * inode, struct file * file, char * buffer, int count)
{
return -EINVAL;
}
/*
* read mouse data. Currently never blocks.
*/
static int read_mouse(struct inode * inode, struct file * file, char * buffer, int count)
{
int i;
int r;
int dx;
int dy;
unsigned char buttons;
if (count < 3)
return -EINVAL;
if ((r = verify_area(VERIFY_WRITE, buffer, count)))
return r;
if (!mouse.ready)
return -EAGAIN;
/*
* Obtain the current mouse parameters and limit as appropriate for
* the return data format. Interrupts are only disabled while
* obtaining the parameters, NOT during the puts_fs_byte() calls,
* so paging in put_fs_byte() does not effect mouse tracking.
*/
MSE_INT_OFF();
put_fs_byte(mouse.buttons | 0x80, buffer);
if (mouse.dx < -127)
mouse.dx = -127;
if (mouse.dx > 127)
mouse.dx = 127;
put_fs_byte((char)mouse.dx, buffer + 1);
if (mouse.dy < -127)
mouse.dy = -127;
if (mouse.dy > 127)
mouse.dy = 127;
put_fs_byte((char) -mouse.dy, buffer + 2);
for (i = 3; i < count; i++)
put_fs_byte(0x00, buffer + i);
mouse.dx = 0;
mouse.dy = 0;
dx = mouse.dx;
dy = mouse.dy;
if (dx < -127)
dx = -127;
if (dx > 127)
dx = 127;
if (dy < -127)
dy = -127;
if (dy > 127)
dy = 127;
buttons = mouse.buttons;
mouse.dx -= dx;
mouse.dy -= dy;
mouse.ready = 0;
MSE_INT_ON();
return i;
put_fs_byte(buttons | 0x80, buffer);
put_fs_byte((char)dx, buffer + 1);
put_fs_byte((char)dy, buffer + 2);
for (r = 3; r < count; r++)
put_fs_byte(0x00, buffer + r);
return r;
}
/*
* select for mouse input, must disable the mouse interrupt while checking
* mouse.ready/select_wait() to avoid race condition (though in reality
* such a condition is not fatal to the proper operation of the mouse since
* multiple interrupts generally occur).
*/
static int mouse_select(struct inode *inode, struct file *file, int sel_type, select_table * wait)
{
if (sel_type != SEL_IN)
return 0;
if (mouse.ready)
return 1;
select_wait(&mouse.wait, wait);
return 0;
int r = 0;
if (sel_type == SEL_IN) {
MSE_INT_OFF();
if (mouse.ready) {
r = 1;
} else {
select_wait(&mouse.wait, wait);
}
MSE_INT_ON();
}
return(r);
}
struct file_operations bus_mouse_fops = {
......@@ -147,7 +211,7 @@ struct file_operations bus_mouse_fops = {
NULL, /* mouse_ioctl */
NULL, /* mouse_mmap */
open_mouse,
release_mouse,
close_mouse,
};
unsigned long bus_mouse_init(unsigned long kmem_start)
......
......@@ -62,7 +62,7 @@ int paste_selection(struct tty_struct *tty);
static void clear_selection(void);
/* Variables for selection control. */
#define SEL_BUFFER_SIZE 2048
#define SEL_BUFFER_SIZE TTY_BUF_SIZE
static int sel_cons;
static int sel_start = -1;
static int sel_end;
......@@ -73,7 +73,6 @@ static char sel_buffer[SEL_BUFFER_SIZE] = { '\0' };
extern void vt_init(void);
extern void register_console(void (*proc)(const char *));
extern void compute_shiftstate(void);
unsigned long video_num_columns; /* Number of text columns */
unsigned long video_num_lines; /* Number of test lines */
......@@ -225,9 +224,9 @@ static unsigned char * translations[] = {
"\040\255\233\234\376\235\174\025\376\376\246\256\252\055\376\376"
"\370\361\375\376\376\346\024\371\376\376\247\257\254\253\376\250"
"\376\376\376\376\216\217\222\200\376\220\376\376\376\376\376\376"
"\376\245\376\376\376\376\231\376\350\376\376\376\232\376\376\341"
"\376\245\376\376\376\376\231\376\235\376\376\376\232\376\376\341"
"\205\240\203\376\204\206\221\207\212\202\210\211\215\241\214\213"
"\376\244\225\242\223\376\224\366\355\227\243\226\201\376\376\230",
"\376\244\225\242\223\376\224\366\233\227\243\226\201\376\376\230",
/* vt100 graphics */
(unsigned char *)
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
......@@ -244,9 +243,9 @@ static unsigned char * translations[] = {
"\376\245\376\376\376\376\231\376\376\376\376\376\232\376\376\341"
"\205\240\203\376\204\206\221\207\212\202\210\211\215\241\214\213"
"\376\244\225\242\223\376\224\366\376\227\243\226\201\376\376\230",
/* IBM graphics: minimal translations (CR, LF, LL, SO, SI and ESC) */
/* IBM graphics: minimal translations (BS, CR, LF, LL, SO, SI and ESC) */
(unsigned char *)
"\000\001\002\003\004\005\006\007\010\011\000\013\000\000\000\000"
"\000\001\002\003\004\005\006\007\000\011\000\013\000\000\000\000"
"\020\021\022\023\024\025\026\027\030\031\032\000\034\035\036\037"
"\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057"
"\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077"
......@@ -311,16 +310,17 @@ static unsigned short __origin;
static inline void __set_origin(unsigned short offset)
{
unsigned long flags;
#ifdef CONFIG_SELECTION
clear_selection();
#endif /* CONFIG_SELECTION */
cli();
save_flags(flags); cli();
__origin = offset;
outb_p(12, video_port_reg);
outb_p(offset >> 8, video_port_val);
outb_p(13, video_port_reg);
outb_p(offset, video_port_val);
sti();
restore_flags(flags);
}
void scrollback(int lines)
......@@ -365,11 +365,13 @@ static inline void hide_cursor(int currcons)
static inline void set_cursor(int currcons)
{
unsigned long flags;
if (currcons != fg_console || console_blanked || vcmode == KD_GRAPHICS)
return;
if (__real_origin != __origin)
set_origin(__real_origin);
cli();
save_flags(flags); cli();
if (deccm) {
outb_p(14, video_port_reg);
outb_p(0xff&((pos-video_mem_base)>>9), video_port_val);
......@@ -377,7 +379,7 @@ static inline void set_cursor(int currcons)
outb_p(0xff&((pos-video_mem_base)>>1), video_port_val);
} else
hide_cursor(currcons);
sti();
restore_flags(flags);
}
static void scrup(int currcons, unsigned int t, unsigned int b)
......@@ -597,7 +599,8 @@ static void update_attr(int currcons)
video_erase_char = (color << 8) | ' ';
}
static void default_attr(int currcons) {
static void default_attr(int currcons)
{
intensity = 1;
underline = 0;
reverse = 0;
......@@ -1436,7 +1439,7 @@ long con_init(long kmem_start)
gotoxy(currcons,orig_x,orig_y);
update_screen(fg_console);
printable = 1;
printk("Console: %s %s %dx%d, %d virtual consoles\n",
printk("Console: %s %s %ldx%ld, %d virtual consoles\n",
can_do_color?"colour":"mono",
display_desc,
video_num_columns,video_num_lines,
......@@ -1512,7 +1515,6 @@ void update_screen(int new_console)
set_origin(fg_console);
set_cursor(new_console);
set_leds();
compute_shiftstate();
lock = 0;
}
......@@ -1553,7 +1555,7 @@ int con_open(struct tty_struct *tty, struct file * filp)
#ifdef CONFIG_SELECTION
/* correction factor for when screen is hardware-scrolled */
#define hwscroll_offset ((__real_origin - __origin) << 1)
#define hwscroll_offset (currcons == fg_console ? ((__real_origin - __origin) << 1) : 0)
/* set reverse video on characters s-e of console with selection. */
static void highlight(const int currcons, const int s, const int e)
......
This diff is collapsed.
......@@ -5,7 +5,6 @@ keycode 2 = one exclam
alt keycode 2 = Meta_one
keycode 3 = two at at
control keycode 3 = nul
shift control keycode 3 = nul
alt keycode 3 = Meta_two
keycode 4 = three numbersign
control keycode 4 = Escape
......@@ -31,7 +30,6 @@ keycode 11 = zero parenright braceright
alt keycode 11 = Meta_zero
keycode 12 = minus underscore backslash
control keycode 12 = Control_underscore
shift control keycode 12 = Control_underscore
alt keycode 12 = Meta_minus
keycode 13 = equal plus
alt keycode 13 = Meta_equal
......@@ -56,7 +54,7 @@ keycode 27 = bracketright braceright asciitilde
control keycode 27 = Control_bracketright
alt keycode 27 = Meta_bracketright
keycode 28 = Return
alt keycode 28 = Meta_Control_m
alt keycode 28 = 0x080d
keycode 29 = Control
keycode 30 = a
keycode 31 = s
......@@ -89,7 +87,6 @@ keycode 50 = m
keycode 51 = comma less
alt keycode 51 = Meta_comma
keycode 52 = period greater
control keycode 52 = Dead_Key_Next
alt keycode 52 = Meta_period
keycode 53 = slash question
control keycode 53 = Delete
......@@ -199,13 +196,13 @@ keycode 110 = Insert
keycode 111 = Remove
altgr control keycode 111 = Boot
control alt keycode 111 = Boot
keycode 112 = Macro
keycode 113 = F13
keycode 114 = F14
keycode 115 = Help
keycode 116 = Do
keycode 117 = F17
keycode 118 = KP_MinPlus
keycode 112 =
keycode 113 =
keycode 114 =
keycode 115 =
keycode 116 =
keycode 117 =
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
......@@ -247,6 +244,3 @@ string F23 = ""
string F24 = ""
string F25 = ""
string F26 = ""
string Macro = "\033[M"
string Help = ""
string Do = ""
This diff is collapsed.
......@@ -8,6 +8,7 @@
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/sched.h>
#include <linux/lp.h>
#include <linux/malloc.h>
......@@ -432,8 +433,8 @@ long lp_init(long kmem_start)
unsigned int testvalue = 0;
int count = 0;
if (register_chrdev(6,"lp",&lp_fops)) {
printk("unable to get major 6 for line printer\n");
if (register_chrdev(LP_MAJOR,"lp",&lp_fops)) {
printk("unable to get major %d for line printer\n", LP_MAJOR);
return kmem_start;
}
/* take on all known port values */
......
......@@ -9,6 +9,7 @@
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/tty.h>
#include <linux/mouse.h>
#include <linux/tpqic02.h>
......@@ -110,6 +111,20 @@ static int mmap_mem(struct inode * inode, struct file * file,
return 0;
}
static int read_kmem(struct inode *inode, struct file *file, char *buf, int count)
{
int read1, read2;
read1 = read_mem(inode, file, buf, count);
if (read1 < 0)
return read1;
read2 = vread(buf + read1, (char *) file->f_pos, count - read1);
if (read2 < 0)
return read2;
file->f_pos += read2;
return read1 + read2;
}
static int read_port(struct inode * inode,struct file * file,char * buf, int count)
{
unsigned int i = file->f_pos;
......@@ -224,7 +239,6 @@ static int memory_lseek(struct inode * inode, struct file * file, off_t offset,
return file->f_pos;
}
#define read_kmem read_mem
#define write_kmem write_mem
#define mmap_kmem mmap_mem
#define zero_lseek null_lseek
......@@ -351,13 +365,13 @@ static struct file_operations memory_fops = {
long chr_dev_init(long mem_start, long mem_end)
{
if (register_chrdev(1,"mem",&memory_fops))
printk("unable to get major 1 for memory devs\n");
if (register_chrdev(MEM_MAJOR,"mem",&memory_fops))
printk("unable to get major %d for memory devs\n", MEM_MAJOR);
mem_start = tty_init(mem_start);
#ifdef CONFIG_PRINTER
mem_start = lp_init(mem_start);
#endif
#if defined (CONFIG_BUSMOUSE) || defined (CONFIG_QUICKPORT_MOUSE) || \
#if defined (CONFIG_BUSMOUSE) || defined (CONFIG_82C710_MOUSE) || \
defined (CONFIG_PSMOUSE) || defined (CONFIG_MS_BUSMOUSE) || \
defined (CONFIG_ATIXL_BUSMOUSE)
mem_start = mouse_init(mem_start);
......
......@@ -19,6 +19,7 @@
#include <linux/mouse.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/major.h>
/*
* note that you can remove any or all of the drivers by undefining
......@@ -91,7 +92,8 @@ unsigned long mouse_init(unsigned long kmem_start)
#ifdef CONFIG_ATIXL_BUSMOUSE
kmem_start = atixl_busmouse_init(kmem_start);
#endif
if (register_chrdev(10,"mouse",&mouse_fops))
printk("unable to get major 10 for mouse devices\n");
if (register_chrdev(MOUSE_MAJOR,"mouse",&mouse_fops))
printk("unable to get major %d for mouse devices\n",
MOUSE_MAJOR);
return kmem_start;
}
......@@ -62,7 +62,7 @@ static void ms_mouse_interrupt(int unused)
outb(MS_MSE_COMMAND_MODE, MS_MSE_CONTROL_PORT);
outb((inb(MS_MSE_DATA_PORT) & 0xdf), MS_MSE_DATA_PORT);
if (dx != 0 || dy != 0 || buttons != mouse.buttons) {
if (dx != 0 || dy != 0 || buttons != mouse.buttons || ((~buttons) & 0x07)) {
mouse.buttons = buttons;
mouse.dx += dx;
mouse.dy += dy;
......
This diff is collapsed.
......@@ -74,7 +74,7 @@ static inline void pty_copy(struct tty_struct * from, struct tty_struct * to)
/*
* This routine gets called when tty_write has put something into
* the write_queue. It copies the input to the output-queue of it's
* the write_queue. It copies the input to the output-queue of its
* slave.
*/
static void pty_write(struct tty_struct * tty)
......
......@@ -41,7 +41,7 @@
* Enables automatic IRQ detection. I've put in some
* fixes to this which should make this work much more
* cleanly than it used to in 0.98pl2-6. It should be
* much less vulnerable to false IRQ's now.
* much less vulnerable to false IRQs now.
*
* CONFIG_AST_FOURPORT
* Enables support for the AST Fourport serial port.
......
This diff is collapsed.
This diff is collapsed.
......@@ -14,6 +14,7 @@
#include <linux/sched.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/tty.h>
#include <linux/fcntl.h>
......@@ -419,8 +420,8 @@ int tty_ioctl(struct inode * inode, struct file * file,
int termios_dev;
int retval;
if (MAJOR(file->f_rdev) != 4) {
printk("tty_ioctl: tty pseudo-major != 4\n");
if (MAJOR(file->f_rdev) != TTY_MAJOR) {
printk("tty_ioctl: tty pseudo-major != TTY_MAJOR\n");
return -EINVAL;
}
dev = MINOR(file->f_rdev);
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
#include <linux/vt.h>
extern struct vt_cons {
extern struct vt_struct {
unsigned char vc_mode; /* KD_TEXT, ... */
unsigned char vc_kbdraw;
unsigned char vc_kbde0;
......
/* el2.c: A shared-memory NS8390 ethernet driver for linux. */
/* 3c503.c: A shared-memory NS8390 ethernet driver for linux. */
/*
Written 1992,1993 by Donald Becker.
......@@ -16,7 +16,7 @@
*/
static char *version =
"el2.c:v0.99.13 8/30/93 Donald Becker (becker@super.org)\n";
"3c503.c:v0.99.13 8/30/93 Donald Becker (becker@super.org)\n";
#include <linux/config.h>
#include <linux/kernel.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment