Commit Graph

6281 Commits

Author SHA1 Message Date
Julian Elischer
dd45d8ad18 If we have no console device it is possible to be
1/ session leader
2/ Have a console device vnode (/dev/console)
3/ have  NULL pointer for a consoel tty struct.

fix the only case where the tty struct is referenced without a prior
check for existance.
1996-10-04 23:43:12 +00:00
David Greenman
d41fe60984 Oops, missed a chunk in that last commit. 1996-10-04 14:17:32 +00:00
David Greenman
1c41fd74b9 Implemented a more sophisticated mechanism for finding the chip iobase
so that 32Y boards will work.
Fixed bogus indenting and added a pair of parens.
1996-10-04 10:33:13 +00:00
David Greenman
8d1005c8c4 Added multicast support (BPF cookie bug was already fixed).
Submitted by:	Steven McCanne <mccanne@cs.berkeley.edu>
1996-10-03 10:47:03 +00:00
Jordan K. Hubbard
890c2894d8 Make return or newline synonymous with down-arrow in the value editor.
It's a lot easier to whap through multiple changes if you can use the return
key.
1996-10-03 07:51:40 +00:00
Peter Wemm
1a7eb2dcab Drop an unused param to unmap_pages(). 1996-10-03 06:14:48 +00:00
Jordan K. Hubbard
a1406d7cf0 Fix stupid typo. 1996-10-03 01:22:22 +00:00
Jordan K. Hubbard
e669728232 Add fxp and vx to list of known device types. 1996-10-03 01:01:01 +00:00
Jordan K. Hubbard
0c8c5f852a scresume erroneously used before declared. Move the function
rather than add another APM ifdef just for the forward decl.
[Boy, sure a lot of warnings in here!]
1996-10-03 00:42:27 +00:00
Søren Schmidt
4a8aeffeb2 Fixed the userconfig problem (and one with ddb as well).
The rudimentary support for a splash page is there, and works, it
just needs a splash page...
1996-10-02 22:00:38 +00:00
Jordan K. Hubbard
1ffb1e5eb6 New support for displaying PCI devices without making you insane.
Submitted-by: msmith [bless his heart]
1996-10-02 08:09:09 +00:00
John Dyson
39b1a97c77 MSDOS FS used to allocate a buffer before extending the VM object. In
certain error conditions, it is possible for pages to be left allocated
in the object beyond it's end.  It is generally bad practice to allocate
pages beyond the end of an object.
1996-10-02 05:01:17 +00:00
Paul Traina
14b7c0f2f9 add SC_SPLASH_SCREEN to opt_syscons.h (sigh) 1996-10-02 03:48:09 +00:00
Søren Schmidt
d58801b2ee Fixed the "missing updates" reported by ache.
Moved a little closer to having a splash page capability.
1996-10-01 23:24:09 +00:00
Jordan K. Hubbard
10dce6c9f3 #ifdef another instance of toggle_splash_screen() which Soren missed. 1996-10-01 07:38:14 +00:00
Paul Traina
6e702c9964 Document the Adaptec driver options for tagged command queueing and SCB
paging (with a warning not to use SCB paging) and create an opt_aic7xxx.h
file for these options.
1996-10-01 03:01:06 +00:00
Peter Wemm
f62b417ba5 Add support for storing a -R path in ld in the section dispatch table,
support LD_HINTS_VERSION_2 that has the ldconfig pathname stored in the
ld.so.hints file (ie: a new library can be installed and used without
needing to run ldconfig -m first)

Reviewed by: nate, jdp
Obtained from: NetBSD (mostly)
1996-10-01 00:25:32 +00:00
Peter Wemm
8bd5578830 Add the linker set stab types: N_SETA N_SETT N_SETD N_SETB N_SETV 1996-10-01 00:01:43 +00:00
Søren Schmidt
ebe3b2aabd Dont make splash screen the default :) 1996-09-30 23:10:35 +00:00
Søren Schmidt
a221620c79 Fix a couble of nasties regarding mouse pointer and different
resolutions.
Allow middle mouse button to be used for pasting.
Also added the beginnings of support for a splash page.
1996-09-30 23:00:58 +00:00
Julian Elischer
793dc173fa if we jump the time, we need to check all the process real interval timers. 1996-09-30 19:28:52 +00:00
Bruce Evans
92d0aa20dc Work around UMC8669F and Startech UART bugs by not writing to the
divisor latch registers if the registers wouldn't change.

Use the default console cfcr setting while setting the divisor
latch registers for console i/o.  Input may be messed up by
transiently changing the cfcr.

Use a usual cfcr setting while setting the divisor latch registers
in the probe.  This shouldn't matter, but this is not the place to
test the UART's handling of 5 bit words.

Removed a stale devfs comment.
1996-09-30 12:22:27 +00:00
Bruce Evans
edbfbd9280 Whaddya know, visual userconfig sort of supports pci, but the support
was always disabled because "pci.h" wasn't included.  Now the configured
pci devices are listed and you can edit bogus flags for them.

