Commit Graph

160 Commits

Author SHA1 Message Date
David Greenman
d9b026fcbd Add two more page table pages to keep 64MB machines happy. 1994-12-18 03:11:46 +00:00
Bruce Evans
91290462f6 Disable CLKF_BASEPRI() again. I forgot to edit an unwanted change out of
the diffs for the previous commit.
1994-12-03 10:18:24 +00:00
Bruce Evans
b39b673d37 i386/exception.s,
Keep track of interrupt nesting level.  It is normally 0
	for syscalls and traps, but is fudged to 1 for their exit
	processing in case they metamorphose into an interrupt
	handler.

i386/genassym.c;
	Remove support for the obsolete pcb_iml and pcb_cmap2.

	Add support for pcb_inl.

i386/swtch.s:
	Fudge the interrupt nesting level across context switches and in
	the idle loop so that the work for preemptive context switches
	gets counted as interrupt time, the work for voluntary context
	switches gets counted mostly as system time (the part when
	curproc == 0 gets counted as interrupt time), and only truly idle
	time gets counted as idle time.

	Remove obsolete support (commented out and otherwise) for pcb_iml.

	Load curpcb just before curproc instead of just after so that
	curpcb is always valid if curproc is.  A few more changes like
	this may fix tracing through context switches.

	Remove obsolete function swtch_to_inactive().

include/cpu.h:
	Use the new interrupt nesting level variable to implement a
	non-fake CLF_INTR() so that accounting for the interrupt state
	works.

	You can use top, iostat or (best) an up to date systat to see
	interrupt overheads.  I see the expected huge interrupt overheads
	for ISA devices (on a 486DX/33, about 55% for an IDE drive
	transferring 1250K/sec and the same for a WD8013EBT network card
	transferring 1100K/sec).  The huge interrupt overheads for serial
	devices are unfortunately normally invisible.

include/pcb.h:
	Remove the obsolete pcb_iml and pcb_cmap2.  Replace them by
	padding to preserve binary compatibility.

	Use part of the new padding for pcb_inl.

isa/icu.s:
isa/vector.s:
	Keep track of interrupt nesting level.
1994-12-03 10:03:19 +00:00
Garrett Wollman
6014635361 Cronyx/Sigma sync/async serial driver with PPP support
from Serge Vakulenko
1994-12-02 23:23:01 +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
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
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
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
86a8bb8a33 Don't declare DELAY() here. Callers should include <machine/clock.h>. 1994-11-09 00:51:38 +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
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
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
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
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
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
02694b627b Move some declarations to more appropriate header files. 1994-10-19 00:06:24 +00:00
Andrey A. Chernov
37b28ca421 Remove CPU_COLORDISP, GIO_COLOR now exists 1994-10-18 03:42:18 +00:00
Garrett Wollman
0dcb1dd2e8 Add new definitions for lsdev. 1994-10-17 23:33:52 +00:00
Søren Schmidt
be92194467 Added more SCO compat ioctl's. 1994-10-17 22:12:06 +00:00
Garrett Wollman
6b4375e296 Machine-dependent parts of device configuration table. 1994-10-16 03:50:01 +00:00
Andrey A. Chernov
9d40918f0f CPU_COLORDISP sysctl added for console display type 1994-10-15 21:18:11 +00:00
Poul-Henning Kamp
a12dee4de7 Cosmetics. Added a prototype. 1994-10-10 01:06:48 +00:00
Poul-Henning Kamp
50a1a05445 Added prototypes. 1994-10-08 22:21:34 +00:00
Rodney W. Grimes
76b993fbbe 1. bootinfo.h defines the structure passed in to the kernel by the
new boot code.
1994-10-06 09:25:25 +00:00
Andrey A. Chernov
f80d8a2e88 CPU_DISRTCSET added to disable resettodr(), needed in adjkerntz -i,
per Bruce suggestion
1994-10-04 18:25:51 +00:00
Poul-Henning Kamp
45a0b89468 Avoid ddb getting a panic if the code-segment isn't the usual one... 1994-10-02 19:36:30 +00:00
Poul-Henning Kamp
abd358cd49 apm_bios.h: removed the equiv-stuff. Not needed now that the kernel module
works correctly.

clock.h & reg.h: prototypes.
1994-10-02 17:31:29 +00:00
David Greenman
fae772f7b2 Added Cortex-I Frame Grabber by Paul S. LaFollette, Jr.
Submitted by:	Paul S. LaFollette, Jr.
1994-10-01 17:59:42 +00:00
David Greenman
5185ed0d3a Added $Id$ 1994-10-01 05:13:37 +00:00
David Greenman
8321fda1d9 Woops, missed these two files; part of HOSOKAWA Tatsumi's APM support. 1994-10-01 05:05:10 +00:00
David Greenman
22414e535a Laptop Advanced Power Management support by HOSOKAWA Tatsumi.
Submitted by:	HOSOKAWA Tatsumi
1994-10-01 02:56:21 +00:00
Steven Wallace
c64aa890c4 Use Voxware's new 2.90 soundcard.h.
NOTE:  2.9 is backwards compatable with programs compiled with older
soundcard.h, but new programs compiled with 2.9 will not work on pre-2.9
sound drivers.
1994-10-01 02:32:23 +00:00
Søren Schmidt
a2a0e15a82 Changed header sligthly. 1994-09-29 08:31:39 +00:00
David Greenman
4b301dcfc5 First round of changes to get the sound code working in 2.0. 1994-09-27 17:58:30 +00:00
David Greenman
7bfaa9cdaf Inlined ins/outs functions.
Obtained from:	NetBSD
1994-09-25 21:31:55 +00:00
David Greenman
d5c97aea74 Undo last change: the ins/outs functions DO NOT return a pointer! 1994-09-25 20:03:41 +00:00
Poul-Henning Kamp
bb56ec4a05 While in the real world, I had a bad case of being swapped out for a lot of
cycles.  While waiting there I added a lot of the extra ()'s I have, (I have
never used LISP to any extent).  So I compiled the kernel with -Wall and
shut up a lot of "suggest you add ()'s", removed a bunch of unused var's
and added a couple of declarations here and there.  Having a lap-top is
highly recommended.  My kernel still runs, yell at me if you kernel breaks.
1994-09-25 19:34:02 +00:00
Joerg Wunsch
011b09f93f Copied over the transfer speed definitions from sys/i386/isa/fdreg.h.
This is needed for having the fdformat program no longer searching
non-public include paths.
1994-09-25 18:41:21 +00:00
David Greenman
bc6d744470 Shuffled macros and definitions around to facilitate architecture
independance.
1994-09-24 21:37:01 +00:00
David Greenman
a6cd0a2477 Increased SHMMAXPGS from 512 to 1024 now that there is plenty of kernel
virtual memory.
1994-09-23 07:00:12 +00:00
Bruce Evans
8793135f2d Don't provide bogus source operands in some asms. This probably shouldn't
matter, but similar bogusness in npx.c causes compiling without -O to fail.

Use __volatile in all asms.

Parenthesize macro args.

Change the names of the macros to avoid namespace pollution.

Remove unnecessary "#ifdef __i386__".

Sort #defines.

Add comments.
1994-09-20 22:26:37 +00:00
Bruce Evans
2b3d0249bd Remove the alias splnone() for spl0(). It was used only once. 1994-09-20 05:07:32 +00:00