Commit Graph

727 Commits

Author SHA1 Message Date
Mike Pritchard
6c5e9bbdf5 Fix a bunch of spelling errors in the comment fields of
a bunch of system include files.
1996-01-30 23:02:38 +00:00
Garrett Wollman
3addba4f55 No longer use the cyclecounter to attempt to correct for late or missed
clock interrupts.

Keep a 1-in-16 smoothed average of the length of each tick.  If the
CPU speed is correctly diagnosed, this should give experienced users
enough information to figure out a more suitable value for `tick'.
1996-01-30 18:56:47 +00:00
David Greenman
b09fb6432d savectx() strikes again: the saved stack pointer wasn't properly adjusted
to remove the return address. It's only the frame pointer and luck that
allowed the code to work at all.
1996-01-30 12:54:21 +00:00
David Greenman
3dd78b2bcd Increase tmpstk size to 8K and make certain it is longword aligned. 1996-01-30 07:59:02 +00:00
Bruce Evans
dd87702a51 Allocate DMA bounce buffers only when requested by drivers. Only the
fd and wt drivers need bounce buffers, so this normally saves 32K-1K
of kernel memory.

Keep track of which DMA channels are busy.  isa_dmadone() must now be
called when DMA has finished or been aborted.

Panic for unallocated and too-small (required) bounce buffers.

fd.c:
There will be new warnings about isa_dmadone() not being called after
DMA has been aborted.

sound/dmabuf.c:
isa_dmadone() needs more parameters than are available, so temporarily
use a new interface isa_dmadone_nobounce() to avoid having to worry
about panics for fake parameters.  Untested.
1996-01-27 02:33:48 +00:00
Bruce Evans
227b8bf258 Cleaned up unused #includes and some other historical cruft.
Sorted and KNFised declarations.
1996-01-27 01:56:30 +00:00
Peter Wemm
bf6024ee3a Add commands for ptrace get/set registers.. (Same numbers as NetBSD) 1996-01-24 18:51:48 +00:00
David Greenman
2924d49169 Simplified savectx() a little and fixed a bug that caused it to return
garbage in the child process rather than "1" like it is supposed to.

Reviewed by:	bde
1996-01-23 02:39:24 +00:00
Joerg Wunsch
e66e939ed6 Initialize the cpu_class variable. This prevents i386 machines from
panicing with a privileged instruction fault early at boot time.
Submitted by:	rock@wurzelausix.CS.Uni-SB.DE (D. Rock)
1996-01-21 20:57:03 +00:00
Nate Williams
4e5935064c Added a comment above the npx0 device line
# Mandatory, don't remove
1996-01-20 06:14:33 +00:00
Poul-Henning Kamp
c92a064d21 Reinstate AUTO_EOI_1. This did break suspend/resume on some portables.
In particular mine.  We may want to make it a negative option to
keep GENERIC sane, ie NO_AUTO_EOI_1.
1996-01-19 23:38:07 +00:00
Peter Wemm
1a46737f84 Some trivial fixes to get it to compile again, plus some new lint:
- cpuclass should be cpu_class
- CPUCLASS_I386 should be CPUCLASS_386
(^^ those only show up if you compile for i386)
- two missing prototypes on new functions
- one missing static
1996-01-19 14:19:56 +00:00
John Dyson
bd7e5f992e Eliminated many redundant vm_map_lookup operations for vm_mmap.
Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish
	overhead for merged cache.
Efficiency improvement for vfs_cluster.  It used to do alot of redundant
	calls to cluster_rbuild.
Correct the ordering for vrele of .text and release of credentials.
Use the selective tlb update for 486/586/P6.
Numerous fixes to the size of objects allocated for files.  Additionally,
	fixes in the various pagers.
Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs.
Fixes in the swap pager for exhausted resources.  The pageout code
	will not as readily thrash.
Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into
	page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE),
	thereby improving efficiency of several routines.
Eliminate even more unnecessary vm_page_protect operations.
Significantly speed up process forks.
Make vm_object_page_clean more efficient, thereby eliminating the pause
	that happens every 30seconds.
Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the
	case of filesystems mounted async.
Fix a panic with busy pages when write clustering is done for non-VMIO
	buffers.
1996-01-19 04:00:31 +00:00
Bruce Evans
e65a471221 Removed declarations of nonexistent functions. 1996-01-16 07:42:08 +00:00
Andrey A. Chernov
d85314fa5f Since new bcd* macros not argument range overflow resistant,
fix argument overflow for years >= 2000
1996-01-16 06:35:40 +00:00
Poul-Henning Kamp
791d77e0dd Get rid of two and a half printf in the kernel.
Add more features to the one remaining to handle the job:
	+	signed quantity.
	#	alternate format
	-	left padding
	*	read width as next arg.
	n	numeric in (argument specified) default radix.

Fix the DDB debugger to use these.
Use vprintf in debug routine in pcvt.

The warnings from gcc may become more wrong and  intolerable because
of this.

Warning:  I have not checked the entire source for unsupported or
changed constructs, but generally belive that there are only a few.

Suggested by: bde
1996-01-15 22:41:03 +00:00
Poul-Henning Kamp
3eb50b2edd My wife is busy making me a new conical hat, so you don't need to
send any to me this time.  Commited an old copy of this files where
the tables were swapped.  Duh!.
1996-01-15 21:26:43 +00:00
Poul-Henning Kamp
e95fbcfeb4 Soren called an said that I screwed up badly, so I backup until
I find out how... Sorry.
1996-01-15 21:12:50 +00:00
Poul-Henning Kamp
2898c294f4 Make bin2bcd and bcd2bin global macroes instead of having local
implementations all over the place.
1996-01-15 10:28:44 +00:00
Bruce Evans
f668341de4 Fixed handling of Feb 29 in resettodr(). 1996-01-12 17:33:12 +00:00
Andrey A. Chernov
dc3f9062ca Replace ugly year/month calculations in resettodr to more clean
variants, idea taken from NetBSD clock.c.
At least year calculation was wrong, pointed by Bruce.
Use different strategy to store year for BIOS without RTC_CENTURY
1996-01-08 18:50:14 +00:00
Justin T. Gibbs
a8ce2e68d7 Add comment about only needing on of either ahc, ncr, or ahb type
controllers to handle any number of devices.
Remove unnecessary extra units for these controllers.
1996-01-07 19:19:38 +00:00
Peter Wemm
d92566062f Choose a different name to hold the option definition.. The original one
was overlapping with another file, and making some undesirable behavior a
little worse - it's triggering a bug in config that appears to have been
there for some time (before the options files, anyway.)
1996-01-06 23:10:57 +00:00
Garrett Wollman
8890984dc9 Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme. 1996-01-05 20:12:53 +00:00
Garrett Wollman
0e41ee3037 Convert DDB to new-style option. 1996-01-04 21:13:23 +00:00
Garrett Wollman
50c73f3620 Convert SYSV IPC to new-style options. (I hope I got everything...)
The LKMs will need an extra file, to come later.
1996-01-04 20:29:06 +00:00
Garrett Wollman
a73af3a214 convert the math emulation to use the new-style options. 1996-01-04 19:51:50 +00:00
Garrett Wollman
db6a20e23e Converted two options over to the new scheme: USER_LDT and KTRACE. 1996-01-03 21:42:35 +00:00
Bruce Evans
e5171bbec0 Fixed user-mode mcount which I broke in the previous revision.
Do it the old way for now.

Moved recent additions around a lot to minimise ifdefs.

Added prototypes.
1996-01-01 17:11:21 +00:00
Joerg Wunsch
cfaaf1594e Restrict /devfs/io perms to 0600.
Nobody in our regular source tree, or in the non-distfile part of the
ports tree does use /dev/io anyway, so this might be replaced by
another scenario some day.
1995-12-31 09:32:16 +00:00
David Greenman
b2b1f785bc In memory test, cast pointer as "volatile int *", not "int *" to make sure
that gcc doesn't cache the value used in the test. Pointed out by Erich
Boleyn <erich@uruk.org>.
1995-12-30 23:13:32 +00:00
Bruce Evans
912e603778 Implemented non-statistical kernel profiling. This is based on
looking at a high resolution clock for each of the following events:
function call, function return, interrupt entry, interrupt exit,
and interesting branches.  The differences between the times of
these events are added at appropriate places in a ordinary histogram
(as if very fast statistical profiling sampled the pc at those
places) so that ordinary gprof can be used to analyze the times.

gmon.h:
Histogram counters need to be 4 bytes for microsecond resolutions.
They will need to be larger for the 586 clock.
The comments were vax-centric and wrong even on vaxes.  Does anyone
disagree?

gprof4.c:
The standard gprof should support counters of all integral sizes
and the size of the counter should be in the gmon header.  This
hack will do until then.  (Use gprof4 -u to examine the results
of non-statistical profiling.)

config/*:
Non-statistical profiling is configured with `config -pp'.
`config -p' still gives ordinary profiling.

kgmon/*:
Non-statistical profiling is enabled with `kgmon -B'.  `kgmon -b'
still enables ordinary profiling (and distables non-statistical
profiling) if non-statistical profiling is configured.
1995-12-29 15:30:05 +00:00
Jordan K. Hubbard
56c7a48c93 Make a couple of options that hurt when they're removed more
carefully noted.
1995-12-29 02:04:20 +00:00
David Greenman
d079690c14 Made bzero a function vector and added a 586/686 optimized version of
bzero.
Deprecated blkclr (removed it).
Removed some old cruft from cpufunc.h.

