Commit graph

5253 commits

Author SHA1 Message Date
Bruce Evans bb859b2bb8 Saved 14 bytes by avoiding gas braindamage and 8 bytes by better
instruction selection, for a total of 16 bytes after padding.  Whee.
1996-03-08 07:27:52 +00:00
Bruce Evans cc494d0cce Probe the keyboard if PROBE_KEYBOARD is defined instead of when `notyet'
is defined and FORCE_COMCONSOLE isn't defined.

Don't compile any keyboard probing code if PROBE_KEYBOARD isn't defined.

Makefile:
Removed -I paths.  They weren't used, and the one to /sys hasn't worked
since the source directory was moved down one level.
1996-03-08 06:29:07 +00:00
Bruce Evans 27253a3d9c Made the timeouts in gets() machine-independent. Use the BIOS tick
counter instead of the BIOS time call to save space.

Reworked the anti-noise timeout to avoid duplicating code.  The timeout
in the outer loop is now restarted after every noise timeout, so it is
now possible for the total timeout to be infinite; previously, the maximum
total timeout was 150000 seconds.
1996-03-08 06:11:33 +00:00
Bruce Evans 0ae65c1a2b Load %fs with the flat data segment selector while in protected mode.
This will be used for convenient access to the BIOS variables.
1996-03-08 05:43:46 +00:00
Bruce Evans c50f3ecf5a Fixed restoring segment descriptors in prot_to_real(). The descriptors
must have limit 0xffff and attribute G = 0 (byte granularity) as well
as other properties that they already had (see e.g., the Intel i486
manual section 22.5).  Not restoring them broke Ctrl-Alt-Del in the
bootstrap for my ASUS P55TP4XE system, probably because the Award BIOS
does anti-tracing stuff involving inaccessible %esp's.

asm.S:
Don't use lret in prot_to_real().  This reduces the risk of using an
incompletely intialized stack segment and saves space.

Submitted by:	"K.Higashino" <a00303@cc.hc.keio.ac.jp> (on 13 Jan 1995!)
		reworked by me
1996-03-08 05:15:54 +00:00
John Dyson 45952afcc7 Fix a problem in the swap pager that caused some of the pages that
were paged in under low swap space conditions to both loose their
backing store and their dirty bits.  This would cause pages to
be demand zeroed under certain conditions in low VM space conditions
and consequential sig-11's or sig-10's.  This situation was made
worse lately when the level for swap space reclaim threshold was
increased.
1996-03-06 04:31:46 +00:00
Peter Wemm dbc09a6375 update linux_times() and linux_utime() emulation,
fix sigsuspend() (actually back out my recent change there)
and regen the syscall tables..
1996-03-04 21:03:11 +00:00
Peter Wemm 4613eba388 Oops.. I was wrong about the change to sigsuspend. The library interface is
different to the syscall under Linux, back this out.

Use correct arg type for linux_utime()
1996-03-04 20:58:47 +00:00
Poul-Henning Kamp 6ec922bb91 Validate the length before we trust it.
Submitted by:	Andrew.Gordon@net-tel.co.uk
1996-03-04 15:58:25 +00:00
Peter Wemm daf818451b Add support for LINUX_TCSETAW and LINUX_TCSETAF, which Linux-pine uses.
Submitted by: Robert Sanders <rsanders@mindspring.com>
1996-03-04 11:15:19 +00:00
John Dyson 8a02c104f9 Fix a problem that pages in a mapped region were not always
properly invalidated.  Now we traverse the object shadow chain
properly.
1996-03-04 02:04:24 +00:00
John Dyson 836e5d1360 In order to fix some concurrency problems with the swap pager early
on in the FreeBSD development, I had made a global lock around the
rlist code.  This was bogus, and now the lock is maintained on a
per resource list basis.  This now allows the rlist code to be used for
almost any non-interrupt level application.
1996-03-03 21:11:08 +00:00
Peter Wemm 185dc76169 Deal with NetBSD byte-swapped a.out magic when checking the MID to exclude
linux binaries from the *BSD a.out loader. This is a hack, but lets me run
static NetBSD binaries.  Dynamic binaries are a much bigger problem because
the shared libraries would conflict with our native libraries, so a
/compat/netbsd alternate namespace and translation would be needed.
1996-03-03 20:06:53 +00:00
John Dyson ef5dc8a96d Keep fork from over extending the number of processes. Since u_map is
sized exactly for maxproc, the occasional overrunning the maxproc limit
can cause problems.
1996-03-03 19:48:45 +00:00
Peter Wemm 4f735d8edb Add support for the old-style Linux termio (not termios) TCGETA etc.
Also, LINUX_POSIX_VDISABLE is \0, FreeBSD's is 0xff. Convert between them.

This enables some more programs to run, including the Livingston Portmaster
utilities (PMtools).

Submitted by: Robert Sanders <rsanders@mindspring.com>
1996-03-03 19:07:50 +00:00
Peter Wemm 5e004bea6f Remove the #ifdef notyet from the prototype of vm_map_simplify. John
re-enabled the function but missed the prototype, causing a warning.
1996-03-03 18:53:10 +00:00
Peter Wemm d9c682305a Add missing prototype for newly public vn_vmio_open function, next to
vn_vmio_close.
1996-03-03 18:51:33 +00:00
Peter Wemm af6646cdc5 Make the handshake lines do the right thing. This is untested by the author
but others say it's working. (DTR etc)

Closes PR#884

Submitted-by: John Hay <jhay@mikom.csir.co.za>
1996-03-03 08:42:28 +00:00
Jordan K. Hubbard 0dbf6d736f USER_LDT changes for the Willows TwinXPDK toolkit. Only tested with WINE
since that's the only other USER_LDT using code that I know of.
Submitted by:	Gary Jennejohn <Gary.Jennejohn@munich.netsurf.de>
Obtained from: {Origin of diffs may be someone else - I only rec'd them from
Gary}
1996-03-03 01:57:45 +00:00
John Dyson c735bcf57d Fix the buffer queue problem differently. The previous fix could panic
with a buffer not on queue panic.
1996-03-03 01:04:28 +00:00
John Dyson e188690a50 Fix a problem with the rlist code that it can have virtual pages that
don't really exist yet.  This can break pstat -s.  Jeesh, the rlist
code needs to be cleaned up...
1996-03-02 22:57:45 +00:00
John Dyson 847a3ba792 Handle the bogus device that MFS uses as its VBLK device. We now don't
try to VMIO open it on MFS mounts.  This will fix the mfs_badops
panic.
1996-03-02 22:18:34 +00:00
Peter Wemm a1ebcbfb76 Minor touch-up... make two functions static, and add missing $Id$ 1996-03-02 21:00:11 +00:00
Garrett Wollman 992d89b7ed Add RCS Id. 1996-03-02 20:35:51 +00:00
Peter Wemm 785d64c46a Update the linux lkm to use the new file list and build routine.
This is a bit of a kludge and needs more work.
1996-03-02 20:00:35 +00:00
Peter Wemm d66a506616 Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff.  The scrollbars are now
working, at least on my machine. (whew! :-)

I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.

The main changes:

COMPAT_LINUX is *GONE*.  Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself.  The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code.  All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first.  Like IBCS2, you can statically compile it in with "options LINUX".

A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality().  The Linux-ELF libraries want
to use some of these.

linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.

Quite a few bugs removed, including incorrect arguments being used in
syscalls..  eg:  mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.

The build for the code has changed.  i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.

Supporting changes elsewhere in the kernel:

The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS).  This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.

The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only.  This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.

makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code.  It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)

At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area.  This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
Peter Wemm 9a074e93b5 A new syscalls table for the Linux emulator. This is processed by
makesyscalls.sh to generate the rest of the tables.
1996-03-02 19:04:16 +00:00
Peter Wemm d375be0e82 This file is "obsolete" and no longer used or referenced. 1996-03-02 18:55:41 +00:00
Peter Wemm 4bd4912865 Add more options into the conf/options and i386/conf/options.i386 files
and the #include hooks so that 'make depend' is more useful.  This
covers most of the options I regularly use (but not all) and some other
easy ones.
1996-03-02 18:24:13 +00:00
Peter Wemm 68da53c92e Remove redundant comment about the 'int len' variables that should be
changed to size_t's.
1996-03-02 17:42:34 +00:00
Peter Wemm 9154ee6aec Oops.. I nearly forgot the actual core of the length/rounding/etc fixes
that Bruce asked for.

These still are not quite perfect, and in particular, it can get
upset on extreme boundary cases (addr = 0xfff, len = 0xffffffff,
which would end up mapping a single page rather than failing), but
this is better code that I committed before.

(note, the VM system does not (apparently) support single mmap segment
sizes above 0x80000000 anyway)
1996-03-02 17:14:09 +00:00
Peter Wemm bad4352830 reran makesyscalls.sh after "int len" -> "size_t len" changes. 1996-03-02 17:01:36 +00:00
Peter Wemm ce06b86652 Change madvise prototype from 'int len' to 'size_t len'. All the other
m* syscalls were prototyped as size_t already.  Add missing mincore() and
minherit() prototypes, as suggested by bde.
1996-03-02 16:55:26 +00:00
Peter Wemm 3f7efdf30d Change the 'int len' args in the mmap/msync/mincore/etc class syscalls
to 'size_t' as per bde's request.
1996-03-02 16:51:25 +00:00
Jordan K. Hubbard 6380fb9d12 Hopefully, this will fix the problems that some people have been having with
the S-Video input.  It also has code in the driver for the meteor RGB support
and some other bug fixes.  I don't have a meteor RGB but I have been told
that it works.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-03-02 06:08:53 +00:00
John Dyson 6538dda3dc 1) Fix a bug that a buffer is removed from a queue, but the
queue type is not set to QUEUE_NONE.  This appears to have
	caused a hang bug that has been lurking.
2)	Fix bugs that brelse'ing locked buffers do not "free" them, but the
	code assumes so.  This can cause hangs when LFS is used.
3)	Use malloced memory for directories when applicable.  The amount
	of malloced memory is seriously limited, but should decrease the
	amount of memory used by an average directory to 1/4 - 1/2 previous.
	This capability is fully tunable.  (Note that there is no config
	parameter, and might never be.)
4)	Bias slightly the buffer cache usage towards non-VMIO buffers.  Since
	the data in VMIO buffers is not lost when the buffer is reclaimed, this
	will help performance.  This is adjustable also.
1996-03-02 04:40:56 +00:00
Paul Traina 9d2baf5cdf Update the Connectix QuickCam driver to match my current work.
- split driver into FreeBSD specific and camera specific portions
  (qcamio.c can run in user mode, with a Linux "driver top" etc,
   and qcam.c should be trivial to port to NetBSD and BSDI.)
- support for 4bppand bidirectional transfers working better
- start of interleaved data-transfers byte-stream decodes (some of this
  stuff has been pulled out for the moment to make it easier to debug)

At this point, anyone who wants to port it to other platforms should feel
free to do so.  Please feed changes directly back to me so that I can produce
a unified distribution.
1996-03-02 03:48:19 +00:00
John Dyson 91477adc6e Enable VMIO for non-VDIR metadata and block device. 1996-03-02 03:45:12 +00:00
John Dyson de5f6a7765 1) Eliminate unnecessary bzero of UPAGES.
2) Eliminate unnecessary copying of pages during/after forks.
3) Add user map simplification.
1996-03-02 02:54:24 +00:00
John Dyson 33309c7fc0 More b_flags fixes. 1996-03-02 01:49:51 +00:00
John Dyson f5d1e6dae6 Fix a bug that b_flags was getting unnecessarily modified by
the slice code.  The effect up to now has been insignficant, but
improved buffer allocation code will break with this problem.
1996-03-01 19:01:04 +00:00
Gary Palmer 5ccab2afa9 Add a new option: DDB_UNATTENDED. Stops machine dropping into DDB
when it panics, but leaving activation of DDB from the console
unaffected.
1996-02-28 21:42:15 +00:00
Justin T. Gibbs 6398c75dc7 Fix media type determination. 1996-02-28 17:19:04 +00:00
Nate Williams f2b04a2396 Fix for 3C589C model. This patch allows people with the new models to work and
doesn't break support for the older models (tested with my 3C589B).

Reviewed by:    Joshua Gahm <jgahm@BBN.COM>
Submitted by:   hosokawa@mt.cs.keio.ac.jp (HOSOKAWA Tatsumi)
1996-02-28 16:23:36 +00:00
Poul-Henning Kamp 827bc33af4 Forgot to remove this file. 1996-02-28 13:30:14 +00:00
Andrey A. Chernov 79dd972e3e Fix re-sense code
Remove unused part of close code
1996-02-27 19:08:39 +00:00
Andrey A. Chernov f4cb715ffe rmcd0c: now several ioctls (eject/close/debug/reset/etc.) works
even not CD sensed. Open of this device without CD sensed allowed too.
Other ioctls re-sense CD for this device.
1996-02-27 18:53:50 +00:00
Bruce Evans 3420f4ab37 Spell tcp_listendrop consistently so that tcp_input.c and netstat compile. 1996-02-27 15:12:53 +00:00
Mike Pritchard 86abf1c4b2 Add a prototype for the quotactl system call. 1996-02-27 07:57:57 +00:00
Guido van Rooij 1347f5b8e5 Add a counter for the number of times the listen queue was overflowed to
the tcpstat structure. (netstat -s)
Reviewed by:	wollman
Obtained from: Steves, TCP/IP Ill. vol.3, page 189
1996-02-26 21:47:13 +00:00
Poul-Henning Kamp ae2a1587f0 Fix wrong logic, certain rules never matched. 1996-02-26 15:28:15 +00:00
Justin T. Gibbs eea817fc73 Clean up the 3c5x9 driver and add an eisaconf probe to it. This should
prevent it from conflicting with other drivers (like the aic7xxx driver).
Most of the work was in spliting out common portions of the driver and
making them generic enough to be called from the eisaconf probe.
1996-02-26 01:05:36 +00:00
Justin T. Gibbs 76e002c102 3c5x9.c:
The eisaconf probe for the 3Com 3c579 and the 3c509 when in eisa
configuration mode.

aha1742.c aic7770.c bt74x.c:
Only call eisa_registerdev after the probe is successfully.

eisaconf.c:
Increase kdc->kdc_datalen during the eisa_reg* functions instead of
in the eisa_add* functions since eisa_registerdev has already been
called and we have a kdc to manipulate.
1996-02-26 01:01:41 +00:00
Justin T. Gibbs de0d93f53f Add i386/eisa/3c5x9.c, the eisaconf probe for the 3Com 3c579 and the
3c509 when in eisa configuration mode.
1996-02-26 00:58:38 +00:00
Bruce Evans 3b3bedbc0e Added some delays to the probe. This might fix some incompatible UARTs
(the ones that take more than a few hundred nsec and less than 1 msec to
switch their IRQ output).
1996-02-25 21:10:54 +00:00
Bruce Evans 8335c1b8ae Don't turn off the motor on active drives. The motor timeout may
occur while a command is in progress if the system is overloaded
or was stopped at a debugger breakpoint.
1996-02-25 21:01:31 +00:00
Bruce Evans e6302eab11 Removed vestigial support for the obsolete FIFO option. In ext2fs
it caused null pointer panics for all fifo operations unless FIFO
was defined.
1996-02-25 20:12:36 +00:00
John Dyson d6673cba8a Re-insert a missing pmap_remove operation. 1996-02-25 05:08:57 +00:00
John Dyson 3eb77c8302 Fix a problem with tracking the modified bit. Eliminate the
ugly inline-asm code, and speed up the page-table-page tracking.
1996-02-25 03:02:53 +00:00
Peter Wemm 99ac3bc8da Add two sysctl variables that can be read by libutil and libkvm so that
they can adapt to simple kernel VM layout changes.
1996-02-24 14:32:53 +00:00
Poul-Henning Kamp d2165a8da6 Make the ipfw LKM work again.
This concludes this round of updates to ipfw, have at it!
1996-02-24 13:41:57 +00:00
Poul-Henning Kamp 09bb5f7589 Make getsockopt() capable of handling more than one mbuf worth of data.
Use this to read rules out of ipfw.
Add the lkm code to ipfw.c
1996-02-24 13:38:28 +00:00
Poul-Henning Kamp b83e431483 The new firewall functionality:
Filter on the direction (in/out).
	Filter on fragment/not fragment.
1996-02-24 00:17:35 +00:00
Poul-Henning Kamp a2ebc3ee0f I overlooked this one. 1996-02-23 20:11:37 +00:00
Peter Wemm dedb7b623c Garrett pointed out that the correct place for unix system call args
is <sys/unistd.h>, with the prototype in <unistd.h>.  sys/unistd.h
is visible to the kernel compile, and is #included by unistd.h.

Also, I missed a reference to a static int in the midst of my other diffs.
1996-02-23 19:44:10 +00:00
Peter Wemm dabee6fecc kern_descrip.c: add fdshare()/fdcopy()
kern_fork.c: add the tiny bit of code for rfork operation.
kern/sysv_*: shmfork() takes one less arg, it was never used.
sys/shm.h: drop "isvfork" arg from shmfork() prototype
sys/param.h: declare rfork args.. (this is where OpenBSD put it..)
sys/filedesc.h: protos for fdshare/fdcopy.
vm/vm_mmap.c: add minherit code, add rounding to mmap() type args where
it makes sense.
vm/*: drop unused isvfork arg.

Note: this rfork() implementation copies the address space mappings,
it does not connect the mappings together.  ie: once the two processes
have split, the pages may be shared, but the address space is not. If one
does a mmap() etc, it does not appear in the other.  This makes it not
useful for pthreads, but it is useful in it's own right for having
light-weight threads in a static shared address space.

Obtained from: Original by Ron Minnich, extended by OpenBSD
1996-02-23 18:49:25 +00:00
Peter Wemm e89de7b5c3 Run makesyscalls to regen the tables. 1996-02-23 18:31:34 +00:00
Peter Wemm 96ac07ef3a Add hooks for rfork/minherit pair, and reset args of vfork in preperation
for adding the syscalls.
1996-02-23 18:20:44 +00:00
Peter Wemm 4f9a71f6a0 Note the syscall numbers used in BSD/OS 2.x. We dont want to
accidently use one of these ourselves as it'd make it harder to run
their binaries.
Also, remove the now-defunct #include "opt_sysvipc.h".
1996-02-23 18:03:08 +00:00
Poul-Henning Kamp e7319bab6b Big sweep over the IPFIREWALL and IPACCT code.
Close the ip-fragment hole.
Waste less memory.
Rewrite to contemporary more readable style.
Kill separate IPACCT facility, use "accept" rules in IPFIREWALL.
Filter incoming >and< outgoing packets.
Replace "policy" by sticky "deny all" rule.
Rules have numbers used for ordering and deletion.
Remove "rerorder" code entirely.
Count packet & bytecount matches for rules.

Code in -current & -stable is now the same.
1996-02-23 15:47:58 +00:00
Peter Wemm 33b3ac0633 Make the default behavior of local port assignment match traditional
systems (my last change did not mix well with some firewall
configurations).  As much as I dislike firewalls, this is one thing I
I was not prepared to break by default.. :-)

Allow the user to nominate one of three ranges of port numbers as
candidates for selecting a local address to replace a zero port number.
The ranges are selected via a setsockopt(s, IPPROTO_IP, IP_PORTRANGE, &arg)
call.  The three ranges are: default, high (to bypass firewalls) and
low (to get a port below 1024).

The default and high port ranges are sysctl settable under sysctl
net.inet.ip.portrange.*

This code also fixes a potential deadlock if the system accidently ran out
of local port addresses. It'd drop into an infinite while loop.

The secure port selection (for root) should reduce overheads and increase
reliability of rlogin/rlogind/rsh/rshd if they are modified to take
advantage of it.

Partly suggested by: pst
Reviewed by: wollman
1996-02-22 21:32:23 +00:00
David Greenman f9d5a964af Fixed bug in Path MTU Discovery that caused the system to have to re-
discover the Path MTU for each connection if the connecting host didn't
offer an initial MSS.

Submitted by:	davidg & olah
1996-02-22 11:46:39 +00:00
David Greenman 5afce28270 Add a "NO_SWAPPING" option to disable swapping. This was originally done
to help diagnose a problem on wcarchive (where the kernel stack was
sometimes not present), but is useful in its own right since swapping
actually reduces performance on some systems (such as wcarchive).
Note: swapping in this context means making the U pages pageable and has
nothing to do with generic VM paging, which is unaffected by this option.

Reviewed by:	 <dyson>
1996-02-22 10:57:37 +00:00
John Dyson 6e20683c9d Fix a problem that select did not work with direct writes. Make
wakeup channels more consistant also.
1996-02-22 03:33:52 +00:00
Joerg Wunsch 2e899e8a02 . move out the error and status register def's for wt into
<machine/wtio.h>, so mt(1) can print them,

. cosmetics: put the return type and the function name onto
  different lines.
1996-02-22 00:31:49 +00:00
Nate Williams 2b1f32c2f9 Removed un-used code. 1996-02-21 23:31:03 +00:00
Nate Williams b2e8253ac3 Updated PC-CARD support to contain most of the code from the latest
Japanese BSD-Nomad release.

Reviewed by:    phk
Submitted by:   hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads
1996-02-21 23:22:27 +00:00
Nate Williams 4765b33331 Updated PC-CARD support to contain most of the code from the latest
Japanese BSD-Nomad release.

Reviewed by:	phk
Submitted by:	hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads
1996-02-21 23:20:21 +00:00
Bill Fenner 7d1ba41375 Make the "arpresolve: can't allocate llinfo" error message
more useful by printing out the IP address it was trying to
resolve, since we're seeing so many complaints about this
error.
1996-02-20 17:54:17 +00:00
Julian Elischer 53ee9bec58 cosmetic fixes plus bring the cdevsw and bdevsw entries
into line with the new form.
1996-02-19 09:36:23 +00:00
Julian Elischer e69f051247 allow the default tape unit to try figure out what it is rather than
forcing it to 512 byte blocks....
1996-02-19 09:26:07 +00:00
Stefan Eßer 8ec7a852b0 Remove limit of port I/O addresses to 65K, since PCI specifies 32 bit
port addresses (even though the PC architecture doesn't support them).

Add code to limit the I/O map size based on the lowest set bit of the
address. This cures the problem with the BT946C only having a 16 bit
map register, in voiolation of the PCI specs, without giving up the
general support of >65K port regions.
1996-02-19 00:30:40 +00:00
Stefan Eßer e14b85c5e3 Restore two lines that were erronously deleted with the removal of
the NCR_NO_DISCONNECT option in the previous patch.
1996-02-19 00:03:50 +00:00
Stefan Eßer baf895e508 Make SIMPLE TAG messages the default.
Remove bogus NCR_NO_DISCONNECT option, which actually never was useful.
1996-02-18 23:15:19 +00:00
Justin T. Gibbs ef83c41f6d Return immediately in our interrupt handler if there is nothing to do.
This allows shared interrupts to work.

Submitted by: greg@greg.rim.or.jp
1996-02-18 07:45:36 +00:00
Justin T. Gibbs 4e964f34ea Add PCI ID for older revision Buslogic 946 cards
Submitted by: greg@greg.rim.or.jp
1996-02-18 07:44:16 +00:00
Julian Elischer e9ee430593 really stupid mistake that stopped devices from appearing on the fly in mounted
DEVFS filesystems..

- 		if ( error = dev_add_name(child->name,parent->dnp
+ 		if ( error = dev_add_name(child->name,falias->dnp

Ok bruce, this is the one you were seeing..
1996-02-18 07:29:53 +00:00
Stefan Eßer 9df7e08732 Add: CDU-8003A aka Apple CDROM-300
Submitted by:	Michael Reifenberger <root@totum.plaut.de>
1996-02-17 23:59:24 +00:00
Stefan Eßer 07d9d14a55 Add generic PCI to PCI bridge support.
Improve verbose boot messages for unidentified chips.
1996-02-17 23:57:04 +00:00
Peter Wemm add3bbdaef Add missing prototype for pipeselwakeup (a recently added function) - gcc
bitches about it..
1996-02-17 14:47:16 +00:00
Peter Wemm 5297fc55c8 This is an extract of changes from what I am currently running...
- Optimise the linux a.out loading and uselib system calls so they
  take advantage of some of John's recent interface improvements.
  Basically, this means they make far less map changes than before.
- Attempt to plug some potentially nasty kernel_map memory leaks..
- Improve support for QMAGIC libs (I only use QMAGIC (ie: a.out libraries from
  the slackware 3.0 dist) but this depends on other changes to enhance
  the /compat/linux support)
- uselib goes out through a single exit as part of the resource tracking
  that I did when closing the resource leaks on errors.  This could be
  cleaner than what I did, but making a 30-deep nested if/else was not my
  idea of fun, neither did I want to repeat the same code 30 times over for
  each failure possibility.  I guess this function needs to be split into
  smaller functions to solve this.

I've been running the Linux Netscape-2.0 (with Java) to test this, and apart
from the long-standing problem with the missing scrollbars, it appears to
still work as before with ZMAGIC libs (and the leaks)..  However, I've
been using it with mods for the signal trampoline code for native linux stack
frames on signals and exterminated the blasted sigreturn printf() problem,
so I can't be certain that there is not a dependency on something else.
1996-02-16 18:40:50 +00:00
Justin T. Gibbs 34b72528fe Allow I/O port ranges above the standard ISA one so the PCI probe will succeed.
Reviewed by:  Richard J Kuhns <rjk@sparcmill.grauel.com>
1996-02-16 17:24:19 +00:00
Garrett Wollman fd0db847b8 finish killing off netns. (For some reason, CVS `undeleted' these
during my last commit.)
1996-02-13 18:19:17 +00:00
Garrett Wollman dc915e7cfc Kill XNS.
While we're at it, fix socreate() to take a process argument.  (This
was supposed to get committed days ago...)
1996-02-13 18:16:31 +00:00
Justin T. Gibbs 162b7f0ac2 - Properly set the watchdog timer only during transmits.
- Clean up the access to our ifnet structure by caching a pointer
  to it instead of always digging through our softc structure.

