Commit Graph

732 Commits

Author SHA1 Message Date
Andrey A. Chernov
f73cefd412 1) GET_TIME function completely broken
it returns time in microseconds instead of HZ
(feel difference!)
2) change GET_TIME type to unsigned long in all places to prevent overflow
1994-03-23 19:27:52 +00:00
Andrey A. Chernov
83bd7ca8b0 1) Change dtrwait 300 to 3 * hz (to be more kosher)
2) Protect sioclose by spltty()
1994-03-23 17:28:35 +00:00
David Greenman
d5e26ef0ef Bounce buffers. From John Dyson with help from me. 1994-03-23 09:16:04 +00:00
Andrey A. Chernov
ac1ad5b2d7 Add missing EXCLUDE_SBPRO 1994-03-23 00:05:25 +00:00
Andrey A. Chernov
7116e6b71c Add siostop to sioclose, because ttyflush called from
wrong places removed now.
1994-03-21 22:19:56 +00:00
Andreas Schulz
308352e4d4 Changed the raw partition number from 3 to 0. This change lets us use
/dev/mcd0a instead of /dev/mcd0d. This is more conforming to the /dev/cd0a
for the SCSI cdrom drives. It breaks the convention d the whole drive.
But the question is, do we really need partitions on cdrom drives ?
1994-03-21 20:59:55 +00:00
Andreas Schulz
16a6a70817 Makefile.i386:
put vers.o at the end of the loader line. We are simply jumping in the
moment into the first location of the text segment in 386bsd. So the
linking order is very important :-). With the addition of the const
types in newvers.sh we jumped into them. I have experimented with an
entry point specification, but was unsuccessfull. Someone else should
look at this.
devices.i386:
files.i386:
Added entries for a Sony cdrom driver.
1994-03-21 20:48:52 +00:00
Andrey A. Chernov
67a850fc67 Increase default DTR wait time up to 3 secs.
Also hardw. specs says 2.5 secs is enough, many modems needs
at least 3 secs.
1994-03-21 15:18:27 +00:00
Andrey A. Chernov
6ec145713c Now printf("changing root... indicates raw partition for floppy
f.e. fd1d
1994-03-21 15:02:47 +00:00
Andrey A. Chernov
3f0afdd835 Fix printf for root system mounted on second floppy 1994-03-21 14:53:08 +00:00
Andrey A. Chernov
10c7408ae0 Fix for root system mounted on second floppy 1994-03-21 14:37:01 +00:00
David Greenman
29360eb099 Changed dynamic stack grow code to grow by "SGROWSIZ" amount. Initially
allocate SGROWSIZ amount of stack. Also set vm_ssize to the initial
stack VM size. Increased DFLSSIZ stack rlimit default to 8MB.
1994-03-21 09:35:24 +00:00
David Greenman
66ad8173f3 previous optimization from John wasn't quite ready for primetime. 1994-03-21 06:37:04 +00:00
David Greenman
93555dc983 Two fixes from John Dyson to fix hangs and panics when using ctrl-T:
1) tty.c: gather all the info about the processes before calling ttyprintf
	(which may block).
2) syscons.c: handle asynchronous output properly (data structures may
	be corrupted otherwise).
1994-03-20 20:05:55 +00:00
Garrett Wollman
9131cc8d54 Delete some references to sleep() that somehow crept in. 1994-03-20 00:30:04 +00:00
Garrett Wollman
f0e96ca631 Added cpu_model and machine variables. 1994-03-19 23:58:58 +00:00
Garrett Wollman
27408f32ce More symtab space. 1994-03-19 22:17:56 +00:00
Andrey A. Chernov
65f120b86a Remove ttyfree from sioclose
Example:
Application use port cua01
Getty open ttyd1 (allocates rawq,outq,etc) and waits while application
done
Application quits, sioclose issued, ttyfree issued (getty calls revoke)
Getty awakes and goes to panic into initrb (NULL rawq)
1994-03-18 23:35:37 +00:00
Garrett Wollman
11e4fa43bc Added David Mills' kernel NTP PLL code. The current version of NTP does
not yet speak to this code.
1994-03-15 01:58:22 +00:00
David Greenman
943a66f340 Performance improvements from John Dyson.
1) A new mechanism has been added to prevent pages from being paged
	out called "vm_page_hold". Similar to vm_page_wire, but
	much lower overhead.
2) Scheduling algorithm has been changed to improve interactive
	performance.
3) Paging algorithm improved.
4) Some vnode and swap pager bugs fixed.
1994-03-14 21:54:03 +00:00
Andrey A. Chernov
05e5086aab Checking l_close in unneeded (one of my previous fixes),
so back it out.
1994-03-14 18:52:14 +00:00
Steven Wallace
63a7486262 Removed EXCLUDE_<driver> for sound drivers so that all sound drivers
are compiled into kernel.  Users are referred to sound doc for info.
1994-03-11 22:17:24 +00:00
Steven Wallace
62d15cccd2 Added appropriate entries into files.i386 for snd drivers in /sys/i386/isa/sound
Added new snd drivers and EXCLUDE_<driver> options to LINT.
1994-03-11 10:31:05 +00:00
Steven Wallace
2d997c1071 Updated include files for sound drivers. 1994-03-11 10:28:36 +00:00
Steven Wallace
a75ba8fa22 Integrated Hannu Savolainen's new VoxWare sound drivers, version 2.4.
These drivers now have full SoundBlaster 16 support.
1994-03-11 10:27:25 +00:00
Andrey A. Chernov
2109bd5c86 Don't call ttyclose twice into sioclose and move ttyclose
before comhardclose
1994-03-10 10:06:27 +00:00
Andrey A. Chernov
3b2b53aa9a First open:
now HUPCL set only in bidir case for callin lines
(this prevents set HUPCL on mouse)
comhardclose:
in addition to HUPCL case now DTR dropped for bidir case
if line was active in and no carrier present now.
(this prevents DTR sleep on mouse)
1994-03-08 22:11:10 +00:00
Nate Williams
e7e0afea3b From: Jim Babb <babb@sedhps01.mdc.com>
Subject: Re: Bugs with floppy drives
Date: Tue, 8 Mar 94 9:11:54 CST

The transfer speed was only set in the retry after error, not  when
switching drives.
1994-03-08 16:25:29 +00:00
David Greenman
835b7809ab Modified pccnprobe to not set cn_tp = CONSOLE_TTY if __FreeBSD__ is
defined. This code should probably be yanked out.
1994-03-08 15:17:41 +00:00
Rodney W. Grimes
07c2619554 Add mcd1 at 0x340 irq 11. 1994-03-08 05:56:47 +00:00
David Greenman
5c09563e1e 1) enhanced in_cksum from Bruce Evans.
2) minor comment change in machdep.c
3) enhanced bzero from John Dyson (twice as fast on a 486DX/33)
1994-03-07 11:47:32 +00:00
David Greenman
04f1835605 1) "Pre-faulting" in of pages into process address space
Eliminates vm_fault overhead on process startup and
		mmap referenced data for in-memory pages.

		(process startup time using in-memory segments *much* faster)

	2)	Even more efficient pmap code.  Code partially cleaned up.
		More comments yet to follow.

		(generally more efficient pte management)

	3)	Pageout clustering ( in addition to the FreeBSD V1.1 pagein
		clustering.)

		(much faster paging performance on non-write behind disk
		subsystems, slightly faster performance on other systems.)

	4)	Slightly changed vm_pageout code for more efficiency and
		better statistics.  Also, resist swapout a little more.

		(less likely to pageout a recently used page)

	5)	Slight improvement to the page table page trap efficiency.

		(generally faster system VM fault performance)

	6)	Defer creation of unnamed anonymous regions pager until needed.

		(speeds up shared memory bss creation)

	7)	Remove possible deadlock from swap_pager initialization.

	8)	Enhanced procfs to provide "vminfo" about vm objects and user
		pmaps.

	9)	Increased MCLSHIFT/MCLBYTES from 2K to 4K to improve net &
		socket performance and to prepare for things to come.

