Commit Graph

600 Commits

Author SHA1 Message Date
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
37a08e7002 sddump code is now standard, no more options SDDUMP needed in the kernel
config file.
Fixed to not use pmap_enter as this causes side effects and other
problems like a page fault while trying to do the dump.
1994-01-06 18:08:03 +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
David Greenman
f7d757443b Patches from John Brezak (necessary for the syscall->trapframe conversion
as well as add additional functionality):

Print symbolic args and line no's in stack traces.
1994-01-03 07:54:10 +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
8de7809a2c change maxprot of text to allow writes. 1993-12-30 01:39:29 +00:00
David Greenman
bb54009a35 Raised minimum buffer cache from 128k to 256k. 1993-12-22 13:12:04 +00:00
David Greenman
33811d39ec First round of changes from John Dyson and myself to the VM system. This
set improves performance and fixes the following problems (description
from John Dyson):

1.	Growing swap space problem in both static usage and
	in situations with lots of fork/execs in heavy paging
	situations.

2.	Sparse swap space allocation (internal fragmentation.)

3.	General swap_pager slowness.

Additionally, the new swap_pager also provides hooks for multi-page
I/O that is currently being developed (in early testing phases.)

Problem #1 is a result of a problem where objects cannot be collapsed
once a pager has been allocated for them.  This problem has been solved
by relaxing the restriction by allowing the pages contained in a shadow
object's pager be copied to the parent object's pager.  The copy is
afforded by manipulating pointers to the disk blocks on the swap space.
Since an improved swap_pager has already been developed with the data
structures to support the copy operation, this new swap_pager has been
introduced.  Also, shadow object bypass in the collapse code has been
enhanced to support checking for pages on disk.  The vm_pageout daemon
has also been modified to defer creation of an object's pager when the
object's shadow is paging.  This allows efficient immediate collapsing
of a shadow into a parent object under many circumstances without the
creation of an intermediate pager.

Problem #2 is solved by the allocation data structures and algorithms
in the new swap_pager.  Additionally, a newer version of this new swap_pager
is being tested that permits multiple page I/O and mitigation of the
fragmentation problems associated with allocation of large contiguous blocks
of swap space.

Problem #3 is addressed by better algorithms and a fix of a couple of bugs
in the swap_pager.  Additionally, this new pager has a growth path allowing
multi-page inputs from disk.  Approximately 50% performance improvement can
be expected under certain circumstances when using this pager in the standard
single page mode.

