Commit Graph

5106 Commits

Author SHA1 Message Date
Julian Elischer
26d3bf5f1b close() is no longer a SLICE method.
Close is simply an open with no-read and no-write once internal to SLICE
(it still exports a close to the rest of the kernel)
1998-04-22 10:25:27 +00:00
Peter Wemm
4bc57bd94f Add a couple of missing symbols referred to in asm code. 1998-04-22 09:46:16 +00:00
Mike Smith
38f86230bd Add a block device entry for the 'myx' driver too. 1998-04-22 05:10:51 +00:00
Mike Smith
9c25a0b542 Add 'myx' for Ulf Zimmerman's Mylex Raid driver (ulf@alameda.net> 1998-04-22 03:57:07 +00:00
KATO Takenori
5e4832f65d PC-98 does not supports DMA automode lager than 65535 bytes. 1998-04-21 09:48:45 +00:00
KATO Takenori
bb9b85aaeb Supports PC-98 again. 1998-04-21 09:46:14 +00:00
Julian Elischer
2af4594564 Remove more LFS left-overs 1998-04-20 21:54:19 +00:00
Julian Elischer
751e9ca706 Remove an LFS clause, now that it is in the history,
anyone who wants to see what was needed cto revive LFS can see it.
1998-04-20 21:53:07 +00:00
Søren Schmidt
d264ed7a01 Enable DEVFS usage of the device (include opt_devfs.h> 1998-04-20 18:51:33 +00:00
Julian Elischer
992109b58e Get rid of DEVFS_ROOT
it no longer has any effect.

SLICE is in some ways a replacement but is destined to also go away.
1998-04-20 04:30:47 +00:00
Julian Elischer
c0bab11dfe Make the devfs SLICE option a standard type option.
(hopefully it will go away eventually anyhow)
1998-04-20 03:57:41 +00:00
Julian Elischer
3e425b968d Add changes and code to implement a functional DEVFS.
This code will be turned on with the TWO options
DEVFS and SLICE. (see LINT)
Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes.

/dev will be automatically mounted by init (thanks phk)
on bootup. See /sys/dev/slice/slice.4 for more info.
All code should act the same without these options enabled.

Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others

This code does not support the following:
bad144 handling.
Persistance. (My head is still hurting from the last time we discussed this)
ATAPI flopies are not handled by the SLICE code yet.

When this code is running, all major numbers are arbitrary and COULD
be dynamically assigned. (this is not done, for POLA only)
Minor numbers for disk slices ARE arbitray and dynamically assigned.
1998-04-19 23:32:49 +00:00
Tor Egge
9d66d1d696 Disregard the values for polarity and trigger mode in the MP config table
for ISA interrupts where the IOAPIC interrupt pin number is the same as
the ISA interrupt number (i.e. partial backout of previous commit)
1998-04-19 23:19:20 +00:00
Bruce Evans
212b37ff18 Support compiling with `gcc -pedantic' (don't use hard newlines in
(asm) string constants).
1998-04-19 15:41:06 +00:00
Bruce Evans
1696756396 Support compiling with `gcc -pedantic' (don't use hard newlines in
(asm) string constants or hard long long constants).
1998-04-19 15:39:26 +00:00
Bruce Evans
721f74b7d3 Support compiling with `gcc-pedantic' (don't declare static arrays
with no size).
1998-04-19 15:36:12 +00:00
Bruce Evans
8c4a6d7452 Support compiling with `gcc-pedantic' (don't use hard newlines in
(asm) string constants or trailing commas in enum declarations).
1998-04-19 15:28:30 +00:00
Bruce Evans
78a8182665 Support compiling with gcc -pedantic (don't use a bogus, null cast). 1998-04-19 15:22:48 +00:00
Peter Wemm
823833f19d Back out previous commit, obrien doesn't seem to be watching. The problem
is that the previous commit spammed a hacked 2.2-stable onto -current,
deleting the DMA support etc.  (I guess that's one way of minimizing diffs
between -current and -stable.. :-] )
1998-04-19 03:26:05 +00:00
David E. O'Brien
cab9e31601 MFC (reduce diff w/-CUR, with hopes of getting DMA support into -STABLE)
1.128   (FUNCTIONAL: better sleep handling)
1.131   (STYLE: labels w/o stmt)
1.132   (STYLE: remove unused #includes)
1.141   (FUNCTIONAL: devfs bug, 2nd controler not showing)
1.144   (STYLE: dont shadow other vars)
1.150   (FUNCTIONAL: fix search bug)
1998-04-18 13:25:49 +00:00
KATO Takenori
c243867df2 Support compiling with `gcc -ansi'. 1998-04-18 05:01:24 +00:00
Amancio Hasty
9ff07e3256 Reviewed by: Amancio
Submitted by:	Roger Hardiman <roger@cs.strath.ac.uk>
Roger Hardiman <roger@cs.strath.ac.uk> :
	Revised autodetection code to correctly handle both
	old and new VideoLogic Captivator PCI cards.
	Added tsleep of 2 seconds to initialistion code for PAL users.
	Corrected clock selection code on format change.

--- Amancio
1998-04-18 04:58:33 +00:00
Dag-Erling Smørgrav
dc73342347 Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
Julian Elischer
2720a2efd6 Reserve a number for the ALTQ control devices (96) 1998-04-17 20:26:43 +00:00
Dag-Erling Smørgrav
cc88e287a6 Stop the screensaver before switching consoles. 1998-04-17 10:03:11 +00:00
Dima Ruban
8b78465c27 Undo my last change. 1998-04-17 07:51:36 +00:00
Dag-Erling Smørgrav
604d46b6e5 Swapped "should we just return" and "should we stop the screensaver"
in scrn_timer() to avoid deadlock with graphical screensavers.
1998-04-16 09:41:55 +00:00
Bruce Evans
1d37f051c1 Finish supporting compiling with gcc -ansi'. Fix missing volatile's
in __asm() statements while I'm here.
1998-04-15 18:58:09 +00:00
Dima Ruban
d3b8e3673e Use 0440 root.kmem kermissions on kernel instead of
0555 root.wheel.

Reviewed by:	freebsd-security
1998-04-15 17:53:32 +00:00
Bruce Evans
c1087c1324 Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
Bruce Evans
7e07ce2225 Support compiling with gcc -ansi'. Fix missing volatile's in __asm()
statements while I'm here.
1998-04-15 17:26:17 +00:00
Poul-Henning Kamp
9c2fa4dbce In pre-devfs days, /dev/psm0 had always been a non-blocking
device. But with devfs, currently, /dev/psm0 is the blocking device
and /dev/npsm0 is the non-blocking one.

DEVFS must stay consistent with the older behaviour.

PR:		6260
Reviewed by:	phk
Submitted by:	Kapil Chowksey <kchowksey@hss.hns.com>
1998-04-15 17:06:52 +00:00
Bruce Evans
dcfe005838 Fixed breakage of fork accounting in previous commit. A fork benchmark
reported about 15 times as much sys time as real time.  getmicroruntime()
is confusing name.
1998-04-15 11:10:28 +00:00
Søren Schmidt
0c7843d922 Added EIDRM & ENOMSG errno in translation table. 1998-04-13 17:52:41 +00:00
Søren Schmidt
958a082931 Added EIDRM & ENOMSG to errno translation table. 1998-04-13 17:49:51 +00:00
Mike Smith
a470e6686d Don't use INTR when only one device supports it.
Submitted by:	Satoh Junichi <junichi@astec.co.jp>
1998-04-13 17:45:56 +00:00
Poul-Henning Kamp
81aba7a19d Aic APM driver support for e.g. Toshiba T2400 notebook with internal
Adaptec SCSI (aic6360/aha152x) controller.

PR:		5382
Reviewed by:	phk
Submitted by:	Oliver Breuninger <ob@seicom.NET>
1998-04-12 12:11:31 +00:00
John Dyson
17d925335f Minor typo in the wd driver. The manifestation of this bug
is a tremendous perf decrease due to the disabling of advanced
features such as DMA, Ultra DMA, and 32bit mode.  This patch
might have been reported by someone else (I seem to remember
it.)
1998-04-11 20:09:39 +00:00
Søren Schmidt
eea22fdf01 Do not clobber "heads" by &= in wdcommand use only &.
Spotted by: bde
1998-04-10 08:00:24 +00:00
Søren Schmidt
f559a836a2 Add the new LBA mode support in the wd? config examples. 1998-04-09 22:28:57 +00:00
Søren Schmidt
44779c5a1c Try to use the "right" CHS translations of a LBA device.
Drives bigger than 8.4G is still in question until I get a drive
to test on...
1998-04-09 17:46:45 +00:00
Søren Schmidt
2a42fd0952 Add LBA mode support for large drives.
Use config flags 0x1000 to enable LBA mode. It should be enabled in
the BIOS too to avoid geometry confusion.

One catch though, I'm not sure all BIOS's uses the 64head/63secs
translation, all mine does but....
1998-04-08 20:04:39 +00:00
Søren Schmidt
40a2ce6ee5 Fix a minor bug (|| instead of |) 1998-04-08 20:00:03 +00:00
Peter Wemm
514bc6cb56 Fix VM86 compiles. a #include "opt_vm86.h" was missing, and the my_tr
variable was needed in the non-SMP case.

Submitted by:  Jonathan Lemon <jlemon@americantv.com>
1998-04-06 18:59:15 +00:00
Peter Wemm
fa1ef19485 remove #ifdef declaration of npxproc, use globals.s and the extern always. 1998-04-06 15:50:29 +00:00
Peter Wemm
e8b4f186cd add globals.s for data that is treated differently on SMP. 1998-04-06 15:49:35 +00:00
Peter Wemm
cf34ef61ee Use real types for the SMP pages being allocated rather than arrays of
ints.  Remove some no longer needed casts.  Initialize the per-cpu
global data area using the structs rather than knowing too much about
layout, alignment, etc.
1998-04-06 15:48:30 +00:00
Peter Wemm
0c8df3b4c5 clean up #ifdefs, define the variables that have to be per-cpu on SMP
in globals.s only and use externs always.
1998-04-06 15:46:17 +00:00
Peter Wemm
741643627f _curpcb is always defined in globals.s instead of here in #ifdefs 1998-04-06 15:44:31 +00:00
Peter Wemm
55caa497cb Bogus casts 1998-04-06 15:43:29 +00:00
Peter Wemm
56a5021bad Defunct, now part of globals.s 1998-04-06 15:42:54 +00:00
Peter Wemm
858118ef47 Rather than filling this file up with SMP .sets, use those from
globals.s instead.
Initialize curproc in the same place for both UP and SMP.
1998-04-06 15:42:26 +00:00
Peter Wemm
e3f5516d18 Generate #defines that the asm code can access for the per-cpu data
structures.
1998-04-06 15:40:10 +00:00
Peter Wemm
60392aa674 generate .sets for variables used in asm and C that are stored in per-cpu
space under SMP.
1998-04-06 15:39:09 +00:00
Peter Wemm
937288c5bb A pair of C structures used for laying out the SMP per-cpu data space. 1998-04-06 15:37:21 +00:00
Peter Wemm
5d0ef2fd65 some missing symbols 1998-04-06 15:33:02 +00:00
Poul-Henning Kamp
8184a0a4d1 Remove stuff related to microtime.s, which is gone. 1998-04-06 11:38:18 +00:00
Poul-Henning Kamp
9729e74321 Use getmicrotime insted of microtime, we only use the second part. 1998-04-06 11:37:17 +00:00
Poul-Henning Kamp
2eeb0e2ea0 Make read_random() take a (void *) argument instead of (char *) 1998-04-06 09:30:42 +00:00
Poul-Henning Kamp
4cf41af3d4 Make a kernel version of the timer* functions called timerval* to be
more consistent.

OK'ed by:	bde
1998-04-06 08:26:08 +00:00
Poul-Henning Kamp
9018b53439 Commit a much more functional version of this driver. 1998-04-05 19:26:08 +00:00
Tor Egge
c547ef5cd4 Remove some unneeded statements that enabled interrupts. 1998-04-05 01:04:48 +00:00
Poul-Henning Kamp
cc6447a365 Use microruntime() rather than doing it by hand. 1998-04-04 18:56:54 +00:00
Kazutaka YOKOTA
a117d26a3d More fixes to deal with fonts:
- Set the correct value scp->font_size in init_scp().
- Set scp->font_size to FONT_NONE for VGA_MODEX.

Interim fix for a font problem:
- A kludge to display the correct font on some video cards.
  We should be able to load multiple fonts to the VGA plane #2 and switch
  between fonts by setting the font select register in the VGA sequencer.
  It appears that the current code isn't functioning as expected on
  some VGA cards (I have reports on Millenium and Mach64 cards).  This is
  either a bug in syscons or a hardware compatibility problem ;-<
  This kludge will always load only one font set at a time and always use
  the font page #0 on the plane #2.  It is an interim kludge until
  we find the exact cause and solution.

Small adjustment for mouse cursor handling:
- Turn off the mouse cursor early when changing video modes.

Video mode switch fixes:
- Stop the screen saver when changing video modes.
- Enclose the critical section with a pair of spltty()/splx().
- A kludge to prevent scrn_update() from accessing video memory in less-
  critical sections in video mode change; artificially turn on the
  UNKNOWN_MODE flag.

PR: bin/5899, bin/5907
Tested by: ache and a couple of users
OKed by: sos
1998-04-04 16:26:53 +00:00
Poul-Henning Kamp
00af9731c9 Time changes mark 2:
* Figure out UTC relative to boottime.  Four new functions provide
      time relative to boottime.

    * move "runtime" into struct proc.  This helps fix the calcru()
      problem in SMP.

    * kill mono_time.

    * add timespec{add|sub|cmp} macros to time.h.  (XXX: These may change!)

    * nanosleep, select & poll takes long sleeps one day at a time

Reviewed by:    bde
Tested by:      ache and others
1998-04-04 13:26:20 +00:00
Eivind Eklund
512f816a5d Shut up GCC. 1998-04-02 02:10:47 +00:00
Tor Egge
5758c2de94 Add two workarounds for broken MP tables:
- Attempt to handle PCI devices where the interrupt is
	  an ISA/EISA interrupt according to the mp table.

	- Attempt to handle multiple IO APIC pins connected to
	  the same PCI or ISA/EISA interrupt source.  Print a
	  warning if this happens, since performance is suboptimal.
	  This workaround is only used for PCI devices.

With these two workarounds, the -SMP kernel is capable of running on
my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
1998-04-01 21:07:37 +00:00
Tor Egge
300e9a7696 Declare some variables modified by interrupt handlers as volatile. 1998-04-01 20:38:28 +00:00
Poul-Henning Kamp
227ee8a188 Eradicate the variable "time" from the kernel, using various measures.
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.

Most uses of time.tv_sec now uses the new variable time_second instead.

gettime() changed to getmicrotime(0.

Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).

A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.

Add a new nfs_curusec() function.

Mark a couple of bogosities involving the now disappeard time variable.

Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.

Change profiling in ncr.c to use ticks instead of time.  Resolution is
the same.

Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.

Reviewed by:	bde
1998-03-30 09:56:58 +00:00
Poul-Henning Kamp
f0e35d62a2 Don't access "time" directly. 1998-03-29 12:18:12 +00:00
Poul-Henning Kamp
6efcc7f11d Replace direct access to time with getmicrotime(). 1998-03-29 12:15:57 +00:00
Poul-Henning Kamp
934f5f3306 Export MD5Transform in md5.c and remove a private version in random_machdep.c
md5 is standard as a consequence of this.
1998-03-29 11:55:06 +00:00
Peter Wemm
00d21a1337 regenerate 1998-03-29 08:04:49 +00:00
Peter Wemm
1e8dabab3f The linux chown syscall is more like lchown, a new chown syscall that
follows links was added.
1998-03-29 07:59:10 +00:00
Wolfgang Helbig
94316d1ddb pcics are devices not controllers. 1998-03-29 07:58:03 +00:00
Peter Wemm
d5e73b9fe5 Patch up some space/tab problems. It looks like some of this came
from an xterm via cut/paste.  No other changes apart from whitespace.
1998-03-29 07:53:19 +00:00
Peter Wemm
c740a51211 Add in placeholders for the newer linux syscalls 1998-03-29 06:35:22 +00:00
Eivind Eklund
0fd9336b7e Don't use fast interrupts when initialized through PnP. if_ed does
not support fast interrupts.

Noticed by:	bde
1998-03-29 03:22:19 +00:00
Bruce Evans
3c1300a6b3 Removed unused #includes. 1998-03-28 13:25:01 +00:00
Peter Dufault
8a6472b723 Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work.  Changes:

Change all "posix4" to "p1003_1b".  Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.
1998-03-28 11:51:01 +00:00
Bruce Evans
08637435f2 Moved some #includes from <sys/param.h> nearer to where they are actually
used.
1998-03-28 10:33:27 +00:00
Poul-Henning Kamp
a0502b19d4 Add two new functions, get{micro|nano}time.
They are atomic, but return in essence what is in the "time" variable.
gettime() is now a macro front for getmicrotime().

Various patches to use the two new functions instead of the various
hacks used in their absence.

Some puntuation and grammer patches from Bruce.

A couple of XXX comments.
1998-03-26 20:54:05 +00:00
Warner Losh
9b5728dbde Remove unused cheat static. 1998-03-25 22:40:06 +00:00
Jonathan Lemon
098171734b Fix a stupid bug where I was returning the wrong value. It's a wonder
this code even worked in the first place.
1998-03-24 16:51:36 +00:00
Jonathan Lemon
eefbfc25cb Only read the cr4 register if the cpu_feature flag indicates the machine
has VME support.

Noticed by: kato
1998-03-24 16:47:12 +00:00
KATO Takenori
b53480bf6f PC-98 does not have a BIOS call to get memory size. 1998-03-24 08:29:05 +00:00
Kazutaka YOKOTA
c4118fc0b0 Describe the SC_DISABLE_REBOOT option. 1998-03-24 02:55:03 +00:00
Jonathan Lemon
640c4313af Add the ability to make real-mode BIOS calls from the kernel. Currently,
everything is contained inside #ifdef VM86, so this option must be
present in the config file to use this functionality.

Thanks to Tor Egge, these changes should work on SMP machines.  However,
it may not be throughly SMP-safe.

Currently, the only BIOS calls made are memory-sizing routines at bootup,
these replace reading the RTC values.
1998-03-23 19:52:59 +00:00
Peter Wemm
59088db3cb si driver has changed microcode file locations. 1998-03-23 16:44:22 +00:00
Peter Wemm
16c807f853 Remove these.
They have been replaced by different uuencoded binary files, so it would
have been nearly a 100% delta anyway.
1998-03-23 16:42:42 +00:00
Peter Wemm
e93eb8a353 Several changes:
- Implement proper EISA probing.
 - Better support for the new transputer based host cards.
 - use standard termios settings, one can use the intial/lock devices.
 - use a simple bcopy since some cards/systems apparently don't support
   32 bit accesses.
 - hard reset and halt host card CPU prior to download in case of a soft
   restart.
 - recognize new remote module types (ASIC vs. CD1400 based)
 - a number of cosmetic changes (my fault, not Nick's)

Submitted by:  Nick Sayer <nsayer@quack.kfu.com>
1998-03-23 16:27:43 +00:00
Peter Wemm
eaab5e9a66 New versions of Specialix host card download code.
Submitted by:  Nick Sayer <nick@quack.kfu.com>
1998-03-23 16:12:53 +00:00
Peter Wemm
1689d8bdca Add IPFILTER, IPFILTER_LOG and note IPFILTER_LKM. 1998-03-21 14:13:47 +00:00
Peter Wemm
c0a3aab811 zap 'vector siintr' from example si0 config 1998-03-21 06:21:03 +00:00
Peter Wemm
d53b8e5f34 merge from 2.2 1998-03-21 06:17:14 +00:00
Peter Wemm
d5fe170b52 Merge from 2.2, plus some other changes. In the config file entry,
'vector siintr' isn't used since the handler is assigned internally.
1998-03-21 05:17:29 +00:00
Mike Smith
1b5691c329 Remove unuseful (and annoying) ENXIO printf. 1998-03-20 23:14:52 +00:00
David Greenman
4d88b7963a Protect against count of chars received being 0, which causes a panic
otherwise. Can apparantly happen with some firmware revs.

Submitted by:	Kouichi Hirabayashi <kh@mogami-wire.co.jp>
1998-03-18 20:52:28 +00:00
Søren Schmidt
eb615e1788 Fixed missing filemark on close if data written to tape.
Don't try to flush buffers if the drive says it has none.
More error checking and reporting.

Hack: if drive hangs, it can be reset by issuing a mt -f device offline.

I've been able to make several 4G backups. However there is still problems
with some configurations. It is not clear if it is hardware or driver
problems yet.
1998-03-17 10:45:18 +00:00
KATO Takenori
61324207f1 Make EPSON_BOUNCEDMA a new-style option. 1998-03-17 09:11:03 +00:00
Mike Smith
4d1b2b52df Add missing entry to list of major device names. This list should not
exist.
1998-03-17 00:28:02 +00:00
Eivind Eklund
f909c15bec Clear up DPT comment to avoid further confusion. This is a hardware
driver.
1998-03-16 23:04:07 +00:00
Mike Smith
14e6f79297 Spell 'compatibility' like everyone else. 1998-03-16 12:07:54 +00:00
Mike Smith
2167f84289 Use dkmakeminor() rather than magic knowledge of the size and location of
the slice field.  Handle incomprehensible slice numbers slightly better.
Suggested by:	bde
1998-03-16 11:50:39 +00:00
Poul-Henning Kamp
7ab95d0bab Be less draconian about the TSC if APM is configured, use it for
timecounting if APM-BIOS isn't found.
Be just as draconian about SMP as always, but explain it better.
1998-03-16 10:06:58 +00:00
John Dyson
bef608bd7e Some VM improvements, including elimination of alot of Sig-11
problems.  Tor Egge and others have helped with various VM bugs
lately, but don't blame him -- blame me!!!

pmap.c:
1)	Create an object for kernel page table allocations.  This
	fixes a bogus allocation method previously used for such, by
	grabbing pages from the kernel object, using bogus pindexes.
	(This was a code cleanup, and perhaps a minor system stability
	 issue.)

pmap.c:
2)	Pre-set the modify and accessed bits when prudent.  This will
	decrease bus traffic under certain circumstances.

vfs_bio.c, vfs_cluster.c:
3)	Rather than calculating the beginning virtual byte offset
	multiple times, stick the offset into the buffer header, so
	that the calculated offset can be reused.  (Long long multiplies
	are often expensive, and this is a probably unmeasurable performance
	improvement, and code cleanup.)

vfs_bio.c:
4)	Handle write recursion more intelligently (but not perfectly) so
	that it is less likely to cause a system panic, and is also
	much more robust.

vfs_bio.c:
5)	getblk incorrectly wrote out blocks that are incorrectly sized.
	The problem is fixed, and writes blocks out ONLY when B_DELWRI
	is true.

vfs_bio.c:
6)	Check that already constituted buffers have fully valid pages.  If
	not, then make sure that the B_CACHE bit is not set. (This was
	a major source of Sig-11 type problems.)

vfs_bio.c:
7)	Fix a potential system deadlock due to an incorrectly specified
	sleep priority while waiting for a buffer write operation.  The
	change that I made opens the system up to serious problems, and
	we need to examine the issue of process sleep priorities.

vfs_cluster.c, vfs_bio.c:
8)	Make clustered reads work more correctly (and more completely)
	when buffers are already constituted, but not fully valid.
	(This was another system reliability issue.)

vfs_subr.c, ffs_inode.c:
9)	Create a vtruncbuf function, which is used by filesystems that
	can truncate files.  The vinvalbuf forced a file sync type operation,
	while vtruncbuf only invalidates the buffers past the new end of file,
	and also invalidates the appropriate pages.  (This was a system reliabiliy
	and performance issue.)

10)	Modify FFS to use vtruncbuf.

vm_object.c:
11)	Make the object rundown mechanism for OBJT_VNODE type objects work
	more correctly.  Included in that fix, create pager entries for
	the OBJT_DEAD pager type, so that paging requests that might slip
	in during race conditions are properly handled.  (This was a system
	reliability issue.)

vm_page.c:
12)	Make some of the page validation routines be a little less picky
	about arguments passed to them.  Also, support page invalidation
	change the object generation count so that we handle generation
	counts a little more robustly.

vm_pageout.c:
13)	Further reduce pageout daemon activity when the system doesn't
	need help from it.  There should be no additional performance
	decrease even when the pageout daemon is running.  (This was
	a significant performance issue.)

vnode_pager.c:
14)	Teach the vnode pager to handle race conditions during vnode
	deallocations.
1998-03-16 01:56:03 +00:00
Eivind Eklund
7db79065bd Remove an ifdef (to get linker errors instead of compile errors in the
absence of 'controller snd0').
1998-03-15 23:08:24 +00:00
Mike Smith
0fd31d39fa Use dsname() to generate the disk region name for the "changing root
device to" message.  Suppress this message if only the slice number
has changed.
1998-03-15 04:42:23 +00:00
Tor Egge
8f7030a7cc Add a BOOTP_WIRED_TO option, for use on machines with multiple network
cards where the first detected card should not be used for bootp.
Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
1998-03-14 04:13:56 +00:00
Tor Egge
c555a715f5 On SMP systems, initially follow the MP spec with regard to which pin
on the IOAPIC being connected to the 8254 timer interrupt.
Verify that timer interrupts are delivered. If they aren't, attempt
a fallback to mixed mode (i.e. routing the timer interrupt via the 8259 PIC).
1998-03-14 03:11:50 +00:00
Tor Egge
d20d60be28 Don't use the standard macros for disabling/enabling interrupt.
On SMP systems, this left the mpintr_lock simplelock locked, causing
further calls to disable_intr to deadlock or panic.
1998-03-14 03:02:15 +00:00
John Birrell
afe4dfa050 Added a null entry for sysmk that is generated by makesyscalls.sh.
Gee, I wish there was a better way to run makesyscalls.sh so that
a make world finds missing things like this. Running it manually
sucks.

Pointed out by: Peter Dufault
1998-03-13 19:13:54 +00:00
Eivind Eklund
57a0e7b124 'LKM' is a minimal kernel config file, just enough to be able to test-link
the LKMs.
1998-03-12 20:00:21 +00:00
Bruce Evans
8b5ab341cb Removed duplicated -I options. 1998-03-12 12:26:49 +00:00
Bruce Evans
4a61fb92f4 Removed hacks to pass -nostdinc to mkdep. bsd.dep.mk now handles
-nostdinc properly.
1998-03-12 12:23:27 +00:00
Bruce Evans
7762bc7bdf Fixed breakage of the !SMP case in vm_page_zero_idle() in the
previous commit.  Opportunities to clean pages were often missed,
and leaving of the idle state was sometimes delayed until the next
interrupt (after any that occurred while cleaning).

Fixed an unstaticization, a syntax error and a style bug in the
previous commit.
1998-03-12 09:55:57 +00:00
Bruce Evans
d1d9d2601f Don't depend on "implicit int" or bloat the data section in the
declaration of mem_devsw_installed.

Reduced include nesting.
1998-03-12 09:14:18 +00:00
Julian Elischer
fdc021ba7f Add EISA support for DPT drivers
Submitted by: Matthew Dodd
Reviewd by:	shimon@simon-shapiro.org (DPT author)
1998-03-11 00:30:16 +00:00
Eivind Eklund
04fa1e6c8b Change PMAP_SHPGPERPROC to not be equal to the default, for the
benefit of bde's "unused include files" script.

Requested by:	bde
1998-03-10 15:42:13 +00:00
Jordan K. Hubbard
24265e24b6 Add bktr and pcm entries by popular request. Also use more canonical
reference to [ENTER] in the docs rather than [RETURN].
1998-03-10 08:03:47 +00:00
Eivind Eklund
005092bba6 Turn "PMAP_SHPGPERPROC" into a new-style option, add it to LINT, and
document it there.
1998-03-09 22:09:13 +00:00
Mike Smith
72928bdadb "Correct behaviour" involves being consistent with the canonical names of
other partitions.  In this case, they appear in the first slice in the
WHOLE_DISK_SLICE case.
1998-03-09 08:35:33 +00:00
Mike Smith
34ef5a9d25 Merge from 2.2; behave correctly in the presence of a slice number that
doesn't directly correspond to the slice field in the device minor number.
1998-03-09 08:10:21 +00:00
Steve Price
6cc8ce08fe Correct an ethernet framesize mismatch that caused poor
device performance among other things.

PR:		4989, 5910
Submitted by:	Yoshikazu Goto <gotoh@ae.anritsu.co.jp>
1998-03-09 03:07:54 +00:00
Mike Smith
f2dddd5e99 Construct the minor number for the root device taking into account the
slice number passed in by the bootblocks.  This means the kernel will
not use the compatability slice to obtain the root filesystem when
booting from a sliced disk.

Use the extraction macros from reboot.h rather than stating them in full
again.
1998-03-08 15:06:55 +00:00
Julian Elischer
b1897c197c Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by:	Kirk McKusick (mcKusick@mckusick.com)
Obtained from:  WHistle development tree
1998-03-08 09:59:44 +00:00
John Dyson
8f9110f6a1 This mega-commit is meant to fix numerous interrelated problems. There
has been some bitrot and incorrect assumptions in the vfs_bio code.  These
problems have manifest themselves worse on NFS type filesystems, but can
still affect local filesystems under certain circumstances.  Most of
the problems have involved mmap consistancy, and as a side-effect broke
the vfs.ioopt code.  This code might have been committed seperately, but
almost everything is interrelated.

1)	Allow (pmap_object_init_pt) prefaulting of buffer-busy pages that
	are fully valid.
2)	Rather than deactivating erroneously read initial (header) pages in
	kern_exec, we now free them.
3)	Fix the rundown of non-VMIO buffers that are in an inconsistent
	(missing vp) state.
4)	Fix the disassociation of pages from buffers in brelse.  The previous
	code had rotted and was faulty in a couple of important circumstances.
5)	Remove a gratuitious buffer wakeup in vfs_vmio_release.
6)	Remove a crufty and currently unused cluster mechanism for VBLK
	files in vfs_bio_awrite.  When the code is functional, I'll add back
	a cleaner version.
7)	The page busy count wakeups assocated with the buffer cache usage were
	incorrectly cleaned up in a previous commit by me.  Revert to the
	original, correct version, but with a cleaner implementation.
8)	The cluster read code now tries to keep data associated with buffers
	more aggressively (without breaking the heuristics) when it is presumed
	that the read data (buffers) will be soon needed.
9)	Change to filesystem lockmgr locks so that they use LK_NOPAUSE.  The
	delay loop waiting is not useful for filesystem locks, due to the
	length of the time intervals.
10)	Correct and clean-up spec_getpages.
11)	Implement a fully functional nfs_getpages, nfs_putpages.
12)	Fix nfs_write so that modifications are coherent with the NFS data on
	the server disk (at least as well as NFS seems to allow.)
13)	Properly support MS_INVALIDATE on NFS.
14)	Properly pass down MS_INVALIDATE to lower levels of the VM code from
	vm_map_clean.
15)	Better support the notion of pages being busy but valid, so that
	fewer in-transit waits occur.  (use p->busy more for pageouts instead
	of PG_BUSY.)  Since the page is fully valid, it is still usable for
	reads.
16)	It is possible (in error) for cached pages to be busy.  Make the
	page allocation code handle that case correctly.  (It should probably
	be a printf or panic, but I want the system to handle coding errors
	robustly.  I'll probably add a printf.)
17)	Correct the design and usage of vm_page_sleep.  It didn't handle
	consistancy problems very well, so make the design a little less
	lofty.  After vm_page_sleep, if it ever blocked, it is still important
	to relookup the page (if the object generation count changed), and
	verify it's status (always.)
18)	In vm_pageout.c, vm_pageout_clean had rotted, so clean that up.
19)	Push the page busy for writes and VM_PROT_READ into vm_pageout_flush.
20)	Fix vm_pager_put_pages and it's descendents to support an int flag
	instead of a boolean, so that we can pass down the invalidate bit.
1998-03-07 21:37:31 +00:00
Tor Egge
1516126e28 Reenable redirection of clock interrupt to a higher priority vector.
setidt() now knows about f00f_hack(), and the APs now use the same
interrupt descriptor table as the BSP.
1998-03-07 20:48:16 +00:00
Tor Egge
1146c3560f The APs now reload the interrupt descriptor table pointer after
f00f_hack has run.

Use the global r_idt descriptor in f00f_hack when in SMP mode,
so the APs find the relocated interrupt descriptor table.

Submitted by:	Partially from David A Adkins <adkin003@tc.umn.edu>
1998-03-07 20:16:49 +00:00
Eivind Eklund
22263dd149 Make this handle -j<large>, and avoid .depend pointing at /usr/include. 1998-03-07 10:48:15 +00:00
Tor Egge
5dd528cd4e Remove special handling for resuming clock interrupt when using APIC_IO.
The `generic' vector stubs do the right thing.
1998-03-05 21:45:53 +00:00
Tor Egge
622a086be3 Use t_idt instead of idt inside setidt() if f00f_hack() has relocated the IDT.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1998-03-05 19:37:03 +00:00
Tor Egge
540d82e3b4 Disable redirection of clock interrupt to a higher priority vector.
This does not work on most dual Pentium machines, due to setidt()
being neutralized by f00f_hack().
1998-03-04 23:45:12 +00:00
KATO Takenori
3a94cb7f7d Defined CCR6 and CCR7 (configuration registers of M2 CPU.) 1998-03-04 11:39:16 +00:00
Peter Dufault
f3df61a1cd Reviewed by: msmith, bde long ago
Fix for RTPRIO scheduler to eliminate invalid context switches.
1998-03-04 10:25:03 +00:00
Peter Wemm
f688ebc13a Fix recent breakage when compiling under elf.
_Xforward_irq         -> Xforward_irq
_apic_isrbit_location -> apic_isrbit_location
_cpu_num_to_apic_id   -> cpu_num_to_apic_id
_invltlb_ok           -> invltlb_ok
1998-03-04 09:55:13 +00:00
Tor Egge
02c1dc3bbc When entering the apic version of slow interrupt handler, level
interrupts are masked, and EOI is sent iff the corresponding ISR bit
is set in the local apic. If the CPU cannot obtain the interrupt
service lock (currently the global kernel lock) the interrupt is
forwarded to the CPU holding that lock.

Clock interrupts now have higher priority than other slow interrupts.
1998-03-03 22:56:30 +00:00
Tor Egge
3163861c7b Forward the signal if the process runs on a different CPU. This reduces
the signal handling latency for cpu-bound processes that performs very
few system calls.

The IPI for forcing an additional software trap is no longer dependent upon
BETTER_CLOCK being defined.
1998-03-03 20:55:26 +00:00
Tor Egge
fe9cd27373 Reduce timeout before assuming that forwarding of hardclock or softclock
failed. Don't complain on forwarding failure, unless
BETTER_CLOCK_DIAGNOSTIC is defined.
1998-03-03 20:09:14 +00:00
Tor Egge
ff27571284 When sending an IPI to a specific target, disable interrupts inside the
critical region in order to avoid sending the IPI to the wrong target.
1998-03-03 19:54:49 +00:00
Tor Egge
221e0c595b forward_statclock and forward_hardclock are located in mp_machdep.c. 1998-03-03 19:44:34 +00:00
Peter Wemm
c8a7999933 Update the ELF image activator to use some of the exec resources rather
than rolling it's own.  This means that it now uses the "safe"
exec_map_first_page() to get the ld.so headers rather than risking a panic
on a page fault failure (eg: NFS server goes down).
Since all the ELF tools go to a lot of trouble to make sure everything
lives in the first page for executables, this is a win.  I have not seen
any ELF executable on any system where all the headers didn't fit in the
first page with lots of room to spare.
I have been running variations of this code for some time on my pure ELF
systems.
1998-03-02 05:47:58 +00:00
Søren Schmidt
231f599691 First pre alpha Work In Progress commit of a IDE/ATAPI tape driver.
It does endeed work, but there is still some problems to solve.
I get a "nonrecovered data error" from time to time, but besides
this it has backed up several Gigs allready.

Please report any success/failure directly to me.

Thanks to Warner Losh for providing a drive to use in writing
this driver!
1998-03-01 18:57:29 +00:00
John Dyson
ffc82b0a70 1) Use a more consistent page wait methodology.
2)	Do not unnecessarily force page blocking when paging
	pages out.