John Dyson
dyson@implode.root.com
David Greenman
davidg@root.com
1994-03-07 11:38:49 +00:00
Guido van Rooij
fe719280d0 Removed a #warning that I left here. 1994-03-06 20:56:26 +00:00
Jordan K. Hubbard
18e494b593 Used definable status codes (some may be sharable, esp the door open codes, but
it still looks a little suspicious that so many of the status codes are missing
so I'm not going to adopt all of the existing ones yet.  Try to be more
descriptive in the use of hex constants.
1994-03-06 14:14:49 +00:00
Jordan K. Hubbard
068a409099 Beginning of change set for making more friendly laptop configurations.
Changes _only_ take effect if `options LAPTOP' is set.

Note:  This one is distinctly dodgy. When my IDE drive spins back up from sleep
mode, it generates this `extra interrupt' condition by spinning back up and
generating an intr, though without any particular action required.  This
message coming out every time is rather annoying, and thus disabled.
However, what I'm not at all sure of is whether or not all IDE drives will
behave in the same way, or if perhaps it needs to be done in a more complicated
fashion by detecting this more involved "I've spun up and am just saying hi"
condition.  This is a simple change and easy to back out/ammend if anybody has
any better ideas.
1994-03-06 03:10:58 +00:00
Andreas Schulz
563ac84861 Added more status bytes for the mitsumi drive. This is only an ugly
hack in the moment for testing purposes and to get the drive going
again.
0x20 means empty drive.
0x30 means closed drive with CDROM inserted.
0x80 means drive pulled out, but door closed.
0xa0 means drive pulled out and door open.
Luckily none of these values are the same as that reported for Ethernet
cards ( 0 for WD8003E, 0x40 for WD8013EPC, 0x60 for NE2000).
The bad part is, the probe code gets the WD8003E so hosed, that it is
no longer usable after it. No problem with the WD8013EPC.
1994-03-05 21:41:51 +00:00
Jordan K. Hubbard
73787aa3f2 This should stop the false probes in their slimey little tracks. 1994-03-05 03:54:19 +00:00
Andrey A. Chernov
3b2acd20e0 1) My previous fix does nothing, now Rod's fix rewrited to implement
my previous fix too (using wdp_heads controller value) and check
0 heads case too.

Other fixes from Bruce:
2) Fix dk_timeout from 2 to about 4 seconds.
3) wdcontrol not retried on internal error.
4) wdwait return check changed ( "!=0" to "<0" into wdsetctlr,
"<0" to "!=0" into wdgetctlr).
1994-03-04 16:43:07 +00:00
Guido van Rooij
79bdab6c87 Ttys structures are now allocated dynamically via ttymalloc/ttyfree.
This inetrface should be used from now on.
pseudo device pty xx still keeps its meaning: a maximum of
xx ptys is allowed.
A ringbuffer is now 2040 bytes long, per Garrett Wollman's request.
The changes are inspired by the way NetBSD did it (thanks for that!),
though I made it slihghtly different, including the interface so
at least 75% of the allocated space is deallocated when the tty is
closed.
Note further that it is easy to modify the ringbuffer length runtime.
This will have to wait untill some later date...


-Guido
1994-03-02 20:28:38 +00:00
Guido van Rooij
8a7af68d49 Ttys structures are now allocated dynamically via ttymalloc/ttyfree.
This inetrface should be used from now on.
pseudo device pty xx still keeps its meaning: a maximum of
xx ptys is allowed.
A ringbuffer is now 2040 bytes long, per Garrett Wollman's request.
The changes are inspired by the way NetBSD did it (thanks for that!),
though I made it slihghtly different, including the interface so
at least 75% of the allocated space is deallocated when the tty is
closed.
Note further that it is easy to modify the ringbuffer length runtime.
This will have to wait untill some later date...


-Guido
1994-03-02 20:18:09 +00:00
Andrey A. Chernov
b0568305d3 360 DD entry speed fixed to 250KBPS 1994-03-02 18:34:41 +00:00
Andrew Moore
56ef028575 floppy tape support shouldn't interfere with floppy disk driver on
systems with no floppy tape drive (patch from Jim Babb).
1994-03-02 08:10:42 +00:00
David Greenman
2fd57dbc38 Minor comment change. 1994-03-02 05:50:01 +00:00
Andreas Schulz
3b25168637 Added the missing bzero after the malloc in aha1542.c that seems to
produce the mbox not free messages on many systems. Bug reported from
hd@world.std.com.
1994-03-01 16:06:37 +00:00
David Greenman
38ff12a4b9 Fix from Christoph Robitschko: the '790 interrupt table was wrong. 1994-03-01 12:23:33 +00:00
Andrew Moore
0b96c983e8 floppy tape support still not quite there - it prevents
mounting the floppy disk  drives on some systems that don't have
a floppy tape drive.
1994-03-01 01:27:03 +00:00
Andrew Moore
fa7beb42e0 Add floppy tape support. 1994-02-28 04:19:39 +00:00
Poul-Henning Kamp
9b73b5a04a dcfclk driver obsoleted, sio/TIOCTIMESTAMP took over. 1994-02-27 21:53:54 +00:00
Poul-Henning Kamp
11d5168c11 dcfclk driver obsoleted by sio/TIOCTIMESTAMP. 1994-02-27 21:51:05 +00:00
Andrey A. Chernov
4aa43a6797 Bump CLK_TCK to more precise value (128)
If you want more precise, use directly getrusage(),
because clock() emulated via it.
1994-02-26 00:56:02 +00:00
Poul-Henning Kamp
bfbc1f09d4 RTS shouldn't be touched unless CS_RTS_IFLOW is set. 1994-02-26 00:04:03 +00:00
Andrey A. Chernov
3932675839 Better fix for >16 heads problem, right value from
controller restored.
1994-02-25 23:17:40 +00:00
Poul-Henning Kamp
e3757377ff TIOCTIMESTAMP capability. The port in question must be configured with
"vector siointrts".  Thus only a compare is added for the other ports.
1994-02-24 16:39:48 +00:00
Jeffrey Hsu
ffe25c427d Correct definitions of flags used by sigreturn to validate sigcontext. 1994-02-24 00:21:12 +00:00
Jeffrey Hsu
8d27e59b01 validate sigcontext before restoring it 1994-02-24 00:18:04 +00:00
Rodney W. Grimes
5086a82862 Fix off by one error 1994-02-23 11:14:26 +00:00
Rodney W. Grimes
97fca376d6 Put back the bt0 that some one deleted.... 1994-02-23 10:59:44 +00:00
Rodney W. Grimes
9ad564373e Bump boot block revision to 1.9 by a dummy edit on disk.c and:
>From: bde@kralizec.zeta.org.au (Bruce Evans)
Subject: cache botch in bootstrap
Date: Sun, 20 Feb 94 18:14:35 +1100
The cache in the bootstrap loader didn't allow for the device changing.

This caused surprisingly little trouble - the cache is only for a single
track (or part of a track), and the first access to a new device is
always for an early sector, so there is no problem unless the last access
to the old device was for an early sector.  I saw the problem on a system
with BSD on wd1 and no label on wd0.  Everything worked if the the device
name wd(1,a) was specified before the default of wd(0,a) was tried, but
when the default was tried, it failed on the first sector because there
was no label, and then the first sector on wd0 was always used instead
of the first sector on wd1, so there was apparently no label on wd1
either.

Bruce
1994-02-22 22:59:40 +00:00
Rodney W. Grimes
97687d1b3d More clean up of the drive Id string, trancate trailing spaces. 1994-02-22 22:13:37 +00:00
Rodney W. Grimes
1004b0634c The model string can be 40 bytes long with no terminating null, so
convert all nulls to spaces and then print it with a %40s.
1994-02-22 18:51:27 +00:00
Rodney W. Grimes
e583b89dfa Cleanup the lptprobe and lpt_port_test routine to be KNF. 1994-02-22 09:05:13 +00:00
Rodney W. Grimes
41553a650d This is Jordans probe code fixes. Tested on LU002, FX001D. Then I went
in and cleaned the spaces vs tabs up, and made the code a little closer
to KNF.
1994-02-22 08:44:31 +00:00
Rodney W. Grimes
1ffa0b1a96 >From: "Andrew A. Chernov" <ache@freefall.cdrom.com>
Subject: Bugfix for SB16 with DSP version 4 and above

No description sent, but it appears to fix a major number problem
with certain models of the SB16.
1994-02-21 14:20:45 +00:00
Rodney W. Grimes
84a161c5f1 Clean up dmesg output so that it matches the scsi stuff.
Small hack, if heads > 16, output a warning and then set the head
count to 16.  This stops the infinite loop on this error and allows
people to later fix the DOS parameter table later with fdisk.
1994-02-21 12:32:33 +00:00
Rodney W. Grimes
2da7751051 Protect some printf's with #ifdef DEBUG 1994-02-21 05:45:06 +00:00
Andrey A. Chernov
5503c7e948 Fix bug with DSP ver2.0, frequency reduced from 44100 to 22050 1994-02-20 09:37:27 +00:00
Rodney W. Grimes
4568df5233 I (rgrimes) cleaned the code up some, mostly just format stuff.
>From: csgr@alpha.ru.ac.za (Geoff Rehmet)
Date: Wed, 16 Feb 1994 21:28:06 +0200 (GMT+0200)

