Commit Graph

9500 Commits

Author SHA1 Message Date
Bruce Evans
ea35435137 Made N_TXTADDR() work for kernels (assume that a ZMAGIC file with an
out of bounds a_entry is a kernel and use the usual kludge to find
the text address).  If gdb had used this, it would have been able
to find the kernel text address properly.  Unfortunately, it uses
its own a.out macros, so this is mainly an example for gdb to copy.
1997-12-19 20:44:48 +00:00
Andrey A. Chernov
f3a4092ca2 MALLOC->malloc
Suggested-by: bde
1997-12-19 19:39:01 +00:00
Bruce Evans
b3a66dd356 Set the sender's low watermark to match the maximum size for atomic
writes that we advertise (PIPE_BUF = 512).
1997-12-19 18:58:14 +00:00
John Dyson
c2e11a039d Change bogus usage of btoc to atop. The incorrect usage of btoc was
pointed out by bde.
1997-12-19 15:31:13 +00:00
Bruce Evans
29fac97c4f Fixed namespace pollution in previous commit.
Merged KERNEL ifdefs.
1997-12-19 10:03:31 +00:00
Andrey A. Chernov
17b6b6d61d SUNIT: use MALLOC/FREE and M_NOWAIT 1997-12-19 09:48:57 +00:00
John Dyson
1efb74fbcc Some performance improvements, and code cleanups (including changing our
expensive OFF_TO_IDX to btoc whenever possible.)
1997-12-19 09:03:37 +00:00
Julian Elischer
45d6875df6 Fix an incredibly horrible bug in the ipfw code
where if you are using the "reset tcp" firewall command,
the kernel would write ethernet headers onto random kernel stack locations.