3)	Further improve swap pager performance and correctness,
	including fixing the paging in progress deadlock (except
	in severe I/O error conditions.)
4)	Enable vfs_ioopt=1 as a default.
5)	Fix and enable the page prezeroing in SMP mode.

All in all, SMP systems especially should show a significant
improvement in "snappyness."
1998-03-01 04:18:54 +00:00
Poul-Henning Kamp
3301c800f5 Prevent the TSC from being used on APM machines, we have no idea if
it runs at a constant frequency.  This was less of an issue before,
because the TSC only interpolated in the HZ intervals, but now where
the timecounter is used all the way, this becomes much more visible.

Nit: Fix a printf which triggered the bde-filter.
1998-02-28 21:16:13 +00:00
Tatsumi Hosokawa
71cbe8e15a Support for "MAC address in CIS" type cards.
For example, IBM Creditcard Ethernet's MAC address is ALWAYS
"0:2:4:6:8:a" :-) without this code.
1998-02-27 14:29:51 +00:00
Jun-ichiro itojun Hagino
751bf650a8 make sys/netkey/key{,_debug}.c compile. I believe it works but not tested.
I'll polish the code later on.
1998-02-27 10:02:49 +00:00
Mike Smith
47959c89b9 PCCARD-code related style nits, as requested.
Submitted by:	bde
1998-02-27 06:39:32 +00:00
Jordan K. Hubbard
281bc0476a Move "geometry disk" device (not yet implemented) to major 95 to
eliminate conflict with /dev/pci.
1998-02-27 06:15:50 +00:00
Mike Smith
9a70f9f75f Fix some style nits and remove an unused header.
Submitted by:	bde
1998-02-27 05:38:32 +00:00
Amancio Hasty
d7ef1f6051 Radio support for bt848 cards from Flemming Jacobsen <fj@trw.nl>
Amancio
1998-02-26 08:19:14 +00:00
KATO Takenori
3ce6f1bf50 Fixed syntax error by recent changes to the queue macros. 1998-02-26 03:20:41 +00:00
Bruce Evans
770a5f7ec9 Removed redundant test against MAXDSIZ (the rlimit test is stronger). 1998-02-25 05:33:06 +00:00
John Dyson
660957521c Fix page prezeroing for SMP, and fix some potential paging-in-progress
hangs.  The paging-in-progress diagnosis was a result of Tor Egge's
excellent detective work.
Submitted by:	Partially from Tor Egge.
1998-02-25 03:56:15 +00:00
Bruce Evans
6aeb4f6474 Removed vestiges of previous microtime() implementation. 1998-02-25 02:20:30 +00:00
Poul-Henning Kamp
828c63ae15 Add loran0 to LINT 1998-02-24 22:24:46 +00:00
Poul-Henning Kamp
cb7cfa353d Add the smallest and least useful device-driver by a fair margin... 1998-02-24 22:08:05 +00:00
Steve Price
26fa14da33 Use port 0x110 to avoid PNP conflicts.
PR:		5614, 5781
1998-02-23 15:02:59 +00:00
John Dyson
d9bed5bee1 Try to dynamically size the VM_KMEM_SIZE (but is still able to be overridden
in a way identically as before.)  I had problems with the system properly
handling the number of vnodes when there is alot of system memory, and the
default VM_KMEM_SIZE.  Two new options "VM_KMEM_SIZE_SCALE" and
"VM_KMEM_SIZE_MAX" have been added to support better auto-sizing for systems
with greater than 128MB.

