Commit Graph

467 Commits

Author SHA1 Message Date
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
Andrey A. Chernov
aa0028f8cf Fix attach message, make separate line for it
(old version assumed that line is probe line)
1993-11-17 23:38:23 +00:00
Garrett Wollman
35089dd415 Fixed comments that start within a comment, so code compiles cleanly with
-Wcomment.
1993-11-17 23:25:28 +00:00
Garrett Wollman
e13cc161a1 Increased symtab space and added two more options that don't do anything
(yet).
1993-11-17 23:24:12 +00:00
Andrey A. Chernov
58e4f8835a If netmask == 0, new value changed from 0x8000 to 0x10000
(don't mess with IRQ15)
1993-11-17 00:21:03 +00:00
David Greenman
eee5a63430 new process tracing code from Sean Eric Fagen (sef@kithrup.com).
...also, fixed up the syscall args to make GCC happy.
1993-11-16 09:54:57 +00:00
Andrey A. Chernov
6683327ab0 We don't want shared boot, so -Bstatic added to ld options 1993-11-16 02:02:05 +00:00
Paul Richards
cf0f1d209c Changed -Z back to -z.
In line with all other ld's -z is now the "standard" ZMAGIC format.
1993-11-16 00:45:04 +00:00
Paul Richards
f4165dc353 Changed -z to -Z so we create old-style ZMAGIC kernels. 1993-11-15 21:06:08 +00:00
Andrey A. Chernov
1e064bd4be timeout+sleep changed to tsleep 1993-11-15 01:33:11 +00:00
Andrey A. Chernov
de0edfd4e3 if netmask == 0, then the loopback code can do some really
bad things.
workaround for this: if netmask == 0, set it to 0x8000,
which is value used by splsoftclock
1993-11-14 23:53:32 +00:00
Andrey A. Chernov
0d04ba084f New sio driver from Bruce. 1993-11-14 23:29:01 +00:00
Rodney W. Grimes
62f4ee2685 Add _bde_exists: label so that the global is really defined. Fix spelling
error (mount -> amount)
1993-11-14 02:27:22 +00:00
Rodney W. Grimes
9518d3aea0 >From Charles Hannum
Change movl %es: -2(reg) to use a subl $2,reg when fixing up the IDT
entries for bdb.  This seems to be the best way to go.

Some day soon #ifdef BDB all of Bruces debugger code.
1993-11-13 04:43:25 +00:00
David Greenman
0967373e1c First steps in rewriting locore.s, and making info useful
when the machine panics.

i386/i386/locore.s:
1) got rid of most .set directives that were being used like
	#define's, and replaced them with appropriate #define's in
	the appropriate header files (accessed via genassym).
2) added comments to header inclusions and global definitions,
	and global variables
3) replaced some hardcoded constants with cpp defines (such as
	PDESIZE and others)
4) aligned all comments to the same column to make them easier to
	read
5) moved macro definitions for ENTRY, ALIGN, NOP, etc. to
	/sys/i386/include/asmacros.h
6) added #ifdef BDE_DEBUGGER around all of Bruce's debugger code
7) added new global '_KERNend' to store last location+1 of kernel
8) cleaned up zeroing of bss so that only bss is zeroed
9) fix zeroing of page tables so that it really does zero them all
	- not just if they follow the bss.
10) rewrote page table initialization code so that 1) works correctly
	and 2) write protects the kernel text by default
11) properly initialize the kernel page directory, upages, p0stack PT,
	and page tables. The previous scheme was more than a bit
	screwy.
12) change allocation of virtual area of IO hole so that it is
	fixed at KERNBASE + 0xa0000. The previous scheme put it
	right after the kernel page tables and then later expected
	it to be at KERNBASE +0xa0000
13) change multiple bogus settings of user read/write of various
	areas of kernel VM - including the IO hole; we should never
	be accessing the IO hole in user mode through the kernel
	page tables
