Commit Graph

5109 Commits

Author SHA1 Message Date
Jeffrey Hsu
714f4ec3ef Merge in Lite2: use fixed-width types.
Reviewed by:	davidg & bde
1996-03-11 02:15:32 +00:00
Jeffrey Hsu
1fed30f4b3 Merge in Lite2: use fixed-width types
add POSIX compatibility
		add union fs defines
Reviewed by:	davidg & bde
1996-03-11 02:15:04 +00:00
Jeffrey Hsu
83edfd3e32 Merge in Lite2: fix comment
optimize TAILQ_INSERT_HEAD
Reviewed by:	davidg & bde
1996-03-11 02:14:38 +00:00
Jeffrey Hsu
d6c32e1b47 Merge in Lite2: clean up casts for architectures where the size of addresses
are bigger than the size of ints
		add function prototypes
		reorder some fields
Did not add prototype for m_reclaim().  It's only used in kern/uipc_mbuf.c and
  is declared static there.
Reviewed by:	davidg & bde
1996-03-11 02:14:16 +00:00
Jeffrey Hsu
269f85f0de Merge in Lite2: stylistic changes to function prototypes
add comments
Did not accept change of second argument of ioctl prototype from int to u_long.
Did not merge in changes to fields in bdevsw and cdevsw.
Reviewed by:	davidg & bde
1996-03-11 02:13:32 +00:00
Jeffrey Hsu
eebc15be3a Merge in Lite2: add function prototypes.
Did not accept prototypes for unp_attach(), unp_bind(), unp_connect(),
  unp_detach(), unp_discard(), unp_disconnect(), unp_drop(),
  np_gc(), unp_mark(), unp_scan(), and unp_shutdown().
They are used only in uipc_usrreq.c and declared static there.
Reviewed by:	davidg & bde
1996-03-11 02:12:57 +00:00
Jeffrey Hsu
32a8159d72 Merge in Lite2: change manifest constant values for NOCRED and FSCRED
stylistic changes to function prototypes
Reviewed by:	davidg & bde
1996-03-11 02:11:48 +00:00
Jeffrey Hsu
886556be00 Merge in Lite2: make timespec struct POSIX.4 compliant
stylistic changes to function prototypes
Reviewed by:	davidg & bde
1996-03-11 02:11:25 +00:00
Jeffrey Hsu
d3fa736431 Merge in Lite2: no changes necessary. Just update CSRG id.
Reviewed by:	davidg & bde
1996-03-11 02:10:41 +00:00
Jeffrey Hsu
5664af0189 Merge in Lite2: use fixed-width types.
Reviewed by:	davidg & bde
1996-03-11 02:10:14 +00:00
Jeffrey Hsu
1061e94f8b Merge in Lite2: remove u_long cast from B_MAGICMASK and B_DEVMAGIC
cosmetic changes to comments and number formatting
Reviewed by:	davidg & bde
1996-03-11 02:09:55 +00:00
Jeffrey Hsu
0bf8ba0417 Merge in Lite2: bump BSD date from 199306 to 199506.
Reviewed by:	davidg & bde
1996-03-11 02:09:24 +00:00
Jeffrey Hsu
5837ef4675 Merge in Lite2: sync up comments.
Reviewed by:	davidg & bde
1996-03-11 02:09:09 +00:00
Jeffrey Hsu
88c4de5e7c Merge in Lite2: resolve manifest constant numbering in favor of least
required changes and also add parentheses around BUCKETINDX macro body.
Reviewed by:	davidg & bde
1996-03-11 02:08:50 +00:00
Jeffrey Hsu
d0e1c7855e Merge in Lite2: only update CSRG id---the one change made in Lite2
to move the key_t typedef to types.h has already been made in a
    previous commit.
Reviewed by:	davidg & bde
1996-03-11 02:08:16 +00:00
Jeffrey Hsu
9485dc6080 Merge in Lite2: use fixed-width types.
Reviewed by: davidg & bde
1996-03-11 02:07:37 +00:00
Jeffrey Hsu
5bc24578ca Merge in Lite2: use fixed-width types and reformat comments.
Reviewed by:	davidg & bde
1996-03-11 02:06:30 +00:00
Jeffrey Hsu
0ab2567421 Merge in Lite2: use fixed-width types and add whiteout file type.
Reviewed by: davidg & bde
1996-03-11 02:05:52 +00:00
Jeffrey Hsu
0f21b147b2 Merge in Lite2: rename B_APPENDWRITE to B_NEEDCOMMIT.
The other change to b_pfcent is no longer pertinent, since we've
  deleted that field.
