Commit Graph

1040 Commits

Author SHA1 Message Date
David Greenman
426c995032 DOn't allow I/O register access in process 1 (oops). 1994-09-05 05:20:29 +00:00
David Greenman
654f13335e Improved some comments. 1994-09-04 23:10:27 +00:00
Paul Traina
c784172318 Detect if we're running on a Cyrix 486DLC and enable automatic cache
negation whenever we access memory between 640k and 1M.

Original code from NetBSD 1.0-BETA.  The exact origins are unclear but
Theo de Raadt, Charles, and Michael V. may have contributed to it.

Submitted by:	pst
1994-09-04 19:59:24 +00:00
David Greenman
7a5f7b0656 Rewrote last vestige of code that used gs (copyinstr). The use of gs in
this routine caused problems for machines that don't set it up properly
before boot (such was the case on an EVEREX machine sitting next to me).
1994-09-04 10:24:22 +00:00
David Greenman
9cbeeedde3 Added pmap_mapdev() function to map device memory. 1994-09-04 04:11:57 +00:00
David Greenman
5c06a7a368 Initialize eflags register - brought over from 1.1.5. 1994-09-04 00:33:00 +00:00
Geoff Rehmet
12365022c0 Make it possible to run lptcontrol on a printer port which does not
actually have a printer connected or online:
- MAKEDEV:		remove all signs of lpa
			add lpctl? devices (minor # = unit + 128)
- usr.sbin/Makefile	add lptcontrol
- sys/i386/isa/lpt.c	implement the LP_BYPASS flag: when a unit is
			opened with this flag set, the printer is
			not primed, and no check is made to see that
			the printer is online.  This can only be used
			to pass ioctls.  (giving us /dev/lpctl?)
- lptcontrol.c		use /dev/lpctl? (LP_BYPASS)
			-f flag removed, -u flag added
- lptcontrol.8		document changes in lptcontrol
			rewrite using mandoc macros
Submitted by:	Geoff.
1994-09-03 22:47:08 +00:00
Andreas Schulz
780f8a2611 Reviewed by:
Submitted by:
Update the if_ep driver for the 3C579 and bring over some of the
changes from the netbsd driver.
This is not complete: the detection of the irq in the eisa does not
work and sometimes the reset for the 3C509 in ISA in an EISA bus system
don't work ( Need a hard reset to be found again == reset knob).
1994-09-03 18:10:44 +00:00
Andrey A. Chernov
c4ff2eb1dd Newly implemented ioctls list:
DIOCGDINFO, DIOCGPART, DIOCWDINFO, DIOCSDINFO, CDIOCPLAYMSF, CDIOCRESET,
CDIOCEJECT.

CDIOCPLAYBLOCKS removed (old implementation completely wrong and I don't
know how to implement it correctly).

All routines now detects media change correctly.

DELAY_GETREPLAY increased for long time access from first track
to last.

mcd_waitrdy() now use MIN_DELAY=15 as minimal delay which independs
of machine speed.

mcd_doread() now uses real status (old code uses obsoleted soft copy of it).

clear XBSY on error in mcd_doread()

mcd_statrt(): add missing splx(s), cause dead hang with unmatched slpbio()

optimize mcd_doread(), don't set CD mode each time, keep soft copy of mode.

call getdisklabel() _after_ mcdsize() for proper sizes

mcdopen(): old code forget to set MCDREADRAW in flags when open RAW
partition, doread check it for setting RAW CD mode.

Do nothing on stray interrupt (which sometimes occurse, because driver
read data block too slow, DOS driver use 'insb' here). Old stray code
cause timeouts.

Read toc entries code rewritten to return many requested entries
(as supposed) instead of one entry with incorrect structure.

CMDREAD2 requests covered with disable_intr()/enable_intr()
(from DOS driver)

Read junk code added after read block code in doread (from DOS driver)

mcd_read_toc() code fixed to read all needed entries, old code cause
some audio tracks is not played.

mcd_playtracks() code fixed to proper check valid track range.

New binary read modes implemented (from DOS driver).
1994-09-03 16:48:13 +00:00
Geoff Rehmet
006e55746d make id_iobase an int - the change to a u_short broke lpt,
which uses port? (which results in id_iobase == -1)
Submitted by:	Geoff.
1994-09-03 16:03:09 +00:00
Andreas Schulz
7dfcb69ffc Reviewed by:
Submitted by:
Put the printf("can't map 3c507 ram.. into an ifdef DEBUG. This will
confuse only normal users and the ie0 found/not found is sufficient.
1994-09-02 23:23:57 +00:00
Andreas Schulz
3d76654d68 Reviewed by:
Submitted by:
1) if_ie.c:
	Changed a printf and put a space in it. Formerly the "<3C507>"
	confused the syslog. He tried to see that as the priority to
	log that message.

2) isa_device.h:
	Changed the iobase variable from short to u_short. EISA
	Adresses can go up to 0xf000 and the sign extension doesn't
	look good in the probe output. Example:
	ep1 at 0xffff8000-0xffff8000f is not good :-), i like more a
	ep1 at 0x8000-0x8000f.

3) isa.c:
	Changed a string constant from "probe" to "prob", it gets
	later already an "ed" tagged on the end.
1994-09-02 22:13:34 +00:00
Bruce Evans
86a8648eef Restore some explicit dependencies for locore.s so that "make clean; make"
works even if .depend doesn't exist.
1994-09-02 20:24:15 +00:00
Paul Richards
040071b276 Added entry for if_lnc.c, soon to be added new Lancef amily ethernet
driver.
Reviewed by:
Submitted by:
1994-09-02 15:49:48 +00:00
David Greenman
35aee0800d Converted P_LINK -> P_FORW, P_RLINK -> P_BACK, minor optimization. 1994-09-02 05:58:51 +00:00
David Greenman
2c7a40c7ca Removed all vestiges of tlbflush(). Replaced them with calls to pmap_update().
Made pmap_update an inline assembly function.
1994-09-02 04:12:26 +00:00
David Greenman
9ee9202471 It's not necessary to make page tables write-through, so get rid of this
(this was an experimental change which probably shouldn't have been
committed). I/O pages are still marked non-cacheable, however.
1994-09-02 01:29:20 +00:00
David Greenman
55020640dc Changed MAX to max. 1994-09-01 11:06:36 +00:00
David Greenman
e8fb0b2c17 Realtime priority scheduling support.
Submitted by:	Henrik Vestergaard Draboel
1994-09-01 05:12:53 +00:00
David Greenman
431be400a7 Got rid of some old, unused junk. 1994-09-01 03:16:40 +00:00
David Greenman
eb0c95a462 Got rid of redundant declaration, and changed IFF_LLC0 to IFF_LINK0. 1994-09-01 03:08:27 +00:00
David Greenman
9670686d24 Added ze driver (brought over from 1.1.5). 1994-09-01 02:21:20 +00:00
Stefan Eßer
e295ba7678 Submitted by: Stefan Esser <se@ZPR.Uni-Koeln.DE>
Added "device pci" and "device ncr" lines for a generic kernel with
support for the NCR 53c810 PCI SCSI host adapter (with no interrupts
configured, ie. working with 100Hz timer interrupts only).
1994-09-01 02:19:28 +00:00
Stefan Eßer
96a09a3064 Submitted by: Stefan Esser <se@ZPR.Uni-Koeln.DE>
Added entry for 'de' device in anticipation of Matt Thomas'
PCI Ethernet driver (required by the PCI autoconfig code).
1994-09-01 02:12:23 +00:00
Stefan Eßer
5ec480ad23 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Merged in changes required for NetBSD support (by mycroft@gnu.ai.mit.edu)
and support for multiple NCR chips.
1994-09-01 02:01:45 +00:00
Stefan Eßer
37bd2c9c33 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> + Stefan Esser <se>
Directory for PCI autoconfigure and device driver code.
1994-09-01 01:45:19 +00:00
Stefan Eßer
2c57cee563 Reviewed by:
Submitted by:
Added lines for 'pci' and 'ncr' devices (found under i386/pci).
1994-08-31 23:40:38 +00:00
Stefan Eßer
2b9fc9390f Reviewed by: Stefan Esser <se>
Submitted by:	Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Added PCI support (call of pci_config(), if NPCI > 0).
1994-08-31 23:36:56 +00:00
Stefan Eßer
fc37ed7ae1 Reviewed by: Stefan Esser <se>
Debugger() takes an (char*) argument, changed macro definition accordingly.
1994-08-31 23:32:32 +00:00
David Greenman
ac47fce534 Fixed bug that surfaced with last commit for NOBOUNCE -> BOUNCE_BUFFERS by
adding appropriate #ifdefs and changing some variables to externs (as they
should have always been).
1994-08-31 15:55:29 +00:00
David Greenman
b1c9b68c8e Conditionalized support for syscons as the console so that it can be
made optional in the kernel config file.

Submitted by:	John Hay
1994-08-31 07:44:22 +00:00
David Greenman
9aba88bf29 Rather than exclude bounce buffers support with NOBOUNCE, include it
with BOUNCE_BUFFERS. This is more intuitive, and is better for future
multiplatform support. Added BOUNCE_BUFFERS option to the GENERIC and
LINT kernel config files.
1994-08-31 06:17:49 +00:00
David Greenman
5d39db03f6 Whoops...clean up after me cleaning up after Bruce. 1994-08-30 20:11:40 +00:00
David Greenman
0711286530 Cleaned up after Bruce: there were still some things that included
com.h/lpa.h. Removed all vestiges of com/lpa out of conf.c and also
fixed up the end of cdevsw/bdevsw to have "no" routines instead of
a NULL pointer (suggested by someone a few weeks back).
1994-08-30 19:36:35 +00:00
David Greenman
694292e3df Moved gpl'd fpemul into 2.0 cvs tree. Changed it's location to
sys/gnu/i386/fpemul/.
1994-08-30 19:01:44 +00:00
Bruce Evans
8fdce837c3 Don't define LOCORE (as nothing) in sources. It is now defined
consistently (as 1) in Makefile.i386 for all assembler sources.
1994-08-30 17:19:10 +00:00
Bruce Evans
292cf0fd45 Add conf.c, machdep.c, exception,s, support.s and swtch.s so that config
will do most of the work for handling them.  Only one extra flag and one
bogus dependency was used for machdep.c and there was never anything
special about the others.

Add locore.s, but commented out.  It's still special.

Remove com.c and lpa.c.
1994-08-30 17:18:34 +00:00
Bruce Evans
0611064bd9 Remove exception.o, swtch.o, support.o, conf.o and machdep.o from
SYSTEM_OBS.  They are now normal objects.