The optimized bzero was submitted by Torbjorn Granlund <tege@matematik.su.se>
The kernel adaption and other changes by me.
1995-12-28 23:34:30 +00:00
David Greenman
83e33b0197 Made bzero a function vector and added a 586/686 optimized version of
bzero.
Deprecated blkclr (removed it).
Removed some old cruft from cpufunc.h.

The optimized bzero was submitted by Torbjorn Granlund <tege@matematik.su.se>
The kernel adaption and other changes by me.
1995-12-28 23:14:40 +00:00
David Greenman
99beca17d7 Fix one more label that I overlooked with the P6 support. Sigh. 1995-12-28 21:01:54 +00:00
David Greenman
014374187c Update bcopyb & bcopy to reflect changes I made in the libc version of
bcopy:

Be smarter about handling overlapped copies and only go backwards if it
is really necessary. Going backwards on a P6 is much slower than forwards
and it's a little slower on a P5. Also moved the count mask and 'std'
down a few lines - it's a couple percent faster this way on a P5.
1995-12-27 18:54:51 +00:00
Mark Murray
0738b16169 random_machdep.c: New version, also includes revectored interrupts, rather
than hooking permanently.
vector.s:       : Remove the interrupt hook. This is done dynamically, now.
1995-12-27 11:22:05 +00:00
Mark Murray
e85ceed0ff Modify the ioctl to handle revectored interrupts for the entropy gatherers. 1995-12-27 11:18:29 +00:00
Bruce Evans
62394a63c8 Removed almost all traces of libkern.a. The objects that were in
libkern.a are now specified by listing their source files in
files.${MACHINE}.  The list is machine-dependent to save space.
All the necessary object for each machine must be linked into the
kernel in case an lkm wants one.
1995-12-26 13:58:31 +00:00
David Greenman
d7b1079903 Fix a lable goofup I made in the previous P6 support changes. 1995-12-25 14:40:49 +00:00
David Greenman
5493045648 Fix typo in CPUCLASS. 1995-12-25 01:02:32 +00:00
David Greenman
17acc2b264 Added device fxp0 (device driver for Intel EtherExpress Pro/100). 1995-12-24 08:13:23 +00:00
David Greenman
7059cdf2d3 Added I686_CPU. 1995-12-24 08:11:46 +00:00
David Greenman
6410f76727 Add Pentium Pro CPU detection and special handling. For now, all the
optimizations we have for 586s also apply to 686s...this will be fine-
tuned in the future as appropriate.
1995-12-24 08:10:52 +00:00
David Greenman
e8636c6c19 Made "AUTO_EOI_1" standard. auto-EOI on the master ICU is a documented
feature of the ICU. auto-EOI on the slave is not safe, however, so it
remains an option. Killed religious FASTER_NOP when writing the ICU.

Reviewed by:	bde
1995-12-23 16:53:57 +00:00
David Greenman
44198d45b6 Use FASTER_NOP rather than NOP in rtcin() - only one inb delay was ever
needed.
Reviewed by:	bde
1995-12-23 16:46:31 +00:00
Bruce Evans
e390090674 Staticized code that was hidden by `#ifdef DEBUG'. 1995-12-22 18:21:26 +00:00
Bruce Evans
02f90f3b3c Increased the double fault stack size from 512 to PAGE_SIZE. This is
wasteful, but better than clobbering the variables below the stack.
About 300 bytes of variables were clobbered when I examined double
faults using ddb.  Perhaps a page that is known not to be accessed by
the double fault handler could be used.  Such pages are not easy to
find, since the double fault handler calls panic() which calls sync()
and possibly dumpsys().
1995-12-22 18:17:34 +00:00
David Greenman
b0aa8fc32f Fix a small logic bug that caused the arguments of the previous frame to
be used instead of the ones for the current frame if a breakpoint had been
set at the entry to a function.
1995-12-22 07:09:24 +00:00