Reviewed by: davidg & bde
1996-03-11 02:04:27 +00:00
Jeffrey Hsu
eed665fc21 Merge in Lite2: fix typo in comment.
Reviewed by: davidg & bde
1996-03-11 02:03:11 +00:00
Peter Wemm
250c11f9c3 Tweak the data/bss segment page count. The last version worked
with all the test cases I tried, I'm sure this is more correct.

Tweak some prototypes.
1996-03-10 23:44:40 +00:00
Peter Wemm
0946c36c96 Fix the vm_map_remove and vm_map_protect calls.. Somewhere along the
line, these had got (start, length) arguments instead of (start, end)
args.  This could be the cause of Robert Sanders lockups with ZMAGIC
binaries.
1996-03-10 23:25:17 +00:00
John Dyson
874308f7c2 Improved efficiency in pmap_remove, and also remove some of the pmap_update
optimizations that were probably incorrect.
1996-03-10 23:06:00 +00:00
Peter Wemm
f07101317f linux_interp now moved into sys/i386/linux/linux_sysvec.c, but still
connected at load and unload time from here.
1996-03-10 22:43:37 +00:00
Peter Wemm
5cf588eb8b Move the elf linux_interp structure from the lkm stub to here so that it
can be referenced when the linux emulator is statically compiled into the
kernel.
1996-03-10 22:42:16 +00:00
Peter Wemm
8191d577aa Fix some rounding problems.. In some (fairly rare) situtaions it mapped
one page too many, which caused obreak() to fail in vm_map_find() with
ENOMEM because of the conflicting page.
1996-03-10 22:37:34 +00:00
Peter Wemm
9c5ee42327 Implement rudumentry support for the linux TIOC[SG]ETSERIAL ioctl's.
To complete this, some extra state has to be kept somewhere so that the
B38400 flag in Linux can be correctly translated to/from either 38400,
57600 or 115200.

Submitted by: Robert Sanders <rsanders@mindspring.com>
1996-03-10 22:30:53 +00:00
Peter Wemm
6bc7cb8b3f Fix the getdents() emulation, the Linux ELF libraries use this, and
this code was not quite right (linux has a readdir and getdents syscall,
with the same args. readdir only returns one entry and uses a mutant
dirent structure.  This code was also returning the mutant form for
getdents as well.  My fault for missing this before.)
1996-03-10 22:27:51 +00:00
Peter Wemm
b766761288 Fix a (mostly harmless) bogon when calculating the start of the stack gap. 1996-03-10 22:24:54 +00:00
Peter Wemm
fd2289e5c3 Fix a (mostly harmless) bogon when allocating space above the stack
in the stack gap..
1996-03-10 22:23:51 +00:00
David Greenman
83bf11d386 More missing int32 -> int32_t... 1996-03-10 18:33:43 +00:00
David Greenman
a6409dd7a8 Fixed some missing int32 -> int32_t 1996-03-10 18:17:54 +00:00
Jordan K. Hubbard
f8decb67c4 u_int8 -> u_int8_t 1996-03-10 12:52:47 +00:00
Søren Schmidt
e1743d02cd First attempt at FreeBSD & Linux ELF support.
Compile and link a new kernel, that will give native ELF support, and
provide the hooks for other ELF interpreters as well.

To make native ELF binaries use John Polstras elf-kit-1.0.1..
For the time being also use his ld-elf.so.1 and put it in
/usr/libexec.