Fought to the death by: terry, julian, archie.
fix valid for 2.2 series as well.
1997-12-19 03:36:15 +00:00
John Dyson
a5f4cd5623 Correct the check for multiword dma. It was incorrectly checking
for multiword dma mode 4 (which doesn't exist.)
Submitted by:	John Hood
1997-12-19 02:25:51 +00:00
Bruce Evans
8cd077a7fd Augment $PATH to ensure searching of /sbin and /usr/sbin for sysctl
instead of using an absolute path to sysctl.
Problem reported by: ache
1997-12-18 21:03:04 +00:00
David Greenman
744f87ea73 Fixed a missing splx(s) bug in tcp_usr_send(). 1997-12-18 09:50:38 +00:00
David Greenman
86b3ebce35 Call in_pcballoc() at splnet(). As near as I can tell, this won't fix
any instability problems, but it was wrong nonetheless and will be
required in an upcoming round of PCB changes.
1997-12-18 09:13:39 +00:00
Peter Wemm
9b73941153 Add missing references to Xcpuast, get_isrlock and checkstate_probed_cpus 1997-12-18 02:09:29 +00:00
Garrett Wollman
e51d1e8707 Revert poll() for UFS files to traditional behavior where polling for read-
or writability always returns true.  This works around bugs in netscape and
squid, at a minimum.
1997-12-17 14:44:23 +00:00
KATO Takenori
76ef01374e Regenerate (fix argument of linux_nice). 1997-12-17 03:16:11 +00:00
KATO Takenori
c7da3245da I should not edit linux_prot.h directly. Fix the argument of linux_nice.
Pointed out by:	Eivind Eklund <eivind@FreeBSD.ORG>
	NOPROTO	LINUX	{ int getpgrp(void); }
66	NOPROTO	LINUX	{ int setsid(void); }
67	STD	LINUX	{ int linux_sigaction(int sig, \
			    struct linux_sigaction *nsa, \
			    struct linux_sigaction *osa); }
68	STD	LINUX	{ int linux_siggetmask(void); }
69	STD	LINUX	{ int linux_sigsetmask(linux_sigset_t mask); }
70	NOPROTO	LINUX	{ int setreuid(int ruid, int euid); }
71	NOPROTO	LINUX	{ int setregid(int rgid, int egid); }
72	STD	LINUX	{ int linux_sigsuspend(int restart, \
			    linux_sigset_t oldmask, linux_sigset_t mask); }
73	STD	LINUX	{ int linux_sigpending(linux_sigset_t *mask); }
74	NOPROTO	LINUX	{ int osethostname(char *hostname, \
			    u_int len);}
75	NOPROTO	LINUX	{ int osetrlimit(u_int which, \
			    struct ogetrlimit *rlp); }
76	NOPROTO	LINUX	{ int ogetrlimit(u_int which, \
			    struct ogetrlimit *rlp); }
77	NOPROTO	LINUX	{ int getrusage(int who, struct rusage *rusage); }
78	NOPROTO	LINUX	{ int gettimeofday(struct timeval *tp, \
			    struct timezone *tzp); }
79	NOPROTO	LINUX	{ int settimeofday(struct timeval *tp, \
			    struct timezone *tzp); }
80	NOPROTO	LINUX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
81	NOPROTO	LINUX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
82	STD	LINUX	{ int linux_select(struct linux_select_argv *ptr); }
83	STD	LINUX	{ int linux_symlink(char *path, char *to); }
84	NOPROTO	LINUX	{ int ostat(char *path, struct ostat *up); }
85	STD	LINUX	{ int linux_readlink(char *name, char *buf, \
			    int count); }
86	STD	LINUX	{ int linux_uselib(char *library); }
87	NOPROTO	LINUX	{ int swapon(char *name); }
88	NOPROTO	LINUX	{ int reboot(int opt); }
89	STD	LINUX	{ int linux_readdir(int fd, struct linux_dirent *dent, \
			    unsigned int count); }
90	STD	LINUX	{ int linux_mmap(struct linux_mmap_argv *ptr); }
91	NOPROTO	LINUX	{ int munmap(caddr_t addr, int len); }
92	STD	LINUX	{ int linux_truncate(char *path, long length); }
93	NOPROTO	LINUX	{ int oftruncate(int fd, long length); }
94	NOPROTO	LINUX	{ int fchmod(int fd, int mode); }
95	NOPROTO	LINUX	{ int fchown(int fd, int uid, int gid); }
96	NOPROTO	LINUX	{ int getpriority(int which, int who); }
97	NOPROTO	LINUX	{ int setpriority(int which, int who, int prio); }
98	NOPROTO	LINUX	{ int profil(caddr_t samples, u_int size, \
			    u_int offset, u_int scale); }
99	STD	LINUX	{ int linux_statfs(char *path, \
			    struct linux_statfs_buf *buf); }
100	STD	LINUX	{ int linux_fstatfs(int fd, \
			    struct linux_statfs_buf *buf); }
101	STD	LINUX	{ int linux_ioperm(unsigned int lo, \
			    unsigned int hi, int val); }
102	STD	LINUX	{ int linux_socketcall(int what, void *args); }
103	STD	LINUX	{ int linux_ksyslog(int what); }
104	STD	LINUX	{ int linux_setitimer(u_int which, \
			    struct itimerval *itv, struct itimerval *oitv); }
105	STD	LINUX	{ int linux_getitimer(u_int which, \
			    struct itimerval *itv); }
106	STD	LINUX	{ int linux_newstat(char *path, \
			    struct linux_newstat *buf); }
107	STD	LINUX	{ int linux_newlstat(char *path, \
			    struct linux_newstat *buf); }
108	STD	LINUX	{ int linux_newfstat(int fd, struct linux_newstat *buf); }
109	STD	LINUX	{ int linux_uname(struct linux_old_utsname *up); }
110	STD	LINUX	{ int linux_iopl(int level); }
111	STD	LINUX	{ int linux_vhangup(void); }
112	STD	LINUX	{ int linux_idle(void); }
113	STD	LINUX	{ int linux_vm86(void); }
114	STD	LINUX	{ int linux_wait4(int pid, int *status, \
			    int options, struct rusage *rusage); }
115	STD	LINUX	{ int linux_swapoff(void); }
116	STD	LINUX	{ int linux_sysinfo(void); }
117	STD	LINUX	{ int linux_ipc(int what, int arg1, int arg2, int arg3, \
			    caddr_t ptr); }
118	NOPROTO	LINUX	{ int fsync(int fd); }
119	STD	LINUX	{ int linux_sigreturn(struct linux_sigcontext *scp); }
access
1997-12-17 03:12:35 +00:00
Eivind Eklund
f41991ba10 EXT2FS and MSDOSFS to the opt_dontuse bin. 1997-12-16 23:59:37 +00:00
Eivind Eklund
b449fccbbc Fix my typo.
Submitted by: helbig
1997-12-16 22:50:18 +00:00
Eivind Eklund
16a4e2f328 Make LINT compile again after wollman introduced poll() here.
Overlooked by:	wollman
1997-12-16 22:28:26 +00:00
Eivind Eklund
4027779c22 Regenerate after changing makesyscalls.sh. 1997-12-16 22:27:22 +00:00
Eivind Eklund
0b3c4d50c2 Move around opt_compat include to accomodate Linulator brokenness (for
the time being).
1997-12-16 18:51:45 +00:00
Eivind Eklund
8438b90fd3 Make hidden COMPAT_43 dependencies explict. Options in headers is a
pain in the backside.
1997-12-16 18:49:23 +00:00
Eivind Eklund
e9161c5082 Handle COMPAT_43 define -> option change. 1997-12-16 18:45:50 +00:00
Eivind Eklund
f9b59e80d5 Whoops - fix this after yesterday's IPX option changes. Also fix
minor buglet when neither bsdcomp, deflate or filter is used.

Pointed out by:	Chris Timmons <skynyrd@opus.cts.cwu.edu>
1997-12-16 18:28:07 +00:00
Eivind Eklund
5591b823d1 Make COMPAT_43 and COMPAT_SUNOS new-style options. 1997-12-16 17:40:42 +00:00
David Greenman
c7ce9e2634 Fix bug where a struct buf was free()'d back to the system malloc pool.
Quite amazing that the system runs at all with this bug. Also present in
2.2.5. The bug appears to have come in with changes in rev 1.53.

PR:		might fix PR#5313
Submitted by:	bde
1997-12-16 15:40:29 +00:00
KATO Takenori
cf478d7b45 Don't use PG_N if EPSON PC-486HX/HG/HA (PC-9801 compatible) are
detected.  These machine cannot make L2 cache write-through by PG_N,
and only I/O access (undocumented) can do that.  If PG_N is used,
system hangs.

Reviewed by:	tos@fa2.so-net.or.jp (Toshiyuki Kawashima)
1997-12-16 10:22:49 +00:00
Eivind Eklund
8c13c35718 Convert SUIDDIR fully to a new-style option.
Forgotten by: julian
1997-12-15 21:51:45 +00:00
Eivind Eklund
430df5f4b7 Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.
The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and
ifconfig.c only).

