Commit Graph

1135 Commits

Author SHA1 Message Date
dg
ec8e5a16d9 Disabled a debugging printf. 1994-09-06 17:53:24 +00:00
dg
0a37b9feee Simple changes to paging algorithms...but boy do they make a difference.
FreeBSD's paging performance has never been better. Wow.

Submitted by:	John Dyson
1994-09-06 11:28:46 +00:00
ats
24b9b7c35e Reviewed by:
Delete the hints to the sg driver. This thing was never finished and
has now been beaten by the sea driver.
1994-09-05 22:32:42 +00:00
ats
2edb8b6c96 Reviewed by:
Add initialization to the if_ie driver for the Micom Interlan NI5210 card.
This is a very old 82586 based card with only 8Kb or 16Kb on board memory.
Also only 8-bit wide instead of 16-bit like the AT& or 3COM card.
Warning: this thing is only tested so far that it detects all bits
correctly but is not yet on an ethernet. Will do that tomorrow.
1994-09-05 22:28:31 +00:00
jkh
b5390b8431 Get rid of a superfluous echo.
Submitted by:	jkh
1994-09-05 19:10:01 +00:00
jkh
4b891bdb68 Remove symlink before remaking it for libkern.a
Reviewed by:	jkh
Submitted by:	dima
1994-09-05 19:09:15 +00:00
bde
889bf31f37 Fix comments. 1994-09-05 14:09:41 +00:00
bde
6e409adfcf 386bsd -> kernel in strings. 1994-09-05 14:04:56 +00:00
dg
b47ee85a34 DOn't allow I/O register access in process 1 (oops). 1994-09-05 05:20:29 +00:00
dg
8747eb313f Improved some comments. 1994-09-04 23:10:27 +00:00
pst
915907cc03 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
dg
0b6f9dbfcb 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
dg
4f4f361dff Added pmap_mapdev() function to map device memory. 1994-09-04 04:11:57 +00:00
dg
a155a99a15 Initialize eflags register - brought over from 1.1.5. 1994-09-04 00:33:00 +00:00
csgr
7b6e72a847 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
ats
75e0beaff3 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
ache
5f18a711b2 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
csgr
570c3ecb10 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
ats
399e5eca6e 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
ats
b3e2310c79 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
bde
ca993f1b37 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
0e5fbeeb07 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
dg
ff6fc2bc2a Whoops, accidently left out some pieces of the munmapfd patch. 1994-09-02 15:06:51 +00:00
dg
454da81a5a Make sure that uio_resid isn't negative in read(). 1994-09-02 14:04:39 +00:00
dg
08512a3127 panic if length is < 0 in ffs_truncate(). 1994-09-02 10:24:55 +00:00
dg
70a7b53e06 Disallow truncating to negative file sizes. Doing so causes ffs_truncate()
and perhaps other fs truncate's to go crazy and panic the machine or worse.
This fixes the truncate bug reported by Michael Class.
1994-09-02 10:23:43 +00:00
dg
28c9f84238 munmapfd() was being called with one too few params - bug introduced
during my initial kernel port.
1994-09-02 10:17:30 +00:00
dg
62c18b3846 Converted P_LINK -> P_FORW, P_RLINK -> P_BACK, minor optimization. 1994-09-02 05:58:51 +00:00
dg
4e8717c691 Make olstat() consistent with lstat() - so they both return the same
owner..

Submitted by:	Kirk McKusick
1994-09-02 04:14:44 +00:00
dg
890c2cf256 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
dg
3e20d084c8 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
dg
bf11780374 Fixed bug that caused system processes to run at realtime priority. 1994-09-01 11:20:11 +00:00
dg
567870d3b7 Changed MAX to max. 1994-09-01 11:06:36 +00:00
dg
0d935e2ef5 Realtime priority scheduling support.
Added "sys/rtprio.h" with the used defines.
    Added rtprio(2) - the kernel interface.                  init_sysent.c,
                                                             kern_resource.c
                                                             syscalls.master
    Added 32 new runqueues (rtqs), with initialization.      kern_proc.c
                                                             kern_synch.c
    Realtime processes do not change nice/priority           kern_synch.c
    Added a column "rt" to ddb's ps (#ifdef RTPRIO_DEBUG)    kern_synch.c
    Realtime priorities are enherited through fork().        kern_fork.c
    Init (and children) NOT run as realtime process.         init_main.c