Remove stale dependencies for the above now-normal objects and for
locore.o and generate dependencies using mkdep.  Config doesn't
generate lists of assembler source files so the lists to be mkdep'ed
have to be given explictly.  Only the standard *.s files are given,
so the dependencies for gnu/fpemul/*.s are incomplete.  *.S files
would be handled right if config put them in CFILES.

Don't define NPX.  It was replaced by NNPX > 0 years ago.

Define LOAD_ADDRESS in COPTS so that compiling machdep.c isn't a special
case.

Moving around the dependencies exposed a bug in make.  It doesn't
know that assym.s and ./assym.s are the same.  Add a rule tell it.
1994-08-30 17:17:49 +00:00
Andrey A. Chernov
b7a8860d88 Change WDRAW back to 3, too early step right now, disklabels needs more
work
Change hardcoded 'd' in printfs to 'a' + WDPART
1994-08-30 14:26:13 +00:00
Bruce Evans
2c22dd40a2 Conditionalize support for my debugger. This normally saves 304 bytes. 1994-08-30 01:38:04 +00:00
Andrey A. Chernov
0e91a83462 Fake floppy partition RAW_PART=2 now 1994-08-29 21:47:11 +00:00
Andrey A. Chernov
8a1d40881d Now WDRAW=2 1994-08-29 21:35:16 +00:00
Andrey A. Chernov
b2be795bf2 Use RAW_PART=2 to trick diskerr 1994-08-29 21:32:31 +00:00
Andrey A. Chernov
3b2dc1fcd6 Raw partition is 2 now 1994-08-29 21:19:27 +00:00
Andrey A. Chernov
67f5dcad6b Bruce was right, stupid device returns non-busy state too early,
add only one DELAY(10) after inb(non_busy) now
1994-08-28 20:37:59 +00:00
Bruce Evans
406d45e059 Don't test if a u_int is < 0. The remaining test is sufficient and the
extra one caused a warning.
1994-08-28 16:16:33 +00:00
Bruce Evans
8a3a52aaa1 Update declarations for timeout stuff the same as for the other SCSI
drivers.
1994-08-28 16:08:51 +00:00
David Greenman
f1a9c71596 Made a little more up to date. 1994-08-28 06:46:25 +00:00
David Greenman
d5e4441ddd Updated this a bit. It's still woefully out of date. 1994-08-27 16:23:03 +00:00
David Greenman
8a129caed5 1) Changed ddb into a option rather than a pseudo-device (use options DDB
in your kernel config now).
2) Added ps ddb function from 1.1.5. Cleaned it up a bit and moved into its
   own file.
3) Added \r handing in db_printf.
4) Added missing memory usage stats to statclock().
5) Added dummy function to pseudo_set so it will be emitted if there
   are no other pseudo declarations.
1994-08-27 16:14:39 +00:00
Andrey A. Chernov
de662aeac4 Continue previous fix:
Add MIN_DELAY definition instead of hard-coded 10
1994-08-27 15:28:34 +00:00
Andrey A. Chernov
e84e5d655f 1) Raw partition number was incorrectly 0, changed to 3
2) DELAY(1) does nothing, it affects audio playing f.e:
driver can't play second half of disk, changed to DELAY(10)
3) Debugging messages #ifdef DEBUGed
1994-08-27 13:15:25 +00:00
Garrett Wollman
293c5accf0 Add Charles Martin Hannum to copyright notice so he can stop whining and
find something useful to do other than taking credit for other people's
work.  Also make the 3C507 bits match the indentation style of the rest of
the code.
1994-08-25 20:16:59 +00:00
Bruce Evans
3e0a35fee4 Updated to final 1.1.5 version (revision 1.56).
Merged changes from 2.0 version (revisions 1.46-1.50) by hand.

Finished conversion to clists: removed flush of tty output buffer
in comflush() (most writes were truncated to 256 bytes) and restored
bypass of ttyinput() in siopoll().

Finished conversion to 2.0 types - more void *'s, less caddr_t's,
less casts, no Dev_t's.

Only these things are seriously broken now compared with 1.1.5:
waiting for output complete is impossible so ttywait() can deadlock;
sioclose() isn't called enough so sioopen() sometimes returns EBUSY
unnecessarily; input flow control is not implemented.
1994-08-25 10:15:28 +00:00
Andreas Schulz
a5585c6fbd Reviewed by:
Submitted by:
Add the elink.c file to the necessary modules for the ie and ep driver.
1994-08-24 22:37:56 +00:00
Andreas Schulz
411c7a8786 Reviewed by:
Submitted by:
Add the 3com 3C507 card to the if_ie.c driver. The files elink.c and
elink.h are helding routines that are shared between the 3C507 and the
3C509/3C579. if_ie507.h are constant declarations unique to the 3C507.
The code is based on the NetBSD driver if_ie.c donated to NetBSD by
Rafal Boni and then modified by Charles Hannum.
1994-08-24 22:32:44 +00:00
Søren Schmidt
f3f0ca6051 Changes preparing for iBCS support
Reviewed by:
Submitted by:
1994-08-24 11:52:21 +00:00
Søren Schmidt
25ae122558 Changes preparing for iBCS2 support
Reviewed by:
Submitted by:
1994-08-24 11:45:19 +00:00
Søren Schmidt
c085674216 Added iBCS2 files
Reviewed by:
Submitted by:
1994-08-24 11:44:45 +00:00
David Greenman
329b62ac1c Corrected some comments regarding ptes/pdes. 1994-08-23 16:27:15 +00:00
Paul Richards
d184e84f7e Re-enabled inlining of inb.
Changed u_int_inb to just inb and deleted define.

The code generated is identical to that generated with the cast so
the problem was obviously fixed at some point after gcc 1.4

Reviewed by:
Submitted by:
1994-08-23 13:41:37 +00:00
Paul Richards
bffa0592e2 I've disabled this piece of code since it's what's
hosing syscons. Doesn anyone know anything about this
or can we just delete it now?

/*
 * This roundabout method of returning a u_char helps stop gcc-1.40 from
 * generating unnecessary movzbl's.
 */
#ifdef disable_for_gcc-2_6_0
#define inb(port)       ((u_char) u_int_inb(port))
#endif

static inline u_int
u_int_inb(u_int port)
{
        u_char  data;
        /*
         * We use %%dx and not %1 here because i/o is done at %dx and
not at
         * %edx, while gcc-2.2.2 generates inferior code (movw instead
of movl)
         * if we tell it to load (u_short) port.
         */
        __asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port));
        return data;
}

Reviewed by:
Submitted by:
1994-08-23 11:57:19 +00:00
Jordan K. Hubbard
d42826b436 I was in bourne-shell mode when I wrote this.. *blush*.
Submitted by:	jkh
1994-08-23 09:54:22 +00:00
Paul Richards
d091793974 Ran ft.c through ident.
Added a missing #ifdef INET wrapper in lpt.c

Main change:
	Removed the timeout_func_t casts from timeout calls and
	correctly defined the timeout routines to conform to
	the new format.
lpt.c doesn't have this change.

Reviewed by:
Submitted by:
1994-08-23 07:52:29 +00:00
Jordan K. Hubbard
84fb67c981 Fix the libkern references to hopefully DTRT. See comments regarding
a slight change in how profiled version is selected - may need to adjust
some .mk macros if PROF is foolishly initialized anywhere to a null value.
Submitted by:	jkh
1994-08-23 04:21:21 +00:00
Bruce Evans
f0b544e99e Restore the intr_* array variables that were removed in the previous
revision.  They caused redundant redeclaration warnings because I
forgot to declare them as extern and gcc-2.6.0 treats "extern int x[];"
slightly different from "int x[];" (this is probably a bug).  The new
versions will cause RR warnings from gcc-2.4.5 because it does not
understand that the second declaration in "extern int x[]; int x[1];"
is not redundant.  The variables don't actually need to be declared
in a header file because they are used in only one C source file and
one assembler source file, but I want all public variables and
comments about them to be findable by grepping *.h.
1994-08-22 15:58:40 +00:00
Bruce Evans
1353e8ff44 Pad `_cpu_vendor' to finish on a 32-bit boundary so that most of the
locore globals aren't misaligned.
1994-08-22 14:28:57 +00:00
Søren Schmidt
5d39245780 modified include stucture to 2.0 style.
Reviewed by:
Submitted by:
1994-08-22 11:11:05 +00:00
David Greenman
f85b3e8c21 Fixed minor typo in diagnostic message. 1994-08-22 08:21:51 +00:00
Paul Richards
89ebd8383e Added (timeout_func_t) casts to timeout/utimeoute calls.
Reviewed by:
Submitted by:
1994-08-21 20:16:14 +00:00
Paul Richards
c4350ddb46 Removed disk type from disklabel lines, not needed for installing
bootblocks.

Reviewed by:
Submitted by:
1994-08-21 18:15:45 +00:00
Paul Richards
b95ed23990 Fixed bootblocks to work with FreeBSD 2.0
1) Fixed up some header locations
2) Replaced list of boot files with /kernel
3) Changed disklabel use in Makefile to conform to 4.4
4) Added size command in Makefile to get close estimate of bootblock
   sizes. Total size of text and data must be below 64K, slightly
   overestimated since a.out header subsequently gets stripped.
5) Various buffer sizes are set to 8192 bytes in sys.c. In 4.4 MAXBSIZE
   is set to 64K which is too big for the bootblocks to deal with.

Submitted by:	Paul Richards
1994-08-21 17:47:26 +00:00
Paul Richards
836dc83b6a Made idempotent.
Reviewed by:
Submitted by:
1994-08-21 04:55:31 +00:00
David Greenman
e0e9c42112 Implemented filesystem clean bit via:
machdep.c:
	Changed printf's a little and call vfs_unmountall() if the sync was
	successful.

cd9660_vfsops.c, ffs_vfsops.c, nfs_vfsops.c, lfs_vfsops.c:
	Allow dismount of root FS. It is now disallowed at a higher level.

vfs_conf.c:
	Removed unused rootfs global.

vfs_subr.c:
	Added new routines vfs_unmountall and vfs_unmountroot. Filesystems
	are now dismounted if the machine is properly rebooted.

ffs_vfsops.c:
	Toggle clean bit at the appropriate places. Print warning if an
	unclean FS is mounted.

ffs_vfsops.c, lfs_vfsops.c:
	Fix bug in selecting proper flags for VOP_CLOSE().

vfs_syscalls.c:
	Disallow dismounting root FS via umount syscall.
1994-08-20 16:03:26 +00:00
David Greenman
7b42c960f8 1) cleaned up after Garrett - fixed more redundant declarations, changed
use of timeout_t -> timeout_func_t in aha1542 and aha1742 drivers.
2) fix a bug in the portalfs that was uncovered by better prototyping -
   specifically, the time must be converted from timeval to timespec
   before storing in va_atime.
3) fixed/added some miscellaneous prototypes
1994-08-20 03:49:02 +00:00
David Greenman
27774cbbf4 Removed bogus save of CMAP2. 1994-08-19 22:49:42 +00:00
Andreas Schulz
a41bb423b1 Reviewed by:
Corrected a little typo in a comment.
Throw out the typedef timeout_t with an ifdef __FreeBSD__, it is already
defined in sys/systm.h .
1994-08-19 21:02:05 +00:00
David Greenman
3edb235c09 Terry Lambert's loadable kernel module support w/improvements from the
NetBSD group.
1994-08-19 11:45:29 +00:00
Jordan K. Hubbard
6605d9f3db 1. Make this idempotent.
2. Hack.

	Hack is to define RCSID() to null macro so that new msun stuff
	will compile.  This does NOT belong here, and I DON'T want it to
	stay, I just need to put this here for now to enable msun and we need
	to talk about what our RCSID story is supposed to be.  We talked about
	supporting RCSID() one day, and everyone seemed to like the idea
	reasonably well of making it a macro you could just no-op this way,
	but we never did anything.  Now I see that JTCs code has it and I'm
	loath to remove it or do anything until we've discussed it some more.

	Well, so how about it?  What's our story vis-a-vis RCSID() going to
	be?

Submitted by:	jkh
1994-08-19 11:20:11 +00:00
Jordan K. Hubbard
c6866b514f Smash together Poul-Henning's, Garrett's and Steve Gerakines 24f changes
into one, hopefully functioning, Ultrastore driver.  Any Ultrastore owners
out there - please speak up!  We need to test this puppy.
Reviewed by:
Submitted by:
1994-08-19 00:32:52 +00:00
Poul-Henning Kamp
e9d1679134 Added my ProAudioSpectum SCSI driver for cards with the 5380 SCSI-chip.
This is the slowest and most stupid of our SCSI-drivers, but it is there
and it works.  It has been tested with CD-ROM and disk.
It uses no interrupts, no DMA, just polled I/0.
Transfer-rate is <= 100Kbyte/sec.
If you set the jumpers on the board, you can change the unit-number and
you will be able to have four of these co-exist in one computer, why one
would do that is somewhat unclear though.
If I ever get my hand on the docs for this, I will improve it of course,
but for now we can install and access those CD-ROMs.
1994-08-19 00:01:08 +00:00
Poul-Henning Kamp
11a9e878f3 Added {} around two initializers for spare[2] in some structs. This calms
down -Wall a little bit.
1994-08-18 23:36:40 +00:00
Garrett Wollman
f23b4c91c4 Fix up some sloppy coding practices:
- Delete redundant declarations.
- Add -Wredundant-declarations to Makefile.i386 so they don't come back.
- Delete sloppy COMMON-style declarations of uninitialized data in
  header files.
- Add a few prototypes.
- Clean up warnings resulting from the above.

NB: ioconf.c will still generate a redundant-declaration warning, which
is unavoidable unless somebody volunteers to make `config' smarter.
1994-08-18 22:36:09 +00:00
David Greenman
8912c0ed61 Bruce Evans' dynamic interrupt support.
/usr/src/sys/i386/isa/clock.c:
	o Garrett's statclock changes.
	o Wire xxxintr, not Vclk.
	o Wire using register_intr(), not setidt().