Fixed bitrot in the disabled code.  A used #include was removed and const
poisoning wasn't fixed.

Removed unused #include.
1996-09-30 11:25:19 +00:00
Bruce Evans
ece15d78ea Added "memory" to clobber list in invlpg(). It needs it if invltlb()
needs it.

Fixed style in invlpg().

Sorted recently renamed functions.

Added prototypes in the non-gcc section for recently added/renamed
functions.
1996-09-29 18:35:07 +00:00
Bruce Evans
dc927d0c6b Started unspamming <sys/systm.h>. Don't include <machine/stdarg.h>
to get the declaration of va_list; just use _BSD_VA_LIST.  Fixed
the 2 places that need <machine.stdarg.h> but didn't include it
explicitly.
1996-09-29 15:00:37 +00:00
David Greenman
78fb85bbf7 Backed out one of my "performance optimizations" as it results in sometimes
not resuming the NIC as required for transmit. Thanks to Alan Cox
<alc@cs.rice.edu> for noticing this.
Added another performance optimization to compensate. :-)

Changed crscdt to 1...strange, but this seems to be needed for some reason
despite what the manual says.
1996-09-29 10:20:45 +00:00
John Dyson
27e9b35e07 Essentially rename pmap_update to be invltlb. It is a very machine
dependent operation, and not really a correct name.  invltlb and invlpg
are more descriptive, and in the case of invlpg, a real opcode.

Additionally, fix the tlb management code for 386 machines.
1996-09-28 22:37:57 +00:00
Bruce Evans
322dfc2bd5 Fixed undeclared variables for the !(PQ_L2_SIZE > 1) case.
Removed redundant #include.
1996-09-28 17:53:18 +00:00
Bruce Evans
efebc4ab84 Fixed bitrot in the read-only attribute:
- kern.maxfilesperproc was read-only (and thus essentially useless).

Removed unused #includes.  Strength-reduced used #includes.
1996-09-28 16:33:21 +00:00
Bruce Evans
7c1aacb5be Oops, read-only is spelled RD here. 1996-09-28 15:53:30 +00:00
Bruce Evans
501b55314c Fixed bitrot in the read-only attribute:
- kern.maxproc and kern.maxprocperuid were read-only (and thus essentially
  useless.  Apparently no one uses them).
- all the user sysctls were read-write (and thus it was possible for them
  to be inconsistent with the authoritative fixed values in the library).

Removed unused #include.
1996-09-28 15:43:39 +00:00
Bruce Evans
f53687f7b5 Restored my change in rev.1.119 which was clobbered by the previous commit. 1996-09-28 15:28:40 +00:00
John Dyson
9299d3c4bb Move pmap_update_1pg to cpufunc.h. Additionally,
use the invlpg opcode instead of the nasty looking .byte directives.
There are some other minor micro-level code improvements to pmap.c
1996-09-28 04:22:46 +00:00
John Dyson
a8f42fa9a6 Correct vget by removing a window where a vnode can potentially go away. 1996-09-28 03:36:07 +00:00
John Dyson
a2f4a84696 Reviewed by:
Submitted by:
Obtained from:
1996-09-28 03:33:40 +00:00
Bruce Evans
e2e0d560a2 Added -I- to ${INCLUDES}. This makes 4.4Lite's (mis?)use of "foo.h"
for headers in the compile directory work unsurprisingly.  Without
-I-, the search for "foo.h" begins in the directory of the file
that includes it, and the compile directory is only searched because
`-I.' is in ${INCLUDES}.

Removed -I$S/sys from ${INCLUDES}.  It was once necessary to find
things like "param.h" in $S/sys.  Now <sys/param.h> is found in $S.
1996-09-27 16:34:16 +00:00
Peter Wemm
ed82824ef8 Some warning cleanups. There were some needless casts that also caused
gcc -Wcast-qual to scream.  There's still quite a few left, but since I'm
cleaning out my tree, I'll commit these now.
1996-09-27 13:50:59 +00:00
Peter Wemm
32d8f04c11 part 2 of the bsdi compat tweak attempt. I believe that BSDI use both
lcall 7,0 (ie: ldt slot 0) and lcall 0x87,0 (ldt slot 16, it's shifted
three bits to the left).  I was fiddling with this so long ago, I don't
recall the specifics.
1996-09-27 13:38:02 +00:00
Peter Wemm
90af01bef3 Apparently, BSDI have a new system call gate. I was experimenting
with this quite a while ago when somebody reported a BSD/OS 2.1 binary
that wouldn't run.  I'm pretty sure they tried it and I'm pretty sure
they mentioned to me that the patch worked.
1996-09-27 13:33:49 +00:00
Peter Wemm
ad3bbe7a2d Drat, missed this prototype for random_select(). 1996-09-27 13:29:41 +00:00
Peter Wemm
983febf3dc I've been meaning to commit this for months. Implement select()
for /dev/random and /dev/urandom.  Both are always writable, urandom is
always readable, and /dev/random is readable when >= 8 bits are in the
pool.
1996-09-27 13:25:13 +00:00
Paul Traina
b3f3fea5fd Fix a couple of bugs causing false positives 1996-09-26 20:52:13 +00:00
Bruce Evans
388dfa7112 Fixed a few hundred warnings (2400 in LINT) for signed vs unsigned
comparisons in the inb() and outb() macros.  I decided that int args
are OK here.  Any type that can hold a u_int16_t without overflow
is correct, and 32-bit types are optimal.

Introduced a few tens of warnings (100 in LINT) for use of pessimized
(short) types for the port arg.  Only a few drivers are affected by
this.  u_short pessimizations aren't detected.

Added `__extension__' before the statement-expression in inb() so
that it can be compiled without warnings by gcc -pedantic.
1996-09-24 17:47:59 +00:00
Bruce Evans
0c8ea4d48c Eliminated includes of the "temporary" backwards compatibility header
<sys/dir.h> in applications.  Maintained existing (inadequate) ifdefs
for dir.h vs dirent.h in libdialog, amd and rarpd, but didn't add any
new ones.
1996-09-24 08:08:11 +00:00
Peter Wemm
a6fc828816 call srandom() during the boot to start the sequence with a slightly less
predictable seed.
1996-09-23 04:37:54 +00:00
Peter Wemm
840a0352e9 add simple srandom() and prototype 1996-09-23 04:31:43 +00:00
Wolfram Schneider
148531ef1e add forgotten $Id$ 1996-09-22 21:56:57 +00:00
Poul-Henning Kamp
d920a829d4 Remove the extra length field from the utrace entries. It's redundant. 1996-09-22 18:17:51 +00:00
Bruce Evans
38a14cf7f6 Reformatted FreeBSD additions to match 4.4Lite style. Mixed tabs and
spaces after #define's look ugly in diffs.
1996-09-22 14:57:44 +00:00
David Greenman
1cd443ace8 Fixed a bug with the management of the pointer to the first TxCB in the
ring that caused wrong things to happen sometimes.
Doubled the number of transmit descriptors to 128 so that the internal
FIFO in the NIC can be fully filled when dealing with small packets.
Several minor performance improvements.
1996-09-22 11:48:54 +00:00
Gary Palmer
9986e07e1f Remove the code that renices +4 a process that has had 10 minutes of
CPU time. I find it slightly annoying on one of our servers here.