14) split kernel support routines such as bcopy, bzero, copyin,
	copyout, etc. into a seperate file 'support.s'
15) split swtch and related routines into a seperate 'swtch.s'
16) split routines related to traps, syscalls, and interrupts
	into a seperate file 'exception.s'
17) remove some unused global variables from locore that got
	inserted by Garrett when he pulled them out of some .h
	files.

i386/isa/icu.s:
1) clean up global variable declarations
2) move in declaration of astpending and netisr

i386/i386/pmap.c:
1) fix calculation of virtual_avail. It previously was calculated
	to be right in the middle of the kernel page tables - not
	a good place to start allocating kernel VM.
2) properly allocate kernel page dir/tables etc out of kernel map
	- previously only took out 2 pages.

i386/i386/machdep.c:
1) modify boot() to print a warning that the system will reboot in
	PANIC_REBOOT_WAIT_TIME amount of seconds, and let the user
	abort with a key on the console. The machine will wait for
	ever if a key is typed before the reboot. The default is
	15 seconds, but can be set to 0 to mean don't wait at all,
	-1 to mean wait forever, or any positive value to wait for
	that many seconds.
2) print "Rebooting..." just before doing it.

kern/subr_prf.c:
1) remove PANICWAIT as it is deprecated by the change to machdep.c

i386/i386/trap.c:
1) add table of trap type strings and use it to print a real trap/
	panic message rather than just a number. Lot's of work to
	be done here, but this is the first step. Symbolic traceback
	is in the TODO.

i386/i386/Makefile.i386:
1) add support in to build support.s, exception.s and swtch.s

...and various changes to various header files to make all of the
	above happen.