New version of lpt, most of the brokenness fixed.
1994-02-17 10:20:18 +00:00
Rodney W. Grimes
dbd8393f77 I don't want to read about all the people that forgot this due to syscons
changes, so I am adding it here until AFTER the 1.1 release:
+ COPTFLAGS+=-D__FreeBSD__
1994-02-17 06:51:15 +00:00
Rodney W. Grimes
f2ba1017cc Increase the timout on aha_send_mbox from 1ms to 3ms, needed to reliably
run Exabyte 8505 on 1742's.  This may not be the final solution, but it
makes it work.  It may be better to change the DELAY(10) to DELAY(30)
inside the loop instead of increasing the loop count from 100 to 300.
1994-02-17 05:48:08 +00:00
Nate Williams
a60eff2770 From: Jim Babb <babb@sedhps01.mdc.com>
Date: Mon, 14 Feb 94 15:57:14 CST

This adds a copyright to the fdc.h file and fixes a bug in re-tries
during writes on a heavily loaded system.
1994-02-14 22:24:28 +00:00
Nate Williams
56cc87f5d9 From: Jim Babb <babb@sedhps01.mdc.com>
Subject: Bug Fix for ft.c - please commit
Date: Mon, 14 Feb 94 10:22:54 CST

This fixes a bug where the system can crash if the tape is used
after the floppy has been used.
1994-02-14 19:22:34 +00:00
Jordan K. Hubbard
8d5a4c1f9e Use -Z instead of -z to build kernels. This is consistent with NetBSD's
usage of the -[Zz] flags (we're now in sync).  Part of the ld update
changes.
1994-02-13 20:37:32 +00:00
David Greenman
2c194b2e93 Fixed bug in handling of COW - the original code was bogus and it was
only accidental that it worked. Also, don't cache non-managed pages.
1994-02-13 08:29:33 +00:00
Nate Williams
b21df1d16c Added third parameter to wdwait which contains the amount of time to
'wait' based on suggestion by Rod in -hackers.

No functional change as all the TIMEOUTS are identical currently, but
this will probably change.
1994-02-11 12:02:35 +00:00
David Greenman
43ef94a93a Patch from John Dyson:
a pv chain was being traversed while interrupts were
	fully enabled in pmap_remove_all ... this is bogus, and
	has been fixed in pmap.c. (sorry for adding the splimp)
1994-02-10 03:03:44 +00:00
Nate Williams
8d43398bd2 Commented on what the mse0, mcd0, and lpt/lpa devices were used for.
(No functional changes)
1994-02-09 05:35:57 +00:00
David Greenman
aae4685ae8 From: Dave Matthews <dave@prlng.co.uk>
Description:
The integer overflow instruction (into) and the interrupt instruction with
value 4 (int #4) both give rise to SIGBUS signals rather than SIGFPE.  The
problem is that overflow is a trap not a fault (unlike the BOUND instruction).
1994-02-08 12:58:44 +00:00
David Greenman
b9d60b3f59 Fixed bugs in stack grow code, and moved it back into a seperate function
like it was originally. Also added back call to "grow" in sendsig now
that this routine actually works.
1994-02-08 09:26:04 +00:00
David Greenman
98446d4e96 Fixes from John Dyson to fix out-of-memory hangs and other problems (such
as increased swap space usage) related to (incorrectly) paging out the
page tables.
1994-02-08 03:07:58 +00:00
Andrew Moore
9c2638e6dc Tentative fdc patches... 1994-02-07 22:12:45 +00:00
Andrey A. Chernov
63ba5191a4 Change all siointr (expect in Vsio, of course) to comintr1
This saves two commands per each direct comintr1 call,
allows some strict check in siointr and also
fix bug with suspended output on multiport cards
1994-02-07 18:37:21 +00:00
David Greenman
958896a15f Fixed bug in probe that was causing it to always probe true. 1994-02-07 15:46:22 +00:00
Andrey A. Chernov
2803eb968a Add "wdx: not found" diagnostic missed in previous commits 1994-02-07 15:40:38 +00:00
Rodney W. Grimes
86db96db52 Remove the ft driver, it causes instant reboots during attatch, and this
was new code added at the last minute!
1994-02-07 10:42:04 +00:00
David Greenman
24ab273fa1 Fixed calculation of physmem when the special MAXMEM kernel config overide
is used. This bug caused the buffer cache to be WAY too big when memory
was being restricted - resulting in hangs and other out of memory problems.
1994-02-07 07:44:42 +00:00
Andrew Moore
c1eeb17fc0 Add floppy tape support (missed these when changing G*) 1994-02-07 05:55:50 +00:00
Andrew Moore
97acce82ca Add floppy tape support 1994-02-07 04:27:59 +00:00
Andrew Moore
b99f0a4a8d Add floppy tape driver - fd => fdc 1994-02-07 04:27:13 +00:00
David Greenman
5ef457fa81 Nuke bogus error message 1994-02-07 04:20:57 +00:00
David Greenman
ab377d1e00 From: Chris Wiener <cwiener@CRLABS.COM>
When the keyboard is probed, the LED's blink quickly and
"Keyboard reset failed" is printed on the console.  The
init routine keeps trying endlessly with the same behavior
as above.

I got the latest -current sup sources (06-Feb-94 12:00 GMT) to work using the
old syscons.c.  The following patch makes the new syscons work:
1994-02-07 02:14:27 +00:00
David Greenman
102cfb5c3e At the suggestion of Bruce Evans, don't zero RTC diag register. Doing so
was causing problems for some machines.
1994-02-06 22:48:13 +00:00
Jordan K. Hubbard
91f5809304 Patches to allow the pcvt port to simply "drop in" with a minimum of
effort.
1994-02-06 22:11:00 +00:00
Jordan K. Hubbard
becfc6cb74 Gunter Jung's fixes for the much-maligned lpt driver 1994-02-06 22:06:58 +00:00
Andreas Schulz
8a683b0d28 Fixed up the compiler warnings. 1994-02-06 17:03:17 +00:00
Andrey A. Chernov
4eab82a59a 1) Proper fix for suspended output in multiport case
2) IIR_NOPEND is really *one* bit, we don't need to check whole MASK
1994-02-06 11:59:35 +00:00
Rodney W. Grimes
51c16d62df Update for new format of cd_toc_entry that was changed in sys/cdio.h. 1994-02-06 11:33:25 +00:00
Rodney W. Grimes
069968bf50 Increase the TIMEOUT value that keeps getting nuked to 300 mSEC, I set it
to 1.1 secounds this time (ie, TIMEOUT=10000).
1994-02-06 02:56:11 +00:00
Christoph Robitschko
52fda4247e Make the screen savers runtime switchable. Everybody wants a
different default saver, and the size increase in the kernel is
minimal ( < 2.5K ).
1994-02-04 10:36:15 +00:00
David Greenman
49255f96cb if_ep.c: removed netisr.h, fixed unconverted ep_ac, changed <> into ""
for include files.
if_ed, if_ie, if_is: don't include netisr.h.
1994-02-03 11:51:12 +00:00
Andrey A. Chernov
cd08e4cab2 Make BLANK_SAVER default to stop best saver war. 1994-02-02 23:10:55 +00:00
Andrey A. Chernov
04af1a4e41 Fix error in multiport part:
while input char not entered, output was suspended
1994-02-02 16:41:26 +00:00
David Greenman
f5645fe75b Added 8003EB board type. Clue from Gerard J van der Grinten (gvdg@cdc.com) 1994-02-02 14:05:58 +00:00
David Greenman
769cb45b8e Added type code for 8003W. 1994-02-02 02:24:42 +00:00
David Greenman
0172c219f1 Minor cleanup. Decode state information better in the case of a fatal
trap.
1994-02-01 23:07:35 +00:00
Nate Williams
10a0cecedc Moved paren in sgetc to where it belongs. (My fault, I must have wiped it
out when I applied the patch to get the new features by hand)
1994-02-01 19:04:18 +00:00
Rich Murphey
20fabfa95d Add missing arg to Debugger() call.
Add missing close paren in sgetc() definition.
1994-02-01 15:09:10 +00:00
Andrey A. Chernov
7745b4472a Make old SNAKE_SAVER code compile with new syscons changes. 1994-02-01 11:13:49 +00:00
Andrey A. Chernov
1be30750de BLANK_SAVER syscons option added 1994-02-01 10:46:43 +00:00
Andrey A. Chernov
cb2d71d5ea 1) Restore removed SNAKE_SAVER (Nate, WHY you do it?)
2) Make SNAKE_SAVER like default, if no saver specified in "options"
3) Remove #ifdef STAR_SAVER  before line /* make screensaver happy */
this code needed in any case.
1994-02-01 10:43:02 +00:00
David Greenman
50dba10faf Bug fix from previous WINE commit. From Jeffrey Hsu. 1994-02-01 10:03:43 +00:00
Andrey A. Chernov
ebbb18695a Russian keymap is broken after last commit (fixed)
Nate, please, be more careful next time.
1994-02-01 09:27:43 +00:00
Andrey A. Chernov
21c64a07fe Add FADE_SAVER option from new syscons. 1994-02-01 08:34:16 +00:00
Andrey A. Chernov
12228508ab Comment #define STAR_SAVER, it is configuration "options" 1994-02-01 08:30:45 +00:00
Nate Williams
855baa7376 Added S'ren's Copyright to the file and sync up to version 1.3 1994-02-01 06:34:44 +00:00
Nate Williams
8b2e5491db From: sos@login.dkuug.dk (S|ren Schmidt)
Subject: syscons-1.3
Date: Sat, 29 Jan 94 23:33:50 MET

