Commit Graph

2909 Commits

Author SHA1 Message Date
Bruce Evans
7897b3ce69 Don't waste time sending an EOI to ICU1 if option AUTO_EOI_1 is defined.
Previously, this worked right if both AUTO_EOI_1 and AUTO_EOI_2 are
defined, but not if AUTO_EOI_1 is defined and AUTO_EOI_2 is not defined.
The latter case should be the default.  DUMMY_NOPS should be the default
too.  Currently there are only two NOPs slowing down rtcin() (although
there are no delays in writertc()) and several FASTER_NOPs slowing down
interrupt handling in vector.s.

Fix stack offsets for the (previously) unused untested
FAST_INTR_HANDLER_USES_ES case.
1995-04-15 21:32:18 +00:00
Bruce Evans
e2f03b0df0 Speed up ttnread() in the !(ICANON | ISIG) case by copying to user space
through a temporary buffer instead of one character at a time.  The old
method takes about 6 usec/char on a 486DX2/66.  This is larger than than
the combined interrupt and PIO overhead for a 16550!

This change was first implemented in 1.1.5.  It was rewritten for 2.1.
The clist access functions allow a simpler implementation at some cost
in correctness and speed.  There needs to be an ungetc() function to
recover from EFAULT, and it wastes time to copy through a temporary
buffer.

Don't snoop on single characters that weren't read due to EFAULT.
Rewrite a snoop comment in my approximation to English.

Undo bogus exportation of ttnread().
1995-04-15 21:04:58 +00:00
Bruce Evans
f6c6c6428b Define IBUFSIZ as 384. This goes with speeding up ttnread().
OBUFSIZ should be increased to the same value as IBUFSIZE (both are
smaller than desirable because they have to fit on the stack), but
there are currently problems with magic buffer limits and watermarks.

Remove unused #define of TTMASK.

Undo bogus exportation of ttnread().
1995-04-15 20:59:28 +00:00
Andreas Schulz
5d2cacaa26 Put vnode_if.h and vnode_if.c into CLEANFILES that are automatically
generated. Should this lkm set VFS_LKM ?
1995-04-15 17:36:53 +00:00
Poul-Henning Kamp
6d7b3d3838 Added kzipboot 1995-04-15 08:24:33 +00:00
Poul-Henning Kamp
7970b29866 The magic code to uncompress a kernel.
Reviewed by:	phk
Obtained from:	Linux via 386BSD.
1995-04-15 08:23:55 +00:00
Poul-Henning Kamp
194c19ed17 Changes needed for kzip to work. 1995-04-15 06:54:13 +00:00
Jordan K. Hubbard
61eaec4e49 Make DISTNAME and RELEASE the same for now. It makes more sense. 1995-04-15 06:00:11 +00:00
Jordan K. Hubbard
08ed1b1db6 Go to a coherent release number for uname(1). 1995-04-15 03:56:06 +00:00
David Greenman
d7e03b7a8b For P_SUGID processes, we must also change ownership of the mem file
to root so that group kmem can still get to it. *SIGH*
1995-04-15 03:20:31 +00:00
David Greenman
5232af2cf1 Retain group kmem readability for P_SUGID processes. 1995-04-15 02:50:13 +00:00
David Greenman
f62e09f22e Made /proc/n/mem file group kmem and group readable. Needed to fix ps so
that it doesn't need to be setuid root.
1995-04-15 02:30:17 +00:00
David Greenman
cf8ad5100d Fixed serious off by one bug I introduced that will likely cause the
machine to panic whenever the name cache fills up.

Submitted by:	John Dyson
1995-04-15 00:49:35 +00:00
Poul-Henning Kamp
0fbb4a064b "jl" and "jb" doesn't quite do the same thing...
Reviewed by:	phk
Submitted by:	"DI. Christian Gusenbauer" <cg@scotty.edvz.uni-linz.ac.at>
1995-04-14 23:01:33 +00:00
Poul-Henning Kamp
c112d76dd6 I commit this for Bruce, who has serious connectivity problmes pt.
This should NOT go into 2.0.5  /phk

Support disk slices.  This involves mainly replacing inline code with
function calls.  Support for ST506 drives is temporarily broken since
the `setgeom' arg to dsopen() is not implemented completely enough to
use.  The `setgeom' arg will go away and ST506 drives will be supported
in another way.  A large amount of dead code is left in wdopen() as a
reminder of the problems here.

Close the device in wdsize().  Open tracking was broken on all drives
with a swap device.

Remove support for soft write protection.  There are no ioctls to set
it.  It was used to disable writing to unlabelled disks, but we want
to support writing to foreign partitions on unlabeled disks.

Use generic dkbad routines to do about 2/3 of the work for supporting
bad144.

Improve disk statistics: estimate 4MB/sec instead of 8MB/sec for
the transfer rate (ISA max is 4MB/sec, old IDE max is 3.3MB/sec);
fix dk_xfer[] (it counted sectors, not transfers); keep the estimate
dk_seek[] = dk_xfer[] (was sectors, is now transfers); only count
words actually transferred (the count is still too high after a
failed write and after retries).  Remove wdxfer[].