Submitted by:	Henrik Vestergaard Draboel
1994-09-01 05:15:50 +00:00
dg
43e565295a Realtime priority scheduling support.
Submitted by:	Henrik Vestergaard Draboel
1994-09-01 05:12:53 +00:00
dg
78a002271c Got rid of some old, unused junk. 1994-09-01 03:16:40 +00:00
dg
64678399d3 Got rid of redundant declaration, and changed IFF_LLC0 to IFF_LINK0. 1994-09-01 03:08:27 +00:00
dg
e7dd2e7a69 Added ze driver (brought over from 1.1.5). 1994-09-01 02:21:20 +00:00
se
bb46911c5b 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
se
e3667f152e 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
se
c920f621ff 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
se
2c2543e63e 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
se
6f4f06c23c This commit was generated by cvs2svn to compensate for changes in r2432,
which included commits to RCS files with non-trunk default branches.
1994-09-01 01:45:19 +00:00
se
6ea291b5ca 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
se
bd27dbfd36 Reviewed by:
Submitted by:
Added lines for 'pci' and 'ncr' devices (found under i386/pci).
1994-08-31 23:40:38 +00:00
se
b51d04ad13 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
se
26048972fc Reviewed by: Stefan Esser <se>
Debugger() takes an (char*) argument, changed macro definition accordingly.
1994-08-31 23:32:32 +00:00
se
bd59f4fdab Reviewed by: Stefan Esser <se>
Calculation of 'cd->cmdscount' now as in 'sd.c' (required for ncr scsi).
CDOUTSTANDING defined as '1' (as the comment says), was '2' in fact ...
Debugger takes an (char*) argument, changed macro definition accordingly.
1994-08-31 22:50:08 +00:00
dg
a80566aad6 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
dg
82189d4894 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
dg
a9a9ceeae2 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
dg
9335489bec Quiet down compiler warnings. 1994-08-31 04:45:24 +00:00
dg
cb1b0be279 Changed STRC -> P_TRACED. 1994-08-30 20:18:52 +00:00
dg
58307fe360 Whoops...clean up after me cleaning up after Bruce. 1994-08-30 20:11:40 +00:00
dg
945e895904 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
dg
724a6d0049 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
dg
16e35aa368 Fixed bug caused by change of rlimit variables to quad_t's. The bug was in
using min() to calculate the minimum of rss_cur,rss_max - since these
are now quad_t's and min() takes u_ints...the comparison later for exceeding
the rss limit was always true - resulting in rather serious page thrashing.
Now using new qmin() function for this purpose.

Fixed another bug where PG_BUSY pages would sometimes be paged out (bad!).
This was caused by the PG_BUSY flag not being included in a comparison.
1994-08-30 18:27:44 +00:00
dg
33e88fdce9 Added qmin and qmax functions to deal with quad_t's. 1994-08-30 18:19:47 +00:00
dg
f81bd8035b Changed to reclaim memory from other buffers to eliminate memory
thrashing.

Submitted by:	John Dyson
1994-08-30 18:19:11 +00:00
bde
4e783802c8 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
bde
baa690397f 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
bde
20ffc3e5ab 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
ache
066424d7d9 Change RAW_PART back to 3, too early step right now, disklabels need more
work
Change hardcoded 3 value in several places to RAW_PART define
1994-08-30 14:31:38 +00:00
ache
09c71a96da 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
bde
5def359657 Conditionalize support for my debugger. This normally saves 304 bytes. 1994-08-30 01:38:04 +00:00
jkh
54330c2cb2 Make decl/define for Debugger() match reality.
Submitted by:	jkh
1994-08-30 00:12:11 +00:00
ache
2e446d1495 Fake floppy partition RAW_PART=2 now 1994-08-29 21:47:11 +00:00
ache
1f5f925f37 RAW_PART=2 1994-08-29 21:37:49 +00:00
ache
c9598ae00e Now WDRAW=2 1994-08-29 21:35:16 +00:00
ache
49d6dcaa6d Use RAW_PART=2 to trick diskerr 1994-08-29 21:32:31 +00:00
ache
c5f7892f99 Raw partition is 2 now 1994-08-29 21:25:11 +00:00
ache
9e88d4363b Raw partition is 2 now 1994-08-29 21:19:27 +00:00
dg
9bf406e501 Patches from John Dyson to improve swap code efficiency.
Religiously add back pmap_clear_modify() in vnode_pager_input until we figure
out why system performance isn't what we expect.