1993-11-13 02:25:21 +00:00
Andrey A. Chernov
e614aa8a3b Fixed minor bug in M[LSN] interpretation, added octave-tracking.
Added the slur-mark feature.
Name of ioctl's include sys/spkr.h changed to machine/speaker.h
1993-11-09 02:32:30 +00:00
Andrey A. Chernov
4649951014 Name of ioctl's include sys/spkr.h changed to machine/speaker.h 1993-11-09 02:31:53 +00:00
Andrew Moore
2fc79c3815 Applied David Greenman's hack to disable IRQ conflict checking
when COM_MULTIPORT is defined.
1993-11-09 02:12:36 +00:00
Jordan K. Hubbard
fe40db7b2e Change from David Greenman to return properly unsigned irq. 1993-11-09 01:20:33 +00:00
Andrey A. Chernov
fe04cbf968 Add missing read flush code to siostop 1993-11-08 19:36:32 +00:00
Garrett Wollman
9cad5725f1 Added the netrmp protocol from the Net/2 tape. While of dubious utility,
it's simple enough that it might actually work and be useful on some systems.
(That's more than you can say for netccitt or netimp!)
1993-11-07 22:54:51 +00:00
Garrett Wollman
f4639581fd Get rid of WFJ's use of sleep() for more user-friendly tsleep(). 1993-11-07 21:47:19 +00:00
Garrett Wollman
87e90eb9f3 Add options MACHVMCOMPAT and bump symtab space appropriately. 1993-11-07 21:46:25 +00:00
Garrett Wollman
13c0dce671 Made all header files idempotent and moved incorrect common data from
headers into a related source file.  Also fixed a bug in ed_probe() where
it was possible to fall off the end of the function
1993-11-07 17:44:34 +00:00
Garrett Wollman
6e393973f5 Made all header files idempotent and moved incorrect common data from
headers into a related source file.  Added cons.h as first step towards
moving i386/i386/cons.h to machine/cons.h where it belongs.
1993-11-07 17:43:17 +00:00
Garrett Wollman
e766e4d9f1 Made all header files idempotent and moved incorrect common data from
headers into a related source file.  (This is the only change to locore.s).
Also fixed pg() to be properly declared and use stdargs.
1993-11-07 17:41:36 +00:00
Garrett Wollman
cafa6f4851 Fixed comment. 1993-11-07 17:40:05 +00:00
Garrett Wollman
024253188b Try to be a little smarter about touching the date on assym.s, so that
if something changes which doesn't affect it, locore doesn't have to get
rebuilt.  This is at the cost of a genassym and a cmp in every compile,
until someone can figure out how to make `make' smarter itself.
1993-11-07 16:46:33 +00:00
Garrett Wollman
aa2e423c8b Added some more defines that weren't there before. Also bumped up
symtab space again.
1993-11-07 16:44:40 +00:00
Garrett Wollman
3352eb489b Needed to bump up SYMTAB_SPACE again. (This really should be done by the
boot loader...)
1993-11-07 05:26:17 +00:00
Garrett Wollman
70176e63d6 Added CWARNFLAGS and COPTFLAGS defines to Makefile so that we can easily
test various warning and optimization compiler flags without modifying the
Makefile. (From my patch set.)
1993-11-07 04:41:11 +00:00
David Greenman
d19eeaea76 splnone()'s in the trap code can be deadly. Save/restore previous priority
instead.
1993-11-04 15:05:41 +00:00
Andrey A. Chernov
03d24cbca4 DST offset calculation removed, it is wrong in any case. 1993-11-04 01:56:31 +00:00
Andrey A. Chernov
743eb022be Russian keymap (RUKEYMAP) changes:
New syscons keys added: NEXT, DBG, RBT
AltGr Shift removed from right Alt
Shift state on -,+ keys exchanged
1993-11-04 01:49:20 +00:00
Paul Richards
19bcb5e4a2 Restored comments that were removed from npx.c using # comment
format rather than /* */, as per advise from Jordan.
1993-11-03 23:32:35 +00:00
Andreas Schulz
6d873e8a1d Added the option FAT_CURSOR into the GENERIC kernel descriptions for
pccons or syscons usage. Modified comment in LINT for FAT_CURSOR.
Now the FAT_CURSOR can be controlled over the option, instead of hacking
syscons.c and pccons.c.
1993-11-03 20:02:23 +00:00
Nate Williams
c750557cbe Fixed the reason for wx.c not working. I forgot to keep all the table entries
for the driver in the kernel when NWX was defined.
1993-11-03 18:07:32 +00:00
Nate Williams
f1bd2dc303 Added wx driver support 1993-11-03 18:05:42 +00:00
Paul Richards
81fc6236e6 Removed comments from within asm block.
New gas fails to parse comments within asm blocks properly. Simply
remove them until gas gets fixed.
1993-11-03 00:29:19 +00:00
Christoph Robitschko
d73546248a Modified the "rude stack hack" that it only applies to addresses within
the stack area and not memory above VM_MAXUSER_ADDRESS.
That way, copyout and friends now work for pages whose page table entries
have not yet been allocated/been paged out.
1993-11-01 11:51:29 +00:00
Jordan K. Hubbard
60b031c083 Added FAT_CURSOR and STAR_SAVER settings. 1993-10-31 00:21:46 +00:00
Jordan K. Hubbard
69637c74cd Add example entries for syscons screen savers and cursor shape. 1993-10-31 00:20:35 +00:00
Jordan K. Hubbard
9afdb1976e Now that STAR_SAVER and SNAKE_SAVER are kernel options, add code
to make sure that bad things don't happen if both are (incorrectly)
defined at once.
1993-10-31 00:19:01 +00:00
Jordan K. Hubbard
faa78b5f58 Fixed bug where syscons.c wouldn't compile if DDB was enabled.
Removed FAT_CURSOR and STAR_SAVER as compiled in defaults - these should
be kernel options!
1993-10-31 00:09:02 +00:00
David Greenman
97a0085a24 Whoops, the algorithm I last used was messed up - I left off parans, and
should have used PGSHIFT instead of PAGE_SHIFT.
1993-10-29 09:06:56 +00:00
David Greenman
03cfe1fd06 Change filesystem buffer cache size calculation to be less for 4MB
machines (now 20% of all memory after the first 3MB). This is necessary
in order for 4MB machine to be able to rebuild the entire source tree
and not run out of physical memory because of fixed memory requirements
of processes and kernel VM.
1993-10-29 08:58:34 +00:00
Jordan K. Hubbard
4506032117 Update to latest Linux sound driver 2.0 1993-10-29 03:44:07 +00:00
Rodney W. Grimes
2110b1cd9d Put back the $Id$ strings 1993-10-28 06:15:14 +00:00
Rodney W. Grimes
e7e96f200b Put back the $Id$ string 1993-10-28 06:11:38 +00:00
Jordan K. Hubbard
33853f9752 This is syscons version 1.1 1993-10-28 05:27:36 +00:00
Rodney W. Grimes
ce0dbe6e66 Fix for 1542C support, it turns out that the 0x8 extended bios flag is only
set when extended translation is turned on, thus we need to do the mailbox
unlock command no matter what value is in the extended bios flag byte as
the other extensions (ie, > 2 drive support) cause the same problems.

The code has been changed to ALWAYS unlock the mailbox interface on ALL
1542C class boards.
1993-10-28 02:38:36 +00:00
Nate Williams
256a080003 Added character 21 to conf.c table for future ps/2 mouse driver. This
finishes the install of the device short of adding the driver itself to
i386/isa/psm.c
1993-10-26 22:25:20 +00:00
Nate Williams
a777901110 Bad kludge to work around the alternative wd driver problems 1993-10-26 21:27:07 +00:00
Nate Williams
d6e9fac5ef Added alternative wd driver (called wx due to device name limitations)
This will be removed when a single driver that works on all hardware can
be verified
1993-10-26 21:26:19 +00:00
Nate Williams
f13a87bc86 Added ps/2 mouse driver file to finish off what Jordan started before
The driver will have to come after it's probe routine has been written.
1993-10-26 21:24:34 +00:00
Jordan K. Hubbard
92f1946205 From: Amancio Hasty Jr <hasty@netcom.com>
Make sure calls to gus_voice_irq() are protected from interrupts.
1993-10-24 19:38:06 +00:00
Paul Richards
73b69d9921 Removed #define ISDEBUG from top of file, should be config option
to get debugging code compiled in.

Moved bpfilter.h out of ifdef'd code so it can be seen.
1993-10-24 04:42:32 +00:00
Paul Richards
568eb51a26 Moved allocation of memory into is_attach so that malloc gets
called once when card is attached. Solved problem with driver
getting hosed when a reset takes place.

Removed init_block array -- now part of malloced memory. No more
static declarations left.

Added code so that debug ioctl actually does something.
ifconfig is0 debug will now switch on debugging code.

Other general cleanups.
1993-10-24 04:27:00 +00:00
Jordan K. Hubbard
e597e9115d Needed to bump symtab space even more (to 102452). 1993-10-23 22:55:43 +00:00
Jordan K. Hubbard
355ef93e2a Enable mpu401 driver. 1993-10-23 22:21:00 +00:00
Jordan K. Hubbard
3568631904 Enabled all sound drivers by default. 1993-10-23 22:20:47 +00:00
Jordan K. Hubbard
4ec867953a Fixed up to at least compile (can't test) properly for FreeBSD 1993-10-23 22:13:42 +00:00
Jordan K. Hubbard
5f42fb024b Moved sound driver from major 21 to major 30 1993-10-23 22:13:08 +00:00
Jordan K. Hubbard
dd442d34e7 Removed comments from LINT file, left small example for SoundBlaster
in its place and moved commentary into /sys/i386/doc/sound.doc
1993-10-23 21:21:52 +00:00
Jordan K. Hubbard
1cdd75d714 Made kernel printf's more closely follow standard BSD convention. 1993-10-23 21:11:49 +00:00
Rodney W. Grimes
9c2d9218cc Put the sound stuff in alpabetic order. 1993-10-23 20:31:17 +00:00