Submitted by: Watchdog fixes by Serge A. Babkin <babkin@hq.icb.chel.su>
1996-02-13 15:55:33 +00:00
Poul-Henning Kamp c9c37b27d1 rewrap some long lines. 1996-02-13 14:16:36 +00:00
Poul-Henning Kamp 01a3e1a590 use devfs_add_devswf and avoid local variable. 1996-02-13 14:15:13 +00:00
Poul-Henning Kamp d0cb65474e Correct & Update the printing of CPU features. We have printed rubbish
since version 1.117 when Garrett made the switch to %b.  Updated to
reflect Intel AP-485 (241618-004).
1996-02-13 10:30:36 +00:00
Andrey A. Chernov fa2e3e4891 Physically ask for leadout entry instead of asking of
last_track + 1 entry, some drives don't understand it
1996-02-13 03:46:48 +00:00
Andrey A. Chernov 52be2bc34c Implement CDIOCSTART 1996-02-13 02:32:36 +00:00
Andrey A. Chernov a034e85849 Recognize NRC MBR-7.4 too 1996-02-12 23:22:33 +00:00
Justin T. Gibbs b168bd14c9 Correct the PCI ID for the Buslogic 946. 1996-02-12 17:00:39 +00:00
Justin T. Gibbs 3652ff557d 4.4Lite2 implemented the LIST_INSERT_BEFORE and TAILQ_INSERT_BEFORE
exactly as I did (should have checked there first I guess) except my
macro for TAILQ_INSERT_BEFORE took an unneeded arg.  We now match 4.4Lite2.