Add some accouting for vm_zone memory allocations, and provide properly
for vm_zone allocations out of the kmem_map.  Also move the vm_zone
allocation stats to the VM OID tree from the KERN OID tree.
1998-02-23 07:42:43 +00:00
Bruce Evans
168be6199e Quick fix for the i8254 timecounter often gaining 10 msec. 1998-02-23 00:11:25 +00:00
Jordan K. Hubbard
6bf2dcfc50 Add missing CLOCK_UNLOCK() before write_eflags().
Submitted by:	dave adkins <adkin003@tc.umn.edu>
1998-02-21 20:45:27 +00:00
Nate Williams
4bd4f74b5f there is a minor bug in sb_dsp.c -- the driver
reports ESS cards as able to do 16-bit, but it has no support for it.

Submitted by:	Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1998-02-21 17:53:04 +00:00
Nate Williams
68c4406a91 A minor bugfix for my audio driver and pcaudio. The problem is with
signals delivered to a process writing to the audio device the
system: if you try

        cat /dev/zero > /dev/dsp (or cat /dev/zero > /dev/pcaudio)

and press Ctrl-C : for a second or two the system appears to freeze
(e.g. the cursor will disappear if you move the mouse, xclock
blocks, etc.). I think that interrupts etc. still run so the problem
is not too terrible, but still annoying

