Commit Graph

3885 Commits

Author SHA1 Message Date
Julian Elischer cc6a66f20e Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by:	Mike Mitchell, supervisor@alb.asctmd.com

This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..

Mikes been using it for a year or so
but on 2.0

more changes and stuff will be merged in from other developers now that this is in.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
1995-10-26 20:31:59 +00:00
David Greenman 0d9a79f8a6 From Matt Thomas:
"I screwed the initialization of the burstsize.  Right now it will default
to 0 (which can cause corruption problems on high latency PCI buses).  It
should be set to 8 longwords to avoid problems with certain PCI chipsets."

Submitted by:	Matt Thomas <matt@lkg.dec.com>
1995-10-26 07:40:11 +00:00
Bruce Evans e2f15ca546 Fixed data loss in writes to pty masters. Data was almost always lost
at the end of each write for writes of more than 1K.

Fixed handling of residual count for early returns in writes to pty masters.
It was only adjusted in 2 out of 6 cases.

Added prototypes.
1995-10-25 18:23:58 +00:00
Bruce Evans 12bc45a8df Fix clist limits. They were usually one too low. E.g., for a limit of
TTYHOG = 1024 bytes, 10 cblocks were reserved.  This was thought to
provide 10 * CBSIZE = 1080 bytes of buffering, but if the head pointer
is at the end of a cblock, then it only provides 1 + 9 * CBSIZE = 973
bytes of buffering.  This caused serious data loss for ptys because the
flow control is deterministic and requires at least TTYHOG bytes of
buffering.  For ttys, if input flow control is used then there is
usually enough slop in the high watermark to avoid problems, and if
input flow control isn't used then a limit of 973 is not much different
from a limit of 1024.

Add prototypes.

Continue cleaning up new init stuff.
1995-10-25 17:59:58 +00:00
Jordan K. Hubbard 9720b0841f Stable matcd port to 0x230, as per request by Bruce and Frank.
Submitted by: Frank Durda IV <uhclem@fw.ast.com>
1995-10-25 16:43:01 +00:00
Jordan K. Hubbard d6393cdba3 Bring in version 1(26) - considerably less memory usage (and may bring us
down to 4MB bootability again).
Submitted by:	Frank Durda IV <uhclem@fw.ast.com>
1995-10-25 16:41:22 +00:00
Steven Wallace a5d49c1801 Add code to properly translate signal returned in status argument of wait4()
call for STOPPED and SIGNALED status (exit status identical).
1995-10-23 19:46:51 +00:00
Steven Wallace f23c6d682b Remove COMPAT_IBCS2 option.
Ibcs2 emulator no longer depends on owait() or any other hack to wait4().
1995-10-23 19:44:38 +00:00
Bruce Evans 8159bae9d0 Fix a sign extension bug that was unleashed by the previous change.
The total process time was sometimes 2^32 usec too large but that
wasn't a problem before because the time was bogusly truncated mod
2^32.
1995-10-23 19:05:50 +00:00
Andrey A. Chernov 76021f6637 Reset only one necessary LC_ variable 1995-10-23 18:51:29 +00:00
Bruce Evans 5fdb832498 Simplify the pseudo-argument removal changes by not optimizing for
the !COMPAT_43 case - use a common function even when there is no
`old' function.  The diffs for this are large because of code motion
to restore the function order to what it was before the pseudo-argument
changes.

Include <sys/sysproto.h> to get correct args structs and prototypes.
The diffs for this are large because the declarations of the args structs
were moved to become comments in the function headers.  The comments may
actually match the automatically generated declarations right now.

Add prototypes.
1995-10-23 15:42:12 +00:00
Poul-Henning Kamp 688444459d Fix a missing arg to untimeout. 1995-10-23 12:05:24 +00:00
John Dyson a91c5a7ecd Get rid of machine-dependent NBPG and replace with PAGE_SIZE. 1995-10-23 05:35:48 +00:00
John Dyson d559b36913 Remove of now unused PG_COPYONWRITE. 1995-10-23 04:29:39 +00:00
John Dyson ff02cd98f2 Removal of unnecessary usage of PG_COPYONWRITE. 1995-10-23 04:28:59 +00:00
Ugen J.S. Antsilevich 7934237885 Support all the tcpflag options in firewall.
Add reading options from file, now ipfw <filename> will
read commands string after string from file , form of strings
same as command line interface.
1995-10-23 03:58:06 +00:00
John Dyson e17bed1226 First phase of removing the PG_COPYONWRITE flag, and an architectural
cleanup of mapping files.
1995-10-23 03:49:43 +00:00
John Dyson cd0402ec7a Interface change for the VOP_GETPAGES -- missed in previous commits. 1995-10-23 02:55:55 +00:00
David Greenman 63017f04eb Remove PG_W bit setting in some cases where it should not be set.
Submitted by:	John Dyson <dyson>
1995-10-23 02:31:29 +00:00
John Dyson 2c4488fce3 Finalize GETPAGES layering scheme. Move the device GETPAGES
interface into specfs code.  No need at this point to modify the
PUTPAGES stuff except in the layered-type (NULL/UNION) filesystems.
1995-10-23 02:23:29 +00:00
David Greenman b596ee8d4e More improvements to the logic for modify-bit checking. Removed
pmap_prefault() code as we don't plan to use it at this point in time.

Submitted by:	John Dyson <dyson>
1995-10-23 00:47:10 +00:00
Poul-Henning Kamp e3965e5b67 Remove the last trace of arptnew() 1995-10-22 19:07:58 +00:00
Bruce Evans f668386c04 sio.c:
Fix the tests for being a console by reverting to the ones that
were used before the the RB_SERIAL changes.  RB_SERIAL only needs
to be tested in one place.  The initialization of comconsole was
wrong before the RB_SERIAL changes for the COMCONSOLE case.  This
may have been the cause of the unnecessary changes.

Start eliminating #includes of <i386/i386/cons.h>.  This header is
supposed to be included from <machine> although it should be
completely machine-independent and included from <sys>.

Remove a wrong XXX comment.  `comconsole' is used to test for being
a console and even the tests for deciding the default termios state
are necessary (the semi-reentrant i/o routines don't handle ordinary
device i/o).