Suggested by: Jeffrey Hsu <hsu@FreeBSD.org>
1996-02-12 08:20:54 +00:00
John Dyson f3e79aa705 Add ifdefs for non-freebsd system usage. Add missing select wakeups,
and make the select wakup code a little neater.
1996-02-11 22:09:50 +00:00
John Dyson a02051c37a Fixed a really bogus problem with msync ripping pages away from
objects before they were written.  Also, don't allow processes
without write access to remove pages from vm_objects.
1996-02-11 22:03:49 +00:00
Poul-Henning Kamp f0d807c7fe Make tundebug sysctl writable. 1996-02-09 09:23:56 +00:00
John Dyson 5af564b4f4 Add some missing requests for the read-side to wakeup the write-side. Also
add some missing wakeups by the write side to the read side.
1996-02-09 04:36:36 +00:00
Garrett Wollman a9ad85b0df If a slow input queue was defined by the driver, initialize it. 1996-02-08 21:34:56 +00:00
Garrett Wollman 4de31ee58e #if out unsupported IMP code. 1996-02-08 15:43:35 +00:00
Paul Traina ab58050112 Close kern/627 - panic if syscons not attached 1996-02-08 06:30:31 +00:00
Paul Traina 19c8e2e153 Close kern/614 - wait up to an hour for a tape operation like "fsf" (slow drives) 1996-02-08 06:23:49 +00:00
Garrett Wollman b1fea4ca10 Add a couple of macros I expect to need. 1996-02-07 21:52:57 +00:00
Garrett Wollman b43e0b6891 Comment out netccitt, netimp, and netiso entries, since we
no longer ship this code.

Submitted by:	davidg
1996-02-07 20:06:22 +00:00
Garrett Wollman b135805469 Define a new socket option, SO_PRIVSTATE. Getting it returns the state
of the SS_PRIV flag in so_state; setting it always clears same.
1996-02-07 16:19:19 +00:00
John Dyson 26d2f00960 Apparent fix for a pipe hang problem. 1996-02-07 06:41:56 +00:00
Garrett Wollman 1df738d453 Kill netccitt. The code is ancient, nobody wants to maintain it, and it
doesn't compile cleanly.
1996-02-06 21:07:22 +00:00
Garrett Wollman 8df32b19de Get rid of netiso. It hasn't compiled in some time, there are no
applications, and nobody uses it.
1996-02-06 21:02:09 +00:00
Garrett Wollman bba9a7a06b Comment out ISO, CCITT, LLC, and HDLC with a note to the effect
that we no longer ship source for these protocols.
1996-02-06 20:57:46 +00:00
Garrett Wollman 9b44ff2214 Clean up Ethernet drivers:
- fill in and use ifp->if_softc
	- use if_bpf rather than private cookie variables
	- change bpf interface to take advantage of this
	- call ether_ifattach() directly from Ethernet drivers
	- delete kludge in if_attach() that did this indirectly
1996-02-06 18:51:28 +00:00
Jordan K. Hubbard 70a459064d Fix METEOR_TEST_VIDEO case.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-02-05 23:04:05 +00:00
Garrett Wollman c67b1d17da Provide a direct entry point for IP input. This actually results
in a slight decrease in performance, but will lead to better
performance later.
1996-02-05 20:36:02 +00:00
Garrett Wollman 5eb1d25adb Make me feel a little better by filling in reasonable values for rmx_sendpipe
and rmx_recvpipe.  This has no demonstrable effect on performance.
(ttcp reports about 44 Mbit/s for all the buffer sizes I tried between
16384 and 65536.)
1996-02-05 19:34:27 +00:00
Garrett Wollman cbb0b46ab7 Fill in the corresponding ether address of multicast and broadcast
pseudo-``ARP entries'' so arp(8) doesn't show them as `unresolved'.
1996-02-05 18:04:30 +00:00
Mike Pritchard 097d42f425 Correct some man page cross references and some file
locations.
1996-02-05 17:32:16 +00:00
David Greenman f83a01b63f Unspam my changes in rev 1.54 that John spammed in rev 1.55. 1996-02-05 14:23:19 +00:00
Andrey A. Chernov f2b4163c2a Deliver all bells to current console, use different pitch
for non-originating bells.
1996-02-05 14:08:39 +00:00
John Dyson f29e1bd629 More fixes from bde.
Only modify times on success.
	splhigh() around time variable usage.
	Make atomic writes more posix compliant.
	Spelling errors.