I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code
inside, as it never could have compiled - doh.)
1997-12-15 20:31:25 +00:00
KATO Takenori
76733e040d Sync with sys/i386/i386/microtime.s revision 1.35. 1997-12-15 08:37:13 +00:00
Mike Smith
7ebfc603cf As described by the submitter:
These patches enables us to play quake2 .

Support linux keyboard ioctl for setting RAW, MEDIUMRAW and XLATE.

Support linux virtual terminal operations:
 OPENQRY, GETMODE, SETMODE, GETSTATE, ACTIVATE, and WAITACTIVE.

Submitted by:	Amancio Hasty <hasty@rah.star-gate.com>
1997-12-15 06:09:11 +00:00
John Dyson
bd28588799 Fix a recursive kernel_map lock problem in vm_zone allocator.
PR:	5298
1997-12-15 05:16:09 +00:00
Garrett Wollman
1cbbd625cc Add support for poll(2) on files. vop_nopoll() now returns POLLNVAL
if one of the new poll types is requested; hopefully this will not break
any existing code.  (This is done so that programs have a dependable
way of determining whether a filesystem supports the extended poll types
or not.)

The new poll types added are:

	POLLWRITE - file contents may have been modified
	POLLNLINK - file was linked, unlinked, or renamed
	POLLATTRIB - file's attributes may have been changed
	POLLEXTEND - file was extended

