Commit Graph

5508 Commits

Author SHA1 Message Date
Satoshi Asami
52faebb233 Add missing "int" to static var. 1996-04-24 09:42:22 +00:00
John Dyson
0891ef4c9a This fixes kmem_malloc/kmem_free (and malloc/free of objects of > 8K).
A page index was calculated incorrectly in vm_kern, and vm_object_page_remove
removed pages that should not have been.
1996-04-24 04:16:45 +00:00
Nate Williams
2922666380 - This code adds some backwards compatability hacks for buggy APM BIOS
implementations, and synchronizes us with the Nomad's latest code.

This code is based on the Nomad code, but heavily hacked by me.

Reviewed by:	phk
Submitted by:	the 'Nomads'
1996-04-23 19:59:14 +00:00
Nate Williams
e12ac36c96 Format the already applied PCCARD additions to use KNF form. No
functional changes.
1996-04-23 18:36:56 +00:00
Nate Williams
ceff12b4c4 Adds the APM hooks into the generic pccard kernel files. With this code
in place device drivers can now register power-down/power-up routines so
that we can use common routines to power-up/power-down cards for
insert/removals, suspend/resume, etc..

Reviewed by:	phk
Submitted by:	the 'Nomads'
1996-04-23 16:03:08 +00:00
Justin T. Gibbs
c0eccc00c8 Fix second instance of the inb type when getting the current sequencer address.
Submitted by:	Nate Williams <nate@sri.MT.net>
1996-04-23 04:47:02 +00:00
Justin T. Gibbs
ff3f23849e Fix a typo in the RESTART_SEQUENCER macro that could have caused
strange results.  This  bug has been in here for a loooong time.
Many thanks to Pedro Salenbauch for finding this.

Submitted by:	pedrosal@nce.ufrj.br (Pedro Salenbauch)
1996-04-23 04:22:41 +00:00
Nate Williams
b34b86510b Updated the laptop 'kludge' file. Hopefully this can go away soon.
Submitted by:	The 'Nomads'
1996-04-22 22:29:40 +00:00
Nate Williams
e597b4972e - add apm to the GENERIC kernel (disabled by default), and add some comments
regarding apm to LINT
- Disabled the statistics clock on machines which have an APM BIOS and
  have the options "APM_BROKEN_STATCLOCK" enabled (which is default
  in GENERIC now)
- move around some of the code in clock.c dealing with the rtc to make
  it more obvios the effects of disabling the statistics clock

Reviewed by:	bde
1996-04-22 19:40:28 +00:00
Justin T. Gibbs
91e2481238 The default number of tags in the SCB paging case was supposed to be
8 not the 18 I was using during some of my own testing.  Ooops.

For those that want to change the number for experimentation, you can
set the value on line 1553 of this file.
1996-04-22 13:21:40 +00:00
John Dyson
7847cec1b7 This fixes a troubling oversight in some of the pmap code enhancements.
One of the manifiestations of the problem includes the -4 RSS problem
in ps.

Reviewed by: dyson
Submitted by: Stephen McKay <syssgm@devetir.qld.gov.au>
1996-04-22 05:23:08 +00:00
Bruce Evans
e2184122c5 Fixed in-line IP header checksumming. It was performed on the wrong header
in one case.
1996-04-21 13:47:43 +00:00
Justin T. Gibbs
bb0877f67f Add PCI IDs for the aic7860 (basically an aic7850 Ultra) and the aic7855
(HP motherboard aic7850 controllers).

Properly handle 4 bit controller SCSI IDs.

Update my copyright.
1996-04-20 21:31:27 +00:00
Justin T. Gibbs
102d19a473 Implement SCB paging which allows up to 255 active commands on aic7770
(Rev E or greater), aic7850, aic7860, aic7870, and aic7880 controllers.
SCB paging is enabled with the option "AHC_SCBPAGING_ENABLE".  Full
comments on the algorithm are at the top of i386/scsi/aic7xxx.c.

options "AHC_TAGENABLE" and "AHC_QUEUE_FULL" have been removed.  The
default is 4 tags without SCB paging, 8 with.

Clear the SCSIRSTI bit after throwing a bus reset.  Some cards seem to get
confused otherwise.

Handle SCSIRSTI interrupts before checking to see if there is a valid
SCB in use since this can happen. (Clears PR# i386/1123)

Clean up the way we determine the number of SCBs on the card
(courtesy of Dan Eischen).

Guard against attempts to negotiate wide to a narrow controller.

Fix some comments.

Update my copyrights.
1996-04-20 21:29:27 +00:00
Justin T. Gibbs
1d7ded8adf Change the devconf description from "ISA or EISA bus" to "ISA bus" now
that we have eisaconf.
1996-04-20 21:22:32 +00:00
Justin T. Gibbs
035de5ccf1 Turn on SCB paging for aic7770 chips rev E or greater.
Update my copyrights.
1996-04-20 21:21:50 +00:00
Justin T. Gibbs
0a44712261 Implement SCB paging. This allows up to 255 active commands on
aic7770 >= Rev E, aic7850, aic7860, aic7870, and ai7880 based controllers.

Make findSCB safer for non-tagged commands when tagged commands are
active on the controller.  The symptoms of this problem were
"Overlapped commands attempted" messages during error recovery
attempts.

Compact scratch ram usage.  This leaves 8 bytes free for future use.

Clean up some comments.

aic7xxx_reg.h:
Update my copyright.
1996-04-20 21:20:31 +00:00
Bruce Evans
10d245c58a Yet more b_flags fixes. The previous ones broke the clearing of B_DONE
and B_READ before writing.  This was was fatal.  They also broke the
clearing of B_INVAL before doing i/o.  This didn't actually matter.

Submitted by:	mostly by joerg
1996-04-19 19:34:19 +00:00
Bruce Evans
3f64564278 Fixed removal of devfs entries for the real slice corresponding to the
compatibility slice.  They were forgotten on last-close and then
creating them on first-open failed.

Devfs entries for slices other than the one containing the root file
system are still invisible unless you open a non-devfs inode on the
slice.
1996-04-19 19:22:29 +00:00
Bruce Evans
8a4599117b Don't include <sys/types.h> when it isn't used.
This commit covers most of the ANSI library functions. Many others only
need <sys/types.h> because they use u_xxx.
1996-04-19 18:40:25 +00:00
Bruce Evans
87b620baa9 Don't depend on <sys/types.h> including <sys/cdefs.h>. 1996-04-19 17:39:57 +00:00
Poul-Henning Kamp
6f1e6c97de savectx returns through cpu_switch in case of the child, so it must
return void just like cpu_switch.  Fix prototype and usage from machdep.c
1996-04-19 07:28:04 +00:00
Poul-Henning Kamp
6523110494 Whoops, shouldn't really have been here, but what the heck: remove some
stale comments.
1996-04-18 21:37:43 +00:00
Poul-Henning Kamp
7d2392141d Fix a bogon. cpu_fork & savectx ecpected cpu_switch to restore %eax,
they shouldn't.
1996-04-18 21:34:53 +00:00
Nate Williams
d94b029324 - Save/restore the FS data segment.
Reviewed by:	bde
1996-04-18 19:22:59 +00:00
Nate Williams
ff35cfa1f0 - Addition of my name to the APM Copyright
- More code cleanups
- #ifdef DEBUG debugging code
- More consistant printfs
- Better handling of the apm_int() assembly code (mostly from Bruce Evans)

Reviewed by:	bde
1996-04-18 19:21:47 +00:00
Garrett Wollman
9c9137ea6c Three speed-ups in the output path (two small, one substantial):
1) Require all callers to pass a valid route pointer to ip_output()
   so that we don't have to check and allocate one off the stack
   as was done before.  This eliminates one test and some stack
    bloat from the common (UDP and TCP) case.