(Actually, I've seen more like twice the speed in my tests. -DLG)
1993-12-22 12:51:39 +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
92d91f7638 Let the linker keep track of pseudo-devices needing initialization and
image activators, rather than listing them inline in the code.
1993-12-20 19:31:41 +00:00
Garrett Wollman
cfefd68703 Rename aout_imgact.c and shell_imgact.c to imgact_* for consistency. 1993-12-20 16:16:46 +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
1a5569c650 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:31:40 +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
David Greenman
57594c8752 Patch from Julian Elischer:
Here is the fix for the 'hanging' bug.

This bug happenned whenever two operations were already underway on the
disk and a third (non-IO) command was requested..
in this case the process submitting the NON-IO command was requested to wait,
and a flag set so that on completion of the IO commands, the Non-io command
was given priority over any pending IO commands. (the queue is not
allowed to drain while there are pending "special" ops).

The flag that indicated this was not being reset, so further IO commands
were prohibited from that moment on.
1993-11-25 06:30:58 +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
Garrett Wollman
c8b18017ac Fixed comments. 1993-11-18 00:12:13 +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
Rodney W. Grimes
e95e7fce8a Increase timeout in sd_start_unit procedure from 2000 to 6000, per Adam David 1993-11-08 12:11:01 +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
83e26681ca Made all header files idempotent and moved incorrect common data from
headers into a related source file.
Deleted some very old device-specific headers for devices that we don't
support and likely never will.
1993-11-07 17:52:59 +00:00
Garrett Wollman
9e8258b56f Made all header files idempotent and moved incorrect common data from
headers into a related source file.
1993-11-07 17:51:34 +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
6437fb2c06 Make all headers idempotent. All incorrect common data moved out of header
files and into a related source file.
1993-11-07 17:39:25 +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
90f2ed3a8f Added link.h for shared libs. 1993-11-03 23:48:30 +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
Jordan K. Hubbard
6b8afe4d37 This is the Linux generic soundcard driver, version 1.0c. Supports
SBlaster/Adlib/ProAudio Spectrum/Gravis/etc cards.  This is a BETA test
driver, please test it and get back to me!
1993-10-23 10:55:52 +00:00
Jordan K. Hubbard
dad544ec41 Soundcard driver include file (/usr/include/machine/soundcard.h) 1993-10-23 10:50:21 +00:00
Jordan K. Hubbard
e59b35bd07 New soundcard driver at major device 21 1993-10-23 10:49:24 +00:00
Jordan K. Hubbard
ce551cce65 Add config + files information for new Linux soundcard driver 1993-10-23 10:49:01 +00:00
Nate Williams
85c856e747 Removed un-necessary dependencies for assym.s 1993-10-23 08:28:17 +00:00
Nate Williams
b0da334790 Reverted back to older version of ./genassym, instead of ./genassym.o
since make depend wasn't picking up any new dependencies.  However, due
to a bug in the old code, the original dependencies weren't being used, so
this version is better than the original and the lastest version.
(And is more readable as well)
1993-10-23 06:46:24 +00:00
David Greenman
2bcdabe146 * Revision 2.11 1993/10/23 04:21:03 davidg
* Novell probe changed to be invasive because of too many complaints
 * about some clone boards not being reset properly and thus not
 * found on a warmboot. Yuck.
 *
 * Revision 2.10  1993/10/23  04:07:12  davidg
 * increment output errors if the device times out (done via watchdog)
 *
 * Revision 2.9  1993/10/23  04:01:45  davidg
 * increment input error counter if a packet with a bad length is
 * detected.
1993-10-23 04:52:41 +00:00
Rodney W. Grimes
1c9af4358a >From: "Andrew A. Chernov, Black Mage" <ache@astral.msk.su>
Date: Wed, 20 Oct 1993 18:28:44 +0300

Editors Note:
	Line ended with comma (``,'') instead of semicolon (``;''),
	this should not have effected the code.
	Submitter made no comments other than it was ``simple''.
1993-10-20 15:49:02 +00:00
Nate Williams
e2aa2f4e4e Updated LINT to have the mse0 config line 1993-10-19 19:49:24 +00:00
Nate Williams
eb77639e83 This is my patched version of a busmouse driver originally by Rick Macklem
(rick@snowhite.cis.uoguelph.ca).  I am currently using it with a Microsoft
InPort busmouse, under FreeBSD Epsilon.  I hadn't planned on supporting it,
but I have patched it a few times, and I guess this is now the de facto
reference version, so send me any problems or improvements.

                                                        - Gene Stark
                                                          stark@cs.sunysb.edu
                                                          October 9, 1993
1993-10-19 19:46:49 +00:00
Rodney W. Grimes
2ce29564c2 Add ie0 to standard kernels, this is the ATT starlan/ethernet driver
from Garrett Wollman.
1993-10-19 01:28:09 +00:00
Paul Richards
e5e0d5829e Free malloc'ed memory when resetting card. 1993-10-18 22:48:48 +00:00
Rodney W. Grimes
ec43e20a66 Correct config line for ie0 per Garrett Wollman. 1993-10-18 22:46:58 +00:00
Rodney W. Grimes
965b29039e >From: Julian Elischer <julian@jules.dialix.oz.au>
Date: Tue, 19 Oct 1993 02:22:41 -40962758 (WST)

As the subject line says:
I can;t believe this typo is still here.

Has NOBODY used the isa_dmastart() routine for 16bit DMA?

I know I just hit the dma regs directly for the AHA1542,
and it appears that either everybody else does as well, or
they only use 8bit DMA (e.g. floppy)

Editors Note:
	The definition of DMA2_CHN was incorrectly using IO_DMA1!
1993-10-18 18:45:48 +00:00
David Greenman
519471cc84 Yank out Christoph Robitschko's hack for the hanging console problem as
it didn't actually fix it, and because starting the getty on /dev/console
instead of /dev/vga is a good work-around.
1993-10-18 14:21:48 +00:00
Jordan K. Hubbard
538430ae1a Patch from stever@csuohio.edu (Steve Ratliff) to make FAT_CURSOR work
on HDA/CGA displays.
1993-10-18 02:19:54 +00:00
Paul Richards
1697bdcd61 Modified memory allocation to use malloc rather than a static array. 1993-10-17 22:22:46 +00:00
Rodney W. Grimes
dd05fde699 Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 19:17:18 +00:00
Rodney W. Grimes
624dc0c13b Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 17:21:10 +00:00
Rodney W. Grimes
0edf66eca4 Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 16:47:35 +00:00
Rodney W. Grimes
b8b4b679c0 Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 15:24:44 +00:00
Rodney W. Grimes
34a8ed1be1 Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 14:40:57 +00:00
Rodney W. Grimes
47cacd3854 Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 14:15:10 +00:00
Rodney W. Grimes
6f78ca6026 Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 13:48:52 +00:00
Rodney W. Grimes
9157622183 Add:
device ed1 at isa? port 0x300 net irq 5 iomem 0xd8000 vector edintr
1993-10-16 12:28:35 +00:00
Rodney W. Grimes
8b80a85bb0 Disable the aha_set_speed code since it breaks more than it fixes. 1993-10-16 12:27:20 +00:00
Rodney W. Grimes
902e518080 Enable mcd0 (Mistumi CDROM) since we now have load space for it 1993-10-15 12:47:02 +00:00
Rodney W. Grimes
6de3bf82d0 Dont just mask the Megabyte, we need all the bits below too,
and ELIMITNATE THE 28K BOGOUSITY.
1993-10-15 12:33:03 +00:00
David Greenman
836e51b4a3 * Revision 2.8 1993/10/15 10:59:56 davidg
* increase maximum time to wait for transmit DMA to complete to 120us.
 * call ed_reset() if the time limit is reached instead of trying
 * to abort the remote DMA.
 *
 * Revision 2.7  1993/10/15  10:49:10  davidg
 * minor change to way the mbuf pointer temp variable is assigned in
 * ed_start (slightly improves code readability)
 *
 * Revision 2.6  93/10/02  01:12:20  davidg
 * use ETHER_ADDR_LEN in NE probe rather than '6'.
1993-10-15 11:06:41 +00:00
Rodney W. Grimes
960173b9b2 genassym.c:
Remove NKMEMCLUSTERS, it is no longer define or used.

locores.s:
	Fix comment on PTDpde and APTDpde to be pde instead of pte
	Add new equation for calculating location of Sysmap
	Remove Bill's old #ifdef garbage for counting up memory,
	that stuff will never be made to work and was just cluttering
	up the file.

	Add code that places the PTD, page table pages, and kernel
	stack below the 640k ISA hole if there is room for it, otherwise
	put this stuff all at 1MB.  This fixes the 28K bogusity in
	the boot blocks, that can now go away!

	Fix the caclulation of where first is to be dependent on
	NKPDE so that we can skip over the above mentioned areas.
	The 28K thing is now 44K in size due to the increase in
	kernel virtual memory space, but since we no longer have
	to worry about that this is no big deal.

	Use if NNPX > 0 instead of ifdef NPX for floating point code.

machdep.c
	Change the calculation of for the buffer cache to be
	20% of all memory above 2MB and add back the upper limit
	of 2/5's of the VM_KMEM_SIZE so that we do not eat ALL
	of the kernel memory space on large memory machines, note
	that this will not even come into effect unless you have
	more than 32MB.  The current buffer cache limit is 6.7MB
	due to this caclulation.

	It seems that we where erroniously allocating bufpages pages
	for buffer_map.  buffer_map is UNUSED in this implementation
	of the buffer cache, but since the map is referenced in
	several if statements a quick fix was to simply allocate
	1 vm page (but no real memory) to it.

pmap.h
	Remove rcsid, don't want them in the kernel files!

	Removed some cruft inside an #ifdef DEBUGx that caused
	compiler errors if you where compiling this for debug.

	Use the #defines for PD_SHIFT and PG_SHIFT in place of
	constants.

trap.c:
	Remove patch kit header and rcsid, fix $Id$.
	Now include "npx.h" and use NNPX for controlling the
	floating point code.

	Remove a now completly invalid check for a maximum virtual
	address, the virtual address now ends at 0xFFFFFFFF so
	there is no more MAX!!  (Thanks David, I completly missed
	that one!)

vm_machdep.c
	Remove patch kit header and rcsid, fix $Id$.
	Now include "npx.h" and use NNPX for controlling the
	floating point code.

	Replace several 0xFE00000 constants with KERNBASE
1993-10-15 10:34:29 +00:00
Rodney W. Grimes
d42d25c451 param.h:
Mark the fact that PGSHIFT and PDRSHIFT are really the same as
PG_SHIFT and PD_SHIFT, these should be collapsed some day soon.

Document that KERNBASE should really be KPTDPTDI << PDRSHIFT, for
now leave it as the constant 0xFE000000 until I make a seperate
common header file for this stuff (vmaddresses.h?)

Remove NKMEMCLUSTERS define, it was only being used to define
VM_KMEM_SIZE, so why have all the indirection.  Besides who wants
to work in CLBYTE sizes chuncks.


pmap.h:

Fix $Id$ and some other minor format clean ups.

Remove the XXX comment about NKPDE, since it now has the correct value
of 7.

Remove unused LASTPTDI and move the APTD into the very end of memory to
free up 4MB of kernel virtual address space.
Remove unused RSVDPTDI and free up 12MB of kernel virtual address space.


vmparam.h

Fix $Id$.

Increase SHMMAXPGS to 512 (2MB) now that there is room for it to be
bigger.  The XXX comment stays until the kernel moves down in memory
to free up enough space to use the proper default of 4MB.

VM_KMEM_SIZE is now a direct constant stating the size of the kernel
malloc region.  Increased the value from 3MB to 16MB.
1993-10-15 10:07:45 +00:00
Rodney W. Grimes
37378adeb5 Add detection code for what model of AHA154X/Z we are running on,
then use that information to fix the enhancemode features of the
1542C/CF boards by turning them off.

When doing this I found that the Buslogic 545S does NOT properly
mimic the 1542 families AHA_INQUIRE command.  It only returns 1
byte of information, when the adaptec manual clearly states that 4
bytes are to be returned.  I added a printf that explains the error
when we see a 545S for now, I tried to come up with a better solution,
but it involved to much work for now.
1993-10-15 09:43:51 +00:00
Rodney W. Grimes
9f2d973525 Moved wt0 (Wangtek/Archive tape driver) to be with the rest of the
bio (block I/O) devices.

Added mcd0 (Mitsumi CDROM driver) but commented it out since there is not
enough room in this kernel for it.
1993-10-14 21:59:50 +00:00
Rodney W. Grimes
cd632cb9fb >From David Greenman
Bruce Evans had limited the kernel virtual address space to not include the
last 4MB since it was not being used.  Other changes are being made that will
reloate the Alternate Page Directory Table (APDT) into this area so the limit
is being fixed to be the last virtual address. (Infact with this patch you
can now do that relocation)
1993-10-14 18:15:35 +00:00
Rodney W. Grimes
9a91485c70 Remove machdep.c from files.i386 and put machdep.o in the SYSTEM_OBJS
line of Makefile.i386.  Fixes the extra rule that gmake complains about
for machdep.o.  This fix is from Joans 0lsson.

Rework the depends and rules for assym.s and genassym so that we now use
the .depend rule for genassym.o such that if you change any header files
that are included by genassym.c the right things happen.  This is probably
what has caused more bad kernel builds than any other thing in the
Makefile.i386!
1993-10-14 17:09:55 +00:00
Rodney W. Grimes
2fa5acb59a Move the wt0 (archive/wangtek tape driver) so that it is with the
other bio type devices.

Add mcd0 (mitsumi cd rom driver), to bad that GENERICBT is to large,
otherwise I could add this driver to it too.
--- 72,77 ----
1993-10-14 14:05:44 +00:00
David Greenman
cc44412791 Disassociate DTR and RTS. They were coupled together and shouldn't have
been. This was necessary to work around problems with some equipment
that don't respond favorably to having these both dropped simultaneously.
1993-10-14 09:13:54 +00:00
Rodney W. Grimes
08222b297c Surround printf for uha_init board not responding printf with #ifdef UHADEBUG,
since the main line probe code now tells you it did not find one.
1993-10-14 00:07:04 +00:00
Rodney W. Grimes
b200ffec79 Increase the DELAY that supposedly makes the Bustek 545 work from
1ms to 10ms.  I have my doubts, but oh well.
1993-10-13 16:34:10 +00:00
Rodney W. Grimes
5c644711a9 ALL:
Removed patch kit headers and rcsid strings, add $Id$.

isa.c:

Removed old #ifdef notyet isa_configure code, since it will never be
used, and I have done 90% of what it attempted to.

Add conflict checking code that searchs back through the devtab's looking
for any device that has already been found that may conflict with what
we are about to probe.  Checks are mode for I/O address, memory address,
IRQ, and DRQ.  This should stop the screwing up of any device that has
alread been found by other device probes.
Print out messages when we are not going to probe a device due to
a conflict so the user knows WHY something was not found.  For example:

aha0 not probed due to irq conflict with ahb0 at 11

Now print out a message when a device is not found so the user knows
that it was probed for, but could not be found.  For example:

ed1 not found at 0x320

For devices that have I/O address < 0x100 say that they are on the
motherboard, not on isa!  The 0x100 magic number is per ISA spec.  It
may seem funny that pc0 and sc0 report as being on the motherboard, but
this is due to the fact that the I/O address used is that of the keyboard
controller which IS on the motherboard.  We really need to split the
keyboard probe from the display probe.  It is completly legal to build
a pc with out one or the other, or even with out both!

npx.c:

Return -1 from the probe routine if we are using the Emulator so
that the i/o addresses are not printed, this is the same trick used
for 486's.

Do not print the ``Errors reported via Exception 16'', and
``Errors reported via IRQ 13'' messages any more, since these just lead
to more user confusion that anything.  It still prints the message
``Error reporting broken, using 387 emulator'' so that the person is
aware that there mother board is ill.
1993-10-13 15:59:30 +00:00
Rodney W. Grimes
e5ff3be604 Removed hack that did the R_SHIFT of unsigned numbers, no longer need
to do this as I have changed to using PDTI's as the bases for the vm
system layout.

Eliminate constants SYSPDROFF and SYSPDREND, now use NKPTE to control the size
of the kernel virtual space.

Eliminate constant PDRPDROFF, now use PDTDTPI to control location of PTD,
PTDmap and PTDpde

Eliminate constant APDRPDROFF, now use APTDPTDI to control location of APTD,
APTDmap and APTDpde.

Still need to fix Sysmap location (it is still a constant).

.globl statements are now consistent with respect to <comma><space>, the
<space> being removed from all .globl statements.

Document the fillkpt macro as to what registers control what.

Fix some comments that went past column 80, and clean/line some others up.

Remove constand for _Crtat, now use KERNBASE+constant, this still needs work.

Replace constants for offsets of sigcode parameters with symbolic names
from assym.s

Mark the sigreturn() call with XXX since we use the hardcoded constant
for the system call number, this is bogus and should be a #define or
something some place!

The kernel before and after this change was verified with cmp, not one
byte changed.  These are all cosmetic clean up changes that makes the
code more correct and easier to move the kernels virtual address space
and size.
1993-10-13 07:11:11 +00:00
Rodney W. Grimes
c1c1b7df77 Add Page Table Directory Indexes (NKPDE, KPTDI, PTDPTDI, APTDPTDI) to
be used to replace more constants in locore.
1993-10-12 15:33:18 +00:00
Rodney W. Grimes
a27df7823f KPTDI_LAST renamed to KPTDI 1993-10-12 15:09:37 +00:00
Rodney W. Grimes
988d75b3d6 Eliminate definition of I386_PAGE_SIZE and use NBPG instead
Cleaned up tabs vs spaces after #define to make file consistent.
Removed now unused definitions of I386_PAGE_SIZE and I386_PDR_SIZE

Note That these two where unused and had the wrong values anyway!
Changed I386_KPDES to NKPDE
Changed I386_UPDES to NUPDE

Redid constant assignments of *PTDI's to be sizeable and relative.
1993-10-12 13:58:01 +00:00
Rodney W. Grimes
9aa17d68ce Eliminate definition of I386_PAGE_SIZE and use NBPG instead
Replace 0xFE000000 constants with KERNBASE
Use new definition NKPDE in place of a first-last+1 calculation.
1993-10-12 13:53:25 +00:00
Rodney W. Grimes
da73bf46a5 Fixed PHYSTOKV, addition operator on pointers is the wrong thing to do
here.  This is really a crock, but it works.
1993-10-12 12:08:16 +00:00
Rodney W. Grimes
7a94ec038f Remove erronous definitions of PHYSTOKV, correct one is in param.h now. 1993-10-12 07:15:38 +00:00
Rodney W. Grimes
d529c3d85c Add PHYSTOKV used in scsi drivers with a correct definition based on
KERNBASE.

Change #define<tab> to #define<space> on lines that had it wrong
1993-10-12 07:13:12 +00:00
Rodney W. Grimes
b05fb556cf Use KERNBASE for locating stuff in kernel virtual memory, not hard coded
constants.
1993-10-12 06:59:36 +00:00
Rodney W. Grimes
963a0adea5 i82586 support file for Garrett Wollmans ie driver 1993-10-12 06:53:10 +00:00
Rodney W. Grimes
e191da859f > Gcc2 generates memcpy calls when doing some structure copying in the
> code. As this memcpy generation is done by the compiler it doesn't
> work to have memcpy a macro. Instead I made it a static function that
> calls bcopy.

Okay, I tracked down the d*mn thing that is causing the memcpy to be
emmitted by gcc2.  In the following patch is a fix to eliminate the
one place that was causing gcc to do the memcpy in function ie_readframe
for the ie_recv_frame_desc rfd = *(ie->rframes[num]) structure copy.

I also fixed the code so that the NS (XNS) support would compile with
out error and removed the cruft #define ns_* stuff from the softc
structures (I did this a while back for all the other either drivers)

Removed the $Log$ and all of the old log stuff, that is all kept in
the cvs tree, no need to duplicate it in the file... I'll copy it
into my commit message so that it is all retained, except the
revision numbers are going to get screwed up.

It now compiles cleanly under my LINT kernel...

>  I have not yet tested this on the AT&T fiver cards yet. But, Wollman
> has used it on various other AT&T cards. I'm pretty sure Terry also
> uses this driver.

$Log$ stuff from Garretts original file
 * $Log$
 * Revision 1.32  1993/06/20  15:56:15  wollman
 * Fixed warning message.
 *
 * Revision 1.31  93/06/20  15:52:28  wollman
 * More compilation lint.
 *
 * Revision 1.30  93/06/20  15:48:16  wollman
 * Commented all the rest of the cast-qual warnings.  Might be
 * fixed someday by changing the prototypes of bcopy(), bzero(), etc.
 *
 * Revision 1.29  93/06/20  15:40:13  wollman
 * Started fixing some of the cast-qual warnings (most just commented).
 *
 * Revision 1.28  93/06/12  20:39:14  wollman
 * Changed definition of MK_24 to silence -Wcast-qual.
 *
 * Revision 1.27  93/06/08  17:05:57  wollman
 * Attach routine now returns void.
 *
 * Revision 1.26  93/06/08  16:31:21  wollman
 * Deleted attempt to set watchdog timer, since we don't use it.
 *
 * Revision 1.25  93/04/16  22:15:31  wollman
 * Fixed infinite loop in iestart() which would cause the transmitter
 * to constantly step on the Ethernet, sending the same two packets over
 * and over again.  This crashes the router (really!) and makes other
 * network users very angry.
 *
 * Revision 1.24  93/04/14  23:57:47  wollman
 * Increased transmit buffer size from 1504 to 1512, just in case I don't
 * understand how the MTU is used.
 *
 * Revision 1.23  93/04/14  23:16:19  wollman
 * Fix iestart() so that it only tries to execute a command if one was
 * queued up (oops...).
 *
 * Revision 1.22  93/04/14  23:02:16  wollman
 * Unknown changes.
 *
 * Revision 1.21  93/04/12  18:29:33  wollman
 * Added multiple transmit commands.  Note that they are always queued in
 * pairs (there are only two to begin with), and the I flag is only set
 * on the second one.  This should decrease interrupt activity somewhat.
 *
 * Revision 1.20  93/04/12  15:36:05  wollman
 * Changed setup of config block to take into account difference between
 * StarLAN (10BASE-T) and Ethernet: StarLAN is Manchester, Ethernet is NRZ.
 *
 * Revision 1.19  93/03/23  18:58:44  wollman
 * Raised count of receive buffers from 32 to 48 and included analysis of
 * memory usage in a comment near that definition.
 *
 * Revision 1.18  93/03/18  03:59:53  wollman
 * Last try to get large TCP windows to work...
 *
 * Revision 1.17  93/03/18  03:54:10  wollman
 * Added RNR processing as a part of receive interrupts.  Hopefully this
 * will make everything Just Work now.
 *
 * Revision 1.16  93/03/18  03:23:24  wollman
 * Still having problems with RNR conditions.  Basic problem: say we
 * set TCP window to 16k, which is a semsible value.  Then smart
 * partners will blast 16k to us, of which we can fit 8k minus a bit
 * into our buffers.  (Need to look at that memory map..)  So, we get
 * an RNR interrupt.  The problem is, what do we need to do in this case?
 * The original code doesn't work, but it doesn't hang the system either.
 *
 * Revision 1.15  93/03/18  02:37:00  wollman
 * Disabled watchdog timer.  This gets called from a timeout somewhere,
 * which is running up at softclock.  This is at a higher priority than
 * we are, so we can get interrupted in the process of receiving something
 * by the timer expiration, which is not a nice thing to have happen.
 * Question: how can we keep this functionality, but do it in sync with
 * our interrupts?  (Ugh!)
 *
 * Revision 1.14  93/03/18  02:35:46  wollman
 * Fixed some more problems with receive code---it works!
 *
 * Revision 1.13  93/03/17  20:15:59  wollman
 * Think we fixed the serious (showstopper) bugs in 1.12.
 *
 * Revision 1.12  93/03/15  17:45:39  wollman
 * Changed filtering logic dramatically to avoid the unnecessary copyin
 * for BPF or multicast routing when the packet is not for us.  (We
 * have to run in promiscuous mode in this case.)  We still need to
 * deal with the problem of allocating one mbuf per receive buffer;
 * we should be able to get away with a single mbuf for all reasonable
 * incoming packets, and using an mbuf cluster will help avoid unnecessary
 * copying of data.
 *
 * Revision 1.11  93/01/30  20:23:15  wollman
 * Fiddled with reset code to hopefully make it work better when the
 * watchdog timer expires.  Question: why does it make a difference that
 * we do the same thing through ieioctl() as we were doing before.  The
 * old code, when iereset() was called, the receive unit would completely
 * die.  But, a cycle of ifconfig ie0 down ; ifconfig ie0 up' would bring
 * things back to normal.  So, we try to mimic that now.  Grrr...
 *
 * Revision 1.10  93/01/29  17:26:50  wollman
 * Finally fixed multicast routing/BPF mb_map full problem!!!!
 * It turned out that, when we received a packet not for us, we
 * would just return from ie_readframe(), *WITHOUT* freeing the
 * mbuf that the packet was in.  So, when running in promiscuous
 * mode (i.e., multicast routing or BPF without -p), we would have
 * (on our extremely busy subnet 4) a memory leak of epic proportions.
 *
 * We now hold on to a single mbuf chain allocated in this way,
 * and the next time a packet is read, we free it.  Also, the
 * next time a packet is transmitted, we free it.  This way,
 * we never lose more than 6 mbufs total (and on average more like
 * 3).
 *
 * Revision 1.9  93/01/23  14:22:21  wollman
 * Added some StarLAN Fiber modifications from L. Jonas Olsson.
 *
 * Revision 1.8  93/01/23  14:02:34  wollman
 * Added support for IP multicasting.
 *
 * Revision 1.7  92/11/21  17:51:59  wollman
 * Added StarLAN Fiber version point to my driver.
 *
 * Revision 1.6  92/11/20  18:21:45  wollman
 * Fixed documentation, made out-of-mbuf condition an error.
 *
 * Revision 1.5  92/11/20  18:14:02  wollman
 * Move change of ethertype to host byte order so that it's after
 * bpf_mtap.  Hopefully, this will allow us to listen to incoming
 * IP packets.
 *
 * Revision 1.4  92/11/20  18:11:00  wollman
 * Added code to drop packets when we run out of mbufs rather than
 * panicking.  This should alleviate the problems observed when using tcpdump.
 *
 * Revision 1.3  92/11/14  14:12:40  wollman
 * Added BPF support code.
 *
 * Revision 1.2  92/11/14  13:30:26  wollman
 * Added RCS keywords
 *
1993-10-12 06:52:34 +00:00
David Greenman
357eebce38 incorporated patches from Marc Frajola (marc@escargot.rain.com) to
unset TS_TBLOCK when the RBLEN falls below the low water mark.
1993-10-12 06:32:28 +00:00
Rodney W. Grimes
5e89f9d804 Add ie0 (ATT ether net driver) and mcd0 (Mitsumi cd rom driver) 1993-10-12 06:24:02 +00:00
Rodney W. Grimes
54b7aa6d2b Mitsumi cd rom driver from Holger Viet as fixed up by Gary Clark II.
Still a little rought, but it seems to be working.
1993-10-12 06:08:31 +00:00
Rodney W. Grimes
965373a89e Add support for Holger Viets mitsumi cd rom driver as prepared by Gary
Clark II.
1993-10-11 07:39:13 +00:00
Rodney W. Grimes
460346376e Add support for mitsumi cd rom driver from Holger Viet, as fixed up by
Gary Clark II.
1993-10-11 06:19:40 +00:00
Rodney W. Grimes
0e08d66ab8 >From: Julian Elischer <julian@jules.DIALix.oz.au>
Subject: Re: Error reading from DAT (fwd)
Date: Mon, 11 Oct 1993 03:02:39 -40962758 (WST)

Some tapes won't do anything until you tell them to load.
Other tapes think that being asked to load is a great excuse to
make the next command return a "unit attention" (media changed) error.
Since we need to do the load, throw in a dummy instruction to cop the
error.

specifically for DEC DAT drives.
1993-10-11 04:53:23 +00:00
Rodney W. Grimes
64e154d67b Fixed the options hd(1,... to be more accurate (removed word options it
now reads:

printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");

I know the person wanted more explination, but there is little room in
the boot blocks for verbose text!
1993-10-11 02:43:42 +00:00
Rodney W. Grimes
0d0a2b1998 Added if_ie entry for Garett Wollmans ATT driver, the drives will be imported
soon.
1993-10-10 16:25:13 +00:00
Rodney W. Grimes
1c622fc1dc SYSPDROFF and SYSPDREND are now calculated using KERNBASE, KERNSIZE and
PDRSHIFT.

The SYSTEM constant that was defined in this file has been replaced
with KERNBASE from param.h.

Changed almost all # style comments to /* */ C style comments.  Several
comments cleaned up so that they make a little more since.

In the comments that describe C calling conventions to assembler routines
used a comma space sequence to seperate arguments and removed the space
between the function name and the argument list.

Removed useless comments like /* clr eax */.

Changed all comma space sequences on assemble instructions to just be comma.

Removed spaces after $ operators to make the file consistent, this may need
to change again (ie: $KERNBASE should probably be $(KERNBASE), but for now
it all seems to work just fine.)  This may become a problem with the C
pre-processor.

Changed several double blank lines to single blank lines that where used
to seperate the I/O routines, these routines are blocked enough that we
don't need double blank lines between them.

Changed sequence of I/O routines to be all input functions, all output
functions instead of just the opposite.

Moved the SHOW_A_LOT debug stuff to near the end of the file.

Changed two occurances of the constant 0xfff to NBPG-1.
1993-10-10 06:07:57 +00:00
Rodney W. Grimes
845dee6b85 Added a compile time #error so that if the user does not specify on of
the proper I_X86CPU in the config file the following error will occur
while building the kernel: (had to line wrap the error for this message)

../../i386/i386/machdep.c:343: #error This kernel is not configured for one \
of the supported CPUs
1993-10-10 06:01:44 +00:00
Rodney W. Grimes
156812b7e4 Added PDRSHIFT and KERNSIZE so that the PDR offsets can be calculated in
locore.s instead of being constants (3F8, 3FA).
1993-10-10 02:09:44 +00:00
Rodney W. Grimes
08ac278533 Put sound blaster in alaphabetic order 1993-10-09 23:59:13 +00:00
Rodney W. Grimes
a2bad62649 Remove patch kit header, add $Id$, fix tabing on sound blaster cdev entry 1993-10-09 23:56:53 +00:00
Jordan K. Hubbard
0216aa9be2 Added sb entries for upcoming sound blaster driver 1993-10-09 17:00:04 +00:00
Jordan K. Hubbard
0aecb361f8 Add devsw entries for upcoming sound blaster driver. 1993-10-09 16:56:44 +00:00
David Greenman
89ccb410d4 Correct spelling of "SHMMAXPGS" so the config override will actually work. 1993-10-09 15:29:04 +00:00
Christoph Robitschko
950d93597c Changed the "Insert filesystem floppy" prompt to give the user a choice in
which drive he wants the root file system (A or B).
1993-10-09 08:31:39 +00:00
Jordan K. Hubbard
11851b0ee1 Removed FAT_CURSOR as default since it breaks certain CGA displays
and it is better to conform to the lowest common denominator.
Those wishing to retain it can always use options FAT_CURSOR in
their config files.
1993-10-08 21:21:59 +00:00
Rodney W. Grimes
09f07fb057 All:
Remove patch kit headers, and add $Id$
	This is mostly to align some more code with NetBSD.

cpu.h:
	Remove the old function vs. include configuration stuff that was
	ifdefed out when we went to inline functions.
	Remove the define of resettodr that made it a nop, there is
	already a function that makes it a nop, no need to #define one.
	Remove the #defines of processor types, they are now defined
	in cputypes.h, #include that file.
	Add struct cpu_nameclass for support of cpu types.

frame.h:
	include sys/signal.h, it will be needed in the future.
	put the sigframe structure here that was in machdep.c

pcb.h:
	Add multiple inclusion protection.
	Add pcb_ldt and pcb_ldt_len to pcb structure, this is for the
	user mode ldt.
1993-10-08 20:51:00 +00:00
Rodney W. Grimes
3409a2f663 All:
removed patch kit headers and sccsids, add $Id$.  This is a general
	clean up and reallignment with NetBSD-current where possible.

genassym.c:
	removed extranious include of reg.h
	removed old FP_* defines that have been ifdefed out since the patch kit
	removed PCB_SIGC that is not referenced anywhere
	add trapframe and sigframe defines
	add KERNBASE define for use in locore.s

locore.s:
	include npx.h and use NNPX for turning on and off FPU
	include machine/cputypes.h for the types of cpu (used in cpu_identify)
	change SYSPDREND to be one higher, this is really the base of the
	next area, and will be changing again next time I revise the file
	Reverse the NOP defines, you now get slow NOP's by default, this
	may be what is casuing us trouble with some systems.  If you want
	the NOPS to be null you now need to have options DUMMY_NOPS.
	Now get esym from the boot blocks which don't pass it yet, and
	it is not used, but this will be changing.
	Move the bit_colors stuff to be in with the rest of Bruces SHOW_A_LOT
	things for debugging.
	Added NetBSD's CPU type probe code, we now know what type of CPU
	we are running on.
	Adjust kernel pde calcuation to correct for change in SYSPDREND, no
	longer need the +1.

machdep.c
	include npx.h and use NNPX for turning on and off FPU
	include isa.h, map.h(new file), exec.h in preperation for
	changes that are still in process.
	Add some of the code for MACHINE_NONCONTIG that will alow us
	to better map around the BIOS memory area.
	Now print the version, cpu id, real memory and availiable memory
	during boot.
	Correct the calculation of bufpages, the code was mixing pages
	and bytes, it now does the right things.  Removed Bill's hack
	for limiting the erronous calculation.
	add the identifycpu print out code from NetBSD.
	remove the definition of the sigframe struct, it belongs in
	frame.h
	put in printf's about syncing disks on a halt/reboot.
	Change the halted message to be a little easier reading.
	Clean up of the dump messages, makes the source and the output
	much more readable.
	Change 0,0 in several places to have spaces after the commas.
1993-10-08 20:45:12 +00:00
Rodney W. Grimes
bb9b7f49b4 Remove the ``loader overlaps bss, kernel must bzero'' printf since that
is so often reported as an error condition when it is not.  We print the
size of things so for those who want to know if this happened they can
figure it out from the size information that is printed.
1993-10-08 20:19:23 +00:00
Rodney W. Grimes
f87a326945 >From NetBSD
Change the cpu "i386" line to 2 lines:
cpu "I386_CPU"
cpu "I486_CPU"
This is so we can do real CPU classification of code.

Fix missing depend for assym.s which does depend on genassym.c
1993-10-08 16:52:45 +00:00
Rodney W. Grimes
3225c4b443 Define the types of cpu's there are, from NetBSD 1993-10-08 13:40:54 +00:00
Rodney W. Grimes
c77ba36045 Fix definitions to be in terms of a minimum number of constants by
using the SHIFT value as the basis for the other values, for example
instead of:
#define		NBPG		4096
#define		PGSHIFT		12
use:
#define		PGSHIFT		12
#define		NBPG		(1 << PGSHIFT)

===================================================================
RCS file: /a/cvs/386BSD/src/sys/i386/include/param.h,v
retrieving revision 1.3
diff -c -r1.3 param.h
*** 1.3	1993/10/08 12:49:55
--- param.h	1993/10/08 12:53:19
***************
*** 52,76 ****
  #define ALIGNBYTES	(sizeof(int) - 1)
  #define ALIGN(p)	(((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)

- #define	NBPG		4096		/* bytes/page */
- #define	PGOFSET		(NBPG-1)	/* byte offset into page */
  #define	PGSHIFT		12		/* LOG2(NBPG) */
  #define	NPTEPG		(NBPG/(sizeof (struct pte)))

- #define NBPDR		(1024*NBPG)	/* bytes/page dir */
- #define	PDROFSET	(NBPDR-1)	/* byte offset into page dir */
  #define	PDRSHIFT	22		/* LOG2(NBPDR) */

  #define	KERNBASE	0xFE000000	/* start of kernel virtual */
  #define	BTOPKERNBASE	((u_long)KERNBASE >> PGSHIFT)

! #define	DEV_BSIZE	512
  #define	DEV_BSHIFT	9		/* log2(DEV_BSIZE) */
  #define BLKDEV_IOSIZE	2048
  #define	MAXPHYS		(64 * 1024)	/* max raw I/O transfer size */

- #define	CLSIZE		1
  #define	CLSIZELOG2	0

  /* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
  #define	SSIZE	1		/* initial stack size/NBPG */
--- 52,79 ----
  #define ALIGNBYTES	(sizeof(int) - 1)
  #define ALIGN(p)	(((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)

  #define	PGSHIFT		12		/* LOG2(NBPG) */
+ #define	NBPG		(1 << PGSHIFT)	/* bytes/page */
+ #define	PGOFSET		(NBPG-1)	/* byte offset into page */
  #define	NPTEPG		(NBPG/(sizeof (struct pte)))

  #define	PDRSHIFT	22		/* LOG2(NBPDR) */
+ #define NBPDR		(1 << PDRSHIFT)	/* bytes/page dir */
+ #define	PDROFSET	(NBPDR-1)	/* byte offset into page dir */

  #define	KERNBASE	0xFE000000	/* start of kernel virtual */
  #define	BTOPKERNBASE	((u_long)KERNBASE >> PGSHIFT)

! #define	KERNSIZE	0x00C00000	/* size of kernel virtual */
!
  #define	DEV_BSHIFT	9		/* log2(DEV_BSIZE) */
+ #define	DEV_BSIZE	(1 << DEV_BSHIFT)
+
  #define BLKDEV_IOSIZE	2048
  #define	MAXPHYS		(64 * 1024)	/* max raw I/O transfer size */

  #define	CLSIZELOG2	0
+ #define	CLSIZE		(1 << CLSIZELOG2)

  /* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
  #define	SSIZE	1		/* initial stack size/NBPG */
***************
*** 92,99 ****
  #ifndef	MCLSHIFT
  #define	MCLSHIFT	11		/* convert bytes to m_buf clusters */
  #endif	/* MCLSHIFT */
! #define	MCLBYTES	(1 << MCLSHIFT)	/* size of a m_buf cluster */
! #define	MCLOFSET	(MCLBYTES - 1)	/* offset within a m_buf cluster */

  #ifndef NMBCLUSTERS
  #ifdef GATEWAY
--- 95,102 ----
  #ifndef	MCLSHIFT
  #define	MCLSHIFT	11		/* convert bytes to m_buf clusters */
  #endif	/* MCLSHIFT */
! #define	MCLBYTES	(1 << MCLSHIFT)	/* size of an m_buf cluster */
! #define	MCLOFSET	(MCLBYTES - 1)	/* offset within an m_buf cluster */

  #ifndef NMBCLUSTERS
  #ifdef GATEWAY
1993-10-08 13:01:34 +00:00
Rodney W. Grimes
89ec6ec6bf Removed patch kit header. Cleaned up tabbing and removed extra blank
lines to match NetBSD.  Added $Id$.
Added MID_MACHINE from NetBSD.
Removed definition of DELAY() for non-kernel soures.
Fixed some small english errors that had been corrected in NetBSD.
File is now identical to NetBSD's, but will be changing soon for some
of my clean up work.
1993-10-08 12:49:55 +00:00
Rodney W. Grimes
f43bd59ec7 Architecture specific syscalls (i386) from NetBSD 1993-10-08 11:31:40 +00:00
Rodney W. Grimes
3331c2af28 Removed patch kit headers, and rcsid, add $Id$, relocate Terry Lamberts
copyright to match the location that it is in NetBSD.

Remove the __main() {} dummy function, it belongs in kern/init_main.c
1993-10-08 10:47:13 +00:00
Rodney W. Grimes
dd06619c32 From ljo:
machdep.o is a defined to be a target in 2 places.  This was caused by
the addition of the LOAD_ADDRESS stuff.  Removed the extranious target
of machdep.o.
1993-10-06 20:49:17 +00:00
Jordan K. Hubbard
bd41f6854b Latest changs for XFree86 2.0 1993-10-04 22:23:03 +00:00
Jordan K. Hubbard
0978d2b15f Latest changes for XFree86 2.0 1993-10-04 22:21:10 +00:00
Rodney W. Grimes
fac3d38c04 Fixed cd0 line to match the GENERIC* kernel configs 1993-10-01 04:26:21 +00:00
Rodney W. Grimes
1af37a7b59 Remove old ethernet drivers if_ec, if_ne, and if_we from config files
and from files.i386, they are no longer supported.
1993-10-01 04:20:19 +00:00
David Greenman
627d219551 * Revision 2.5 93/09/30 17:44:14 davidg
* patch from vak@zebub.msk.su (Serge V.Vakulenko) to work around
 * a hardware bug in cheap WD clone boards where the PROM checksum
 * byte is always zero
1993-10-01 00:56:43 +00:00
Rodney W. Grimes
60de6c38e0 New resting home for console.h, it is machine specific. 1993-10-01 00:00:43 +00:00
Rodney W. Grimes
380888c9fa Change #include <sys/console.h> to <machine/console.h>, file will be moved
shortly
1993-09-30 23:59:49 +00:00
Rodney W. Grimes
b145f751d3 This is a fix for the 32K DMA buffer region that was not accounted for,
it relocates it to be after the BIOS memory hole instead of right below
the 640K limit.
THANK YOU CHRIS!!!

From: <cgd@postgres.Berkeley.EDU>
Date: Wed, 29 Sep 93 18:49:58 -0700
basically, reserve a new 32k space right after firstaddr,
and put the buffer space there...

the diffs are below, and are in ~cgd/sys/i386/i386 (in machdep.c)
on freefall.  i obviously can't test them, so if some of you would
look the diffs over and try them out...
1993-09-30 23:16:17 +00:00
Rodney W. Grimes
ea3edf6db5 Remove we0, since it is being removed from the system 1993-09-30 20:45:37 +00:00
Rodney W. Grimes
71b9f75a78 Only configure one cd unit now since the code is fully dynamic,
add comment about this to the device cd0 line.
1993-09-30 20:44:32 +00:00
Rodney W. Grimes
982970298f >From: vak@zebub.msk.su (Serge V.Vakulenko)
Date: Thu, 30 Sep 1993 15:13:17 +0300

Description:
	Old wt driver is too incomplete and buggy.
	It does not support Archive controllers, BSD-like
	tape ioctls, multiple tape controllers, different
	tape density etc.
Fix:
	This driver is a replacement of the old one.
	It was not tested on different controllers, though.

	This is the streamer tape driver for 386bsd and FreeBSD,
	which supports Wangtek and Archive 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.
4) Asynchronous REWIND and FSF operations, close() will not wait
   until they finish.  The next open() will wait for it instead.
5) Use of WTQICMD ioctl is limited to ERASE and RETENS operations.
   This prevents the user from locking the tape driver by strange
   tape operations.
6) Tape density switching added.
7) 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