Submitted by:	John Dyson (swap_pager) & David Greenman (vnode_pager)
1994-08-29 06:23:19 +00:00
dg
f15c464e97 "bogus" fixes from 1.1.5 to work around some cache coherency problems. 1994-08-29 06:09:15 +00:00
ache
1903bd836c 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
bde
d59fcde5ba Reformat recent additions to the same style as the original. 1994-08-28 16:53:35 +00:00
bde
f110979efe 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
bde
ea683235cd Update declarations for timeout stuff the same as for the other SCSI
drivers.
1994-08-28 16:08:51 +00:00
dg
e5bc09292d Made a little more up to date. 1994-08-28 06:46:25 +00:00
dg
991b08fc7a ddb ps function from 1.1.5. Moved into its own file and cleaned up a bit
by me.
1994-08-27 16:28:45 +00:00
dg
30ea68f3fc Updated this a bit. It's still woefully out of date. 1994-08-27 16:23:03 +00:00
dg
4d4250da00 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
ache
109e9ae764 Continue previous fix:
Add MIN_DELAY definition instead of hard-coded 10
1994-08-27 15:28:34 +00:00
ache
ced6ff7c8e 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
wollman
9489a8e21b Obey RFC 793, section 3.4:
Several examples of connection initiation follow.  Although these
  examples do not show connection synchronization using data-carrying
  segments, this is perfectly legitimate, so long as the receiving TCP
  doesn't deliver the data to the user until it is clear the data is
  valid (i.e., the data must be buffered at the receiver until the
  connection reaches the ESTABLISHED state).