Submitted by:	bde
1996-02-05 05:50:34 +00:00
John Dyson 96cc6b1011 Kva space allocated for direct buffer wasn't quite big enough. The
system can panic easily without this patch.
1996-02-05 05:17:15 +00:00
John Dyson dca5129987 Changed vm_fault_quick in vm_machdep.c to be global. Needed for
new pipe code.
1996-02-04 22:09:12 +00:00
David Greenman 267173e72d Rewrote cpu_fork so that it doesn't use pmap_activate, and removed
pmap_activate since it's not used anymore. Changed cpu_fork so that
it uses one line of inline assembly rather than calling mvesp() to
get the current stack pointer. Removed mvesp() since it is no longer
being used.
1996-02-04 21:20:53 +00:00
John Dyson 2834ceec7c Improve the performance for pipe(2) again. Also include some
fixes for previous version of new pipes from Bruce Evans.  This
new version:

Supports more properly the semantics of select (BDE).
Supports "OLD_PIPE" correctly (kern_descrip.c, BDE).
Eliminates incorrect EPIPE returns (bash 'pipe broken' messages.)
Much faster yet, currently tuned relatively conservatively -- but now
	gives approx 50% more perf than the new pipes code did originally.
	(That was about 50% more perf than the original BSD pipe code.)

Known bugs outstanding:
	No support for async io (SIGIO).  Will be included soon.

Next to do:
	Merge support for FIFOs.

Submitted by: bde
1996-02-04 19:56:35 +00:00
Paul Traina 56d073db13 Document kernel config flags better and add bidirectional override 1996-02-04 10:23:33 +00:00
Paul Traina bf29db4af3 Tell userconfig about qcam 1996-02-04 10:03:19 +00:00
Paul Traina 9e88c75a9f Add ability to bypass the auto-detection code. It used to be rock solid
for me, but has gotten a bit flakey in bidirectional parallel port mode.

Fix a bug in bidirectional parallel port transfers, more work is still
needed here (testers welcome).

Minor cleanup.
1996-02-04 10:02:35 +00:00
Joerg Wunsch 017ef5fdc2 Create symlinks for vnboot and bootvn, too. 1996-02-03 21:12:27 +00:00
Peter Wemm 5c8e1e6010 Fill in a lot of the missing blanks from the version I posted...
(better check to see that I've not misspelt somebody's name here, this
 info was collected from some strange places..)
1996-02-03 14:50:52 +00:00
Andrey A. Chernov 3025715460 Implement CD_MEDIA_CATALOG request for read_subchannel
Obtained from: NetBSD
1996-02-03 14:33:56 +00:00
Andrey A. Chernov 011d15478c Since ioc_read_subchannel don't used for hardware, remove padding.
Now almost all my changes backed out, expect one comment
about network byte order of LBA.
1996-02-03 14:19:13 +00:00
Joerg Wunsch c38a76a7d0 Add a quirk record for the Tandberg 42XX series. Not only that these
drives require ST_Q_SNS_HLP, they also wrongly accept a blocksize of
1024 in the first place (for a QIC-150 cartridge), but complain later
about it.  The hack is to only probe for 512 for them.

Reorder the entries in st_decide_mode() so that QIC >= 525 is properly
accepted as variable blocksize.
1996-02-03 13:31:13 +00:00
Poul-Henning Kamp 821c204e91 Make the sorting of IPFW rules an option. You don't want it to sort them.
>>>WARNING<<<  you may have to revisit your firewall setup.
1996-02-03 11:48:12 +00:00
Andrey A. Chernov 0b2207bcb3 Detect yet one kind of device (taken from NetBSD)
Use more accurate TOC size calculation
1996-02-03 00:06:49 +00:00
Andrey A. Chernov 628257e0b0 Simplify READTOCENTRYS by removing fake leadout code,
SCSI system do it for us
1996-02-02 23:43:40 +00:00
Joerg Wunsch 1d98b891d0 Add the HP4020i CD-R as a known device.
Reorder the CD-R entries in knowndevs[].

Submitted by:	fred@jjarray.umd.edu (Fred Cawthorne)
1996-02-02 22:59:48 +00:00
Joerg Wunsch b73b631531 Add the Emulex MD21 ESDI-to-SCSI bridge as a known device (with more than
one LUN).
Submitted by:	Wilko Bulte
1996-02-02 22:57:27 +00:00
Andrey A. Chernov 1cf944e85c Implement PREVENT & CLOSE ioctls 1996-02-02 22:08:28 +00:00
Andrey A. Chernov 8b1448af24 Remove close tray on open - works very bad with xcdplayer 1996-02-02 21:18:02 +00:00
Andrey A. Chernov c3ed4fcf9d Exchange addr_type<->control 1996-02-02 20:54:27 +00:00
Andrey A. Chernov 4a52a30aff Calculate TOC size to match what scsi cd says.
Exchange control<->addr_type fields
1996-02-02 20:50:04 +00:00
Andrey A. Chernov b03135a62b I forget the fact that cd_read_toc reads toc header in any case 1996-02-02 20:43:11 +00:00
Andrey A. Chernov fd04d24d6b Remove #pragma pack, use byte filler in ioc_read_subchannel
instead, all other structures already aligned
1996-02-02 20:41:11 +00:00
Paul Traina b184a4f4e4 Remove the ability for the user mode programs to specify bidirectional
vs unidirectional transfer modes.  The kernel handles hardware, user mode
programs shouldn't get in the way.

This cleans up some really ugly grots that I hated too. :-)

Suggested by: Sujal Patel <smpatel@wam.umd.edu>
1996-02-02 20:37:51 +00:00
Paul Traina b0f4bf0063 Add support for Connectix QuickCam(tm)
* this is my unoptimized driver, it works fine, it's not as fast as it
* could be (yet) -- I have yet to merge in ideas from other QuickCam
* developers.
1996-02-02 19:27:57 +00:00
Paul Traina 0b59977032 Add support for Connectix QuickCam(tm)
* warning: this user interface is still in flux pending negotiations
* with other quickcam driver authors.  It is _not_ compatible with the
* original linux interface due to the fact that it was too restrictive.
1996-02-02 19:26:37 +00:00
Paul Traina 744f4aaa11 Add Peter's list of major numbers 1996-02-02 19:12:43 +00:00
David Greenman ac474627f4 Killed last change - it was bogus. cpu_switch() already assumes that
return address is on the stack.
1996-02-02 18:30:06 +00:00
Paul Traina 4cf6236007 Add in hooks for quickcam driver 1996-02-02 06:55:35 +00:00
Wolfram Schneider 1d08058f65 add ruid and rgid to file 'status' 1996-02-02 05:19:20 +00:00
Andrey A. Chernov 108fdb172f Implement PLAYBLOCKS ioctl, add argument checking to other PLAY* ioctls
Obtained from: NetBSD (partially)
1996-02-01 19:15:41 +00:00
Andrey A. Chernov 6139d02fde Frame whole file with #pragma pack(1) and #pragma pack(4),
structures listed here used to access hardware data directly
1996-02-01 18:18:54 +00:00
Andrey A. Chernov 3681ddfb6e Remove statement that does nothing now, forget in my prev. commit 1996-02-01 17:35:15 +00:00
Andrey A. Chernov 7e1ed1c4aa addr_type field was ever not assigned, control field was assigned incorrectly 1996-02-01 17:27:01 +00:00
Andrey A. Chernov 3a08c9b183 Return to #pragma pack(4) after header is done
Obtained from: NetBSD
1996-02-01 17:19:46 +00:00
Andrey A. Chernov 6495d86b22 Fix TOC size calculation: old code assing volume size here 1996-02-01 16:51:53 +00:00
Andrey A. Chernov f1956303bb Oops, pick wrong volume size for leadout entry 1996-02-01 16:22:58 +00:00
Andrey A. Chernov ff60dd409f Add comment: reflect the fact that lba stored in network byte order 1996-02-01 16:16:11 +00:00
Andrey A. Chernov e48413a02e Oops, I pick wrong size field for leadout entry 1996-02-01 16:11:42 +00:00
Jordan K. Hubbard 26a2ebbb95 Sync with latest Meteor and Spigot sources from James.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-02-01 07:36:34 +00:00
Stefan Eßer 218d60ad3d Slight modification of ncr_setmaxtags: set usrtags=0 for drives
that don't announce support for command queues.

SCSI_NCR_DFLT_TAGS can be specified in the kernel config file
and sets the default number of tags per disk drive.
A value of 0 means "no tags".

Minor correction in debug messages: Values from the msg_in
buffer were being printed in the msg_out trace message ...
1996-01-31 19:24:34 +00:00
Justin T. Gibbs b1cd8af83b Free the externalizing buffer. 1996-01-31 18:46:36 +00:00
Justin T. Gibbs f6f6004c29 Properly calculate the amount of the devconf to output in SYSCTL_OUT.
The code outputs the dc then calls the device specific externalize
routines to fill in the dc_data area.  The old code assumed that dc_data
started one byte from the end of the dc, but with the compiler optimizing
alignment and padding, this isn't always the case.  Do an explicit
&(dc.dc_data) - &dc.  This fixes lsdev -c which must have been broken
for some time.
1996-01-31 18:05:19 +00:00
Justin T. Gibbs 5ae5e472e2 aha1742.c aic7770.c bt74x.c
- Call eisa_registerdev as soon as we have a device match.  This allows the
   "eisa_add_*" routines to tweak kdc_datalen as the kdc grows and shrinks.

eisaconf.c
 - externalize the linked lists that hold our ioaddrs and maddrs.
1996-01-31 18:02:19 +00:00
David Greenman 1af87c9263 "out of space" -> "out of swap space". 1996-01-31 13:14:21 +00:00
David Greenman 729b1e5149 Improved killproc() log message and made it and the other similar message
tolerant of p_ucred being invalid. Starting using killproc() where
appropriate.
1996-01-31 12:44:33 +00:00
David Greenman 8c73da1e15 Print a more descriptive message when the mb_map is filled (out of mbuf
clusters), and tell the operator what to do about it (increase maxusers).
1996-01-31 12:05:52 +00:00
Satoshi Asami b8e29b5517 Fix one warning and fix one bug found while looking at another warning (but
caused by a different reason):

. #ifndef __FreeBSD__ around check for negative size, FreeBSD size_t is
  unsigned

