Commit Graph

3277 Commits

Author SHA1 Message Date
Garrett Wollman
13f588f83e Add an fls() inline function which does the opposite operation to
ffs().  (That is to say, it searches in the opposite direction.)
1996-08-01 20:29:28 +00:00
Bruce Evans
85acc6887d Eliminated pcb_inl. It was always 0 because context switches don't occur
in interrupt handlers.
1996-07-31 12:36:11 +00:00
David Greenman
b1508c72f4 Converted timer/run queues to 4.4BSD queue style. Removed old and unused
sleep(). Implemented wakeup_one() which may be used in the future to combat
the "thundering herd" problem for some special cases.

Reviewed by:	dyson
1996-07-31 09:26:54 +00:00
Bruce Evans
3817d2ffa1 Fixed longstanding bug of not checking dumpdev' or setting dumplo'
early enough when the dump device is specified in the config file.

Removed stale comment about configuration root and swap devices.

Don't bother clearing dumplo when dumpdev is set to NODEV.  Everything
is controlled by dumpdev.

Fixed the kern.dumpdev sysctl.  Writes were handle bogusly.
1996-07-30 20:30:49 +00:00
Bruce Evans
98a51b2b94 Synced with sio.c: added support for TIOCDCDTIMESTAMP and simplified
timestamp code.
1996-07-30 19:50:37 +00:00
Bruce Evans
33ded19fc2 Fixed the machdep.i8254_freq and machdep.i586_freq sysctls. Writes were
handled bogusly.

Centralized the setting of all the frequency variables.  Set these
variables atomically.  Some new ones aren't used yet.
1996-07-30 19:26:55 +00:00
Andrey A. Chernov
58db4b5a8f Fix GIO_ATTR ioctl return to match SYSV 1996-07-30 15:20:08 +00:00
John Dyson
67bf686897 Backed out the recent changes/enhancements to the VM code. The
problem with the 'shell scripts' was found, but there was a 'strange'
problem found with a 486 laptop that we could not find.  This commit
backs the code back to 25-jul, and will be re-entered after the snapshot
in smaller (more easily tested) chunks.
1996-07-30 03:08:57 +00:00
John Dyson
78d4346178 Fix a problem with a DEBUG section of code. 1996-07-29 14:22:46 +00:00
John Dyson
b7fb357273 Fix an error in statement order in pmap_remove_pages, remove the pmap
pte hint (for now), and general code cleanup.
1996-07-29 03:08:51 +00:00
John Dyson
da54aa7fc4 Fix a problem that pmap update was not being done for kernel_pmap. Also
remove some (currently) gratuitious tests for PG_V...  This bug could
have caused various anomolous (temporary) behavior.
1996-07-28 20:31:27 +00:00
John Dyson
adef72483b Move a couple of the initialization commands to the right place. Multi
sector mode was not getting re-initialized when needed.
1996-07-27 19:01:10 +00:00
Atsushi Murai
826702b23d Under the heavy load for transmiting condition, it will be write error
and then never accept for sending packet from upper layer anymore
(i.e. ping -f )
Reviewed by:	David Greenman <dg@root.com>
Submitted by:	amurai@spec.co.jp
1996-07-27 12:40:31 +00:00
John Dyson
4f4d35edf0 This commit is meant to solve a couple of VM system problems or
performance issues.

	1) The pmap module has had too many inlines, and so the
	   object file is simply bigger than it needs to be.
	   Some common code is also merged into subroutines.
	2) Removal of some *evil* PHYS_TO_VM_PAGE macro calls.
	   Unfortunately, a few have needed to be added also.
	   The removal caused the need for more vm_page_lookups.
	   I added lookup hints to minimize the need for the
	   page table lookup operations.
	3) Removal of some bogus performance improvements, that
	   mostly made the code more complex (tracking individual
	   page table page updates unnecessarily).  Those improvements
	   actually hurt 386 processors perf (not that people who
	   worry about perf use 386 processors anymore :-)).
	4) Changed pv queue manipulations/structures to be TAILQ's.
	5) The pv queue code has had some performance problems since
	   day one.  Some significant scalability issues are resolved
	   by threading the pv entries from the pmap AND the physical
	   address instead of just the physical address.  This makes
	   certain pmap operations run much faster.  This does
	   not affect most micro-benchmarks, but should help loaded system
	   performance *significantly*.  DG helped and came up with most
	   of the solution for this one.
	6) Most if not all pmap bit operations follow the pattern:
		pmap_test_bit();
		pmap_clear_bit();
	   That made for twice the necessary pv list traversal.   The
	   pmap interface now supports only pmap_tc_bit type operations:
	   pmap_[test/clear]_modified, pmap_[test/clear]_referenced.
	   Additionally, the modified routine now takes a vm_page_t arg
	   instead of a phys address.  This eliminates a PHYS_TO_VM_PAGE
	   operation.
	7) Several rewrites of routines that contain redundant code to
	   use common routines, so that there is a greater likelihood of
	   keeping the cache footprint smaller.
1996-07-27 03:24:10 +00:00
Peter Wemm
66b8e416e6 ttysleep() can return EWOULDBLOCK, not ETIMEDOUT as the comment in tty.c
suggests.

Pointed out by: bde
1996-07-26 16:55:37 +00:00
Peter Wemm
446fe15067 Apply a bandaid to a problem elsewhere in the driver, when the process is
blocked in a write() while waiting for the output to drain, sleep only
for tp->t_timeout, not forever.  This only seems to happen when there is
either a modem lockup holding the hardware flow control down, or due to
some problem in the driver with processes attempting to write after the
modem has hung up (eg: elm, tf).
1996-07-26 13:47:38 +00:00
Poul-Henning Kamp
fe1624a4ff Revert my bdevsw change for wcd.c, Bruce pointed out that
this driver has bogus open/close entries.
1996-07-24 13:35:34 +00:00
Poul-Henning Kamp
cba8a5ddd3 Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.
Saves about 280 butes of source per driver, 56 bytes in object size
and another 56 bytes moves from data to bss.

No functional change intended nor expected.

GENERIC should be about one k smaller now :-)
1996-07-23 21:52:43 +00:00
Satoshi Asami
92b4f2e0df Update to current state of PC98 world.
Submitted by:	The FreeBSD(98) development team
1996-07-23 07:46:59 +00:00
Poul-Henning Kamp
7c60604ada Add yet another kludge to this driver. Man page update to follow. 1996-07-21 09:28:50 +00:00
Joerg Wunsch
3135240845 Post-commit review by Bruce. Mostly stylistic changes.
Submitted by:	bde
1996-07-21 08:20:51 +00:00
Joerg Wunsch
5eb14f7e7c Replace the annoying calls to Debugger() by panic()'s in the
#ifdef DIAGNOSTIC case, and a warning only otherwise.

People who want them to break into the debugger can always set the
breakpoint explicitly.  The existing behaviour was a misfeature from
the beginning, in the (wrong) assumption that the SCSI controller must
always be of essential importance to the entire system.
1996-07-20 22:02:44 +00:00
Joerg Wunsch
f4de22acc7 Correct the timer2 acquiration and release, it must happen at splclock.
Also slightly reformatted so that it meets at least partially style(9),
and makes navigating through the functions easier.
1996-07-20 18:48:54 +00:00
Joerg Wunsch
99211adf2c Major cleanup of the timerX_{acquire,release} stuff. In particular,
make it more intelligible, improve the partially bogus locking, and
allow for a ``quick re-acquiration'' from a pending release of timer 0
that happened ``recently'', so it was not processed yet by clkintr().
This latter modification now finally allows to play XBoing over
pcaudio without losing sounds or getting complaints. ;-)  (XBoing
opens/writes/closes the sound device all over the day.)

Correct locking for sysbeep().

Extensively (:-) reviewed by:	bde
1996-07-20 18:47:23 +00:00
Stefan Eßer
76af5a923c Last night (local time :) I accidently checked in an intermediate version
of this patch, which had not actually been reviewed by Joerg or Paul!
(I'll better stop committing files after midnight ...)

I'm now commiting the latest code, which has been reported to work.

Minor correction to the previous commit message for this file:
The first PCI Lance in a system will get a name of lnc1, the second
will be known as lnc2 and so on. An arbitrary number of cards is
supported in a system ...
1996-07-19 17:18:20 +00:00
Atsushi Murai
0ed091876d Add interrupt register set up with original register value
before attaching. Without this fix, 3c579(EISA) never make
any H/W inturrupt.
Reviewed by:	"Justin T. Gibbs" <gibbs@freefall.freebsd.org>, nao@sbl.cl.nec.co.jp and owner-current on mailing list ;-)
Submitted by:	amurai@spec.co.jp, nao@sbl.cl.nec.co.jp
1996-07-19 13:20:05 +00:00
Stefan Eßer
c268c94f6b FINALLY: PCI support for the Lance Ethernet driver.
This code applies to several systems with integrated Ethernet
chip, for example from HP or Compaq. It should also support
PCI Ethernet cards based on the AMD PCI Lance chip.

