Commit Graph

339 Commits

Author SHA1 Message Date
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 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 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
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
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
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
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
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
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
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
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
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
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
Jordan K. Hubbard 54c7241bd3 Julian Elischer's disklabel fixes. 1994-10-27 20:45:13 +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
Jordan K. Hubbard cb72513713 Enable USERCONFIG and document it in LINT. 1994-10-26 19:20:27 +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 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 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 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
David Greenman 1b55c5bc85 Restricted maximum bufpages to 1500; this is required for machines >64MB
of memory to work without running out of kernel VM (and increasing it to
even more than it is now (96MB) is out of the question. Changed bufpages
calculation to allocation a little less bufer cache (16% of mem-2MB instead
of 20%); this is simply a better figure for most systems.
1994-10-25 08:34:50 +00:00
David Greenman a0181c75dd Moved initialization of tmpstk so that it immediately follows the kernel
text. Fixed rounding bug that caused the last page of kernel text to be
read/write instead of read-only. This is important now that tmpstk can
crash into it. Removed +4 bias of tmpstk because it screws up ddb's
ability to traceback correctly.
1994-10-25 07:25:56 +00:00
Søren Schmidt 3c43212ad8 Added sea0 - Seagate driver lines to config 1994-10-24 22:18:12 +00:00
Garrett Wollman 2f86936a07 Finished device configuration database work for all ISA devices (except `ze')
and all SCSI devices (except that it's not done quite the way I want).  New
information added includes:

-	A text description of the device
-	A ``state''---unknown, unconfigured, idle, or busy
-	A generic parent device (with support in the m.i. code)
-	An interrupt mask type field (which will hopefully go away) so that
.	  ``doconfig'' can be written

This requires a new version of the `lsdev' program as well (next commit).
1994-10-23 21:28:03 +00:00
Poul-Henning Kamp 85adfe70ca Autoconf is the one to realize that we are booted disk-less and start the
ball rolling.  locore is just moving some data from the boot-program.
1994-10-22 17:51:46 +00:00
Poul-Henning Kamp b4e5146fc5 NFS-diskless works. Look in sys/i386/boot/netboot for some of the
explanation.  More doc needed, but not hard to do, if you want to.

A big hand to Martin Renters for the netboot program !

Anybody want to compete on who can "make world" in the shortest
amount of time ?  I have 127 i486DX2/66 and 5 P60's I can use
now.  And 3 times 66 Gb file servers to support it... :->

Anyway, NFS will be standard in the GENERIC kernel now, so that
people can use the bin-tarball to set up shop.
1994-10-22 17:50:17 +00:00
Garrett Wollman 09f7992adf Make my ALLDEVS kernel compile (basically, LINT minus a lot of options). 1994-10-21 01:18:38 +00:00
Poul-Henning Kamp c47b6376fd According to a quick reading of sources, one experiment and Bruce's word:
aha, ahb and bt all on "irq ?" now.
1994-10-20 00:53:30 +00:00
Poul-Henning Kamp 12396a6a16 Bruce told me to: Make uha0 use irq ? 1994-10-20 00:19:37 +00:00
Poul-Henning Kamp 953ca71d9d Peter Dufaults comconsole changes.
Submitted by:	Peter Dufault
1994-10-20 00:08:31 +00:00
Bruce Evans 7ffa8327b2 Don't check for IRQ conflicts before probing the device, so that
drivers have a chance to change their IRQ before it is checked.
This was implemented in revision 1.21 and broken in revision 1.26.
Drivers that can change their IRQ should probably be configured
with "irq ?".
1994-10-19 21:57:51 +00:00
Bruce Evans 0bf495e561 Fix the test for the code segment being the usual one. Unusual code
segments can still cause panics.  Their pc is converted to 0 and 0
is only checked for in one place before use.
1994-10-19 21:13:51 +00:00
Garrett Wollman f1d8109335 Add support for devconf to a large number of device drivers, and do
the right thing in dev_goawayall() when kdc_goaway is null.
1994-10-19 01:59:11 +00:00
Garrett Wollman 922006325b isa.c isa_device.h: declare & define {e,}isa_{in,ex}ternalize().
fd.c: register devices and implement disk stats.
wd.c: fix disk stats and call isa_externalize() as appropriate.
1994-10-19 00:08:07 +00:00
Garrett Wollman f1815f8986 Implement disk_externalize(). 1994-10-19 00:05:59 +00:00