Commit Graph

1652 Commits

Author SHA1 Message Date
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
David Greenman c4a7b7e10c From tim@cs.city.ac.uk (Tim Wilkinson):
Find enclosed a short bugfix to get the union filesystem up and running
in FreeBSD-current.  We don't think we've got all the problems yet but
these fixes sort out the major ones (which mostly concert bad locking
of vnodes), no doubt we'll post others as necessary.  Known problems
include the inability of the umount command (not the system call) to unmount
unions in certain circumstances (this is due the way "realpath" works),
and the failure of direntries to always get all available files in
unioned subdirectories.  We are, as they say, working on it.

Submitted by:	tim@cs.city.ac.uk (Tim Wilkinson)
1994-11-04 14:41:46 +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
David Greenman fb21f2fe90 Backed out mbuf performance improvement. mbufs are allocated with various
different types, and with the 'local cache', what is freed isn't necessarily
what was originally malloced. This screws malloc's statistics and type
allocation limits, resulting eventually in a deadlock when one of the
limits is bogusly reached. Recent performance tests on a Pentium machine
indicate no improvement with this optimization anyway (this is something
to be looked at further).
1994-11-04 00:28:38 +00:00
Garrett Wollman df00058df7 Fix off-by-one error reported to NetBSD by Karl Fox in
<9411031449.AA11102@gefilte.MorningStar.Com>.
1994-11-03 21:04:21 +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
Garrett Wollman bb0135e920 Completely replace JTW's idea with my (incompletely implemented) original
idea.  This is les likely to crash your machine.  As before, this code is only
enabled under `options IN_RMX'.
1994-11-03 01:05:34 +00:00
Garrett Wollman f084e01477 Collapse two fields so that we have space for another 32 flags.
NB: You will have to recompile programs which use the `rt_use' member in
order to get the correct values.  This should not cause incorrect operation,
but the statistics may look a little confusing.
1994-11-03 01:04:32 +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 d4a8d8f240 This is the file that actually implements the smarter behavior. 1994-11-02 04:42:14 +00:00
Garrett Wollman 5c2dae8edc Add code to be a bit smarter about IP routes, conditioned on the option
IN_RMX.  (Eventually this will be standard, but I just wrote the code today
and don't want to break anyone.)
1994-11-02 04:41:39 +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
Garrett Wollman ac234f9399 Clean up ARP error messages: format IP addresses, explain arplookup()
failures in English.
1994-11-02 00:58:29 +00:00
Garrett Wollman d9e91095ab Forward-declare a few structures to avoid warning messages. 1994-11-02 00:11:00 +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
Bruce Evans e8b7f39747 Return immediately from ttwrite() if the ttysleep()s that wait for
a clist return with an error.  There are some clist starvation/deadlock
bugs elsewhere and killing clist hogs didn't help because the breaks
only exited from the inner loops.
1994-11-01 22:23:29 +00:00
Garrett Wollman cb2646da64 Make it compile again. XXX - this is not really the right way to fix
this problem.
1994-11-01 22:18:34 +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
Jordan K. Hubbard 6b4ec83ca6 Fix from John Hay to avoid kernel panics when ap->a_eofflag is NULL.
I'm not sure if this is just masking another problem (like, should
ap->a_eofflag EVER be NULL?), but if it prevents a panic for now then
it may save an ALPHA customer.
Submitted by:	jhay
1994-11-01 21:14:45 +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
Paul Traina c9014e4e10 Make PPP compile cleanly 1994-11-01 09:03:20 +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 0a87b23329 Latest changes from Uben.
Submitted by:	uben
1994-10-31 23:58:04 +00:00
Poul-Henning Kamp beef52db54 Changed RAW_PART to RAWPART so it comes from disklabel.h.
Force RAW_PART to have the right size.
Set d_secperunit in the disklabel.
1994-10-31 23:45:40 +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
Paul Traina 6c4b8d672e Detect old-style multicast routers and interoperate properly 1994-10-31 06:36:47 +00:00
Poul-Henning Kamp ffc3b24291 changed '#ifdef i386' to '#ifdef __i386__' 1994-10-31 06:31:14 +00:00
Joerg Wunsch 95b926abab Documented the FDSEEKWAIT option. 1994-10-30 20:57:07 +00:00
Bruce Evans d2984da171 Print "(null)" instead of crashing for null strings. Null names are
often generated for stack traces.  Now inspection of unmapped addresses
no longer panics the system.
1994-10-30 20:55:44 +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
Bruce Evans a6a21d9edf Don't attempt to free null cblocks. There may be less to free than
normal due to cblock resource starvation or malloc() failing when
the device is opened.
1994-10-30 19:43:49 +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
Andrey A. Chernov 934051e5c5 write ptys use _the_same_ tsleep/wakeup address as read ptys due to
mistype, fixed.
1994-10-29 23:59:48 +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 7366bf01ab Andreas Klemm's tape erase patches from 1.1.5.1
Submitted by:	andreas
1994-10-28 13:19:42 +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
Garrett Wollman e85c098db0 Again, this is not a filesystem so don't compile it as if it were. 1994-10-27 23:39:19 +00:00
Garrett Wollman 6891d57652 ibcs2 is not a filesystem, don't compile it as if it were. 1994-10-27 23:36: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
Paul Traina 6213f6fc8f Set the EOF flag properly.
Obtained from: netbsd-bugs mailing list
1994-10-27 18:44:31 +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 5f7bd355f0 Fix the panic message if init dies to show the exit status. 1994-10-27 05:21:39 +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 67256b1234 Remove RB_ASKFS again - to make this meaningful we'd need to invest in
implementing too much generality at this stage.
1994-10-26 13:45:52 +00:00