1994-08-26 22:27:16 +00:00
wollman
411b82456b Added ntp_gettime and ntp_adjtime syscalls, both nosys'ed out until
someone gets to re-integrating the code.  ntp_gettime() should be
turned into a sysctl variable and emulated in the library.
1994-08-26 18:15:25 +00:00
jkh
bac467cadc Bring back our support for 57K and 115K.
Submitted by:	jkh
1994-08-26 12:07:31 +00:00
sos
970f32f702 Oops didn't check that init_sysent.c was generated proberly. Fixed.
Reviewed by:
Submitted by:
1994-08-26 09:33:37 +00:00
sos
89c704fc47 Changes to new sysent structure. TODO MOD_EXEC support.
Reviewed by:
Submitted by:
1994-08-26 08:42:07 +00:00
jkh
ed576dbcc4 Add timex.h for xntpd. The system calls will have to wait for tomorrow,
when I'm less sleepy.
Submitted by:	jkh
1994-08-26 06:29:22 +00:00
wollman
9598c66dbe Methinks p_sysent should be in the copy-on-fork rather than the
zero-on-fork section of the struct proc.  (At least, my system
won't boot unless it is.)
1994-08-25 22:59:35 +00:00
wollman
71bb3a40e9 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
paul
c351569ffc Stop cvs up -P from removing empty compile directories.
Reviewed by:
Submitted by:
1994-08-25 16:20:16 +00:00
paul
2239e40cd8 Added ${MACHINE}/boot to build bootblocks.
Submitted by:	Paul Richards
1994-08-25 13:54:28 +00:00
bde
532c1f6717 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
bde
429bde1b5f Support speeds 57600 and 115200.
Privatize functions.
1994-08-25 10:01:00 +00:00
ats
19f2ca4ce6 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
ats
b670389fdc 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
sos
ecc424b57b Changes preparing for iBCS support
Reviewed by:
Submitted by:
1994-08-24 11:52:21 +00:00
sos
905367d1b8 Changes preparing for iBCS support
Reviewed by:
Submitted by:
1994-08-24 11:51:46 +00:00
sos
ea7b642965 New file declaring the sysent structures
Reviewed by:
Submitted by:
1994-08-24 11:47:23 +00:00
sos
348c6c2277 Changes preparing for iBCS2 support
Reviewed by:
Submitted by:
1994-08-24 11:45:19 +00:00
sos
a1df6e49d5 Added iBCS2 files
Reviewed by:
Submitted by:
1994-08-24 11:44:45 +00:00
dg
2f63d99b81 Pay attention to *all* errors from copyinstr(). This patch fixes a bug
that causes a no-panic instant reboot when bogus argv/envvs are fed to
execve().
1994-08-24 10:53:53 +00:00
dg
ee3a8a1d81 Initialized v_writecount. 1994-08-24 04:06:39 +00:00
dg
96a3ea2381 Corrected some comments regarding ptes/pdes. 1994-08-23 16:27:15 +00:00
paul
351b3a5a9a 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
42b0369dee 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
jkh
4392f98435 I was in bourne-shell mode when I wrote this.. *blush*.
Submitted by:	jkh
1994-08-23 09:54:22 +00:00
paul
0263782ac9 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
jkh
485f7eef73 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
csgr
7b1890eac1 remove unnecessary occurrence of
#ifndef _SYS_TTYCHARS_H_
#define _SYS_TTYCHARS_H_
...
#endif
Submitted by:	Geoff
1994-08-22 19:34:03 +00:00
dg
b2d6b5fa24 print "BUSY" instead of error number if filesystem was busy during
vfs_unmountall() - this is the most common case. If it was a different
error, then print the error number.
1994-08-22 17:05:00 +00:00
bde
fd6631bb73 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
bde
1a0d91d74f 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
bde
eab55510a6 Idempotency #endif was not at end of file or commented. 1994-08-22 14:16:36 +00:00
bde
36a618e4b9 - Fix warnings in df, etc. caused by misplaced declaration of doumount().
- Fix bogus comments caused by misplaced #endif.
1994-08-22 14:09:51 +00:00
bde
ddf95dc08b - Fix attribute for __pure2.
- Update name of idempotency identifier in comment to match code.
1994-08-22 13:44:39 +00:00
sos
522661cfaf modified include stucture to 2.0 style.
Reviewed by:
Submitted by:
1994-08-22 11:11:05 +00:00
dg
ed80fa9c2a Fixed minor typo in diagnostic message. 1994-08-22 08:21:51 +00:00
paul
5e89d90e36 Added (timeout_func_t) casts to timeout/utimeoute calls.
Reviewed by:
Submitted by:
1994-08-21 20:16:14 +00:00
paul
06cda8b161 Another typo by me
Reviewed by:
Submitted by:
1994-08-21 19:19:39 +00:00
paul
35900aa74f Remove the idempotency I added -- it was wrong.
Reviewed by:
Submitted by:
1994-08-21 19:13:08 +00:00
paul
68a462f3d5 Fix typo (define -> ifndef)
Reviewed by:
Submitted by:
1994-08-21 19:06:48 +00:00
paul
a5b27701b9 Removed disk type from disklabel lines, not needed for installing
bootblocks.

Reviewed by:
Submitted by:
1994-08-21 18:15:45 +00:00
paul
eb40903ae1 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
ef6f4b86ab Made idempotent
Reviewed by:
Submitted by:
1994-08-21 07:19:45 +00:00
paul
bcc18c44d8 Made idempotent
Reviewed by:
Submitted by:
1994-08-21 07:03:56 +00:00
paul
9e34f0cb59 More idempotency....... this is fun :-) 1994-08-21 06:50:16 +00:00
paul
2f3d57ca81 Made idempotent.
Submitted by:	paul
1994-08-21 06:22:12 +00:00
paul
bf2ae5d599 Made idempotent -- made some of them more consistent with rest of tree.
Reviewed by:
Submitted by:
1994-08-21 06:14:33 +00:00
paul
743dba06ce Made idempotent 1994-08-21 05:44:12 +00:00
paul
8197ce5e98 Made idempotent.
Submitted by:	Paul
1994-08-21 05:27:42 +00:00
paul
be1bed59fb Make idempotent.
Submitted by:	Paul
1994-08-21 05:11:48 +00:00
paul
08a1a02226 Made idempotent.
Reviewed by:
Submitted by:
1994-08-21 04:55:31 +00:00
paul
1f5dfa1be2 Made them all idempotent.
Reviewed by:
Submitted by:
1994-08-21 04:42:17 +00:00
dg
f817326b2e 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
dg
c97639b923 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
dg
255b8baf81 Woops...forgot to commit this file. Part of Terry Lambert's loadable kernel
module support, with NetBSD improvements.
1994-08-20 02:23:40 +00:00
dg
b2b5a4aef0 Removed bogus save of CMAP2. 1994-08-19 22:49:42 +00:00
ats
4dde745bf6 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
dg
f3df44cf64 Hmmm...my workaround for Garrett's new exec prototypes wasn't sufficient.
I guess we'll have to not specify what the args to the exec functions
are.
1994-08-19 14:24:16 +00:00
dg
6b1e97340f Terry Lambert's loadable kernel module support w/improvements from the
NetBSD group.
1994-08-19 11:45:29 +00:00
jkh
070c4a2af3 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
jkh
0dd81803dd 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
phk
a8a9b8d89b 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
phk
3fcf3cf41d 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
wollman
f9fc827448 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
dg
bf2d1675b9 Added support for TIOCSTAT ioctl. This allows shells that use raw/cbreak
tty modes to process a control-T and do the right thing.
1994-08-18 09:16:37 +00:00
dg
7b3218c89f 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
dg
c87abe4536 Moved over my fix for vnode lossage when multiple TIOCSCTTY ioctls are
done. This patch was extended to also include a suggested change by
Kirk McKusick which allows the control tty to be reasigned to a different
tty without losing a vnode.
1994-08-18 03:53:38 +00:00
sos
d4c1e31c0f Oops, changed order of include lines...
Reviewed by:
Submitted by:
1994-08-17 19:32:23 +00:00
sos
778497d080 Updated to latest 1.1.5.1+ version
Reviewed by:
Submitted by:
1994-08-17 08:51:59 +00:00
sos
f78983c0b7 Updated to latest version from 1.1.5.1+
Reviewed by:
Submitted by:
1994-08-17 08:51:10 +00:00
wollman
d7a33d9622 Add option KBD_RESET_FAIL_OK so that GCC 2.6 doesn't break my
console.
1994-08-15 22:41:33 +00:00
wollman
d1747d9934 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
ats
95ac71623b 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
ats
1f2a485754 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
7a0e274a1e Pulled over missing ftape.h from 1.1.5
Reviewed by:
Submitted by:	Paul Richards
1994-08-14 01:52:48 +00:00
paul
97b56833d8 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
phk
8c771a08fd The tcp/ip interfaces needed longer timeouts, works fine under 2.0. 1994-08-14 01:46:28 +00:00
wollman
f4b3cc415b Fix conditional-compilation mixup, pointed out by Paul Richards. 1994-08-13 17:45:09 +00:00
dg
9daaac06d0 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
wollman
07e1c7f69d 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
phk
0bd3f2acae 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
dg
8975035777 Added conditionals to make this compile cleanly in FreeBSD 2.0. 1994-08-12 11:42:37 +00:00
dg
cc490038a0 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
dg
0bf5c587d2 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
dg
62b817045c Add missing ifr variable declaration that I forgot when adding MTU
ioctl support.
1994-08-12 06:06:19 +00:00
jkh
0dbbd21c05 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
wollman
af8613405f 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
wollman
ad6af289bc Tell Pentium users their CPU speed. (More changes to make use of this
to come later.)
1994-08-10 23:28:33 +00:00
dg
59538967d9 Initialize lockf pointer. I missed this when I made NFS use the generic
advlock mechanism, and not doing so results in random system crashes.
1994-08-10 19:48:23 +00:00
wollman
f0e3ec0f96 Make it easier for programs to figure out what revision of FreeBSD they
are running under.  Here's how to bootstrap (order is important):