. Disable mirror/parity if interleave size is 0 (i.e., serial concatenation).
1996-01-31 11:25:46 +00:00
Andras Olah 07e43e10f8 Fix a bug related to the interworking of T/TCP and window scaling:
when a connection enters the ESTBLS state using T/TCP, then window
scaling wasn't properly handled.  The fix is twofold.

1) When the 3WHS completes, make sure that we update our window
scaling state variables.

2) When setting the `virtual advertized window', then make sure
that we do not try to offer a window that is larger than the maximum
window without scaling (TCP_MAXWIN).

Reviewed by:	davidg
Reported by:	Jerry Chen <chen@Ipsilon.COM>
1996-01-31 08:22:24 +00:00
Jordan K. Hubbard 10fd4c5933 Add an entry for my HP Model 4020i CDR drive. 1996-01-31 07:32:11 +00:00
John Dyson 4ab7a1a6c7 Fix another problem with the new pipe code, pointed out by Bruce Evans.
This one fixes a problem with interactions with signals.
1996-01-31 06:00:45 +00:00
Satoshi Asami 3bc746be91 Mirror support. When CCDF_MIRROR is set:
(1) The reads are always done from the first n/2 disks.

(2) Each write is done twice, to the "data" disk (in the first half) and
    the "mirror" disk (in the second half).

ccdbuffer() now takes an extra argument (struct ccdbuf **) and stores
the pointer to ccdbuf in there.  In case of a mirrored write, it
allocates and stores two pointers.  The "residual" is also doubled
for mirrored writes so that ccdiodone() can correctly tell when all
the writes are done.
1996-01-31 03:28:21 +00:00
John Dyson 56363b79a9 Fix some problems with return codes on the new pipe stuff. Bruce Evans
found the problems, and this commit will fix the "first batch" :-).
1996-01-31 02:05:12 +00:00
Mike Pritchard 71d9c7815e Fix a bunch of spelling errors in the comment fields
of a bunch of system include files.
1996-01-30 23:33:04 +00:00
Andrey A. Chernov dff88dc420 Audio part: various improvements from NetBSD driver
Convert LBA to network order now
1996-01-30 23:27:20 +00:00
Andrey A. Chernov 42f5e5cdbe Bugfix: don't convert LBA to host order, they must stay in network order. 1996-01-30 23:11:45 +00:00
Andrey A. Chernov 5d33645207 Don't convert LBA to host order, they must stay in network order
as old code does.
1996-01-30 23:11:06 +00:00
Mike Pritchard 6c5e9bbdf5 Fix a bunch of spelling errors in the comment fields of
a bunch of system include files.
1996-01-30 23:02:38 +00:00
Satoshi Asami 09b5920411 Prepare for adding mirroring. Check for flags (mirror forces uniform),
reduce the size to half, etc.  Right now it only uses the first n/2 disks
for both read and write.
1996-01-30 22:34:53 +00:00
Satoshi Asami 52aa774abe Add mirror flag. 1996-01-30 22:33:31 +00:00
Garrett Wollman 8ca67119ca Fix a logic error in determining whether something is page-aligned
that became evident while I was thinking about something else.
(No, I am not working on the wd driver itself.)
1996-01-30 19:04:09 +00:00
Garrett Wollman 3addba4f55 No longer use the cyclecounter to attempt to correct for late or missed
clock interrupts.

Keep a 1-in-16 smoothed average of the length of each tick.  If the
CPU speed is correctly diagnosed, this should give experienced users
enough information to figure out a more suitable value for `tick'.
1996-01-30 18:56:47 +00:00
Andrey A. Chernov ba6d026ac8 OOPS, forget to adjust starting track to not physically read
leadout entry
1996-01-30 16:38:30 +00:00
Andrey A. Chernov 62bdf2b7c6 Use ntohs/ntohl when reading TOC instead of hardcoded byte swapping.
Put fake entry len for MSF format too.
1996-01-30 16:12:18 +00:00
Andrey A. Chernov 48ce3c2cee Calculate leadout entry instead of honor ATAPI request
(it can be wrong for some devices)
1996-01-30 15:25:12 +00:00
Andrey A. Chernov b7d2756067 READTOCENTRYS: make fake leadout entry 1996-01-30 14:30:43 +00:00
Andrey A. Chernov e407db3cbc READTOCENTRYS: protect against stack overflow when incorrect data
stored in CD's TOC
1996-01-30 13:15:28 +00:00
Andrey A. Chernov e9a22c0c14 READTOCENTRYS: handle 0 and lead out requests, add argument checking 1996-01-30 12:59:00 +00:00
David Greenman b09fb6432d savectx() strikes again: the saved stack pointer wasn't properly adjusted
to remove the return address. It's only the frame pointer and luck that
allowed the code to work at all.
1996-01-30 12:54:21 +00:00
Peter Wemm 8cbf6e5894 Call pipe_stat() when presented with a DTYPE_PIPE file in the linux
fstat() syscall, rather than panic("linux newfstat").

(Note: I've extracted this from a larger set of diffs, I'm confident I've
 not missed any dependencies but can't modload it to test it on my system)
1996-01-30 12:23:17 +00:00
Andrey A. Chernov 685a5a0b51 Don't generate EINVAL for data_len too big in READTOCENTRYS, it
reduces automatically to reasonable value in the code below
1996-01-30 12:07:15 +00:00
Andrey A. Chernov 71517d7ccf Fix READTOCENTRYS partialy based on kientzle@netcom.com patch partialy on
my own ideas
1996-01-30 11:32:20 +00:00
Andrey A. Chernov bc7805ece3 Fix audio part, especially READTOCENTRYS inspired by NetBSD driver
and my own ideas
1996-01-30 10:31:12 +00:00
David Greenman 3dd78b2bcd Increase tmpstk size to 8K and make certain it is longword aligned. 1996-01-30 07:59:02 +00:00
David Greenman ab11bf854a Restore my change to the watchdog params that Paul spammed in rev 1.18. 1996-01-30 07:25:44 +00:00
Mike Pritchard fcf6d7e758 Fix a typo in a comment. 1996-01-30 02:56:08 +00:00
Stefan Eßer dcf289cdb5 Add heuristic to detect multi-function devices that don't announce this
feature in the header type register, though it is required by the PCI spec.
This should correctly probe both functions of the Intel 82371FB chip,
without the need for a special case based on the device ID.
1996-01-30 01:14:29 +00:00
Joerg Wunsch 5044d1ff0b Remove redundant declaration for worminit(). Dunno why my config(8)
didn't generate it, but it's supposed to.
1996-01-29 19:46:26 +00:00
David Greenman 2c68345ab4 Added a check/panic for vm_map_find failing to find space for the page
tables/u-pages when forking. This is a "can't happen" case. :-)
1996-01-29 12:10:30 +00:00
David Greenman 07bbd7f1bb Implement what I mentioned in rev 1.18: limit per-bucket allocations to
60% of physical memory or 60% of malloc area size, whichever is smaller.
1996-01-29 11:12:37 +00:00
David Greenman 54e7152c15 Fixed two bugs in the calculation of the malloc area (kmem_map) size:
1) The calculation didn't account for NMBCLUSTERS, so if a large number of
   clusters was specified, it would leave little or no space for kernel
   malloc.
2) It was bogusly restricted to v_page_count. This doesn't take into
   account the sparseness of the malloc area and would have caused
   problems on machines with small amounts of memory. It should probably
   instead be changed to set the malloc limit to be constrained by
   the amount of memory, but I didn't do this.
1996-01-29 09:58:34 +00:00
Justin T. Gibbs 7db797deb6 Add LIST_INSERT_BEFORE and TAILQ_INSERT_BEFORE. These are used by the
new eisaconf code.
1996-01-29 03:20:44 +00:00
Justin T. Gibbs 299bb9dbd6 Prevent media eject on first open and re-enable ejection on last close.
The previous behavior was based on the lifetime of a "mount session"
which isn't very obvious.
1996-01-29 03:19:23 +00:00
Justin T. Gibbs 0fed413e64 Update copyright. 1996-01-29 03:18:20 +00:00
Justin T. Gibbs 65ed8cbd4e Kernel printf now returns int. 1996-01-29 03:18:05 +00:00
Justin T. Gibbs 4697fd511e Changes to support Performance enhancements in the sequencer.
Bring back the polling code (for dumps mostly), but protect it
with splbio() to make it safe for reprobes.
1996-01-29 03:17:39 +00:00
Justin T. Gibbs 4a1e5d799a Finally commit Serge's multicast and "misc other changes" patch. I
don't have a network to test it on here, but it does probe my card okay.

Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
1996-01-29 03:16:14 +00:00
Justin T. Gibbs b18d8f49f2 Another pass through eisaconf. Ioaddrs and Maddrs are link lists now.
The Bt driver is the only one that actually registers multiple addresses.

Probe output is formatted to 80 columns.
1996-01-29 03:13:23 +00:00
Justin T. Gibbs 5327d59536 Performance optimizations. Unroll all bcopies. Use PIO to transfer SCBs
since setting up the DMA is too costly.  Restructure for efficiency.

Pause the sequencer when a parity error occurs so that the kernel driver
knows during which phase the error was encountered.
1996-01-29 03:12:06 +00:00
John Dyson 4fd00d508b Fixed an uninitialized variable (argument to vm_map_find) -- problem
that DG detected, and promptly found a fix.
Submitted by:	davidg
1996-01-29 02:57:33 +00:00
John Dyson 89d1440458 Added sys_pipe into files. 1996-01-28 23:43:06 +00:00
John Dyson f982721359 Enable the new fast pipe code. The old pipes can be used with the
"OLD_PIPE" config option.
1996-01-28 23:41:40 +00:00
John Dyson 10c5615c1d Added new files to support the new fast pipes. After the follow-on
commits, pipe performance should increase significantly.  The pipe(2)
system call is currently supported, while fifofs will be added later.
1996-01-28 23:38:26 +00:00
Joerg Wunsch adb2fd2d93 Make worm.c compile with -Wall -Werror again.
. remove some unused variables
. declare worminit() right this time, it's actually extern (?)
. use wormminphys(), now that it's already there (hope i've got this right)
1996-01-28 23:33:23 +00:00
Julian Elischer 1c07bf3556 Submitted by: rich (which one?)
Another special case for probing multi-CD cdrom drives.