This code has been reviewed (visually) by Paul Richards and
tested (using an ISA Lance board) by Joerg Wunsch.
Since the parameters to nearly each and every single function
had to be changed (generally from unit number to lnc_soft*),
there is some potential for buglets having crept in ...

BEWARE: If you had lnc0 configured to have the ISA probe find
your PCI Lance, then it should now be found by the PCI probe,
and should be automatically configured as pci1 (!!! note the "1").

Reviewed by:	paul, joerg
1996-07-18 22:03:47 +00:00
Julian Elischer
75d050aeaa some internal modems need LOTS of time to generate an interrupt
on demand.. increase DELAY from 1000 uS to 10000uS
1996-07-17 22:07:23 +00:00
Joerg Wunsch
cb9bf21103 Introduce two /dev/audio compat alias names for flushing and draining
the pcaudio device.  Now, XBoing sounds much better...
1996-07-17 20:18:56 +00:00
Bruce Evans
65d98215ea Fixed adjustment of `time' when timer0 is released. 27465 was 27645 in
a comment and in code that was only used when pcaudio was closed.  The
maximum error was 66 usec.
1996-07-17 11:26:05 +00:00
Nate Williams
20073b6d10 Moved declaration of zbuf outside of #ifdef DEVFS code. 1996-07-15 18:22:07 +00:00
Bruce Evans
6450111c1b Quick fix for previous commit: don't free zbuf on close since it may be
in use in another process that blocked in uiomove().
1996-07-15 05:23:04 +00:00
John Dyson
f381a0c010 Almost gratuitious improvement of the performance of reading
/dev/zero.
1996-07-14 06:05:53 +00:00
David Greenman
4611b39710 Enable transmit complete interrupt...
(author's explaination):

 Bit 15 is the flag to request a transmit complete interrupt.  The
driver was apparently written to minimize interrupts, and if not for a
3-COM design quirk, everything would be just ducky.
 Prior to loading the outbound packet into the FIFO, the driver checks
to see if there's enough space to contain the packet.  If not, the
driver requests a transmit-available interrupt when there is
sufficient room.  Unfortunately, the card is continuing to process the
prior FIFO, and by the time the driver sets the threshold for a
transmit available interrupt, the space is already available.  When
this occurs, the 3COM card ignores the interrupt request, and the
driver is hung waiting for an interrupt that will never occur.
There's probably a more elegant solution, but requesting the transmit
complete interrupt was the easiest to implement.  An alternative fix
might be to check free FIFO space again, after requesting the transmit
available interrupt, but I haven't bothered pursuing this.  Since the
patch, my 3C590 (PCI, same FIFO interface as 3C509) has been rock
solid.

Submitted by:	mevans@candle.com (Mike Evans)
1996-07-13 10:49:53 +00:00
Bruce Evans
cba2a7c614 Staticized a few variables.
Fixed warnings about unused variables.
1996-07-12 07:41:34 +00:00
Bruce Evans
73571d2d9e Removed "optimization" using gcc's builtin memcpy instead of bcopy.
There is little difference now since the amount copied is large,
and bcopy will become much faster on some machines.
1996-07-12 07:18:12 +00:00
Bruce Evans
82ffff7ab3 Renamed upa to p0upa to match p0upt.
Cleaned up some comments.
1996-07-12 06:48:55 +00:00
Bruce Evans
3222e6db68 Export `dumpmag' to utilities but not to the kernel.
Restored a truncated comment.
1996-07-12 06:09:49 +00:00
Bruce Evans
f3460ead96 Fixed cloned comments about npx traps to match context. 1996-07-12 06:03:14 +00:00
Bruce Evans
ec275eb27f Moved the definition of DEBUGMSG() from asm.h to start.S. This macro
is only appropriate to use in the special environment of start.S (real
mode plus some conventions about not saving registers), and asm.h is
supposed to be for generic macros.