2) Perform the IP header checksum in-line if it's of the usual length.
    This results in about a 5% speed-up in my packet-generation test.

3) Use ip_vhl field rather than ip_v and ip_hl bitfields.
1996-04-18 15:49:06 +00:00
Garrett Wollman
61e5033f0a Define a few macros useful in the _IP_VHL case. 1996-04-18 15:42:50 +00:00
Garrett Wollman
dbe4b3f026 Fix a warning by not referencing ip_output() as a pr_output() member. 1996-04-18 15:41:51 +00:00
Garrett Wollman
2eba88186e Always call ip_output() with a valid route pointer. For igmp, also get the
multicast option structure off the stack rather than malloc.
1996-04-18 15:41:11 +00:00
Garrett Wollman
97f588a78b Add an inline function to compute the common-case IP header checksum. 1996-04-18 15:39:27 +00:00
Nate Williams
6bb76283e0 Added a disabled psm0 (PS/2) mouse device, using the new 'disable'
keyword.
1996-04-18 04:02:30 +00:00
Sujal Patel
0e3eb7ee6c Implement the RFNOWAIT flag for rfork(). If set this flag will cause the
forked child to be dissociated from the parent).

Cleanup fork1(), implement vfork() and fork() in terms of rfork() flags.

Remove RFENVG, RFNOTEG, RFCNAMEG, RFCENVG which are Plan9 specific and cannot
possibly be implemented in FreeBSD.

Renumbered the flags to make up for the removal of the above flags.

Reviewed by:	peter, smpatel
Submitted by:	Mike Grupenhoff <kashmir@umiacs.umd.edu>
1996-04-17 17:05:08 +00:00
Paul Traina
4f789210dc Support FreeBSD v2.1 1996-04-17 09:37:17 +00:00
Paul Traina
60b0febdbf Add in linux support for the quickcam driver bottom half and
add a new "invasive camera scan" option for folks who have weird
cameras or weird parallel ports.
1996-04-17 09:00:53 +00:00
David Greenman
46f578e76a Fix for PR #1146: the "next" pointer must be cached before calling soabort
since the struct containing it may be freed.
1996-04-16 03:50:08 +00:00
David Greenman
2d8266af5c Two fixes from Rich Stevens:
1) Set the persist timer to help time-out connections in the CLOSING state.
2) Honor the keep-alive timer in the CLOSING state.

   This fixes problems with connections getting "stuck" due to incompletion
of the final connection shutdown which can be a BIG problem on busy WWW
servers.
1996-04-15 03:46:33 +00:00
Stefan Eßer
68159c8901 Update PCI bus code from my current sources:
- always use pci_conf_read() and pci_conf_write(). (This is required to
  simulate non-existant devices in my system for PCI bridge code tests.)

- reorder some functions (put the main functions at the end).

- correct off by one bug in the code dealing with unitialized PCI to PCI
  bridge chips. (Bug found by ASAMI Satoshi.)

- print function number for multi-function devices.
1996-04-14 20:14:36 +00:00
Poul-Henning Kamp
3fc8f9c5af Now that I have started to use netboot, I see what is missing...
Load symbols and set boot args more nicely.
1996-04-14 09:54:14 +00:00
Bruce Evans
70342cd45a Fixed handling of device flags. The real flags were never used.
Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
1996-04-13 18:33:04 +00:00
Bruce Evans
a74080cc94 Oops, include opt_pcvt_hdr.h before the key value in it is used. 1996-04-13 16:59:29 +00:00
Bruce Evans
803dda1724 Fixed `PCVT_FREEBSD=210'. 1996-04-13 16:50:23 +00:00
Bruce Evans
aef18d6ed7 Another try: fixed bogus change of the fifo settings for the non-speed of 0.
rev.1.30 incorrectly changed the behaviour from always disabling the fifo
to always enabling it.
1996-04-13 14:55:18 +00:00
John Hay
01a95d942e Don't use a newfangled auto initializer. Initialize everything by
assignment to avoid one bug and several pessimizations.

In the old version, gcc-2.6.3 (i386 version) generates 16 bytes
of static data and copies it using 4 4-byte load-stores.  gcc-2.7.2
generates 2 1-byte stores and calls memset() to zero 14 bytes.
Linking fails because memset() doesn't exist in the kernel.

In both versions, the 2 bytes stored directly are all that is
actually used unless the null padding at the end is used, since
the 3 4-byte words in the middle are initialized again by struct
assignment.  These words are misaligned.  gcc generates misaligned
load-stores for (small) misaligned struct copies.

Submitted by:	Bruce Evans
1996-04-13 14:37:22 +00:00
Bruce Evans
c9b9c54d1f Changed _BSD_PID_T_ from long to int. Lite2 changed pid_t from long to
int32_t in <sys/types.h> but this change was missed when the Lite2 types
were merged.
1996-04-13 14:25:06 +00:00
Bruce Evans
3e1b047417 Changed noreturn' to __noreturn__' so that all headers don't break if
an application #defines `noreturn'.

