Commit Graph

1419 Commits

Author SHA1 Message Date
David Greenman 89384ace85 Fix bug I introduced that broke BPF support. Caused by a byte order problem
in an if () expression. Problem fixed by removing the test for ETHERTYPE_*
before passing packet to higher layers.
1994-11-30 12:08:23 +00:00
Jordan K. Hubbard 1ca6f46d56 Reverse the meaning of previous change.
Now floppy tape support is *disabled* unless you specifically
request otherwise.  Poul wanted it this way, and I guess I'm not going to argue
though it may seem counter-intuitive.  We can always change it back, later.
1994-11-30 12:04:28 +00:00
Justin T. Gibbs c21818c866 Put the sequencer into FASTMODE during initialization. I can now
get up to 8m/sec write performance out of a pd2100 with this driver.
1994-11-29 23:06:54 +00:00
Jordan K. Hubbard 8580379053 Experimental change to floppy driver to NOT probe the floppy tape if
flags & 0x1.  Somebody should build a kernel with this and see if
the floppy-tape damaged people can turn it off properly with userconfig.
I can't reproduce the original problem here.
1994-11-29 15:46:20 +00:00
Stefan Eßer 99e7cabca3 Really deactivated the code that puts scsi stats into dk0.
This should have been disabled for some time, but I had screwed up ...
This made spurious values appear for fd0 in systat, when there was
NCR SCSI activity.
1994-11-28 23:18:46 +00:00
Andreas Schulz 0e01a1ca15 Expand again the SYMTAB_SPACE for LINT. 1994-11-27 14:59:54 +00:00
David Greenman 150f9c68d5 Go back to -O optimization...Bruce's arguments against -O2 are convincing
enough for me.
1994-11-27 14:26:16 +00:00
Joerg Wunsch d439025208 Temporary kludge: treat \r same as \n in input, so working on a
comconsole will behave as expected.  The true problem should be fixed
instead, Bruce' comment for this:

>Anyway, i found the reason for my problems: somehow, ICRNL isn't in
>effect at `userconfig' time (but only for comconsole?), hence only

ICRNL doesn't apply to cngetc().  cnputc() unconditionally does the
equivalent of ONLCR; perhaps cngetc() should unconditionally do the
equivalent of ICRNL.  Ddb must be checking for CR.  Userconfig only
checks for NL.  Userconfig works with syscons because pccngetc()
does the conversion.  This is probably the wrong place to do it.
1994-11-27 13:43:37 +00:00
Poul-Henning Kamp 6128633879 I made a syntax error yesterday.
Submitted by:	John Capo
1994-11-27 01:49:39 +00:00
Andreas Schulz 5aff5aea84 Expand the EISA MAX_SLOTS from 8 to 16. 1994-11-26 23:10:03 +00:00
David Greenman fdfb68ba09 Always put received packets in an mbuf cluster. This simplifies the code
considerably and is measurably faster. Various comment fixes.
1994-11-26 10:51:49 +00:00
Poul-Henning Kamp 4ca88be6e9 Set the bootverbose if so desired.
if (bootverbose)
    Print the geometries the bios passes to us (through the bootblocks).
1994-11-26 09:37:57 +00:00
Poul-Henning Kamp 0a6a925d04 Declare "extern int bootverbose", so that device-drivers and others
easily can find it.
1994-11-26 09:27:58 +00:00
Poul-Henning Kamp 424183f2a4 Implement RB_VERBOSE. This is intended to mean: Print all information which
could be of any use for trouble-shooting problems with boot/devices/drivers.
1994-11-26 09:08:48 +00:00
Andreas Schulz e4c5063e0b Changed the MAX_SLOTS constant from 8 to 16. The EISA bus can have up
to 16 slots.
1994-11-25 22:25:15 +00:00
Stefan Eßer 9ec2a4b3e3 Added #define PROBE_VERBOSE and description (PCI chip set boot messages)
Reviewed by:
Submitted by:
Obtained from:
1994-11-24 20:35:21 +00:00
David Greenman 307d80be7a Moved conversion of ether_type to host byte order out of ethernet drivers
and into ether_input(). It was silly to have bpf want this one way and
ether_input want it another way. Ripped out trailer support from the few
remaining drivers that still had it.
1994-11-24 14:29:38 +00:00
David Greenman 63281ad752 Changed optimization level to -O2. 1994-11-24 14:26:11 +00:00
David Greenman b83f4f55d8 Bunch of fixes from Matt Thomas:
1) make #includes correct
2) fix bugs in address check macros
3) fixed bugs in, and enabled, recopy if heavily fragmented code
4) moved call to bpf tap to be before enqueing packet (probably gratuitous)
5) fixed bug that caused "abnormal interrupt" at boot time/first use
6) added support for reading Zynx address ROM
7) fixed bug that caused broadcasts to not work shortly after booting (only
	manifested if not using multicast - e.g. not in FreeBSD 2.0)
8) fixed spelling errors in comments

Submitted by:	Matt Thomas
1994-11-22 09:47:31 +00:00
Andrey A. Chernov 326d35c650 Fix wrong size check for scroll forward/backward ('S'/'T') 1994-11-21 17:59:29 +00:00
Andrey A. Chernov 22651317ac Attempt to fix scroll forward/ scroll backward bug bringed by vi,
'S' and 'T' use count 1 in fillw() instead of count == n.
1994-11-21 14:36:02 +00:00
Andrey A. Chernov 1afec25476 More intelligent BackTab fix using BTAB special key (unused before) 1994-11-19 23:17:48 +00:00
Andrey A. Chernov db69647720 Fix all keymaps to bring BackTab to life. 1994-11-19 22:58:56 +00:00
Poul-Henning Kamp f143db1a98 I just learned that isa.h is included in assembler files too... 1994-11-19 18:59:04 +00:00
Poul-Henning Kamp f194376568 add
extern u_int atdevbase;       /* offset in virtual memory of ISA io mem */
here for a moment, to get it into BETA
1994-11-19 18:47:57 +00:00
Justin T. Gibbs 88d9617c20 Register with devconfg so we show up in lsdev. 1994-11-18 20:34:30 +00:00
Jordan K. Hubbard 26b39132e4 Put ie0 above ep0. Otherwise, the ie0 probe clobbers it.
Submitted by:	gibbs
1994-11-18 19:10:25 +00:00
Justin T. Gibbs 8c1294dcf2 IO_EISASIZE should be 1 slot, not 2. 1994-11-18 19:01:25 +00:00
Jordan K. Hubbard 9b1096e759 From: wpaul@ctr.columbia.edu (Bill Paul)
Subject: Mea culpa -- small fix for netboot fixes

In accordance with the unavoidable principle sof Murphy's Law, I discovered
that the fixes I recently contributed for the netboot code had some small
flaws in them. Two of them were just typos and had no effect on how the
program functioned. The other one was a missing line from the rootopts and
swapopts functions I created in bootmenu.c, which was supposed to initialize
the NFS sotype flag. It defaults to UDP, and you can change it to TCP with
the rootopts or swapopts commands, but then you can't change it back again.
I originally had a line at the top of each function to reinitialize this
flag, but somehow it got lost in the shuffle, probably because I don't
actually have a need for that flag yet.

Submitted by:	wpaul
1994-11-18 16:29:50 +00:00
Jordan K. Hubbard 8c05edbc74 Boy, was THIS buggered up! Calm the compiler by fixing the obvious
syntax errors.
1994-11-18 13:40:19 +00:00
Poul-Henning Kamp e0985944c1 Improve the case for ST506 disks a bit: Pick up Bios-geometry.
That was the good news.  The bad news is that bad144 is a proper mess,
and I don't have time to fix it now, so you will probably not be able to
use it anyway.
Sorry guys, go out and buy a 100Mb IDE drive and a paddleboard :-(
If somebody wants to pick up on this:  bad144 needs to learn how to
stay inside our slice of the disk.  That's the trick.
1994-11-18 11:27:41 +00:00
Poul-Henning Kamp 66706b4367 Change the message a little bit... 1994-11-18 10:21:31 +00:00
Poul-Henning Kamp 04b734cf24 Extended the SEEKWAIT and RECALWAIT somewhat to avoid annoying messages. 1994-11-18 10:18:36 +00:00
Justin T. Gibbs 771c42f405 Change the include for the sequencer program to point back to the
right place:

include "../../sys/gnu/misc/aic7770/aic7770_seq.h"
1994-11-18 09:14:14 +00:00
Justin T. Gibbs b0c8ba6fea Never but never have a bad hair day and go to the movies.
Go to a single dependancy in files.i386.  Using a .c file for the
sequencer code won't work since I need to know the size of the program,
so we just include the generated .h file as:
	"../../sys/gnu/misc/aic7770/aic7770_seq.h"
Reviewed by:
Submitted by:
Obtained from:
1994-11-18 09:08:01 +00:00
Jordan K. Hubbard 1bb8699814 Whoops - this one's my fault. Put back my changes for seqprog[]. 1994-11-18 09:03:09 +00:00
Jordan K. Hubbard d6e867f326 Get IO_EISASIZE properly defined now.
Reviewed by:
Submitted by:
Obtained from:
1994-11-18 08:22:04 +00:00
Jordan K. Hubbard a32a00c32c aha2742.c was bogus - use aic7770.c instead.
Submitted by:	gibbs
1994-11-18 08:20:56 +00:00
Jordan K. Hubbard 347abd2ee2 Make the sequencer code a .c file instead of a .h file. 1994-11-18 08:14:16 +00:00
Jordan K. Hubbard 6328676293 Totally gut this thing and just use a precompiled gnu/misc/aha274x_seq.c
instead.  The entire scheme just doesn't work as envisioned (hint: think
about make depend as well as all).  Those extremely rare individuals who
actually hack on the sequencer code will know how to keep stuff in sync,
I *do* get the feeling!
1994-11-18 08:06:37 +00:00
Jordan K. Hubbard fc3891cfb4 Define IO_EISASIZE to something I think it *might* be!
Justin's star is sinking rapidly below the horizon here.. :-)
1994-11-18 07:25:02 +00:00
Jordan K. Hubbard 997dad8b39 Adjust the name of the included file to match reality.
Somehow, I don't think this stuff was tested at all! :-(
I really hope that it actually works, though my hopes are steadily diminishing.
Anyone with 27xx/28xx boards in -current is *strongly encouraged* to give this
stuff a shot!  Otherwise, I suspect that we'll be punting this out of
2.0.  I haven't found a single part of Justin's commit that wasn't broken
in some way.
1994-11-18 07:07:28 +00:00
Poul-Henning Kamp b3c99fe3f3 one ) less. 1994-11-18 06:22:11 +00:00
Poul-Henning Kamp 048773d8d9 Grap the bootinfo structure the bootblock passes us. 1994-11-18 05:27:34 +00:00
Poul-Henning Kamp e0abbebf36 Declare the bootinfo structure in the kernel. 1994-11-18 05:26:52 +00:00
Poul-Henning Kamp fbc5b3073e Add space for the bios-geometry in the bootinfo struct. 1994-11-18 05:02:43 +00:00
Poul-Henning Kamp efcdc34fe3 Ask the BIOS about the geometry, and tell the kernel about it. 1994-11-18 05:02:14 +00:00
Jordan K. Hubbard 5d75485098 I think Justin sort of forgot to commit this! :-) 1994-11-18 05:01:06 +00:00
Søren Schmidt 5e146a0129 Added support for the MicroSoft Natural keyboard
Add support for ws_xpixel & ws_ypixel in winsize.
Submitted by:	Natural support suggested by Kaleb Keithley (kaleb@x.org)
1994-11-17 22:03:18 +00:00
Justin T. Gibbs 09faa0cc64 My port of Julian's 1742 driver to work with the Linux aic7770 sequencer
code.
1994-11-17 20:22:31 +00:00
Justin T. Gibbs cbb8b164f0 New device-driver entries for the aic7770 driver. These use new features
of config so YOU MUST RECOMPILE CONFIG.  Modifying config was the cleanest
solution to integrating this driver into the tree which will become more
obvious in the next commit.
1994-11-17 20:20:54 +00:00
David Greenman 41ec615889 Fixed rather serious bug where the interface wasn't started after it was
stopped in ed_setrcr(). I'm amazed that the driver worked at all. Thanks to
John Hay for pointing this out.
1994-11-17 14:42:27 +00:00
Jordan K. Hubbard 68cbb04819 Many fixes from Bill Paul:
Smack the netboot program around so that it will allow the user to
  specify mount options.  [So that you can boot from a privileged port]

  Change the default boot image name in netboot to /kernel, then strip
  the leading slash when actually going out to get the NFS file handle.

  Added support for 3Com 3c503 cards. Also added another command to
  the (trans) that allows you to switch the 3Com's on-board transceiver
  on and off. (ether.c, ether.h, bootmenu.c)

  Modified the Makefile to support new compile-time options for 3c503
  cards:

  -DINCLUDE_3COM                Include support for 3c503
  -D_3COM_BASE=0x300            Define 3c503 base i/o address (if not
                                specified, 0x300 is the default)
  -D_3COM_USE_AUI               Disable the 3c503's transceiver by
                                default (without this flag the transceiver
                                is on by default)
1994-11-17 12:16:07 +00:00
Poul-Henning Kamp ff24bee616 Fix a panic I might have seen, or at least could see some day if I havn't
already.
1994-11-16 06:09:29 +00:00
Bruce Evans e5b58b781b The previous revision forgot to define fatal_if_no_DDB() when there is DDB. 1994-11-16 02:45:36 +00:00
David Greenman 288c2640aa Allow MAXMEM to be larger than the detected physical memory. This change
was supposed to have already been made, but got botched somewhere.
Don't clobber the last page of memory (where the message buffer is). Some
BIOS don't gratuitously wipe it out on reboot.
1994-11-16 00:41:06 +00:00
Bruce Evans ff030ea17d Add prototype for Debugger(). 1994-11-15 14:55:25 +00:00
Bruce Evans 441799e34f Fix it to compile without a leftover ddb.h.
Remove bogus declaration of Debugger().  Call Debugger() even if DDB is
not defined, but still call panic() after Debugger() returns, although
most other SCSI drivers just call Debugger().
1994-11-15 14:54:13 +00:00
Bruce Evans b1234dc0cd Remove bogus declaration of Debugger(). Call Debugger() even if DDB is
not defined, but still call panic() after Debugger() returns, although
most other SCSI drivers just call Debugger().
1994-11-15 14:53:09 +00:00
Bruce Evans d0c8f50566 Don't define KERNEL for compiling genassym. The prototype for the system
printf() is inconsistent with the prototype for the library printf() and
gets declared if DIAGNOSTIC is defined because <vm/vm_page.h> includes
<sys/systm.h>.
1994-11-15 14:43:45 +00:00
Bruce Evans 84fac47641 Include <sys/disklabel.h> to prepare for slices. Don't include the
unused <sys/dkbad.h>.
1994-11-15 14:34:42 +00:00
Bruce Evans 5783a8ffe5 The SYMTAB_SPACE bloatometer was 40% out of date. 1994-11-15 14:28:46 +00:00
Bruce Evans b0d1e6de04 Make gdt_segs[] public again for APM.
Make ldt[] public again and restore currentldt and _default_ldt for
USER_LDT.
1994-11-15 14:12:55 +00:00
Bruce Evans dc4de4ca23 Fix type mismatches exposed by a recently added prototype. 1994-11-15 14:09:18 +00:00
Andrey A. Chernov 775fca0065 Remove unused variable from previous commit 1994-11-14 19:32:11 +00:00
Andrey A. Chernov c26acd6574 Add model autodetection code, idea from burgess@s069.infonet.net
This change affects probe printout, disklabel, devconf stuff
1994-11-14 19:25:43 +00:00
Bruce Evans 004bedeb68 Rewrite almost everything.
Alphabetize.

Write all i/o functions in sleep so that we don't use anything from
NetBSD.

Restore the correct type of u_int for ports.  This saves a whole cycle
per i/o on 486's.

Change `inline' back to __inline to avoid compiler warnings with
-Wreally-all.

