Commit graph

3797 commits

Author SHA1 Message Date
Steven Wallace c3e5be204b Remove the ugly COMPAT_IBCS2 hack to hide a return value through
magic numbers.  The new socksys support does not need this hack.

I am against any magic practicing.
1995-10-10 08:08:54 +00:00
Steven Wallace 6a461b22ae Update files list to include new ibcs2 files needed to compile. 1995-10-10 08:04:10 +00:00
Bruce Evans 744500cdd9 Fix benign type mismatches in devswitch functions.
Add prototypes.
Clean up includes.
1995-10-10 08:03:26 +00:00
Steven Wallace 9e03db613c Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code.  The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.

Features of this new emulator system include:

 o  "clean" code, including strict prototyping.
 o  Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls.  Generation includes system tables, structure definitions,
and prototyping of function calls.
 o  ibcs2 emulator does not rely on any COMPAT_43 system calls.
 o  embedded socksys support
 o  ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
 o  alternate /emul/ibcs2 namespace searched first for files in ibcs2
system.  Usefull to keep sysv libraries, binaries in /emul/ibcs2.
 o  many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
Steven Wallace 3e174373d3 This commit was generated by cvs2svn to compensate for changes in r11394,
which included commits to RCS files with non-trunk default branches.
1995-10-10 07:27:24 +00:00
Steven Wallace 234cc877a2 Import of original NetBSD's ibcs2 emulator sources by Scott Bartram,
which is used as a basis for a more complete and cleaner ibcs2 emulator.
(snapshot about May 1995 with a few files from September 1995)

Some files and code from old emulator still remains.
New files, features, and changes have been implemented by myself,
which will be shown in following commits.
1995-10-10 07:27:24 +00:00
Julian Elischer 2279703911 almost entirely cosmetic changes
just keeping the sources in sync with my own set..
1995-10-10 07:12:27 +00:00
Bruce Evans e2bcd47d12 Remove bogus includes that became fatal after the previous (intended to
be cosmetic?) commit.
1995-10-10 05:41:39 +00:00
Bruce Evans 288417bef0 Fix TCP_DEBUG support so that LINT compiles again (deReiserize). 1995-10-10 05:23:17 +00:00
Bruce Evans 668bfdc286 Include <sys/sysproto.h> so that machdep.c compiles cleanly again
(the prototype for sync() moved).

KNFize and otherwise clean up printing of BIOS geometries.

Add prototypes.

Continue cleaning up new init stuff.
1995-10-10 05:05:28 +00:00
Bruce Evans 65e8111ff0 Update comment and config for cy driver.
Extend test coverage:
Add and enable undocumented options TCPDEBUG, COMPAT_LINUX and IBCS2.
Add but disable (broken) pseudo device tb.
Add and enable pseudo devices su, ssc.
Add but disable (broken) devices sscape0, trix0.
Add and enable device bqu0.
1995-10-10 04:03:12 +00:00
Stefan Eßer c7483249e7 Fix bad typo: CONF1_ENABLE_RES1 was written CONF1_ENABLE_CHK1 ... 1995-10-09 21:56:24 +00:00
Joerg Wunsch b629f8ebbe Some bug fixes for the worm driver:
o  don't use polled mode after the device probe phase
o  don't biodone() a NULL buffer pointer
o  increase the timeout for scsi_read_capacity(); WORMs are slooow
o  make WORMMs known to scsiconf at all

This brings the driver in a state where it at least doesn't
immediately panic, nor hangs the controller any more.  Unfortunately,
at least the YAMAHA CDR100 i've been testing with answered my write
attempts with an "Incorrect command sequence" response.  Perhaps other
CD burners might work however.

Reviewed by:	dufault
1995-10-09 15:15:01 +00:00
Joerg Wunsch 86a727d96d BIOS manufacturers don't seem to have a unique idea about 2.88 MB
floppy drive types in the CMOS; add 0x50 as an alias for 2.88 MB.
1995-10-09 15:00:39 +00:00
David Greenman c79867680a Include <sys/systm.h> 1995-10-09 05:54:32 +00:00
Bruce Evans 029b0fc88f Fix tracing of syscalls. The previous fix required the undocumented
option DDB_NO_LCALLS to stop ddb getting control and broke all ddb
tracing.  Now there is no option and no way for ddb to trace at
address _Xsyscall or to _Xsyscall, but tracing everywhere else
works.  The previous fix did unnecessary things for Linux syscalls.

Don't bother checking that syscall frames are for user mode.

Make debugger traps inside the kernel (except at addresses _Xsyscall
and _Xsyscall+1) fatal if ddb is not configured.  They "can't happen".

Add prototypes.

