Commit Graph

6520 Commits

Author SHA1 Message Date
John Dyson
09e0c6ccdd Implement a new totally dynamic (up to MAXPHYS) buffer kva allocation
scheme.  Additionally, add the capability for checking for unexpected
kernel page faults.  The maximum amount of kva space for buffers hasn't
been decreased from where it is, but it will now be possible to do so.

This scheme manages the kva space similar to the buffers themselves.  If
there isn't enough kva space because of usage or fragementation, buffers
will be reclaimed until a buffer allocation is successful.  This scheme
should be very resistant to fragmentation problems until/if the LFS code
is fixed and uses the bogus buffer locking scheme -- but a 'fixed' LFS
is not likely to use such a scheme.

Now there should be NO problem allocating buffers up to MAXPHYS.
1996-11-30 22:41:49 +00:00
Bruce Evans
c252c2507e Fixed input of BREAKs when IGNPAR is set and IGNBRK is not set. BREAKs
are always together with Framing Errors and they were incorrectly
treated as FE's and discarded.

Reorganized the BREAK/FE/PE tests.

Found by:	NIST-PCTS
1996-11-30 15:52:56 +00:00
Bruce Evans
eea9b0845f Reset h/w fifos (if any) in siostop(). Now ttyflush() works fairly well
with sio devices (not perfectly, since there is no way to flush the tx
holding register on 8250-16450's.  I'm not sure if resetting the fifos
flushes the tx shift register).

Reminded by:	NIST-PCTS
1996-11-30 15:29:31 +00:00
Bruce Evans
4670f800ec Fixed sloppy clearing of TS_BUSY. Don't clear it until the transmitter
is completely empty.  There is no interrupt for output completion, so
poll for it every 10 ms after output is nearly complete.  Now ttywait()
works right.

Reminded by:	NIST-PCTS
1996-11-30 15:19:19 +00:00
Bruce Evans
38e81cedcf Throw away input if CREAD is not set. POSIX requires no characters to be
received in this case even if the hardware doesn't have a CREAD bit.

Found by:	NIST-PCTS
1996-11-30 15:03:05 +00:00
Bruce Evans
9924e17950 Cleaned up CONSPEED changes. `comdefaultrate' gives the default
speed for the "com" console, not for general purpose "com" ports,
so there was no need to split it into comdefaultrate and condefaultrate.
1996-11-30 14:51:04 +00:00
Bruce Evans
4cea724a81 Reenabled i586-optimized copyin/out.
Should be in 2.2.  Don't put it there for a while.
1996-11-30 14:08:44 +00:00
Joerg Wunsch
bf65a4116b Add the Quantum DLT drives. All of them grok SC_MORE_LUS, so the tape
library devices will properly come up with all LUNs detected.

Submitted by:	dawes@Physics.usyd.edu.au (David Dawes)
1996-11-30 07:39:37 +00:00
David Greenman
add2e5d0f4 Check for error return from uiomove to prevent looping endlessly in
soreceive(). Closes PR#2114.

Submitted by:	wpaul
1996-11-29 19:03:42 +00:00
Bruce Evans
e6eeb36daf Fixed sigaction() for SIGKILL and SIGSTOP. Reading the old action now
succeeds.  Writing an action now succeeds iff the handler isn't changed.
(POSIX allows attempts to change the handler to be ignored or cause an
error.  Changing other parts of the action is allowed (except attempts
to mask unmaskable signals are silently ignored as usual).)

Found by:	NIST-PCTS
1996-11-29 18:01:55 +00:00
Bruce Evans
035c873e99 Made O_NOCTTY distinct from the other flags (it clashed with O_RDONLY).
Found by:	NIST-PCTS
1996-11-29 16:28:40 +00:00
John Dyson
6f235fb2f9 Relax the constraints on the bswap opcode (it works on non-byte
registers.)  Also clean up some namespace pollution, and remove
gcc-1 support (nothing really works with it anymore anyway.)
Submitted by:	Bruce Evans <bde@freebsd.org> and me.
1996-11-29 16:22:22 +00:00
Bruce Evans
63f3c673f6 Help broken d_stop() routines by flushing the output queue before
calling them (as well as after).

Found by:	NIST PCTS
1996-11-29 16:16:47 +00:00
Bruce Evans
8be1cbf1f4 Fixed bugs handling (background) orphaned process groups. tty
writes and tty ioctls by processes in such groups must return
-1/EIO, but they were allowed.  tty reads were handled correctly.

Found by:	NIST PCTS
1996-11-29 15:50:56 +00:00
Bruce Evans
7542ee31b8 Fixed some bugs in BREAK handling. If BRKINT is set, then always flush
the queues and generate a SIGINT.  Previously, this wasn't done if ISIG
was clear or the VINTR character was disabled, and it was done by
converting the BREAK to a VINTR character and sometimes bogusly echoing
this character.

Found by:	NIST-PCTS
1996-11-29 15:23:42 +00:00
Bruce Evans
c02039bc20 Fixed handling of non-POSIX control characters. They must not do
anything special unless IEXTEN is set.

Found by:	NIST-PCTS
1996-11-29 15:06:17 +00:00
Bruce Evans
3ac9e61617 Changed _POSIX_VERSION from 198808L to 199009L. We're close to conforming
to the 1990 version according to NIST-PCTS.  Many man pages still refer to
the 1988 version.
1996-11-29 14:48:17 +00:00
Bruce Evans
9dde46b7a0 Fixed EFAULT handling in i586_copyin() and i586_copyout(). Use a
consistent stack frame in fastmove() so that only one new fault handler
is necessary.

Should be in 2.2.  Harmless until the i586 versions are reenabled.
1996-11-29 14:32:30 +00:00
Bruce Evans
c827accd9a Don't print bootinfo.bi_n_bios_used in cpu_startup() since it is always
zero because no drivers have had a chance to change it.
1996-11-29 13:19:26 +00:00
Bruce Evans
388ddab632 Don't clobber the SIGCONT bit in the signal mask in sigreturn(). Use
the `sigcantmask' macro to get the correct set of unmaskable signals.