Note that the internal operation of poll() means that it is impossible
for two processes to reliably poll for the same event (this could
be fixed but may not be worth it), so it is not possible to rewrite
`tail -f' to use poll at this time.
1997-12-15 03:09:59 +00:00
Mike Smith
0bec68bf7c Consult sa_len before trampling it with MSG_COMPAT set.
PR:             kern/5291
Submitted by:   pb@fasterix.freenix.org (Pierre Beyssac)
1997-12-15 02:29:11 +00:00
Tor Egge
5c623cb649 Add support for low resolution SMP kernel profiling.
- A nonprofiling version of s_lock (called s_lock_np) is used
    by mcount.

  - When profiling is active, more registers are clobbered in
    seemingly simple assembly routines. This means that some
    callers needed to save/restore extra registers.

  - The stack pointer must have space for a 'fake' return address
    in idle, to avoid stack underflow.
1997-12-15 02:18:35 +00:00
Tor Egge
549a42942d Don't forward hardclock or statclock to stopped cpus. Disable forwarding
when a panic has occured.
1997-12-15 01:14:10 +00:00
Sean Eric Fagan
64fce5b3cb Explicitly use the _IOC macro directly. This changes the ioctl command
numbers, so any programs using it need to be recompiled.
1997-12-15 00:29:41 +00:00
John Polstra
a8e99ec909 Make gzipped dynamically linked executables work again. There was
an old bug here that failed to copy the a.out header into memory
properly.  It didn't matter until changes were made recently to
the dynamic linker.
1997-12-14 19:36:24 +00:00
KATO Takenori
80ed4956b5 Sync with sys/i386/i386/machdep.c revision 1.279. 1997-12-14 12:31:44 +00:00
KATO Takenori
162c095232 Sync with sys/i386/conf/files.i386 revision 1.182. 1997-12-14 12:30:54 +00:00
John Dyson
b0d8408e21 Slight improvement to the vm_zone stats output. Also, some other superficial
cleanups.
1997-12-14 05:17:44 +00:00
Mike Smith
f2477ae13d As described by the submitter:
- emulate Linux IP_HDRINCL behaviour in sendto(): byte order fixed
	  Note that we do an extra getsockopt() on every sendto()
	  to check if the option is set because we don't keep state
	  in the emulator code. Is there a better way to implement
	  this?
	- correct a bug (value of "name" not passed) with
	  getsockopt()

Submitted by:	pb@fasterix.freenix.org (Pierre Beyssac)
1997-12-14 03:17:54 +00:00
Mike Smith
5af7db2b73 As described by the submitter:
... fix a bug with orecvfrom() or recvfrom() called with
the MSG_COMPAT flag on kernels compiled with the COMPAT_43 option.
The symptom is that the fromaddr is not correctly returned.

This affects the Linux emulator.

Submitted by:	pb@fasterix.freenix.org (Pierre Beyssac)
1997-12-14 03:15:21 +00:00
John Dyson
8256655132 After one of my analysis passes to evaluate methods for SMP TLB mgmt, I
noticed some major enhancements available for UP situations.  The number
of UP TLB flushes is decreased much more than significantly with these
changes.  Since a TLB flush appears to cost minimally approx 80 cycles,
this is a "nice" enhancement, equiv to eliminating between 40 and 160
instructions per TLB flush.

Changes include making sure that kernel threads all use the same PTD,
and eliminate unneeded PTD switches at context switch time.
1997-12-14 02:11:23 +00:00
James Raynard
5ecfccd5ba Allow slow SCSI CDROMs more time to start up.
PR:		5181
Submitted by:	Wilko Bulte <wilko@yedi.iaf.nl>
1997-12-14 00:32:33 +00:00
Paul Traina
8a0eb35293 Bring in NetBSD compatible & augmented RCSID/COPYRIGHT macros 1997-12-13 20:39:14 +00:00
Bruce Evans
80987b7a3b Fixed EOF handing.
1. SS_CANTRCVMORE was initially set on the wrong socket, so reads
when there has never been a writer on the socket did not return 0.
Note that such reads are only possible if the fifo was opened in
(O_RDONLY | O_NONBLOCK) mode.

2. SS_CANTSENDMORE was initially set on the wrong socket, but this
was harmless because the wrong socket is never sent from and there
is no need to set the flag initially on the right socket (since open
in (O_WRONLY | O_NONBLOCK) mode fails if there is no reader...).

3. SS_CANTRCVMORE was cleared when read() returns.  This broke the
case where read() returns 0 - subsequent reads are supposed to
return 0 until a writer appears.  There is no need to clear the
flag when read() returns, since it is cleared correctly when a
writer appears.
1997-12-13 13:49:59 +00:00
Bruce Evans
5fb0d3e0b3 Restored fifo_pathconf() from rev.1.32. vop_stdpathconf() is too
general to be of much use.  Using it here weakened the _PC_MAX_CANON,
_PC_MAX_INPUT and _PC_VDISABLE cases.

fifo_pathconf() is not quite correct either.  _PC_CHOWN_RESTRICTED
and _PC_LINK_MAX should be handled by the host file system.  For
directories, the host file system should let us handle _PC_PIPE_BUF.
1997-12-13 12:58:09 +00:00
Bruce Evans
2573d99c75 Restored ufs_pathconf() from rev.1.61. vop_stdpathconf() is too
general to be of much use.  Using it here broke the _PC_NAME_MAX,
_PC_NO_TRUNC and _PC_PATH_MAX cases, and weakened the _PC_MAX_CANON,
_PC_MAX_INPUT and _PC_VDISABLE cases.
1997-12-13 12:30:34 +00:00
Sean Eric Fagan
d7b7dcba41 Change the ioctls for procfs around a bit; in particular, whever possible,
change from

	ioctl(fd, PIOC<foo>, &i);

to

	ioctl(fd, PIOC<foo>, i);

This is going from the _IOW to _IO ioctl macro.  The kernel, procctl, and
truss must be in synch for it all to work (not doing so will get errors about
inappropriate ioctl's, fortunately).  Hopefully I didn't forget anything :).
1997-12-13 03:13:49 +00:00
Tor Egge
80db913bd6 Add needed #include.
Problem found by: Bruce Evans <bde@zeta.org.au>
1997-12-12 21:45:23 +00:00
Peter Wemm
32935219ba Fix(?) some style consistancy breakage and do some other nit-picking on
the SUIDDIR changes.
1997-12-12 14:14:44 +00:00
Peter Wemm
5eaf45f67b I've been using these tweaks to enable the sound driver to talk to the
(mutant) Crystal CSS4236 chip on the Intel PR440FX SMP motherboard.

XXX this uses some rather ugly PnP bootstrap code that is *NOT* compatable
with 'controller pnp0' or *ANY* other PnP devices.  If you use some other
PnP devices, enabling css0 will burn your house down. :-]  The
"simplified" PnP init sequence directly blats your config(8) settings onto
the chip.  I'm pretty sure 'css0' will conflict with 'mss0', this whole
area desperately needs a cleanup.

I have been using the following with some success on the PR440FX:
controller   snd0
device css0  at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr
device opl0  at isa? port 0x388
device mpu0  at isa? port 0x330 irq 10 vector mpuintr
1997-12-12 14:08:50 +00:00
John Dyson
74b2192ae6 We have had support for running the kernel daemons as threads for
quite a while, but forgot to do so.  For now, this code supports
most daemons  running as kernel threads in UP kernels, and as
full processes in SMP.  We will soon be able to run them as
threads in SMP, but not yet.
1997-12-12 04:00:59 +00:00
Sean Eric Fagan
ba9d19e99b Fix a problem with procfs_exit() that resulted in missing some procfs
nodes; this also apparantly caused a panic in some circumstances.
Also, since procfs_exit() is getting rid of the nodes when a process
exits, don't bother checking for the process' existance in procfs_inactive().
1997-12-12 03:33:43 +00:00
John Dyson
3a2dc656bc Fix the prototype for swapout_procs();
Submitted by:	dima@best.net
1997-12-11 02:10:55 +00:00
KATO Takenori
fede2ad755 Sync with sys/i386/conf/files.i386, majors.i386 and options.i386
revisions 1.181, 1.23 and 1.64, respectively.
1997-12-10 09:28:59 +00:00
John Dyson
648899413d Quiet some lint. 1997-12-10 04:14:23 +00:00
Jamil J. Weatherbee
6aa5dc4099 eliminated a previously unnoticde compile warning about use of
__inline, not good to use anyway ?!?!!
1997-12-09 12:41:13 +00:00
Jamil J. Weatherbee
4fdababa9f the alog.c file respectively, added in wrong order by accident 1997-12-09 12:07:50 +00:00
Jamil J. Weatherbee
a1e9e3087e add entry in LINT for alog driver
added line to files.i386 to compile in alog.c optionally as a driver
1997-12-09 12:04:49 +00:00
KATO Takenori
530d6fc55a Sync with sys/i386/isa/mse.c and syscons.c revisions 1.36 and 1.242,
respectively.
1997-12-09 11:58:02 +00:00
Kazutaka YOKOTA
b8e63afa1c Remove obsolete psm driver options: PSM_ACCEL, PSM_EMULATION,
PSM_CHECKSYNC.
1997-12-09 11:56:19 +00:00
KATO Takenori
a81baa3e50 Sync with sys/i386/i386/userconfig.c revision 1.98. 1997-12-09 11:55:25 +00:00
Jamil J. Weatherbee
3b2255e251 adding alogio.h to system include files 1997-12-09 11:43:04 +00:00
Jamil J. Weatherbee
dd2cb0618e Added major 86 for the alog driver. 1997-12-09 10:51:11 +00:00
Sean Eric Fagan
7486d3658f Code to prevent a panic caused by procfs_exit(). Note that i don't know
what is teh root cause -- but, sometimes, a procfs vnode in pfshead is
apparantly corrupt (or a UFS vnode instead).  Without this patch, I can
get it to panic by doing (in csh)

	while (1)
		ps auxwww
	end

and it will panic when the PID's wrap.  With it, it does not panic.
Yes -- I know that this is NOT the right way to fix it.  But I haven't
been able to get it to panic yet (which confuses me).  I am going to
be looking into the vgone() code now, as that may be a part of it.
1997-12-09 05:03:41 +00:00
Steve Passe
eae8fc2c8a The improvements to clock statistics by Tor Egge
Wrappered and enabled by the define BETTER_CLOCK (on by default in smpyests.h)

Reviewed by:	smp@csn.net
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-12-08 23:00:24 +00:00
Steve Passe
baf41202ca The improvements to clock statistics by Tor Egge
Wrappered and enabled by the define BETTER_CLOCK (on by default in smpyests.h)

apic_vector.s also contains a small change I (smp) made to eliminate
the double level INT problem.  It seems stable, but I haven't the tools
in place to prove it fixes the problem.

Reviewed by:	smp@csn.net
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-12-08 22:59:39 +00:00
Sean Eric Fagan
bfcfe2e1b1 A couple of fixes from bruce: first of all, psignal is a void (stupid
me; unfortunately, also makes it hard ot check for errors); second, I had
managed to forget a change to PIOCSFL (it should be _IOW, not _IOR) I had
in my local copy, and Bruce called me on it.

Submitted by:	bde
1997-12-08 22:09:39 +00:00
Steve Passe
a39e666dbc Removed the annoying "apic_ipi might be stuck" message.
Added commentary about the real problem and what needs to be done.
1997-12-08 18:36:02 +00:00
John-Mark Gurney
0c2a51b49e add process id to tmp files... this prevents two runs from stomping
over each other's tmp files...  (usr.bin/truss uncovered this bug)
1997-12-08 09:00:47 +00:00
John Dyson
78922e413c Correct prototypes to match POSIX. Correct return code for aio_cancel.
Submitted by:	Alex Nash <nash@mcs.com>
1997-12-08 02:18:25 +00:00
Sean Eric Fagan
847e5f5f9a Use at_exit() to invoke procfs_exit() instead of calling it directly.
Note that an unload facility should be used to call rm_at_exit() (if
procfs is being loaded as an LKM and is subsequently removed), but it
was non-obvious how to do this in the VFS framework.

Reviewed by:	Julian Elischer
1997-12-08 01:06:36 +00:00
John Dyson
2f29e93460 Various of the ISP users have commented that the 1.41 version of the
nfs_bio.c code worked better than the 1.44.  This commit reverts
the important parts of 1.44 to 1.41, and we will fix it when we
can get a handle on the problem.
1997-12-08 00:59:08 +00:00
Sean Eric Fagan
ed1b05436a Surround the call to procfs_exit() by #ifdef PROCFS/#endif -- much to my
surprise, procfs actually is optional, and some people truly do generate
kernels without it.  Wow.  I built a kernel without 'options PROCFS' and
it compiled and linked.
1997-12-07 18:16:43 +00:00
Kazutaka YOKOTA
c6d1bed112 - Add support for the following mice to psm/moused/sysmouse:
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll,
  Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII
  MieMouse, Logitech MouseMan+, FirstMouse+

- The `psm' driver is made to recognize various models of PS/2 mice
and enable their extra features so that their additional buttons and
wheel/roller are recognized. The name of the detected model will be
printed at boot time.