2nd try at this patch.
1996-01-28 22:41:44 +00:00
Garrett Wollman 5dec5a0060 Implement a prototype interface to bus-master IDE DMA on the Triton
chipset.  This does not attempt to do anything special with the timing
on the hope that the BIOS will have done the right thing already.  The
actual interface from the wd driver to the new facility is not
implemented yet (this commit being an attempt at prodding someone else
to do it because looking at the wd driver always confuses the h*** out of me).
1996-01-28 22:16:20 +00:00
Jordan K. Hubbard 93f4df92ad Back out the previous change. It's not correct for -current. 1996-01-28 21:51:57 +00:00
Jordan K. Hubbard b73daed8ca Add an entry for the "MBR-7", whatever that is.
Submitted by:	rich
1996-01-28 20:43:49 +00:00
Jordan K. Hubbard e2c0b0985f 3c590 driver for FreeBSD
Submitted by:	Frederick Earl Gray <fgray@owlnet.rice.edu>
1996-01-28 20:31:11 +00:00
John Dyson 44196d615f An earlier modification had decreased CPU usage, but also
decreased performance.  This essentially undoes that change.
1996-01-28 18:25:54 +00:00
Poul-Henning Kamp 02ae573ca8 make devfs_add_devswf a little smarter about '/'; 1996-01-28 10:07:55 +00:00
Poul-Henning Kamp 0c68712e02 Fix DEVFS, remove unused vars. 1996-01-28 10:02:38 +00:00
Joerg Wunsch 6e333abfc2 Minor but fatal spelling error when merging my code into -current.
Also declared worminit() to avoid a compiler warning.  Seems that the
other SCSI drivers don't declare XXinit() yet, so perhaps we'd also
create a typedef for these func's.
1996-01-28 09:56:04 +00:00
Bruce Evans 80f9be1460 Fixed dangling pointer bugs in DIOCSDINFO.
Enabled DEVFS support.  It doesn't work while devfs is mounted
(add_devfs_devsw() doesn't work then), but seems to be safe.
1996-01-28 08:15:44 +00:00
Rodney W. Grimes a7ba018ad1 Add missing ${DESTDIR} to afterinstall: target. 1996-01-27 23:57:06 +00:00
Garrett Wollman 31c5632840 Decode configuration for the IDE part of the Triton chipset. This
includes a hack in the probe code: the 82371FB is a multifuction
device, but doesn't properly set the configuration bit which
indicates this.  So, we just hard-wire all 82371FBs as multifunction
devices.

This does not actually make the bus-master IDE stuff work, although
if anyone wants to work on that, I have the databooks that tell
how to use it.
1996-01-27 20:14:32 +00:00
Joerg Wunsch b10fe1a96d Add <sys/wormio.h>, containing the declarations that are shared between
kernel and userland.
1996-01-27 17:49:47 +00:00
Joerg Wunsch 984afdcfd2 The Great Merge.
The worm driver is alpha-usable!  I've stuffed everything that is
needed into the kernel driver, including the logic to select
between different vendor's quirks.

Disclaimer: this has by now _only_ been tested on a heavily tweaked
2.0.5R system.  I've done my best to retrofit it into -current, but
i don't have a chance yet to test it in a -current environment.
1996-01-27 17:48:12 +00:00
Bruce Evans af4cb3a1c4 [Oops, forgot to commit this together with things that depend on it.]
First attempt at creating devfs entries for sliced devices.  Doesn't
quite work yet, so the heart of it is disabled.

Added bdev and cdev args to dsopen().

Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times.  DEVFS is #undefed at the start so
that this shouldn't cause problems.
1996-01-27 09:34:21 +00:00
Bruce Evans c8f2fe8db8 First attempt at creating devfs entries for sliced devices. Doesn't
quite work yet, so the heart of it is disabled.

Added bdev and cdev args to dsopen().

drivers:
Fixed device names, links, minor numbers and modes.

wd.c:
Started actually supporting devfs.

diskslice.h:
Added devfs tokens to structs (currently 576 of them per disk! :-().

subr_diskslice.c:
Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times.  DEVFS is #undefed at the start so
that this shouldn't cause problems.
1996-01-27 04:18:15 +00:00
Bruce Evans dd87702a51 Allocate DMA bounce buffers only when requested by drivers. Only the
fd and wt drivers need bounce buffers, so this normally saves 32K-1K
of kernel memory.

Keep track of which DMA channels are busy.  isa_dmadone() must now be
called when DMA has finished or been aborted.

Panic for unallocated and too-small (required) bounce buffers.

fd.c:
There will be new warnings about isa_dmadone() not being called after
DMA has been aborted.

sound/dmabuf.c:
isa_dmadone() needs more parameters than are available, so temporarily
use a new interface isa_dmadone_nobounce() to avoid having to worry
about panics for fake parameters.  Untested.
1996-01-27 02:33:48 +00:00
Bruce Evans e7973e6070 Declared new functions isa_dmainit() and isa_dmadone_nobounce().
Sorted and KNFised declarations.
1996-01-27 01:57:02 +00:00
Bruce Evans 227b8bf258 Cleaned up unused #includes and some other historical cruft.
Sorted and KNFised declarations.
1996-01-27 01:56:30 +00:00
Bruce Evans 6139755401 Fixed allocation of DMA buffers. The DMA bounce buffers were sometimes
overrun by 2 pages.

Fixed the (unused) values returned from device attach functions.

Fixed checking of unit number in device open functions - don't load bad
pointers or print error messages about the contents of bad pointers.

Removed unused #includes.

asc.c:
Fixed premature setting of flags in ascopen() - copied the better order
in gscopen().

gsc.c:
Fixed conflict handling for drq:
- fail the probe if the configured drq doesn't match the actual drq.
- set the configured drq to match the actual drq in the autoconfig case.

Reviewed by:	Nobody; authors didn't respond to mail.
1996-01-27 00:53:58 +00:00
Bruce Evans 324e9ed2a4 Added a `boundary' arg to vm_alloc_page_contig(). Previously the only
way to avoid crossing a 64K DMA boundary was to specify an alignment
greater than the size even when the alignment didn't matter, and for
sizes larger than a page, this reduced the chance of finding enough
contiguous pages.  E.g., allocations of 8K not crossing a 64K boundary
previously had to be allocated on 8K boundaries; now they can be
allocated on any 4K boundary except (64 * n + 60)K.

Fixed bugs in vm_alloc_page_contig():
- the last page wasn't allocated for sizes smaller than a page.
- failures of kmem_alloc_pageable() weren't handled.

Mutated vm_page_alloc_contig() to create a more convenient interface
named contigmalloc().  This is the same as the one in 1.1.5 except
it has `low' and `high' args, and the `alignment' and `boundary'
args are multipliers instead of masks.
1996-01-27 00:13:33 +00:00
Garrett Wollman 7c399a896a Delete the if_private[] array in struct ifnet; this turned out to be
of limited utility.  In their place, add bunch of pointers
which will eventually be needed by the polled-interrupt scheme we're working
here.  (It will probably be a while before the code is written and
committed here.)  At the same time, a `void *if_softc' field
was added to the beginning of the structure to make certain driver
writers happier.

The practical upshot of all this is that you need to
recompile utilities such as netstat which manipulate struct ifnet.
1996-01-26 22:09:54 +00:00
Poul-Henning Kamp 16cf781eed Fix a bug I made in the devfs. 1996-01-26 12:42:39 +00:00
Poul-Henning Kamp 18b7be4064 The last part of the ether_sprint -> %6D change.
Sorry for the delay.
(%D is for hexdumping.)
1996-01-26 09:29:29 +00:00
Joerg Wunsch 11b61c4563 Correctly initialize the `btprobing' variable. It's always been 0,
causing a bogus error message to appear if no board has been fond.
1996-01-25 23:03:07 +00:00
Joerg Wunsch e5bf458f52 Remove the "no board found at" message, ia rather similar message with
the same information is printed one line below by the generic isa code
anyway.
1996-01-25 23:00:42 +00:00
Garrett Wollman a8030f1496 Correctly identify the various parts of the Triton chipset. 1996-01-25 20:38:31 +00:00
Stefan Eßer e653d76e96 Add support for multi-function devices. 1996-01-25 18:32:00 +00:00
Andrey A. Chernov 887c00b859 Change RUKEYMAP sligtly 1996-01-25 16:37:20 +00:00
Poul-Henning Kamp e8cbe8fa47 Avoid local sprintfs and other printf'isms. 1996-01-25 07:21:50 +00:00
Poul-Henning Kamp 831e28a67a Make devfs_add_devfsf() which takes printf style args. 1996-01-25 07:17:31 +00:00
Poul-Henning Kamp f782b11a04 Don't use %r, we havn't got it anymore.
Submitted by: bde
1996-01-25 07:15:40 +00:00
Peter Wemm f863805df0 This time, really make the procfs work when reading stuff from the UPAGES.
This is a really ugly bandaid on the problem, but it works well enough for
'ps -u' to start working again.  The problem was caused by the user
address space shrinking by a little bit and the UPAGES being "cast off" to
become a seperate entity rather than being at the top of the process's
vmspace.  That optimization was part of John's most recent VM speedups.

Now, rather than decoding the VM space, it merely ensures the pages are
in core and accesses them the same way the ptrace(PT_READ_U..) code does,
ie: off the p->p_addr pointer.
1996-01-25 06:05:38 +00:00
Bruce Evans ad59a83d3e Fixed spelling of s_namlen so that this compiles again. 1996-01-25 00:45:37 +00:00
Bruce Evans bf124e256b Restored newline at the end of panic messages. 1996-01-25 00:17:22 +00:00
Poul-Henning Kamp 1ce9bf88c3 Use new printf features rather than local kludges. 1996-01-24 21:12:23 +00:00
Poul-Henning Kamp 120f078334 Remove %r hack, we have vprintf() now.
Add %D for "dumping" data.  Good for ethernet/MAC addresses and such.
Handle 1 < radix < 37.
1996-01-24 20:56:20 +00:00
Poul-Henning Kamp f0fb9bf18f Extend to handle all radix < 37 1996-01-24 20:51:26 +00:00
Garrett Wollman fde327d6ab Fix memory leak in case of adding a host route on top of another one.
Pointed-out-by:  Bill Fenner <fenner@parc.xerox.com>
1996-01-24 20:27:19 +00:00
Garrett Wollman 619a6d21a0 Disable $Log$ 1996-01-24 20:01:27 +00:00
Peter Wemm 3b60d376b9 Attempt to fix the procfs LKM after making some of the procfs
code shared with ptrace and "standard" in the config.
1996-01-24 19:34:49 +00:00
Mike Pritchard 97f1b9871e Add a check to prevent a computation from underflowing and causing
a panic due to an attaempt to allocate a buffer for a terabyte or
so of data when an attempt is made to create sparse data (e.g.
a holey file) more than 1 block past the end of the file.

Note:  some other areas of this code need to be looked at,
since they might cause problems when the file size exceeds 2GB,
due to storing results in ints when the computations are being
done with quad sized variables.

Reviewed by:	bde
1996-01-24 18:52:18 +00:00
Peter Wemm bf6024ee3a Add commands for ptrace get/set registers.. (Same numbers as NetBSD) 1996-01-24 18:51:48 +00:00
Peter Wemm 1530906921 procfs_machdep.c is now shared with ptrace as well. It is now no longer
optional.
1996-01-24 18:47:58 +00:00
Peter Wemm 9ef8f02df6 procfs_{mem|regs|fpregs}.c are now completely shared with ptrace(),
and are no longer optional.  This cuts down some code duplication.
1996-01-24 18:44:42 +00:00
Peter Wemm 0cc7521383 Major fixes for procfs..
Implement a "variable" directory structure. Files that do not make
sense for the given process do not "appear" and cannot be opened.
For example, "system" processes do not have "file", "regs" or "fpregs",
because they do not have a user area.

"attempt" to fill in the user area of a given process when it is being
accessed via /proc/pid/mem (the user struct is just after
VM_MAXUSER_ADDRESS in the process address space.)

Dont do IO to the U area while it's swapped, hold it in place if possible.

Lock off access to the "ctl" file if it's done a setuid like the other
pseudo-files in there.
1996-01-24 18:41:41 +00:00
Peter Wemm b0281cef04 Major fixes for ptrace()...
PT_ATTACH/PT_DETACH implemented now and fully operational.
PT_{GET|SET}{REGS|FPREFS} implemented now, using code shared with procfs
PT_{READ|WRITE}_{I|D} now uses code shared with procfs
ptrace opcodes now fully permission checked, including ownerships.
doing an operation to the u-area on a swapped process should no longer
panic.
running gdb as root works for me now, where it didn't before.
general cleanup..

Note, that this has some tightening of permissions/access checks etc.
Some of these may be going too far..  In particular, the "owner" of the
traced process is enforced.  The process that created or attached to
the traced process is now the only one that can "do" things to it.
1996-01-24 18:29:00 +00:00
Peter Wemm bf5bfe45ab proc.h: Add PHOLD()/PRELE() macros to ensure the U area is not swapped
while doing ptrace/procfs in it.
ptrace.h: uncomment PT_ATTACH/PT_DETACH, I am committing code to do this.
1996-01-24 18:11:23 +00:00
Joerg Wunsch 7a8a029a66 Hide the probe warnings behind `bootverbose'. 1996-01-23 22:55:08 +00:00
Stefan Eßer dd7610fca4 Make PCI interrupt handlers return void like everybody else does.
Reviewed by:	davidg
1996-01-23 21:48:28 +00:00
Garrett Wollman ac09ec5108 Spelling error: Busting -> Bursting. 1996-01-23 21:31:51 +00:00
Poul-Henning Kamp d7c0e66f38 Remove some now unused printfoids. 1996-01-23 21:17:59 +00:00
Garrett Wollman aacfda3486 Got the sense of the L1 cache enabled test wrong; fixed. 1996-01-23 20:36:49 +00:00
Garrett Wollman db4a5c0521 Add support for dumping the configuration of the Intel
82371FB PCI ISA IDE Xcellerator (sic) chip.  The IDE function
will not be done until Stefan tells me how to access it.
1996-01-23 20:21:24 +00:00
Bill Fenner 4dde4205e1 First piece of fixing ppp/proxy arp problem:
If an attempt to add a route fails because an "ARP table" entry is in
the way, remove the ARP entry and retry the add.

Reviewed by:	nate
1996-01-23 05:15:30 +00:00
David Greenman 2924d49169 Simplified savectx() a little and fixed a bug that caused it to return
garbage in the child process rather than "1" like it is supposed to.

Reviewed by:	bde
1996-01-23 02:39:24 +00:00
Garrett Wollman 71803c8ba9 Add register definitions for Intel 82437FX (Triton System Controller) 1996-01-22 22:43:48 +00:00
Poul-Henning Kamp b4b2f81ef3 bounds check the radix, just in case. 1996-01-22 13:21:33 +00:00
Mike Pritchard 86cfd0dd41 Changed the description of SIGSYS to better reflect what
it means when that signal is received.  Closes PR# 686.
1996-01-22 12:31:15 +00:00
Julian Elischer aaf0927a09 Obtained from: uthreads package 1996-01-22 00:32:08 +00:00
Julian Elischer f70177e76e Reviewed by: julian and (hsu?)
Submitted by:	 John Birrel(L?)

changes for threadsafe operations
1996-01-22 00:02:33 +00:00
Joerg Wunsch e66e939ed6 Initialize the cpu_class variable. This prevents i386 machines from
panicing with a privileged instruction fault early at boot time.
Submitted by:	rock@wurzelausix.CS.Uni-SB.DE (D. Rock)
1996-01-21 20:57:03 +00:00
Bruce Evans ad9c135ece Fixed the one remaining %r. 1996-01-21 19:18:46 +00:00
Poul-Henning Kamp ce723857c4 One missed printf in the debugger.
Found By: bde
1996-01-21 16:30:43 +00:00
Joerg Wunsch 85373d20b1 Implement an optional TIMEOUT value while entering the boot parameter
string.  This avoids indefinite hangs e.g. when used on a noisy serial
console.  It's not turned on by default.
1996-01-21 11:30:12 +00:00
Jordan K. Hubbard f8fbee91ae Newest version of the Matrox Meteor driver. Tested with various MBONE
tools and found to work better with both nv and vic.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-01-21 10:26:54 +00:00
Julian Elischer da798be901 Slightly improved debug messages for inserting new items 1996-01-21 09:43:31 +00:00
Julian Elischer b10669ebad oops.
get the last edit right
1996-01-21 09:07:58 +00:00
Julian Elischer 3daaa0c3bc Submitted by: Bruce Evans (bde)
better naming for  exported devfs function
and better place for the prototype
1996-01-21 09:03:15 +00:00
Bruce Evans 3d72f177f2 Removed last vestige of JREMOD. 1996-01-21 01:37:30 +00:00
John Dyson f69170e601 Previous commit to vfs_cluster accidentally disabled read-ahead. Problem
fixed by initializing "alreadyincore" to 0 in the case of
sequential reads.
1996-01-20 23:24:16 +00:00
Bruce Evans 9f29a57754 Removed stale #includes of "opt_sysvipc.h". 1996-01-20 21:36:31 +00:00
Joerg Wunsch 794b6a665f Fold in my latest changes to the worm driver.
This makes it sorta usable, just for my ``proof-of-concept'' Perl
script i've been posting to freebsd-scsi.  The driver will be
overhauled further, this is just to provide Jordan with a base to
perform testing of his own with his HP burner.  Use entirely at your
own risk, expect a bunch of misburnt CD-R's when using it already in
this very green stage.

Note that by now the driver will only work when the CD-R has already
been in the drive at boot time.
1996-01-20 15:27:36 +00:00
Joerg Wunsch e82d9e7eb5 Make the "uk" device usable again. The open() always failed due to an internal driver
design problem.
1996-01-20 15:05:55 +00:00
Nate Williams 4e5935064c Added a comment above the npx0 device line
# Mandatory, don't remove
1996-01-20 06:14:33 +00:00
Poul-Henning Kamp c92a064d21 Reinstate AUTO_EOI_1. This did break suspend/resume on some portables.
In particular mine.  We may want to make it a negative option to
keep GENERIC sane, ie NO_AUTO_EOI_1.
1996-01-19 23:38:07 +00:00
John Dyson 5327442589 Fixed vm_map_find for new vm changes. 1996-01-19 23:00:38 +00:00
John Dyson a4fc5c1a87 Fixed vm_map_find for new vm updates. 1996-01-19 22:59:24 +00:00
Poul-Henning Kamp ed71c34200 Imake %.*s really work. :-( 1996-01-19 21:05:52 +00:00
Stefan Eßer b23345605d Fix bad typo: > was used instead of >> ...
Submitted by:	Matt Thomas <matt@lkg.dec.com>
1996-01-19 19:03:47 +00:00
Stefan Eßer e66a4e401d Improve PCI probe messages by printing the bus number.
Add missing newline to PCI to PCI bridge message.

Submitted by:	Matt Thomas <matt@lkg.dec.com>
1996-01-19 19:01:19 +00:00
Peter Wemm 1a46737f84 Some trivial fixes to get it to compile again, plus some new lint:
- cpuclass should be cpu_class
- CPUCLASS_I386 should be CPUCLASS_386
(^^ those only show up if you compile for i386)
- two missing prototypes on new functions
- one missing static
1996-01-19 14:19:56 +00:00
Poul-Henning Kamp fe96d47d8e Make result of sprintf zero terminated. Fix %r for sprintf case. 1996-01-19 11:38:18 +00:00
Peter Wemm 34da58488d remove tcp_lastport - it has not been used for quite a while (at least
since the hashed pcb's I think).
1996-01-19 08:02:34 +00:00
Peter Wemm 101f9fc846 Change the default local address range for IP from 1024 through 5000
to 20000 through 30000.  These numbers are used for local IP port numbers
when an explicit address is not specified.

The values are sysctl modifiable under: net.inet.ip.port_{first|last}_auto

These numbers do not overlap with any known server addresses, without going
above 32768 which are "negative" on some other implementations.

20000 through 30000 is 2.5 times larger than the old range, but some have
suggested even that may not be enough... (gasp!)  Setting a low address
of 10000 should be plenty.. :-)
1996-01-19 08:00:58 +00:00
John Dyson bd7e5f992e Eliminated many redundant vm_map_lookup operations for vm_mmap.
Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish
	overhead for merged cache.
Efficiency improvement for vfs_cluster.  It used to do alot of redundant
	calls to cluster_rbuild.
Correct the ordering for vrele of .text and release of credentials.
Use the selective tlb update for 486/586/P6.
Numerous fixes to the size of objects allocated for files.  Additionally,
	fixes in the various pagers.
Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs.
Fixes in the swap pager for exhausted resources.  The pageout code
	will not as readily thrash.
Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into
	page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE),
	thereby improving efficiency of several routines.
Eliminate even more unnecessary vm_page_protect operations.
Significantly speed up process forks.
Make vm_object_page_clean more efficient, thereby eliminating the pause
	that happens every 30seconds.
Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the
	case of filesystems mounted async.
Fix a panic with busy pages when write clustering is done for non-VMIO
	buffers.
1996-01-19 04:00:31 +00:00
Bill Fenner 4840541232 Add definitions for ICMP router discovery.
Reviewed by:	wollman
1996-01-19 01:19:08 +00:00
Andrey A. Chernov d9983e87e7 Fix buffer sizes calculation looking into new Linux driver.
Save 112K for SB, 64K for PAS and 64K for MSS.
Since PAS use SB emulation, 176K normally saved for it.
Few minor optimizations added like in Linux driver.
1996-01-18 20:54:15 +00:00
Stefan Eßer 29681c973a Change default value of MAX_LUN from 1 to 8. 1996-01-18 19:59:23 +00:00
Poul-Henning Kamp 4f20e4b143 Make %.*s work. 1996-01-18 10:23:02 +00:00
Andras Olah 81165e4880 Be more conservative when T/TCP extensions are disabled. In particular,
do not send data and/or FIN on SYN segments in this case.
1996-01-17 09:35:23 +00:00
Andrey A. Chernov e4ff5c2aef Workaround missing interrupts - dma_reset on them (when timeout occurse).
When you start tracker and produce some heavy disk activity,
output interrupts becomes lost and I don't know how to solve it
finally. Newly added code at least allows recovery after timeout.
1996-01-17 05:43:38 +00:00
Poul-Henning Kamp 7c145fea92 Use the new & improved printf rather than homegrown kludges.
Proposed by: bde
1996-01-16 18:13:18 +00:00
Poul-Henning Kamp ab29fc2265 Remove local TRUE & FALSE definitions.
Fall into debugger on negative blk#.
1996-01-16 18:11:24 +00:00
Poul-Henning Kamp 505ae68ea8 Fix a printf, well, actually break it, that is...
We don't have the ability to print 64bit things yet...
1996-01-16 18:10:19 +00:00
Poul-Henning Kamp 4830092a53 Add support for %.{int|*}s 1996-01-16 18:08:57 +00:00
David Greenman c128d2157b Make sure the mountpoint is marked busy before doing operations on it.
This fixes a panic that freefall suffered last night.

Obtained partially from 4.4-lite2, but minus the new bug that it introduced
1996-01-16 13:07:14 +00:00
Andrey A. Chernov 5ce1b6a98e Small modification to my prev change:
1) set aborting flags for all signals because tsleep exited
not by timeout and not by wakeup.
2) Simplify expression.
1996-01-16 12:29:37 +00:00
Bruce Evans 6b3f80661e Moved BCD declarations to the correct header (libkern.h).
Fixed BCD declarations.  They didn't match their definitions...

libkern.h, bcd.c:
KNFised.  `indent' worked 99% perfectly on bcd.c.  It worked 99%
_imperfectly_ on subr_prf.c.
1996-01-16 10:23:22 +00:00
Andrey A. Chernov d352655d7e 1) Fix comments: 386bsd -> FreeBSD, some other wrong info.
2) Use CURSIG(curproc) in PROCESS_ABORTING instead of junk code was there.
3) Reanimate timeout code in DO_SLEEP by setting WK_TIMEOUT flag
   which is never set in old code.