Changed one instance of `const' similarly.  This is less like to be a
problem since applications shouldn't #define `const', and the common
hack of #defining `const' as nothing gives harmless (?) null attributes
instead of syntax errors.

Fixed comments on #endifs to match code.
1996-04-13 14:23:29 +00:00
Poul-Henning Kamp
61220614a8 Fix a longstanding bug and a buglet of no significance.
Now net.ipx works.

Noticed by:	John Hay -- John.Hay@csir.co.za
1996-04-13 13:28:54 +00:00
Bruce Evans
bc9eb1f2fe Eliminated sloppy common-style declarations. Now there are no duplicated
common labels for LINT.  There are still some common declarations for the
!KERNEL case in tcp_debug.h and spx_debug.h.  trpt depends on the ones in
tcp_debug.h.
1996-04-13 12:53:53 +00:00
Bruce Evans
c5294719c3 Eliminated sloppy common-style declarations. Now there are no duplicated
common labels for LINT.  There are still some common declarations for the
!KERNEL case in tcp_debug.h and spx_debug.h.  trpt depends on the ones in
tcp_debug.h.
1996-04-13 12:45:57 +00:00
Bruce Evans
65a59d4b3f Declared `unittab' as static. It was bogusly shared between the asc and
gsc drivers.
1996-04-13 12:18:45 +00:00
Jordan K. Hubbard
39cef8f8cb Document how to drop into DDB from a serial console. 1996-04-13 11:57:18 +00:00
Bruce Evans
0513ce7f75 Use PCB_SAVEFPU_SIZE instead of a too-small size in savectx(). This
bug only affected FPU emulators.  It might have caused bogus FPU states
in core dumps and in the child pcb after a fork.  Emulated FPU states
in core dumps don't work for other reasons, and the child FPU state
is reinitialized by exec, so the problem might not have caused any
noticeable affects.

Cleaned up #includes.
1996-04-13 11:24:13 +00:00
Bruce Evans
5b5220556d Generate #define of PCB_SAVEFPU_SIZE for use in savectx(). 1996-04-13 11:22:57 +00:00
John Hay
d80101ee8e Improve the handling of receive errors. Fix a nasty bug in the receive
buffer code.
1996-04-12 19:57:44 +00:00
Poul-Henning Kamp
22a31706dc Make alltraps a .globl so that DDB doesn't make people belive they have
an ALIGNFLT on their hands all the time.
1996-04-12 12:22:14 +00:00
Poul-Henning Kamp
539e53bad3 Fix a bogon I introduced with my last change.
Submitted by:	Andreas Klemm <andreas@knobel.gun.de>
1996-04-12 09:24:22 +00:00
Wolfram Schneider
5ce6c3cfe2 remove variables KMODGRP?=, KMODOWN?=, KMODMODE?=
replace ${BIN*} variables with ${KMOD*} variables

cleanup manpage code

include bsd.obj.mk
remove targets clean, cleandir, obj (included by bsd.obj.mk)
1996-04-11 23:03:10 +00:00
Bruce Evans
3745f80a48 Moved AUTO_EOI_[12] and most sio and pcvt options out of the makefile. 1996-04-11 21:18:49 +00:00
Bruce Evans
bd105bb750 Fixed a spl hog. The vmdaemon process ran entirely at splhigh. It
sometimes disabled clock interrupts for 60 msec or more on a P133.
Clock interrupts were lost ...

Reviewed by:	dyson
1996-04-11 21:05:25 +00:00
Bruce Evans
78d7e629bf Spell cpu_switch() with an i in a comment. 1996-04-11 20:56:29 +00:00
Bruce Evans
79299e416a Fixed the PF_REMOTE case of ptcwrite(). I broke it in rev.1.22. Output
was duplicated until the canq filled up, and write() normally returned 0.
This case is apparently rare.  It was reported for Jove's shell buffer in
PR 1130.
1996-04-11 18:43:37 +00:00
Sujal Patel
e04401bad1 Added a note about OPTi 82C929 based cards.
Clarified GUS DMA Settings.
Other misc. changes.

This should hold us over until I can finish cleaning up TASD, and finish
reintegrating all of the FreeBSD changes to the sound driver.  At that time
this document will be removed, and it's information moved to the handbook.
1996-04-11 15:34:22 +00:00
David Greenman
06fc5af99c When cslip gets an uncompressed packet, it attempts to save off the TCP/IP
header for use in decompressing subsequant packets. If cslip gets garbage
(such as what happens when there is a port speed mismatch or modem line
noise), it will occasionally mistake the packet as a valid uncompressed
packet. When it tries to save off the header, it doesn't bother to check
for the validity of the header length and will happily clobber not only
the cslip data structure, but parts of other kernel memory that happens
to follow it...causing, ahem, undesired behavior.
1996-04-11 06:46:24 +00:00
Marc G. Fournier
97bc0f09cf Added documentation for "options PAS_JOYSTICK_ENABLE" 1996-04-11 06:23:18 +00:00
Marc G. Fournier
77959e8ea4 mentioned support for enabling gameport on ProAudio Spectrum with
appropriately commented out "options" line for PAS_JOYSTICK_ENABLE
(PR#i386/960 - partial closer)
1996-04-11 06:19:44 +00:00
Jordan K. Hubbard
7506b46e07 Disable sio3 in GENERIC - it messes with ATI cards. 1996-04-10 23:03:36 +00:00
Marc G. Fournier
6d4bca5b8a removed RS_IBUFSIZE #ifndef - have been informed it was a bad idea 1996-04-10 18:09:58 +00:00
Nate Williams
9368fc2012 hp300 -> i386 1996-04-10 05:27:11 +00:00
Marc G. Fournier
f4f119017f Placed an #ifndef around RS_IBUFSIZE so that it can be changed in the
config file ... PR#528 is reportly fixed by adding 'options RS_IBUFSIZE=1024'
to the config file
1996-04-10 04:18:36 +00:00
Jordan K. Hubbard
dbb315cb8e Gag! Somebody removed the bus mouse from GENERIC for reasons unknown.
That certainly explains why I noticed it suddenly missing from the
2.2 SNAPSHOT! :-)
1996-04-09 09:00:41 +00:00
Paul Traina
d78a37ad5a Logging UDP and TCP connection attempts should not be enabled by default.
It's trivial to create a denial of service attack on a box so enabled.

These messages, if enabled at all, must be rate-limited. (!)
1996-04-09 07:01:53 +00:00
John Dyson
d3a3498598 Reinstitute the map lock for processes being swapped out. This
is needed because of the vm_fault used to bring the page table page
for the kernel stack (UPAGES) back in.  The consequence of the
previous incorrect change was a system hang.
1996-04-09 04:36:58 +00:00
Sujal Patel
c755a8837c Added isa_dmadone() to fix the errors the sound driver has been complaining
about.

Update driver to use isa_dma_acquire() and isa_dma_release()
1996-04-08 19:42:07 +00:00
Sujal Patel
100f78bbe0 Update drivers to use isa_dma_acquire() and isa_dma_release()
Reviewed by:	bde
1996-04-08 19:40:57 +00:00
Sujal Patel
1dce4e5d60 Add a lock for DMA Channels to prevent two devices from using the same DMA
channel at the same time.  The functions isa_dma_acquire() and
isa_dma_release() should be used in all ISA drivers which call isa_dmastart().
This can be used more generally to register the usage of DMA channels in
any driver, but it is required for drivers using isa_dmastart() and friends.

Clean up sanity checks, error messages, etc.
Remove isa_dmadone_nobounce(), it is no longer needed

Reviewed by:	bde
1996-04-08 19:38:57 +00:00
Garrett Wollman
dadd5f3a95 Added a $Id$ keyword. Bruce still needs to put a copyright notice
on this file.
1996-04-08 16:41:06 +00:00
Poul-Henning Kamp
a925b654ee Replace usage of buf->b_actf with queue.3 and buf->b_act. 1996-04-08 07:56:42 +00:00
Poul-Henning Kamp
b96b6bb1e6 Replace usage of buf->b_actf by queue.3 and buf->b_act 1996-04-08 07:54:51 +00:00
Poul-Henning Kamp
d19287f2e9 Add five macros to TAILQ family to improve readability. 1996-04-08 07:51:57 +00:00
John Dyson
b5cfb15fad Map lock checks not needed anymore for swapping out. We don't use
map operations for it anymore.  Certain deadlocks should never happen
anymore.
1996-04-08 03:42:01 +00:00
David Greenman
58b248e254 Removed sections 3 and 4 from my copyright. 1996-04-08 01:31:42 +00:00
David Greenman
d40802692e Killed sections 3 and 4 of my copyright as I think it is unnecessarily
restrictive.
1996-04-08 01:25:22 +00:00
David Greenman
39f70d4545 Killed sections 3 and 4 of my copyright as I don't agree with it (I believe
it to be unnecessarily restrictive). For tty_subr.c, update to my standard
copyright.
1996-04-08 01:22:00 +00:00
Poul-Henning Kamp
d4893bd812 remove b_actb, it's not used anywhere. 1996-04-07 22:12:25 +00:00
Bruce Evans
3fd674e22b Use breakpoint() function instead of inline assembler. 1996-04-07 18:34:59 +00:00
Bruce Evans
5dbd168e2e Changed bdb() to breakpoint() and always enable it.
Made the style more consistent, especially for the new Pentium functions.
1996-04-07 18:30:56 +00:00
Bruce Evans
bc4750691c Use rdtsc() function instead of inline essembler. 1996-04-07 18:16:26 +00:00
Bruce Evans
4165cacd4f Changed #includes of <i386/include/foo.h> to #includes of <machine/foo.h>. 1996-04-07 17:56:53 +00:00
Bruce Evans
5670f8fbd7 Changed #includes of <i386/include/foo.h> to #includes of <machine/foo.h>. 1996-04-07 17:50:10 +00:00
Bruce Evans
6ffde942bf Removed never-used #includes of <machine/cpu.h>. Many were apparently
copied from bad examples.
1996-04-07 17:39:28 +00:00
Bruce Evans
3157adc8af Removed now-unused #includes of <machine/cpu.h>. They were for bootverbose
being declared in the wrong place.
1996-04-07 17:32:42 +00:00
Bruce Evans
c1263076e3 Removed unused declaration of bootverbose. 1996-04-07 17:03:12 +00:00
Bruce Evans
ae58fb1c43 systm.h:
Moved declaration of bootverbose to a better place.  It isn't
machine-dependent.

proc.h:
Moved declaration of cpu_fork() to a better place.  Only its
implementation is machine-dependent.
1996-04-07 16:46:28 +00:00
Bruce Evans
860ff32995 Moved declaration of bootverbose to a better place. Externs should
only be declared in headers.
1996-04-07 16:45:36 +00:00
Bruce Evans
73dc05d67c Moved declaration of bootverbose to a better place. It isn't
machine-dependent.

Moved declaration of cpu_fork() to a better place.  Only its
implementation is machine-dependent.
1996-04-07 16:44:28 +00:00
Bruce Evans
92ff4bb0e7 Declared pgrpdump() properly. 1996-04-07 16:16:05 +00:00
Bruce Evans
5e0f6c4338 Fixed the ownership and permissions of /dev/io. Rev.1.32 broke rev.1.29. 1996-04-07 14:59:26 +00:00
Bruce Evans
2151975455 Fixed devfs device names and numbers.
Fixed handling of unknown CMOS types - don't attach unrecognized devices.
1996-04-07 14:46:42 +00:00
Bruce Evans
120c5995aa Cleaned up naming and formatting in recent changes. 1996-04-07 14:32:14 +00:00
Bruce Evans
0166c5c6b4 Allow specifying the BIOS drive number. Removed the hd drive type.
hd essentially wired the FreeBSD drive number to 0 without changing
the BIOS drive number.  Now the numbers can be specified independently.

Replaced the BOOT_HD compile time flag with with BOOT_HD_BIAS.  Defining
the new flag as 1 should give the same behaviour as defining the old
flag as anything.  I haven't tested defining these flags.
1996-04-07 14:28:05 +00:00
Bruce Evans
242c09c05e Don't generate code for the unused function sleep(). 1996-04-07 13:35:58 +00:00
Bruce Evans
4181e70803 Removed the 2 remaining calls to sleep(). 1996-04-07 13:20:40 +00:00
Poul-Henning Kamp
45ec3b3838 Move the "mib" variables out to their own file. 1996-04-07 13:03:06 +00:00
David Greenman
c655b7c4f4 Added proper splnet protection while modifying the interface address list.
This fixes a panic that occurs when ifconfig ioctl(s) were interrupted
by IP traffic at the wrong time - resulting in a NULL pointer dereference.
This was originally noticed on a FreeBSD 1.0 system, but the problem still
exists in current sources.
1996-04-07 06:59:52 +00:00
John Dyson
07b1059113 Major cleanups for the pmap code. 1996-04-07 02:23:05 +00:00
Joerg Wunsch
cbe4630780 Fix the reproto.sh script that was broken after my KNFification.
Pointed out by: bde
1996-04-07 01:15:03 +00:00
Joerg Wunsch
d9fb9dd03e KNFify the function definitions. It's harder to grep around when the
function names don't start in column 1.
1996-04-06 13:34:37 +00:00
Gary Palmer
8577a36957 pccard.c:
#include <i386/include/clock.h> to get sysbeep() prototype

pcic.c:
	add appropriate #ifdef around a prototype to quiet GCC because
	fn decl. is also #ifdef'd.
1996-04-06 01:16:19 +00:00
David Greenman
baddaf9480 Switch 586/686 back to generic_bzero and #if 0'd the "optimized" code. It
turns out that it actually reduces performance in real-world cases.

Noticed by:	bde
1996-04-06 01:06:06 +00:00
Marc G. Fournier
4297524c49 Fixed a bug in DEVFS code that was producing "name slot allocation failed"
messages.
1996-04-05 19:12:01 +00:00
Andrey A. Chernov
b0b321257d Fix adjkerntz expression priority.
Make filetimes the same as DOS times for UTC cmos clock.
1996-04-05 18:59:06 +00:00
Andrey A. Chernov
2cb9219c5d Fix adjkerntz expression priority 1996-04-05 18:56:10 +00:00
Andrey A. Chernov
ef5fdc52f5 Don't adjust file times for UTC clock to have the same timestamps
for DOS/FreeBSD.
1996-04-05 16:31:49 +00:00
Andrey A. Chernov
fe0d5f43c5 Add wall_cmos_clock sysctl variable, needed to manage adjkerntz even for
UTC cmos clocks (needed for Local Timezone FSes)
1996-04-05 03:36:31 +00:00
Joerg Wunsch
c80faa792c Work around a braindead signal handling in many newer HP printers.
They don't have BUSY de-asserted by the time they ACK (and thus cause
an interrupt).  The workaround is to try seeing if the BUSY will be
de-asserted soon, and if not, to use an incremental backoff and
semi-polled mode instead of the fixed timeout with 1/2 s we've been
using previously (that caused the printer to run really slooow).

Printers that have been working previously should not be affected by
this.
1996-04-04 12:28:36 +00:00
Poul-Henning Kamp
34be9bf3ce Add a sysctl (net.inet.tcp.always_keepalive: 0) that when set will force
keepalive on all tcp sessions.  Setsockopt(2) cannot override this setting.
Maybe another one is needed that just changes the default for SO_KEEPALIVE ?
Requested by: Joe Greco <jgreco@brasil.moneng.mei.com>
1996-04-04 11:17:04 +00:00
Poul-Henning Kamp
816a3d836e Log TCP syn packets for ports we don't listen on.
Controlled by: sysctl net.inet.tcp.log_in_vain: 1

Log UDP syn packets for ports we don't listen on.
Controlled by: sysctl net.inet.udp.log_in_vain: 1

Suggested by:	Warren Toomey <wkt@cs.adfa.oz.au>
1996-04-04 10:46:44 +00:00
Sujal Patel
04a4979760 Fixed a typo in the comment for sv_errsize. 1996-04-04 01:08:20 +00:00
Gary Palmer
c94554b47d add a `Warning:' to the message saying that the root directory is not a
multiple of the clustersize in length to try and reduce the number
of questions we get on the subject.
1996-04-03 23:05:40 +00:00
Poul-Henning Kamp
506c540bbb Improvementss to netboot
Initial but not yet functional PCI support.