1) Re-compile gcc (just the driver is all you need).
2) Re-compile libc.
3) Re-compile your kernel.  Reboot.
4) cd /usr/src/include; make install

You can now detect the compilation environment with the following code:

#if !defined(__FreeBSD__)
#define __FreeBSD_version 199401
#elif __FreeBSD__ == 1
#define __FreeBSD_version 199405
#else
#include <osreldate.h>
#endif

You can determine the run-time environment by calling the new C library
function getosreldate(), or by examining the MIB variable kern.osreldate.

For the time being, the release date is defined as 199409, which we have
already established as our target.
1994-08-10 06:25:07 +00:00
wollman
27d6cc8585 Handle NMI's in accordance with data in van Gilluwe book. 1994-08-10 04:39:52 +00:00
wollman
4131cde334 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
wollman
dfdb8b7e14 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
dg
90f432ed61 Fixed vm_page_deactivate to deal with getting called with a page that's
not on any queue. This is an old patchkit days fix.

Reviewed by:	John Dyson and David Greenman
Submitted by:	originally by Paul Mackerras
1994-08-10 03:09:37 +00:00
wollman
1a485fa264 Change default security level to -1, so that users don't get bitten by
upcoming makefile change.
1994-08-10 02:41:09 +00:00
dg
4dfef8927a Removed some padding bytes from the nfsnode struct to make the structure
size a power of 2 again. The system complains otherwise - probably because
it wastes space with our malloc scheme otherwise.
1994-08-09 15:10:14 +00:00
jkh
e6e4d38831 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
dg
12543ae820 Removed ntohl and ntohs functions. These were already inlined assembly in
endian.h.
1994-08-09 11:21:44 +00:00
dg
82430e77cf Removed an old, obsolete call to vmmeter(). This is called now in the
schedcpu() routine in kern/kern_synch.c. This extra call to vmmeter() in
vm_glue.c was what was totally messing up the load average calculations.
1994-08-09 10:42:41 +00:00
dg
0b8d504c00 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
dg
8c8cfc5c11 Made lockf advisory locking code generic (rather than ufs specific), and
use it in NFS. This is required both for diskless support and for POSIX
compliance. Note: the support in NFS is only for the local node.

