Commit Graph

1003 Commits

Author SHA1 Message Date
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
90324b078e Whoops, accidently left out some pieces of the munmapfd patch. 1994-09-02 15:06:51 +00:00
David Greenman
dd968eae1a Make sure that uio_resid isn't negative in read(). 1994-09-02 14:04:39 +00:00
David Greenman
01825ed3fa panic if length is < 0 in ffs_truncate(). 1994-09-02 10:24:55 +00:00
David Greenman
8fceb1ba2d 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
David Greenman
b36a2ba1ce munmapfd() was being called with one too few params - bug introduced
during my initial kernel port.
1994-09-02 10:17:30 +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
2fc62994a0 Make olstat() consistent with lstat() - so they both return the same
owner..

Submitted by:	Kirk McKusick
1994-09-02 04:14:44 +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
f992f48043 Fixed bug that caused system processes to run at realtime priority. 1994-09-01 11:20:11 +00:00
David Greenman
55020640dc Changed MAX to max. 1994-09-01 11:06:36 +00:00
David Greenman
60fef21477 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
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
Stefan Eßer
8eae5644c1 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
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
e81097cf46 Quiet down compiler warnings. 1994-08-31 04:45:24 +00:00
David Greenman
da992aeb48 Changed STRC -> P_TRACED. 1994-08-30 20:18:52 +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
David Greenman
a6ca859eb1 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
David Greenman
147db1cbab Added qmin and qmax functions to deal with quad_t's. 1994-08-30 18:19:47 +00:00
David Greenman
e66defe8ab Changed to reclaim memory from other buffers to eliminate memory
thrashing.

Submitted by:	John Dyson
1994-08-30 18:19:11 +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
eda43f1aca 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
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
Jordan K. Hubbard
2de1d01ab8 Make decl/define for Debugger() match reality.
Submitted by:	jkh
1994-08-30 00:12:11 +00:00
Andrey A. Chernov
0e91a83462 Fake floppy partition RAW_PART=2 now 1994-08-29 21:47:11 +00:00
Andrey A. Chernov
39a66415f6 RAW_PART=2 1994-08-29 21:37:49 +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
c594d6c8a3 Raw partition is 2 now 1994-08-29 21:25:11 +00:00
Andrey A. Chernov
3b2dc1fcd6 Raw partition is 2 now 1994-08-29 21:19:27 +00:00
David Greenman
fff93ab600 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
David Greenman
1cdeb653a8 "bogus" fixes from 1.1.5 to work around some cache coherency problems. 1994-08-29 06:09:15 +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
66e2076c9e Reformat recent additions to the same style as the original. 1994-08-28 16:53:35 +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
3b281f5345 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
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
6a7be6e8e0 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
Garrett Wollman
24ea21ced4 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
Jordan K. Hubbard
e6175254f3 Bring back our support for 57K and 115K.
Submitted by:	jkh
1994-08-26 12:07:31 +00:00
Søren Schmidt
acb5f10f46 Oops didn't check that init_sysent.c was generated proberly. Fixed.
Reviewed by:
Submitted by:
1994-08-26 09:33:37 +00:00
Søren Schmidt
75c34c34d6 Changes to new sysent structure. TODO MOD_EXEC support.
Reviewed by:
Submitted by:
1994-08-26 08:42:07 +00:00
Jordan K. Hubbard
9f99fb8402 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
Garrett Wollman
d843c3038f 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
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
Paul Richards
c77e94e6df Stop cvs up -P from removing empty compile directories.
Reviewed by:
Submitted by:
1994-08-25 16:20:16 +00:00
Paul Richards
8a2283e2ac Added ${MACHINE}/boot to build bootblocks.
Submitted by:	Paul Richards
1994-08-25 13:54:28 +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
Bruce Evans
5b96a5b90d Support speeds 57600 and 115200.
Privatize functions.
1994-08-25 10:01:00 +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
c9177dd5f0 Changes preparing for iBCS support
Reviewed by:
Submitted by:
1994-08-24 11:51:46 +00:00
Søren Schmidt
ca70a975e9 New file declaring the sysent structures
Reviewed by:
Submitted by:
1994-08-24 11:47:23 +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
0fd1a014fe 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
David Greenman
e0c0215442 Initialized v_writecount. 1994-08-24 04:06:39 +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
Geoff Rehmet
08a55f5ccd remove unnecessary occurrence of
#ifndef _SYS_TTYCHARS_H_
#define _SYS_TTYCHARS_H_
...
#endif
Submitted by:	Geoff
1994-08-22 19:34:03 +00:00
David Greenman
4f5a3fef1a 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
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
Bruce Evans
c80c3fd1f1 Idempotency #endif was not at end of file or commented. 1994-08-22 14:16:36 +00:00
Bruce Evans
b531a9b1c9 - 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
Bruce Evans
e8496288df - Fix attribute for __pure2.
- Update name of idempotency identifier in comment to match code.
1994-08-22 13:44:39 +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
d9e9aec7ad Another typo by me
Reviewed by:
Submitted by:
1994-08-21 19:19:39 +00:00