But here is the (hopefully) final syscons-1.3....

....

I've changed sgetc so it works as the pccons parallel
(it now uses a scgetc internally).


[
There were a couple changes that Bruce Evans sent me that were applied
to this version along with some changes that S'ren didn't incorporate
into the final version.  There will be only minor changes if anything
from this version to his final release.
]
1994-02-01 06:22:29 +00:00
Nate Williams
fa998562eb Removed hack for older version of syscons (new version going in soon) 1994-02-01 05:58:02 +00:00
Nate Williams
768e8947c6 From: bde@kralizec.zeta.org.au (Bruce Evans)
o merged and fixed timeout code from sos.
	o merged DOS partition support from sos.
	o fixed "extra" interrupts.
	o check if malloc retuns NULL :-(.
	o print drive size as in NetBSD
	o after an error, return the residual count, not 0.
	o give up early for > 16 heads.
	o cleaned up the old-drive detection in wdgetctlr().
	o rewrote wddump().  I'd been putting this off because
	  I'd had the dump disabled since 0.0 and had no idea
	  if even the standard version worked.  It didn't:
	  (0) syscons' sgetc() interface broke some keyboard
	  stuff.
	  (1) CADDR1 is mapped using pmap() and pmap got a NULL
	  pointer trap (at least when I got to wddump() using
	  call diediedie from ddb) because the pte for CADDR1
	  is only supposed to be hacked on directly (e.g. in
	  physcopyseg()).
	  (2) bad144 handling was not done.
	  (3) it was slooow (3600 sectors/minute) because my
	  controller doesn't cache writes.
	o miscellaneous other cleanups, e.g., removed scattered
	  patchkit/terry dates.
	o lots of reformatting.

To be done:
	o Merge/fix TIH/NetBSD bad144 code (doesn't belong in any
	  particular driver.  Why aren't we using i386/dkbad.c?).
	o Merge/fix Dyson/NetBSD clustering code (large parts
	  should be shared).
	o Fix/extend the partition in use bits.  Support extended
	  partitions.  This should be shared by all disk drivers.  Swap
	  to a DOS partition so that the swap space can be shared with
	  linux.
	o Don't use polling except for initialization.  Need to
	  reorganise the state machine.  Then "extra" interrupts
	  shouldn't happen (except maybe one for initialization).
	o Fix disklabel, boot and driver inconsistencies with
	  bad144 in standard versions.
	o Look at latest linux clustering methods.  Our disksort()
	  gets in the way of clustering.
	o cleaned up the ATA changes (needs more work.  I think
	  the ATA specs say that the only thing really wrong with
	  the original version of wx is that there was no test
	  for drive-ready before some commands.  400 nsec delay
	  suffices for almost everything and 400 nsec delay is
	  usually "free").
1994-02-01 05:55:21 +00:00
David Greenman
418ac7dcac Removed all uses of "USE_486_WRITE_PROTECT" and made this automatic.
Reordered and removed some NOP's.
1994-02-01 04:09:07 +00:00
David Greenman
a301c9d5d4 Added four pattern memory test routine that is done at startup.
...added filli - "fill integer" support routine.
1994-01-31 23:48:23 +00:00
David Greenman
8f64d25d15 Added four pattern memory test routine that is done at startup. 1994-01-31 23:47:29 +00:00
Andrey A. Chernov
6405a87b09 Remove CALLOUTMASK, if non-bidir case. 1994-01-31 19:07:59 +00:00
Paul Richards
41ef6bd85e Added new probe code to detect generic lance based cards. Should now
work with ne2100 card.
1994-01-31 16:00:53 +00:00
David Greenman
da59a31c01 WINE/user LDT support from John Brezak, ported to FreeBSD by Jeffrey Hsu
<hsu@soda.berkeley.edu>.
1994-01-31 10:27:13 +00:00
Andrey A. Chernov
6df720041a 1) Set ipending back to 4, because (16 + 4) bit not in
netmask or impmask.

2) Fixes from Bruce:
	o Changed name of schedsoftcom() to setsofttty() to match
	  setsoftclock()
	o Bool_t isn't used.
	o tx_fifo_size is 1 for chips without fifos, 16 for 16550's, to
	  help to output more efficiently for 16550's (LSR_TXRDY means
	  that the fifo is empty, not that it has space for one char).
	o Changed name of softsio1() to siopoll() and merged compoll()
	  into siopoll().
	o The probe forgot to clear com_mcr after it failed.  This is
	  harmful for 4 single serial ports on 2 interrupts.  It makes
	  partial misconfigurations worse.
	o Don't bother initializing static variables that are 0 (bidir
	  stuff).
	o Only initialize t_oflag to TTYDEF_OFLAG if unit == COMCONSOLE,
	  not if COMCONSOLE is defined.
	o Don't call siointr() from comparam() if there is no output in
	  progress.  For the call from sioopen(), there's no output in
	  progress, and siointr() often saw silo overflows for stale
	  input because it was called before sioopen() discarded the
	  input.
	o Let ttselect() do the work for select(), so that the fixes for
	  ttselect() don't have to be duplicated in zillions of drivers.
1994-01-31 08:52:12 +00:00
David Greenman
3579d8917b Patch from dcjm@cs.ed.ac.uk (Dave Matthews)...
Yes, I know that IFADDR ioctl is supposed to be deprecated... Note
that the patch was modified by me to fit better into the driver. -DG

...

While porting CAP to 386bsd/pk0.2.4 and now to FreeBSD Release 1.0
I found a couple of bugs associated with the packet filter. Here
are the fixes.  I'm posting them here because they apply to
FreeBSD and 386bsd/pk0.2.4 and possibly to other *BSD.

The first occurs when using the packet filter to write raw
ethernet packets.  The header consisting of the sender and
destination addresses and the protocol is removed and later
added back on, but with the byte order of the protocol reversed.
The fix ensures that the byte order in the protocol field is
swapped when it is removed.

The second fix ensures that SIOCGIFADDR works for BPF as claimed
in the man pages, by adding it to the ed driver.  Similar fixes
will be needed for other ethernet drivers.
Dave Matthews.
1994-01-31 07:34:20 +00:00
David Greenman
0de1886721 Fix broken bit definitions for pte/pde. 1994-01-31 06:52:41 +00:00
David Greenman
d6eb591433 Patch from Brian Smith (modified a little by me) to allow kernel config
file override to disable fifo on 16550s:

I bought a board with two 16550's, but one of those ports has a mouse
on it.  The sio driver always enables the fifo, which is a bad thing
for mice and X.  The mouse is jerky and hard to use.  The simple thing
is be to treat one of the ports as a non-fifo'ed UART, and I use the
flags option in my config file.

So, my config file has:
device      sio0    at isa? port "IO_COM1" tty irq 4 flags 0x2 vector siointr
device      sio1    at isa? port "IO_COM2" tty irq 3 vector siointr

(patch deleted)
1994-01-31 06:12:18 +00:00
David Greenman
43411a3db4 Make I/O memory explicitly non-cacheable. This is purely an asthetic
change.
1994-01-31 04:39:37 +00:00
David Greenman
ec120393a0 VM system performance improvements from John Dyson and myself. The
following is a summary:

1) increased object cache back up to a more reasonable value.
2) removed old & bogus cruft from machdep.c (clearseg, copyseg,
	physcopyseg, etc).
3) inlined many functions in pmap.c
4) changed "load_cr3(rcr3())" into tlbflush() and made tlbflush inline
	assembly.
5) changed the way that modified pages are tracked - now vm_page struct
	is kept updated directly - no more scanning page tables.
6) removed lots of unnecessary spl's
7) removed old unused functions from pmap.c
8) removed all use of page_size, page_shift, page_mask variables - replaced
	with PAGE_ constants.
9) moved trunc/round_page, atop, ptoa, out of vm_param.h and into i386/
	include/param.h, and optimized them.
10) numerous changes to sys/vm/ swap_pager, vnode_pager, pageout, fault
	code to improve performance. LRU algorithm modified to be more
	effective, read ahead/behind values tuned for better performance,
	etc, etc...
1994-01-31 04:19:00 +00:00
Nate Williams
8c0f699c14 From: Wolfgang Solfrank <ws@sun-lamp.cs.berkeley.edu>
To: source-changes@sun-lamp.cs.berkeley.edu