4) DO_SLEEP: set aborting flag on interrupting singnals as supposed, not
   on signals which do nothing as in old code.
5) Cleanup WAKE_UP macro, WK_WAKEUP not used.
6) Remove wrong typecasts in sleep/wakeup code.
1996-01-16 10:19:23 +00:00
Bruce Evans 6ccb06d333 Removed declarations of nonexistent functions copyoutstr(), fuiword()
and suiword().  They are no longer referenced in the machine-independent
code (I think fuiword() and suiword() were only used by old versions of
ptrace(), and copyoutstr() by old versions of exec).

Added `const' where appropriate.

Changed u_int to size_t' where appropriate.

Named last arg of copystr() and copyinstr() better.
1996-01-16 09:57:25 +00:00
Bruce Evans e65a471221 Removed declarations of nonexistent functions. 1996-01-16 07:42:08 +00:00
Andrey A. Chernov d85314fa5f Since new bcd* macros not argument range overflow resistant,
fix argument overflow for years >= 2000
1996-01-16 06:35:40 +00:00
Andrey A. Chernov 2b20999cd6 sleep/wakeup macros was designed to do it on random address in the stack.
This random address can be matched (with some probability) with another
sleep addresses from other drivers, which can cause strange sleep/wakeup
sequence. Rewrite this ugly code to do the right thing.
1996-01-16 06:07:09 +00:00
Stefan Eßer a294c82acc Back out patch 1.53. The problem report that had made me commit this
change turned out to have been caused by some other change, and the
patch should have had no effect at all (just made the code a little
longer).
1996-01-15 23:51:10 +00:00
Stefan Eßer 01996055ed Disable handshake timeout. Some devices don't send an ACK for several
seconds ...

Submitted by:	wolf
1996-01-15 23:16:39 +00:00
Poul-Henning Kamp 791d77e0dd Get rid of two and a half printf in the kernel.
Add more features to the one remaining to handle the job:
	+	signed quantity.
	#	alternate format
	-	left padding
	*	read width as next arg.
	n	numeric in (argument specified) default radix.

Fix the DDB debugger to use these.
Use vprintf in debug routine in pcvt.

The warnings from gcc may become more wrong and  intolerable because
of this.

Warning:  I have not checked the entire source for unsupported or
changed constructs, but generally belive that there are only a few.

Suggested by: bde
1996-01-15 22:41:03 +00:00
Poul-Henning Kamp 3eb50b2edd My wife is busy making me a new conical hat, so you don't need to
send any to me this time.  Commited an old copy of this files where
the tables were swapped.  Duh!.
1996-01-15 21:26:43 +00:00
Poul-Henning Kamp e95fbcfeb4 Soren called an said that I screwed up badly, so I backup until
I find out how... Sorry.
1996-01-15 21:12:50 +00:00
Poul-Henning Kamp 22d1e589b8 Remove some unused vars, use new hex2ascii macro. 1996-01-15 16:15:27 +00:00
Poul-Henning Kamp 2898c294f4 Make bin2bcd and bcd2bin global macroes instead of having local
implementations all over the place.
1996-01-15 10:28:44 +00:00
David Greenman ae12cdda30 This driver really is for the Pro/100B and not for the Pro/100 (and in fact
doesn't even work with a Pro/100)...updated to reflect this.
1996-01-15 10:12:41 +00:00
Poul-Henning Kamp 77c17f5c65 Add the bcd <-> bin and hex -> ascii tables. 1996-01-15 10:03:49 +00:00
Stefan Eßer 85cf6e3f7e Make the NCR driver on the boot floppy kernel not negotiate synch. SCSI
transfers for CDROM drives.
1996-01-15 00:10:15 +00:00
Bruce Evans 337def8963 Fixed an overflowing multiplication in vnstrategy() by replacing it with
the standard macro dbtob().  The non-B_PAGING case now works well enough
to run newfs on a 32GB virtual drive.

Fixed numerous bogus variable types and one overflowing multiplication
in the B_PAGING case of vnstrategy().  Swapping to virtual drives larger
than 2GB might work now.
1996-01-14 20:32:14 +00:00
Bruce Evans 51ea8b57b8 Partially fixed negative and truncated "Avail" counts in df output.
This fixes PR943.

ffs/ffs_vfsops.c:
ffs_statfs() multiplied by (100 - minfree) as part of calculating the
minfree percentage (complemented in 100%), so with the standard minfree
of 8, it was broken for file systems of size >= 1TB/92 = 11GB.  Use the
standard freespace() macro instead.  This also fixes a rounding bug (the
"Avail" count was sometimes 1 too small).

ffs/* (not fixed):
The freespace() macro multiplies by minfree, so with the standard
minfree of 8, it is broken for file systems of size >= 1TB/8 = 128GB.
This bug is more serious since it affects block allocation.

ffs/ffs_alloc.c (not fixed):
Ordinary users are sometimes allowed to allocate 1 (partial) block
too many so that the "Avail" count goes negative.  E.g., if there is
1 fragment available and the file is fairly large, one more full
block is allocated.

df/df.c:
ufs_df() used/uses essentially the same code as ffs_statfs(), so it
had/has the same bugs.

ufs_df() gratuitously replaced "Avail" counts of < 0 by 0, so it
gave different results for non-mounted file systems in this case.
1996-01-14 18:55:09 +00:00
Joerg Wunsch f3bec209ec Bump the timeout in st_load() from 5 to 15 minutes. My Tandberg
TDC3620 takes 4.5 minutes to retenstion a QIC-250 cartridge, so the
5 minutes seem to be too tight.
1996-01-14 16:29:01 +00:00
Søren Schmidt 0de2e98fc2 Add linux_mknod so that it will do mkfifo if needed... 1996-01-14 10:59:58 +00:00
Justin T. Gibbs 581bb98709 Register our softc at attach time. I forgot to do this in my last commit,
causing a panic.
1996-01-14 02:19:42 +00:00
Poul-Henning Kamp 7c1156970a Document NFS_NOSERVER. 1996-01-13 23:30:10 +00:00
Poul-Henning Kamp 99cb299316 Add an option NFS_NOSERVER which saves 100K in the install kernel (or
any other kernel that uses it).  Use with option NFS.
1996-01-13 23:27:58 +00:00
Bruce Evans 56ee67a3ff Fixed renaming of private DEBUG macro. The previous revision missed
one case in asc.c and almost all cases in gsc.c.
1996-01-13 20:43:10 +00:00
Poul-Henning Kamp 994689822d Avoid bzero becomming a common symbol in all .o files. 1996-01-13 18:02:41 +00:00
Bruce Evans f668341de4 Fixed handling of Feb 29 in resettodr(). 1996-01-12 17:33:12 +00:00
Justin T. Gibbs d2c8692ad0 Take a different approach to the SPIORDY race condition. Simply clear
SPIORDY just before we ack on the bus so that there is no chance to
see SPIORDY for the same byte twice.

Make some small modifications so that the Linux aic7xxx driver can use
our sequencer and register definition files verbatum.
1996-01-11 06:17:49 +00:00
Stefan Eßer ad6ca346f2 Add back initialization of "ncrp[unit]" since ncrcontrol relies on it. 1996-01-10 21:20:57 +00:00
Andreas Schulz 5ccfdea260 Add the 3C595 as a supported device for vx0. Delete the rest of the line
for the vx0 device, it is not needed as for all other pci devices.
1996-01-09 23:14:57 +00:00
Andreas Schulz f1686c1ebc Add the pci-numbers for the 3c595 10/100Mb card to the driver. 1996-01-09 23:07:32 +00:00
Stefan Eßer 020bfdcff6 Add back nncr and ncrp for now. ncrcontrol relies on them.
(To be replaced by sysctl accesses some time ...)

Remove a backward jump from the NCR script, which allowed a SCSI target
to receive any number of NOP messages it desired. If a target indeed
does such a silly thing, make it fail at the next instruction, instead
of causing a timeout a few seconds later.
1996-01-09 19:57:49 +00:00