[ The problems appears to also be in isa/pcaudio.c, though that is ignored ]

Submitted by:	Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1998-02-21 17:51:39 +00:00
KATO Takenori
2d67fcee71 Make pc98 options new-style. 1998-02-21 16:17:55 +00:00
Eivind Eklund
c2469addb2 Make TUNE_1542 a new-style option, and enable this option in LINT. It
has been disabled since 1994 by mistake (or at least I hope so :-)
1998-02-21 10:11:43 +00:00
Jordan K. Hubbard
3bbe72d3dd Reserve cdev 93 for CODA filesystem.
Submitted by:	"Robert.V.Baron" <rvb@GLUCK.CODA.CS.CMU.EDU>
1998-02-20 23:55:32 +00:00
Poul-Henning Kamp
7ec73f6417 Replace TOD clock code with more systematic approach.
Highlights:
    * Simple model for underlying hardware.
    * Hardware basis for timekeeping can be changed on the fly.
    * Only one hardware clock responsible for TOD keeping.
    * Provides a real nanotime() function.
    * Time granularity: .232E-18 seconds.
    * Frequency granularity:  .238E-12 s/s
    * Frequency adjustment is continuous in time.
    * Less overhead for frequency adjustment.
    * Improves xntpd performance.

Reviewed by:    bde, bde, bde
1998-02-20 16:36:17 +00:00
Bruce Evans
e31abede1f Don't depend on "implicit int" or bloat the data section in the
declaration of xxx_devsw_installed.
1998-02-20 13:46:58 +00:00
Bruce Evans
d68fa50ccb Don't depend on "implicit int". 1998-02-20 13:37:40 +00:00
Bruce Evans
39e4376ba7 Removed unused #includes. 1998-02-20 13:11:54 +00:00
Bruce Evans
ee16b4300e Fixed some stale comments about console drivers.
Uncommented css0.  It compiles OK.

