Commit Graph

21889 Commits

Author SHA1 Message Date
jake
273d0f5a2d Rename tsleep to msleep and add a mutex argument, which is
released before sleeping and re-acquired before msleep
returns.  A compatibility cpp macro has been provided for
tsleep to avoid changing all occurences of it in the kernel.

Remove an assertion that the Giant mutex be held before
calling tsleep or asleep.

This is intended to serve the same purpose as condition
variables, but does not preclude their addition in the
future.

Approved by:	jasone
Obtained from:	BSD/OS
2000-09-11 00:20:02 +00:00
jasone
7a63f3f75c Allow interrupt threads to run during shutdown. This should fix the
"dirty buffers during shutdown" problem introduced by the SMPng commit.

Submitted by:	tegge, cg
2000-09-10 23:06:50 +00:00
dfr
2bbf810544 Fix this so that we actually define HAVE_PNP when its available. 2000-09-10 17:11:27 +00:00
roger
b1a07b3c86 Update to build both bktr and bktr_mem modules 2000-09-10 15:40:20 +00:00
dfr
bd77d0334b Remove the manipulation of the Giant mutex from the interrupt entry
points. This can't work right anyway and needs to happen in the irq thread.
2000-09-10 15:39:23 +00:00
dfr
0ab743ee18 Use '&' instead of '%' to calculate the new value for ktr_idx. 2000-09-10 14:36:55 +00:00
roger
2957843814 Update to driver 2.15.
Main change is the addition of the bktr_mem module.

This holds onto the bktr driver's contiguously allocated memory
when the bktr driver is unloaded and reloaded.

This has to be done because it is virtually impossible to get
contiguous memory once a system is running.

Also tidied up the use of SMBUS, added a new Hauppauge tuner type (0x2c)
and a new Flyvideo vendor ID.
2000-09-10 14:34:08 +00:00
markm
9188fde501 Provide keyboard entropy harvesting for PCVT users. 2000-09-10 14:31:40 +00:00
markm
92be8785e1 Harvest mouse events for the entropy device in a better place. In the
new location, all mouse events are harvested, not just the ones being
written out to moused(8). This means that mouse entropy is harvested
at the consoles as well as in X.
2000-09-10 14:27:17 +00:00
markm
e7b7374b5d The entropy driver module has changed name. 2000-09-10 13:58:58 +00:00
dfr
d721d5e1d6 Move the include of <sys/systm.h> so that KTR gets a declaration for
snprintf().
2000-09-10 13:54:52 +00:00
markm
bda6631159 Large upgrade to the entropy device; mainly inspired by feedback
from many folk.

o The reseed process is now a kthread. With SMPng, kthreads are
  pre-emptive, so the annoying jerkiness of the mouse is gone.

o The data structures are protected by mutexes now, not splfoo()/splx().

o The cryptographic routines are broken out into their own subroutines.
  this facilitates review, and possible replacement if that is ever
  found necessary.

Thanks to:		kris, green, peter, jasone, grog, jhb
Forgotten to thank:	You know who you are; no offense intended.
2000-09-10 13:52:19 +00:00
dcs
87a1e517ad Bump up version as a result of the recent changes to kernel path,
and boot-conf&boot semantic changes.

Also, make it 1.0.