Also disliked by: David Greenman
1996-09-22 06:35:24 +00:00
Bruce Evans
ebedb5ad97 Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>:
- don't include <sys/ioctl.h> in any header.  Include <sys/ioccom.h>
  instead.  This was already done in 4.4Lite for the most important
  ioctl headers.  Header spam currently increases kernel build
  times by 10-20%.  There are more than 30000 #includes (not counting
  duplicates) for compiling LINT.
- include <sys/types.h> if and only it is necessary to make the header
  almost self-sufficient (some ioctl headers still need structs from
  elsewhere).
- uniformized idempotency ifdefs.  Copied the style in the 4.4Lite
  ioctl headers.
1996-09-21 14:59:43 +00:00
Bruce Evans
83f52dabab Include <sys/filio.h> explicitly - don't depend on <machine/soundcard.h>
bogusly defining non-soundcard ioctls.
1996-09-21 14:53:28 +00:00
Bruce Evans
ec16abb2c5 Moved the prototype for ioctl() from <sys/ioctl.h> to <sys/ioccom.h>
so that applications don't have to include <sys/ioctl.h> just to get
a prototype for ioctl().
1996-09-21 08:42:37 +00:00
Paul Traina
12eafeb016 I don't understand, I committed this fix (move a counter and fixed a typo)
this evening.