/usr/src/sys/i386/isa/icu.s:
	o Garrett's statclock changes.
	o Removed unused variable high_imask.
	o Fake int 8 for rtc as well as int 0 for clk.  Required for kernel
	  profiling with statclock, harmless otherwise.

/usr/src/sys/i386/isa/isa.c:
	o Allow isdp->id_irq and other things in *isdp to be changed by
	  probes.  Changing interrupts later requires direct calls to
	  register_intr() and unregister_intr() and more care.
	  ALLOW_CONFLICT_* is brought over from 1.1.5, except
	  ALLOW_CONFLICT_IRQ is not supported.  IRQ conflict checking is
	  delayed until after probing so that drivers can change the IRQ
	  to a free one; real conflicts require more cooperation between
	  drivers to handle.
	o Too many details to list.
	o This file requires splitting and a lot more work.

/usr/src/sys/i386/isa/isa_device.h:
	o Declare more things more completely.

/usr/src/sys/i386/isa/sio.c:
	o Prepare to register interrupt handlers as fast.

/usr/src/sys/i386/isa/vector.s:
	o Generate entry code for 16 fast interrupt handlers and 16 normal
	  interrupt handlers.  Changed some constants to variables:
	  # $unit is now intr_unit[intr].  Type is int.  Someday it should
	    be a cookie suitable for the handler (e.g., a struct com_s for
	    sio).
	  # $handler is now intr_handler[intr].
	  # intrcnt_actv[id_num] is now *intr_countp[intr].  The indirection
	    is required to get a contiguous range of counters for vmstat
	    and so that the drivers depend more in the driver than on the
	    interrupt number (drivers could take turns using an interrupt
	    and the counts would remain correct).  There is a separate
	    counter for each device and for each stray interrupt.  In
	    1.1.5, stray interrupt 7 clobbers the count for device 7 or
	    something worse if there is no device 7 :-(.
	  # mask is now intr_mask[intr] (was already indirect).
	 o Entry points are now _XintrI and _XfastintrI (I = intr = 0-15),
	   not _VdevU (U = unit).
	 o Removed BUILD_VECTORS stuff.  There's a trace of it left for
	   the string table for vmstat but config now generates the
	   string in one piece because nothing more is required.
	 o Removed old handling of stray interrupts and older comments
	   about it.

Submitted by:	 Bruce Evans
1994-08-18 05:09:36 +00:00
Søren Schmidt
49e3cd80ee Oops, changed order of include lines...
Reviewed by:
Submitted by:
1994-08-17 19:32:23 +00:00
Søren Schmidt
529f6e548c Updated to latest 1.1.5.1+ version
Reviewed by:
Submitted by:
1994-08-17 08:51:59 +00:00
Søren Schmidt
8c7004b6d4 Updated to latest version from 1.1.5.1+
Reviewed by:
Submitted by:
1994-08-17 08:51:10 +00:00
Garrett Wollman
0254742789 Add option KBD_RESET_FAIL_OK so that GCC 2.6 doesn't break my
console.
1994-08-15 22:41:33 +00:00
Garrett Wollman
8ea838500f Enable use of the RTC chip for the statistical clock. While this does
not provide the full accuracy of a randomized statistical clock, it does
provide greater accuracy than the previous method, while not significantly
increasing overhead.  It also provides profiling support at 1024 Hz.

You must re-compile config before making a new kernel, or you will end
up with unresolved symbols.

Reviewed uy:	Bruce evans said it worked for him.
1994-08-15 03:15:20 +00:00
Andreas Schulz
021d975d03 Submitted by: Bruce Evans
Delete the ifdef GPL_EMULATE case here and made the padding work for
both types of emulators so that there is no longer a need to compile
ps and friends new if you are using the GPL math emulator instead the
normal one.
1994-08-14 23:32:45 +00:00
Andreas Schulz
5e687d014e Reviewed by:
Added code to check for an adaptec 1542B Version 3.20 Board. This was the
first board that supports >1Gb drives and has the extended bios. So we
need also to disable the exbios like it is done for the 1542C/CF boards.
1994-08-14 21:06:00 +00:00
Paul Richards
be89b92c7b Changed the include <sound/ulaw.h> to be <i386/isa/sound/ulaw.h> so
it compiles.

Reviewed by:
Submitted by:	Paul Richards
1994-08-14 01:52:02 +00:00
Poul-Henning Kamp
063ea59ae1 The tcp/ip interfaces needed longer timeouts, works fine under 2.0. 1994-08-14 01:46:28 +00:00
Garrett Wollman
502bf5ce55 Fix conditional-compilation mixup, pointed out by Paul Richards. 1994-08-13 17:45:09 +00:00
David Greenman
0e42760866 Made the kernel compile cleanly with gcc 2.6.0. Thanks go to Bruce
Evans for suggesting a method to detect various versions of gcc.
1994-08-13 14:21:58 +00:00
Garrett Wollman
f540b1065a Change all #includes to follow the current Berkeley style. Some of these
``changes'' are actually not changes at all, but CVS sometimes has trouble
telling the difference.

This also includes support for second-directory compiles.  This is not
quite complete yet, as `config' doesn't yet do the right thing.  You can
still make it work trivially, however, by doing the following:

rm /sys/compile
mkdir /usr/obj/sys/compile
ln -s M-. /sys/compile
cd /sys/i386/conf
config MYKERNEL
cd ../../compile/MYKERNEL
ln -s /sys @
rm machine
ln -s @/i386/include machine
make depend
make
1994-08-13 03:50:34 +00:00
Poul-Henning Kamp
24420201d8 Submitted by: Poul-Henning Kamp <phk@login.dkuug.dk>
Added my if_lp TCP/IP driver to lpt.c.
I have (surprise) not been able to test it on a 2.0 machine yet.  Connect the
machines with a parallel "lap-link" cable, and get rates from 35 kbyte/sec
up to 75 kbyte/sec.  (when ftp'ing foo: dev/zero -> bar:/dev/null).

The same lpt.c file should compile under 1.1.5.1 without problems.

I think we should promote this feature when we dump 2.0 on the expectant
public, because it provides a cheap and efficient way to move data to and
from notebooks &c.  It is not a replacement for ethernet, but a cheap
substitute sometimes.
1994-08-13 00:37:03 +00:00
David Greenman
58eaed35cf Added conditionals to make this compile cleanly in FreeBSD 2.0. 1994-08-12 11:42:37 +00:00
David Greenman
7952584606 New ethernet device driver from Matt Thomas:
This driver supports all the DEC EtherWORKS III NICs (DE203, DE204,
and DE205) and the later DEC EtherWORKS II NICs (DE200, DE201, DE202,
DE422).  DEPCA-style boards prior to the DE200 have not been tested
and may not work.

Submitted by:	Matt Thomas (thomas@lkg.dec.com)
1994-08-12 06:51:12 +00:00
David Greenman
bd1671dc28 Removed some unnecessary code that sets the link layer address. This should
be removed from the other drivers, too, as it is already done at a higher level
in the kernel.
1994-08-12 06:36:51 +00:00
David Greenman
6979fee553 Add missing ifr variable declaration that I forgot when adding MTU
ioctl support.
1994-08-12 06:06:19 +00:00
Jordan K. Hubbard
f9f0c18d31 Change outb() as per Bruce's instructions so that it doesn't explicitly
try to pass its argument in the ax register.
Reviewed by:
Submitted by:
1994-08-11 02:26:08 +00:00
Garrett Wollman
fba73571bd For Pentium machines, use a faster version of microtime with 8 usec
resolution (can probably be improved somewhat).  Other machines take
a three-instruction hit if I586_CPU is defined, none otherwise.
1994-08-11 00:28:24 +00:00
Garrett Wollman
a4f90f4d45 Tell Pentium users their CPU speed. (More changes to make use of this
to come later.)
1994-08-10 23:28:33 +00:00
Garrett Wollman
5c8b38d41d Handle NMI's in accordance with data in van Gilluwe book. 1994-08-10 04:39:52 +00:00
Garrett Wollman
2e0cc1821d Some programs (like GNU configure programs) depend on the output of
`uname -s' to be something reasonable (traditionally, `i386') rather
than `PC-Class'.  Make it so.
1994-08-10 03:53:33 +00:00
Garrett Wollman
29c0a86011 Add back in CPU detection copde from 1.1.5. As an added bonus, the
hw.model MIB variable is now declared correctly.
1994-08-10 03:51:18 +00:00
Jordan K. Hubbard
52cd438439 Merge in the necessary bits from 1.1.5.1 to make exec.h and reloc.h
happy campers again (e.g. match our own exec format).  This should
make ld happy.
Submitted by:	jkh
1994-08-09 14:39:57 +00:00
David Greenman
95b671fc95 Removed ntohl and ntohs functions. These were already inlined assembly in
endian.h.
1994-08-09 11:21:44 +00:00
David Greenman
e9b3179b97 Added various filesystems and multicast support options. Removed my
personal config file now that the GENERIC ones provide an adequate
template.
1994-08-09 08:17:09 +00:00
Jordan K. Hubbard
3578b06c6a Fix a compilation-stopping typo; whoops, David - more sleep! :-)
Submitted by:	jkh
1994-08-08 16:45:11 +00:00
David Greenman
e80859e4d6 Last commit for this file should have read:
Reduced maximum transfer size by one to allow for catching a too large
condition correctly. Do single block I/O if the size is too large.

Submitted by:	Bruce Evans
1994-08-08 13:56:46 +00:00
David Greenman
7d7bb69d41 Detect the "EOF" condition. Specifically, end of partition.
Submitted by:	Bruce Evans
1994-08-08 13:53:55 +00:00
David Greenman
8867d2f19c Added support for SIOCSIFMTU. 1994-08-08 13:33:16 +00:00
David Greenman
90fd8c3866 Added ioctl support for SIOCSIFMTU. 1994-08-08 12:09:04 +00:00
David Greenman
f847d045bf Take out multicast support for the moment. 1994-08-08 09:14:37 +00:00
David Greenman
8339815ff9 Made pmap_kenter "TLB safe". ...and then removed all the pmap_updates that
are no longer needed because of this.
1994-08-07 14:53:27 +00:00
David Greenman
a481f20029 Provide support for upcoming merged VM/buffer cache, and fixed a few bugs
that haven't appeared to manifest themselves (yet).

Submitted by:	John Dyson
1994-08-07 13:10:43 +00:00
David Greenman
c564966bf0 Don't kremove process VM pages (oops!). This was the cause of the instability
that was introduced last night.

Submitted by:	 John Dyson
1994-08-07 03:31:52 +00:00
David Greenman
539d9ba017 Don't strip the kernel. 1994-08-06 10:52:15 +00:00
David Greenman
c87801fe54 Fixed various prototype problems with the pmap functions and the subsequent
problems that fixing them caused.
1994-08-06 10:25:50 +00:00
David Greenman
ae92ea446f Incorporated 1.1.5 improvements to the bounce buffer code (i.e. make it
actually work), and additionally improved it's performance via new pmap
routines and "pbuf" allocation policy.

Submitted by:	John Dyson
1994-08-06 09:20:56 +00:00
David Greenman
ed3f895438 Made the tmpstk start at tmpstk. Not doing so causes problems for the
debugger.

Submitted by:	John Dyson
1994-08-06 09:17:44 +00:00
David Greenman
16f62314cd Incorporated post 1.1.5 work from John Dyson. This includes performance
improvements via the new routines pmap_qenter/pmap_qremove and pmap_kenter/
pmap_kremove. These routine allow fast mapping of pages for those
architectures that have "normal" MMUs. Also included is a fix to the
pageout daemon to properly check a queue end condition.

Submitted by:	John Dyson
1994-08-06 09:15:42 +00:00
David Greenman
ee4834308a Added my own kernel configuration file. This can be used as a place to
start for people trying to get 2.0 running.
1994-08-06 06:36:55 +00:00
Garrett Wollman
f5c789f5a9 Delete redundant #ifdef __i386__, be consistent about idempotency
protection.

Submitted by:	Bruce Evans
1994-08-05 14:36:04 +00:00
David Greenman
86cadec5dc Added assembly versions of ffs() and bcmp(). 1994-08-04 19:51:01 +00:00
David Greenman
ee06dc6013 Inlined insque and remque. 1994-08-04 19:46:57 +00:00
Garrett Wollman
50f44fa07d Move ieeefp.h over, and put it in the correct subdirectory this time.
Submitted by:	Andrew Moore
1994-08-04 19:16:37 +00:00
David Greenman
0f8a0292a2 Updated to include improvements from FreeBSD 1.1.5. Fixed brokeness
with multicast support and BPF.
1994-08-04 17:42:35 +00:00
David Greenman
15e1ca20e4 Nuked #if 0'd _insque and _remque routines - they are now inlined in
cpufunc.h.
1994-08-04 06:10:27 +00:00
David Greenman
d23d07ef95 Merged in post-1.1.5 work done by myself and John Dyson. This includes:
me:
1) TLB flush optimization that effectively eliminates half of all of the
   TLB flushes. This works by only flushing the TLB when a page is "present"
   in memory (i.e. the valid bit is set in the page table entry). See section
   5.3.5 of the Intel 386 Programmer's Reference Manual.
2) The handling of "CMAP" has been improved to catch attempts at multiple
   simultaneous use.

John:
1) Added pmap_qenter/pmap_qremove functions for fast mapping of pages into
   the kernel. This is for future optimizations and support for the upcoming
   merged VM/buffer cache.

Reviewed by:	John Dyson
1994-08-03 02:45:30 +00:00
David Greenman
3c4dd3568f Added $Id$ 1994-08-02 07:55:43 +00:00
David Greenman
03e6c2532f Removed all code related to the pagescan daemon, and changed 'act_count'
adjustments to compensate for a world without the pagescan daemon.
1994-08-01 11:25:45 +00:00
David Greenman
a445481c3e Fixed a bug that was introduced in the conversion from 1.1.5 to 2.0. 1994-08-01 10:38:19 +00:00
David Greenman
5c877c740d Removed pager declarations. They are NOT optional, and don't need to be
declared.
1994-07-28 05:53:44 +00:00
Jordan K. Hubbard
1c28e35f68 Commit a whole cluster of last minute critical (and one cosmetic) fixes
from David Greenman, Bruce Evans and Julian Elischer.

They are:

[vnode pager - David/Bruce]:
  The following patch fixes a problem where some data could be lost in a
delayed-write buffer if the cached buffer was larger than a page. This fix was
provided by Bruce Evans and modified slightly by me.

[st.c - Julian]:
  My fix for "bad request, must be between 0 and 0"

RTFS if you're interested).

[gnu/fpemul - David/Bruce]:
  These changes fix single stepping of emulated FPU instructions.
Previously, the instruction after an emulated instruction was
executed without causing a SIGTRAP ...

The also fix the initial control word being different for the
GPL emulator (it is still wrong for the old emulator) and remove
an unnecessary panic when emulation is not configured (I hope at
least init, sh and reboot will run without floating point.  I
remember only df and mkfs being broken by the lack of FP in 0.0).

[Various fixes described below - Bruce/David]:
sys/i386/boot/boot2.S:
        Yet another attempt to propagate the correct fix for 16 vs
        32-bit mode bugs.  [verified]

sys/i386/i386/db_interface.c:
        Protect against reentering Debugger().

sys/kern/kern_time.c:
        Don't allow 'time.tv_usec == 0' except at clock interrupts.

sys/pcfs/pcfs_fat.c:
        Make it compile without -O.

sys/scsi/sd.c:
        Fix as posted to some freebsd mailing list.
        (changes the order of the assignment of "sectors" because it earlier
          value is needed first -DG)

sys/vm/vm_glue.c:
        Fix stale comments and verbose code.

sys/vm/vm_mmap.c
        Fix off by 1 errors and verbose code.

[From Nate - cosmetic but non-intrusive and useful enough to go in]
sys/i386/isa/isa.c:
Appended you'll find a patch to the NMI error log routine in isa/isa.c.
The below patch just adds some additional information when an NMI occurs
which can help debug the hardware problem.
1994-06-22 05:52:25 +00:00
Jordan K. Hubbard
2e2df8360c Make BOOTWAIT a truly tunable parameter. It was hard-set before. 1994-06-20 04:32:40 +00:00
Jordan K. Hubbard
775985234f This is the IBM/National PCMCIA ethernet driver from Keith Moore,
based originally on work by David Greenman and adapted to FreeBSD
(and cleaned up a bit) by myself.  It supports the IBM Credit Card
Adapter for the IBM Thinkpad, and I've had no trouble making it work
on my Toshiba T1910 with a National `InfoMover' NE4100 PCMCIA ethernet
card (I'm commiting this message through it right now :-).

This is actually sneaking it in after feature-freeze, but it's just
too useful to pass up!  As always, necessity is a mother.
1994-06-16 05:32:10 +00:00
Adam David
3f9e73d24f Changed delay mechanism to rely more on I/O spinning. If spinning on the
like this is bad news, it will have to be revised.
Shortened some verbose messages for when the kernel is loaded below 640k.
Updated version number.
1994-06-16 03:53:29 +00:00
Jordan K. Hubbard
f4c5931839 From Hellmuth Michaelis, reviewed by Bruce Evans: This enables
the keyboard clock rather than incorrectly disabling it.
1994-06-15 19:09:14 +00:00
Adam David
f675355835 make BOOTWAIT loopcount parameter available for tuning.
This changes nothing unless f.e. -DBOOTWAIT=0 or -DBOOTWAIT=640000 is used
1994-06-15 18:15:17 +00:00
Rodney W. Grimes
f2009cbfdb Touch the $Revision$ string to cause a cvs revision update of the boot
code (ie, should now print Revision 1.13).
1994-06-14 07:31:42 +00:00
Jordan K. Hubbard
ac9326b3cc Be paranoid about setting of %dl register for braindead BIOS's,
initializing it to 0 in the floppy boot case.  This allows my Toshiba
1910 laptop to finally boot, and may help out other machines cursed
with early Phoenix BIOS's as well.
1994-06-13 19:27:52 +00:00
David Greenman
600f527fc6 Fix from Bruce Evans:
Set npx_exists = 0 in the case of broken error reporting.
1994-06-11 05:17:15 +00:00
David Greenman
8c481329f7 Fixed minor spelling error. 1994-06-11 05:13:33 +00:00
David Greenman
e2a2a04ad3 Bruce found a bug in my changes to stop using the gs selector.
From Bruce Evans:

fu[i]byte() checked the wrong register.  This caused interesting behaviour
in the GPL math emulator.  The emulator does not check the values returned
by fu*() or su*() (:-() and it interpreted the address of -12(%ebp) as
-1(%ebp).  The same probably occurs for all signed 8-bit offsets from
registers.

I cleaned up the new bzero() a bit.
1994-06-11 05:12:15 +00:00
David Greenman
667f0edb2b Added some missing cld's (OOPS!) and changed the position of some of
the others to make them easier to spot.
1994-06-06 15:08:51 +00:00
David Greenman
3c256f5395 trap.c:
Vastly improved trap.c from me. This rewritten version has a variety of
features, amoung them: higher performance and much higher code quality.

support.s, cpufunc.h:
No longer use gs override to enforce range limits - compare directly
against VM_MAXUSER_ADDRESS instead. The old way caused problems in
preserving the gs selector...and this method is just as fast or faster.
1994-06-06 14:54:41 +00:00
David Greenman
2e4fabc7c7 Back out previous change for the moment - I need to commit some other
changes first.
1994-06-06 14:23:49 +00:00
David Greenman
baa2452312 Added some missing cld's (OOPS!) and changed the position of some of
the others to make them easier to spot.
1994-06-06 14:12:50 +00:00
David Greenman
8b7da9b52b Removed extra (bogus) declaration of Xrsvd14 that was confusing me. 1994-06-04 11:01:15 +00:00
Jordan K. Hubbard
9727866aa8 This should fix up the absolute paths to /usr/mdec - just prepended
${DESTDIR} to all the right places (any reason why not?).
1994-06-02 16:50:56 +00:00
Andrey A. Chernov
03afa5ecd8 Make bootblocks fit into 7168 limit 1994-05-30 05:23:53 +00:00
Rodney W. Grimes
fb49e767ba Cast arguments to timeout() to quite compiler warnings. Should we
change all of these to be timeout_funt_t and remove the casts and
typedef?

Remove secound argument (uban) from ifp->if_reset routines since it is now
obsolete.

Reviewed by:	David Greenman
1994-05-27 04:02:10 +00:00
Rodney W. Grimes
c7cb9b9654 SYSCONS is no longer needed since pccons has been removed.
Update the GENERIC* to have the new file system options and the new kernel
name.

Fix the clean target in Makefile.i386 to rm kernel instead of 386bsd.
1994-05-26 13:38:01 +00:00
Rodney W. Grimes
35c2e6db96 Since we have removed com.c and renamed comreg.h to sioreg.h I need to
fix sio.c to #include sioreg.h.
1994-05-26 13:31:40 +00:00
Rodney W. Grimes
d5d6e3f5d0 Fix some references to MIN() and MAX() that have been replaced by min() and
max().
1994-05-26 13:30:20 +00:00
Rodney W. Grimes
26f9a76710 The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.
Reviewed by:	Rodney W. Grimes
Submitted by:	John Dyson and David Greenman
1994-05-25 09:21:21 +00:00
Rodney W. Grimes
6cda32c071 BSD 4.4 Lite Kernel Sources 1994-05-25 01:34:38 +00:00
Jordan K. Hubbard
c783dff047 Get us closer to being able to install on the second drive. 1994-05-24 08:09:49 +00:00
Søren Schmidt
f4f09149e5 Fixed Id string 1994-05-20 12:24:15 +00:00
Søren Schmidt
ee5676a0ae Added prober Id string 1994-05-20 12:22:40 +00:00
Jordan K. Hubbard
dd15978f97 Start preparing for the new, improved, doesn't-hang-the-keyboard version of
syscons as standard.  pccons adherants are welcome to go fix pccons, but for
now I see only syscons really moving forward.
see
1994-05-19 10:55:34 +00:00
Jordan K. Hubbard
0bf1d79182 Remove the now bogus IP_VAT_COMPAT. 1994-05-18 16:23:25 +00:00
Jordan K. Hubbard
33b061c9fd Add line for IP_VAT_COMPAT, documenting it. 1994-05-17 23:20:32 +00:00
Jordan K. Hubbard
e3178a06e5 Fold in the changes to support IP multicasting, from Jim Lowe et al. 1994-05-17 22:30:41 +00:00
Jordan K. Hubbard
3759860cff Whoops - comment out psm0 by default in case someone wants to
compile this thing.  I won't turn on the ALLOW_CONFLICT_IOADDR this would need
to compile instead since that would then rob us of other, possibly important,
conflict checks.
1994-05-17 14:18:13 +00:00
Jordan K. Hubbard
45b4c36f90 Add descriptions of ALLOW_CONFLICT_* options we want to doc for now
(only 2).  Add entry for psm0 (PS/2 mouse).
1994-05-17 14:15:11 +00:00
Jordan K. Hubbard
bc032fefdb Get generic kernels to be as forgiving of users with lossy hardware
as possible:

options         "SCSI_DELAY=15"         #Be pessimistic about Joe SCSI device
1994-05-16 09:40:10 +00:00
Andrey A. Chernov
7b5cad487c From Bruce:
*	If there is no 386BSD partition, initialize the label sector with
 *	LABELSECTOR instead of with garbage.
 *	Fixed reading of bad sector table.  It is at the end of the 'c'
 *	partition, which is not always at the end of the disk.
1994-05-16 03:06:00 +00:00
Andreas Schulz
fbfd001f7e Added a missing unit argument in a printf. 1994-05-14 13:12:14 +00:00
Jordan K. Hubbard
7d46c3b6d8 Remove confusing (as they are now unnecessary) comments about
INACCURATE_MICROTIME_IS_OK.  Document what pca0 is.
1994-05-13 08:48:22 +00:00
Andrey A. Chernov
494578e684 Localize RevD mixer changes for board revisions >= 127 1994-05-08 17:11:39 +00:00
Andrey A. Chernov
101b205574 Fix ugly bug with PAS16 Rev D mixer: output level was too low 1994-05-07 01:09:35 +00:00
Rodney W. Grimes
cbb33f0cf5 USL copyright 1994-05-04 08:24:02 +00:00
Rodney W. Grimes
8568be7ca9 >From BETA_1_1 branch:
----------------------------
revision 1.20.2.2
date: 1994/05/03 05:16:50;  author: rgrimes;  state: Exp;  lines: +39 -16
Do a board reset if the AHA_INQUIRE command fails.  This is needed for the
DTC3290.  Change the messages about the BT545 to be generic to non adaptec
boards, since it appears that most vendors do not implement the AHA_INQUIRE
command in thier compatibility mode.
----------------------------
1994-05-03 05:44:53 +00:00
Andreas Schulz
61f969e858 Add two routines insl and outsl, that should do 32bit string ins and outs.
Both are completely untested in the moment. They are used from the
if_ep.c driver for the EISA card.
1994-05-03 00:00:53 +00:00
Andreas Schulz
fa4452258b Added the bugfixes from the current NetBSD driver. Put in some parts of
the 3c579 support, but not the init/probe part.
1994-05-02 22:27:33 +00:00
Søren Schmidt
b07c5caa15 Update to use the timer0_divisor & timer0_prescale to determine the current
time. Speed-up to time calculation too. Now faster than before..
1994-05-02 09:44:20 +00:00
Søren Schmidt
bc36c8064b Update the reprogram timer stuff, now the frequency of timer 0
can only be changed at the "right" times. Accuracy should be
assured.
1994-05-02 09:41:24 +00:00
Søren Schmidt
e88064ec8a fixed some minor bugs 1994-05-02 09:40:12 +00:00
David Greenman
bb50891974 Removed some tlbflush optimizations as some of them were bogus and lead
to some strange behavior.
1994-05-02 05:31:03 +00:00
Martin Renters
0eb0343191 Change switch statement to two if statements. This saves 208 bytes in
the object file which is enough to bring the size down to the point
where the bootstrap fits into 15 sectors.
1994-05-01 03:53:29 +00:00
Gary Clark II
698a2ca9f2 Change old alias b_cylin to b_resid 1994-04-30 17:03:33 +00:00
Gary Clark II
3c7e7a693b Almost had problems. The directory on my system is gpl not gnu.
corrected error
1994-04-29 21:57:12 +00:00
Gary Clark II
cfecaf32f0 Added GPL_MATH_EMULATE to options
This should not be used in binary distributions.
1994-04-29 21:53:55 +00:00
Gary Clark II
a5a7a6cdf7 Added files for option gpl_math_emulate 1994-04-29 21:49:02 +00:00
Gary Clark II
1099e6c189 Deleted on ifdef dontdef
Added ifdef for GPL_MATH_EMULATE so we get the extra padding that is needed
in the save87 struct.
1994-04-29 21:44:23 +00:00
Gary Clark II
9f82ad3dfb Added ifdef for GPL_MATH_EMULATE to keep the sytem from panicing when
using it.
1994-04-29 21:39:55 +00:00
Andreas Schulz
01fd55bbef Document parts of the case statements, which instruction is emulated.
Marked all dubious parts with ATS :-) for better searching. First round
of better documentation of the math emulator and of bugfixing it.
1994-04-26 22:51:48 +00:00
Søren Schmidt
0573e73943 Updated swedish keymap. 1994-04-26 09:24:06 +00:00
Søren Schmidt
749613741c Fixed missing bounds check in scroll up/down sequence, that could
cause a panic (and did).
1994-04-26 09:09:57 +00:00
David Greenman
a4f7a4c990 From John Dyson:
Fixed physio in the 386 case - write faults weren't properly implemented.
1994-04-25 23:48:20 +00:00
Andrey A. Chernov
ce728ca011 Fix proper include place 1994-04-24 00:07:35 +00:00
Andrey A. Chernov
500d826865 We don't have DMA automode, so correct all places to work without
it too.
1994-04-23 22:54:31 +00:00
Garrett Wollman
9ad380ab4c Define new option, INACCURATE_MICROTIME_IS_OK. When this is defined,
the NTP kernel PLL is disabled, and acquire_timer0() is enabled, thus
opening the door for microtime() (and hence gettimeofday()) to return
bogus timestamps.  This option is necessary for the `pca' driver to
work, but is implemented to underscore the fact that accurate timekeeping
and the `pca' driver are incompatible at present.  If someone writes a version
of microtime() that works when the `pca' driver is being used, this can get
junked.
1994-04-23 21:39:18 +00:00
Andrey A. Chernov
0897a95d08 device pca0 added 1994-04-23 12:13:27 +00:00
Andrey A. Chernov
66536439b0 Little optimization of contigmalloc parameters 1994-04-23 05:21:33 +00:00
Andrey A. Chernov
2a9de2027e Additional changes for 2.5 1994-04-23 04:16:53 +00:00
David Greenman
f66fdd6803 Added support for the 16 port Boca via a flag to specify that there is
no master port.
1994-04-23 02:11:43 +00:00
Andrey A. Chernov
db2fd867a3 Sound driver updated to version 2.5 1994-04-23 02:03:17 +00:00
Andrey A. Chernov
910e109d64 Updated to version 2.5 1994-04-23 01:55:45 +00:00
Andrey A. Chernov
9fc9dd51c5 Update sound driver to version 2.5 1994-04-23 01:50:14 +00:00
Garrett Wollman
d139b2ddba Tell the user that we didn't try to set the bus speed, in case they're
used to NetBSD or older versions of the code that did do it.
Will document TUNE_1542 also.
1994-04-21 22:14:43 +00:00
Søren Schmidt
872dacbfeb Changed timer usage to new functions in clock.c 1994-04-21 14:22:26 +00:00
Søren Schmidt
bc4ff6e376 Change timer usage to use new functions in clock.c 1994-04-21 14:21:50 +00:00
Søren Schmidt
57d26a14e9 Added IO_PPI define, pulled timer related stuff 1994-04-21 14:20:54 +00:00
Søren Schmidt
f1106e3848 Pulled out timer related functions -> now in clock.c 1994-04-21 14:20:07 +00:00
Søren Schmidt
5194771d25 New support for sharing the timers
acquire_timer / release_timer

Pulled in timer related functions from isa.c
1994-04-21 14:19:16 +00:00
Søren Schmidt
b5194b236c pcaudio device driver:
Driver for playing .au type files through the internal speaker
	Uses new timer support in clock.c
1994-04-21 14:16:55 +00:00
Søren Schmidt
f847be1ad5 pcaudio.c added 1994-04-21 14:13:43 +00:00
Søren Schmidt
d1e72cb121 New file for pcaudio device driver 1994-04-21 14:12:28 +00:00
Søren Schmidt
d80683aea8 cdev 24 used for pcaudio (PCM speaker driver) 1994-04-21 14:10:31 +00:00
Poul-Henning Kamp
13042d1278 Adding bootoption '-r' which is "use compiled in root". This allows me to
boot from a floppy and have root on wd2 for instance.
1994-04-20 22:06:24 +00:00
David Greenman
0e195446b7 Bug fixes and performance improvements from John Dyson and myself:
1) check va before clearing the page clean flag. Not doing so was
	causing the vnode pager error 5 messages when paging from
	NFS. (pmap.c)
2) put back interrupt protection in idle_loop. Bruce didn't think
	it was necessary, John insists that it is (and I agree). (swtch.s)
3) various improvements to the clustering code (vm_machdep.c). It's
	now enabled/used by default.
4) bad disk blocks are now handled properly when doing clustered IOs.
	(wd.c, vm_machdep.c)
5) bogus bad block handling fixed in wd.c.
6) algorithm improvements to the pageout/pagescan daemons. It's amazing
	how well 4MB machines work now.
1994-04-20 07:06:57 +00:00
Garrett Wollman
b564217ad2 Reserve block device 8 and character device 32 for users' drivers. 1994-04-19 23:45:43 +00:00
David Greenman
f690bbace7 Changes from John Dyson and myself:
1) Removed all instances of disable_intr()/enable_intr() and changed
	them back to splimp/splx. The previous method was done to improve
	the performance, but Bruces recent changes to inline spl* have
	made this unnecessary.
2) Cleaned up vm_machdep.c considerably. Probably fixed a few bugs, too.
3) Added a new mechanism for collecting page statistics - now done by
	a new system process "pagescan". Previously this was done by the
	pageout daemon, but this proved to be impractical.
4) Improved the page usage statistics gathering mechanism - performance is
	much improved in small memory machines.
5) Modified mbuf.h to enable the support for an external free routine when
	using mbuf clusters. Added appropriate glue in various places to
	allow this to work.
6) Adapted a suggested change to the NFS code from Yuval Yurom to take
	advantage of #5.
7) Added fault/swap statistics support.
1994-04-14 07:49:40 +00:00
David Greenman
04c17e6881 Add delays after changing from 8/16 - 16/8 bit mode and after enabling/
disabling the shared memory. The 83C790 needs these or it does bad things.
1994-04-13 10:15:34 +00:00
Andrey A. Chernov
70ff255979 Make all devices at least 2*64K buffers, 2*32K buffers
isn't enough for my home 33Mhz.
1994-04-13 01:57:03 +00:00
Andrey A. Chernov
bc906632a8 snd7 config line corrected, irqaremoved 1994-04-13 01:29:14 +00:00
Andrey A. Chernov
e987ea972f Now SoundDriver use 64K DMA region instead of older 4K by
using new contigmalloc function.
1994-04-13 01:10:08 +00:00
Geoff Rehmet
9aa132ae4c Remove lpa from the generic kernels - one step closer to nuking lpa !! 1994-04-12 16:05:13 +00:00
Andrey A. Chernov
9642c2b7b8 Patch from S0ren, 80x50 font trashed after switching from X console 1994-04-12 00:05:23 +00:00
Andrey A. Chernov
4a1bf9e303 Tenmicrosec change backed out, because our DELAY is accurate
only about 40 microseconds.
1994-04-11 21:27:00 +00:00
Andrey A. Chernov
0ef6d0950f We have a better way to wait ten microseconds then inbs:
tenmicrosec() now use DELAY(10)
1994-04-11 18:17:12 +00:00
David Greenman
a4392a014c Fixed brokeness in the support of the 83C790/Elite Ultra (now that I
finally have the f**king documentation!):

1) Changed all the numeric register offsets to symbolic ones (it should
	have been this way originally).
2) If 16 bit, disable the shared memory when not using it. Apparantly
	switching between 8/16bit mode makes the Ultra unhappy unless
	this is done (i.e. it trashes the bus).
1994-04-10 20:06:28 +00:00
Geoff Rehmet
5bc9752a71 Modify wdprobe() to correctly recognise some 2 drive systems,
on which it was failing.  Modifications follow ATA, but also
allow some weird setups which seem to contradict ATA (aaarrrrgghhh!!)
1994-04-10 11:17:13 +00:00
Geoff Rehmet
002aedb676 change to lptioctl 1994-04-08 22:13:49 +00:00
Andrey A. Chernov
758ba6e17a Fix arguments of CONS_GETINFO 1994-04-07 23:23:01 +00:00
Andrey A. Chernov
cea06d471b Remove unneded irq/drq/vector from snd? 1994-04-07 22:18:49 +00:00
David Greenman
32128f4c0d from kimmel@varese.cs.umass.edu (Matt Kimmel):
"el" driver for 3COM 3C501. This driver has some serious performance
problems and drops packets on the floor like hot potatos.
1994-04-07 12:10:31 +00:00
David Greenman
2862674874 Make Bruce happy: silently enter ddb on a BPT or trace trap if ddb is
configured in the kernel.
1994-04-07 10:51:00 +00:00
Geoff Rehmet
ee5ae27f05 Changes to lpt driver:
- ansi prototypes in lpt.c
- a bit of tidying in lpt.c
- ioctl in lpt.c for switching between polling and using interrupts
- added lpt.h - needed for ioctl to allow switching between polling
        and interrupt-driven modes.
1994-04-06 16:42:33 +00:00
David Greenman
1561d038b1 from John Dyson:
1) fixed some bugs related to the bounce buffer code
2) vnode pager now supports clustered pageouts
3) experimental code for clustering all I/O via a new "cldisksort"
4) added >16MB check to Bustek driver
5) made some experimental algorithmic changes to the pageout daemon
6) fixed bugs in truncating mapped files (esp when mapped via NFS)
7) reorganized vnode pager I/O code
1994-04-05 03:23:32 +00:00
Garrett Wollman
6ebe34f113 First pass at adding locale support. This code only deals with the LC_CTYPE
class of locale data, but could be extended to handle other locale
classes, as well as message catalogues and other non-locale i18n
support.

I have left the old _ctype_ array in place, and moved the ctype.h
header to octype.h, so that existing shared binaries will still be
able to find and use it as they require.

See /usr/src/share/locale for information on how to create new locale
data files (eventually this procedure will be improved).  I'd like to
have a family of locale files for various countries, languages, and
character sets, so please contribute some.

This code was originally written by Paul Borman and contributed to
4.4; I did the integration, and have somewhat tested it.  crt0.c
probably ought to call setlocale() if it doesn't already, but I'd like
for people to create some locale files and try things manually first
before I make every program do this.
1994-04-04 21:11:12 +00:00
Poul-Henning Kamp
c7ba7a5e32 corrected pointer to sound.doc 1994-04-04 17:27:45 +00:00
Andrey A. Chernov
b4b3a1a45e This addition allows compilation with EXCLUDE_AUDIO
without compilation error.
1994-04-03 22:16:38 +00:00
Andrey A. Chernov
9cc0e7b511 Add declaration missing from previous bde's version 1994-04-03 12:25:57 +00:00
Andrey A. Chernov
fd59ff8180 CHANGES from Bruce:
---
This list of changes is in approximately chronological order (oldest first).

	o Many cosmetic changes - renamed comintr1 -> siointr1, moved
	  things around and fixed whitespace.
	o Reduced SLIP latency (FRAME_END hack) from 20-30 ms to 16 ms
	  at 115200 bps (you won't notice the average 10 ms improvement
	  on slow lines).  ppp seems to use only counted transfers so
	  there's no similar hack available.  It's too hard for the
	  driver to know the count.
	o Temporary #ifdefs for new and old interrupt handling
	  (OLD_INTERRUPT_HANDLING decided by setsofttty() not being
	  externally defined.
	o Don't test for the IIR_NOPEND bit being set - test for the
	  non-fifo part of the iir equalling it like the docs say to.
	  States with other IIR_NOPEND set in combination with the
	  other iir bits are undefined.  The docs may be stupid - the
	  old test would not have broken when the fifo bits were
	  introduced.
	o Noted more problems with DTR wait.
	o Rewrote console stuff.  Still some initialization and state
	  preservation problems.  Same for kgdb stuff.  The driver
	  doesn't do anything about the console close bug.  It needs
	  to be fixed entirely in i386/cons.c.  I like chmr's version
	  where the the console driver revectors the device open and
	  close routines.
	o Temporary (?) #ifdefs for references to tty buffers.
	o Noted further things to do in (2 comments about 3 places) for
	  phk's change to not touch RTS unless it is being used for flow
	  control.
	o Temporary #ifdefs for timestamp handling.  It needs fixing.
	  The microtime() call breaks the first rule of writing fast
	  interrupt handlers: NO calls to functions that might do slow
	  and bad things.  microtime() enables interrupts.  This turns
	  out to be only moderately harmful.  Also, I want the timestamp
	  copy outside of the normal interrupt handler.
	o Don't init com->tp early for the !DONT_MALLOC_TTYS case -
	  both sides are NULL.
	o Worry about com->tp == NULL in siopoll.  I don't see how you
	  survived the (incc <= 0 || !(tp->state & TS_ISOPEN)) test.
	  Perhaps early sttys or comcontrols set up the tp's for _all_
	  the ports before this code is reached.
1994-04-03 11:41:11 +00:00
Andrey A. Chernov
e42b7b4096 Change from Bruce:
isa_dmarangecheck() is off by one error.
> ISARAM_END should be >= ISARAM_END. Only the first page above 16M
was mishandled.
1994-04-02 20:43:25 +00:00
David Greenman
d230622648 New interrupt code from Bruce Evans. In additional to Bruce's attached
list of changes, I've made the following additional changes:

1) i386/include/ipl.h renamed to spl.h as the name conflicts with the
   file of the same name in i386/isa/ipl.h.
2) changed all use of *mask (i.e. netmask, biomask, ttymask, etc) to
   *_imask (net_imask, etc).
3) changed vestige of splnet use in if_is to splimp.
4) got rid of "impmask" completely (Bruce had gotten rid of netmask),
   and are now using net_imask instead.
5) dozens of minor cruft to glue in Bruce's changes.

   These require changes I made to config(8) as well, and thus it must
be rebuilt.

-DG

from Bruce Evans:

sio:
	o No diff is supplied.  Remove the define of setsofttty().  I hope
	  that is enough.

*.s:
	o i386/isa/debug.h no longer exists.  The event counters became too
	  much trouble to maintain.  All function call entry and exception
	  entry counters can be recovered by using profiling kernel (the new
	  profiling supports all entry points; however, it is too slow to
	  leave enabled all the time; it also).  Only BDBTRAP() from debug.h
	  is now used.  That is moved to exception.s.  It might be worth
	  preserving SHOW_BITS() and calling it from _mcount() (if enabled).
	o T_ASTFLT is now only set just before calling trap().
	o All exception handlers set SWI_AST_MASK in cpl as soon as possible
	  after entry and arrange for _doreti to restore it atomically with
	  exiting.  It is not possible to set it atomically with entering
	  the kernel, so it must be checked against the user mode bits in
	  the trap frame before committing to using it.  There is no place
	  to store the old value of cpl for syscalls or traps, so there are
	  some complications restoring it.

Profiling stuff (mostly in *.s):
	o Changes to kern/subr_mcount.c, gcc and gprof are not supplied yet.
	o All interesting labels `foo' are renamed `_foo' and all
	  uninteresting labels `_bar' are renamed `bar'.  A small change
	  to gprof allows ignoring labels not starting with underscores.
	o MCOUNT_LABEL() is to provide names for counters for times spent
	  in exception handlers.
	o FAKE_MCOUNT() is a version of MCOUNT() suitable for exception
	  handlers.  Its arg is the pc where the exception occurred.  The
	  new mcount() pretends that this was a call from that pc to a
	  suitable MCOUNT_LABEL().
	o MEXITCOUNT is to turn off any timer started by MCOUNT().

/usr/src/sys/i386/i386/exception.s:
	o The non-BDB BPTTRAP() macros were doing a sti even when interrupts
	  were disabled when the trap occurred.  The sti (fixed) sti is
	  actually a no-op unless you have my changes to machdep.c that make
	  the debugger trap gates interrupt gates, but fixing that would
	  make the ifdefs messier.  ddb seems to be unharmed by both
	  interrupts always disabled and always enabled (I had the branch in
	  the fix back to front for some time :-().
	o There is no known pushal bug.
	o tf_err can be left as garbage for syscalls.

/usr/src/sys/i386/i386/locore.s:
	o Fix and update BDE_DEBUGGER support.
	o ENTRY(btext) before initialization was dangerous.
	o Warm boot shot was longer than intended.

/usr/src/sys/i386/i386/machdep.c:
	o DON'T APPLY ALL OF THIS DIFF.  It's what I'm using, but may require
	  other changes.
	  Use the following:
		o Remove aston() and setsoftclock().
	  Maybe use the following:
		o No netisr.h.
		o Spelling fix.
		o Delay to read the Rebooting message.
		o Fix for vm system unmapping a reduced area of memory
		  after bounds_check_with_label() reduces the size of
		  a physical i/o for a partition boundary.  A similar
		  fix is required in kern_physio.c.
		o Correct use of __CONCAT.  It never worked here for non-
		  ANSI cpp's.  Is it time to drop support for non-ANSI?
		o gdt_segs init.  0xffffffffUL is bogus because ssd_limit
		  is not 32 bits.  The replacement may have the same
		  value :-), but is more natural.
		o physmem was one page too low.  Confusing variable names.
	  Don't use the following:
		o Better numbers of buffers.  Each 8K page requires up to
		  16 buffer headers.  On my system, this results in 5576
		  buffers containing [up to] 2854912 bytes of memory.
		  The usual allocation of about 384 buffers only holds
		  192K of disk if you use it on an fs with a block size
		  of 512.
		o gdt changes for bdb.
		o *TGT -> *IDT changes for bdb.
		o #ifdefed changes for bdb.

/usr/src/sys/i386/i386/microtime.s:
	o Use the correct asm macros.  I think asm.h was copied from Mach
	  just for microtime and isn't used now.  It certainly doesn't
	  belong in <sys>.  Various macros are also duplicated in
	  sys/i386/boot.h and libc/i386/*.h.
	o Don't switch to and from the IRR; it is guaranteed to be selected
	  (default after ICU init and explicitly selected in isa.c too, and
	  never changed until the old microtime clobbered it).

/usr/src/sys/i386/i386/support.s:
	o Non-essential changes (none related to spls or profiling).
	o Removed slow loads of %gs again.  The LDT support may require
	  not relying on %gs, but loading it is not the way to fix it!
	  Some places (copyin ...) forgot to load it.  Loading it clobbers
	  the user %gs.  trap() still loads it after certain types of
	  faults so that fuword() etc can rely on it without loading it
	  explicitly.  Exception handlers don't restore it.  If we want
	  to preserve the user %gs, then the fastest method is to not
	  touch it except for context switches.  Comparing with
	  VM_MAXUSER_ADDRESS and branching takes only 2 or 4 cycles on
	  a 486, while loading %gs takes 9 cycles and using it takes
	  another.
	o Fixed a signed branch to unsigned.

/usr/src/sys/i386/i386/swtch.s:
	o Move spl0() outside of idle loop.
	o Remove cli/sti from idle loop.  sw1 does a cli, and in the
	  unlikely event of an interrupt occurring and whichqs becoming
	  zero, sw1 will just jump back to _idle.
	o There's no spl0() function in asm any more, so use splz().
	o swtch() doesn't need to be superaligned, at least with the
	  new mcounting.
	o Fixed a signed branch to unsigned.
	o Removed astoff().

/usr/src/sys/i386/i386/trap.c:
	o The decentralized extern decls were inconsistent, of course.
	o Fixed typo MATH_EMULTATE in comments. */
	o Removed unused variables.
	o Old netmask is now impmask; print it instead.  Perhaps we
	  should print some of the new masks.
	o BTW, trap() should not print anything for normal debugger
	  traps.

/usr/src/sys/i386/include/asmacros.h:
	o DON'T APPLY ALL OF THIS DIFF.  Just use some of the null macros
	  as necessary.

/usr/src/sys/i386/include/cpu.h:
	o CLKF_BASEPRI() changes since cpl == SWI_AST_MASK is now normal
	  while the kernel is running.
	o Don't use var++ to set boolean variables.  It fails after a mere
	  4G times :-) and is slower than storing a constant on [3-4]86s.