Moved trix0 so that it compiles OK when uncommented.  Uncommented
it.  Drivers with the same interrupt handler must be together in
config files so that config(8)'s simple avoidance of redundant
declarations of interrupt handlers works (config emits a declaration
unless it would duplicate the previous one).

Commented out NO_LKM.  Negative options should not be configured
in LINT.  There should be no negative options for subsystems.
LKMs should never have been standard or the default.
1998-02-20 12:27:28 +00:00
Steve Price
ad64a9aade Don't propogate *_DEBUG options. Use DEBUG and recompile
only those parts of the kernel that you are interested in.

Prodded by:	Bruce Evans <bde@zeta.org.au>
1998-02-20 04:19:39 +00:00
Amancio Hasty
1735805c3a Move Luigi's I2CWR ioctl from the video_ioctl section to the
tuner_ioctl section. Changed Major device from 79 to 92 and reserved
our Major device number -- hasty@star-gate.com
1998-02-20 03:55:17 +00:00
Steve Price
8f50e70513 Cleanup the lpt for probe code.
PR:		5773
Submitted by:	Dag-Erling Coidan Smorgrav <dag-erli@ifi.uio.no>
1998-02-20 02:44:48 +00:00
Steve Price
34d1c7b48c Add an LPT_DEBUG option.
PR:		5773
Submitted by:	Dag-Erling Coidan Smorgrav <dag-erli@ifi.uio.no>
1998-02-20 02:44:18 +00:00
Mike Smith
eed5086e1a Move the 'sw' device off block major #1, which is now occupied by 'wfd'. 1998-02-19 12:15:06 +00:00
Jordan K. Hubbard
86b1080174 91 vinum RAID fs
Requested by:	grog
1998-02-19 01:33:29 +00:00
Mike Smith
1f98b2eb0f Remove the 'qcam' driver. Development has ceased, and the driver is
nonfunctional.
Submitted by:	pst (conversation some time ago)
1998-02-18 13:43:59 +00:00
Marc G. Fournier
a7b4a3794c soundcard.h wasn't upgraded when i386/isa/snd was 1998-02-18 02:27:00 +00:00
Nate Williams
fc4c155508 - Removed unused files. 1998-02-17 19:18:10 +00:00
Nate Williams
0e6400c7f0 - Updated to Luigi's 2-15-98 code. The code in 2.2 is the same except for
select/poll and DEVFS changes, which are limited to an include/define
  in sound.h and the actual select/poll implementation in sound.c