Fix bogus fcom emulations
How did any program with floating point emulation ever work?
1994-01-29 22:07:16 +00:00
Rodney W. Grimes
ec40982451 Remove commented out PROCFS, it is standard. 1994-01-29 21:41:36 +00:00
Rodney W. Grimes
2e8a06d0b6 Patch from Julian. Commit message by me.
Cuddle { braces up where possible on if statements
Add missing splx(s) calls before some returns.
Remove extra semicolon that was keeping uha_init from returning
before the timeout occured.  This should speed probing up quite
a bit!
1994-01-29 10:29:14 +00:00
Andrey A. Chernov
bcbd5c8c3d Set FIFO_TRIGGER in more human-readable form 1994-01-29 03:17:39 +00:00
Nate Williams
f657493cee Added -static declartion to genassym compile so a kernel doesn't require
working shlibs.
1994-01-27 21:10:14 +00:00
David Greenman
801276d0ae Removed no longer used "wire" element in pv struct. 1994-01-27 03:36:14 +00:00
David Greenman
5d7fe66e75 Made pmap_is_managed a static inline function. 1994-01-27 03:35:42 +00:00
Andrey A. Chernov
690f540c97 Add FIFO_TRIGGER value for sio.c 1994-01-27 01:01:22 +00:00
David Greenman
1ef486634f Remove confusing and incorrect comment inherited from patchkit days. 1994-01-26 20:42:18 +00:00
Nate Williams
db5e13d8a0 Whoops, syntax error where I forgot a parenthesis. 1994-01-26 20:18:56 +00:00
Andrey A. Chernov
994f4bd197 Replace old-style Joerg copyright to berkeley-style,
per Joerg request.
1994-01-26 20:08:30 +00:00
Nate Williams
41252572a1 FreeBSD modifications to driver.
0) FreeBSD additional include files additions
1) Rod's arpacom changes
2) Function type and return code cleanup, and all functions have correct
   casting to the correct data types
3) Bugfix where driver would not function due to missing structure not
   given a value.
4) General cleanup.  (Theo did a lot already, I just did some more)
1994-01-26 09:13:56 +00:00
Nate Williams
287e7e4d61 Newer version of Herb Peyerl's 3C509 driver straight from NetBSD-current. 1994-01-26 09:06:29 +00:00
Andrey A. Chernov
424e2d04fc Fix error with tsleep loop 1994-01-25 23:04:27 +00:00
Andreas Schulz
76847ca3ae Put some more info about the toshiba ethernet cards into if_edreg.h.
Changed some numeric constants to defines in if_ed.c for the toshiba
cards.
1994-01-25 22:52:09 +00:00
Rodney W. Grimes
39970aa6a4 Do my fix that I have done to all the other ethernet drivers to use
arpcom intead of foo_ac, remove now unneeded defines, fix support for
options NS.

Still one compiler warning to fix :-)
1994-01-25 11:20:06 +00:00
Rodney W. Grimes
7e9dd2e95c Disabled sg disk driver in LINT since there is no sg.c file in isa yet!
Removed com port comments, since we are about to depricate the driver.