Don't implement bdb() unless BDE_DEBUGGER is defined.  Declare bdb_exists
outside the function to avoid hundreds of compiler warnings.

Let the compiler pick the register in asms if possible.

Implement ffs() using inline asm().  gcc provides a slightly different
one.  It was broken in gcc-2.4.5 but works now.  Declaring a correct
version inline ensures getting a correct version.  FreeBSD-1.1.5 has
an slow inline version but FreeBSD-2.0 has a library version (which
probably never gets used).

Do inb() and outb() without using %edx for constant ports below 0x100.

Remove casts to the same type in queue functions.

Declare prototypes for everything implemented i386/*.s and also for
everything that is normally implemented as an inline here (I don't
like the current complete dependency on gcc).  Ifdef out the prototypes
that are declared elsewhere.  THere should be a separate header to
declare things implemented in i386/*.s, but then it would be harder
to override declarations with inlines.

${UII}
1994-11-14 15:04:06 +00:00
Bruce Evans 663f148514 Log processes that exit with an masked npx exception that would trap
with the current default exception (un)mask.  There should be no such
processes unless you change the mask.  Someday the mask should be
changed to the IEEE default of everything masked.  The npx state
gets saved so that it can be checked and this may have the side effect
of fixing a bug that was reported for 1.1.5.  (npx exceptions may
sometimes leak across exits and clobber another process.  I can't see
how this can happen.)

Get some missing/wrong declarations from headers now that the headers
have them.
1994-11-14 14:59:06 +00:00
Bruce Evans e77e2e6ca1 Oops, the previous commit got the diff for the log message instead of
the following.

Move declarations to and from <machine/segments.h>.  Make segment stuff
static if possible.

Remove unused (although initialized) global variables _default_ldt,
currentldt, _gsel_tss (rename the latter to the auto variable
gtel_tss).

Use "correct" and consistent types for interrupt handlers.

Remove a mailing address from the code.

Fix type mismatches found by adding prototypes.
1994-11-14 14:23:54 +00:00
Bruce Evans 30008dda2d (Bogus several hundred line diff for a log message deleted. See rev 1.91
for the intended log message. -DG)
1994-11-14 14:19:54 +00:00
Bruce Evans 095b0028db Move declarations of atdevbase and rtcin() to cpufunc.h (a less wrong
place).

Fix spelling error.

Uniformize idempotency ifdef.
1994-11-14 14:19:10 +00:00
Bruce Evans 040f100044 Remove 1.5+K of bloat for unused idt entries.
Partly support BDE_DEBUGGER.  Still broken by conflict with APM.  Does
nothing if BDE_DEBUGGER is not defined.

Clean up prototypes and data declarations.  Declare most of the segment
functions that are implemented in support.s.  Make data private in
machdep.c if possible.

Parenthesize expressions in macros properly!

${Uniformize idempotency ifdef}.
1994-11-14 14:18:15 +00:00
Bruce Evans e00dc32993 Remove extra idempotency ifdef and uniformize the other one.
Comment about support for 4 different spellings of KERNEL.
1994-11-14 14:13:13 +00:00
Bruce Evans 3bbb00e1a3 Declare inline functions as __inline and with new-style parameter lists
to avoid compiler warnings.

Clean up prototypes: alphabetize; don't use redundant `extern' or
meaningless `extern inline'.

Uniformize idempotency ifdef.
1994-11-14 14:12:24 +00:00
Bruce Evans 36633bf49d Undo a previous change. <sys/disklabel.h> was broken, not these files. 1994-11-14 13:22:52 +00:00
Bruce Evans 2c02e8a20a Replace strtol() by strtoul() so that "negative" addresses and masks don't
get truncated to LONG_MAX.  Don't lobotomize the merged library source.

Make all private data static.

Use int_parms for the i/o "address" since the "address" is really a number
and is represented as an int.

Add command `flags' to allow changing device flags.

Fix scrolling of device listing.  Only scrolling of the current devtab
was controlled.  Reprint the header after scrolling.

Rename commands and change strings to match their config(8) keywords:

	io -> port
	IOaddr -> port
	mem -> iomem (abbreviation is io :-()
	MemAddr -> iomem
	case changes

Don't use NULL for ASCII NUL.

Call strtoul() with base 0 for both numbers and addresses so that input
is consistent and hex and octal can be used for numbers.

Fix entry of irq number.  Check the range at no extra cost.  It wasn't
possible to enter irq -1.

Format device listing better.  Large numbers (such as 0xffffffff for the
GENERIC lpt0 port) messed up the formatting.

Show the unit number in the device listing.  Comment about the fields
that aren't shown.
1994-11-14 03:22:28 +00:00
Nate Williams 0dc02ef480 Fixed a mis-spelling. 1994-11-13 21:19:18 +00:00
Nate Williams 7145a92269 Changed output message in interrupt-driven lp device from
'TCP/IP interface' to 'TCP/IP capable interface' to avoid confusion.
1994-11-13 21:14:30 +00:00
David Greenman 07d0d0fc9c Added support for SIOCSIFMTU ioctl. Fixed bug that caused panic at boot time
related to interrupts being enabled before the device attach. The interrupt
should be mapped *after* the device attach.
1994-11-13 12:39:38 +00:00
Justin T. Gibbs e424e8bfac Add ep0 line to kernel config files. 1994-11-13 10:17:07 +00:00
Justin T. Gibbs 72f30c2bd3 Andres Vega Garcia's improvements to the ep driver. This driver is a merging
of the 1.1.5 driver, a recent version of the NetBSD driver, Andres'
transmission start threshold code, and all other relavent changes to the driver
since it was brought into 2.0.  The multicast support from NetBSD has not be
folded in yet.  I've tested it under high loads for two weeks and it is now
robust enough to be included in the GENERIC kernel.
Reviewed by: gibbs
Submitted by:	vega@sophia.inria.fr (Andres Vega Garcia)
1994-11-13 10:12:37 +00:00
Nate Williams 412ac969ed Add Matt Thomas' le0 DEPCA driver to the GENERIC kernel. This works
but I can't test to see if it walks on other ethernet drivers.  Can the
install folks add this driver to the install script?
1994-11-13 09:42:07 +00:00
David Greenman ef53d2f8b6 Nuked ed2 - it was added for the common 16bit card case where the
irq is 10. This is auto-sensed/configured now in the 'ed' driver.
1994-11-13 07:20:03 +00:00
David Greenman fed69e2fd2 In cases where it is possible, use the card's configured irq rather than
the one compiled into the kernel. Left in some commented-out shared memory
performance test code.
1994-11-13 07:17:46 +00:00
Jordan K. Hubbard 501cc59d80 I *almost* had it right. Skip over the rest of the command if it's
abbreviated.
1994-11-13 01:55:33 +00:00
Jordan K. Hubbard 95ea0c1390 Make the command set actually work the way I'd intended - you can abbrevate
commands now, as long as whatever you abbreviate them to remains unique.
1994-11-13 00:57:06 +00:00
Jordan K. Hubbard 7bb4591ed9 Whoops, make the comment match the new reality while we're at it. 1994-11-13 00:43:29 +00:00
Jordan K. Hubbard b5cd0f92f4 mem's 2nd arg was incorrectly defined as an integer, not address parameter.
I found this out the hard way when I went to do:

	mem ed0 0xe8000

And found out that I had to enter the second parameter in decimal.. :-)
1994-11-13 00:42:01 +00:00
Jordan K. Hubbard 5231231d03 Add back ed2. Harrumph.. 1994-11-12 20:27:24 +00:00
Andrey A. Chernov f1c0b3ad97 Implement CDIOCALLOW as dummy function (for xcdplayer) 1994-11-12 18:18:20 +00:00
Andrey A. Chernov b27a526947 Revision 1.6 fix was lost: don't write 0 to RTC_DIAG 1994-11-12 16:24:54 +00:00
Andrey A. Chernov 9c971e7df2 Changes from bugress@s069.infonet.net NOT installed (expect one
cosmetique) because we already have right things there or his changes
are incorrect.
Fix mcd_subchan to return position, inspired by idea from
bugress@s069.infonet.net, but different implementation.
1994-11-12 14:19:11 +00:00
Andrey A. Chernov 866c34f93a Add and reorganize new MCD commands from bugress@s069.infonet.net
No functionality changes yet, will be next step
1994-11-12 13:26:13 +00:00
Jordan K. Hubbard 794a798905 ed2 was actually an impossible entry to reach! 1994-11-12 06:12:01 +00:00
Poul-Henning Kamp e113d7633d Make a kernel sans FFS possible. 1994-11-12 01:47:43 +00:00
David Greenman e50e132aa8 Added 'de' ethernet driver. 1994-11-11 05:48:49 +00:00
David Greenman 027f8c4e0f Convert irq to a bitmask before putting in id_irq.
Fixed bugs related to the 'more' code.
1994-11-11 05:28:59 +00:00
Jordan K. Hubbard 49445644f1 Enable floppy-tape support. 1994-11-10 23:46:31 +00:00
Andreas Schulz 1113f91681 Shut up a compiler warning about a missing cast. 1994-11-10 23:14:55 +00:00
Andrey A. Chernov 3b8f1cfc05 Use adjkerntz into inittodr too (for APM stuff) 1994-11-10 12:53:13 +00:00
David Greenman 6e876d0d60 Added missing call to bpf on the transmit side. Nuked revision log. 1994-11-10 02:56:48 +00:00
David Greenman e754e0f30f Fixed bug that somehow made it into here: the ifp must be stored in the
mbuf header for received packets. Minor performance optimizations. Removed
#ifdef MULTICAST's as this isn't optional in our kernel.
1994-11-09 15:12:44 +00:00
Bruce Evans 86a8bb8a33 Don't declare DELAY() here. Callers should include <machine/clock.h>. 1994-11-09 00:51:38 +00:00
Poul-Henning Kamp 9daafd5125 If we have no MBR, we need to allow the poor guy to write one... 1994-11-08 10:35:52 +00:00
Jordan K. Hubbard ada9d061d4 Add back ze0 driver; somebody took it out of _both_ LINT and GENERIC,
kinda hosing the laptop folks.
1994-11-08 07:39:28 +00:00
Andrey A. Chernov 4b69fb52f4 Change "fdx: Floppy not writeable" to less confusing
"fdx: write protected". Not writeable maybe means bad, etc.
1994-11-08 06:34:04 +00:00
Jordan K. Hubbard 6febd9aaf5 From: Lars Fredriksen <fredriks@mcs.com>
Here is a patch to fd.c that will check to make sure the floppy
is not writeprotected when you try to open the device RW.
Submitted by:	lars
1994-11-08 05:42:10 +00:00
Jordan K. Hubbard 5755e2597a From: Lars Fredriksen <fredriks@mcs.com>
Here is the improved probe for the mse (Bus Mouse) device driver. I
have been running with this under 1.1.5.1 as well as 2.0 without a hitch for
quite a while.
Submitted by:	lars
1994-11-08 05:41:34 +00:00
Jordan K. Hubbard 4858d301c6 I noticed some weird english had crept in - fix it up a bit. 1994-11-08 02:53:42 +00:00
Jordan K. Hubbard 6c89ff0342 Cosmetic - the help screen didn't have its header properly formatted. Needed
an extra tab.
1994-11-08 02:25:20 +00:00
David Greenman 3dea9c24ac Improved the user interface:
1) Added file list capability via '?'.
2) Arranged usage info to be more unix-like.
3) Fixed backspace over prompt annoyance.
1994-11-07 11:26:30 +00:00
Poul-Henning Kamp 6bc92e913f Calling sync will panic you more often than not. 1994-11-07 04:23:58 +00:00
Poul-Henning Kamp 98020fdd6c Added a kernel variable, "dodump" defaulting to zero, which disables dumps.
Somebody should make a mib variable for it.
Just now it is pointless to dump the kernel, since we have nothing which
can read the dump.
Furthermore is should never be the default to dump.
	options	DODUMP
will enable dumps.
1994-11-07 03:51:32 +00:00
Poul-Henning Kamp 89c8eae117 Initialize %fs and %gs from %ds.
This seems to stabilize the APM-bios on my Gateway Handbook, and it makes
sense in general too.
1994-11-06 22:18:45 +00:00
David Greenman fc64ae2b4e Do a better job at preparing registers for the new process in setregs()
by setting them all to a known state.
1994-11-06 04:46:53 +00:00
Bruce Evans 2c305bdb3c Nuke the losing version of microtime. The assembler version now works
for all reasonable HZ's.  HZ > 1000 doesn't work because of sloppy
conversions in hzto() (division by (tick / 1000) == 0).  This was
fixed in 1.1.5.

Eliminate some extern declarations by including the appropriate header
files that now contain appropriate declarations.
1994-11-06 01:33:03 +00:00
Bruce Evans 94096616ab Public function declarations moved to <machine/npx.h>. 1994-11-06 00:58:06 +00:00
Bruce Evans 5eb4d8cfd4 Abort writes if a signal is received (don't ignore the value returned by
tsleep()).  Try `dd if=/dev/zero of=/dev/pcaudio bs=640k count=1'.  The
write takes a few hundred seconds to drain, and if it is killed by a
signal, it still takes a few hundred seconds to drain and all of those
seconds are spent busy-waiting.

Clean up includes and declarations.  Remove bogus casts of args to
timeout functions.
1994-11-06 00:46:21 +00:00
Bruce Evans 4a7472ce04 The style in my patch011 is inconsistent and out of date. It should
have been changed _before_ committing the patch.
1994-11-06 00:30:16 +00:00
Bruce Evans 2f31d30b01 Work around microtime() enabling interrupts. 1994-11-06 00:23:45 +00:00
Bruce Evans a3b33372b9 Maintain a new variable `timer0_overflow_threshold' so that microtime()
doesn't have to calculate it every call.

Rename `timer0_prescale' to `timer0_prescaler_count' and maintain it
correctly.  Previously we lost a few 8253 cycles for every "prescaled"
clock interrupt, and the lossage grows rapidly at 16 KHz.  Now we
only lose a few cycles for every standard clock interrupt.

Rename `*_divisor' to `*_max_count'.

Do the calculation of TIMER_DIV(rate) only once instead of 3 times each
time the rate is changed.

Don't allow preposterously large interrupt rates.  Bug fixes elsewhere
should allow the system to survive rates that saturate the system, however.

Clean up declarations.

Include <machine/clock.h> to check our own declarations.
1994-11-05 23:55:07 +00:00
Bruce Evans ae406484f0 Fix a bug introduced between 1.1 and 1.1.5. Loading the time was moved
outside the critical region.

Make it work with 2.0.  It wasn't designed to be called at splclock().

Make it work with prescaling.  The overflow threshold was bogus.

Make it work for any HZ.  Side effect of fixing prescaling.

Speed it up.  Allocate registers better.  Reduce multiplication and
division to multiplication and a shift.  Speed is now 5-6 usec on a
486DX/33, was about 3 usec more.

Optimize for the non-pentium case.  The pentium code got moved around
a bit and hasn't been tested.

Change #include's to 2.0 style.
1994-11-05 23:53:46 +00:00
Bruce Evans a1ca704e29 Declare all functions exported by the npx driver.
Uniformize idempotency ifdefs.
1994-11-05 22:59:09 +00:00
Bruce Evans 65af765646 Declare the full uglyness of the interfaces to the clock driver (except
things declared in machine-independent files).
1994-11-05 22:51:17 +00:00
Bruce Evans c342b9faa3 Disable the direct call from hardclock() to softclock(). Support
for it is incomplete and buggy.  There is no problem unless Xintr0()
is reentered or should be reentered, but high clock interrupt
frequencies for pcaudio cause Xintr0() to be reentered (or clock
ticks to be lost when Xintr0() should have been reentered but
wasn't), and we lose little by delaying the call to softclock().

Move declarations related to the clock driver to clock.h.

Move declarations related to the npx driver to npx.h.

Clean up the remaining declarations.
1994-11-05 22:44:34 +00:00
Andrey A. Chernov c897ebc21a Change -O2 to -O
With each gcc version -O2 can cause absolutely unpredicatable things
Second stage boot still fits in allowed size
1994-11-05 21:06:16 +00:00
Jordan K. Hubbard 2405ced306 Argh! Missing quotes. 1994-11-05 07:41:08 +00:00
Jordan K. Hubbard 4525c93ebf We need CD9660 and MSDOS filesystems built-in if the floppy is to have
a hope of getting at these types of filesystems without dragging all
the LKM stuff in.
1994-11-05 07:38:50 +00:00
Poul-Henning Kamp 5ffd7168ce Last commit was bogus. Changed b_bsize to b_bcount. 1994-11-04 05:21:17 +00:00
Jordan K. Hubbard fb59d6ab65 __386BSD__ -> __FreeBSD__
I know that many of these entries are bogus and need to be revisited,
but let's get the tree working again for now and then do a pass through
looking at all the __FreeBSD__ entries, shall we?
1994-11-04 02:14:13 +00:00
Joerg Wunsch f73af18476 |Both, the wd and the sd driver do not reject invalid request of odd
|sizes. They simply pass them to the disks, which usually causes
|fatal errors then.
1994-11-03 18:20:15 +00:00
Paul Traina c7aed1527d Assign character device 20 to be the user reserved device. 1994-11-03 17:49:01 +00:00
Jordan K. Hubbard b851eb1523 Eliminate USERCONFIG. This option is now standard. 1994-11-03 15:51:38 +00:00
Jordan K. Hubbard 8cf0da9ceb Unconditionalize USERCONFIG. Uh, thanks, David. 1994-11-03 14:57:54 +00:00
Andrey A. Chernov 5a3391bf7f Fix for 'pstat -t' works on vtys
Submitted by: jhay@mikom.csir.co.za
1994-11-03 11:41:34 +00:00
Jordan K. Hubbard f7f7fee018 Whoops - make sure TRUE and FALSE are defined now. 1994-11-03 05:02:41 +00:00
Jordan K. Hubbard 906c074f8d Add extra id_enabled flag for userconfig to manipulate. If id_enabled
is FALSE, the device will not be probed.  id_enabled is TRUE by default.
1994-11-03 04:15:04 +00:00
Jordan K. Hubbard be4bdae3ac Make the enable & disable commands finally work. 1994-11-03 04:14:23 +00:00
Gary Palmer 97555463a4 Cosmetic changes in comment at start (it's no longer a GENERICAH config
file!)
1994-11-03 01:46:59 +00:00
Stefan Eßer 66da596420 Submitted by:
Added hooks for "lsdev" ...
PCI devices should need no individual code for lsdev.
1994-11-02 23:47:14 +00:00
Stefan Eßer 1b851d5210 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Modifications required for PCI support.
1994-11-02 23:44:11 +00:00
Jordan K. Hubbard 0729dc4924 Whoops. When you `ls' a kernel with lots and lots of devices, guess what?
It scrolls off your screen! :-)  Add crude "more" type processing.
1994-11-02 09:30:27 +00:00
Jordan K. Hubbard 5e235068bc Back out Joerg's latest commit. Sorry, Joerg, but this breaks the install
floppies now.  I'm not sure why, but things hang when it gets to the
`changing root to fd0c' part.  Without your latest commit, everything works
fine.  Maybe you can figure out what you broke after ALPHA! :)
1994-11-02 09:08:40 +00:00
Garrett Wollman d29895dc1a Fix Jordan's misplaced IPFIREWALL option. Fix style of other previous commits.
Document ARP_PROXYALL.
1994-11-02 01:11:03 +00:00
Bruce Evans f23c6e08df Fix a very old, very stupid race clearing the mask bit for the current
interrupt.  Other bits in imen and icu+1 are volatile.

INTREN() and INTRDIS() in icu.h need to be changed similarly.

Change #include's to 2.0 style.
1994-11-01 23:29:50 +00:00
Bruce Evans 25dd4b72b8 Only log errors every second (instead of every 5-10 msec) and check for
errors at a lower ipl.  clist starvation problems can cause hundreds of
tty buffer overflows per second and logging them all amplified the
problems.  This problem was less serious in 1.1.5.

Avoid a race in the check for starting a new block of output.  com_events
was sometimes messed up and siopoll() looped endlessly.  This bug was
introduced in 2.0.

Clean up previous 2 commits.  Rename sio_registerdev() to sioregisterdev()
to match the (bad) surrounding naming conventions.  There should be a
generic_registerdev().
1994-11-01 23:09:29 +00:00
Jordan K. Hubbard 2ee03071cb John Hay's patches to prevent missing gateway from dumping core.
Submitted by:	jhay
1994-11-01 22:12:35 +00:00
Andrey A. Chernov 0c9159ecd7 DMA automode patch, fix SB16 clicks
Submitted by: tim@cs.city.ac.uk
1994-11-01 17:26:50 +00:00
Andrey A. Chernov 0c8e8c63a8 Implement CPU_ADJKERNTZ in different way: call resettodr()
on writting this variable. adjkerntz pgm changes will follow.
1994-11-01 06:04:12 +00:00
Paul Traina 5ea2be93cd Add kernel hooks for /dev/vatio -- a minimalistic BSD audio driver emulator
created by Amancio Hasty (specificly, this, in conjunction with his sound
driver mods for dual-mode DMA will allow VAT compiled for BSD/386 1.1 to
run under FreeBSD 2.x.)
1994-11-01 01:47:22 +00:00
Jordan K. Hubbard e84bf57e40 Expunge the stain I left upon this code. My '/' fix was utterly
bogus.  Thanks, Boyd!
1994-10-31 18:00:06 +00:00
Joerg Wunsch 0cdf7aff6d Added hooks for an easy drop-in of the pcvt concole driver.
Don't panic:-), this is simple stuff just doing exactly the same as for syscons.
(files.i386 did already contain the necessary stuff.)
1994-10-31 17:20:15 +00:00
Joerg Wunsch 95b926abab Documented the FDSEEKWAIT option. 1994-10-30 20:57:07 +00:00
Bruce Evans 14b1ec3ac6 Don't include isa.c! How did it link?
Otherwise clean up the includes.  Don't include anything included by
param.h.  Do include systm.h and cons.h to avoid satisfy -Wimplicit.
Don't include console.h or use NOKEY because these are for syscons
and we use generic consoles.

Don't follow null pointer for command "ls -lrt" - don't allow extra
args but do allow trailing blanks.

Check for invalid device numbers.  strtol() failures are now checked
for in all cases, but not carefully enough.  We should check for
trailing junk, allow any base in all cases (just like config) and
handle signs better . (Use strtoul not strtol and cast by assignment
to the correct type - always an integral type, PARM_ADDR is bogus.
Hex numbers > 0x7fffffff can't be entered now.  0xffffffff has to
be entered as -1.)
1994-10-30 20:44:20 +00:00
Bruce Evans ab4bc4b293 Fix selector arg to match the (missing) prototype for sdtossd().
Cosmetic.

Return from trap() if trap_fatal() returns.  trap_fatal() isn't
fatal if you have ddb.  Returning from trap() is usually the right
thing to do and much better than falling through.
1994-10-30 20:25:21 +00:00
Bruce Evans 6d520d66e4 Fix selector arg to match the (missing) prototype for ssdtosd().
Cosmetic.
1994-10-30 20:23:23 +00:00
Bruce Evans 54d024041c locore.s:
Build a dummy frame at the top of tmpstk to help debuggers trace the stack
when the system is idle.

swtch.s: idle():
Initialize the frame pointer so that debuggers don't try to trace a bogus
stack.

Load the frame pointer, load the stack pointer and switch out the old
stack in the unique order that never leaves one of the pointers pointers
invalid so that debuggers can trace idle().  Disabling interrupts
provides sufficient validity for normal operation, but debuggers use
(trace) traps.
1994-10-30 20:09:13 +00:00
Joerg Wunsch 5d04c702eb Several minor fixes to the floppy driver:
.	avoid resetting the FDC every time the last motor is going off;
	instead, give it a 60-second period for possible later reactivation.
	This prevents us from needing to recalibrate the FDC too often,
	but still allows for an ``automagic error recovery', just in case the
	controller is absolutely stuck. (Simply wait for 60 seconds, and
	try it again.)

.	made the floppy head settle time after a seek a constant
	that might be overridden by a config option. (Well, actually the
	divisor of the settle time). Pepople often reported problems with
	their floppies, so i need a simply mechanism that allows them
	to play with that value. (I personally cannot find any problem
	on *my* drives.)

.	implement the FD_DEBUG ioctl command, in case the driver
	is compiled with DEBUG turned on.

.	removed a bogus parameter from a printf; the remaining warnings
	from gcc -Wall seem to be warnings about the %b format gcc cannot
	understand

.	rearrange Garett's code to fit better in the existing structure
	of #define/type/function ordering.

.	make everything fit into 79 columns again.
1994-10-30 20:04:40 +00:00
Joerg Wunsch c20c8046d5 Included the command definition for FD_DEBUG.
This way, it's possible for a user to activate/deactivate floppy driver
debugging, even if (s)he doesn't like the overhead of running DDB.
Since some ppl tend to have problems with their drives, this might be
valuable for investigations.
1994-10-30 19:17:39 +00:00
Andreas Schulz 339b10f15d Submitted by: Paul F. Werkowski
Add a quirk line for the SONY SDT-5000 like it is done for the WangDAT tapes.
1994-10-30 00:30:27 +00:00
Jordan K. Hubbard 904c1a11ac Make this documentation more sane in the context of 2.0. 1994-10-29 13:13:40 +00:00
Poul-Henning Kamp 67e9c49975 Add back a "is" variable which was removed by accident. 1994-10-29 10:19:32 +00:00
Poul-Henning Kamp 0f5a69189b A new Makefile, which is more our kind of makefile.
Based on Martins makefile, made by Rod, briefly tested by me
1994-10-28 22:13:22 +00:00
Poul-Henning Kamp cacd1ee89f Add netboot to the world of make. 1994-10-28 22:11:50 +00:00
David Greenman c232824e58 Fixed Jordan's editing mistake that caused this to puke. 1994-10-28 18:50:36 +00:00
Jordan K. Hubbard 100ba1a617 IP Firewall code from Daniel Boulet and J.S.Antsilevich
Submitted by:	danny ugen
1994-10-28 15:09:49 +00:00
Jordan K. Hubbard 94a92413cd From: fredriks@mcs.com (Lars Fredriksen)
...
It turns out that these files do not include <sys/dkbad.h> before
<sys/disklabel.h>.
Submitted by:	fredriks
1994-10-28 12:42:05 +00:00
Rodney W. Grimes a5d34029d5 Removed extra slash between ${DESTDIR} and ${BINDIR}, noticed while working
on Makefile for netboot.
1994-10-28 07:54:13 +00:00
Poul-Henning Kamp 63f7a09266 Urg! the netboot/Makefile is in a miserable state. 1994-10-28 04:56:51 +00:00
Poul-Henning Kamp 1c6a0e235f This concludes the CVS-surgery. This makefile now just points at the subdir's. 1994-10-28 04:46:08 +00:00
Jordan K. Hubbard a3eb9fc56a Note that enable and disable don't do anything, at present.
Make ^U/^X actually work.
1994-10-28 02:37:57 +00:00
Jordan K. Hubbard 54c7241bd3 Julian Elischer's disklabel fixes. 1994-10-27 20:45:13 +00:00
Stefan Eßer c3739b59ec Change some compile time defaults, which may be overridden from the
kernel config file by options lines.
Now the default settings are FAST SCSI, max. 4 TAGS, WIDE transfers,
if supported by the hardware ...
1994-10-27 20:12:46 +00:00
Søren Schmidt f809acea7c Added device registration stuff. 1994-10-27 08:03:15 +00:00
Poul-Henning Kamp a95f669560 The other half of patch011, read Numlck state from bios. 1994-10-27 05:47:09 +00:00
Poul-Henning Kamp c5bd56befa Extra intr's have nothing to do with LAPTOP.
Made five-strikes-we-shut-up for timeouts.
Inspired by:  bde in 1.1.5.1-patch011
1994-10-27 05:39:12 +00:00
Poul-Henning Kamp b51250ff13 Made an annoying printf #ifdef SEADEBUG 1994-10-27 05:23:09 +00:00
Poul-Henning Kamp e47655c507 Fix a bug which had crept in (an almost certain panic).
Remove inline assembler.
Avoid mbuf spaghetti by using m_devget.
1994-10-27 05:08:28 +00:00
Bruce Evans f7bf7f894d Fix compiler warnings. 1994-10-26 22:01:11 +00:00
Bruce Evans 51c7f756fe Move definition and initialization of video_mode_pointer to syscons.c. 1994-10-26 21:52:25 +00:00
Bruce Evans 0d55b76505 Fix initialization of video_mode_ptr. It only worked if the segments
in the far pointers are multiples of 4K (as is normal when the video
BIOS is at seg 0xc000).  Disallow mode switching if the pointer is bad.

Use a new pa_to_va() macro for all BIOS and video addresses in syscons.
1994-10-26 21:51:22 +00:00
Garrett Wollman d1a27c8dab Stylistic changes. 1994-10-26 21:10:13 +00:00
Jordan K. Hubbard dc6e5623e1 Gross hack to make kernel names not starting with '/' start with '/'. 1994-10-26 20:46:05 +00:00
Jordan K. Hubbard 9e8367bd7a Adjust boot message to conform to reality. 1994-10-26 20:22:10 +00:00
Jordan K. Hubbard cb72513713 Enable USERCONFIG and document it in LINT. 1994-10-26 19:20:27 +00:00
Jordan K. Hubbard 8d8aa3c30b Add userconfig. 1994-10-26 19:19:12 +00:00
Jordan K. Hubbard 8fa8c074d9 Add my user configuration utility - userconfig().
David wrote the I/O routines for this thing and deserves most of the
credit for thinking the whole idea up.
1994-10-26 19:18:28 +00:00
Jordan K. Hubbard 77283658cb Invoke userconfig() if kernel compiled with options USERCONFIG and
-c flag used.
1994-10-26 18:35:02 +00:00
Jordan K. Hubbard 73ade464e2 Remove the code for asking for a filesystem floppy. We don't need
it anymore, and neither David nor I can think of a reasonable
mechanism to stick in its place.
1994-10-26 13:46:34 +00:00
Jordan K. Hubbard aa20f6195d Add RB_CONFIG flag. 1994-10-26 13:18:49 +00:00
Jordan K. Hubbard 141066ed62 Fix two very minor nits, one of which caused a warning (no return type for
main).
1994-10-26 10:18:24 +00:00
Poul-Henning Kamp 47c3575419 Fixed a couple of wrong printfs (too few arguments supplied). Also zapped
a couple of unused vars at the same time.  Added a #include <sys/proc.h>
to isa.c while here anyway.
1994-10-26 00:16:20 +00:00
Stefan Eßer 422cdd6132 Modified fifth parameter (imask) to register_intr() according to
new definition of that function.
1994-10-25 23:09:08 +00:00
Stefan Eßer b56fdd903a BEWARE: Interface change of register_intr() !
Changed the fifth parameter to register_intr() from u_int mask into
u_int *maskptr in preparation for new features (shared interrupts and
removable devices, eg. for PCMCIA).
1994-10-25 23:06:16 +00:00
Stefan Eßer 8627141c50 BEWARE: Interface change of register_intr() !
Changed the fifth parameter to register_intr() from u_int mask into
u_int *maskptr in preparation for new features (shared interrupts and
removable devices, eg. for PCMCIA).
1994-10-25 22:35:12 +00:00
Bruce Evans 40974c748a Never strip the kernel.
Recommend -Wimplicit in CWARNFLAGS next.  There are still a few hundred
potential arg mismatches because no function declaration is in scope.

Don't duplicate option `-I.'.

Remove null editing of the assembler source for all profiled objects.
The required magic has been done since prehistoric times by an
asm("mcount") declaration.

Simplify the clean rule.

Don't try to be clever about timestamps involving genassym.  genassym's
timestamp usually got ahead of assym.s's timestamp, so `make' almost
always had to run genassym and compare *assym.s to decide that nothing
needed to be done.  The cost is reassembling a few files whenever
genassym is rebuilt.  Assembling is almost as fast as comparing.

Always go through genassym.o to build genassym.  This would have avoided
numerous bugs involving mkdep -p.  Now it just stops genassym from
depending on the name of the temporary object file.

Use ${CFLAGS} for building genassym.  Mainly ${CWARNFLAGS} were missing.
1994-10-25 19:34:57 +00:00
Stefan Eßer c6f2eb5edb Added decoding of chipset registers for Pentium 90/100 CPUs. 1994-10-25 18:45:19 +00:00
Bruce Evans 25f69b0ff8 Use the correct macro for deciding whether syscons' variables should
be accessed.

Remove some unused declarations and document a bogus one.
1994-10-25 18:22:32 +00:00
David Greenman 03ed612f0e Allow MAXMEM kernel option to indicate more memory than is detected; it
previously could only be used to limit the amount of memory.
1994-10-25 08:58:33 +00:00
Steven Wallace 669a646390 Patch to fix QIC-02/QIC-36 by Gene Stark.
From patch003 in CLEAR-1.1.5.1-PATCHES.
Submitted by:	Gene Stark
1994-10-25 08:57:39 +00:00