[ This commit is blind, but the code is similar enough that there will
  hopefully be no problems. ]
1998-02-17 19:17:08 +00:00
Nate Williams
17c85b4825 - Remove files at shouldn't be in the tree. 1998-02-17 18:59:15 +00:00
Jordan K. Hubbard
861e99c812 Support for >32 ports.
PR:		5765
Submitted by:	Steve Gericke <steveg@comtrol.com>
1998-02-17 15:36:46 +00:00
Marc G. Fournier
45f4be3300 Upgrade Luigi's audio driver to Jan/23 version... will bring in Feb/15th
version as soon as I've tested it...

Installed/tested on my home machine...any problems, please report directly
to me.
1998-02-17 14:17:13 +00:00
Marc G. Fournier
eebeedcca7 Upgrade Luigi's audio driver to Jan/23 version... will bring in Feb/15th
version as soon as I've tested it...

Installed/tested on my home machine...any problems, please report directly
to me.
1998-02-17 14:03:10 +00:00
Søren Schmidt
d22a3e8547 Correct the use of major 1 its now the wfd device
Also add wst device
1998-02-17 11:33:31 +00:00
Søren Schmidt
ea38cb7ffc Add 'wst" atapi tape devicefile. 1998-02-17 11:32:33 +00:00
Jordan K. Hubbard
ce84f3a9d6 Add entry for Greg Lehey's "vinum" fs - don't know what to call it in
here so I just called it a RAID fs.
1998-02-17 10:52:56 +00:00
Søren Schmidt
bee7612b0b Reserve major # for the atapi tape device 1998-02-17 10:44:23 +00:00
KATO Takenori
9dca5248c5 Enable NEC 86 sound card when PC98 is defined.
Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1998-02-17 03:15:30 +00:00
Eivind Eklund
d94f38ace2 Add HW_WDOG to LINT, and turn it into a new-style option. 1998-02-16 23:57:49 +00:00
Mike Smith
42be88e88d Remove DISABLE_PSE option which was masking (but not fixing) the problem.
A correct fix for execution off MFS filesystems has been committed.
1998-02-16 23:57:03 +00:00
Mike Smith
354f83d34f TEMPORARILY disable support for the 4MB kernel page, as it appears to be
causing installation images for -current to be unbootable.