Removed some unnecessary parentheses.
1996-07-12 05:42:02 +00:00
Bruce Evans
18f63e25c1 Moved the definition of `bsize' out of a DO_BAD144 ifdef so that this
compiles when DO_BAD144 is not defined.
1996-07-12 05:35:47 +00:00
Bruce Evans
1cc273db90 Moved the definition of dflt_name to the correct file (table.c is only for
explicitly initialized data) and made it conditional on NAMEBLOCK.
1996-07-12 05:25:47 +00:00
Bruce Evans
b830e63502 Fixed some speling, punctuation.. and spac ing errors. 1996-07-12 05:17:37 +00:00
Bruce Evans
0873c1f1c7 Fixed operand order for shld and shrd.
Finished the constant poisoning that was begun in rev.1.14.  Consts
aren't very poisonous (or useful) unless -Wcast-qual is in CFLAGS,
and it isn't in the default CFLAGS.
1996-07-12 04:40:21 +00:00
Bruce Evans
6ab46d52a5 Don't use NULL in non-pointer contexts. 1996-07-12 04:12:25 +00:00
Nate Williams
68753bffb7 Add some comments explaining what APM_DSVALUE_BUG does no that I know
what it does and why it's needed.  Now I have to figure out how to fix
the bug. :)

[ No functional changes ]
1996-07-11 16:35:12 +00:00
Jordan K. Hubbard
0375cce8bc Merge. 1996-07-11 11:18:45 +00:00
Julian Elischer
93e0e11657 Adding changes to ipfw and the kernel to support ip packet diversion..
This stuff should not be too destructive if the IPDIVERT is not compiled in..
 be aware that this changes the size of the ip_fw struct
so ipfw needs to be recompiled to use it.. more changes coming to clean this up.
1996-07-10 19:44:30 +00:00
Nate Williams
6774cdb846 Whee. Fix two bugs which ended up cancelling each other out.
apm_setup.s was storing apm_cs16_base and apm_cs32_base addresses in
each others slots, and apm.c was reversing the result so the bugs
cancelled out, but the code looked wrong.

No functional differences unfortunately.

Submitted by:	dave edmondson <davided@sco.com>
1996-07-10 15:09:48 +00:00
Jordan K. Hubbard
9f5c1d518e Clean out some historical cruft. 1996-07-10 03:35:59 +00:00
Julian Elischer
c9f36013e5 make the NAMEBLOCK changes conditional on that preprocessor variable,
and add more documentation of the option in the Makefile
also CORRECT the variable mentioned in the README.
1996-07-09 02:28:20 +00:00
Garrett Wollman
b184bc75f3 Fix something that's been bugging me for a long time: move the CPU
type identification code out of machdep.c and into a new file of its
own.  Hopefully other grot can be moved out of machdep.c as well
(by other people) into more descriptively-named files.
1996-07-08 19:44:39 +00:00
Joerg Wunsch
960710e6ea Add the ability to specify bootflags. This is similar to boot_i386(8),
except for the root f/s options that don't seem to be useful.
1996-07-06 14:18:56 +00:00
Julian Elischer
9ed24653f7 Obtained from: Whistle Communications
Add code to the boot blocks to allow the user to place default boot strings
on block 1 of the disk (2nd block), should the correct magic numbers be present.

If the correct options are used it will 'delete' the name used from block1,
thereby assuring that if the boot fails it won't be stuck in an infinite loop.

the boot strings are set by the utility "nextboot"
(not yet checked in, but being tested.)
By default these changes should have no effect on existing installations
and if compiled without the NAMEBLOCK option should be essentially identical
to the old ones.
1996-07-05 19:55:05 +00:00
John Hay
d805b866fa This driver supports the SDL Communications RISCom/N2 ISA cards that is
based on the HD64570 chip. Both the 1 and 2 port cards is supported.

Line speeds of up to 2Mbps is possible. At this speed about 95% of the
bandwidth is usable with 486DX processors.

The standard FreeBSD sppp code is used for the link level layer. The
default protocol used is PPP. The Cisco HDLC protocol can be used by
adding "link2" to the ifconfig line in /etc/sysconfig or where ever
ifconfig is run.

At the moment only the X.21 interface is tested. The others may need
tweaks to the clock selection code.
1996-07-05 18:51:59 +00:00
Bruce Evans
f6b4ae3c82 Added or restored #include of <machine/md_var.h>. Some declarations
moved from <machine/cpufunc.h> to better places.
1996-07-01 20:29:10 +00:00
Bruce Evans
7baccf64d3 Fixed lots of warnings about unportable casts of pointers to volatile
variables: don't depend on the compiler generating atomic code to set
the variables - use inline asm to specify the atomic instruction(s)
explicitly.
1996-07-01 20:16:10 +00:00
Bruce Evans
a111a7f827 Moved declarations of non-cpu things from <machine/cpufunc.h> to better
places.
1996-07-01 18:12:24 +00:00
Bruce Evans
d2700ee639 Use the standard timer (interrupt) frequency while calibrating the clocks.
Testing with the high frequency of 20000 Hz (to find problems) only found
the problem that this frequency is too high for slow i386's.

Disable interrupts while setting the timer frequency.  This was unnecessary
before rev.1.57 and forgotten in rev.1.57.  The critical (i8254) interrupts
are disabled in another way at boot time but not in the sysctl to change
the frequency.
1996-07-01 18:00:47 +00:00
Joerg Wunsch
c683ac7c95 Enable ktrace by default, accompanied by a small reminder about the
implications (4 KB bloat, slight slowdown of syscalls).

Reviewed by:	freebsd-hackers
1996-06-30 09:39:29 +00:00
Peter Wemm
dcca5a532d Fix typo that prevented the initial/lock state devices from working
correctly (accessing the lock device was not possible).
1996-06-30 04:56:05 +00:00
Joerg Wunsch
a9e9062ca1 Bump various timeouts in scprobe(). This finally fixes the broken
keyboard reset one of my earlier commits has been causing.
1996-06-27 21:36:11 +00:00
Gary Palmer
2aba17b378 Correct comment relating to pty's. There can be 256 (probably
higher actually, but that's all our MAKEDEV supports at this time)
1996-06-26 19:42:06 +00:00
Søren Schmidt
da040b2280 Fixed bug in pasting 8bit char (ache).
Added linefeeds in cuts that extend beyond one line.
Prepared for the mousefunctions to be used in nontext modes.
1996-06-26 13:04:53 +00:00
John Dyson
f43467241e When page table pages were removed from process address space, the
resident page stats were not being decremented.  This mode corrects
that problem.
1996-06-26 05:05:52 +00:00
Bruce Evans
c673fe98d7 Added #include of <machine/md_var.h>. This will be needed when
some declarations are moved from <machine/cpufunc.h> to better
places.
1996-06-25 20:31:01 +00:00
Bruce Evans
79df6d8597 trap.c:
Fixed profiling of system times.  It was pre-4.4Lite and didn't support
statclocks.  System times were too small by a factor of 8.

Handle deferred profiling ticks the 4.4Lite way: use addupc_task() instead
of addupc().  Call addupc_task() directly instead of using the ADDUPC()
macro.

Removed vestigial support for PROFTIMER.

switch.s:
Removed addupc().

resourcevar.h:
Removed ADDUPC() and declarations of addupc().

cpu.h:
Updated a comment.  i386's never were tahoe's, and the deferred profiling
tick became (possibly) multiple ticks in 4.4Lite.

Obtained from:	mostly from NetBSD
1996-06-25 20:02:16 +00:00
Bruce Evans
93f4b1bf1b Save John Polstra's initial fix for profiling for reference. The
multiplication in addupc() overflowed for addresses >= 256K, assuming
the usual profil(2) scale parameter of 0x8000.  addupc() will go away
soon.

Submitted by:	John Polstra <jdp@polstra.com>
1996-06-25 19:25:25 +00:00
Søren Schmidt
ad0c0c784f Change the way moused talk to syscons, now its only delivering mouseevents
via an ioctl (MOUSE_ACTION).
Fixed a couple of bugs (destructive cursor, uncut, jitter).
Now applications can use the mouse via the MOUSE_MODE ioctl, its
possible to have a signal sent on mouseevents, makeing an event loop
in the application take over mouseevents.
1996-06-25 08:54:57 +00:00
John Dyson
cb87c9be58 Limit the scan for preloading pte's to the end of an object. 1996-06-25 00:39:21 +00:00
Justin T. Gibbs
356cbcce49 Fix problem with scb flag handing that crept in with the SCB paging support.
This only affected userland initiated device resets (using the reset command
from cdplay for instance).

Convert some spaces to tabs.
1996-06-23 20:02:37 +00:00
Andrey A. Chernov
e72a188ebc Oops, forget the fact that LINT compiles (fixing previos PAS commi) 1996-06-23 19:46:46 +00:00
Andrey A. Chernov
5839779af2 Describe the way how to add OPL for PAS without conflict 1996-06-23 19:41:34 +00:00
Bruce Evans
ea959743cb Moved declarations of static functions to the correct file. This fixes
hundreds of warnings from -Wunused in lkm/syscons/*.
1996-06-23 17:12:05 +00:00
Bruce Evans
6fe10f76c3 Removed unused #include. Linux doesn't support SCO consoles. 1996-06-23 17:08:11 +00:00
Bruce Evans
5c496ee31e Don't (re)define or use ACTUALLY_LKM_NOT_KERNEL - use the existing
definition of QCAM_MODULE for everything involving LKM'ness.

Makefile:
Don't add -I/sys to CFLAGS.  bsd.kmod.mk adds the correct (relative)
path.
1996-06-23 14:41:55 +00:00
Bruce Evans
a675c0c67e Describe MAXMEM better. Enable it by default. (It's a positive option.
Only negative options in LINT should be enabled.)
1996-06-23 13:28:04 +00:00
Peter Wemm
17b944a6a7 When writing the settings for stop bits and output hardware flow control,
things tend to work better if you write the settings to the correct
register.. (*blush*).  This subtle bug has been haunting me for ages, and
will solve a few problems that have been reported to me.

Also, take a shot at fixing the serial BREAK processing, what was there
before never really worked.  (There is a PR on this I think)
1996-06-21 21:35:01 +00:00
Søren Schmidt
ab35f219ac Oops, fix a bug that caused updates to the screen to happen, without
anything actually changed, in this case the mousepointer logic.
1996-06-21 11:31:09 +00:00
Søren Schmidt
de4d1b835e Some news for syscons (long overdue):
Real support for a Textmode mousecursor, works by reprogramming the
charset. Together with this support for cut&paste in text mode.
To use it a userland daemon is needed (moused), which provides
the interface to the various mice protokols.
Bug fixes here and there, all known PR's closed by this update.
1996-06-21 07:19:18 +00:00
David Greenman
1293685583 Properly account for non-page aligned buffers. 1996-06-20 08:07:30 +00:00
David Greenman
ac269d78be Minor KNF formatting change to vmapbuf() and vunmapbuf(). 1996-06-20 01:47:21 +00:00
Nate Williams
a85fadfc45 Macro expressions should be fully parenthesized! Fix the MAXMEM
definition although it would work as it was written.

options        "MAXMEM=(128*1024)"

Suggested by:	bde
1996-06-19 15:37:52 +00:00
John Dyson
0157d6d925 Clean up vmapbuf and vunmapbuf significantly. The previous code was
very rough.
1996-06-19 03:39:24 +00:00
Nate Williams
b279668708 Document MAXMEM option.
[ Closes PR#1334, slightly modified by me ]

Submitted by:	James Raynard <james@jraynard.demon.co.uk>
1996-06-18 23:21:28 +00:00
Julian Elischer
34b5fca760 As we have appletalk protocol support we might as well show
how to get it..
1996-06-18 10:20:16 +00:00
John Dyson
6ead3edd9c Clean-up the new VM map procfs code, and also add support for executable
format file "etype".  It contains a description of the binary type for
a process.
1996-06-18 05:16:00 +00:00
Bruce Evans
9b2b0822b7 Removed unused #includes of <i386/isa/icu.h> and <i386/isa/icu.h>. icu.h
is only used by the icu support modules and by a few drivers that know
too much about the icu (most only use it to convert `n' to `IRQn').  isa.h
is only used by ioconf.c and by a few drivers that know too much about
isa addresses (a few have to, because config is deficient).
1996-06-18 01:22:40 +00:00
Peter Wemm
e999a90a90 This time, get rid of the struct copies that were really causing gcc to
call memcpy..  It seems that gcc would not inline the implicit call
when copying from a volatile...
1996-06-17 18:52:53 +00:00
Bill Paul
afe0e92aa8 Stomp another compiler warning: sc_devfs_token[] should only be declared
if DEVFS is #defined.
1996-06-17 17:21:35 +00:00
Bruce Evans
f0ea07bffb Reduced nesting of #includes in random.h and adjusted isa/random_machdep.c
to match (pc98/random_machdep.c probably requires a similar change).  This
is a problem area for the PC98 merge - all PC98 ifdefs in <machine/*.h> are
kludges to work around incorrect layering.
1996-06-17 16:47:43 +00:00
Bruce Evans
7d64a7fe80 Added support for TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).
Original version by John Hay.

Simplified timestamp code by reading the time exactly when necessary.
This may slow down the interrupt handler with extra calls to microtime(),
but only in bad configurations - the input fifo should normally be
disabled if timestamps on input are being used, since otherwise the
timestamp won't be precisely associated with any particular input event.
The interrupt handler remains slowed down by one test and branch for
each input (and now DCD change) event - avoiding this is not practical
yet.

The simplifications also fixed:
- timestamps for input sometimes being clobbered by output and modem
  status interrupts.
- valid timestamps not being available unless the port is configured with
  vector siointrts.  siointrts no longer exists.
- compiler warnings about siointr* in some configurations.

Simplified timestamp and probe code by depending on recent changes in
microtime() and DELAY() to preserve the interrupt enable flag.
1996-06-17 14:23:39 +00:00
Bruce Evans
16263f7a8b In getit(), use read_eflags()/write_eflags() to preserve the interrupt
enable flag instead of enable_intr() to restore it to its usual state.
getit() is only called from DELAY() so there is no point in optimising
its speed (this wasn't so clear when it was extern), and using
enable_intr() made it inconvenient to call DELAY() from probes that need
to run with interrupts disabled.
1996-06-17 12:50:22 +00:00
Bruce Evans
b7911dc3bb In microtime(), use pushfl/popfl to preserve the interrupt enable flag
instead of sti to it restore to its usual state.  pushfl/popfl is
actually faster in protected mode on Pentiums (4+3 cycles instead of 9),
and using sti made it extremely inconvenient to call microtime() from
fast interrupt handlers.  pushfl/popfl is a couple of cycles slower than
sti on 486's and a couple more cycles slower on 386's, but the relative
cost of using it is not large since microtime() has to use slow i/o
instructions on the old cpus.
1996-06-17 12:43:04 +00:00
John Dyson
ef743ce6ed Several bugfixes/improvements:
1) Make it much less likely to miss a wakeup in vm_page_free_wakeup
	2) Create a new entry point into pmap: pmap_ts_referenced, eliminates
	   the need to scan the pv lists twice in many cases.  Perhaps there
	   is alot more to do here to work on minimizing pv list manipulation
	3) Minor improvements to vm_pageout including the use of pmap_ts_ref.
	4) Major changes and code improvement to pmap.  This code has had
	   several serious bugs in page table page manipulation.  In order
	   to simplify the problem, and hopefully solve it for once and all,
	   page table pages are no longer "managed" with the pv list stuff.
	   Page table pages are only (mapped and held/wired) or
	   (free and unused) now.  Page table pages are never inactive,
	   active or cached.  These changes have probably fixed the
	   hold count problems, but if they haven't, then the code is
	   simpler anyway for future bugfixing.
	5) The pmap code has been sorely in need of re-organization, and I
	   have taken a first (of probably many) steps.  Please tell me
	   if you have any ideas.
1996-06-17 03:35:40 +00:00
Joerg Wunsch
9306343284 Explain the options for the `od' driver. 1996-06-16 20:04:47 +00:00
Peter Wemm
bde5e68a33 Fix cut/paste error; a read-only variable should have been read/write. 1996-06-16 13:32:16 +00:00
Nate Williams
771acaaa0a Whoops, I accidentally deleted a necessary ":" which is part of the
parameters to printf() using the "D" format.  (Why this even worked on
my box during testing I don't know, but as soon as I powered it on/off
it quite working.)
1996-06-15 00:43:03 +00:00
Nate Williams
333f7d7bb6 At long last, we know have support for the 3C589 in a FreeBSD release
using the existing files using the existing PCCARD support.  Now that
this is in place I would like to fixup the PCCARD hooks and remove the
if_zp driver.  At this point, we support everything we used to support
*AND MORE* with the PCCARD code.

Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp> (via the Nomad release)

[ This works on both my 3C589B and 3C589C ]
1996-06-14 22:11:38 +00:00
Nate Williams
8ca7c1c4a0 Better code for switching the ethernet transceiver.
My 3C509B-COMBO works fine with the following patch. Switching between
UTP and BNC is quite easy. (Just type 'ifconfig ep0 link1 -link2' or 'ifconifg
ep0 link2 -link1'.)

[ I tested this with the additional PC-CARD patches and it works on both
connectors on my 3C589B and 3C589C ]

Reviewed by:	nate
Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp>
1996-06-14 21:28:35 +00:00
Satoshi Asami
ad63a118b2 The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.

Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 11:02:28 +00:00
Satoshi Asami
f7ef42a091 Document LINT.
Reminded by:	jkh, j, bde
1996-06-14 09:42:52 +00:00
Stefan Eßer
21219d2116 Change CONF1_ENABLE_MSK to 0x7ff00000 in another attempt to decide
whether a system could possibly support PCI configuration mechanism 1
(or whether it rather is an EISA only system ...).
1996-06-13 21:50:41 +00:00
Satoshi Asami
d7629dff3b A fast memory copy for Pentiums using floating point registers.
It is called from copyin and copyout.

The new routine is conditioned on I586_CPU and I586_FAST_BCOPY, so you
need

options "I586_FAST_BCOPY"

(quotes essenstial) in your kernel config file.

Also, if you have other kernel types configured in your kernel, an
additional check to make sure it is running on a Pentium is inserted.
(It is not clear why it doesn't help on P6s, it may be just that the
 Orion chipset doesn't prefetch as efficiently as Tritons and friends.)

Bruce can now hack this away. :)
1996-06-13 07:17:21 +00:00
Joerg Wunsch
6b1d48f79c Externalize the declaration of dc_list. This is required in order to
get a ``generic'' kernel (``config kernel swap generic'') to compile.
1996-06-12 15:10:30 +00:00
John Dyson
419702a468 Fix a very significant cnt.v_wire_count leak in vm_page.c, and some
minor leaks in pmap.c.  Bruce Evans made me aware of this problem.
1996-06-12 06:52:12 +00:00
Gary Palmer
a01e62f093 Add -Wunused to try and catch any future offenders
Reviewed by:	bde
1996-06-12 05:54:46 +00:00
Gary Palmer
c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Gary Palmer
10a466c7d3 Clean up -Wunused warnings. Also clean up a -Winline warning while here.
Reviewed by:		bde
1996-06-12 05:04:51 +00:00
Gary Palmer
7b3628096c Clean up -Wunused warnings.
Reviewed by:	 Greg Ungerer <gerg@stallion.oz.au>
1996-06-12 04:26:36 +00:00
Nate Williams
22ceda90c7 Fixed GET/SETIPDOMAIN ioctl on /dev/socksys, which is used by various
other socket functions (gethostname() for one).

Reviewed by:	sef
1996-06-12 01:10:26 +00:00
Paul Traina
8f33d986bc Move warning messages under bootverbose 1996-06-11 16:11:27 +00:00
Paul Traina
6d715e951e Put clock calibration #defines in opt_clock.h to ease reconfiguration 1996-06-11 16:02:55 +00:00
Poul-Henning Kamp
8364338f09 We are developing a device driver of Smart Capture Card.
Smart Capture Card is a kind of video capture card, PCMCIA type II,
and made by IBM Japan co.. Unfortunately, it is sold in Japan now.

The device driver is working on the latest pccard-test package by
Tatsumi HOSOKAWA and bsd-nomads. Some applications are also working.
For example, xscc is a video moniter client on X-window, vic-2.7b2 is
a video conference tool.

We have a contract with IBM Japan. From the contract, we cannot release
the source code exept the permit of IBM Japan. But I think they will
permit us in few weeks.

Reviewed by:	phk
Requested by:	ohashi@mickey.ai.kyutech.ac.jp (Takeshi OHASHI)
1996-06-10 15:30:33 +00:00
Peter Wemm
b8484eb34b *blush* I used EXTRAVNODES everywhere else, but put EXTRA_VNODES in the
example here.. :-(
1996-06-10 08:15:29 +00:00
Alexander Langer
ff6f025aab Clarify the meaning of IPFIREWALL_VERBOSE. Add IPFIREWALL_VERBOSE_LIMIT. 1996-06-10 00:50:34 +00:00
Justin T. Gibbs
1ffa43c082 Detect and report dataphase overruns. Put the adapter into 'Bit Bucket'
mode when this occurs and allow the target to complete the transaction.
Force a retry on overruns since they are usually caused by termination or
cable problems.
1996-06-09 17:33:18 +00:00
Martin Renters
3042aad3e1 Add a check in the SMC probe to verify that the card has an ethernet
address that starts with 0000C0xxxxxx.  This prevents the probe code
from finding GUS cards.

Pointed out by: Seppo Kallio <kallio@kanto.cc.jyu.fi>
1996-06-09 14:44:17 +00:00
Joerg Wunsch
2e60812e3a Fix the spl handling. There's still the effect that the timers have
sometimes already been released at the time pcaclose() is called, but
this is now prevented from deadlocking by checking for a running timer
at the start of pca_wait().

At least, i can now play xboing again with pcaudio, this used to hang
the entire system previously within a few seconds.
1996-06-09 14:23:13 +00:00
Andrey A. Chernov
88926e45d5 Implement CDIOCCLOSE 1996-06-09 12:17:53 +00:00
Jordan K. Hubbard
43b74d6191 Bring back the `config file in the kernel' feature from the 1.x days. This
is conditionalized by the INCLUDE_CONFIG_FILE option in your kernel config
file and is not turned on by default.

Submitted-By: Bill Pechter <pechter@shell.monmouth.com>
1996-06-08 23:27:16 +00:00
Nate Williams
32d18afb14 Change the 'sysi86()' function not implemented' printf to be called only
when compiled with -DDIAGNOSTIC.  Almost all significant SCO binaries
I've run call an unsupported function and run correctly.  Given that
they aren't needed, the messages only clutter up the logfiles and
console.
1996-06-08 17:12:45 +00:00
Bruce Evans
87bc5d1973 Removed unnecessary forward declarations of incomplete structs. 1996-06-08 11:21:19 +00:00
Bruce Evans
d85327d7bc Stop using the alias pcb_ptd' for pcb_tcc.tss_cr3'. Use the (existing)
alias `pcb_cr3' instead.  That is still one alias too many, but is convenient
for me since I've replaced the tss in the pcb by a few scalar variables in
the pcb.
1996-06-08 11:03:19 +00:00
Peter Wemm
80b53b4fd5 Eliminate a struct copy that gcc doesn't inline and ends up as a call to
memset().
1996-06-08 10:18:12 +00:00
Bruce Evans
6f74588381 Removed bogus `altfmt' code. No alternative formats are supported, but
altfmt was abused to sometimes screw up the disassembly of the bytes
following unconditional jump instructions.  Gas doesn't pad to a longword
boundary like the comment said - that is the programmer's responsibility.
1996-06-08 10:15:48 +00:00
Bruce Evans
5610112b22 Fixed calculation of the number of cylinders. wdp_cylinders (was
wdp_fixedcyl) gives it directly.  wdp_removedcyl is "reserved" except
in ancient ATA-1 drafts and shouldn't be added.  This fixes PR 1288.

Changed some fields and comments in struct wdparams to match a less-
ancient ATA draft.

Fixed bit number for `rdy' in status string.
1996-06-08 10:03:38 +00:00
Bruce Evans
7dad0d7ef9 Removed recently introduced unnecessary #includes of <machine/cpu.h>
(bootverbose isn't there in -current) and nearby unnecessary #includes.
1996-06-08 09:37:51 +00:00
Bruce Evans
e7f1854cb7 Fixed group and permissions for devfs devices (group operator was games;
permissions 0640 was 0600).
1996-06-08 09:18:27 +00:00
Bruce Evans
7cc1644db3 Fixed existence, minor numbers, group and permissions for devfs devices
(locked devices weren't created; minor numbers didn't depend on the unit
number; group operator was games; permissions 0640 was 0600).
1996-06-08 09:17:51 +00:00
Bruce Evans
5e0fc49ea8 Replaced some memcpy()'s by bcopy()'s.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these.  I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized.  Now it is only used for one struct
copy in si.c.
1996-06-08 08:18:00 +00:00
Justin T. Gibbs
41f6ef7ee2 Bring back the loop in RESTART_SEQUENCER. It seems to be necessary for
the aic7850.  Go back to autoATN on parity errors.
1996-06-08 06:55:01 +00:00
John Dyson
886d3e1150 Adjust the threshold for blocking on movement of pages from the cache
queue in vm_fault.

Move the PG_BUSY in vm_fault to the correct place.

Remove redundant/unnecessary code in pmap.c.

Properly block on rundown of page table pages, if they are busy.

I think that the VM system is in pretty good shape now, and the following
individuals (among others, in no particular order) have helped with this
recent bunch of bugs, thanks!  If I left anyone out, I apologize!

Stephen McKay, Stephen Hocking, Eric J. Chet, Dan O'Brien, James Raynard,
Marc Fournier.
1996-06-08 06:48:35 +00:00
Nate Williams
d52ead1462 When uname() returns the system name, try to use the unqualified domain
name (ie; strip off the domain).  Given a hostname 'fooey.bar.com', the
previous code returned a system name of 'fooey.ba', instead of the more
correct 'fooey'.  SCO uses 'uname' for many things, including some of
it's socket code so this patch is necessary for running certain legacy
SCO apps. :)

A variant of this code has been running on my box for 2 months now.
1996-06-08 06:01:29 +00:00
Jordan K. Hubbard
b3e41931c9 A trailing patch Jim left out of the last commit.
Submitted-by: james
1996-06-07 22:55:14 +00:00
Nate Williams
3b17c1c3f8 Added index as a 'standard' file. It could be added as 'optional' for
ibcs2, but I felt it might be useful in other code as well at a later
point.
1996-06-07 22:26:59 +00:00
Andrey A. Chernov
7b2305f78e Describe ATAPI_STATIC (it seems lkm variant never work) 1996-06-07 15:50:08 +00:00
John Dyson
475dca82bb Fix a bug in the pmap_object_init_pt routine that pages aren't taken
from the cache queue before being mapped into the process.
1996-06-07 02:36:08 +00:00
John Dyson
3ccd871cad I missed a case of the page table page dirty-bit fix. 1996-06-05 06:36:21 +00:00
John Dyson
6b6f000870 Keep page-table pages from ever being sensed as dirty. This should fix
some problems with the page-table page management code, since it can't
deal with the notion of page-table pages being paged out or in transit.
Also, clean up some stylistic issues per some suggestions from
Stephen McKay.
1996-06-05 03:31:49 +00:00
Nate Williams
beca01611f Bring in changes from if_ep.c for PCCARD driver.
Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.
1996-06-04 21:41:01 +00:00
Nate Williams
e78325798b Freudian slip. Change M_DEVBUG -> M_DEVBUF.
Submitted by:	 "Stephen F. Combs" <combssf@salem.ge.com>
1996-06-04 17:50:28 +00:00
Nate Williams
f421018241 Fix typo. in the APM_DSVALUE_BUG code that I missed.
Obtained from:	Someone on the mailing list (sorry, I forgot who)
1996-06-04 17:37:46 +00:00
Søren Schmidt
70013b5739 Added missing CR0_NW define for Cyrix 486DLC support. It's still not
stable on my hardware, but its better... *sigh*

Obtained from: NetBSD
1996-06-03 19:37:38 +00:00
John Dyson
3943b4ea05 Don't carry the modified or referenced bits through to the child
process during pmap_copy.  This minimizes unnecessary swapping or creation of
swap space.  If there is a hold_count flaw for page-table
pages, clear the page before freeing it to lessen the chance of a system
crash -- this is a robustness thing only, NOT a fix.
1996-06-02 22:28:53 +00:00
Joerg Wunsch
3fda1b129f Be slightly more verbose during configure() in the bootverbose case.
This breaks the long silence after the ``npx0'' message and allows to
track some of the problems regarding the root f/s decisions.
1996-06-02 18:58:39 +00:00
Joerg Wunsch
89cabf8664 Hide the ``wrong signature'' message behind bootverbose. It's
annoying for people who don't have a bus mouse.
1996-06-02 18:57:17 +00:00
John Dyson
c2b39c9910 Fix the problem with pmap_copy that breaks X in small memory machines. Also
close some windows that are opened up by page table allocations.  The
prefaulting code no longer uses hold counts, but now uses the busy
flag for synchronization.
1996-06-01 19:19:21 +00:00
Paul Traina
53df9ccfca Fix ioctl() operations...nasty typo 1996-05-31 17:35:07 +00:00
Justin T. Gibbs
2ee75088b4 Fix a regression. Turn off the selection hardware during a selection timeout
before clearing the SELTO interrupt.  We used to do this in the past, but
this outb got lost.

Turn ATN on ourselves as appropriate during a parity error instead of relying
on ENAUTOATNP.

Don't use a loop in RESTART_SEQUENCER.  Its not necessary.
1996-05-31 06:32:09 +00:00
Peter Wemm
ee323f62ad Jump some hoops to have the *.s code being able to be run through both an
ansi and traditional cpp.

The nesting rules of macros are different, which required some changes.
Use __CONCAT(x,y) instead of /**/.
Redo some comments to use /* */ rather than "# comment" because the ansi
  cpp cares about those, and also cares about quote matching.