Reminded by: peter (even though he doesn't know it)
2000-09-10 13:51:44 +00:00
dcs
9f38720691 Bump up version as a result of the recent changes to kernel path,
and boot-conf&boot semantic changes.

Reminded by: peter (even though he doesn't know it)
2000-09-10 13:51:31 +00:00
dcs
fe786558be Change NOFORTH comment character from # to \ followed by space,
to make things more interchangeable between it and the FORTH case.

Perhaps requiring the space is a bit too much, but...

Nothing in the tree seems to produce loader.rc files with comment
line, at this time.
2000-09-10 13:48:51 +00:00
dfr
14c49fbe71 Fix printf warnings in CTRx calls. 2000-09-10 13:34:35 +00:00
dfr
e435d313a6 Move the include of <sys/systm.h> so that KTR gets a declaration for
snprintf().
2000-09-10 13:33:31 +00:00
dfr
7b70f9c046 Fix printf warnings. 2000-09-10 13:32:39 +00:00
dfr
c601d6f575 Fix printf warnings in CTRx calls. 2000-09-10 13:04:20 +00:00
dfr
0aed0d505c Update to work with the current version of KTR. 2000-09-10 13:03:24 +00:00
dfr
f7c899ec29 Only build PnP parts if the platform supports PnP. 2000-09-10 12:15:30 +00:00
phk
06ca4c9ec0 Updates to the ntp pll from John Hay.
Submitted by:	jhay
2000-09-10 09:13:34 +00:00
peter
1b8c462634 Bump __FreeBSD_version to 500013 after SMPng step 1 hit the tree.
If anything deserves to bump the version, surely this does.
2000-09-10 08:43:04 +00:00
bp
3ef04de723 Change variable naming to be consistent with the rest of VFS code.
Reduce number of indirections by using already fetched values.
2000-09-10 03:46:12 +00:00
jasone
4aa7af1bcf Back out the addition of malloc_mtx. It was incompletely conceived, and
will be done correctly in the future.
2000-09-10 01:54:15 +00:00
jasone
e454be9f46 Style cleanups. No functional changes. 2000-09-09 23:18:48 +00:00
jasone
9d6c8a5123 Add file and line arguments to WITNESS_ENTER() and WITNESS_EXIT, since
__FILE__ and __LINE__ don't get expanded usefully in inline functions.

Add const to all witness*() arguments that are filenames.
2000-09-09 22:43:22 +00:00
jasone
ee0ea20aad Add a mutex to the malloc interfaces so that it can safely be called
without owning the Giant lock.
2000-09-09 22:27:35 +00:00
cg
cda24837e2 disable 16bit mono support- this will be handled by software conversion to
stereo as hardware mono is very noisy
2000-09-09 21:31:06 +00:00
cg
b5350bb3a5 add 16bit mono/stereo conversion feeder
prefer feeder chains of length 1 over length 2
2000-09-09 21:24:03 +00:00
cg
a081b436a3 detach support
remove un-needed setdir functions
add bus_teardown_intr calls where necessary
destroy our dma tags where necessary
destroy ac97 before releasing resources
2000-09-09 19:21:04 +00:00
alfred
f80149566d Forget to include sysctl.h
Submitted by: des
2000-09-09 18:47:46 +00:00
dcs
f3050d463a Upon reflection, I decided that bootfile must have priority over kernel
as the kernel name. The one very unfortunate consequence is that kernel
as an absolute path loses the priority. It will only be tried after
/boot/${kernel}/${bootfile}. I'll see what can be done about it later.
2000-09-09 18:20:00 +00:00
rnordier
7c1f999d2f Correct BSD/OS slice type.
PR:           21099
Submitted by: Alan Clegg <abc@bsdi.com>
2000-09-09 18:05:22 +00:00
alex
371e5462ed Add a comment, that a LINT file can be produced from NOTES via
``make LINT''.

Reviewed by:	nbm via IRC
2000-09-09 16:33:48 +00:00
alex
878835f148 LINT -> NOTES 2000-09-09 16:07:15 +00:00
itojun
dd85200563 add attrbute(packed) to union def with specific align constraitn.
move file static variable to auto variable, make in6_cksum() work better in
kernel-MP environment.  sync with kame.

From: Alfred Perlstein <bright@wintelcom.net>
2000-09-09 15:56:46 +00:00
des
5ea50b42cc Remove unused variables. 2000-09-09 14:35:35 +00:00
des
3b46d8759e Add stat, uptime and version.
Note that version currently returns the first line of the version string
from vers.c, which is not quite what a Linux system would return.
2000-09-09 11:44:58 +00:00
phk
d0fd2f76cf Add code to devname(3) so it can find the names of devices which
were not present when dev_mkdb(8) was run.

First the dev_mkdb(8) database is searched, this caters for non-DEVFS
cases where people have renamed a device.

If that fails we ask the kernel using sysctl kern.devname if the device
driver has put a name in the dev_t.  This covers DEVFS cloned devices.

If that also fails we format a string which isn't entirely useless.
2000-09-09 11:39:59 +00:00
dcs
3fa988b395 First tackle at trying to handle the New Deal on kernels.
Load the first of the following kernels to be found:

${kernel} if ${kernel} is an absolute path
/boot/${kernel}/${kernel}
/boot/${kernel}/${bootfile}
${kernel}/${kernel}
${kernel}/${bootfile}
${kernel}
${bootfile}

The last instance of ${kernel} and ${bootfile} will be treated as a
list of semicolon separated file names, and each will be tried in turn,
from left to right.

Also, for each filename loader(8) will try filename, filename.ko,
filename.gz, filename.ko.gz, in that order, but that's not related
to this code.

This resulted in a major reorganization of the code, and much of what
was accumulating on loader.4th was rightly transfered to support.4th.

The semantics of boot-conf and boot also changed. Both will try to load
a kernel the same as above.

After a kernel was loaded, the variable module_path may get changed. Such
change will happen if the kernel was found with a directory prefix. In
that case, the module path will be set to ${directory};${module_path}.

Next, the modules are loaded as usual.

This is intended so kernel="xyzzy" in /boot/loader.conf will load
/boot/xyzzy/kernel.ko, load system modules from /boot/xyzzy/, and
load third party modules from /boot/modules or /modules. If that doesn't
work, it's a bug.

Also, fix a breakage of "boot" which was recently introduced. Boot without
any arguments would fail. No longer. Also, boot will only unload/reload
if the first argument is a path. If no argument exists or the first
argument is a flag, boot will use whatever is already loaded. I hope this
is POLA. That behavior is markedly different from that of boot-conf, which
will always unload/reload.

The semantics introduced here are experimental. Even if the code works,
we might decide this is not the prefered behavior. If you feel so, send
your feedback. (Yeah, this belongs in a HEADS UP or something, but I've
been working for the past 16 hours on this stuff, so gimme a break.)
2000-09-09 04:52:34 +00:00
jhb
3eeeb3783a Add missing \'s to multline macros used for assertions. 2000-09-09 00:14:27 +00:00
jasone
a54a380435 Rename mtx_enter(), mtx_try_enter(), and mtx_exit() and wrap them with cpp
macros that expand to pass filename and line number information.  This is
necessary since we're using inline functions instead of macros now.

Add const to the filename pointers passed througout the mtx and witness
code.
2000-09-08 21:48:06 +00:00
jasone
6c6d26fe03 Use inline functions instead of macros for mtx_enter(), mtx_try_enter(),
and mtx_exit().  This change tracks the i386 version.

Rename mtx_enter(), mtx_try_enter(), and mtx_exit() and wrap them with cpp
macros that expand to pass filename and line number information.  This is
necessary since we're using inline functions instead of macros now.

Add const to the filename pointers passed througout the mtx and witness
code.
2000-09-08 21:47:29 +00:00
dcs
2484437edf Update boot and boot-conf descriptions to reflect new and old changes.
Add a warning in loader(8) that boot might be changed by loader.4th.
2000-09-08 21:39:31 +00:00
dcs
c13b39a728 Enhance boot-conf.
Now boot-conf can also receive parameters to be passed to the kernel
being booted. The syntax is the same as in the boot command, so one
boots /kernel.OLD in single-user mode by typing:

boot-conf /kernel.OLD -s   instead of
boot-conf -s /kernel.OLD

The syntax still supports use of directory instead of file name, so

boot-conf kernel.OLD -s

may be used to boot /boot/kernel.OLD/kernel.ko in single-user mode.

Notice that if one passes a flag to boot-conf, it will override the
flags set in .conf files, but only for that invocation. If the user
aborts the countdown and tries again without passing any flags, the
flags set in .conf files will be used.

Some factorization was done in the process of enhancing boot-conf,
as it has been growing steadly as features are getting added, becoming
too big for a Forth word. It still could do with more factorization,
as a matter of fact.

Override the builtin "boot" with something based on boot-conf. It will
behave exactly like boot-conf, but booting directly instead of going
through autoboot.

Since we are now pairing kernel and module set in the same directory,
this change to boot makes sense.
2000-09-08 21:11:57 +00:00
jhb
83ace5fe64 Remove an unneeded extern declaration of cp_time. 2000-09-08 20:18:29 +00:00
dcs
1d3c0a8d23 Strictly speaking, this works. It enumarates the PnP devices, and
load the modules needed according to a file relating module names
(actually, _file_ names, not really modules -- the dependency
stuff is not exported to loader's UI) to PnP IDs.

But it still lacks a number of desired features, and it's too crude
for my tastes. But since I don't have time to work on it, it might
be preferable to make it available to those who might. It's not
installed by default, much less loaded. In fact, it wouldn't even
had a copyright message (who? me? assume responsibility for _this_?),
if the cvs commit hadn't aborted for lack of $FreeBSD$, and I decided
to just cut&paste the stuff from elsewhere.
2000-09-08 17:13:24 +00:00
dcs
e8604ccc3e Add the infrastructure necessary to handle PnP from a Forth script.
Also, export the file_findfile() function. Again, this is taken from
work in progress but frozen for the time being. Since it works, I'd
rather commit and remove any uglyness later than hide it on my tree.
2000-09-08 17:03:53 +00:00
dcs
96bba78abe Fix an error message which was using the wrong variable to get the
kernel name from.
2000-09-08 16:58:31 +00:00