The Linux emulator has been enhanced to also run ELF binaries, it
is however in its very first incarnation.
Just get some Linux ELF libs (Slackware-3.0) and put them in the
prober place (/compat/linux/...).
I've ben able to run all the Slackware-3.0 binaries I've tried
so far.
(No it won't run quake yet :)
1996-03-10 08:42:54 +00:00
Justin T. Gibbs
9932c050b9 Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.
1996-03-10 07:13:15 +00:00
Justin T. Gibbs
100eb37c65 aic7870.c, ncr.c:
Cleanse the SCSI subsystem of its internally defined types
	u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.

aic7870.c:
	Handle Seeprom data a little better.
1996-03-10 07:12:49 +00:00
Justin T. Gibbs
9dfa2063d5 bt.c, aic7xxx.c:
Cleanse the SCSI subsystem of its internally defined types
	u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.

aic7xxx.c:
	Fix the reset code.
	Instead of queing up all of the SCBs that timeout during timeout
	processing, we take the first and have it champion the effort.
	Any other scbs that timeout during timeout handling are given
	another lifetime to complete in the hopes that once timeout
	handing is finished, they will complete normally.  If one of
	these SCBs times out a second time, we panic and Justin tries
	again.

	The other major change is to queue flag aborted SCBs during timeout
	handling, and "ahc_done" them all at once as soon as we have the
	controller back into a sane state.  Calling ahc_done any earlier
	will cause the SCSI subsystem to toss the command right back at
	us and the attempt to queue the command will conflict with what
	the timeout routine is trying to accomplish.

	The aic7xxx driver will now respond to bus resets initiated by
	other devices.
1996-03-10 07:11:45 +00:00
Justin T. Gibbs
58a8ca6a4d Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.
1996-03-10 07:04:48 +00:00
Justin T. Gibbs
e4f25ddc16 aha1742.c:
Cleanse the SCSI subsystem of its internally defined types
		u_int32, u_int16, u_int8, int32, int16, int8.
		Use the system defined *_t types instead.

eisaconf.c:
	Cosmetic formatting chagnes.
1996-03-10 07:04:27 +00:00
Justin T. Gibbs
75f0b9d070 Reset the DMA control register whenever we reset the sequencer.
Clear LASTPHASE on busfree so the kernel driver can tell that the
   sequencer is idle.
Fix some comments to reflect reality.
1996-03-10 07:02:32 +00:00
Jordan K. Hubbard
3873c27840 Don't print DMA busy messages - the sound code apparently runs
afoul of this without actually providing useful information and
works nonetheless.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-03-10 02:10:27 +00:00
Wolfram Schneider
5c2da7893a [Ee]rrs -> Errs errs, save one process for make clean 1996-03-09 23:48:55 +00:00
Rodney W. Grimes
46ed21d1a7 Convert a timeout loop from 100 iterations of 15uS to 50
iterations of 30uS so that really fast systems stop getting
timeout messages from the Riscom driver.

Reviewed by:	ache, peter@nmti.com (Peter da Silva)
1996-03-09 18:59:00 +00:00
Peter Wemm
c146b42dc0 Fix broken SCSI_DELAY option.. (missing #include "opt_scsi.h")
Pointed out by: Boyd Faulkner <faulkner@asgard.bga.com>
1996-03-09 07:13:57 +00:00
John Dyson
46d66d275b Make sure that the zero flag is cleared upon completion of paging I/O. 1996-03-09 07:02:52 +00:00
John Dyson
9212ebc656 Correct some new and older lurking bugs. Hold count wasn't being
handled correctly.  Fix some incorrect code that was included
to improve performance. Significantly simplify the pmap_use_pt and
pmap_unuse_pt subroutines.  Add some more diagnostic code.
1996-03-09 07:01:21 +00:00
John Dyson
9ea857084d Delay forking a process until there are more pages available. It was
possible to deadlock with the low threshold that we had used.
1996-03-09 06:57:53 +00:00
John Dyson
9ee58740bc Modify a threshold for waking up the pageout daemon. Also, add a consistancy
check for making sure that held pages aren't freed (DG).
1996-03-09 06:56:39 +00:00
John Dyson
c68f9c929b Add a missing initialization of the hold_count for device pager ficticiouse
pages.
1996-03-09 06:54:41 +00:00
John Dyson
6ac5bfdb3a Fix a calculation for a paging parameter. 1996-03-09 06:53:27 +00:00
John Dyson
67cc64f4c7 Fix two problems:
The pmap_remove in vm_map_clean incorrectly unmapped the entire
	map entry.
	The new vm_map_simplify_entry code had an error (the offset
	of the combined map entry was not set correctly.)
Submitted by:	Alan Cox <alc@cs.rice.edu>
1996-03-09 06:52:05 +00:00
John Dyson
65bc79b85f Set the page valid bits in fewer places, as opposed to being scattered
in various places.
1996-03-09 06:48:26 +00:00
John Dyson
18ff64943e Correct handling of dirty pages in I/O buffers. The case where pages
residing in a buffer that had been dirtied by a process was being
handled incorrectly.  The pages were mistakenly placed into the
cache queue.  This would likely have the effect of mmaped page modifications
being lost when I/O system calls were being used simultaneously to
the same locations in a file.
Submitted by: davidg
1996-03-09 06:46:51 +00:00
John Dyson
e5fadd05f2 Put the "free vnode isn't" check back in the right place. 1996-03-09 06:43:19 +00:00
John Dyson
0f20dc9443 Remove a now unnecessary function prototype. 1996-03-09 06:42:15 +00:00
Andrey A. Chernov
f7163ba751 Make user-level PPP on-demand with dynamic IP actually work.
Story so fr:
1) PPP on-demand with static IP works.
2) PPP on-demand with dynamic IP says "Host is down" on any IP request
The problem is that tun driver check its READY state by *first* ifconfig address.
i.e.:
set ifaddr <addr> <addr2>
works (static IP) and
set ifaddr 0 <addr2>
not works (dynamic IP) because first address is equal 0.
Since tun is always POINTOPOINT interface, dst address is more meaningfull.
I change checking to second (dst) address in READY test.
PPP on-demand finally works.
1996-03-08 11:07:07 +00:00
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