I think I'm going insane.
1996-09-21 06:39:20 +00:00
Andrey A. Chernov
96d719e6e0 Syntax error: so_incom -> so_incomp 1996-09-21 06:30:06 +00:00
Bruce Evans
88ce2dfc41 Fiexed CFLAGS. Compiling things in the kernel without -O now causes
zillions of warnings about static inline functions because `inline'
is ignored without -O.
1996-09-21 01:51:11 +00:00
Paul Traina
4195b4af58 If the incomplete listen queue for a given socket is full,
drop the oldest entry in the queue.

There was a fair bit of discussion as to whether or not the
proper action is to drop a random entry in the queue.  It's
my conclusion that a random drop is better than a head drop,
however profiling this section of code (done by John Capo)
shows that a head-drop results in a significant performance
increase.

There are scenarios where a random drop is more appropriate.
If I find one in reality, I'll add the random drop code under
a conditional.

Obtained from: discussions and code done by Vernon Schryver (vjs@sgi.com).
1996-09-20 21:25:18 +00:00
Bruce Evans
253c0899b2 Don't include <sys/conf.h> for the kernel in disk-related headers.
It is needed for implementation details but very little of it is
needed for the interface.  Include it in the few places that didn't
already include it.

Include <sys/ioccom.h> in <sys/disklabel.h> (as already in
<sys/diskslice.h>) so that all the disk-related headers are almost
self-sufficient.
1996-09-20 17:39:44 +00:00
Bruce Evans
ec55e44ec8 Changed an arg name in the pseudo-prototype for bzero() to match
the prototype.

Put the jump table for i486_bzero() in the data section.  This
speeds up i486_bzero() a little on Pentiums without significantly
affecting its speed on 486's.

Don't waste time falling through 14 nop's to return from do1 in
i486_bzero().

Use fastmove() for counts >= 1024 (was > 1024).  Cosmetic.

Fixed profiling of fastmove().

Restored meaningful labels from the pre-1.1 version in fastmove().
Local labels are evil.

Fixed (high resolution non-) profiling of __bb_init_func().
1996-09-20 16:52:09 +00:00
Bruce Evans
a1971699ac Fixed lots of warnings from gcc-2.7.x about "left-hand operand of
comma expression has no effect" in the MAKE_SET() macro.  This also
fixes compiling with -O3 (which removes static functions unless
there is a suitable reference to them).  Declaring all the static
symbols as __unused would also fix the warning, but would be bogus
(they are used) and wouldn't fix -O3.  However, the dummy pointers
for the references waste about 1.5K text and 20K symbol space for
GENERIC.  This wastage hasn't changed - the dummy pointers are just
nonzero now.
1996-09-20 14:36:14 +00:00
David Greenman
eadd5e3a24 Fixed a bug in the receive buffer allocation code that resulted in a
panic if an mbuf cluster couldn't be allocated. This was caused by a
failure to re-initialize m_data when the old mbuf/mbcluster was recycled.
1996-09-20 11:05:39 +00:00
Paul Traina
9c4b2574d4 Handle ICMP codes defined in RFC1812 more appropriately 1996-09-20 08:23:54 +00:00
Nate Williams
d977b72dbd Whoops, I should've used the LINT config file. More ts -> tv changes
for timespec structure.
1996-09-20 05:56:36 +00:00
Nate Williams
95a1574e4f Whoops, I should've used the LINT config file. More ts -> tv changes
for timespec structure.
1996-09-20 05:51:12 +00:00
David Greenman
3163485ccc Add back shutdown support, this time using the at_shutdown() mechanism. 1996-09-20 04:35:15 +00:00
David Greenman
4a684684f4 When the devconf stuff was ripped out of the kernel, the ripper neglected
to deal with the fact that we relied on devconf to do the shutdown
callouts in various drivers. The changes in this commit are to add support
for device shutdown in this driver via the new at_shutdown() mechanism.
Similar changes need to be made to all of the other drivers that need
a shutdown routine called (if_de.c comes to mind immediately).
1996-09-20 04:11:53 +00:00
John Dyson
08c2c9ddf5 Fix an spl window, a page manipulation at interrupt time that was
incorrect, and correct the support for B_ORDERED.  The spl window
fix was from Peter Wemm, and his questions led me to find the problem with
the interrupt time page manipulation.
1996-09-20 02:26:35 +00:00
Poul-Henning Kamp
e6c4b9ba32 Add the utrace(caddr_t addr,size_t len) syscall, that will store the
data pointed at in a ktrace file, if this process is being ktrace'ed.
I'm using this to profile malloc usage.
The advantage is that there is no context around this call, ie, no
open file or socket, so it will work in any process, and you can
decide if you want it to collect data or not.
1996-09-19 19:49:13 +00:00
Nate Williams
030e2e9ebb In sys/time.h, struct timespec is defined as:
/*
         * Structure defined by POSIX.4 to be like a timeval.
         */
        struct timespec {
                time_t  ts_sec;         /* seconds */
                long    ts_nsec;        /* and nanoseconds */
        };

        The correct names of the fields are tv_sec and tv_nsec.

Reminded by:	James Drobina <jdrobina@infinet.com>
1996-09-19 18:21:32 +00:00
David Greenman
cd6eea255f Fixed bug with reversed trunc/round_page() in madvise...start must be
trunced, end must be rounded.
1996-09-19 10:12:41 +00:00
David Greenman
f9be9005ce Implemented a better, dynamic, mechanism for adjusting the transmit
threshold.
1996-09-19 09:15:20 +00:00
Poul-Henning Kamp
a6e173ca49 Various de-bogotifications of userconfig. 1996-09-19 08:32:37 +00:00
Poul-Henning Kamp
e8993539b8 Add APM_IDLE_CPU option, that is off by default.
I maintain that it saves more power to simply "hlt" the CPU than to
spend tons of time trying to tell the APM bios to do the same.
In particular if you do it 100 times a second...
1996-09-19 08:28:16 +00:00
Paul Traina
0570e4476a Add a new sysctl variable kern.sominqueue to override the MINIMUM queue
specified in a listen(2) system call.
1996-09-19 00:54:36 +00:00
David Greenman
7af18210c3 Increased transmit threshold to 1024 bytes to fix a problem with underruns
on machines with poor PCI performance.
1996-09-18 16:18:05 +00:00
John Dyson
f9da2540d2 Add needed spl protection, and some minor cleanups in vfs_vmio_release.
Submitted by:	Peter Wemm <peter@spinner.dialix.com> and me.
1996-09-18 15:57:41 +00:00
David Greenman
40e4ce5ab9 Updated driver to a newer version from Matt Thomas, preserving our local
changes. This version should fix a number of bugs such as with auto-
speed sensing and at least one known panic.

Submitted by:	Matt Thomas (matt@3am-software.com)
1996-09-18 14:44:31 +00:00
Steven Wallace
b3618bcf57 .TARGETOBJDIR has been removed from make and CANONICALOBJDIR set in
bsd.obj.mk.  Also, a make target called objwarn checks to see
if ${.OBJDIR} != ${.CURDIR} and ${.OBJDIR} != ${CANONICALOBJDIR}
and outputs a warning.  (No warning for the latter if MAKEOBJDIR or MAKEOBJDIRP
REFIX is set).  objwarn is called from all targets in bsd.prog.mk, bsd.kmod.mk,
and bsd.lib.mk.

Reviewed by:	bde
1996-09-18 06:09:19 +00:00
Peter Wemm
7b8830a51e Argh, I have had one "uid 0 on /: file system full" too many. The problem
is that it doesn't say _what_ did it! (the core dumped console message
is very useful for listing the process name and pid).  This adds similar
information.
1996-09-17 14:38:16 +00:00
Rodney W. Grimes
7ccde0654a Re-enable conf82371fb2 now that I have verified that it works, even if
it only prints 2 bits out of hundreds.  (Minimizing the diff between
-head and 2.1.5.)
1996-09-16 08:56:39 +00:00
Poul-Henning Kamp
1e882d2791 Fix something that has annoyed me since day one of userconfig: when the
<More> prompt receives a 'q', just abandon the list, the user wants out.
1996-09-15 19:35:23 +00:00
Bruce Evans
dd106ca742 Removed iprintf(). It was copied to db_iprintf() in ddb. 1996-09-15 11:24:21 +00:00
Bruce Evans
c7c34a24a3 Attached vm ddb commands show map', show vmochk', `show object',
`show vmopag', `show page' and `show pageq'.  Moved all vm ddb stuff
to the ends of the vm source files.