Reviewed by:	phk
Submitted by:	Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1996-04-03 19:01:37 +00:00
Garrett Wollman
d3d20ad196 Always pass a route structure when calling ip_output(). 1996-04-03 18:52:22 +00:00
Poul-Henning Kamp
23bf99538c Add feature for tcp "established".
Change interface between netinet and ip_fw to be more general, and thus
hopefully also support other ip filtering implementations.
1996-04-03 13:52:20 +00:00
Poul-Henning Kamp
56bac51bc7 Pick up CWARNFLAGS from /etc/make.conf if defined. 1996-04-03 12:08:52 +00:00
John Dyson
030ad08012 Fixed a problem that the UPAGES of a process were being run down
in a suboptimal manner.  I had also noticed some panics that appeared
to be at least superficially caused by this problem.  Also, included
are some minor mods to support more general handling of page table page
faulting.  More details in a future commit.
1996-04-03 05:23:44 +00:00
Marc G. Fournier
04dad170e9 Removed prototype for devfs_add_devsw() as it no longer exists 1996-04-03 03:03:55 +00:00
Marc G. Fournier
ad98bd0b24 Merged devfs_add_devsw() into devfs_add_devswf() 1996-04-03 03:03:27 +00:00
Gary Palmer
23d048ee3b Add NULLFS_DIAGNOSTIC, KERNFS_DIAGNOSTIC, UMAPFS_DIAGNOSTIC, UNION_DIAGNOSTIC
and SAFETY. Currently all commented out until I can verify that they don't
cause LINT to fail to compile.
1996-04-03 00:28:40 +00:00
Gary Palmer
70af957f57 Correct a comment which was hiding part of the declaration of
devfs_link(), causing compiles to fail.
1996-04-03 00:01:40 +00:00
Gary Palmer
c7e39c5cee Correct a bug which wrote the result of devfs_add_devswf() for two
separate devices to the same place