Fix several plaes in LINT where people have been cutting and pasting using
xterms :-(
1994-01-25 11:08:25 +00:00
Andrey A. Chernov
bf0e6e5324 Sound driver options added 1994-01-25 03:16:31 +00:00
Andrey A. Chernov
2b1c7c76c3 Add Ctrl-Altr-Esc DBG key to RUKEYMAP (russian keymap) 1994-01-24 05:22:27 +00:00
David Greenman
1b9d391946 Much better fix for the hanging console problem. This one actually
works.
1994-01-23 19:17:17 +00:00
David Greenman
c77fe5808b Backed out previous commit as it requires additional kludges to work
completely, and it looks like syscons might solve the problem a
different way  (although what about serial consoles??).
1994-01-23 17:50:11 +00:00
David Greenman
e4794aea16 Brute-force fix for the "hanging console" problem. Simply _don't_ call
the device close routine. This works because the device close calls
the line discipline close (which only flushes the output buffers) and
the ttyclose() routine, which does little of nothing except screw with
the session and process group fields (which is what was causing all
the problems).
1994-01-22 22:48:21 +00:00
Rodney W. Grimes
136cc9d5ef More sane AHA_RESET_TIMEOUT, from some testing by
Todd Pfaff <todd@flex.eng.mcmaster.ca> who was the person to report the
original problem on a 1542C.
1994-01-22 21:54:10 +00:00
Rodney W. Grimes
ce1105630d Now prints ``on eisa'' if id_iobase >= 0x1000, and made a slight code
cleanup for the other 2 cases of ``on motherboard'' and ``on isa''.
1994-01-22 21:52:04 +00:00
Andreas Schulz
3926f9e8f3 Added the correct typecast's to the untimeout calls. Added a missing
return statement in the probe. This should have fixed all compiler warnings.
1994-01-22 18:00:54 +00:00
Rodney W. Grimes
a8e9d1d5b7 Increased TIMEOUT in wdwait from 2000 to 20000 since it seems many people
have needed to do this in order for the wd driver to work for them.
1994-01-22 11:00:01 +00:00
Rodney W. Grimes
f4767d9a94 No longer need SYSVIPC option, any of the SYSV options now trigger the
kern/sysv_ipc.c file for inclusion in the kernel.
1994-01-22 09:25:37 +00:00
Rodney W. Grimes
cdd2062aac >From: julian@TFS.COM (Julian Elischer)
Date: Mon, 17 Jan 94 20:52:14 PST

As reported on the -bugs list by some one, and confirmed by Julian:

> I increased AHA_RESET_TIMEOUT in aha1542.c from 1000 to 10000
> and now my 1542C is found everytime.
1994-01-22 07:46:25 +00:00
David Greenman
df8d467a49 Remove some old, unused, major UGLY code. 1994-01-21 17:11:38 +00:00
David Greenman
2ae37484c6 System V IPC code from Danny Boulet, chewed on a bit by the NetBSD group
and then some more by Jeffrey Hsu (who provided this port for FreeBSD).
1994-01-21 09:56:05 +00:00
David Greenman
a728f398c2 Pointed out by Wolfgang Solfrank:
Correct parameters of sync
1994-01-20 23:17:39 +00:00
David Greenman
f707f734a6 Removed some more old unused code/comments. Added hack to "fix" the
problem with some chipsets (UMC) remapping the 'hole' memory even when
you've got 16MB. People were led to believe that since there was only
16MB of memory in the machine, that they were okay wrt the ISA DMA
limit. This hack simply causes the extra memory to be ignored if it
appears around the 16MB limit.
1994-01-20 17:49:57 +00:00
David Greenman
4b9f17c5b5 Improved algorithm that calculates the pages in the base memory - If the
BIOS says that the amount is *between* 0-640K, believe it.  Cleaned up
the comments a bit, removed some old cruff, etc.
1994-01-20 17:21:28 +00:00
Nate Williams
7af948c9cc Changed the default 'reboot' routine from cpu_reset() to shutdown_nice().
If you want to disable the reboot feature, then re-define the keymap to
not have a RBT call.
1994-01-18 05:33:34 +00:00
Nate Williams
87965552ef Changed the default syscons keymap to have <CTL-ALT-ESC> enter the
debugger and <CTL-ALT-DEL> call the reboot command.
1994-01-18 05:31:37 +00:00
Nate Williams
954c7b2b78 Reduced the delay amounts per patch submitted by gclarkii@netport.neosoft.com 1994-01-18 02:20:15 +00:00
David Greenman
d64f660fac Improvements mostly from John Dyson, with a little bit from me.
* Removed pmap_is_wired
* added extra cli/sti protection in idle (swtch.s)
* slight code improvement in trap.c
* added lots of comments
* improved paging and other algorithms in VM system
1994-01-17 09:32:32 +00:00
Rodney W. Grimes
e7988dea10 Add missing paren so that it now compiles. 1994-01-17 05:49:20 +00:00
Rodney W. Grimes
db703a94ed Removed at clause from LINT since it was wrong and is no longer needed. 1994-01-17 05:45:26 +00:00
Jordan K. Hubbard
26e25527db From Gary Clark II:
1. Fixed probe to work with FX mitsumi's.

2. Added some defines in prep for adding interupts and dma
1994-01-16 23:34:17 +00:00
Andreas Schulz
6216795300 Documented the drivers more in the LINT file. Added a line in files.i386
and LINT for the integration of a Seagate ST01/02 SCSI controller.
1994-01-16 12:01:34 +00:00
Andreas Schulz
e8f1fa7451 Updated the TODO file with missing things.
Changed the output of the isa probe routine, that only devices, that
have an IO address and are smaller than 0x100 to be on the motherboard.
The seagate SCSI adapter is an example of a card, that doesn't have
an IO address and works only memory mapped.
1994-01-16 11:25:06 +00:00
Martin Renters
c6863af480 NFS Diskless booting support added. 1994-01-16 02:21:58 +00:00
David Greenman
7f8cb36869 "New" VM system from John Dyson & myself. For a run-down of the
major changes, see the log of any effected file in the sys/vm
directory (swap_pager.c for instance).
1994-01-14 16:25:31 +00:00
Andreas Schulz
b06a5891b4 Added the support for the Toshiba ethernet cards. It is only
ifdef and not default, because, i don't know  if anyone else
is using this card.
1994-01-11 23:28:21 +00:00
Andreas Schulz
da37baffac Thrown out the obsolete drivers in the TODO list.
Added the Toshiba board-id's into the if_edreg.h file and the different
checksum for the Toshiba ethernet-boards.
1994-01-11 21:28:29 +00:00
Andrey A. Chernov
e58072bda5 From ache:
Choose older MULTIPORT version, because lastest bde version
	not worked.
	Don't force HUPCL for bidirectional case.
From bde:
	Use bit (1 << (16 + 4)) in schedsoftcom() to avoid clash with
	non-serial h/w on IRQ4.
	Allow FIFO_TRIGGER in config.
	Clear com->mcr_image when clearing mcr for init of 4port.  The
	usual value MCR_IENABLE should have broken 4ports unless
	something happened to clear it later.
	Turn off interrupts as well as DTR after an error waiting for
	carrier (bidir dialin case).
	Drain fifo more carefully.
	Don't hang up if debugging.
	Rearrange siointr() -> siointr1() for multiport case for speed,
	lower latency and clarity.
	Use suser() to check perms.
	Provide missing splx() after failed perms checks.
	c_ispeed == 0 means c_ispeed = c_ospeed (POSIX).
	Set parameters (except speed) for c_ospeed == 0 as well as
	hanging up.
	Better initialization for console (fifo stuff...).
	Misc. cleanups.
	Fix dead hang if modem power is off.
1994-01-11 18:31:45 +00:00
Rodney W. Grimes
1660308965 Add comment to MAX_SLOTS that it may need to be 16 and to check against
EISA spec.  Fixed off by one error in ahbprobe so that it can find an
aha1742 in slot 8 (now uses slot <= MAX_SLOT, instead of slot < 8).
1994-01-11 07:24:32 +00:00
Andrey A. Chernov
154f487097 Correct Vresume size, we have now 32 bits for it. 1994-01-10 23:15:09 +00:00
Andreas Schulz
dd66bbf852 First beta version of the 3C509 driver changed for FreeBSD. Known
problems in the moment are stray intr's in the ifconfig up/down.
No way to select all three interfaces on a combo card with
AUI/BNC/UTP interfaces and the performance doesn't look good.
Only tested with a ISA AUI/BNC card yet.
1994-01-10 19:13:50 +00:00
Andreas Schulz
96b4591b68 Committed the original NetBSD version of this driver to get the changes
made for FreeBSD as cvs diffs. This is the 3C509 ethernet driver.
1994-01-10 18:56:26 +00:00
Andreas Schulz
b2aba26166 Now enabled the line for the 3C509 driver. 1994-01-10 18:53:52 +00:00
Andreas Schulz
253a42c5fc I have a new adaptec 1542CF board bought, that has the board id of 0x45.
Added it to the list of known boards and put it into the the list for
the mailbox unlock. Maybe all board-ids over 0x42 should be in the
mailbox unlock part ?
1994-01-09 18:11:21 +00:00
Andreas Schulz
1668b3a88d Added lines for an Etherlink III ( 3C509 ) driver. 1994-01-09 13:30:50 +00:00
Andrey A. Chernov
712b66d518 After some testing dma_pagesize reduced to 4096 for *both*
byte and word DMA channels, use bounce buffer now.
1994-01-08 16:48:35 +00:00
Nate Williams
af60ea293c When a probe fails print a 'not found' line instead of nothing 1994-01-08 00:00:52 +00:00
Rodney W. Grimes
f3f1a1b513 SCSIDUMP option no longer needed, it is now standard. 1994-01-06 18:15:20 +00:00
Rodney W. Grimes
3b6585764d Fixed comment that refered to 8252 (we really have 8253's).
Per some one on the mailing list.
1994-01-05 15:03:28 +00:00
Rodney W. Grimes
b935223e65 Added dumps on wd0 to the end of all config lines so people know about it
and can change it.  This really won't change the kernels, it just documents
how to do the dumps on option.
1994-01-05 14:56:50 +00:00
Nate Williams
12da8ccb6e Whoops, I committed an older version that didn't have some warnings fixed.
This version fixes all warnings given the default compiler flags with some
casts.
1994-01-04 20:20:38 +00:00
Nate Williams
2620c42ea3 Updated config files for new multi-controller wd.c driver and removed
outdated wx config file.
1994-01-04 20:10:34 +00:00
Nate Williams
dd807b39fc Removed wx driver hooks. 1994-01-04 20:09:28 +00:00
Nate Williams
56067a6eec Removed wx driver hooks 1994-01-04 20:08:56 +00:00
Nate Williams
5be4b5f75a Temporary hack to allow multiple controller support until Rod gets more
time to do it the 'Right Way'.
1994-01-04 20:06:30 +00:00
Nate Williams
4aba964ef1 New wd driver, based on Bruce Evans 'wx/altwd' driver which has passed
enough tests to be considered more stable than current driver.

Lots of work by Bruce, David G., and Guido have gone into this version, and
more is to come in the future.

Support for multiple controllers is in, but doesn't work correctly with
different controllers (IDE AND MFM), but multiple alike controllers appears
to work.

Most of the stray interrupts problems should be fixed, although you will
get a couple 'extra interrupts' when disklabeling and on startup.
1994-01-04 20:05:26 +00:00
David Greenman
504c39bf88 Yanked out history section as it is unlikely there will be any further
changes for some time. Also changed the indentation style a little.
1994-01-03 17:17:19 +00:00
David Greenman
e10a618657 Increased maximum and default 'size' limits to more reasonable values. 1994-01-03 16:00:52 +00:00
David Greenman
c8a13ecd00 Convert syscall to trapframe. Based on work done by John Brezak. 1994-01-03 07:55:47 +00:00
Andrey A. Chernov
879d1ff90a Temporary plug CLOCAL security hole, while sticky bits
yet not implemented. Only for bidirectional case.
1994-01-02 10:17:29 +00:00
David Greenman
bb54009a35 Raised minimum buffer cache from 128k to 256k. 1993-12-22 13:12:04 +00:00
David Greenman
e2f27b409f Changed pointer type from caddr_t to void * for fillw, insw, outsw, and
outsb.
1993-12-21 21:27:04 +00:00
Andrey A. Chernov
8b6f2438aa Separate read/write and format GAPs. 1993-12-21 05:11:10 +00:00
Andrey A. Chernov
126518a182 Use separate fields for format GAP and read/write GAP.
Restore usage of read/write GAP.
1993-12-21 05:09:21 +00:00
Rich Murphey
7f66f26d0c Don't cast 2nd arg to fillw() per David's comments. The cast
breaks cursor positioning.
1993-12-21 03:27:26 +00:00
Rich Murphey
81664caf74 cast arg 2 of fillw() calls to type caddr_t as in pccons.
add "manual escape to debugger" arg in call to Debugger().
cast 1st arg to untimeout() to type timeout_func_t as done for timeout().
1993-12-21 02:49:13 +00:00
Garrett Wollman
a1f4319f4a Document use of counters 29 and 30 for CCITT netisrs. 1993-12-20 15:08:33 +00:00
Garrett Wollman
bd7d7eb52b Separated netisrs for pkintr() (X.25) and hdintr() (HDLC) so that someone
can actually write a sane netif device to support one of these.  Note that it
was necessary to steal a netisr bit from another protocol; I took the one for
PF_DATAKIT (no great loss).
1993-12-20 14:58:21 +00:00
Garrett Wollman
990ac0b7cb Added support for X.25 as a network-layer protocol under ISO TP class 0, as
is commonly used in Europe.  Make it compile, and bump up symtab space as
needed.
1993-12-19 22:45:13 +00:00
Andrew Moore
90d795a112 adding libc/quad:
added _QUAD_HIGH/LOW
added (U_)QUAD_MAX/MIN
(from NetBSD)
1993-12-19 05:14:46 +00:00
Garrett Wollman
aaf08d94ca Make everything compile with -Wtraditional. Make it easier to distribute
a binary link-kit.  Make all non-optional options (pagers, procfs) standard,
and update LINT to reflect new symtab requirements.

NB: -Wtraditional will henceforth be forgotten.  This editing pass was
primarily intended to detect any constructions where the old code might
have been relying on traditional C semantics or syntax.  These were all
fixed, and the result of fixing some of them means that -Wall is now a
realistic possibility within a few weeks.
1993-12-19 00:55:01 +00:00
Andrey A. Chernov
b39c878e2b Media table reorganization.
Entries for 800 and 820 fixed.
From vak@kiae.su:
incorporate Joerg Wunsch formatting code
correct handle timeouted operations
fixed entry for 720 media
1993-12-19 00:40:49 +00:00
Andrey A. Chernov
52449fdb1a From vak@kiae.su:
incorporate Joerg Wunsch floppy formatting code
1993-12-19 00:37:25 +00:00
Andrey A. Chernov
f4d3408967 Fix tsleep "waitvt" wait data from vak@kiae.su 1993-12-18 22:50:51 +00:00
Andrey A. Chernov
ed2fa05ece Reorganization of format table.
GAP values changed suitable for possible format code addition.
Read/write GAP always 2 now.
Interleave parameter added for possible format code addition.
Many logical formats added.
720K physical drive added.
Problems: still can't read 720..820 media in 1.44 drive.
1993-12-18 01:16:26 +00:00
Andrey A. Chernov
159569a418 RTCFDT_720K (physical drive 720K) added. 1993-12-18 01:12:47 +00:00
Andrey A. Chernov
2384b3a702 Added following formats (derived from MSDOS fdformat):
800K in HD 5.25in  (maximum for DD diskettes)
1.44M in HD 5.25in (for easy distributions)
1.46M in HD 5.25in (maximum for 5.25)
Some cosmetique changes.
1993-12-16 19:47:42 +00:00
Andrey A. Chernov
cf197426bb Change default dtrwait value to 2 seconds.
Change C-style into static initializer per Bruce request.
1993-12-16 04:38:27 +00:00
Andrey A. Chernov
7ca0641bb9 No more partition bits in floppy minor.
Now minor looks like UU DDDDDD, UU - unit, DDDDDD - density.
If density == 0, CMOS-detect format assumed.
Fix attach code for correct work with unknown CMOS
floppy types.
Trick diskerr to handle new minor.
1.722M floppy in 1.44M drive popular format added.
1993-12-16 04:28:42 +00:00
Andrew Moore
8b4d35c5ee wt.c - version 1.3
from:
Sergey Ryzhkov, Serge Vakulenko
E-mail: <sir@kiae.su>, <vak@zebub.msk.su>

This is the streamer tape driver for 386bsd and FreeBSD, which
supports Wangtek and Archive compatible QIC-02/QIC-36 controllers.
It was developed as a replacement of the old Wangtek tape driver from CMU.

In comparison with the CMU driver, this version has the following enhancements:
1) Support for Archive SC402 and SC499 tape controllers added.
2) Support for up to three tape controllers on the same machine.
3) Support for BSD-style ioctls MTIOCGET, MTIOCTOP.
   Mt command now works adequately with this driver.