1996-05-31 01:08:08 +00:00
Peter Wemm
fd54183bb9 Instead of: cpp blah file.s | as -o file.o, use instead:
cc -c -x assembler-with-cpp -o file.o file.s.

This means that any cpp fatal errors will now be detected, as well as
running *.s files through an ansi cpp instead of a traditional cpp.

(fixes to allow *.s to compile under both ansi and traditional to follow)
1996-05-31 01:01:24 +00:00
John Dyson
f35329ac0f This commit is dual-purpose, to fix more of the pageout daemon
queue corruption problems, and to apply Gary Palmer's code cleanups.
David Greenman helped with these problems also.  There is still
a hang problem using X in small memory machines.
1996-05-31 00:38:04 +00:00
Peter Wemm
114a8cff43 Add an option "EXTRA_VNODES" to cause an extra number of vnode structures
to be allocated at boot time.  This is an expensive option, as they
consume physical ram and are not pageable etc.  In certain situations,
this kind of option is quite useful, especially for news servers that
access a large number of directories at random and torture the name cache.
Defining 5000 or 10000 extra vnodes should cut down the amount of vnode
recycling somewhat, which should allow better name and directory caching
etc.

This is a "your mileage may vary" option, with no real indication of
what works best for your machine except trial and error.  Too many will
cost you ram that you could otherwise use for disk buffers etc.