cy.c:
Sync with sio.c.  The console tests are present but always fail.
1995-10-22 15:38:08 +00:00
Bruce Evans f9dd61a448 Only allow `sensitive' devices for displays in find_display(). This is
a quick fix for syscons deciding not to become the console because it
thinks another tty device has priority.
1995-10-22 15:07:43 +00:00
David Greenman 5344cc61f5 Fix order problem: unbusy pages before releasing the buffer.
Submitted by:	John Dyson <dyson>
1995-10-22 09:37:45 +00:00
David Greenman d68a41903e Moved the filesystem read-only check out of the syscalls and into the
filesystem layer, as was done in lite-2. Merged in some other cosmetic
changes while I was at it. Rewrote most of msdosfs_access() to be more
like ufs_access() and to include the FS read-only check.

Obtained from: partially from 4.4BSD-lite2
1995-10-22 09:32:48 +00:00
David Greenman 6928ec3330 Simplified some expressions. 1995-10-22 02:59:48 +00:00
Poul-Henning Kamp 7503109d24 Make a lot of things static. 1995-10-21 23:13:11 +00:00
Steven Wallace a8a9bde831 In bsd_to_ibcs2_sigaction(), flag for ibcs2 system should be
IBCS2_SA_NOCLDSTOP and not SA_NOCLDSTOP.

Submitted by:	 bde
1995-10-21 20:33:43 +00:00
Bruce Evans 725db531b8 Start including <sys/sysproto.h> to get the correct args structs and
prototypes for all syscalls.  The args structs are still declared in
comments as in VOP implementation functions.  I don't like the
duplication for this, but several more layers of changes are required
to get it right.  First we need to catch up with 4.4lite2, which uses
macros to handle struct padding.  Then we need to catch up with NetBSD,
which passes the args correctly (as void *).  Then we need to handle
varargs functions and struct padding better.  I think all the details
can be hidden in machine-generated functions so that the args structs
and verbose macros to reference them don't have to appear in the core
sources.

Add prototypes.

Add bogus casts to hide the evil type puns exposed by the previous
steps.  &uap[1] was used to get at the args after the first.  This
worked because only the first arg in *uap was declared.  This broke
when the machine- genenerated args struct declared all the args
(actually it declares extra args in some cases and depends on the
user stack having some accessible junk after the last arg, not to
mention the user args being on the stack.  It isn't possible to
declare a correct args struct for a varargs syscall).  The msgsys(),
semsys() and shmsys() syscall interfaces are BAD because they
multiplex several syscalls that have different types of args.
There was no reason to duplicate this sysv braindamage but now
we're stuck with it.  NetBSD has reimplemented the syscalls properly
as separate syscalls #220-231.

Declare static functions as static in both their prototype and their
implementation (the latter is optional, and this misfeature was used).

Remove gratuitous #includes.

Continue cleaning up new init stuff.
1995-10-21 19:50:00 +00:00
John Dyson 02c04a2f6c Implement mincore system call. 1995-10-21 17:42:28 +00:00
Bruce Evans bcee717be5 Avoid overflow in calcru(). Fixes PR 788.
Submitted by:	imdave@synet.net (Dave Bodenstab)
1995-10-21 09:18:45 +00:00
Peter Wemm 494850b8d1 Remove bogus #include <sys/device.h>, and the bogus instances of
"struct device" and the bogus unit number mentioned in the error message.
Some other minor cleanups, all trivial.
1995-10-21 09:10:49 +00:00
David Greenman 079cc25b11 Killed a few gratuitous #include's. 1995-10-21 08:38:13 +00:00
Steven Wallace 77d5b24bcb sigset() should have sa_flags cleared to sig is maked before calling
handler (remove SA_NODEFER).

On the other hand, signal() case should set sa_flags to SA_NODEFER as
in previous change.

In addition, added #ifdef'd code for signal() to or in SA_RESETHAND
flag for when that compatability is implemented.
1995-10-21 05:01:57 +00:00
David Greenman c1f8a6cefa Fix panic caused by PRU_CONTROL not being dealt with properly. Bug pointed
out by David Maltz <dmaltz@orval.mach.cs.cmu.edu>, but this fix is by me.
1995-10-21 02:12:20 +00:00
Poul-Henning Kamp b59d7f4673 A mixed bag of changes, relating to getting the state in "lsdev" right,
and pccard support to work sensibly.  Better by far, but still not good.
1995-10-21 00:55:36 +00:00
John Dyson 6d875bf526 If we clear the B_CACHE flag because a buffer isn't composed fully of
valid bytes, we must also clear the B_DONE flag.  Some filesystems
depend on this (incl NFS) and is probably the cause of the biodone
error and subsequent crash.  Anyway this change needs to be made.
1995-10-19 23:48:25 +00:00
David Greenman eed2d59b25 Fix initialization of "bsize" in vnode_pager_haspage(). It must happen
after the check for the mount point still existing or else the system
will panic if someone forcibly unmounted the filesystem.
1995-10-19 21:35:03 +00:00
Steven Wallace 3b493fe3e8 Use sa_flag option SA_NODEFER in sigsys() emulation because SVR3
does not automatically mask signal upon delivery.
1995-10-19 19:20:17 +00:00
Steven Wallace 1e41c1b5d5 Implement SA_NODEFER sa_flag for sigaction():
Add SA_NODEFER define to signal.h
	Add ps_nodefer field to struct sigacts in signalvar.h.
	Add code to kern_sig.c to handle SA_NODEFER.

If flag is set, when the signal is delivered, it is not masked automatically
from receiving the same signal again.

Reviewed by:	 wollman, bde
1995-10-19 19:16:01 +00:00
Stefan Eßer 2e80ea0536 Make CONF1_ENABLE_MSK1 even less restriktive: Ignore slot ID ... 1995-10-17 23:30:11 +00:00
Stefan Eßer 0e2f699b9e At least the ASUS Triton motherboards don't disable the PCI bus configuration
accesses after the BIOS bus scan. The previous revision made the assumption,
that every PCI motherboard did ...

Change the test on the initial value of the CONF1_ADDR_PORT register in a way
that makes the probe succeed on triton based motherboards, without breaking
the EISA motherboard that has some non-PCI register at the same address.
1995-10-17 15:23:14 +00:00
Garrett Wollman 3ba6426d14 Change signature of rt->rt_output() so that it is compatible with
ifp->if_output() functions.  This way, initial implementations of
rt_output functionality can just lazily use if_output until customized
versions are written.
1995-10-16 20:53:55 +00:00
Garrett Wollman aca1a47cb4 When adding a route fails because there is already a route with the same
(mask,value) in the tree, don't immediately return EEXIST.  Instead, check
to see if the pre-existing route was generated by protcol-cloning.  If so,
then it is OK to simply blow away the old route and re-attempt the insertion.
If not, then fall back to the same error code as before.
1995-10-16 19:09:40 +00:00
Garrett Wollman 3d1f141b23 The ability to administratively change the MTU of an interface presents
a few new wrinkles for MTU discovery which tcp_output() had better
be prepared to handle.  ip_output() is also modified to do something
helpful in this case, since it has already calculated the information
we need.
1995-10-16 18:21:26 +00:00
Steven Wallace 473fbdbe96 Add a hack to emulator to emulat spx device for local X connections.
This is truly a hack.  The idea is taken from the Linux ibcs2 emulator.

To use this feature, you must use the option,
	options		SPX_HACK
in your config.

Also, in /compat/ibcs2/dev, you must do:

lrwxr-xr-x  1 root  wheel         9 Oct 15 22:20 X0R@ -> /dev/null
lrwxr-xr-x  1 root  wheel         7 Oct 15 22:20 nfsd@ -> socksys
lrwxr-xr-x  1 root  wheel         9 Oct 15 22:20 socksys@ -> /dev/null
crw-rw-rw-  1 root  wheel   41,   1 Oct 15 22:14 spx

Do NOT use old socksys driver as that has been removed.
This hack needs /compat/ibcs2/dev/spx to be any device that does NOT
exist/configured (so the now non-existant spx major/minor works fine).
When an open() is called, the error ENXIO is checked and then the
path is checked.  If spx open detected, then a unix socket is opened
to the hardcoded path "/tmp/.X11-unix/X0".

As the Linux hacker author mentioned, the real way would be to detect
the getmsg/putmsg through /dev/X0R and /dev/spx.  Until this true
solution is implemented (if ever), I think this hack is important
enough to be put into the tree, even though I don't like it dirtying
up my clean code (which is what #ifdef SPX_HACK is for).
1995-10-16 05:52:55 +00:00
John Dyson 0bc3a91127 Remove an unnecessary tsleep in the swapin code. This tsleep
can defer swapping in processes and is just not the right thing to do.
1995-10-16 05:45:49 +00:00
Steven Wallace 30f4c3423d Do a better fake for uname information returned in utssys() call.
Currently, the emulator defaults to returning "FreeBSD" as the system
name, release "3.2", and version "2.0".  Some programs want to make
sure they are on a SYSV 3.2 system and check for 3.X release number.

Use the following defines to override the defaults:
	IBCS2_UNAME_SYSNAME
	IBCS2_UNAME_RELEASE
	IBCS2_UNAME_VERSION
(should be string)
for system name, release, and version, respectively.  This allows
someone to compile the emulator into the kernel so it can pretend
to be a specific system if needed.
1995-10-16 05:32:20 +00:00
Stefan Eßer 287911bd50 Go back to separate tests for configuration mechanism 1 and mechanism 2.
Require the state of the configuration enable bits to be OFF assuming
that the BIOS left them that way, as it should anyway to avoid bad things
to happen.

The tests themselves are copied from the previous release, with the
exception of CONF1_ENABLE_MSK1 having the LSB set. This bit should be
read back as '0', since only DWORD addresses are legal.
1995-10-15 23:43:08 +00:00