Fix indentation in wdattach().  Fix resulting botched printing of the
disk size for ST506 drives.  Print the disk geometry less cryptically.
1995-04-14 22:31:58 +00:00
Joerg Wunsch
15c99149f8 Boot block cleanup.
o Fix the keyboard probe to properly wait for the ready bit before
sending a command to the keyboard controller.  This should avoid the
problems some people are experiencing where the boot blocks hang the
system during keyboard probe.  (It does solve it for me.)

o Fix a bug that effectively prevented the boot blocks from ever
passing control to the serial console.  [while(--retries) instead of
while(retries--)]

o Gratuitously reduced the keyboard probe timeout from 500 to 5
seconds. :)

o Introduced a new option ``FORCE_COMCONSOLE'' as a commented-out
example in the Makefile, to force the usage of a serial console
regardless of a keyboard being connected or not.

o Moved all external declarations to boot.h, declared all functions
there, and ANSIfied all function declarations/definitions.
(printf() remains bogus, however -- i'm too lazy to fix this.)
We're in the ninetees, dunno why we should still support compilers
from the 70's.
1995-04-14 21:26:53 +00:00
Peter Dufault
1fff580519 Add scsi target 1995-04-14 15:14:33 +00:00
Peter Dufault
bc0cfeb0ce Add scsi target support. 1995-04-14 15:13:46 +00:00
Peter Dufault
8db34c841e Add scsi target. Add "after config" call to autoconf so that scsi
targets will be configured after all scsi busses have been configured.
1995-04-14 15:13:26 +00:00
Peter Dufault
8909a72b5d Add "sctarg" and document new SCSI_REPORT_GEOMETRY option for ache 1995-04-14 15:12:24 +00:00
Peter Dufault
81e01d44ce Added "scsi target" device that can act as a target for scsi transfers
from an initiator
Added Julian's support for residuals.
Added Julian's fixes to the tape driver
Made compile cleanly with -Wall
Reduce boot up output
1995-04-14 15:10:44 +00:00
Bill Paul
09a901eb60 Hopefully I won't get flamed for this: insert a few more #if defined(I486_CPU)
and #if defined (I586_CPU) thingies into identifycpu() so that we only
compile in what's actually needed for a given CPU. So far as I can tell,
none of my 386 machines generate a cpu_vendor code, so I made the extra vendor
and feature line conditional on I486_CPU and I586_CPU. (Otherwise we
print out a blank line which looks silly.)
1995-04-14 02:06:00 +00:00
Bill Paul
8a03631b28 According to a Usenet posting forward to me by Jordan, there's
at least one user out there who's system won't autoboot from the
serial console because of what sounds like 'phantom keystrokes'
making the timeout timer trip. I've tried to solve this by
adding an extra call to init_serial() right before the 'Boot:'
prompt is printed (done only if RB_SERIAL is set) to hopefully
make sure that the input buffer is clear. Unfortunately, the fellow
is in Germany and I haven't heard back from him yet. I haven't
been able to duplicate this problem on my hardware, so this is
a stab in the dark. At the very least, it shouldn't hurt anything.
1995-04-14 01:35:59 +00:00
Garrett Wollman
98f232c875 Make class names easier to type 1995-04-13 20:37:51 +00:00
David Greenman
f153fb6e99 Backed out previous change - it reduces performance. (oops). 1995-04-13 18:24:33 +00:00
Garrett Wollman
ef46188e27 Actually copy the class field over from the kernel to the user structure. 1995-04-13 15:33:14 +00:00
David Greenman
cf0ec51aec Slight optimization to select(). 1995-04-13 15:27:51 +00:00
Garrett Wollman
ae60406da6 Forgot two things in yesterday's massive devconf update:
initialized class for sio
don't bogusly re-initialize it in sio_registerdev()
1995-04-13 15:03:29 +00:00
Andrey A. Chernov
3cf91c530d Move setcompat code to another place, initial/locked devices
not supposed to work with old style ioctls
1995-04-13 11:11:11 +00:00
Andrey A. Chernov
d17ad80fda Comment out ttcompat via COMPAT_SUNOS too
Fix error handling initial/callout devices
1995-04-13 09:22:40 +00:00
Bill Paul
695e4afe85 This a subtle reminder to people that not everybody compiles their
kernels with 'options I586_CPU.'

The declaration for pentium_mhz is hidden inside an #ifdef I586_CPU,
but machdep.c refers to it whether I586_CPU is defined or not. This
temporary hack puts the offending code inside an #ifdef I586_CPU as
well so that a kernel without it will successfully compile.

I must emphasize the word 'temporary:' somebody needs to seriously
beat on the identifycpu() function with an #ifdef stick so that
I386_CPU, I486_CPU and I586_CPU will do the right things.
1995-04-13 04:55:35 +00:00
David Greenman
9b798f72a1 Various changes from Matt Thomas to improve media selection and fix
support for the DC21140.
1995-04-13 04:46:40 +00:00
Jordan K. Hubbard
624b327c77 DISTNAME="2.0-950412-SNAP" 1995-04-12 23:29:14 +00:00
Poul-Henning Kamp
e5f2c8f67e Add "BREAK_TO_DEBUGGER" option. 1995-04-12 22:02:51 +00:00
Poul-Henning Kamp
04a6a5a9ac ttsetcompat is a '#ifdef COMPAT_43' feature.
Dropping into the debugger when a break comes down the serial line is a
>MISFEATURE (1st class)< and has been put under it's own #ifdef.  This
should be a magic sequence of chars instead.
1995-04-12 22:00:41 +00:00
Garrett Wollman
6c0081e92b Add a class field to devconf and mst drivers.
For those where it was easy, drivers were also fixed to call
dev_attach() during probe rather than attach (in keeping with the
new design articulated in a mail message five months ago).  For
a few that were really easy, correct state tracking was added as well.
The `fd' driver was fixed to correctly fill in the description.
The CPU identify code was fixed to attach a `cpu' device.  The code
was also massively reordered to fill in cpu_model with somethingremotely
resembling what identifycpu() prints out.  A few bytes saved by using
%b to format the features list rather than lots of ifs.
1995-04-12 20:48:13 +00:00
Martin Renters
fd7e139eed Break netboot into device specific versions.
nb8390.[cr]om for NS8390 boards (if_ed driver)
nb3c509.[cr]om for 3c509 boards (if_ep driver)

Submitted by:	Serge Babkin (babkin@hq.icb.chel.su)  [3c509 support]
1995-04-12 20:15:33 +00:00
Poul-Henning Kamp
d32bd61e78 Improve the if_eg driver a bit in style. It's still by far the worst driver
we have :-/
1995-04-12 07:50:44 +00:00
David Greenman
230620627b Fixed bug I introduced when changing PCB list to use 4.4BSD style queue
macros. Basically, detect 'tp' going away differently.
1995-04-12 06:49:56 +00:00
Andrey A. Chernov
0af4664a6c Read of a record smaller then request size always fails
Submitted by: edward@edcom.com
1995-04-11 19:09:31 +00:00
Andrey A. Chernov
d99adf96e5 Fix link sys call
Submitted by: pritc003@maroon.tc.umn.edu
1995-04-11 18:32:17 +00:00
Andrey A. Chernov
2178b9bb49 Call new ttsetcompat() function for proper working
old v7 ioctls with locking bits.
1995-04-11 17:58:09 +00:00
Andrey A. Chernov
0a247e7d30 Extract "set" family functions to separate module, needed for
locking in sio f.e.
1995-04-11 17:54:25 +00:00
Andrey A. Chernov
bc9685528a Add new ttsetcompat function (from tty_compat) 1995-04-11 17:53:14 +00:00
Bruce Evans
2360b9bfc7 Submitted by: Mike Pritchard <pritc003@maroon.tc.umn.edu>
Fix PR 303: msdosfs: moving a file into another directory causes panic.

" ... the code that does the rename already has the denode
locked when msdosfs_hashins() gets called, resulting in the panic
when the routine attempts to lock the denode again.
...
The attached patch changes the msdosfs_hashins() routine to not lock the
denode.  The caller is now resposible for obtaining the lock instead
of having msdosfs_hashins() do it for them."
1995-04-11 17:13:17 +00:00
Bruce Evans
82f196916e Submitted by: Wolfgang Solfrank <ws@tools.de>
Fix off-by-1-sector error in the range checking for the end of the root
directory.  It was possible for the root directory to overwrite the FAT.
1995-04-11 16:43:20 +00:00
David Greenman
81c6e3e558 Handle the "syncing VCHR vnode hang" problem a little differently; just
don't lock the vnode - it doesn't appear to ever be necessary for VCHR
vnode/inodes. This fixes a bug introduced in the previous commit that
caused tty timestamps to act strange (causing 'w' and 'finger' to show
the tty wasn't idle when it may have been for hours).
1995-04-11 04:23:47 +00:00
Jordan K. Hubbard
c8aaabd573 Performance enhancements and a redesign of the transmitter code.
Submitted by:	"Serge A. Babkin" <babkin@hq.icb.chel.su>
1995-04-10 21:25:06 +00:00
Garrett Wollman
d3a2b17ad7 Define tuncdev for the benefit of tunnel LKM so that it knows which
device slot to take.
1995-04-10 20:40:11 +00:00
Garrett Wollman
1f3d84e82a Tunnel driver is nmow capable of installing its own cdevsw[] entry,
with a little help from conf.c.  While e're at it, actually declare the
tunnel entry points to have the correct types.  This fixes PR #306.
1995-04-10 20:35:45 +00:00