This is based on something John Dyson mentioned to me a while ago.
1996-05-31 00:20:34 +00:00
Peter Wemm
c15b6c4bc6 When estimating the time (in ms) left to drain the output queue based
on the baud rate, dont get upset if it's been hung up by setting B0.
Instead, sleep for a short time, as the host controller takes a while
to go through the state changes.
1996-05-30 23:41:35 +00:00
Justin T. Gibbs
c2d50bea44 Merge in changes for NetBSD/OpenBSD.
NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
				    Pete Bentley <pete@demon.net>,
				    Charles M. Hannum <mycroft@mit.edu>,
				    Theo de Raadt <deraadt@theos.com>
1996-05-30 07:20:17 +00:00
Justin T. Gibbs
0262313ddc Merge in changes for NetBSD/OpenBSD.
Add a panic for attempts to page in a non paged out SCB.

Re-order some of the interrupt routine for better performance.

NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
				    Pete Bentley <pete@demon.net>,
				    Charles M. Hannum <mycroft@mit.edu>,
				    Theo de Raadt <deraadt@theos.com>
1996-05-30 07:19:59 +00:00
John Dyson
256951297d The wrong address (pindex) was being used for the page table directory. No
negative side effects right now, but just a clean-up.
1996-05-29 05:09:07 +00:00
Gary Palmer
d9378aac9a Clean up the warnings produced by the recent PCI code. Requested by
SE since he doesn't have good access right now
1996-05-27 22:32:23 +00:00
Poul-Henning Kamp
b13f884281 Cleanup the last of the assembly time "-KERNBASE" relocations. 1996-05-27 06:51:46 +00:00
Peter Wemm
d2dc185840 Fix the warnings about "cant inline call to xxx" by reordering two
functions.  It seems gcc wants to have seen the definitions of the
function before it will insert it inline in a caller.
1996-05-27 06:02:52 +00:00
Justin T. Gibbs
c6841cd18f Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.