Changed printf() to db_printf(), `indent' to db_indent, and iprintf()
to db_iprintf() in ddb commands.  Moved db_indent and db_iprintf()
from vm to ddb.

vm_page.c:
Don't use __pure.  Staticized.

db_output.c:
Reduced page width from 80 to 79 to inhibit double spacing for long
lines (there are still some problems if words are printed across
column 79).
1996-09-14 11:54:59 +00:00
Bruce Evans
831031ce00 Attached simple external ddb commands show rtc', show pgrpdump'
and `show cbstat'.  The pgrpdump code was previously controlled by
`#ifdef DEBUG'.
1996-09-14 10:53:48 +00:00
Bruce Evans
6337f4efa8 Support statically attaching of ddb commands in non-ddb modules.
The details are hidden in the DB_COMMAND(cmd_name, func_name) and
DB_SHOW_COMMAND(cmd_name, func_name) macros.  DB_COMMAND() adds to
the top-level ddb command table and DB_SHOW_COMMAND adds to the
`show' subtable.  Most external commands will probably be `show'
commands with no side effects.  They should check their pointer
args more carefully than `show map' :-), or ddb should trap internal
faults better (like it does for memory accesses).

The vm ddb commands are temporarily unattached.

ddb.h:
Also declare `db_indent' and db_iprintf() which will replace vm's
`indent' and iprintf().
1996-09-14 09:13:15 +00:00
Bruce Evans
2e82980a4c Moved instantiation of `poff' to sys.c. It is no longer used in disk.c.
Saved a few bytes by copying `dosdev' and/or `name' to local variables.
This optimization (for dosdev) was done in one place before but this
was lost in the devread() cleanup.   This optimization (for dosdev)
can almost be done by bogusly declaring dosdev as const, but gcc still
often space-pessimizes code like the following:

	extern const int dosdev; ... foo(dosdev); bar(dosdev);

gcc often doesn't bother to copy dosdev to a temporary local because
the local would have to be preserved in memory across the call to
foo().  OTOH, for

	extern int dosdev; ... auto int dosdev_copy = dosdev; ...
		foo(dosdev_copy); bar(dosdev_copy);

the copy must be made because foo() might alter dosdev.
1996-09-14 07:41:00 +00:00
Bruce Evans
310abe0579 Removed declarations of recently deleted variables and cleaned up
#includes.
1996-09-14 07:38:14 +00:00
Bruce Evans
d154cceba7 Potentially saved a whole 4 bytes and reduced bogusness by eliminating
the pointer to the string "/kernel".  This pointer was once only
statically to once save space, but it has had to be dynamically
initialized for some time, so the static initialization just wastes
space.  The string gets moved to the text section, so the actual
savings may be negative due to padding.
1996-09-14 07:12:02 +00:00
John Dyson
8fdfa820e4 Clean up some more problems with freeing busy or wired pages. The
vfs_bio code was not waiting properly for page state until manipulating
it.
1996-09-14 04:40:33 +00:00
Bruce Evans
a7f8f2ab55 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.
1996-09-14 04:31:09 +00:00
Bruce Evans
4fab2f9bc7 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