Submitted by:	based on work originally done by Yuval Yurom
1994-08-08 17:31:01 +00:00
jkh
d5d7662740 Fix a compilation-stopping typo; whoops, David - more sleep! :-)
Submitted by:	jkh
1994-08-08 16:45:11 +00:00
wollman
5e00042a4a Run-time configuration of VFS update interval. Old UPDATE_INTERVAL
configuration option is no longer supported.
1994-08-08 15:41:08 +00:00
dg
3080f1fcaf 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
dg
90aed30c20 Detect the "EOF" condition. Specifically, end of partition.
Submitted by:	Bruce Evans
1994-08-08 13:53:55 +00:00
dg
f85fe1cefd Added support for SIOCSIFMTU. 1994-08-08 13:33:16 +00:00
dg
0c715f4417 Process tracing code. Written by Sean Eric Fagan.
Submitted by:	Sean Eric Fagan
1994-08-08 13:00:27 +00:00
dg
51d1879366 Added ioctl support for SIOCSIFMTU. 1994-08-08 12:09:04 +00:00
dg
4eb7e7f1c4 On second thought, better restrict the mtu to between 72-65535...strange
things happen otherwise.
1994-08-08 11:43:44 +00:00
dg
6a73fab070 Enforce the mtu to between the range 1-65535 before calling the driver
ioctl routine.
1994-08-08 10:58:30 +00:00
dg
77ebe221fd Added ioctl support for SIOCGIFMTU and SIOCSIFMTU. These set the per-
interface MTU.
1994-08-08 10:49:26 +00:00
dg
02aff34c6c Take out multicast support for the moment. 1994-08-08 09:14:37 +00:00
dg
9982630be3 Increased ARG_MAX even further...to 64k bytes. 1994-08-08 09:12:43 +00:00
dg
a5f60ab1cf Changed B_AGE policy to work correctly in a world with relatively large
buffer caches. The old policy generally ended up caching nothing.
1994-08-08 09:11:44 +00:00
wollman
ee4032e27e Define a sysctl MIB variable for the YP domain name. 1994-08-08 00:30:12 +00:00
wollman
530c561980 Increase ARG_MAX so that `make clean' in src/lib/libc works again.
(Adding YP pushed it over the limit.)
1994-08-07 23:00:50 +00:00