Found by: NIST-PCTS.
1996-11-29 13:12:14 +00:00
Jordan K. Hubbard
94172f9618 Correct name in probe type. Closes PR# 2122 (with a change, since the PR
did not actually use the correct name either :-).
Submitted-By: Toyonori Fujiura <toyo@exiv.pearnet.org>
1996-11-29 12:26:30 +00:00
John Dyson
64a6e05c28 Clarified the comment about removing other CPU defs. Specifically,
I added the suggestion to remove the I386_CPU def if possible.
1996-11-29 07:08:48 +00:00
John Dyson
f8b4081443 Support the appropriate use of bswap instruction on non-I386 builds.
Per Wayne Scott of Intel, the old sequence took 20cycles!!! on a P6.
Another nice side-benefit is that the kernel is about 3K smaller!!!
Submitted by:	Wayne Scott <wscott@ichips.intel.com>
1996-11-29 07:04:03 +00:00
John Dyson
e0c5a895f1 Make the kernel smaller with at worst a neutral effect on perf by
de-inlining some VM calls.  (Actually, I measured a small improvement.)
1996-11-28 23:15:07 +00:00
Poul-Henning Kamp
b61e2e6afe I broke psm.c and none of the 5 reviewers noticed :-) 1996-11-28 17:18:56 +00:00
Poul-Henning Kamp
ff301e1b9b Add a timeout here, just like in if_ed.c
Reviewed by:	phk
Submitted by:	Luigi Rizzo <luidi@labinfo.iet.unipi.it>
1996-11-28 09:54:38 +00:00
Poul-Henning Kamp
3faaf0b64a Rogue entry for DEC DLT2700
Reviewed by:	julian & phk
Submitted by:	Andre Albsmeier <Andre.Albsmeier@mchp.siemens.de>
1996-11-28 09:51:03 +00:00
John Dyson
71a5742716 Potentially fix a problem, whereby MSDOSFS can request buffers
larger than the vfs layer can provide.  We now automatically support
32K clusters if MSDOSFS is installed, and panic if a filesystem tries
to allocate a buffer larger than MAXBSIZE.

This commit is a result of some "prodding" by BDE.
1996-11-28 04:26:04 +00:00
John Dyson
0bf0ee81e6 Potentially fix a problem, whereby MSDOSFS can request buffers
larger than the vfs layer can provide.  We now automatically support
32K clusters if MSDOSFS is installed, and panic if a filesystem tries
to allocate a buffer larger than MAXBSIZE.

This commit is a result of some "prodding" by BDE.
1996-11-28 04:07:44 +00:00
Poul-Henning Kamp
be2806f309 Make intro command a NO-OP if no VISUAL_USERCONFIG 1996-11-27 22:53:10 +00:00
Poul-Henning Kamp
9009c7d68d Waste less space. 1996-11-27 22:52:25 +00:00
Andrey A. Chernov
f0b48537e8 Remove warning at AHC_SCBPAGING_ENABLE, not needed now 1996-11-27 22:52:09 +00:00
Andrey A. Chernov
ba7615a77e Replace LC_TIME= with LC_TIME=C 1996-11-26 06:55:35 +00:00
Poul-Henning Kamp
07c48e4bb0 Make a kernel with DDB but without sio possible again. This is only
a stopgap measure, a more complete solution is on somebodys whiteboard
(and we all know that THAT means :-).

Reviewed by:	pst
1996-11-25 18:39:25 +00:00
John Hay
a5225c3f47 Enlarge the transmit and receive bufferspace of ipx. Make it tweakable
with sysctl.
1996-11-24 08:25:48 +00:00
Peter Wemm
31461d3a75 Back out my previous change here. aic7xxx_asm is only a stdio program
that runs in the host's build environment, not the kernel's environment.
1996-11-24 08:15:11 +00:00
Peter Wemm
34429f3d2d Fix my previous (untested) commit. The probe routine now appears to work
again.

Something needs to be done about this in 2.2, since the code there doesn't
even compile anymore since the syscons/kbdio/psm merge into 2.2.
1996-11-24 08:06:01 +00:00
Bill Fenner
2f1a0ba831 Allocate a header mbuf for the start of the encapsulated packet.
The rest of the code was treating it as a header mbuf, but it was
allocated as a normal mbuf.