2) Asynchronous REWIND and FSF operations, close() will not wait
   until they finish.  The next open() will wait for it instead.
4) Use of WTQICMD ioctl is limited to ERASE and RETENS operations.
   This prevents the user from locking the tape driver by strange
   tape operations.
5) Tape density switching added.
6) The status of the process, blocked on the tape operation,
   is displayed at the WCHAN column of the `ps' command as:

	wtread    reading data from the tape
	wtwrite   writing data to the tape
	wtrfm     reading the tape marker
	wtwfm     writing the tape marker
	wtrew     rewinding the tape
	wterase   doing WTQICMD ERASE operation
	wtretens  doing WTQICMD RETENS operation
	wtorew    doing MTIOCTOP REW/OFFL operation
	wtorfm    doing MTIOCTOP FSF operation
	wtowfm    doing MTIOCTOP WEOF operation

7) It's possible to use the tape with "default density",
   useful for devices which don't support density switching
   or do automatic format determination.
8) Some controllers support only 1024 block length.
   Setting WT_BSIZE bit in device minor number turns on this mode.

Minor number structure:
	0bfffuuu
Fields:
	uuu   - Unit number. It's possible to install
		up to three tape controllers on the same machine,
		using DRQs 1..3.  Hence, unit number can lie
		in range 0..2.
	fff   - Tape format number:
		0 - /dev/rwt0  - default density (auto select)
		1 - /dev/rwt0a - QIC 11 (obsolete)
		2 - /dev/rwt0b - QIC 24 (60 megabytes)
		3 - /dev/rwt0c - QIC 120 (120 megabytes)
		4 - /dev/rwt0d - QIC 150 (150 megabytes)
		5 - /dev/rwt0e - QIC 300 (300 megabytes?)
		6 - /dev/rwt0f - QIC 600 (600 megabytes?)
	b     - Long block size flag.  With this bit set,
		the driver will perform all i/o operations
		with the controller using 1024-byte
		blocks, instead of 512 ones.
		Some controllers need it (CMS for example).
		If you Wangtek controller does not stream well,
		you can try to use /dev/rWt0 device instead
		of /dev/rwt0 (uncomment needed lines in /dev/MAKEDEV
		to create it).

Block interface (writing blocks less than 2048 bytes) is not functioning
pwoperly.  Use raw interface instead.

Thanks to all who helped to test it on the following hardware:

Controller           Drive            Volume    Interface     Thanks to
---------------------------------------------------------------------------
Archive SC-499       Archive 2150L    150 Meg   QIC-02        KIAE
CMS?                 ?                150 Meg   QIC-02        KIAE
Everex EV 831/833    ?                ?         QIC-36        Joergen Haegg
Wangtek ASSY         Wangtek          60 Meg    QIC-02        Ken Whedbee
Tecmar QT150i?       Wangtek 5150EQ   ?         QIC-02?       Marko Teiste
?                    Wangtek 5099EK   60 Meg    QIC-36        Robert Shien
Archive SC400S       ?                60 Meg    ?             Warren Toomey
1993-12-13 18:38:44 +00:00
David Greenman
d39cf18213 set output flags to ttydefault if COMCONSOLE is defined. 1993-12-13 13:20:50 +00:00
David Greenman
6aa5e70134 added some panics to catch the condition where pmap_pte returns null
- indicating that the page table page is non-resident.
1993-12-13 07:02:27 +00:00
Andrey A. Chernov
fa4700b4f1 Add more strictly size check into Fdopen to eliminate
possible end-user errors.
Now:
1) on physical 1.2 can open logical 1.2, 720, 360H
2) on physical 1.44 can open logical 1.44, 720
3) on physical 360 can open logical 360
All other variants refused.
C-style improved in this check, multiply if's changed to switch.
1993-12-13 01:34:28 +00:00
Andrey A. Chernov
dffff499a9 Add 360K floppy support.
More work to add 720K floppy support.
Restore good old dependance of device and floppy type.
Now:
fd?a == 1.44
fd?b == 1.2
fd?c == 720
fd?d == 360 in HD
fd?e == 360
Add more strict size check in Fdopen, not it refuse:
1) Attempt to open any type expect fd?e, if you have only 360K drive.
2) Attempt to open fd?a if you have only 1.2 drive.
1993-12-12 20:26:56 +00:00
Andrey A. Chernov
20a2916818 Add popular 720k floppy in HD drive floppy type.
Restore check for NUMTYPES in Fdopen.
1993-12-12 16:46:54 +00:00
David Greenman
6d01f02e51 1) Added proc file system from Paul Kranenburg with changes from
John Dyson to make it reliably work under FreeBSD.
2) Added and enabled PROCFS in the GENERICxx and LINT kernels.
3) New execve() from me. Still work to be done here, but this version
	works well and is needed before other changes can be made. For
	a description of the design behind this, see freebsd-arch or
	ask me.
4) Rewrote stack fault code; made user stack VM grow as needed rather
	than all up front; improves performance a little and reduces
	process memory requirements.
5) Incorporated fix from Gene Stark to fault/wire a user page table
	page to fix a problem in copyout. This is a temporary fix and
	is not appropriate for pageable page tables. For a description
	of the problem, see Gene's post to the freebsd-hackers mailing
	list.
6) Tighten up vm_page struct to reduce memory requirements for it. ifdef
	pager page lock code as it's not being used currently.
7) Introduced new element to vmspace struct - vm_minsaddr; initial
	(minimum) stack address. Compliment to vm_maxsaddr.
8) Added a panic if the allocation for process u-pages fails.
9) Improve performance and accuracy of kernel profiling by putting in
	a little inline assembly instead of spl().
10) Made serial console with sio driver work. Still has problems with
	serial input, but is almost useable.
11) Added -Bstatic to SYSTEM_LD in Makefile.i386 so that kernels will
	build properly with the new ld.
1993-12-12 12:22:57 +00:00
Jordan K. Hubbard
41d67a5615 Folllow Bruce's advice in reducing dma_pagesize to 4K (more conservative
estimate).  This seems to work well with my GUS at least.
1993-12-12 05:50:52 +00:00
Andreas Schulz
908cd9251b Deleted the private cleandir target. It didn't had a rule for the
obj symlink in it and the normal bsd.prog.mk cleandir target does
already the correct thing.
1993-12-11 20:35:15 +00:00
Andrey A. Chernov
8cd0c83879 Remove compiler warning:
void function return int.
1993-12-11 00:37:55 +00:00
Andrey A. Chernov
04201cd182 Force HUPCL in bidirectional port open.
This don't allow it hangs forever.
1993-12-11 00:36:14 +00:00
Andrey A. Chernov
25915e75e3 1) Fix error with port recognition, speed initialization code
added to probe.
2) Force CLOCAL=on for outgoing ports and CLOCAL=off for
incoming ports into open in bidirectional case.
3) Add DELAY after writing to com_ier for fifo drain into probe.
1993-12-09 17:24:19 +00:00
Garrett Wollman
699e9cf137 Fixed spelling error. Added NSIP (XNS over IP). Fixed TP class 4 over
IP line (TPIP) to be an option rather than a pseudo-device (the code keys
off #ifdef TPIP, not #if NTPIP > 0, as makes sense).
1993-12-06 01:57:16 +00:00
Andreas Schulz
fadc21ae39 Fixed the error that a Fdopen succeeds without a found fd controller in
the system.
1993-12-04 16:13:18 +00:00
Andrew Moore
05e634ef64 From: Jeffrey Hsu <hsu@soda.berkeley.edu>
The following patch adds the addr argument to signal handlers.

The kernel with the patch is no more and no less in compliance or in
violation of POSIX and ANSI C than the kernel before the patch.

The added functionality this addr argument provides is quite useful.  It
enables an entire class of algorithms which use mprotect to trace memory
references.  Beside garbage collectors, I have heard of this technique being
applied to debuggers and profilers.  The only benchmarking I've performed is
using akcl to compile maxima:  without the kernel patch, it takes 7 hours to
compile maxima, while with stratified garbage collection, it only takes 50
minutes.

Basically, I can't think of a reason not to add the addr argument and there
is a compelling need for it.

If you find the patch acceptable, please let me know so I can send my
FreeBSD akcl config files to wfs for inclusion in the core akcl release.
The old 386BSD config files there won't work on either NetBSD or FreeBSD.
1993-12-03 05:10:08 +00:00
Andrew Moore
16111ced9f Reset fdc during probe.
From: <dec@lazarus.nrtc.northrop.com>
   Changes between EPSILON and RELEASE of FreeBSD have again caused
the kernel to not see my floppy disk drives.  I don't know what happened,
'cause I don't see any changes to fd.c, but here is an old fix that
I have applied to the probe routine which will solve the problem (at
least for me).  Since this is a rather brute-force solution - I understand
if you want to ignore it...

[Upgrading to pre-Beta FreeBSD caused this on my system. -AM]
1993-12-03 05:01:40 +00:00
Andrey A. Chernov
b4afc64b0b wmesg was too long (>7), fixed 1993-11-29 19:26:32 +00:00
David Greenman
97751a63e2 * Revision 2.16 1993/11/29 16:55:56 davidg
* merged in Garrett Wollman's strict prototype changes
 *
 * Revision 2.15  1993/11/29  16:32:58  davidg
 * From Thomas Sandford <t.d.g.sandford@comp.brad.ac.uk>
 * Add support for the 8013W board type
1993-11-29 17:07:33 +00:00
Andrey A. Chernov
b81db928c3 Direct #undefs removed to allow flexible manipulation
via config options. Unneded #defines removed.
Improved dependance of "snd.h" and NSND.
1993-11-28 10:55:59 +00:00
David Greenman
a9627169cd Patch from Gene Stark:
Subject: Page fault in PTE area fails in copyout
Index: sys/i386/i386/trap.c FreeBSD-1.0.2

Description:
	Reading files of several megabytes into Emacs, or many small
	files all at once, would fail with "IO error - bad address".

Repeat-By:
	The bug can be exercised by a test program that malloc()'s
	a 5MB chunk of memory, and then, without accessing the memory
	first, filling it with data from a file using read().
	(I read 64k chunks from /dev/wd0d into successive 64k regions
	of the 5MB chunk.)  The read() will fail with EFAULT at the first
	virtual address boundary that is a multiple of 0x400000.

Fix:
	The problem was code in sys/i386/i386/trap.c that tries to
	figure out what kind of trap occurred and to handle it appropriately.
	It was interpreting any page fault with virtual address
	>= vm->vm_maxsaddr as being a user stack segment fault.
	In fact, addresses >= USRSTACK are in the user structure/PTE area,
	and if they are handled as stack faults, the proper PTE will
	not be paged in when it is supposed to be.  This situation comes
	up in copyout() and copyoutstr(), if PTE's are accessed for the
	first time ever.  The page fault on accessing the nonexistent PTE
	is mishandled as a stack fault, and then the fault that occurs on
	the subsequent access to the page itself causes copyout to fail
	with EFAULT.
1993-11-28 09:28:54 +00:00
Andrey A. Chernov
4a8e05dd59 Move soundcard.h & ultrasound.h to proper location <machine/...>
to allow application access it.
1993-11-27 22:16:44 +00:00
Garrett Wollman
608bcbe953 Declare cnopen, cnclose, and other console routines. 1993-11-27 19:19:19 +00:00
Rich Murphey
d6084ed740 Declared cn{open,close,read,write,ioctl,select} extern. 1993-11-27 06:50:45 +00:00
Rich Murphey
23fc1c7148 Fix conflicting prototypes and return values. 1993-11-27 06:32:41 +00:00
Garrett Wollman
c5fd31718b Fix d_write_t -> d_rdwr_t (typing error). 1993-11-26 22:44:17 +00:00
Garrett Wollman
381fe1aaf4 Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, and
add same (sans -Werror) to Makefile for future compilations.
1993-11-25 01:38:01 +00:00
Nate Williams
997e3029c9 Subject: Panic - can't mount route (Soren's changes)
From: Geoff Rehmet  <g89r4222@braae.ru.ac.za>

Description:
	On bootup, probe of wd drives fails (CP30104), and kernel panics
	- cannot mount root
	It appears that the device probe just times out.
	Increasing the timeout back to its old value fixes the problem.
Repeat-By:
	SUP FreBSD-current,  Find a CP30104 .....  (ok ok ok)
	Basically - Soren's changes barf my disk.
1993-11-23 21:36:37 +00:00
Christoph Robitschko
5a0cfe828a Changed return(-1) in switch_scr to return(EINVAL), because -1 is
ERESTART on return from a system call.
1993-11-23 18:20:52 +00:00
Nate Williams
1b0b2339ce Stop gap measure until we can get Bruce's driver debugged.
---
From: sos@login.dkuug.dk (S|ren Schmidt)
Subject: IDE-disk hangs - solution/patches NetBSD/FreeBSD
Summary: fixes for lost interrupts with IDE disks
Keywords: hanging-disk, IDE-disk, lost-interrupt


Due to "popular" demand I'm posting these patches to NetBSD/FreeBSD
instead of mailing them around the world :-)

As many have found out there is a problem when using IDE disks on
FreeBSD. Following is a patch that fixes the problem with lost intterrupts.
Both fixes is based on a patch posted here some month ago by
Stefan Behrens?? (sorry I've lost the original article). But anyway it
works (for me :-).
Basically it does a timeout on lost interrupts, starting the operation
again and logging and error message on the console.

It additionally makes the allready present while loop timeouts
independent of CPU speed, and adds minor numbers for easy access to
dos partitions.
1993-11-22 23:25:46 +00:00
David Greenman
047ea5bd0c * Revision 2.14 1993/11/22 10:55:30 davidg
* change all splnet's to splimp's
 *
 * Revision 2.13  1993/11/22  10:53:52  davidg
 * patch to add support for SMC8216 (Elite-Ultra) boards
 * from Glen H. Lowe
 *
 * Revision 2.12  1993/11/07  18:04:13  davidg
 * fix from Garrett Wollman:
 * add a return(0) at the end of ed_probe so that if the various device
 * specific probes fail that we just don't fall of the end of the function.
1993-11-22 11:08:16 +00:00
David Greenman
b513c26294 patches from Julian Elischer -
Added support for mmapping /dev/mem
1993-11-22 09:46:45 +00:00
David Greenman
d333677271 added 5us delay before checking BUSY flag to conform to ATA spec -
as suggested by John Dyson (dyson@implode.rain.com)
1993-11-19 06:30:00 +00:00
Rodney W. Grimes
57bb0ee45f New version of scsi code from Julian 1993-11-18 05:03:27 +00:00