Reviewed by:	Julian Elischer <julian>, Marc G. Fournier <scrappy>
1996-04-02 22:06:23 +00:00
Marc G. Fournier
94436d5aff Prototyped wrong the first time through for devfs_link() 1996-04-02 19:07:38 +00:00
Garrett Wollman
348acd946c Document PERFMON.
Delete obsolete PROBE_VERBOSE.
1996-04-02 18:13:36 +00:00
Poul-Henning Kamp
3a65e0a3de Align help screen.
add gateway command.
1996-04-02 15:17:36 +00:00
Poul-Henning Kamp
7e6f7714ce Fix two cases where ia->ia_ifp could be NULL. 1996-04-02 12:26:10 +00:00
Marc G. Fournier
6c8216abcb take out prototype for dev_linkf()
change prototype for dev_link() to devfs_link()
1996-04-02 06:17:14 +00:00
Marc G. Fournier
aab063aa77 Change dev_link() to devfs_link() 1996-04-02 04:54:26 +00:00
Marc G. Fournier
2523e82c8b Made the src code match the man page.
Removed dev_link() and dev_linkf(), replacing dev_linkf() with devfs_link()
1996-04-02 04:53:05 +00:00
Marc G. Fournier
ecd87fe6c3 changed from using dev_link() to devfs_link() 1996-04-02 04:52:03 +00:00
Marc G. Fournier
ab314ae513 Convert from using dev_link() to dev_linkf() 1996-04-01 21:03:07 +00:00
Marc G. Fournier
f28213ad1d Convert from using devfs_add_devsw() to devfs_add_devswf()
Fixed Permissions/Ownership in DEVFS to reflect /dev
1996-04-01 21:02:14 +00:00
Marc G. Fournier
37a16ebf5f Changed use of devfs_add_devsw() to devfs_add_devswf()
Changed DEVFS structure devfs_token so that adding the devices is
a simple matter of a 4 line for loop versus 16 lines of code