Submitted by:	phk
1998-02-16 00:29:05 +00:00
Eivind Eklund
5b4636a600 Make bootblock building independent of /usr/include if relative
includes are available.
1998-02-15 21:38:19 +00:00
Peter Wemm
a397086e61 Update to support SI/XIO PCI host cards (Z280 based) and the enhanced
SXISA and SXPCI host cards (Transputer based).

PR: 4836, 5021, 5654
Submitted by:  Nick Sayer <nick@specialix.com>
1998-02-15 14:42:33 +00:00
Bruce Evans
ee10b2a475 Removed a superstitious fnop() that broke the usefulness of the FPU's
"last instruction" pointer.
1998-02-15 06:25:26 +00:00
Nate Williams
a021db1639 - If a PCCARD serial device is removed from the system, let the serial
driver 'break out' of the infinite loop waiting for a response from
  it.  This is a bad thing, but no worse than having the kernel hang.
1998-02-14 16:17:17 +00:00
Paul Traina
186a666128 Change wfd major block device to 1 as part of the effort to make wfd's
bootable without a big increase in boot2's size.
1998-02-13 22:41:00 +00:00
Poul-Henning Kamp
aa7caaaeb8 Fix a couple of lines that dropped out in my merge yesterday.
Complained about by:	ache
1998-02-13 17:54:53 +00:00
Poul-Henning Kamp
507e2e4443 Add a skelleton pulse-per-second timing driver. This will become more
useful when I get my timecounter changes past the Bruce-filter.
1998-02-13 13:00:02 +00:00
Poul-Henning Kamp
a4daaa09f2 Implement the spirit but not the letter of Terrys hot-char patch.
The differences Terrys patch and this patch are:
 * Remove a lot of un-needed comments.
 * Don't put l_hotchar at the front of stuct linesw, there is no need to.
 * Use the #defines for the hotchar in the SLIP and PPP line disciplines
1998-02-13 12:46:28 +00:00
Poul-Henning Kamp
a744622f69 Hmm, it is generally an advantage to commit the most recent version of
ones changes:  A faster character painter procedure and fix on cursor
bug.
1998-02-13 11:31:34 +00:00
KATO Takenori
53a76bb7ed Use RDMSR instruction instead of WRMSR. 1998-02-13 09:34:42 +00:00
Bruce Evans
9d767d027e Staticized. 1998-02-13 07:34:52 +00:00
Bruce Evans
5883bcc9d2 Don't (conditionally) override the kernel's min() and max() functions
with macros.  This breaks if the functions are replaced by macros with
unsuitable semantics.   Define a MAX() macro unconditionally instead.
max() is unsuitable since we need a constant expression.  Don't define
MIN() - we never used min().
1998-02-13 07:09:38 +00:00
Bruce Evans
359888780e Ifdefed SMP-only declarations. 1998-02-13 06:59:22 +00:00
Bruce Evans
cee45f8421 Don't generate warnings for test coverage checking when compiling LINT.
Generate code instead.
1998-02-13 06:49:16 +00:00
Bruce Evans
1d804e7925 Update timer0_prescaler_count before calling hardclock() while timer0
is "acquired".  This fixes a TSC biasing error of about 10 msec when
pcaudio is active.

Update `time' before calling hardclock() when timer0 is being released.
This is not known to be important.

Added some delays in writertc().  Efficiency is not critical here, unlike
in rtcin(), and we already use conservative delays there.

Don't touch the hardware when machdep.i8254_freq is being changed but
the maximum count wouldn't change.  This fixes jitter of up to 10 msec
for most small adjustments to machdep.i8254_freq.  When the maximum
count needs to change, the hardware should be adjusted more carefully.
1998-02-13 06:33:16 +00:00
Bruce Evans
9f449d2aa2 Ifdefed some npx code. npx should be optional again. 1998-02-13 05:30:18 +00:00
Bruce Evans
9729f279db Fixed missing privilege checking and off-by-1 bounds checking in
i386_set_ioperm().  Don't use a magic number for the bound.

Fixed missing bounds checking in i386_get_ioperm().  Don't use a
magic number for the bound elsewhere in this function.

Removed some bogus initializers.
1998-02-13 05:25:37 +00:00
Bruce Evans
b01c51d18f Fixed staticization (the behaviour is undefined when something with
external linkage is redeclared as static).
1998-02-12 23:16:12 +00:00
Bruce Evans
76d43151d2 Unstaticized. 1998-02-12 22:33:33 +00:00
Poul-Henning Kamp
8a69c85a7e Add support for VESA mode 0x102 (800x600x4) in syscons. You can activate
this using option "-b" to the boot blocks.  It is smartest to compile
a font into your kernel (See LINT), but not mandatory, but apart from
the cursor you will see nothing on the screen until you load a font.

This mode allows XF86_VGA16 to run in 800x600 mode on otherwise unsupported
graphics hardware.

A number of buglets in the cursor handling in syscons may become
visible this way.
1998-02-12 22:05:08 +00:00
Bruce Evans
045b6fefd8 Fixed initialization of the 4MB page. Kernels larger than about 2.75MB
(from _btext to _end) crashed in pmap_bootstrap().  Smaller kernels
worked accidentally.
1998-02-12 22:00:01 +00:00
Bruce Evans
cd59d49d07 Only use the i586-optimized copying and zeroing functions if they are
actually faster (more than 20% faster for zeroing 1 MB at boot time).
This fixes pessimized copying and zeroing on K6's and perhaps on other
CPUs that are misclassified as i586's.
1998-02-12 21:41:10 +00:00
Poul-Henning Kamp
b9483c6b9b Fix a white-space nit which I happened to notice. 1998-02-12 20:52:24 +00:00
Poul-Henning Kamp
befeeb59cb Add display of type KD_PIXEL. 1998-02-12 20:47:39 +00:00
Kazutaka YOKOTA
409bd75190 Oops, sorry, a #define line for my debugging session slipped into
the last commit ;-<
1998-02-12 16:35:11 +00:00
Dima Ruban
bd45deefaa I'm not sure whether this is a correct way to do it,
but here's a new kernel option - "NO_LKM"

If anyone has better ideas - please let me know.
1998-02-11 20:47:55 +00:00
Kazutaka YOKOTA
8da0cd6227 Remove description on the flags for psm. They are adequately
documented in the man page for psm(4).
1998-02-11 17:37:55 +00:00
Kazutaka YOKOTA
2589e75553 Added SC_DISABLE_REBOOT and SC_MOUSE_CHAR. 1998-02-11 16:22:30 +00:00
Jordan K. Hubbard
8b8cd792cf Clean up comments describing Luigi's alternate sound driver. 1998-02-11 15:36:46 +00:00
Kazutaka YOKOTA
1ee1681798 - Move the mouse cursor to the center of the screen after video
mode switch in ioctl.
Possibly related to PR: kern/4271

- A kludge: initialize scp->xpixel and ypixel even in the text mode.
If the console enters the `unknown' graphics mode via the ioctl KDSETMODE
(KD_GRAPHICS), these fields are not set (because syscons cannot know
the correct values), but set_mouse_pos() need to refer to these field
to adjust the mouse position.