/usr/src/sys/i386/include/cpufunc.h:
	o DON'T APPLY ALL OF THIS DIFF.  You need mainly the include of
	  <machine/ipl.h>.  Unfortunately, <machine/ipl.h> is needed by
	  almost everything for the inlines.

/usr/src/sys/i386/include/ipl.h:
	o New file.  Defines spl inlines and SWI macros and declares most
	  variables related to hard and soft interrupt masks.

/usr/src/sys/i386/isa/icu.h:
	o Moved definitions to <machine/ipl.h>

/usr/src/sys/i386/isa/icu.s:
	o Software interrupts (SWIs) and delayed hardware interrupts (HWIs)
	  are now handled uniformally, and dispatching them from splx() is
	  more like dispatching them from _doreti.  The dispatcher is
	  essentially *(handler[ffs(ipending & ~cpl)]().
	o More care (not quite enough) is taken to avoid unbounded nesting
	  of interrupts.
	o The interface to softclock() is changed so that a trap frame is
	  not required.
	o Fast interrupt handlers are now handled more uniformally.
	  Configuration is still too early (new handlers would require
	  bits in <machine/ipl.h> and functions to vector.s).
	o splnnn() and splx() are no longer here; they are inline functions
	  (could be macros for other compilers).  splz() is the nontrivial
	  part of the old splx().

/usr/src/sys/i386/isa/ipl.h
	o New file.  Supposed to have only bus-dependent stuff.  Perhaps
	  the h/w masks should be declared here.

/usr/src/sys/i386/isa/isa.c:
	o DON'T APPLY ALL OF THIS DIFF.  You need only things involving
	  *mask and *MASK and comments about them.  netmask is now a pure
	  software mask.  It works like the softclock mask.

/usr/src/sys/i386/isa/vector.s:
	o Reorganize AUTO_EOI* macros.
	o Option FAST_INTR_HANDLER_USERS_ES for people who don't trust
	  fastintr handlers.
	o fastintr handlers need to metamorphose into ordinary interrupt
	  handlers if their SWI bit has become set.  Previously, sio had
	  unintended latency for handling output completions and input
	  of SLIP framing characters because this was not done.

/usr/src/sys/net/netisr.h:
	o The machine-dependent stuff is now imported from <machine/ipl.h>.

/usr/src/sys/sys/systm.h
	o DON'T APPLY ALL OF THIS DIFF.  You need mainly the different
	  splx() prototype.  The spl*() prototypes are duplicated as
	  inlines in <machine/ipl.h> but they need to be duplicated here
	  in case there are no inlines.  I sent systm.h and cpufunc.h
	  to Garrett.  We agree that spl0 should be replaced by splnone
	  and not the other way around like I've done.

/usr/src/sys/kern/kern_clock.c
	o splsoftclock() now lowers cpl so the direct call to softclock()
	  works as intended.
	o softclock() interface changed to avoid passing the whole frame
	  (some machines may need another change for profile_tick()).
	o profiling renamed _profiling to avoid ANSI namespace pollution.
	  (I had to improve the mcount() interface and may as well fix it.)
	  The GUPROF variant doesn't actually reference profiling here,
	  but the 'U' in GUPROF should mean to select the microtimer
	  mcount() and not change the interface.
1994-04-02 07:00:53 +00:00
Andrey A. Chernov
8ceb0f8dea Replace CAPS led with ALTGR led for ALTGR mode (soft) keyboards,
currently affects only russian keyboard.
1994-04-01 18:33:12 +00:00
Andrey A. Chernov
e330356ffb Change got_status/modem_status assignment per Bruce suggestion,
because inb clears modem status port.
1994-04-01 16:47:01 +00:00
Andrey A. Chernov
1e22c1b2c7 Localize previous changes (removing dma_reset)
only for SB card, it seems that it breaks GUS at least.
1994-04-01 15:04:49 +00:00
Andrey A. Chernov
046b1c1ed5 Tracker "swapping" problem finally solved,
all (expect one) dma_reset calls commented out.
1994-03-31 20:54:25 +00:00
Andrey A. Chernov
e463296746 Fix error with reducing speed on SB reset. 1994-03-30 20:33:28 +00:00
David Greenman
ac322158f5 Eliminated the "physstrat" wart and merged it into kern_physio.c. This
patch also fixes a bug which causes a kernel VM leak.
1994-03-30 02:47:13 +00:00
David Greenman
4a490e4c21 Eliminated the "physstrat" wart and merged it into kern_physio.c. This
patch also fixes a bug which causes a kernel VM leak.
1994-03-30 02:31:11 +00:00
David Greenman
6b4ac811ca New routine "pmap_kenter", designed to take advantage of the special
case of the kernel pmap.
1994-03-30 02:17:47 +00:00
Andrey A. Chernov
827f6dbf32 1) Better fix for false carrier detect on bidir port
2) ttyclose moved after comhardclose, because clears t_state
3) slpx(s) moved after l_open to prevent undetected carrier down
1994-03-26 13:40:18 +00:00
David Greenman
dad5c5fe90 ifdef KERNEL the pmap_kextract inline function; ps is unhappy otherwise.
Pointed out by Frank Terhaar-Yonkers <fty@vislab.epa.gov>.
1994-03-25 22:08:59 +00:00
Andrey A. Chernov
70c0dd79d8 Fix false carrier detection on incoming bidir port. 1994-03-25 15:10:50 +00:00
David Greenman
ed7fcbd079 From John Dyson: performance improvements to the new bounce buffer
code.
1994-03-24 23:12:48 +00:00
Andrey A. Chernov
c9ffdca0a7 1) After discussion with Hannu, returning speed changed back.
Real problem fixed by my previous fix for SB 2.x
2) get_time function slightly modified to minimize possible
overflowing.
1994-03-24 22:23:51 +00:00
David Greenman
6378ff1e87 Enabled bounce buffers by default. This should be done via a probe for
the specific controller type, so this change is temporary.
1994-03-24 02:23:00 +00:00
Andrey A. Chernov
5d8d655374 For SB 2.x speed was reduced to 22050;
I already fix this bug in previous driver version,
but new driver update breaks my changes!
1994-03-23 22:52:30 +00:00
Andrey A. Chernov
176eaca913 SPEED-related ioctls returns wrong speed cause Tracker's damage. 1994-03-23 21:58:59 +00:00
Andrey A. Chernov
f73cefd412 1) GET_TIME function completely broken
it returns time in microseconds instead of HZ
(feel difference!)
2) change GET_TIME type to unsigned long in all places to prevent overflow
1994-03-23 19:27:52 +00:00
Andrey A. Chernov
83bd7ca8b0 1) Change dtrwait 300 to 3 * hz (to be more kosher)
2) Protect sioclose by spltty()
1994-03-23 17:28:35 +00:00
David Greenman
d5e26ef0ef Bounce buffers. From John Dyson with help from me. 1994-03-23 09:16:04 +00:00
Andrey A. Chernov
ac1ad5b2d7 Add missing EXCLUDE_SBPRO 1994-03-23 00:05:25 +00:00
Andrey A. Chernov
7116e6b71c Add siostop to sioclose, because ttyflush called from
wrong places removed now.
1994-03-21 22:19:56 +00:00
Andreas Schulz
308352e4d4 Changed the raw partition number from 3 to 0. This change lets us use
/dev/mcd0a instead of /dev/mcd0d. This is more conforming to the /dev/cd0a
for the SCSI cdrom drives. It breaks the convention d the whole drive.
But the question is, do we really need partitions on cdrom drives ?
1994-03-21 20:59:55 +00:00
Andreas Schulz
16a6a70817 Makefile.i386:
put vers.o at the end of the loader line. We are simply jumping in the
moment into the first location of the text segment in 386bsd. So the
linking order is very important :-). With the addition of the const
types in newvers.sh we jumped into them. I have experimented with an
entry point specification, but was unsuccessfull. Someone else should
look at this.
devices.i386:
files.i386:
Added entries for a Sony cdrom driver.
1994-03-21 20:48:52 +00:00
Andrey A. Chernov
67a850fc67 Increase default DTR wait time up to 3 secs.
Also hardw. specs says 2.5 secs is enough, many modems needs
at least 3 secs.
1994-03-21 15:18:27 +00:00
Andrey A. Chernov
6ec145713c Now printf("changing root... indicates raw partition for floppy
f.e. fd1d
1994-03-21 15:02:47 +00:00
Andrey A. Chernov
3f0afdd835 Fix printf for root system mounted on second floppy 1994-03-21 14:53:08 +00:00
Andrey A. Chernov
10c7408ae0 Fix for root system mounted on second floppy 1994-03-21 14:37:01 +00:00
David Greenman
29360eb099 Changed dynamic stack grow code to grow by "SGROWSIZ" amount. Initially
allocate SGROWSIZ amount of stack. Also set vm_ssize to the initial
stack VM size. Increased DFLSSIZ stack rlimit default to 8MB.
1994-03-21 09:35:24 +00:00
David Greenman
66ad8173f3 previous optimization from John wasn't quite ready for primetime. 1994-03-21 06:37:04 +00:00
David Greenman
93555dc983 Two fixes from John Dyson to fix hangs and panics when using ctrl-T:
1) tty.c: gather all the info about the processes before calling ttyprintf
	(which may block).