Reviewed by:	julian@freebsd.org
1996-04-01 02:12:53 +00:00
David Greenman
909e5e0e77 Change if/goto into a while loop. 1996-03-31 23:00:32 +00:00
Jordan K. Hubbard
5931895ece Remove bogus architectures to allow make tags to work.
Submitted-by: Andreas Klemm <andreas@knobel.gun.de>
1996-03-31 18:53:43 +00:00
Justin T. Gibbs
716a0bd94a Convert to use stdarg in bt_cmd. Use XS_SELTIMEOUT for selection timeouts.
Obtained from: stdarg fixes adapted from cgd's work on the NetBSD BT driver
1996-03-31 18:19:50 +00:00
Justin T. Gibbs
a9debe9ce1 Convert to use stdarg in aha_cmd. Use XS_SELTIMEOUT for selection timeouts.
Obtained from: stdarg fixes adapted from cgd's work on the NetBSD BT driver
1996-03-31 18:19:38 +00:00
Joerg Wunsch
0e317d05cc Fetch the (dummy) READY CHANGED condition interrupt stati that
happen after an FDC reset.

Submitted by:	bde
1996-03-31 18:04:51 +00:00
Joerg Wunsch
4ddc73e65b Fix a bogus message:
ed0: Invalid irq configuration (2) must be 2-5 for 3c503
                                ^          ^
1996-03-31 15:53:19 +00:00
Bruce Evans
d72ee36f63 Removed dead option DUMMY_NOPS.
Restored undead option AUTO_EOI_1.
Added undocumented option PERFMON.
1996-03-31 04:18:02 +00:00
Bruce Evans
048cd610ad Finished removing NOP macros. 1996-03-31 04:17:25 +00:00
Bruce Evans
ef9805a3c8 Moved rtcin() to clock.c.
Always delay using one inb(0x84) after each i/o in rtcin() - don't
do this conditional on the bogus option DUMMY_NOPS not being defined.
If you want an optionally slightly faster rtcin() again, then inline
it and use a better named option or sysctl variable.  It only needs
to be fast in rtcintr().
1996-03-31 04:05:36 +00:00
Bruce Evans
5d170d7eb8 Killed religous FASTER_NOP again. 1996-03-31 03:31:29 +00:00
Justin T. Gibbs
088b8b1d26 Implement the SLIST and the STAILQ macros. This gives a program all the
aesthetics of using the 4.4 queue macros without paying undo space or time
in scenartios where a singly-linked list works fine.

From queue.h:
/*
 * A singly-linked list is headed by a single forward pointer. The elements
 * are singly linked for minimum space and pointer manipulation overhead at
 * the expense of O(n) removal for arbitrary elements. New elements can be
 * added to the list after an existing element or at the head of the list.
 * Elements being removed from the head of the list should use the explicit
 * macro for this purpose for optimum efficiency. A singly-linked list may
 * only be traversed in the forward direction.  Singly-linked lists are ideal
 * for applications with large datasets and few or no removals or for
 * implementing a LIFO queue.
 *
 * A singly-linked tail queue is headed by a pair of pointers, one to the
 * head of the list and the other to the tail of the list. The elements are
 * singly linked for minimum space and pointer manipulation overhead at the
 * expense of O(n) removal for arbitrary elements. New elements can be added
 * to the list after an existing element, at the head of the list, or at the
 * end of the list. Elements being removed from the head of the tail queue
 * should use the explicit macro for this purpose for optimum efficiency.
 * A singly-linked tail queue may only be traversed in the forward direction.
 * Singly-linked tail queues are ideal for applications with large datasets
 * and few or no removals or for implementing a FIFO queue.
 */