- A set of new ioctl functions are added to the `psm', `mse' and
`sysmouse' drivers so that the userland program (such as the X server)
can query device information and change driver settings.

- The wheel/roller movement is handled as the `Z' axis movement by the
mouse drivers and the moused daemon. The Z axis movement may be mapped
to another axis movement or buttons.

- The mouse drivers support a new, standard mouse data format,
MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement
and up to 10 buttons.

/sys/i386/include/mouse.h
- Added some fields to `mousestatus_t' to store Z axis movement
  and flag bits.
- Added the field `model' to `mousehw_t' to store mouse model code.
  Defined model codes.
- Extended `mousemode_t'.
- Added new protocols and some constants for them.
- Added new ioctl functions and structures.
- Removed obsolete ioctl definitions.

/sys/i386/include/console.h
- Added `dz' field to the structure `mouse_data' to pass Z axis movement
  to `syscons/sysmouse'.
- Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON.  Use button bits
  defined in `mouse.h' instead.

/sys/i386/isa/psm.c
- Added a set of functions to detect various mice which have additional
  features (wheel and buttons) unavailable in the standard PS/2 mouse.
- Refined existing ioctl functions and added new ones.  Most important
  of all is MOUSE_SETLEVEL which manipulates the output level of the driver.
  While the output level remains zero, the output from the `psm' driver is
  in the standard PS/2 mouse format (three bytes long).  When the level
  is set to one, the `psm' driver will send data in the extended format.
  At the level two the driver uses the format which is native to the
  connected mouse is used. (Meaning that the output from the device is
  passed to the caller as is, unmodified.)  The `psm'  driver will pass
  such extended data format as is to the caller if the output level is
  two, but emulates the standard format if the output level is zero.
- Added kernel configuration flags to set initial resolution
  (PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL).
- Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION.
  Acceleration ratio is now specified by the kernel configuration flags
  stated above.  Sync check logic is refined and now standard.
  The sync check can be turned off by the new kernel configuration flags
  PSM_CONFIG_NOCHECKSYNC (0x100).  PSM_EMULATION has been of little use.
- Summer clean up :-)  Removed unused code and obsolete comments.

/sys/i386/isa/mse.c
- Created mseioctl() to deal with ioctl functions MOUSE_XXXX.
  Most importantly, the MOUSE_SETLEVEL ioctl will change the
  output format from the 5 byte format to the new, extended format
  so that the caller can take advantage of Z axis movement and additional
  buttons.
- Use constants defined in `mouse.h' rather than magic numbers.