Closes PR:i386/1243
Submitted by:	flash@eru.tubank.msk.su
1996-05-24 15:22:36 +00:00
Garrett Wollman
f66e235a13 Add an incremental checksum update routine. Perhaps some i386 assembly
guru out there can find a way to take advantage of little-endianness to
make this computation more efficient.  (I am certain that it can be done,
but haven't managed to make it work myself.)
1996-05-23 20:11:48 +00:00
Justin T. Gibbs
087b79e649 Correct a botched commit from yesturday. It helps to bring over the
right patch file.<sigh>
1996-05-23 15:02:18 +00:00
Peter Wemm
cd61f6c584 Fix harmless warning.. pmap_nw_modified was not having it's arg
cast to pt_entry_t like the others inside the DIAGNOSTIC code.
1996-05-22 17:07:14 +00:00
Justin T. Gibbs
393ca4686c Setup ULTRAEN in SXFRCTL0 to match the syncrate we are using during the
call of ahc_scsirate.  Otherwise, the proper setting may not get set until
the next reconnection/selection.

The saved_queue used to re-order the QINFIFO during error recovery or
certain SCB paging operations should be an array of u_chars not ints.

saved_queue type error pointed out by: Noriyuki Soda <soda@sra.co.jp>
1996-05-22 15:32:28 +00:00
John Dyson
93d52b3c56 A serious error in pmap.c(pmap_remove) is corrected by this. When
comparing the PTD pointers, they needed to be masked by PG_FRAME, and
they weren't.  Also, the "improved" non-386 code wasn't really an
improvement, so I simplified and fixed the code.  This might have
caused some of the panics caused by the VM megacommit.
1996-05-22 04:17:17 +00:00
Dima Ruban
2dfdc2cd79 "board not responding" -> "board is not responding"
Reviewed by:	gibbs
1996-05-22 00:04:12 +00:00
Justin T. Gibbs
f6ca14f03c Enable/Disable Ultra mode on a per target basis. This allows the driver
to use the full range of settings from 3.6-20MHz on any target.

Remove all Ultra settings except for the top three that are documented
to work.  This fixes some problem reports with the last revision of the
driver since at least the 5.7MHz entry doesn't work in Ultra mode.
1996-05-21 18:37:25 +00:00
John Dyson
ed48f831e0 To quote Stephen McKay: pmap_copy is a complex NOP at this moment :-).
With this fix from Stephen, we are getting the target fork performance
that I have been trying to attain: P5-166, before the mega-commit: 700-800usecs,
after: 600usecs, with Stephen's fix: 500usecs!!!  Also, this could be the
solution of some strange panic problems...
Reviewed by:	dyson@freebsd.org
Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1996-05-21 00:39:39 +00:00
John Dyson
867a482d66 Initial support for mincore and madvise. Both are almost fully
supported, except madvise does not page in with MADV_WILLNEED, and
MADV_DONTNEED doesn't force dirty pages out.
1996-05-19 07:36:50 +00:00
Stefan Eßer
8408422768 Add support for NE2000 compatible PCI Ethernet cards. The PCI probe
is enabled by having an "device ed0 at isa? [...]" config line.
The first PCI card will get a unit number one higher than the highest
defined for any ISA card of the ED type, e.g. if ed0 and ed1 are
configured, then the PCI cards will be ed2, ed3, ...

BEWARE: If you have configured your kernel as ed0 with the port address
as assigned by the PCI BIOS, then your card will be found by both the
PCI and ISA probes, and bad things may happen. Make sure to restore
the original port address form the GENERIC kernel for the ed0 device!

Reviewed by:	davidg
1996-05-18 17:56:42 +00:00
John Dyson
b18bfc3da7 This set of commits to the VM system does the following, and contain
contributions or ideas from Stephen McKay <syssgm@devetir.qld.gov.au>,
Alan Cox <alc@cs.rice.edu>, David Greenman <davidg@freebsd.org> and me:

	More usage of the TAILQ macros.  Additional minor fix to queue.h.
	Performance enhancements to the pageout daemon.
		Addition of a wait in the case that the pageout daemon
		has to run immediately.
		Slightly modify the pageout algorithm.
	Significant revamp of the pmap/fork code:
		1) PTE's and UPAGES's are NO LONGER in the process's map.
		2) PTE's and UPAGES's reside in their own objects.
		3) TOTAL elimination of recursive page table pagefaults.
		4) The page directory now resides in the PTE object.
		5) Implemented pmap_copy, thereby speeding up fork time.
		6) Changed the pv entries so that the head is a pointer
		   and not an entire entry.
		7) Significant cleanup of pmap_protect, and pmap_remove.
		8) Removed significant amounts of machine dependent
		   fork code from vm_glue.  Pushed much of that code into
		   the machine dependent pmap module.
		9) Support more completely the reuse of already zeroed
		   pages (Page table pages and page directories) as being
		   already zeroed.
	Performance and code cleanups in vm_map:
		1) Improved and simplified allocation of map entries.
		2) Improved vm_map_copy code.
		3) Corrected some minor problems in the simplify code.
	Implemented splvm (combo of splbio and splimp.)  The VM code now
		seldom uses splhigh.
	Improved the speed of and simplified kmem_malloc.
	Minor mod to vm_fault to avoid using pre-zeroed pages in the case
		of objects with backing objects along with the already
		existant condition of having a vnode.  (If there is a backing
		object, there will likely be a COW...  With a COW, it isn't
		necessary to start with a pre-zeroed page.)
	Minor reorg of source to perhaps improve locality of ref.