- Turn off MOUSE_VISIBLE when switching video mode by ioctl.

- another new option: SC_MOUSE_CHAR
Define the first character code of four consecutive codes to be used for
the mouse cursor.  Default codes are 0xd0 through 0xd3.  Beware that
if you decide to use any codes outside the range of 0xc0-0xdf,
the mouse cursor may not look good, because of the way VGA displays
characters in 9-dot-wide character cells.
Requested by several people.

(This patch was tested by a person who recently reported, in the -current
ML, a page fault problem in the kernel (draw_mouse_iamge()) after
X server shutdown. The patch cured his problem.)
1998-02-11 15:02:40 +00:00
Kazutaka YOKOTA
59f5eaf466 - A new semaphore: font_loading_in_progress.
Don't touch/update the screen while manipulating font data.
Possibly related to PR: kern/4271

- Set up VGA in alphanumeric mode rather than graphics mode when
loading font into video memory. This will drastically reduce flicker.
PR: bin/2977

- Set up scp->font_size properly during video mode switch caused by
ioctl.
1998-02-11 15:00:24 +00:00
Kazutaka YOKOTA
f8a35e9cef - Break scrn_timer() into two pieces. Now screen update is done in a
separate routine: scupdate() called from scrn_timer().

- Make sure that the screen is updated for the low-level console
routines sccngetc() and sccncheckc().  A new routine, sccnupdate(),
is introduced and will call scupdate() above.
Requested by: bde and msmith

OKed by: sos
1998-02-11 14:58:15 +00:00
Kazutaka YOKOTA
4930cbfa04 - Ignore KBD_RAW_MODE and KBD_CODE_MODE in scgetc() when it's called
from the low-level console routines sccngetc() and sccncheckc().
Submitted by: bde (a long time ago)

- Don't try to ring bell and immediately return from do_bell() while
device probe is in progress at boot time; the timeout queue is not
functional yet.
PR: kern/2424

- Stop running the screen saver after panic() is called: check
if `panicstr' is non-NULL during scrn_timer().
PR: kern/5314

- A new option: SC_DISABLE_REBOOT
The reboot key (usually Ctl-Alt-Del) will be ignored if this option
is defined. You may still have the reboot key defined in the keymap and
it won't cause error when the keymap is loaded, but it will be quietly
treated as nop.

OKed by: sos
1998-02-11 14:56:02 +00:00
Eivind Eklund
d131a704ed De-staticize enough to make all the LKMs work again. Add comments where
deemed relevant.
1998-02-11 01:46:50 +00:00
Eivind Eklund
cebe467c61 Back out statification and restore a declaration that got lost. 1998-02-10 21:51:00 +00:00
Eivind Eklund
b265178126 Fix warning after previous staticization. 1998-02-10 17:30:26 +00:00
KATO Takenori
c8d28276a8 Support C-NET(98)S ethernet card (PC-98 only).
Submitted by:	Chiharu Shibata <chi@rd.njk.co.jp>
1998-02-10 03:22:20 +00:00
KATO Takenori
9148904aaa Staticize. 1998-02-10 02:51:32 +00:00
Mike Smith
f1353e56ee If the kernel was built with USERCONFIG_BOOT, and the '-c' (RB_CONFIG) flag
was supplied to the kernel when booting, ignore any 'quit' commands in the
userconfig script.

This provides an escape mechanism whereby a broken userconfig script may
be worked around.
1998-02-10 00:10:35 +00:00
Peter Wemm
4390eccf7a Un-staticize. 1998-02-09 16:20:42 +00:00
KATO Takenori
a5b88b0149 NULL and UMAP filesystems also unstable. 1998-02-09 15:03:38 +00:00
Eivind Eklund
303b270b0a Staticize. 1998-02-09 06:11:36 +00:00
Eivind Eklund
5589ae9dfd Remove warnings from f00f_hack. 1998-02-09 04:45:53 +00:00
Mike Smith
dad3b88ae3 In the words of the submitter:
----
I've worked to enhance the connect() patches.

I've just tested this with the Linux JDK appletviewer on an applet
that does a lot of connects, and it works as well as during my
previous tests.

The connect() patch is now a merge between my older patch and the
OpenBSD stuff. It ensures that any async error is returned by
connect() instead of getsockopt(SOL_SOCKET, SO_ERROR) as reasonnable
systems do.

There are also minor patches to implement IPPROTO_TCP for
get/setsocktopt(). These are also tested (with Linux Apache).
----

I would appreciate any feedback regarding these changes, as they'd
be very useful in 2.2.6.

Submitted by:	pb@fasterix.freenix.org (Pierre Beyssac)
1998-02-07 02:13:27 +00:00
Eivind Eklund
0b08f5f737 Back out DIAGNOSTIC changes. 1998-02-06 12:14:30 +00:00
Eivind Eklund
09ae1abd69 Add PnP support to if_ed.c. 1998-02-05 04:08:41 +00:00
John Dyson
95461b450d 1) Start using a cleaner and more consistant page allocator instead
of the various ad-hoc schemes.
2)	When bringing in UPAGES, the pmap code needs to do another vm_page_lookup.
3)	When appropriate, set the PG_A or PG_M bits a-priori to both avoid some
	processor errata, and to minimize redundant processor updating of page
	tables.
4)	Modify pmap_protect so that it can only remove permissions (as it
	originally supported.)  The additional capability is not needed.
5)	Streamline read-only to read-write page mappings.
6)	For pmap_copy_page, don't enable write mapping for source page.
7)	Correct and clean-up pmap_incore.
8)	Cluster initial kern_exec pagin.
9)	Removal of some minor lint from kern_malloc.
10)	Correct some ioopt code.
11)	Remove some dead code from the MI swapout routine.
12)	Correct vm_object_deallocate (to remove backing_object ref.)
13)	Fix dead object handling, that had problems under heavy memory load.
14)	Add minor vm_page_lookup improvements.
15)	Some pages are not in objects, and make sure that the vm_page.c can
	properly support such pages.
16)	Add some more page deficit handling.
17)	Some minor code readability improvements.
1998-02-05 03:32:49 +00:00
Eivind Eklund
47cfdb166d Turn DIAGNOSTIC into a new-style option. 1998-02-04 22:34:03 +00:00
Eivind Eklund
4c890f3b43 Remove old, commented-out option SUIDDIR after Julian added a proper
entry for it.
1998-02-04 22:03:27 +00:00
Eivind Eklund
346ebe5115 Change LINT_PCCARD_HACK to COMPILING_LINT, and put it in its own header file
"opt_lint.h".  This should prevent the next person needing the same trick
from inventing their own option, too.
1998-02-04 04:41:37 +00:00
Eivind Eklund
cecc50bcd3 Make SPX_HACK a new-style option. 1998-02-04 04:12:29 +00:00
Eivind Eklund
7dff14331f Make FAILSAFE a new-style option. 1998-02-04 03:47:16 +00:00
Bruce Evans
44429dc4f7 Converted DISABLE_PSE to a new-style option.
Fixed some formatting in options.i386.
1998-02-03 22:09:01 +00:00
Bruce Evans
a8961a8284 Ifdefed some SMP and VM86 code. Note that although VM86 is not a global
option, the ifdef on it in a header works because only the name of the
VM86 extension is hidden.
1998-02-03 21:27:50 +00:00
Bruce Evans
318ed3ed7a Forward declare a union so that this file is self-sufficient.
Cleaned up ifdefs.
1998-02-03 20:46:18 +00:00
Bruce Evans
b9759fe4f9 Fixed a gratuitous ANSIism. 1998-02-03 20:37:29 +00:00
Bruce Evans
7a1a679ecb Ifdefed use of a GNU feature. 1998-02-03 20:32:38 +00:00