1996-03-31 03:21:45 +00:00
Justin T. Gibbs
ef6653eddb Implement the XS_SELTIMEOUT error code. This causes the SCSI code to
not retry again and should be used when a device times out during selection
(ie is not on the bus).  This should speed up the boot sequence.
1996-03-31 03:19:09 +00:00
Justin T. Gibbs
09d0c1ca40 ncr.c:
Use new XS_SELTIMEOUT error code for selection timeouts.

aic7870.c:
   Move SCB walking code to aic7xxx.c and make it work for all card types.

   The flag AHC_EXTSCB is no longer needed since the SCBs are walked in
   all cases now.
1996-03-31 03:17:50 +00:00
Justin T. Gibbs
6e9d1d8bb6 Fix support for the aic7850 by looking only at the relavent bits of the
QINCNT.  The 7850 puts random garbage in the high bits and all my attempts
to determine the cause of this failed.  This approach does seem to work
around the problem.

Go back to relying on the SCSIPERR interrupt instead of having the sequencer
interrupt at the beginning of ITloop after a parity error occured.

Determine the number of SCBs on a card automatically and base the qcntmask
on the number of SCBs.

Add entries for 11.4MHz, 8.8MHz, 8.0MHz, and 7.2MHz to ULTRA portion of
the syncrate table.  They seem to work fine on the 2940UW I have here and
will allow more non-ultra devices (like my tape drive) to run sync while
the adapter is in ULTRA mode.

Return XS_SELTIMEOUT instead of XS_TIMEOUT for selection timeouts.  I was
getting sick of waiting for the SCSI code to retry each non-existant unit
multiple times during boot and XS_SELTIMEOUT bypasses all retries.

Use new SLIST queue macros.  This was inspired by NetBSD using TAILQs in
their SCSI drivers.  For optimum cache hits, the free scb list should
be LIFO which is what the old and new code does.  NetBSD implemented a
FIFO queue for some reason.

Spaces -> tabs.
1996-03-31 03:15:31 +00:00
Justin T. Gibbs
2af488412c Override the unit number passed into us in the isa_device structure with
the current unit in bt_unit.  We do this as a kludge to make the unit nubmer
work properly between the pci/eisa/isa bt boards that are in the system.
1996-03-31 03:06:20 +00:00
Justin T. Gibbs
b023c93005 Don't set the number of SCBs here. aic7xxx.c determines the number of
SCBs by walking them.
1996-03-31 03:04:38 +00:00
Justin T. Gibbs
c2c5fd345d aic7xxx.seq:
Fix support for the aic7850 by looking only at the relavent bits of the
    QINCNT.  The 7850 puts random garbage in the high bits and all my attempts
    to determine the cause of this failed.  This approach does seem to work
    around the problem.

    Don't trust SCSIPERR to tell us when there is a parity error.  On
    some revs of the 7870 and the 7880, this bit follows the parity of
    the current byte.  Instead of using a SEQINT to tell the kernel,
    re-enable the standard parity error interrupt since it seems to pause
    the sequencer right at the time of the error which is the effect we were
    looking for anyway.

aic7xxx_reg.h:
    Remove PARITY_ERROR seqeuncer interrupt type, its no longer used.

    Define QCOUNTMASK as the SRAM location for the mask to use on the
    QINCNT register.  QCOUNTMASK is determined by the number of SCBs
    supported by the device we're working on.

aic7xxx_asm.c
    Properly check the return value of fopen, and define the arg list
    in getopt correctly.
    Submitted by: Pete Bentley <pete@demon.net>
1996-03-31 03:02:37 +00:00
Peter Wemm
289ccde0bd Correct the handling of NOCLDSTOP when using sigvec()
Make the SA_NODEFER handling more correct, previously if you called
sigaction to set a handler and had SA_NODEFER set, and manually masked
the signal itself in sa_mask, and when you read the settings back later,
you'd find SA_NODEFER incorrectly cleared.

Pointed out by: bde
1996-03-30 15:15:30 +00:00
Peter Wemm
dc7dfe8990 Add a SV_NODEFER and SV_RESETHAND #define, after Bruce pointed out that
a program that was saving and restoring a signal via sigvec() was not
doing the complete job if either of these bits had been set via sigaction.
1996-03-30 15:10:18 +00:00
Peter Wemm
30957dad06 re-add the ps_signodefer. The interaction between SA_NODEFER and the
sa_mask was "non intuitive" and broke another of bde's test cases.
1996-03-30 15:08:14 +00:00
Peter Wemm
2eb80d36fe Because of the way that ptrace() now calls procfs routines to read/write
the process's memory, it was possible for the procfs_domem() call to
return a residual leftover, but with no errno.  Since this is no good for
ptrace which ignored the the residual, remap a leftover amount into an
errno rather than fooling the caller into thinking it was successful when
in fact it was not.

Submitted by: bde (a very long time ago :-)
1996-03-30 15:02:58 +00:00
Peter Wemm
6386a7e079 When doing a 'make depend', dont blow away the existing .depend until
the generation of a new one is complete.
1996-03-30 14:57:02 +00:00
Garrett Wollman
17d2223b8c There is no need to zero out the TSC when configuring a counter,
says Mike Haertel.
1996-03-29 17:48:21 +00:00
Bruce Evans
a680ab7537 Count PCI irqs in up to 4 ISAish counters named `pci irqnn' instead of
in the clk0 counter.

Reviewed by:	s
1996-03-29 15:01:51 +00:00
Bruce Evans
7a416e2de6 Fixed the type of sv_sendsig. The `code' arg to signal handlers is now
u_long.
1996-03-29 14:29:50 +00:00
Bruce Evans
78966e20d9 Parenthesized macros.
Fixed munged tabs.
1996-03-29 14:14:07 +00:00
Bruce Evans
1d4bbd7d60 Added necessary quotes (${CPP} might have spaces in it). Removed
unnecessary quotes.
1996-03-29 14:08:30 +00:00
Bruce Evans
81fc841cb2 Added newlines and punctuation.
Removed defunct options.  It will be easy to keep track of bogus options
by looking at CFLAGS when all real options are moved out of CFLAGS.
1996-03-29 13:51:30 +00:00
Bruce Evans
98189b75c3 Removed references to nonexistent files. 1996-03-29 13:39:48 +00:00
Bruce Evans
a95d7065d5 Removed never-used files. 1996-03-29 13:22:04 +00:00
Bruce Evans
a1fbfdff14 Fixed reference counting related to relookup(). relookup() must
be called with the directory referenced, and this reference will
be dropped iff relookup() fails, so the value returned must not be
ignored.