pcvt_drv.c:
Partially fixed pccncheckc().  It returned a boolean value instead of
the character that it fetches from the input fifo (if any).  I think
it still discards characters after the first for multi-char input.
1996-09-14 04:30:32 +00:00
Bruce Evans
daed6ffd24 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

syscons.c:
Added missing spl locking in sccncheckc().  Return the same value as
sccngetc() would.  It is wrong for sccngetc() to return non-ASCII, but
stripping the non-ASCII bits doesn't help.
1996-09-14 04:27:46 +00:00
Bruce Evans
40b55a34ae Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.
1996-09-14 04:25:32 +00:00
Bruce Evans
8b3fb3e16d Removed another devconf leftover. A fat devconf support function was
still being used just to support printing of the device name in the
probe.  Restored the method used in rev.1.6 and changed it to print
the same strings as the previous revision.

Reviewed by:	Paul Richards
1996-09-14 01:26:16 +00:00
Bruce Evans
d966b8d1c4 Fixed Id. 1996-09-14 01:04:18 +00:00
Paul Traina
561c2ad31c Move TCPCTL_KEEPINIT to end of MIB list (sigh) 1996-09-13 23:54:03 +00:00
Paul Traina
7b40aa327d Make the misnamed tcp initial keepalive timer value (which is really the
time, in seconds, that state for non-established TCP sessions stays about)
a sysctl modifyable variable.

[part 1 of two commits, I just realized I can't play with the indices as
 I was typing this commit message.]
1996-09-13 23:51:44 +00:00
Paul Traina
7ff19458de Receipt of two SYN's are sufficient to set the t_timer[TCPT_KEEP]
to "keepidle".  this should not occur unless the connection has
been established via the 3-way handshake which requires an ACK

Submitted by:	jmb
Obtained from:	problem discussed in Stevens vol. 3
1996-09-13 18:47:03 +00:00
Bruce Evans
fc0b1dbf68 Don't use __dead in the kernel. It was an obfuscation for gcc >= 2.5
and a no-op for gcc >= 2.6.
1996-09-13 09:20:15 +00:00
Bruce Evans
c254b6e8db Made debugging code (pmap_pvdump()) compile again so that I can test LINT.
I don't know if it actually works.
1996-09-13 07:10:00 +00:00
Bruce Evans
fddbd6ddb8 Removed another devconf leftover.
Fixed a new #include style bug.
Removed an unused #include.
1996-09-13 06:48:21 +00:00
Bruce Evans
5a175c1c5d Don't compile a 256-byte unused table in the pca driver.
The other 256-byte table in ulaw.h still gets duplicated if both
pca and snd are configured.
1996-09-13 06:29:30 +00:00
Bruce Evans
cefdbb0448 Added undocumented option SPX_HACK. 1996-09-13 05:54:39 +00:00
John Dyson
9fc1279b79 A modification that allows the driver strategy to modify the
B_ASYNC flag broke things pretty bad (freeing buffer already on
queue or other wierd buffer queue errors.)  The broken code is
left in commented out, but this makes the problem go away for
now.
1996-09-13 03:15:45 +00:00
Satoshi Asami
07aacf5723 Back out typo introduced by latest commit.
Corrected by:	Michio "Karl" Jinbo <karl@marcer.nagaokaut.ac.jp>
1996-09-12 11:36:09 +00:00
Satoshi Asami
0e408c25a1 Another round of merge/update.
(1) Add PC98 support to apm_bios.h and ns16550.h, remove pc98/pc98/ic
(2) Move PC98 specific code out of cpufunc.h (to pc98.h)
(3) Let the boot subtrees look more alike

Submitted by:	The FreeBSD(98) Development Team
		<freebsd98-hackers@jp.freebsd.org>