/sys/i386/isa/syscons.c
- Changed scioctl() to reflect the new `console.h' and some of the new
  ioctls defined in `mouse.h'.  Most importantly, the MOUSE_SETLEVEL
  ioctl will change the `sysmouse' output format from the MouseSystems
  5 byte format to the new, extended format so that the caller can
  take advantage of Z axis movement and additional buttons.
- Added support for double/triple click actions of the left button and
  single click action of the right button in the virtual console.  The
  left button double click will select a word under the mouse pointer.
  The triple click will select a line and the single click of the right
  button will extend the selected region to the current position of
  the mouse pointer.  This will make the cut/paste support more compatible
  with xterm.

/sys/i386/isa/kbdio.h
- Added PSM_INTELLI_ID.
1997-12-07 08:09:19 +00:00
Kazutaka YOKOTA
821ecb1944 Removed obsolete options: PSM_CHECKSYNC, PSM_ACCEL and PSM_EMULATION. 1997-12-07 08:07:17 +00:00
John Dyson
f2e6e69d92 Slight performance improvement, removal of unneeded SPLs. 1997-12-07 04:06:41 +00:00
Sean Eric Fagan
d99616387e Clear the stop events and wakeup the process on teh last close of the
procfs/mem file.  While this doesn't prevent an unkillable process, it
means that a broken truss prorgam won't do it accidently now (well,
there's a small window of opportunity).  Note that this requires the
change to truss I am about to commit.
1997-12-07 04:01:03 +00:00
Sean Eric Fagan
5ced4af373 Add a procfs-related flag for procp->p_pfsflags. 1997-12-07 03:59:26 +00:00
John Polstra
befb229b6f Move nlist related defines from link.h into nlist.h. Clean up
nlist.h.
1997-12-06 17:59:52 +00:00
Bruce Evans
df1c78063c Use ENOIOCTL instead of -1 (= ERESTART) for diskslice ioctls that are
not handled at a particular level.
1997-12-06 14:27:56 +00:00
Bruce Evans
239b7b699e Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that are
not handled at a particular level.  This fixes mainly restarting
of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
1997-12-06 13:25:01 +00:00
Bruce Evans
91241944ea Added a kernel-only error code ENOICTL. This will be returned from
low level ioctl routines instead of the magic number -1 so that
callers can distinguish it from ERESTART (which happens to be -1).
-1 meant that the ioctl was not handled at the called level.
ERESTART is normal when a sleeping ioctl is interrupted.  ERESTART
got converted to ENOTTY instead of restarting the ioctl.  Many
(most?) ioctls can not be restarted safely, but this is apparently
supposed to be handled by drivers converting ERESTART to EINTR.
I first saw this problem for TIOCDRAIN.  Justin saw if for disk
ioctls.

Added missing parentheses.
1997-12-06 11:28:06 +00:00
Andrey A. Chernov
90a5affc0a Add AWE32 description to visualconfig 1997-12-06 08:20:00 +00:00
Andrey A. Chernov
a76d828674 Attach messages: remove unneded newlines and add
missing conf_printf
1997-12-06 07:48:22 +00:00
KATO Takenori
1f4fb6dff8 Sync with sys/i386/i386/trap.c revision 1.119. 1997-12-06 06:19:19 +00:00
Sean Eric Fagan
2a024a2b05 Changes to allow event-based process monitoring and control. 1997-12-06 04:11:14 +00:00
John Dyson
ceb0cf87e8 Support an optional, sysctl enabled feature of idle process swapout. This
is apparently useful for large shell systems, or systems  with long running
idle processes.  To enable the feature:

	sysctl -w vm.swap_idle_enabled=1

Please note that some of the other vm sysctl variables have been renamed
to be more accurate.
Submitted by:	Much of it from Matt Dillon <dillon@best.net>
1997-12-06 02:23:36 +00:00
Bruce Evans
1cd52ec333 Don't include <sys/lock.h> in headers when only `struct simplelock' is
required.  Fixed everything that depended on the pollution.
1997-12-05 19:55:52 +00:00
Bruce Evans
10b18425f0 Removed one const' from the declaration of ks_shortdesc'. The pointer
isn't actually const in vmstat.