2) syscons.c: handle asynchronous output properly (data structures may
	be corrupted otherwise).
1994-03-20 20:05:55 +00:00
Garrett Wollman
9131cc8d54 Delete some references to sleep() that somehow crept in. 1994-03-20 00:30:04 +00:00
Garrett Wollman
f0e96ca631 Added cpu_model and machine variables. 1994-03-19 23:58:58 +00:00
Garrett Wollman
27408f32ce More symtab space. 1994-03-19 22:17:56 +00:00
Andrey A. Chernov
65f120b86a Remove ttyfree from sioclose
Example:
Application use port cua01
Getty open ttyd1 (allocates rawq,outq,etc) and waits while application
done
Application quits, sioclose issued, ttyfree issued (getty calls revoke)
Getty awakes and goes to panic into initrb (NULL rawq)
1994-03-18 23:35:37 +00:00
Garrett Wollman
11e4fa43bc Added David Mills' kernel NTP PLL code. The current version of NTP does
not yet speak to this code.
1994-03-15 01:58:22 +00:00
David Greenman
943a66f340 Performance improvements from John Dyson.
1) A new mechanism has been added to prevent pages from being paged
	out called "vm_page_hold". Similar to vm_page_wire, but
	much lower overhead.
2) Scheduling algorithm has been changed to improve interactive
	performance.