Block interface (writing blocks less than 2048 bytes) is not functioning
pwoperly.  Use raw interface instead.
1993-09-30 20:12:37 +00:00
David Greenman
2da38870a3 * Revision 2.4 93/09/29 21:24:30 davidg
* Added software NIC reset in NE probe to work around a problem
 * with some NE boards where the 8390 doesn't reset properly on
 * power-up. Remove initialization of IMR/ISR in the NE probe
 * because this is inherent in the reset.
1993-09-30 05:27:55 +00:00
David Greenman
e34ff1781d * Revision 2.3 93/09/29 15:10:16 davidg
* credit Charles Hannum
1993-09-29 22:15:53 +00:00
David Greenman
9699168bba * Revision 2.2 93/09/29 13:23:25 davidg
* added no multi-buffer override for 3c503
 *
 * Revision 2.1  93/09/29  12:32:12  davidg
 * changed multi-buffer count for 16bit 3c503's from 5 to 2 after
 * noticing that the transmitter becomes idle because of so many
 * packets to load.
 *
 * Revision 2.0  93/09/29  00:00:19  davidg
 * many changes, rewrites, additions, etc. Now supports the
 * NE1000, NE2000, WD8003, WD8013, 3C503, 16bit 3C503, and
 * a variety of similar clones. 16bit 3c503 now does multi
 * transmit buffers. Nearly every part of the driver has
 * changed in some way since rev 1.30.
1993-09-29 20:30:26 +00:00