Fixed pedantic syntax errors caused by trailing semicolons in macro
definitions.

Fixed style bugs and typos in revisions 1.26-1.33.
1997-12-05 19:14:36 +00:00
Bruce Evans
a517984c8b Moved declaration of M_IOV to a less bogus place. It belongs in
<sys/uio.h>, but it doesn't work there because of header pollution
(<sys/uio.h> is prematurely included by <sys/param.h>).
1997-12-05 18:58:13 +00:00
Jordan K. Hubbard
8cf27db018 Needs to include <sys/lock.h> if we're using struct lock. 1997-12-05 13:43:47 +00:00
KATO Takenori
51b6cb0d6a Sync with sys/i386/conf/options.i386 revision 1.63. 1997-12-05 11:51:29 +00:00
KATO Takenori
eb5da6d550 Sync with sys/i386/boot/biosboot/boot.h and io.c revisions 1.23 and
1.25, respectively.
1997-12-05 11:50:42 +00:00
KATO Takenori
3de8753921 Sync with sys/i386/i386/machdep.c and trap.c revisions 1.278 and
1.118, respectively.
1997-12-05 11:48:53 +00:00
John Dyson
70111b9016 Add new (very useful) tunable for pageout daemon. The flag changes
the maximum pageout rate:

sysctl -w vm.vm_maxlaunder=n

 1 < n < inf.

If paging heavily on large systems, it is likely that a performance
improvement can be achieved by increasing the parameter.  On a large
system, the parm is 32, but numbers as large as 128 can make a big
difference.  If paging is expensive, you might try decreasing the
number to 1-8.
1997-12-05 05:41:06 +00:00
John Dyson
d4060a8751 Some fixes from John Hood:
1) Fix the initialization of malloc structure that changed
		due to perf opt.
	2) Remove unneeded include.
	3) An initialization assert added to malloc.
Submitted by:	John Hood <cgull@smoke.marlboro.vt.us>
1997-12-05 05:36:58 +00:00
Joerg Wunsch
3bb99eb225 Finally, implement a mini-parser for RockRidge alternative filenames,
so the filenames can be displayed and selected in full beauty.  If RR
is present, the match is now case-sensitive, if RR is missing, the
match is case-insensitive (as it used to be before).
1997-12-04 21:52:47 +00:00