1996-09-12 11:12:18 +00:00
John Dyson
dba940b46e Primarily a fix so that pages are properly tracked for being
modified.  Pages that are removed by the pageout daemon were
the worst affected.  Additionally, numerous minor cleanups,
including better handling of busy page table pages.  This
commit fixes the worst of the pmap problems recently introduced.
1996-09-12 04:54:55 +00:00
Bruce Evans
caa05533fb Added a struct tag `fsid' for fsid_t so that sysproto.h can declare
prototypes for the lfs syscalls without having to include <sys/mount.h>
and its nested spam.
1996-09-12 03:16:34 +00:00
Poul-Henning Kamp
96fc6efbe3 Make userconfig two (default: on) options:
USERCONFIG to enable
	VISUAL_USERCONFIG to get the gui stuff too.
Requested by: pst
1996-09-11 19:53:45 +00:00
Poul-Henning Kamp
078e82404e The intended usage is:
cat /usr/mdec/rawboot /sys/compile/FOO/kernel | fdwrite

That should explain it all  :-)
1996-09-11 19:25:12 +00:00
Poul-Henning Kamp
b679d552d3 Add #ifdef for RAWBOOT.
remove some #if 0 stuff.
1996-09-11 19:23:11 +00:00
Poul-Henning Kamp
8b5d3828b2 Add "rawboot", sort the subdirs. 1996-09-11 19:22:21 +00:00
Nate Williams
aa5167c963 Fixed so that the card will go into promiscuous mode for BPF.
Submitted by:	Bill Kish <kish@osf.org>
1996-09-11 16:11:21 +00:00
Julian Elischer
99e76479b5 bzero the entire at_ifaddr struct we malloc, not just the first part of it.. 1996-09-11 09:38:52 +00:00
Julian Elischer
99892d2317 fix the ability of the VFS to reclaim devfs nodes correctly..
(was resulting in panics, especially when DIAGNOSTIC was set.)
1996-09-11 07:52:18 +00:00
Julian Elischer
04812bca5a chnages to bring atlak a bit more into the BSD4.4 world and to
(more) properly keep track of the allocation and freeing of
interface address structures.
1996-09-11 04:56:24 +00:00
John Dyson
690db31d04 A minor fix to the new pmap code. This might not fix the global problems
with the last major pmap commits.
1996-09-11 03:46:41 +00:00
Bruce Evans
28eda575a7 Restored a non-devconf comment that was removed with devconf. 1996-09-10 23:37:52 +00:00
Bruce Evans
b568ea4e01 Removed more devconf leftovers. 1996-09-10 23:31:13 +00:00
Bruce Evans
dad0de774e Removed bogus LARGMEM code and option. The code paniced when
biosextmem > 65536, but biosextmem is a 16-bit quantity so it is
guaranteed to be < 65536.  Related cruft for biosbasemem was
mostly cleaned up in rev.1.26.
1996-09-10 23:07:04 +00:00
John Dyson
0463028c37 Fix a problem with child inheritance of sysv shm. Problem brought
to my attention by Brad Lineberger <bil@mpgn.com> and Rob Miracle.
1996-09-10 22:35:25 +00:00
Bruce Evans
683cbdf4af Fixed spelling of new SC_KBD_PROBE_WORKS option in options.i386.
It worked because it is spelled correctly in LINT.

Added old obscure syscons options MAXCONS, SLOW_VGA and XT_KEYBOARD.
This file should be sorted both alphabetically and on the module
name by using a consistent prefix for each module, but there is no
consistency in the old options.  E.g., MAXCONS is spelled PCVT_NSCREENS
for pcvt.
1996-09-10 21:38:47 +00:00
Poul-Henning Kamp
980b7c9573 Rather than adding more gunk here, clean some of it up:
devread() had a bogus interface, cleaned up.
	Bread() did an unneeded bcopy(), don't.
Saves 80 bytes and some time.
1996-09-10 21:18:40 +00:00
Peter Wemm
9545a0eaa4 Hack workaround XFree86 switching failure when used with /dev/sysmouse
and xdm, possibly in general.

What was happening was that the server was doing a tcsetattr(.. TCSADRAIN)
on the mouse fd after a write.  Since /dev/sysmouse had a null t_oproc,
the drain failed with EIO.  Somehow this spammed XFree86 (!@&^#%*& binary
release!!), and the driver was left in a bogus state (ie: switch_in_progress
permanently TRUE).

The simplest way out was to implement a dummy scmousestart() routine to
accept any characters from the tty system and toss them into the void.

It would probably be more correct to intercept scwrite()'s to the mouse
device, but that's executed for every single write to the screen.
Supplying a start routine to eat the characters is only executed for the
mouse port during startup/shutdown, so it should be faster.
1996-09-10 19:14:49 +00:00
Bruce Evans
80f495ec7e Backed out last change. It depends on the future change of adding
-I- to CFLAGS.  <sb.h> must currently be used to give the version
of sb.h in the current directory, while "sb.h" in the buggy version
gave the (wrong) version in the source directory.  Searching in the
source directory first is normal, but is the reverse of the order
suggested by the 4.4Lite2 #include style.  -I- will remove the
ambiguities.
1996-09-10 19:09:12 +00:00
Satoshi Asami
29dde1ef71 More merge. Change "pc98" to "isa" in a few places. Misc. cleanup.
Add some more devices to userconfig.c.

Submitted by:	The FreeBSD(98) Development Team
1996-09-10 09:39:22 +00:00
Bruce Evans
f313170d3c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
Julian Elischer
b0a76b8898 No code changes what so ever, but added about 150 lines of comments
Sorry if this makes it harder to merge in lite2 stuff but hey..
At least I can figure out what is going on whenever I end up going through those
files again..

do we have a policy regarding commenting existing code?
1996-09-10 07:10:05 +00:00
John Dyson
9fea9a6f5b The whole issue of not support VOP_LOCK for VBLK devices should be
rethought.  This fixes YET another problem with unmounting filesystems.
The root cause is not fixed here, but at least the problem has gone
away.
1996-09-10 05:28:23 +00:00
John Dyson
ae9b8c3a66 Make sure that the pager is allocated before it is needed. Hangs
can occur if the pager is not allocated in time.
1996-09-10 01:42:34 +00:00
Garrett Wollman
f87313106d Set subnetsarelocal to false. In a classless world, the other case
is almost never useful.  (This is only a quick hack; someone should
go back and delete the entire subnetsarelocal==1 code path.)
1996-09-09 20:17:24 +00:00
Søren Schmidt
b1538b1658 The poor nsccons variable was gone agian this time hidden by
an ifdef , wonder who broke it this time :)

Submitted by:	 ache
1996-09-09 19:02:26 +00:00
Rodney W. Grimes
8b3cbd0cef Remove the portion of revision 1.36 that added the #ifdef's for CPU
types as per discussions with Stefan Esser.
1996-09-09 06:09:45 +00:00
John Dyson
4334b0d815 Fixed the use of the wrong variable in vm_map_madvise. 1996-09-08 23:49:47 +00:00
Søren Schmidt
47382cd1e0 Make syscons replicate a mousesystems mouse on minor 128..
This enables other consumers of the mouse, to get it info via
moused/syscons.
In order to use it run moused (from sysconfig), and then tell
your Xserver that it should use /dev/sysmouse (mknod sysmouse c 12 128)
and it a mousesystems mouse. Everybody will be happy then :)
Remember that moused still needs to know what kind of mouse you
have..

Comments welcome, as is test results...
1996-09-08 21:31:56 +00:00
John Dyson
5070c7f8c5 Addition of page coloring support. Various levels of coloring are afforded.
The default level works with minimal overhead, but one can also enable
full, efficient use of a 512K cache.  (Parameters can be generated
to support arbitrary cache sizes also.)
1996-09-08 20:44:49 +00:00
John Dyson
b8e251a56d Improve the scalability of certain pmap operations. 1996-09-08 16:57:53 +00:00
David Greenman
e7c819442a Dequeue mbuf before freeing it. Fixes mbuf leak and a potential crash when
handling IP fragments.

Submitted by:	Darren Reed <avalon@coombs.anu.edu.au>
1996-09-08 13:45:49 +00:00
Poul-Henning Kamp
40f3771f7f Various cleanups for remanents of devconf. 1996-09-08 10:44:18 +00:00
Søren Schmidt
fa630ea6eb Fixed another little both in the devconf removal. 1996-09-08 10:28:23 +00:00
Jordan K. Hubbard
885e672626 Finish what phk started here in removing devconf. The ATAPI_STATIC case
was still broken, as was the normal case since atapi_attach() was called
internally.
1996-09-08 01:31:27 +00:00
Bruce Evans
a7265255cc Fixed another easy case of const poisoning in the kernel. Cosmetic.
(A pointer to a const was misused to avoid loading loading the same
value twice, but gcc does exactly the same optimization automatically.
It can see that the value hasn't changed.)
1996-09-07 21:47:53 +00:00
Bruce Evans
ec7ada96e6 Preserve volatility in casts of np->reg. Cosmetic. 1996-09-07 21:27:24 +00:00
Bruce Evans
24c074ad8d Remove boot2 when the size test fails so that rebuilding without fixing
the problem doesn't bogusly succeed.

Print size failures to stderr instead of stdout and don't print bells
and whistles.
1996-09-07 21:16:44 +00:00
Bruce Evans
6074a34497 Saved 48 bytes (46 before padding) using assorted nano-optimizations:
- avoiding strcmp("?" saved 12 bytes.  gcc inlined the strcmp()
  but this takes as much or more code as a function call.  The
  inlining was bogus because the strcmp() in the bootstrap isn't
  standard.

- using a char instead of an int for the boolean `last_only' saved 8
  bytes.  Booleans should usually be represented as chars on the i386.