1996-05-18 03:38:05 +00:00
Jordan K. Hubbard
734d08a223 A patch for the meteor device driver. It fixes:
1) A spelling error pointed out by Paco Hope.
       2) A bug in the range checking routing pointed out by Jim Bray.
       3) Enables the setting of frames per second.
Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
1996-05-17 09:43:15 +00:00
Nate Williams
13cbd355dd Whoops, don't add something that already exists. Removed redundant
entries but better document the existing PCCARD stuff.
1996-05-13 04:38:10 +00:00
Nate Williams
92d38a1399 Added commented out PCCARD entries to GENERIC, also document and add
entries in LINT.
1996-05-13 04:29:14 +00:00
Joerg Wunsch
09fdca5394 Fix the "well-known retries bug" (a logic-o). 1996-05-12 12:36:59 +00:00
Joerg Wunsch
a9313682fc Give up waiting for a successful keyboard reset after some
unreasonable time.  I've got a PCI mainboard that simply doesn't grok
it, so continuing with a warning (and a keyboard that's working
nevertheless :) seems to be better than spin-looping forever.
1996-05-11 23:16:23 +00:00
Bruce Evans
d03b40173c Hide options for emulators and static file systems in opt_dontuse.h.
These options only apply at config time.  Using them at compile time
would break the corresponding lkms.
1996-05-11 04:39:53 +00:00
Bruce Evans
a7c6885b3a Fixed BOOT_HD_BIAS. 1996-05-11 04:27:24 +00:00
Garrett Wollman
cb7545a995 Allocate mbufs from a separate submap so that NMBCLUSTERS works as
expected.
1996-05-10 19:28:55 +00:00
Justin T. Gibbs
efaafa27d3 Honor the CHANNEL_B_PRIMARY bit of the BIOSCTRL register and probe
channel B first as approriate.

Only reset the SCSI bus if the RESET_SCSI bit of SCSICONF is set.  This
makes the aic7xxx driver honor all of the configuration settings availible
in SCSI-Select or the ECU.

Fix a benign bug in the reset code that caused us to always wait a full
second after the chip reset.  This should shave some time off the probe.
Bug found by pedrosal@nce.ufrj.br (Pedro Salenbauch)

It seems that only the top three sync rates are doubled when in ultra mode,
so update the syncrates table as appropriate.
Found by "Dan Willis" <dan@plutotech.com> and his SCSI bus analyzer
1996-05-10 16:21:05 +00:00
Justin T. Gibbs
2f17ee3208 Honor the CHANNEL_B_PRIMARY bit of the BIOSCTRL register and probe
channel B first as approriate.