3) Paging algorithm improved.
4) Some vnode and swap pager bugs fixed.
1994-03-14 21:54:03 +00:00
Andrey A. Chernov
05e5086aab Checking l_close in unneeded (one of my previous fixes),
so back it out.
1994-03-14 18:52:14 +00:00
Steven Wallace
63a7486262 Removed EXCLUDE_<driver> for sound drivers so that all sound drivers
are compiled into kernel.  Users are referred to sound doc for info.
1994-03-11 22:17:24 +00:00
Steven Wallace
62d15cccd2 Added appropriate entries into files.i386 for snd drivers in /sys/i386/isa/sound
Added new snd drivers and EXCLUDE_<driver> options to LINT.
1994-03-11 10:31:05 +00:00
Steven Wallace
2d997c1071 Updated include files for sound drivers. 1994-03-11 10:28:36 +00:00
Steven Wallace
a75ba8fa22 Integrated Hannu Savolainen's new VoxWare sound drivers, version 2.4.
These drivers now have full SoundBlaster 16 support.
1994-03-11 10:27:25 +00:00
Andrey A. Chernov
2109bd5c86 Don't call ttyclose twice into sioclose and move ttyclose
before comhardclose
1994-03-10 10:06:27 +00:00
Andrey A. Chernov
3b2b53aa9a First open:
now HUPCL set only in bidir case for callin lines
(this prevents set HUPCL on mouse)
comhardclose:
in addition to HUPCL case now DTR dropped for bidir case
if line was active in and no carrier present now.
(this prevents DTR sleep on mouse)
1994-03-08 22:11:10 +00:00
Nate Williams
e7e0afea3b From: Jim Babb <babb@sedhps01.mdc.com>
Subject: Re: Bugs with floppy drives
Date: Tue, 8 Mar 94 9:11:54 CST

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

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

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

		(generally more efficient pte management)

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

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

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

		(less likely to pageout a recently used page)

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

		(generally faster system VM fault performance)

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

		(speeds up shared memory bss creation)

	7)	Remove possible deadlock from swap_pager initialization.

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

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

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

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

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


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


-Guido
1994-03-02 20:18:09 +00:00
Andrey A. Chernov
b0568305d3 360 DD entry speed fixed to 250KBPS 1994-03-02 18:34:41 +00:00
Andrew Moore
56ef028575 floppy tape support shouldn't interfere with floppy disk driver on
systems with no floppy tape drive (patch from Jim Babb).
1994-03-02 08:10:42 +00:00