Commit Graph

363 Commits

Author SHA1 Message Date
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
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
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
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
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
Justin T. Gibbs
e424e8bfac Add ep0 line to kernel config files. 1994-11-13 10:17:07 +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
Jordan K. Hubbard
5231231d03 Add back ed2. Harrumph.. 1994-11-12 20:27:24 +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
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
Jordan K. Hubbard
49445644f1 Enable floppy-tape support. 1994-11-10 23:46:31 +00:00
Andrey A. Chernov
3b8f1cfc05 Use adjkerntz into inittodr too (for APM stuff) 1994-11-10 12:53:13 +00:00
Bruce Evans
86a8bb8a33 Don't declare DELAY() here. Callers should include <machine/clock.h>. 1994-11-09 00:51:38 +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
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