Even if the BIOS is diabled, the ECU will still set the primary channel
bit, SCSI ID, RESET_SCSI bit, and BOFF_TIME, so use them.
1996-05-10 16:14:51 +00:00
Peter Wemm
c9da1b81d5 Oops, I missed these when I imported the Stallion drivers.
Add samples and some info to LINT (and a pointer to the real docs)
1996-05-10 13:26:03 +00:00
Poul-Henning Kamp
9f6eb8da71 Fix brino on my part. _etext doesn't include the padding to a page
boundary, which means that it doesn't mark the start of the data
section (which is then inaccessible to the programmer ??).
Hopefully fixes recent locore reboot problems.
1996-05-09 07:16:00 +00:00
Peter Wemm
809959779f *blush* How did this slip through?
Fix a dynamic initialiser in a static variable, and make sure sysctl.h
is #included.
1996-05-08 04:48:25 +00:00
Wolfram Schneider
9fb933075e `mv'' -> `mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root
1996-05-07 23:19:49 +00:00
Nate Williams
757dab8dcb Simplify probe. Removed the DELAY() as it's not needed. 1996-05-07 22:33:19 +00:00
Nate Williams
0e76201114 Removed one of the un-documented CTRL pokes, and replace it with a one
second delay.  My ps/2 mouse is now found reliably on my ThinkPad (it
didn't before) and still works on my NEC Versa.

Submitted by:	Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:59:44 +00:00
Nate Williams
f73355c18f Make sure you include <sys/devconf.h> if you have devconf code. :( 1996-05-07 21:56:46 +00:00
Nate Williams
a0245aeb1a Added code to avoid keyboard 'hangs' during the probe.
Submitted by:	Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:48:55 +00:00
Nate Williams
0c7b035e39 Added devconf() support.
Obtained from: Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:32:29 +00:00
Nate Williams
077e6558ec Re-wrote psm_poll_status() to use the ioport supplied in the kernel
config file instead of hard-coding it in the driver.  No functional
differences.

This is based on the code Richard Wiwatowski <rjwiwat@adelaide.on.net>
sent to the mailing list.
1996-05-07 21:11:13 +00:00
Nate Williams
110f70b852 Last typo fixed (network came up for a few minutes). 1996-05-07 20:39:34 +00:00
Nate Williams
ff473041c5 Augh, more typos.
(I hate *Sprint*, since the network is down it's hard to test things well.)
1996-05-07 20:08:21 +00:00
Nate Williams
83cc6d6bdd Whoops, brain-o's with the previous commit. Fix up quite a few typos. 1996-05-07 19:40:47 +00:00
Nate Williams
aaf73493e8 - KNF'ify
- Prepend PSM_ to some defines to avoid any possible name-space problems
- Use some already defined constants instead of magic #'s where appropriate.

[ No functional changes (yet) ]
1996-05-07 19:01:31 +00:00
Paul Traina
07167e6200 Update qcamdriver to 1.1-release distribution.
- move the cdevsw structure back up front (sigh)
- use __linux__ instead of LINUX
1996-05-06 16:47:28 +00:00
Peter Wemm
3af9eab18e Avoid potential trademark conflict 1996-05-05 17:55:54 +00:00
Peter Wemm
3461d589f2 Change the logic of the interrupt/poll loop. It no longer loops until
it empties all of the 256 byte incoming fifo, as it can spend more time
processing one port than intended, especially if data is streaming in
at 115.2K.  The port fifo will be emptied and dumped into the tty system
and left until next time.  I've been running this for quite some time on
one of my systems here.
Also, if the tty layer is blocked or full it lets the hardware assert the
flow control rather than loosing the data.
1996-05-05 17:35:19 +00:00
Peter Wemm
34914e50d4 Change the compiled-in polling parameters to a sysctl setting. 1996-05-05 17:09:04 +00:00
Peter Wemm
962b3ba7ba Add $Id$ 1996-05-04 08:53:27 +00:00
Peter Wemm
1d52f67989 Some trivial updates to the information in here, A good deal of this
is out of date, as it deals with patching the driver into the kernel.
1996-05-04 08:51:42 +00:00
Peter Wemm
3fca8b1c96 Add $Id$
Compile for FreeBSD-2.2
Fix some compile warnings about function declarations
-current's VM include files have changed lately, this needed to be updated.
Use correct major number.
1996-05-04 08:49:40 +00:00
Peter Wemm
8c72709bb8 Add $Id$
Compile for FreeBSD-2.2 (it compiles for 2.0.5, 2.1 and 2.2)
Use -current include file locations
Use -current pciintr calling conventions
1996-05-04 08:44:42 +00:00
Peter Wemm
346bbdf488 Add $Id$ 1996-05-04 08:42:14 +00:00
Peter Wemm
98eba67210 Add stl and stli drivers for the Stallion cards. 1996-05-04 08:41:28 +00:00
Peter Wemm
c7893f2fbe Distinguish the classes of stallion boards (intelligent vs. "smart" cd1400)
and which driver is for which.  Major 72 was for the cd1400 based cards,
I've grabbed the next free (75) for the intelligent, high performance
boards.
1996-05-04 08:40:13 +00:00
Paul Traina
3e627c9e2a Update to 1.1beta5d 1996-05-04 07:05:55 +00:00
Paul Traina
3bac9a71b6 Update to version 1.1beta5d of the driver. This driver now runs under
FreeBSD 2.1 and 2.2, BSD/OS 2.x, Linux, Solaris, and SCO V.
1996-05-04 07:03:55 +00:00
Peter Wemm
dcde8b4904 This commit was generated by cvs2svn to compensate for changes in r15599,
which included commits to RCS files with non-trunk default branches.
1996-05-04 06:31:39 +00:00
Peter Wemm
c1e8e76993 Import kernel parts of the v0.0.5alpha Stallion driver(s).
This is now two seperate drivers that support (I think) all of Stallions's
range, including the high performance intelligent cards, and their older
cards.

Submitted by: Greg Ungerer (gerg@stallion.oz.au)

(User-mode parts and patches to follow)
1996-05-04 06:31:39 +00:00
Peter Wemm
53f25a7bd9 This commit was generated by cvs2svn to compensate for changes in r15596,
which included commits to RCS files with non-trunk default branches.
1996-05-04 06:16:23 +00:00
Peter Wemm
64b69fe2e7 Import v0.0.4alpha of the Stallion driver.
Sumbitted by: Greg Ungerer (gerg@stallion.oz.au)
1996-05-04 06:16:23 +00:00
Peter Wemm
c7b0cbac79 This commit was generated by cvs2svn to compensate for changes in r15593,
which included commits to RCS files with non-trunk default branches.
1996-05-04 06:13:22 +00:00
Peter Wemm
1d0f52d7e4 Import v0.0.3alpha of Stallion driver.
Submitted by: Greg Ungerer (gerg@stallion.oz.au)
1996-05-04 06:13:22 +00:00
Peter Wemm
b17b915ed3 This commit was generated by cvs2svn to compensate for changes in r15590,
which included commits to RCS files with non-trunk default branches.
1996-05-04 06:09:47 +00:00
Peter Wemm
7450fe9fc2 Import v0.0.2 alpha of the Stallion driver
Submitted by: Greg Ungerer (gerg@stallion.oz.au)
1996-05-04 06:09:47 +00:00
Peter Wemm
019ab50b3d This commit was generated by cvs2svn to compensate for changes in r15587,
which included commits to RCS files with non-trunk default branches.
1996-05-04 06:03:59 +00:00
Peter Wemm
0a9462e353 Initial import of driver for the Stallion EasyIO and EasyConnection 8/32
boards by Greg Ungerer (gerg@stallion.oz.au).  (v0.0.1 alpha)

This is a multiple import of all revisions available to build up
a history.

This driver supports only some of the Stallion range, in particular, not
the highly intelligent cards.  That comes in shortly.

Submitted by: Greg Ungerer (gerg@stallion.oz.au)
1996-05-04 06:03:59 +00:00
Poul-Henning Kamp
aa8de40ae5 Another sweep over the pmap/vm macros, this time with more focus on
the usage.  I'm not satisfied with the naming, but now at least there is
less bogus stuff around.
1996-05-03 21:01:54 +00:00
Poul-Henning Kamp
3554bebc3e A nasty #define, so that we don't use buf->b_actf anymore. 1996-05-03 20:52:18 +00:00
Poul-Henning Kamp
14212c9d29 Typo. 1996-05-03 20:15:11 +00:00
Poul-Henning Kamp
0be33caa54 Forget that TAILQ's must be init'ed. 1996-05-03 16:49:14 +00:00
Poul-Henning Kamp
540bfbd1a5 Move from the old buf.b_actf to the new TAILQ(buf.b_act).
Also remove a ton of weird comments and a couple of no-use options.
1996-05-03 14:58:11 +00:00
Poul-Henning Kamp
17542807e5 Move from the old buf.b_actf to the new TAILQ(buf.b_act). 1996-05-03 14:57:27 +00:00
Satoshi Asami
03b225a354 Add ccd to list of devices. Also add a sample entry in LINT. 1996-05-03 05:44:45 +00:00
Poul-Henning Kamp
5084d10dd0 Move atdevbase out of locore.s and into machdep.c
Macroize locore.s' page table setup even more, now it's almost readable.
Rename PG_U to PG_A (so that I can...)
Rename PG_u to PG_U.  "PG_u" was just too ugly...
Remove some unused vars in pmap.c
Remove PG_KR and PG_KW
Remove SSIZE
Remove SINCR
Remove BTOPKERNBASE

This concludes my spring cleaning, modulus any bug fixes for messes I
have made on the way.

(Funny to be back here in pmap.c, that's where my first significant
contribution to 386BSD was... :-)
1996-05-02 22:25:18 +00:00
Andrey A. Chernov
f0478277ba Fix ^[[1K (clear from beginning of line to cursor) and
^[[2K (clear whole line), they not work _initially_
1996-05-02 21:47:50 +00:00
Joerg Wunsch
1c393ef6fb Replace the dependency of install' from kernel' by a test for the
existance fo `kernel'.

Submitted by:	peter
1996-05-02 21:40:50 +00:00
Poul-Henning Kamp
65ceccb03c This can go now. 1996-05-02 14:21:57 +00:00
Poul-Henning Kamp
e911eafcba removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
        ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
        NPDEPG

Major macro cleanup.
1996-05-02 14:21:14 +00:00
Poul-Henning Kamp
f8845af0db First pass at cleaning up macros relating to pages, clusters and all that. 1996-05-02 10:43:17 +00:00
Poul-Henning Kamp
f3e002a838 Rename the very bogus indeed option "LINUX" to "COMPAT_LINUX".
I can only presume that the brain behind this have never seen code
that says "#ifdef LINUX" :-(
1996-05-02 10:41:18 +00:00
Poul-Henning Kamp
a8c5fef5e6 KGDB is dead. It may come back one day if somebody does it. 1996-05-02 09:34:51 +00:00
Bruce Evans
2dafbfcbab Added calibration the i8254 and the i586 clocks agains the RTC at boot
time.  The results are currently ignored unless certain temporary options
are used.

Added sysctls to support reading and writing the clock frequency variables
(not the frequencies themselves).  Writing is supposed to atomically
adjust all related variables.

machdep.c:
Fixed spelling of a function name in a comment so that I can log this
message which should have been with the previous commit.

Initialize `cpu_class' earlier so that it can be used in startrtclock()
instead of in calibrate_cyclecounter() (which no longer exists).

Removed range checking of `cpu'.  It is always initialized to CPU_XXX
so it is less likely to be out of bounds than most variables.

clock.h:
Removed I586_CYCLECTR().  Use rdtsc() instead.

clock.c:
TIMER_FREQ is now a variable timer_freq that defaults to the old value of
TIMER_FREQ.  #define'ing TIMER_FREQ should still work and may be the best
way of setting the frequency.

Calibration involves counting cycles while watching the RTC for one second.
This gives values correct to within (a few ppm) + (the innaccuracy of the
RTC) on my systems.
1996-05-01 08:39:02 +00:00
Bruce Evans
0f99c703ec i386/machdep.c
include/clock.h
isa/clock.c
1996-05-01 08:31:21 +00:00
Jordan K. Hubbard
5e26fb6fdf Include <sys/buf.h> so that this does't blow up with B_WRITE undefined.
I fully updated my src tree and did a `make includes' in /usr/src before
trying this fix, so I can only presume that Bruce missed something.
1996-05-01 06:31:18 +00:00
Bruce Evans
119bc2cc9b Oops, restored existent option LINUX. It is used at config-time. 1996-05-01 05:04:38 +00:00
Bruce Evans
b1d3d2ffcf Fixed a race that caused panics in kernel printfs when the screen timeout
routine changed the screen pointers while output was in progress.
1996-05-01 03:58:21 +00:00
Bruce Evans
eabe0f9f57 Don't return unused values in cpu_switch() or savectx().
Don't preserve unused registers in the NPX case in savectx().
1996-05-01 03:47:04 +00:00
Bruce Evans
3722e90e21 Removed unused #include. 1996-05-01 03:32:46 +00:00
Bruce Evans
7c243b9add Removed nonexistent option "LINUX" (what's that :-). 1996-05-01 03:30:04 +00:00
Bruce Evans
2c703b3e86 Only disable sio3 by default. 1996-05-01 03:26:58 +00:00
Bruce Evans
a794e791c8 Removed unnecessary #includes from <sys/imgact.h> so that it is
self-sufficient and added explicit #includes where required.
1996-05-01 02:43:13 +00:00
Bruce Evans
e506fdf557 Oops, this should have been with the ctype changes.
Fixed longstanding namespace convolution involving rune_t vs wchar_t...

This change breaks similar (but more convoluted) convolutions in the
stddef.h in gcc distributions.  Ports of gcc should avoid using the
gcc headers.
1996-05-01 00:47:05 +00:00
Bruce Evans
494908b12c Fixed timeouts. I broke them in rev.1.17 for the FORCE_COMCONSOLE and
(interactively set RB_SERIAL) && BOOTWAIT (serial i/o) cases.
1996-04-30 23:43:25 +00:00
Stefan Eßer
e20df7fc31 Make pcibus_check() ignore Device/Vendor IDs of all 0. 1996-04-30 21:37:21 +00:00
Poul-Henning Kamp
68c1eb1215 pte.h: Add the VADDR(pdi,pti) macro to construct virtual address from
page dir+table index.
pmap.h: remove NUPDE, it was wrong and not used.  Sanitize KSTKPTEOFF.
vmparam.h: Calculate virtual addr from PDI+PTI from pmap.h rather than
using magic math.  Remove UPDT, not used.
1996-04-30 12:02:12 +00:00
Poul-Henning Kamp
d783aa7bc3 Remove a spurious mapping that was introduced earlier. 1996-04-30 11:58:56 +00:00