Remove stupid comments, e.g., /*ARGSUSED*/ for args that are used.
1995-10-09 04:36:01 +00:00
Bruce Evans 4ab32c3430 Fix types of sysctl functions. Add prototypes. Cosmetic. 1995-10-09 04:06:28 +00:00
John Dyson f4a73b85ed Work-around a problem in the clustering code on non-VMIO buffers. The
write-side needs rewriting, but this makes a ktrace panic go away for
now.
1995-10-09 03:19:49 +00:00
Justin T. Gibbs eec7e07a40 Identify the 2940 *Ultra* SCSI adapter. We treat it as a normal 2940
for now since I don't have any documentation on this card yet and it
is software compatible with the earlier cards.

The 2940 *Ultra* is Adaptec's push to take SCSI to 20MHz bus rates.  Its
based on the aic7880 chip which is the successor to the aic7870.
1995-10-08 17:46:11 +00:00
Steven Wallace ab91e8eff2 Add #include <sys/sysproto.h> to get struct close_args and close
function prototype.
1995-10-08 00:09:00 +00:00
Steven Wallace ad7507e248 Remove prototype definitions from <sys/systm.h>.
Prototypes are located in <sys/sysproto.h>.

Add appropriate #include <sys/sysproto.h> to files that needed
protos from systm.h.

Add structure definitions to appropriate files that relied on sys/systm.h,
right before system call definition, as in the rest of the kernel source.

In kern_prot.c, instead of using the dummy structure "args", create
individual dummy structures named <syscall>_args.  This makes
life easier for prototype generation.
1995-10-08 00:06:22 +00:00
Steven Wallace 4170ff3e27 Update sysproto.h to reflect changes. 1995-10-07 23:57:04 +00:00
Steven Wallace a932a33de3 Fix misc formatting errors in makesyscalls.sh.
Add CPT_NOA type which is COMPAT with NOARGS -- do not produce argument
struct in sysproto.

Change accept, recvfrom, getsockname to CPT_NOA type.
Fix getrlimit, setrlimit argument #2 name to struct rlimit.
1995-10-07 23:56:20 +00:00
Steven Wallace 58440970f8 Remove compat int from wait_args structure since no longer used or desired. 1995-10-07 23:48:07 +00:00
Steven Wallace 93c9414e49 Remove compat_43 psuedo-argument hack, and replace with a better hack.
Instead of using a fake "compat" argument, pass a real compat int to function
if COMPAT_43 is defined.  Functions involved: wait4, accept, recvfrom,
getsockname.

With the compat psuedo-argument, this introduces an argument structure
that can have two possible sizes depending on compat options.
This makes life difficult for lkm modules like ibcs2, which would
have to guess what size used in kernel when compiled.  Also,
the prototype generator for these structures cannot generate proper sizes.

Now there is only one fixed structure and makes everybody happy.

I recommend these changes be introduced to 2.1 so that ibcs2, linux
lkm's generated for 2.2 can still run on a 2.1 kernel.
1995-10-07 23:47:26 +00:00
David Greenman aacd778ef0 Add SIOCGIFADDR support. 1995-10-07 20:34:30 +00:00
Bruce Evans c402cd1545 Restore my changes from revisions 1.8, 1.9 and 1.10. They were blown away
be the previous commit.  It didn't even compile.
1995-10-07 20:07:18 +00:00
David Greenman cd41fc123e Fix argument passing to the "freeer" routine. Added some prototypes. (bde)
Moved extern declaration of swap_pager_full into swap_pager.h and out of
the various files that reference it. (davidg)

Submitted by:	bde & davidg
1995-10-07 19:02:56 +00:00
Bruce Evans 821692d618 Return EINVAL instead of panicing for rename("dir1", "dir2/..").
Fixes part of PR 760.

This bug seems to be very old.
1995-10-07 10:14:12 +00:00
Steven Wallace 4887ee51b2 Remake generated files to reflect makesyscalls.sh changes 1995-10-07 06:29:30 +00:00
Steven Wallace f171307e84 Add new functionality to makesyscalls.sh:
o  optional config-file to set vars: sysnames, sysproto, sysproto_h,
	syshdr, syssw, syshide, syscallprefix, switchname, namesname, sysvec.
  o  change syntax of syscalls.master entry:
	remove argument count.
	add pseudo-prototype field defining function name and arguments.
  o  generates correct structure definitions for all system calls
	in sys/sysproto.h
  o  add type NOARGS:  same as STD except do not create structure in
	sys/sysproto.h
  o  add type NOPROTO:  same as STD except do not create structure or function
	prototype in sys/sysproto.h

New functionality provides complete prototype definitions.
Usefull for generating files for emulated systems like my new ibcs2 code.

Update syscalls.master to reflect new changes.  For example, read()
entry now looks like:

3	STD	POSIX	{ int ibcs2_read(int fd, char *buf, u_int nbytes); }