This fixes the panic: ip_output no HDR when you have a multicast
tunnel configured.
1996-11-23 19:07:02 +00:00
Peter Wemm
f2a58aec0a Make this compile again after the syscons/psm/kbdio changes that removed
the keyboard IO port definitions from <machine/console.h>.

Note: I do not have a machine available to test this yet,  I sent this
for review to several people who have not replied.

This is also totally busted in 2.2, which has half of the syscons/psm/kbdio
changes in it.  This really desperately needs to be tested and fixed
in 2.2 as well.
1996-11-23 07:38:25 +00:00
Justin T. Gibbs
ccddabb0c7 Add code to the SCSIINT handler for unexpected busfrees and handling immediate
SCBs in response to a busfree.

When re-queueing an SCB that returned with QUEUE FULL status, reset its timeout.

Ensure that aborted SCBs have an error code set in there xs before it gets
passed back up with scsi_done.

Fix a few KNF nits.
1996-11-22 08:28:45 +00:00
Justin T. Gibbs
70f6e5521c Conditionally enable the busfree interrupt to catch unexpected busfrees.
Immediate SCBs, since they always send messages that tell the target to
transition to bus free now rely on the busfree interrupt instead of the
IMMEDDONE sequencer interrupt that was generated before.

Rearrange some code in the message out loop to give ATN a little more time
to drop before we ACK the last byte.

Use SPIORDY instead of REQINIT when snooping for a tag message on a reconnect.
This is done for the same reasons we use SPIORDY in the inb functions.

When going into BITBUCKET mode, turn off HDMAEN in the DFCNTRL register so
that we can "not care" what the value of HCNT is.  If HCNT is 0, BITBUCKET
mode won't transfer any data if HDMAEN is set.  Seeing as we don't want the
transfer to even think about touching the host, this seems more sane anyway.
Thanks to "Dan Willis" <dan@plutotech.com> for pointing out that this was
a problem.
1996-11-22 08:25:23 +00:00
Peter Wemm
2fa4e5a7fc Set a more explicit #include path for building aix7xxx_asm, otherwise it
uses /usr/include/sys/*, which may point to a different build tree.  I'm
not sure that this is necessary, but there was a question mark over what
/usr/include/sys points to when building the "user mode" binaries in the
kernel code, especially when building the smp tree.

I suspect that the "right" line here is to use ${INCLUDES}, but that
causes warnings about unused static inline functions in stdio.h and ctype.h
1996-11-22 04:27:43 +00:00
Guido van Rooij
18503982d8 Fix ifconfig link flag handling
Submitted by:	"Jon Morgan" <morgan@terminus.trailblazer.com>
1996-11-21 21:04:50 +00:00
Julian Elischer
acdbeb6b1c changes to make devfs more 'normal'
also fixes a bug I've been chasing for a LONG TIME,
due to the fact that spec_bwrite is a NOP and I didn't realise it..

old symptom:
mount -t devfs devfs /mnt
mount /mnt/wd0e /mnt/mnt2
umount /mnt2 <process hangs>

there are some pretty large structural differences internal to devfs
but outwards it should look the same.
I have not yet tested extensively but will do so and fix 3 warnings tomorrow.
1996-11-21 07:19:00 +00:00
Justin T. Gibbs
3d9a12be07 Update comment and disable SCB paging for Rev E cards since paging, at least
in its current form, will not work with these cards.
1996-11-21 06:19:13 +00:00
Justin T. Gibbs
ad34debda8 Change the way Automatic PIO is performed in the mesgin and mesgout phases.
SPIORDY should go active on any REQ of the bus, so testing for REQINIT is
not necessary.  It also seems that testing for SPIORDY is more robust then
REQINIT since SPIORDY comes active after REQINIT and PHASEMIS seems to take
some time to come true after REQ is asserted if the phase has changed.  Of
course, none of this is documented.

This should give the code savings of my original changes, without breaking the
driver on fast peripherals.
1996-11-21 06:18:33 +00:00
Nate Williams
3d989d58d8 Fix UserConfig w/syscons.
The 'getchar' function in syscons (sccngetc) is used by UserConfig to
get keyboard input from the user.  When it was modified to use the
shared keyboard port routines it used the port passed in during the
probe routine.  Since the probe routine was not yet called, the port was
set to 0, which is obviously not going to work.

Pre-initialize sc_port to IO_KBD which is really a kludge, but it's how
the previous driver did it's job.

Found by:	remote GDB
1996-11-19 17:08:10 +00:00
David Greenman
5b73c1866a Fixed broken SIOCGIFADDR. It was copying out garbage as the ethernet
address.
1996-11-18 04:55:44 +00:00
David Greenman
9c7d26071e Fixed obsolete comment. 1996-11-18 02:45:46 +00:00
John Dyson
5b0a74089d Improve the locality of reference for variables in vm_page and
vm_kern by moving them from .bss to .data.  With this change,
there is a measurable perf improvement in fork/exec.
1996-11-17 02:38:31 +00:00