- simplifying the return tests saved 9 bytes.

- using putc instead of printf to print a newline saved 3 bytes of code
  and 2 bytes of const data.

- avoiding `else's by always doing the else clause and fixing it up
  saved 4+8 bytes.
1996-09-07 21:06:43 +00:00
Bruce Evans
ae6e81ef56 Saved 48 bytes (56 before padding) by moving a variable declaration.
gcc always generates large code for accesses to globals.  For locals
it only generates large code if there are more than 128 bytes of
locals.  It sorts scalar locals after array locals to pessimize for
space in the usual case when there are more (static) references to
scalars than to arrays.

Saved another 16 bytes (13 before padding) by adding a `continue'.

Fall-through tests normally save space, but here one of them made
gcc do space-unoptimal register allocation (it allocates ch in %bl
because preserving this register across function calls is "free",
but comparisions with %bl take one byte fewer than comparsions with
%bl).
1996-09-07 20:18:04 +00:00
Søren Schmidt
9191680051 Fixed two small leftovers form PHK's mega devconf removal commit.. 1996-09-07 19:13:09 +00:00
Nate Williams
8d250e2915 Disable 'suspend' as it tends to lockup computers with the current APM
driver.
1996-09-07 17:52:56 +00:00
Nate Williams
7d674f8643 Unused file. 1996-09-07 17:51:54 +00:00