Commit Graph

5850 Commits

Author SHA1 Message Date
Nate Williams
b279668708 Document MAXMEM option.
[ Closes PR#1334, slightly modified by me ]

Submitted by:	James Raynard <james@jraynard.demon.co.uk>
1996-06-18 23:21:28 +00:00
Julian Elischer
7eb4b231d3 Obtained from: Netatalk distribution.
copyright for the appletalk stack  just to keep legal
1996-06-18 20:55:13 +00:00
Andrey A. Chernov
1f013a1f05 Add new parts, kernel not booted in other case 1996-06-18 16:58:44 +00:00
Garrett Wollman
96ccf1cba9 When bringing the netkey stuff over, I forgot that I had decided to change
AF_KEY into pseudo_AF_KEY, and defined PF_KEY incorrectly.  Fix.

Noticed by: pst
1996-06-18 15:22:26 +00:00
Julian Elischer
34b5fca760 As we have appletalk protocol support we might as well show
how to get it..
1996-06-18 10:20:16 +00:00
Julian Elischer
aa6cbc16d9 remove some debugging printfs left in by mistake 1996-06-18 10:16:29 +00:00
John Dyson
32acf9a16a Add procfs_type.c to the repository. 1996-06-18 05:22:45 +00:00
John Dyson
9961971f1f Add the file procfs_type.c to procfs. 1996-06-18 05:19:45 +00:00
John Dyson
6ead3edd9c Clean-up the new VM map procfs code, and also add support for executable
format file "etype".  It contains a description of the binary type for
a process.
1996-06-18 05:16:00 +00:00
Bruce Evans
9b2b0822b7 Removed unused #includes of <i386/isa/icu.h> and <i386/isa/icu.h>. icu.h
is only used by the icu support modules and by a few drivers that know
too much about the icu (most only use it to convert `n' to `IRQn').  isa.h
is only used by ioconf.c and by a few drivers that know too much about
isa addresses (a few have to, because config is deficient).
1996-06-18 01:22:40 +00:00
John Dyson
975dcaa94f This file is the "meat" of the process address space capability. If you
would like other things added, just ask!!!  It might be pretty easy to add.
1996-06-17 22:53:27 +00:00
John Dyson
9353aadd89 Add a feature to procfs to allow display of the process address map
with multiple entries as follows:

	start address, end address, resident pages in range, private pages
		in range, RW/RO, COW or not, (vnode/device/swap/default).
1996-06-17 22:43:36 +00:00
Peter Wemm
e999a90a90 This time, get rid of the struct copies that were really causing gcc to
call memcpy..  It seems that gcc would not inline the implicit call
when copying from a volatile...
1996-06-17 18:52:53 +00:00
Bill Paul
afe0e92aa8 Stomp another compiler warning: sc_devfs_token[] should only be declared
if DEVFS is #defined.
1996-06-17 17:21:35 +00:00
Bill Paul
8a095c52ed Add a couple of #ifdef DEVFS/#endif clauses to slence the following
compiler warnings which occur if you don't have 'options DEVFS' in
your kernel config file:

../../kern/kern_descrip.c: In function `fildesc_drvinit':
../../kern/kern_descrip.c:1103: warning: unused variable `fd'
../../kern/kern_descrip.c: At top level:
../../kern/kern_descrip.c:1095: warning: `devfs_token_stdin' defined but not use
d
../../kern/kern_descrip.c:1096: warning: `devfs_token_stdout' defined but not us
ed
../../kern/kern_descrip.c:1097: warning: `devfs_token_stderr' defined but not us
ed
../../kern/kern_descrip.c:1098: warning: `devfs_token_fildesc' defined but not u
sed
1996-06-17 16:54:03 +00:00
Bruce Evans
f0ea07bffb Reduced nesting of #includes in random.h and adjusted isa/random_machdep.c
to match (pc98/random_machdep.c probably requires a similar change).  This
is a problem area for the PC98 merge - all PC98 ifdefs in <machine/*.h> are
kludges to work around incorrect layering.
1996-06-17 16:47:43 +00:00
Bruce Evans
5d1999ec59 Synced with Makefile.i386: added -Wunused. 1996-06-17 15:11:10 +00:00
Bruce Evans
43be698cb6 Moved initialization of defaults for the label for the whole disk from
disklabel(8) to the kernel (dsopen()).  Drivers should initialize the
hardware values (rpm, interleave, skews).  Drivers currently don't do
this, but it usually doesn't matter since rotational position stuff is
normally disabled.
1996-06-17 14:43:54 +00:00
Bruce Evans
7d64a7fe80 Added support for TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).
Original version by John Hay.

Simplified timestamp code by reading the time exactly when necessary.
This may slow down the interrupt handler with extra calls to microtime(),
but only in bad configurations - the input fifo should normally be
disabled if timestamps on input are being used, since otherwise the
timestamp won't be precisely associated with any particular input event.
The interrupt handler remains slowed down by one test and branch for
each input (and now DCD change) event - avoiding this is not practical
yet.

The simplifications also fixed:
- timestamps for input sometimes being clobbered by output and modem
  status interrupts.
- valid timestamps not being available unless the port is configured with
  vector siointrts.  siointrts no longer exists.
- compiler warnings about siointr* in some configurations.

Simplified timestamp and probe code by depending on recent changes in
microtime() and DELAY() to preserve the interrupt enable flag.
1996-06-17 14:23:39 +00:00
Bruce Evans
99450dcc1d Added TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).
Reformatted FreeBSD additions in a consistent style.
1996-06-17 13:08:09 +00:00
Bruce Evans
16263f7a8b In getit(), use read_eflags()/write_eflags() to preserve the interrupt
enable flag instead of enable_intr() to restore it to its usual state.
getit() is only called from DELAY() so there is no point in optimising
its speed (this wasn't so clear when it was extern), and using
enable_intr() made it inconvenient to call DELAY() from probes that need
to run with interrupts disabled.
1996-06-17 12:50:22 +00:00
Bruce Evans
b7911dc3bb In microtime(), use pushfl/popfl to preserve the interrupt enable flag
instead of sti to it restore to its usual state.  pushfl/popfl is
actually faster in protected mode on Pentiums (4+3 cycles instead of 9),
and using sti made it extremely inconvenient to call microtime() from
fast interrupt handlers.  pushfl/popfl is a couple of cycles slower than
sti on 486's and a couple more cycles slower on 386's, but the relative
cost of using it is not large since microtime() has to use slow i/o
instructions on the old cpus.
1996-06-17 12:43:04 +00:00
John Dyson
23fd45be00 Disable direct writes for non-blocking output. 1996-06-17 05:15:01 +00:00
John Dyson
ef743ce6ed Several bugfixes/improvements:
1) Make it much less likely to miss a wakeup in vm_page_free_wakeup
	2) Create a new entry point into pmap: pmap_ts_referenced, eliminates
	   the need to scan the pv lists twice in many cases.  Perhaps there
	   is alot more to do here to work on minimizing pv list manipulation
	3) Minor improvements to vm_pageout including the use of pmap_ts_ref.
	4) Major changes and code improvement to pmap.  This code has had
	   several serious bugs in page table page manipulation.  In order
	   to simplify the problem, and hopefully solve it for once and all,
	   page table pages are no longer "managed" with the pv list stuff.
	   Page table pages are only (mapped and held/wired) or
	   (free and unused) now.  Page table pages are never inactive,
	   active or cached.  These changes have probably fixed the
	   hold count problems, but if they haven't, then the code is
	   simpler anyway for future bugfixing.
	5) The pmap code has been sorely in need of re-organization, and I
	   have taken a first (of probably many) steps.  Please tell me
	   if you have any ideas.
1996-06-17 03:35:40 +00:00
Alexander Langer
6875d5c1b3 Fix chain numbering bug when the highest line number installed >= 65435
and the rule being added has no explicit line number set.

Submitted by:	Archie Cobbs <archie@whistle.com>
1996-06-17 00:00:35 +00:00
John Dyson
b5b40fa62b Various bugfixes/cleanups from me and others:
1) Remove potential race conditions on waking up in vm_page_free_wakeup
   by making sure that it is at splvm().
2) Fix another bug in vm_map_simplify_entry.
3) Be more complete about converting from default to swap pager
   when an object grows to be large enough that there can be
   a problem with data structure allocation under low memory
   conditions.
4) Make some madvise code more efficient.
5) Added some comments.
1996-06-16 20:37:31 +00:00
Joerg Wunsch
9306343284 Explain the options for the `od' driver. 1996-06-16 20:04:47 +00:00
Joerg Wunsch
c30bc9dba0 Miscellaneous cleanup and minor fixes by Shunsuke and by me.
. use new-style options
. introduce an option OD_AUTO_TURNOFF
. try to use the native geometry as reported by the drive instead of
  a faked on -- MOs do have a ``classical'' geometry
. make the scsi_start_unit() actually working
. some cosmetic fixes

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-06-16 19:58:24 +00:00
Joerg Wunsch
bf3b9d70ed Make sure to update the SDEV_MEDIA_LOADED flag also when working on
the control device.

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-06-16 19:54:02 +00:00
Peter Wemm
bde5e68a33 Fix cut/paste error; a read-only variable should have been read/write. 1996-06-16 13:32:16 +00:00
Gary Palmer
75cc5f07de Cosmetic change: make the ``ready to run'' line match the
``ready for devices'' printed out earlier by changing `devs '
to be `DEVFS: '
1996-06-15 20:37:22 +00:00
Peter Wemm
4a32095f34 A small bit of defensive programming in case the panic is during process
exit and cleanup.  the 'ps' command assumes that there are always 'nproc'
processes on the lists and will walk off the end without checking if not,
causing ddb to trap during the 'ps' command.
1996-06-15 07:08:02 +00:00
Nate Williams
771acaaa0a Whoops, I accidentally deleted a necessary ":" which is part of the
parameters to printf() using the "D" format.  (Why this even worked on
my box during testing I don't know, but as soon as I powered it on/off
it quite working.)
1996-06-15 00:43:03 +00:00
David Greenman
664275648a Move a case of PG_MAPPED being set before a pmap_enter(). This will likely
make no difference, but it will make it consistent with other uses of
PG_MAPPED.
1996-06-14 23:26:40 +00:00
Nate Williams
333f7d7bb6 At long last, we know have support for the 3C589 in a FreeBSD release
using the existing files using the existing PCCARD support.  Now that
this is in place I would like to fixup the PCCARD hooks and remove the
if_zp driver.  At this point, we support everything we used to support
*AND MORE* with the PCCARD code.

Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp> (via the Nomad release)

[ This works on both my 3C589B and 3C589C ]
1996-06-14 22:11:38 +00:00
Nate Williams
8ca7c1c4a0 Better code for switching the ethernet transceiver.
My 3C509B-COMBO works fine with the following patch. Switching between
UTP and BNC is quite easy. (Just type 'ifconfig ep0 link1 -link2' or 'ifconifg
ep0 link2 -link1'.)

[ I tested this with the additional PC-CARD patches and it works on both
connectors on my 3C589B and 3C589C ]

Reviewed by:	nate
Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp>
1996-06-14 21:28:35 +00:00
Garrett Wollman
bd22f58e11 This is the `netkey' kernel key-management service (the PF_KEY analogue
to PF_ROUTE) from NRL's IPv6 distribution, heavily modified by me for
better source layout, formatting, and textual conventions.  I am told
that this code is no longer under active development, but it's a useful
hack for those interested in doing work on network security, key management,
etc.  This code has only been tested twice, so it should be considered
highly experimental.

Obtained from: ftp.ripe.net
1996-06-14 17:22:18 +00:00
Garrett Wollman
51fb392203 Better selection of initial retransmit timeout when no cached
RTT information is available.

Submitted by: kbracey@art.acorn.co.uk (Kevin Bracey)
(slightly modified by me)
1996-06-14 17:17:32 +00:00
Poul-Henning Kamp
5b28a6011f Fix for NFS_NOSERVER
Poul mentioned that he thought this was some kind of timing problem, and
that started me thinking. After a little poking around, I found that
nfs_timer() was completely disabled when NFS_NOSERVER was #defined.
But after looking at nfs_timer(), it seemed like it was something
required by both the client and server code, and disabling it outright
just didn't seem to make any sense. Parts of it relate only to the
NFS server side code, so I disabled those, but I re-enabled the rest
of the function and made sure that it would be called from nfs_init()
(in nfs_subs.c).

With nfs_timer() re-enabled, everything seems to work again. The only
other changes I made were to #ifdef away some variable declarations
in the NFS_NOSERVER case so that gcc would stop complaining about
unused variables.

Reviewed by:	phk
Submitted by:	Bill Paul <wpaul@skynet.ctr.columbia.edu>
1996-06-14 11:13:21 +00:00
Satoshi Asami
33fef343f9 Oops, forgot to delete some garbage from working code. 1996-06-14 11:10:19 +00:00
Satoshi Asami
ad63a118b2 The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.

Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 11:02:28 +00:00
Satoshi Asami
4c7278c696 The PC98-specific files.
Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 10:04:54 +00:00
Satoshi Asami
f7ef42a091 Document LINT.
Reminded by:	jkh, j, bde
1996-06-14 09:42:52 +00:00
David Greenman
0648f71275 Updated this driver to a newer version from Matt. This should fix several
bugs related to support of dc21041 chips and other problems.

Submitted by:	Matt Thomas <matt@3am-software.com>
1996-06-14 05:25:32 +00:00
Stefan Eßer
21219d2116 Change CONF1_ENABLE_MSK to 0x7ff00000 in another attempt to decide
whether a system could possibly support PCI configuration mechanism 1
(or whether it rather is an EISA only system ...).
1996-06-13 21:50:41 +00:00
Gary Palmer
5d2541dab0 Don't try to include opt_ipfw.h in LKMs
Submitted by:	Ollivier Robert <roberto@keltia.freenix.fr>
1996-06-13 17:35:28 +00:00
Satoshi Asami
d7629dff3b A fast memory copy for Pentiums using floating point registers.
It is called from copyin and copyout.

The new routine is conditioned on I586_CPU and I586_FAST_BCOPY, so you
need

options "I586_FAST_BCOPY"

(quotes essenstial) in your kernel config file.

Also, if you have other kernel types configured in your kernel, an
additional check to make sure it is running on a Pentium is inserted.
(It is not clear why it doesn't help on P6s, it may be just that the
 Orion chipset doesn't prefetch as efficiently as Tritons and friends.)

Bruce can now hack this away. :)
1996-06-13 07:17:21 +00:00
David Greenman
34bed8b0ee Keep ether_type in network order for BPF to be consistent with other
systems.

Submitted by:	Ted Lemon, Matt Thomas, and others. Retrofitted for
		-current by me.
1996-06-13 02:54:19 +00:00
Nate Williams
a136e00402 Only print out the new masks if bootverbose is set. 1996-06-12 20:07:09 +00:00
Gary Palmer
74a9466cc2 Convert ipfw to use opt_ipfw.h 1996-06-12 19:34:33 +00:00
Gary Palmer
a614bfe060 Since the updates to ifnet.if_lastchange are so rare (relatively
speaking), go for the extra accuracy and call microtime() to get
the current time.

Pointed Out By:		bde
1996-06-12 19:24:03 +00:00
Joerg Wunsch
6b1d48f79c Externalize the declaration of dc_list. This is required in order to
get a ``generic'' kernel (``config kernel swap generic'') to compile.
1996-06-12 15:10:30 +00:00
John Dyson
419702a468 Fix a very significant cnt.v_wire_count leak in vm_page.c, and some
minor leaks in pmap.c.  Bruce Evans made me aware of this problem.
1996-06-12 06:52:12 +00:00
Gary Palmer
a01e62f093 Add -Wunused to try and catch any future offenders
Reviewed by:	bde
1996-06-12 05:54:46 +00:00
Gary Palmer
c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Gary Palmer
1409e0b384 Clean up -Wunused warnings. Julian asked me to just ifdef
out unused code as this is still work in progress.

Reviewed by:		bde
1996-06-12 05:08:34 +00:00
Gary Palmer
10a466c7d3 Clean up -Wunused warnings. Also clean up a -Winline warning while here.
Reviewed by:		bde
1996-06-12 05:04:51 +00:00
Gary Palmer
7b3628096c Clean up -Wunused warnings.
Reviewed by:	 Greg Ungerer <gerg@stallion.oz.au>
1996-06-12 04:26:36 +00:00
John Dyson
5fcf66debe Fix some serious errors in vm_map_simplify_entries. 1996-06-12 04:03:21 +00:00
Satoshi Asami
d02dcfb382 Add ccd. 1996-06-12 03:49:35 +00:00
Satoshi Asami
8bbe70f4a7 A Makefile for a ccd lkm. You need to explicitly /sbin/modload it for
now.  Someday I'll add a hook to ccdconfig to do it automatically.
1996-06-12 03:49:15 +00:00
David Greenman
2f9bae59d6 Moved the fsnode MALLOC to before the call to getnewvnode() so that the
process won't possibly block before filling in the fsnode pointer (v_data)
which might be dereferenced during a sync since the vnode is put on the
mnt_vnodelist by getnewvnode.

Pointed out by Matt Day <mday@artisoft.com>
1996-06-12 03:37:57 +00:00
David Greenman
74ae43213c Moved the fsnode MALLOC to before the call to getnewvnode() so that the
process won't possibly block before filling in the fsnode pointer (v_data)
which might be dereferenced during a sync since the vnode is put on the
mnt_vnodelist by getnewvnode.
1996-06-12 03:36:23 +00:00
Nate Williams
22ceda90c7 Fixed GET/SETIPDOMAIN ioctl on /dev/socksys, which is used by various
other socket functions (gethostname() for one).

Reviewed by:	sef
1996-06-12 01:10:26 +00:00
John Dyson
dc48d43a6c Properly lock the vm space when accessing the memory in a process. This
fix could solve some "interesting" problems that could happen during
process rundown.
1996-06-11 23:52:27 +00:00
John Dyson
47dcd2e56c Change the symbol name used in the last commit from USRSTACK to
VM_MAXUSER_ADDRESS.  Even though they are the same, the new name
is more descriptive.
1996-06-11 23:50:48 +00:00
John Dyson
9a0a69469d Get rid of the unneeded upper address space. 1996-06-11 23:05:26 +00:00
Paul Traina
8f33d986bc Move warning messages under bootverbose 1996-06-11 16:11:27 +00:00
Paul Traina
6d715e951e Put clock calibration #defines in opt_clock.h to ease reconfiguration 1996-06-11 16:02:55 +00:00
Alexander Langer
7966b47a3e Detach the device at shutdown.
Add a prototype for ed_attach_NE2000_pci (this really belongs somewhere
else, but where?).
1996-06-11 00:51:49 +00:00
Gary Palmer
97d15c1062 Add $Id$ 1996-06-10 23:17:45 +00:00
Gary Palmer
e39a0280cb Change the use if ifnet.if_lastchange to be more in line with
SNMP requirements. Update description of ifnet.if_lastchange in if.h
to indicate this.
1996-06-10 23:07:36 +00:00
Nate Williams
1c346c7092 Implemented 'kern_sysctl', which differs from 'userland_sysctl' in that
it assumes all of the data exists in the kernel.  Also, fix
sysctl_new-kernel (unused until now) which had reversed operands to
bcopy().

Reviewed by:	phk

Poul writes:
... actually the lock/sleep/wakeup cruft shouldn't be needed in the
kernel version I think, but just leave it there for now.
1996-06-10 16:23:42 +00:00
Poul-Henning Kamp
8364338f09 We are developing a device driver of Smart Capture Card.
Smart Capture Card is a kind of video capture card, PCMCIA type II,
and made by IBM Japan co.. Unfortunately, it is sold in Japan now.

The device driver is working on the latest pccard-test package by
Tatsumi HOSOKAWA and bsd-nomads. Some applications are also working.
For example, xscc is a video moniter client on X-window, vic-2.7b2 is
a video conference tool.

We have a contract with IBM Japan. From the contract, we cannot release
the source code exept the permit of IBM Japan. But I think they will
permit us in few weeks.

Reviewed by:	phk
Requested by:	ohashi@mickey.ai.kyutech.ac.jp (Takeshi OHASHI)
1996-06-10 15:30:33 +00:00
Peter Wemm
b8484eb34b *blush* I used EXTRAVNODES everywhere else, but put EXTRA_VNODES in the
example here.. :-(
1996-06-10 08:15:29 +00:00
John Dyson
3091ee0955 Mostly superficial code improvements, add a diagnostic. The
code improvements include significant simplification of the reservation
of the swap pager control blocks for reads.  Add a panic for an inconsistent
swap pager control block count.
1996-06-10 04:58:48 +00:00
Alexander Langer
ff6f025aab Clarify the meaning of IPFIREWALL_VERBOSE. Add IPFIREWALL_VERBOSE_LIMIT. 1996-06-10 00:50:34 +00:00
John Dyson
c82b01813e Keep the vm_fault/vm_pageout from getting into an "infinite paging loop", by
reserving "cached" pages before waking up the pageout daemon.  This will reserve
the faulted page, and keep the system from thrashing itself to death given
this condition.
1996-06-10 00:25:40 +00:00
Alexander Langer
7a99108603 Big sweep over ipfw, picking up where Poul left off:
- Log ICMP type during verbose output.
  - Added IPFIREWALL_VERBOSE_LIMIT option to prevent denial of service
    attacks via syslog flooding.
  - Filter based on ICMP type.
  - Timestamp chain entries when they are matched.
  - Interfaces can now be matched with a wildcard specification (i.e.
    will match any interface unit for a given name).
  - Prevent the firewall chain from being manipulated when securelevel
    is greater than 2.
  - Fixed bug that allowed the default policy to be deleted.
  - Ability to zero individual accounting entries.
  - Remove definitions of old_chk_ptr and old_ctl_ptr when compiling
    ipfw as a lkm.
  - Remove some redundant code shared between ip_fw_init and ipfw_load.

Closes PRs: 1192, 1219, and 1267.
1996-06-09 23:46:21 +00:00
Justin T. Gibbs
1ffa43c082 Detect and report dataphase overruns. Put the adapter into 'Bit Bucket'
mode when this occurs and allow the target to complete the transaction.
Force a retry on overruns since they are usually caused by termination or
cable problems.
1996-06-09 17:33:18 +00:00
Poul-Henning Kamp
5f8f505749 Also count bytes in if_tun. kern/1253
Reviewed by:	phk
Submitted by:	John Capo <jc@irbs.com>
1996-06-09 17:24:25 +00:00
Alexander Langer
9eb9dd74b0 Include <sys/param.h> needed for MAXCOMLEN and MAXLOGNAME constants. 1996-06-09 15:00:11 +00:00
Martin Renters
3042aad3e1 Add a check in the SMC probe to verify that the card has an ethernet
address that starts with 0000C0xxxxxx.  This prevents the probe code
from finding GUS cards.

Pointed out by: Seppo Kallio <kallio@kanto.cc.jyu.fi>
1996-06-09 14:44:17 +00:00
Joerg Wunsch
2e60812e3a Fix the spl handling. There's still the effect that the timers have
sometimes already been released at the time pcaclose() is called, but
this is now prevented from deadlocking by checking for a running timer
at the start of pca_wait().

At least, i can now play xboing again with pcaudio, this used to hang
the entire system previously within a few seconds.
1996-06-09 14:23:13 +00:00
Andrey A. Chernov
88926e45d5 Implement CDIOCCLOSE 1996-06-09 12:17:53 +00:00
Satoshi Asami
58e025d580 Scan PCI buses in order the BIOS has assigned them. This is sometimes
necessary to boot from a SCSI disk connected to a twin-channel adapter,
and you have multiple of them (disks and adapters).

Reviewed by:	se
1996-06-09 11:58:19 +00:00
Jordan K. Hubbard
43b74d6191 Bring back the `config file in the kernel' feature from the 1.x days. This
is conditionalized by the INCLUDE_CONFIG_FILE option in your kernel config
file and is not turned on by default.

Submitted-By: Bill Pechter <pechter@shell.monmouth.com>
1996-06-08 23:27:16 +00:00
Nate Williams
32d18afb14 Change the 'sysi86()' function not implemented' printf to be called only
when compiled with -DDIAGNOSTIC.  Almost all significant SCO binaries
I've run call an unsupported function and run correctly.  Given that
they aren't needed, the messages only clutter up the logfiles and
console.
1996-06-08 17:12:45 +00:00
Bruce Evans
39a3579443 Fixed a vnode reference leak in nfsrv_rename(). The target inode wasn't
released until the file system was unmounted.  This bug also affected
kern/vfs_syscalls.c but was fixed in rev.1.18 and rev.1.20 there.

Reviewed by:	davidg
1996-06-08 12:16:26 +00:00
Bruce Evans
7a60d58aee Updated some comments in settimeofday(). 1996-06-08 11:55:32 +00:00
Bruce Evans
604396ff31 Fixed accumulation of run time for processes that don't accumulate
any statclock ticks.  Pretend that all the time up to the first
statclock tick is system time.  .  This makes a difference mainly for
benchmarks that test short-lived processes - the user and system
times for processes that each lived for about 1ms only added up to
about 10% of the real time even when there was very little interrupt
activity.

Break the printing of a quad_t variable correctly.
1996-06-08 11:48:28 +00:00
Bruce Evans
87bc5d1973 Removed unnecessary forward declarations of incomplete structs. 1996-06-08 11:21:19 +00:00
Bruce Evans
d85327d7bc Stop using the alias pcb_ptd' for pcb_tcc.tss_cr3'. Use the (existing)
alias `pcb_cr3' instead.  That is still one alias too many, but is convenient
for me since I've replaced the tss in the pcb by a few scalar variables in
the pcb.
1996-06-08 11:03:19 +00:00
Peter Wemm
80b53b4fd5 Eliminate a struct copy that gcc doesn't inline and ends up as a call to
memset().
1996-06-08 10:18:12 +00:00
Bruce Evans
6f74588381 Removed bogus `altfmt' code. No alternative formats are supported, but
altfmt was abused to sometimes screw up the disassembly of the bytes
following unconditional jump instructions.  Gas doesn't pad to a longword
boundary like the comment said - that is the programmer's responsibility.
1996-06-08 10:15:48 +00:00
Bruce Evans
5610112b22 Fixed calculation of the number of cylinders. wdp_cylinders (was
wdp_fixedcyl) gives it directly.  wdp_removedcyl is "reserved" except
in ancient ATA-1 drafts and shouldn't be added.  This fixes PR 1288.

Changed some fields and comments in struct wdparams to match a less-
ancient ATA draft.

Fixed bit number for `rdy' in status string.
1996-06-08 10:03:38 +00:00
Bruce Evans
7dad0d7ef9 Removed recently introduced unnecessary #includes of <machine/cpu.h>
(bootverbose isn't there in -current) and nearby unnecessary #includes.
1996-06-08 09:37:51 +00:00
Bruce Evans
e7f1854cb7 Fixed group and permissions for devfs devices (group operator was games;
permissions 0640 was 0600).
1996-06-08 09:18:27 +00:00
Bruce Evans
7cc1644db3 Fixed existence, minor numbers, group and permissions for devfs devices
(locked devices weren't created; minor numbers didn't depend on the unit
number; group operator was games; permissions 0640 was 0600).
1996-06-08 09:17:51 +00:00
Bruce Evans
0453d3cbb3 Changed some memcpy()'s back to bcopy()'s.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these.  I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized.  Now it is only used for one struct
copy in si.c.
1996-06-08 08:19:03 +00:00
Bruce Evans
5e0fc49ea8 Replaced some memcpy()'s by bcopy()'s.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these.  I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized.  Now it is only used for one struct
copy in si.c.
1996-06-08 08:18:00 +00:00
Justin T. Gibbs
43ebe040fe Only assume the scratch ram is valid (we were initialized by the BIOS)
if SCSIID is something other than 0.
1996-06-08 06:55:55 +00:00
Justin T. Gibbs
41f6ef7ee2 Bring back the loop in RESTART_SEQUENCER. It seems to be necessary for
the aic7850.  Go back to autoATN on parity errors.
1996-06-08 06:55:01 +00:00
Justin T. Gibbs
1d40e2f2c5 Hopefully fix the parity problem and the hang on message reject for good. 1996-06-08 06:54:06 +00:00
John Dyson
886d3e1150 Adjust the threshold for blocking on movement of pages from the cache
queue in vm_fault.

Move the PG_BUSY in vm_fault to the correct place.

Remove redundant/unnecessary code in pmap.c.

Properly block on rundown of page table pages, if they are busy.

I think that the VM system is in pretty good shape now, and the following
individuals (among others, in no particular order) have helped with this
recent bunch of bugs, thanks!  If I left anyone out, I apologize!

Stephen McKay, Stephen Hocking, Eric J. Chet, Dan O'Brien, James Raynard,
Marc Fournier.
1996-06-08 06:48:35 +00:00
Nate Williams
477af064b2 Bring in the prototype for index() now that's used by default. 1996-06-08 06:32:48 +00:00
David Greenman
a76f92a8f0 Fix bug in bpf_ifname() where the unit didn't get added correctly to the
name string. This function should be rewritten to deal with more than
10 units of a given type.

Pointed out by:	jmf@free-gate.com (Jean-Marc Frailong)
(I fixed it slightly differently)
1996-06-08 06:12:58 +00:00
Nate Williams
d52ead1462 When uname() returns the system name, try to use the unqualified domain
name (ie; strip off the domain).  Given a hostname 'fooey.bar.com', the
previous code returned a system name of 'fooey.ba', instead of the more
correct 'fooey'.  SCO uses 'uname' for many things, including some of
it's socket code so this patch is necessary for running certain legacy
SCO apps. :)

A variant of this code has been running on my box for 2 months now.
1996-06-08 06:01:29 +00:00
Paul Traina
75985daf3b Clear flags before using an inactive buffer. This is a kludge, but
matches the code in bread().

Reviewed by:	bde
1996-06-08 05:59:04 +00:00
Jordan K. Hubbard
b3e41931c9 A trailing patch Jim left out of the last commit.
Submitted-by: james
1996-06-07 22:55:14 +00:00
Nate Williams
3b17c1c3f8 Added index as a 'standard' file. It could be added as 'optional' for
ibcs2, but I felt it might be useful in other code as well at a later
point.
1996-06-07 22:26:59 +00:00
Nate Williams
24dc6cfd7e Added index() which will be used shortly in some fixes to the ibcs2
emulation code.
1996-06-07 22:21:31 +00:00
Andrey A. Chernov
7b2305f78e Describe ATAPI_STATIC (it seems lkm variant never work) 1996-06-07 15:50:08 +00:00
Jordan K. Hubbard
068439339a Here is a patch that fix a few problems with the RGB version of
the meteor card.
Submitted-by: james
1996-06-07 03:03:25 +00:00
John Dyson
475dca82bb Fix a bug in the pmap_object_init_pt routine that pages aren't taken
from the cache queue before being mapped into the process.
1996-06-07 02:36:08 +00:00
Poul-Henning Kamp
3ce93e4e80 Fix the same problem that davidg fixed in -stable some days ago and
restructure sysctl stuff a bit.  KERN_PROC_PID now uses pfind().
1996-06-06 17:19:21 +00:00
Poul-Henning Kamp
7a69d9230f If handler function returns EAGAIN, restart operation. 1996-06-06 17:17:54 +00:00
Garrett Wollman
c611d82e64 Instrument UDP PCB hashing to see how often the hash lookup is effective
for incoming packets.
1996-06-05 17:20:35 +00:00
Garrett Wollman
58639ed39a Don't allow trailing garbage after the unit number in ifunit(). 1996-06-05 17:12:41 +00:00
Garrett Wollman
6da5712b60 Correct formula for TCP RTO calculation. Also try to do a better job in
filling in a new PCB's rttvar (but this is not the last word on the subject).
And get rid of `#ifdef RTV_RTT', it's been true for four years now...
1996-06-05 16:57:38 +00:00
John Dyson
3ccd871cad I missed a case of the page table page dirty-bit fix. 1996-06-05 06:36:21 +00:00
Nate Williams
439a59dd6e Minor formatting changes. No functional differences, but makes the
style more consistant with KNF and the Nomad release.
1996-06-05 05:30:09 +00:00
John Dyson
6b6f000870 Keep page-table pages from ever being sensed as dirty. This should fix
some problems with the page-table page management code, since it can't
deal with the notion of page-table pages being paged out or in transit.
Also, clean up some stylistic issues per some suggestions from
Stephen McKay.
1996-06-05 03:31:49 +00:00
Nate Williams
beca01611f Bring in changes from if_ep.c for PCCARD driver.
Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.
1996-06-04 21:41:01 +00:00
Nate Williams
e78325798b Freudian slip. Change M_DEVBUG -> M_DEVBUF.
Submitted by:	 "Stephen F. Combs" <combssf@salem.ge.com>
1996-06-04 17:50:28 +00:00
Nate Williams
f421018241 Fix typo. in the APM_DSVALUE_BUG code that I missed.
Obtained from:	Someone on the mailing list (sorry, I forgot who)
1996-06-04 17:37:46 +00:00
Søren Schmidt
70013b5739 Added missing CR0_NW define for Cyrix 486DLC support. It's still not
stable on my hardware, but its better... *sigh*

Obtained from: NetBSD
1996-06-03 19:37:38 +00:00
John Polstra
588c92252f Fix a bug in the handling of the "persist" state which, under certain
circumstances, caused perfectly good connections to be dropped.  This
happened for connections over a LAN, where the retransmit timer
calculation TCP_REXMTVAL(tp) returned 0.  If sending was blocked by flow
control for long enough, the old code dropped the connection, even
though timely replies were being received for all window probes.

Reviewed by:	W. Richard Stevens <rstevens@noao.edu>
1996-06-03 15:37:52 +00:00
John Fieber
18182fa7a3 Append a * to the model field of the Archive Viper quirk entry.
Without the wildcard, the drive would never match the entry.
Also add a comment describing how matching takes place to help avoid
problems like this.
1996-06-03 14:25:11 +00:00
Joerg Wunsch
2fdaa11e37 Add a prototype for ftok(). Doesn't really belong into a <sys/...>
file, but this used to be historical practice.

Submitted by:	fhackers@jraynard.demon.co.uk (James Raynard)
1996-06-03 10:42:30 +00:00
John Dyson
261fe9665d Fix an error when B_MALLOC buffers are returned from the cluster read
code without the B_READ flag being set.  This is a problem when the
data is not cached, and the result will be a bogus attempted write.
Submitted by:	Kato Takenori <kato@eclogite.eps.nagoya-u.ac.jp>
1996-06-03 04:40:35 +00:00
David Greenman
86064318c4 Use kmem_alloc_wait/kmem_free_wakeup() to avoid allocation failures
from running out of string space in the exec_map.
1996-06-03 04:12:18 +00:00
David Greenman
6120fef1bc Fix declaration of ps_strings. 1996-06-03 04:09:36 +00:00
John Dyson
3943b4ea05 Don't carry the modified or referenced bits through to the child
process during pmap_copy.  This minimizes unnecessary swapping or creation of
swap space.  If there is a hold_count flaw for page-table
pages, clear the page before freeing it to lessen the chance of a system
crash -- this is a robustness thing only, NOT a fix.
1996-06-02 22:28:53 +00:00
Joerg Wunsch
3fda1b129f Be slightly more verbose during configure() in the bootverbose case.
This breaks the long silence after the ``npx0'' message and allows to
track some of the problems regarding the root f/s decisions.
1996-06-02 18:58:39 +00:00
Joerg Wunsch
89cabf8664 Hide the ``wrong signature'' message behind bootverbose. It's
annoying for people who don't have a bus mouse.
1996-06-02 18:57:17 +00:00
John Dyson
4ebce1e9a6 Remove the now-unnecessary and incorrect wiring of the "other" processes
page table pages.  The pmap layer now handles that fully.
1996-06-02 06:24:27 +00:00
Gary Palmer
b750974745 Correct spelling error in comment 1996-06-02 00:15:19 +00:00
Gary Palmer
a330e1f1a5 Set ifnet.baudrate for ethernet / FDDI interfaces too. Makes
SNMP slightly more informative

Reviewed by: Garrett Wollman
1996-06-01 23:25:10 +00:00
John Dyson
ff97964a2e Disable madvise optimizations for device pager objects (some of the
operations don't work with FICTITIOUS pages.)  Also, close a window
between PG_MANAGED and pmap_enter that can mess up the accounting of
the managed flag.  This problem could likely cause a hold_count error
for page table pages.
1996-06-01 20:50:57 +00:00
John Dyson
c2b39c9910 Fix the problem with pmap_copy that breaks X in small memory machines. Also
close some windows that are opened up by page table allocations.  The
prefaulting code no longer uses hold counts, but now uses the busy
flag for synchronization.
1996-06-01 19:19:21 +00:00
Paul Traina
53df9ccfca Fix ioctl() operations...nasty typo 1996-05-31 17:35:07 +00:00
Justin T. Gibbs
2ee75088b4 Fix a regression. Turn off the selection hardware during a selection timeout
before clearing the SELTO interrupt.  We used to do this in the past, but
this outb got lost.

Turn ATN on ourselves as appropriate during a parity error instead of relying
on ENAUTOATNP.

Don't use a loop in RESTART_SEQUENCER.  Its not necessary.
1996-05-31 06:32:09 +00:00
Justin T. Gibbs
e5442bc690 Don't use the auto ATN on parity error feature. It may be the source
of our parity handling problems.
1996-05-31 06:30:15 +00:00
Peter Wemm
62d2e87ec1 More closely preserve the original operation of rresvport() when using
IP_PORTRANGE_LOW.
1996-05-31 05:11:22 +00:00
Peter Wemm
ee323f62ad Jump some hoops to have the *.s code being able to be run through both an
ansi and traditional cpp.

The nesting rules of macros are different, which required some changes.
Use __CONCAT(x,y) instead of /**/.
Redo some comments to use /* */ rather than "# comment" because the ansi
  cpp cares about those, and also cares about quote matching.
1996-05-31 01:08:08 +00:00
Peter Wemm
fd54183bb9 Instead of: cpp blah file.s | as -o file.o, use instead:
cc -c -x assembler-with-cpp -o file.o file.s.

This means that any cpp fatal errors will now be detected, as well as
running *.s files through an ansi cpp instead of a traditional cpp.

(fixes to allow *.s to compile under both ansi and traditional to follow)
1996-05-31 01:01:24 +00:00
John Dyson
268e9c5397 Keep brelse from freeing busy pages. 1996-05-31 00:41:37 +00:00
John Dyson
f35329ac0f This commit is dual-purpose, to fix more of the pageout daemon
queue corruption problems, and to apply Gary Palmer's code cleanups.
David Greenman helped with these problems also.  There is still
a hang problem using X in small memory machines.
1996-05-31 00:38:04 +00:00
Peter Wemm
114a8cff43 Add an option "EXTRA_VNODES" to cause an extra number of vnode structures
to be allocated at boot time.  This is an expensive option, as they
consume physical ram and are not pageable etc.  In certain situations,
this kind of option is quite useful, especially for news servers that
access a large number of directories at random and torture the name cache.
Defining 5000 or 10000 extra vnodes should cut down the amount of vnode
recycling somewhat, which should allow better name and directory caching
etc.

This is a "your mileage may vary" option, with no real indication of
what works best for your machine except trial and error.  Too many will
cost you ram that you could otherwise use for disk buffers etc.

This is based on something John Dyson mentioned to me a while ago.
1996-05-31 00:20:34 +00:00
Peter Wemm
c15b6c4bc6 When estimating the time (in ms) left to drain the output queue based
on the baud rate, dont get upset if it's been hung up by setting B0.
Instead, sleep for a short time, as the host controller takes a while
to go through the state changes.
1996-05-30 23:41:35 +00:00
Justin T. Gibbs
e1ca90bc57 Fix regression. It seems that you need at least one instruction between
seeing SPIORDY and checking for PHASEMIS.  My last change turned out to
be less cosmetic then I thought.

Pointed out by: Satoshi Asami <asami@cs.berkeley.edu>,
		Faried Nawaz <fn@pain.csrv.uidaho.edu
1996-05-30 14:31:08 +00:00
Justin T. Gibbs
c2d50bea44 Merge in changes for NetBSD/OpenBSD.
NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
				    Pete Bentley <pete@demon.net>,
				    Charles M. Hannum <mycroft@mit.edu>,
				    Theo de Raadt <deraadt@theos.com>
1996-05-30 07:20:17 +00:00
Justin T. Gibbs
0262313ddc Merge in changes for NetBSD/OpenBSD.
Add a panic for attempts to page in a non paged out SCB.

Re-order some of the interrupt routine for better performance.

NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
				    Pete Bentley <pete@demon.net>,
				    Charles M. Hannum <mycroft@mit.edu>,
				    Theo de Raadt <deraadt@theos.com>
1996-05-30 07:19:59 +00:00
Justin T. Gibbs
56981243dd Merge in changes for NetBSD/OpenBSD.
Cosmetic change to p_mesgout code so that it "looks" the same as what
is done in the inb* routines.
NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
				    Pete Bentley <pete@demon.net>,
				    Charles M. Hannum <mycroft@mit.edu>,
				    Theo de Raadt <deraadt@theos.com>
1996-05-30 07:18:39 +00:00
David Greenman
cd73303c45 Fix a panic caused by (proc)->p_session being dereferenced for a process
that was exiting.
1996-05-30 01:21:50 +00:00
John Dyson
545901f794 Correct some unfortunately chosen constants, otherwise, not enough
pages are calculated for deferred allocation of swap pager data structures.
This is a follow-on to the previous commit to this file.
1996-05-29 06:33:30 +00:00
John Dyson
b182ec9eb4 After careful review by David Greenman and myself, David had found a
case where blocking can occur, thereby giving other process's a chance
to modify the queue where a page resides.  This could cause numerous
process and system failures.
1996-05-29 05:15:33 +00:00
John Dyson
a5b6fd29a3 Make sure that pageout deadlocks cannot occur. There is a problem
that the datastructures needed to support the swap pager can take
enough space to fully deplete system memory, and cause a deadlock.
This change keeps large objects from being filled with dirty pages
without the appropriate swap pager datastructures.  Right now,
default objects greater than 1/4 the size of available system memory
are converted to swap objects, thereby eliminating the risk of deadlock.
1996-05-29 05:12:23 +00:00
John Dyson
256951297d The wrong address (pindex) was being used for the page table directory. No
negative side effects right now, but just a clean-up.
1996-05-29 05:09:07 +00:00
Justin T. Gibbs
070d32b1a9 Fix a race condition in p_mesgout* and inb* code that could allow a
phasemiss to sneak by without detection.  This should fix the
Wide/Narrow boot problems that have been reported since this bug
caused the driver ignore a narrow target rejecting wide negotiation.
1996-05-27 23:16:55 +00:00
Gary Palmer
d9378aac9a Clean up the warnings produced by the recent PCI code. Requested by
SE since he doesn't have good access right now
1996-05-27 22:32:23 +00:00
Poul-Henning Kamp
b13f884281 Cleanup the last of the assembly time "-KERNBASE" relocations. 1996-05-27 06:51:46 +00:00
Peter Wemm
d2dc185840 Fix the warnings about "cant inline call to xxx" by reordering two
functions.  It seems gcc wants to have seen the definitions of the
function before it will insert it inline in a caller.
1996-05-27 06:02:52 +00:00
Marc G. Fournier
51d976f16a added missing semicolon
Submitted by:	 Jeffrey Hsu <hsu@freefall.freebsd.org>
1996-05-26 22:05:36 +00:00
Poul-Henning Kamp
d0aa157d5b If tunnel is busy we return EBUSY, not ENXIO. 1996-05-26 17:04:48 +00:00
John Dyson
85a376eb93 Fix a couple of problems in the pageout_scan routine. First, there is
a condition when blocking can occur, and the daemon did not check properly
for a page remaining on the expected queue.  Additionally, the inactive
target was being set much too large for small memory machines.  It is now
being calculated based upon the amount of user memory available on every
pageout daemon run.  Another problem was that if memory was very low, the
pageout daemon could fail repeatedly to traverse the inactive queue.
1996-05-26 07:52:09 +00:00
John Dyson
0ed4376231 I think this covers (fixes) the last batch of freeing active/held/busy page
problem.  BY MISTAKE, the vm_page_unqueue (or equiv) was removed from the
vm_fault code.  Really bad things appear to happen if a page is on a queue
while it is being faulted.
1996-05-26 05:30:33 +00:00
Wolfram Schneider
53996faddb Add some comments for variables and targets. 1996-05-25 23:09:49 +00:00
Peter Wemm
472fe5e4db Dont allow directories to be link()ed or unlink()ed, even for root
(returns EPERM always, the errno is specified by POSIX).

If you really have a desperate need to link or unlink a directory, you
can use fsdb. :-)

This should stop any chance of ftpd, rdist, "rm -rf", etc from
bugging out and damaging the filesystem structure or loosing races
with malicious users.

Reviewed by: davidg, bde
1996-05-24 16:19:23 +00:00
Justin T. Gibbs
c6841cd18f Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.

Closes PR:i386/1243
Submitted by:	flash@eru.tubank.msk.su
1996-05-24 15:22:36 +00:00
John Dyson
301051a01e Make sure that we don't place a busy or held page onto the PQ_CACHE queue. 1996-05-24 05:21:58 +00:00
John Dyson
f777ab7b8b Add an assert to vm_page_cache. We should never cache a dirty page. 1996-05-24 05:20:15 +00:00
John Dyson
1eeaa1e31f Add apparently needed splvm protection to the active queue, and eliminate
an unnecessary test for dirty pages if it is already known to be dirty.
1996-05-24 05:19:15 +00:00
John Dyson
3077a9c2f4 Eliminate inefficient check for dirty pages for pages in the PQ_CACHE
queue.  Also, modify the MADV_FREE policy (it probably still isn't the final
version.)
1996-05-24 05:17:21 +00:00
John Dyson
a9d4727439 Make the conversion from the default pager to swap pager more robust
in the face of low memory conditions.
1996-05-24 05:14:44 +00:00
John Dyson
c51bd6784e Change the *evil* allocation of memory from kmem_map to the kernel_map.
This will mess things up especially recently.
1996-05-24 01:39:50 +00:00
Julian Elischer
655929bfba Obtained from: netatalk distribution netatalk@itd.umich.edu
Kernel Appletalk protocol support
both CAP and netatalk can make use of this..
still needs some owrk but  it seemd the right tiime to commit it
so other can experiment.
1996-05-24 01:35:45 +00:00
Garrett Wollman
f66e235a13 Add an incremental checksum update routine. Perhaps some i386 assembly
guru out there can find a way to take advantage of little-endianness to
make this computation more efficient.  (I am certain that it can be done,
but haven't managed to make it work myself.)
1996-05-23 20:11:48 +00:00
Justin T. Gibbs
087b79e649 Correct a botched commit from yesturday. It helps to bring over the
right patch file.<sigh>
1996-05-23 15:02:18 +00:00
John Dyson
99ea1af0a6 Eliminate a vm_page_free, busy panic, in kern_malloc. 1996-05-23 02:24:55 +00:00
John Dyson
0a47b48b9f Initial support for MADV_FREE, support for pages that we don't care
about the contents anymore.  This gives us alot of the advantage of
freeing individual pages through munmap, but with almost none of the
overhead.
1996-05-23 00:45:58 +00:00
Garrett Wollman
f9493383fc Conditionalize calls to IPFW code on COMPAT_IPFW. This is done slightly
unconventionally:
	If COMPAT_IPFW is not defined, or if it is defined to 1, enable;
otherwise, disable.

This means that these changes actually have no effect on anyone at the
moment.  (It just makes it easier for me to keep my code in sync.)
In the future, the `not defined' part of the hack should be eliminated,
but doing this now would require everyone to change their config files.

The same conditionals need to be made in ip_input.c as well for this to
ave any useful effect, but I'm not ready to do that right now.
1996-05-22 17:23:09 +00:00
Peter Wemm
cd61f6c584 Fix harmless warning.. pmap_nw_modified was not having it's arg
cast to pt_entry_t like the others inside the DIAGNOSTIC code.
1996-05-22 17:07:14 +00:00
Justin T. Gibbs
393ca4686c Setup ULTRAEN in SXFRCTL0 to match the syncrate we are using during the
call of ahc_scsirate.  Otherwise, the proper setting may not get set until
the next reconnection/selection.

The saved_queue used to re-order the QINFIFO during error recovery or
certain SCB paging operations should be an array of u_chars not ints.

saved_queue type error pointed out by: Noriyuki Soda <soda@sra.co.jp>
1996-05-22 15:32:28 +00:00
John Dyson
93d52b3c56 A serious error in pmap.c(pmap_remove) is corrected by this. When
comparing the PTD pointers, they needed to be masked by PG_FRAME, and
they weren't.  Also, the "improved" non-386 code wasn't really an
improvement, so I simplified and fixed the code.  This might have
caused some of the panics caused by the VM megacommit.
1996-05-22 04:17:17 +00:00
Dima Ruban
2dfdc2cd79 "board not responding" -> "board is not responding"
Reviewed by:	gibbs
1996-05-22 00:04:12 +00:00
Peter Wemm
ce8c72b147 Fix an embarresing error on my part that made the IP_PORTRANGE options
return a failure code (even though it worked).
This commit brought to you by the 'C' keyword "break".. :-)
1996-05-21 20:47:31 +00:00
Garrett Wollman
1608c58429 Let the user know what errors are experienced on received packets.
I spent the better part of a day trying to figure out why my
experiment didn't work the way I expected, only to find out that
the router was dropping huge numbers of packets because of PCI bus
priblems.  This does not fix the bug that errors are counted as
input packets because my patch doesn't apply cleanly.
1996-05-21 19:05:31 +00:00
Justin T. Gibbs
0d12199628 It seems that the aic78X0 chips will either have their scratch ram
as all 0s or all 1s after POST if there is no BIOS installed.
1996-05-21 18:38:41 +00:00
Justin T. Gibbs
f6ca14f03c Enable/Disable Ultra mode on a per target basis. This allows the driver
to use the full range of settings from 3.6-20MHz on any target.

Remove all Ultra settings except for the top three that are documented
to work.  This fixes some problem reports with the last revision of the
driver since at least the 5.7MHz entry doesn't work in Ultra mode.
1996-05-21 18:37:25 +00:00
Justin T. Gibbs
61538c3003 Enable/Disable Ultra mode on a per target basis. This allows the driver
to use the full range of settings from 3.6-20MHz on any target.
1996-05-21 18:32:23 +00:00
John Dyson
4a62209c07 After reviewing the previous commit to vm_object, the page protection
is never necessary, not just for PG_FICTICIOUS.
1996-05-21 17:13:31 +00:00
John Dyson
07c647c528 Don't protect non-managed pages off during object rundown. This fixes
a hang that occurs under certain circumstances when exiting X.
1996-05-21 05:26:27 +00:00
John Dyson
ed48f831e0 To quote Stephen McKay: pmap_copy is a complex NOP at this moment :-).
With this fix from Stephen, we are getting the target fork performance
that I have been trying to attain: P5-166, before the mega-commit: 700-800usecs,
after: 600usecs, with Stephen's fix: 500usecs!!!  Also, this could be the
solution of some strange panic problems...
Reviewed by:	dyson@freebsd.org
Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1996-05-21 00:39:39 +00:00
Joerg Wunsch
ef70eb9783 Correct a few mode page definitions according to the SCSI-2 specs.
Not yet used, but might perhaps be used in od(4) some day.
1996-05-19 19:29:09 +00:00
Joerg Wunsch
a77032a5a4 This patch updates sys/scsi/od.c:
* Improve ficticious geometry translation.
  * CD compatible ioctl's, CDIOCALLOW, CDIOCPREVENT and CDIOCEJECT.
  * Additional sense code handling for some drives.

Reviewed by:	joerg
Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-05-19 19:26:21 +00:00
John Dyson
867a482d66 Initial support for mincore and madvise. Both are almost fully
supported, except madvise does not page in with MADV_WILLNEED, and
MADV_DONTNEED doesn't force dirty pages out.
1996-05-19 07:36:50 +00:00
John Dyson
14bf02f8f4 Minor performance improvement to kern_malloc.c that increases the
probability of reuse of recently freed memory.  This improves cache
hit stats on cached memory, and improves at least fork speed consistancy.
1996-05-18 22:33:13 +00:00
Bill Fenner
9957f86096 Removed SIOCSETRTINFO, SIOCGETRTINFO, and SIOCGETVIFINF ioctl's, which
snuck in accidentally from the DARTNet kernel.  SIOC*RTINFO were an
extended interface to the stock routing table and SIOCGETVIFINF was
an interface for rsvpd to ask the kernel for the list of multicast vif's.

Pointed-out-by: Brian Reichert <reichert@internet.com>
1996-05-18 20:33:42 +00:00