This is similar to how NetBSD generates these files.
1995-10-07 06:24:08 +00:00
Garrett Wollman 1cb55cbffc Put newline at end of log()ed messages so syslog can't fill up your
/var quite as fast.
1995-10-06 19:30:43 +00:00
Poul-Henning Kamp b49afdd5c4 use roundup2 to avoid a bunch of 64bit divides. 1995-10-06 09:56:51 +00:00
Poul-Henning Kamp 1784a84a1f Add roundup2(x,y) for when y is a power of two. 1995-10-06 09:56:26 +00:00
Poul-Henning Kamp b67501dcda Avoid some 64bit divides. 1995-10-06 09:47:58 +00:00
Poul-Henning Kamp e83e1865c0 A little hack to avoid a 64bit divide. Can go away if Gcc ever learns to
optimise 64bit stuff...
1995-10-06 09:43:32 +00:00
Poul-Henning Kamp a5eb0e27e4 Avoid a 64bit divide. 1995-10-06 09:42:11 +00:00
Jordan K. Hubbard 2bcff10177 matcd -> matcdc 1995-10-06 05:36:51 +00:00
Peter Wemm c196603b4d Part 2 of the overlapping kzip changes.
Submitted by:	Gary Jones(?) <gj@freefall>
1995-10-06 02:57:26 +00:00
Poul-Henning Kamp e8413d1db1 Make the netboot more tolerant about the config file. 1995-10-05 20:51:39 +00:00
Garrett Wollman 66800f5742 Convert ARP to use queue.h macros rather than insque/remque. While
we're at it, eliminate obsolete exposure of `struct llinfo_arp' to
the world.  (This dates back to when ARP entries were not stored in
the routing table, and there was no other way for the `arp' program
to read the whole table than to grovel around in /dev/kmem.)
1995-10-05 20:08:43 +00:00
Poul-Henning Kamp 16657f0ba9 Comment out, but don't delete stuff we don't use.
Classify in "gcc stuff" and "legitimate stuff".
1995-10-05 14:46:07 +00:00
Poul-Henning Kamp 92a69bc337 remove GCC divsi3 routines which are never used. 1995-10-05 10:32:47 +00:00
Jordan K. Hubbard 429e99f1d2 Change kernel name to make a more unique target for sed. 1995-10-05 04:34:30 +00:00
David Greenman edeea08413 1) Fixed irq logic so that it uses the kernel configured irq if it doesn't
match the board setting.
2) Fixed the warning message to properly print the irq mismatch (as opposed
   to the bit encoded value).
3) Add irq autodetection if the kernel has "?" or no irq specified.
4) Add missing splimp protection in ixioctl().
1995-10-05 03:01:13 +00:00
Bruce Evans f2caf6f548 Fix pollution of application namespace by declarations of kernel
functions.  The application header <sys/user.h> includes <vm/vm.h>
which includes <vm/lock.h>...

vm.h:
Don't include <machine/cpufunc.h>.  It is already included by
<sys/systm.h> in the kernel and isn't designed to be included by
applications (the 2.1 version causes a syntax error in C++ and the
current version has initializers that are invalid in strict C++).

lock.h:
Only declare kernel functions if KERNEL is defined.
1995-10-05 01:11:48 +00:00
Bruce Evans 9cdeffd562 Don't wait for output to drain in pppclose(). Discard output immediately
for the same reasons as in slclose().

Free the cblock in the canonical queue in pppclose().  This is a no-op in
the usual cases where the tty is being closed or the line discipline is
being switched back to the standard discipline, but it saves a cblock if
the line discipline is being switched to one that doesn't use the canonical
queue.

Add prototypes.  I use `extern' in prototypes for functions with bogus
linkage.  This should be fixed someday.

Continue cleaning up new init stuff yet again.
1995-10-05 00:33:27 +00:00
Jordan K. Hubbard 9e8433e6e0 This upgrades the driver for Cronyx-Sigma multiplexor boards
from version 1.2 to version 1.9.
Submitted by:	Serge Vakulenko, <vak@cronyx.ru>
1995-10-04 22:24:16 +00:00
Jordan K. Hubbard 1d8812734b I have applied my last changes correcting the bug in dgbselect() to it
and here is the patch.  Submit it please. Thank you!

BTW, there is a new option "NDGBPORTS". By default it is equal to
NDGB*16 and means the number of ports of all Digiboards for which the
tty structures are reserved. It can be set to the real value in config-file
like:

       options "NDGBPORTS=8"
Submitted by:	Serge A. Babkin <babkin@hq.icb.chel.su>
1995-10-04 21:51:26 +00:00
Garrett Wollman 6bb9a8e77d Make a whole bunch of PCB variables ints rather than shorts. There appear
to be no ill effects, and so far as Iknow none of the variables in
question depend on 16-bit wraparound behavior.  (The sizes are in
many cases relics from when a PCB had to fit inside a 128-byte mbuf.  PCBs
are no longer stored in that way, and the old structure would not have
fit, either.)
1995-10-04 20:49:03 +00:00