Reviewed by:	davidg
1996-03-29 12:30:30 +00:00
Bruce Evans
f699ca4bee Fixed devfs group and permissions of some more disk devices.
Added devfs cd control device.
1996-03-29 11:57:52 +00:00
Bruce Evans
e57841c795 Fixed devfs group of some more disk devices.
Added devfs lpt control device (only the standard one, not the ones that
aren't supported by MAKEDEV).

Removed some stupid comments.
1996-03-29 11:54:56 +00:00
Bruce Evans
f85120ac5b Fixed group of some more disk devices.
Fixed devfs function names.
1996-03-29 11:45:12 +00:00
Bruce Evans
c9e1c95d1d Fixed missing quote in a devfs string. 1996-03-29 11:39:08 +00:00
Bill Fenner
6ac3b69d76 Eliminate panic("rtfree") caused by double-freeing the route
when rt == rt->rt_gwroute .  rt == rt->gwroute shouldn't happen
in the first place, but that's another problem.

(try "route add -host <hostonmynet> <hostonmynet>; ping <hostonmynet>;
route delete <hostonmynet>")
1996-03-29 08:02:30 +00:00
David Greenman
e206cebf59 Change v_usecount & v_writecount from a short to an int. As shorts they
can and will overflow on large machines - especially on machines with
filesystems with lots of files (like netnews servers), and the result
is a "free vnode isn't" panic or worse.
This fixes one of the causes of these panics that I've been experiancing on
wcarchive.
1996-03-29 06:39:39 +00:00
David Greenman
46268a606f Revert to previous calculation of vm_object_cache_max: it simply works
better in most real-world cases.
1996-03-29 06:28:48 +00:00
Marc G. Fournier
ad6dc98242 Fixed missing variable 'name' for DEVFS code 1996-03-29 04:35:09 +00:00
Garrett Wollman
0bb8e015ec Sync up the Pentium implementation with the documentation.
Previously, the sense of the E flag was reversed on
Pentiums.
1996-03-28 21:00:29 +00:00
Garrett Wollman
28dc3d2757 >Blush<. Use the correct opcode for the WRMSR instruction. 1996-03-28 20:39:45 +00:00
Garrett Wollman
8dec8ed218 Nit: according to the Harvard code, it is necessary to clear the timestamp
counter before loading the performance-monitor control register.  I'm
not sure I believe this, but we'll follow their lead for the moment.
As a result of this commit, the performance-monitoring test program that
I wrote now works (the program will find its way to share/examples).
1996-03-28 20:39:20 +00:00
Garrett Wollman
f7ff248201 Teach the disassembler about the 0f,3x family of instructions
(RDMSR, RDTSC, WRMSR, and RDPMC).
1996-03-28 20:35:03 +00:00
Jordan K. Hubbard
2fa43eefcf A bug fix and a couple of new modes for the meteor driver.
Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
1996-03-28 20:28:14 +00:00
Steven Wallace
2983151216 Implement ioctl's IBCS2_TCFLSH and IBCS2_TCXONC. Improve termios conversion.
Implement xenix_eaccess() system call.

Obtained from: NetBSD
1996-03-28 19:53:21 +00:00
Marc G. Fournier
c322304792 Back out change of log from being in /var/run to back in /dev 1996-03-28 18:29:14 +00:00
Marc G. Fournier
23cbdfcbc7 Fixed a Typo 1996-03-28 16:51:12 +00:00
Bruce Evans
8375baabed Undid last revision. It duplicated part of second last revision. 1996-03-28 15:40:17 +00:00
Bruce Evans
f953dd01c8 Removed an unused devfs variable again.
Added $Id$.
1996-03-28 15:25:43 +00:00
Bruce Evans
cf78fc4129 Undid the last 2 commits. Rev.1.43 reversed the changes in rev.1.42 and
rev.1.44 was a subset of them.
1996-03-28 15:03:41 +00:00
Marc G. Fournier
7f49be143c devfs_add_devsw() -> devfs_add_devswf modifications
Reviewed by:	julian@freebsd.org
1996-03-28 14:36:48 +00:00
Marc G. Fournier
7e40c586ed syslog.h -> changed /dev/log to be /var/run/log (its a socket, not a device)
devfsext.h -> added prototype for dev_linkf();

Reviewed by:	julian@freebsd.org
1996-03-28 14:35:37 +00:00
Marc G. Fournier
ccbc58d3ca Using devfs_add_devswf() instead of devfs_add_devsw()
Reviewed by:	julian@freebsd.org
1996-03-28 14:33:59 +00:00
Marc G. Fournier
0d5b12e38e Added dev_linkf() function (dev_link() + printf-style arguments)
Reviewed by:	julian@freebsd.org
1996-03-28 14:32:27 +00:00
Marc G. Fournier
734daefc97 Switched from using devfs_add_devsw() to devfs_add_devswf()
Reviewed by:	julian@freebsd.org
1996-03-28 14:31:42 +00:00
Marc G. Fournier
719d4dc5bd Added DEVFS support to create ttyv* devices
Reviewed by:	julian@freebsd.org
1996-03-28 14:30:37 +00:00
Marc G. Fournier
6e18ce4676 Switched from using devfs_add_sw() to using devfs_add_swf()
Reviewed by:	julian@freebsd.org
1996-03-28 14:29:52 +00:00
Marc G. Fournier
14689d6f4f Reviewed by: julian@freebsd.org 1996-03-28 14:26:46 +00:00
John Dyson
4e489ec421 Remove a now unnecessary prototype from pmap.c. Also remove now
unnecessary vm_fault's of page table pages in trap.c.
1996-03-28 05:40:58 +00:00
John Dyson
208bfdc98b Significant code cleanup, and some performance improvement. Also,
mlock will now work properly without killing the system.
1996-03-28 04:59:34 +00:00