Commit Graph

101511 Commits

Author SHA1 Message Date
brooks
5ba6f20e07 Band-aid diskless booting by running a new preseedrandom script before
initdiskless.  The output of several commands and if available the
contents of /entropy are feed into /dev/random to kickstart the PRNG.
/etc/rc.d/initrandom is left alone to maintain the previous behavior as
much as possiable.

Further work in this area is probably needed.

Discussed with:	markm
2004-04-15 17:52:53 +00:00
rees
cc363f9f35 use %zu instead of %zd
Requested by:	Bruce Evans
2004-04-15 16:12:12 +00:00
josef
c7aa42fb7d Add note that npx depends on isa.
Approved by:	green
2004-04-15 15:11:04 +00:00
cperciva
70f9067e41 s/atspeaker/speaker/
cf. revision 1.2 of src/sys/modules/speaker/Makefile

PR:		conf/65195
Submitted by:	daichi
2004-04-15 12:12:15 +00:00
harti
360b53b9a2 Install the MIBs and the definition file to the new location under
/usr/share/snmp.

Noted by: bmah
2004-04-15 08:56:06 +00:00
ru
2b44d13e3e Ensure that the poll_burst <= poll_burst_max constraint really holds.
Reviewed by:	luigi
2004-04-15 07:38:44 +00:00
markm
26c9f4b636 Do a style fixup on the example function. 2004-04-15 07:24:10 +00:00
peter
8669a5b762 Update bmake glue for cvs-1.11.15, with apologies to Jacques for messing
up his day.  The *.patch files are still fine for MFC'ing.
2004-04-15 01:54:28 +00:00
peter
f38d95d303 Change WriteTemplate to take const char * args.
The Name_Root() call seems to be defunct, remove it because it was
causing compile problems.  The real magic seems to be in the Parse_Info()
callback (which was also updated for const char * args).
2004-04-15 01:41:05 +00:00
peter
ad4edd00d3 Fix merge typo. Add missing ",". 2004-04-15 01:31:28 +00:00
peter
e521a8e42c This commit was generated by cvs2svn to compensate for changes in r128270,
which included commits to RCS files with non-trunk default branches.
2004-04-15 01:19:11 +00:00
peter
39ae581ddb Initial merge of cvs-1.11.5 -> 1.11.15 changes onto mainline 2004-04-15 01:17:28 +00:00
peter
3aa249bff6 This commit was generated by cvs2svn to compensate for changes in r128266,
which included commits to RCS files with non-trunk default branches.
2004-04-15 01:01:56 +00:00
peter
6045cae71a Import cvs-1.11.15 2004-04-15 01:01:56 +00:00
peter
dfd3c578a8 Turn off cvs build for a few hours while importing. 2004-04-15 01:01:07 +00:00
peter
bd06e547e0 Turn on the amd64-specific bignum code in openssl. This is actually
a variant of the C code but with some scattered asm and things laid out
more optimally for the platform.  This means that we need to the asm
directory to the search path for the amd64 case so that make can find
the source.
2004-04-14 23:26:26 +00:00
peadar
5617193e91 Let the NFS client notice a file's size changing as a modification.
This avoids presenting invalid data to the client's applications
when the file is modified, and then extended within the window of
the resolution of the modifcation timestamp.

Reviewed By:	iedowse
PR:		kern/64091
2004-04-14 23:23:55 +00:00
peter
185be4df7a Check in structure definitions for the FreeBSD-3.x signal syscall stuff.
Nothing uses these yet, but I dont want to lose them.
2004-04-14 23:20:14 +00:00
peter
462ac75706 Regen 2004-04-14 23:17:57 +00:00
peter
ba2b6ac30f Catch up to the not-so-recent statfs(2) changes. 2004-04-14 23:17:37 +00:00
ps
290ea04ebf Don't allow the driver to be unloaded if the device node is open. 2004-04-14 19:45:07 +00:00
scottl
f80c402a7a Remove the 'timeout' argument from aac_wait_command() as it isn't used and
never will be.  Update the XXX comment for this function to accurately reflect
why things are the way they are.
2004-04-14 19:11:29 +00:00
ps
ed6a88be84 Do not catch signals when waiting for a request. This fixes a nasty
race when issuing commands from userland.
2004-04-14 18:55:28 +00:00
njl
3deaf9978b Remove nowerror lines now that acpica is warns clean. 2004-04-14 18:13:16 +00:00
njl
7cac239792 Remove warnings from vendor files. This takes some files off the vendor
branch but they have indicated they will not fix these warnings.
2004-04-14 18:12:29 +00:00
vkashyap
ca1b52e9f6 Added an entry for twa.4.
Reviewed by: ru
2004-04-14 18:03:30 +00:00
njl
91b03e909b Return an error immediately if asked to switch a non-existent consumer. 2004-04-14 17:58:19 +00:00
imp
4bc8614fca Add notes about the pci stuff that's currently working its way through
current.
2004-04-14 17:54:18 +00:00
imp
d64ad0ac50 Now that the dust has settled on the resource issues, turn on the
power parts of my patches and see what breaks.  Don't (yet) throw
the chatty messages behind a if (bootverbose).
2004-04-14 17:52:08 +00:00
njl
973a760dd6 Remove a non-variable static and move other static variables to the same
location.
2004-04-14 17:48:33 +00:00
njl
37b624bbca Fix some warnings by commenting out unused code. 2004-04-14 17:47:42 +00:00
njl
47c9dd6929 Only try to set the ACPI power state if the handle is valid. There was
probably no problem with this except it may have had the side effect of
registering a NULL consumer.
2004-04-14 17:46:21 +00:00
njl
e3d67bca30 Even though the patch has been submitted to the vendor, this file is off
the vendor branch.  Once more, with feeling!
2004-04-14 16:52:19 +00:00
nectar
4dd0ef2568 Forced commit to note that the CVS patches in the previous commit
were

Submitted by:	Derek Robert Price <derek@ximbiot.com>
2004-04-14 16:48:27 +00:00
nectar
07ad9ba93d Patch vulnerabilities in the CVS client and server:
A malicious CVS server could cause your CVS client to overwrite
  arbitrary files (CAN-2004-0180).

  When a CVS client uses the `-p' checkout option, the server could be
  fooled into checking out files from outside the given $CVSROOT.

(This patch is applied in an unorthodox manner so as not to complicate
 a later vendor import of CVS.)
2004-04-14 16:40:50 +00:00
harti
376040b33f Use a MANFILTER to patch the man pages to point to the right path.
Noted by: phk
2004-04-14 16:31:54 +00:00
harti
9baa54d87a Bump the shared library version number for the bsnmp v1.6 import
because of incompatible interface changes.
2004-04-14 16:29:46 +00:00
njl
7f3dad2879 Unbreak the DDB build by replacing #includes that were deleted.
Pointed out by:	Tai-hwa Liang, Xin LI
Pointed hat to:	njl
2004-04-14 16:24:28 +00:00
harti
17d4f823dc This commit was generated by cvs2svn to compensate for changes in r128237,
which included commits to RCS files with non-trunk default branches.
2004-04-14 16:20:14 +00:00
harti
2dce00c891 Import of bsnmpd 1.6 2004-04-14 16:20:14 +00:00
harti
c9204f6495 Put the name of the module first in the list of all .Nm calls with
argument. This makes the output of calling .Nm without an argument
more senseful later on.
2004-04-14 16:11:05 +00:00
harti
48c5eee60f Compare with 0 if comparing an integer, not with NULL. 2004-04-14 16:09:20 +00:00
harti
7d1905e15b Move the SNMP MIBs and tree definitions from /usr/share/bsnmp to
/usr/share/snmp. This mirrors the use of /usr/local/share/snmp and
makes also more sense when non-bsnmp-specific MIBs go in.
2004-04-14 16:06:19 +00:00
green
d89ed54a8b Document the "return" built-in better: it will exit . (sources) and
the top-level shell instance, too.
2004-04-14 15:58:50 +00:00
green
4159ce22be The newpcm headers currently #define away INTR_MPSAFE and INTR_TYPE_AV
because they bogusly check for defined(INTR_MPSAFE) -- something which
never was a #define.  Correct the definitions.

This make INTR_TYPE_AV finally get used instead of the lower-priority
INTR_TYPE_TTY, so it's quite possible some improvement will be had
on sound driver performance.  It would also make all the drivers
marked INTR_MPSAFE actually run without Giant (which does seem to
work for me), but:
	INTR_MPSAFE HAS BEEN REMOVED FROM EVERY SOUND DRIVER!
It needs to be re-added on a case-by-case basis since there is no one
who will vouch for which sound drivers, if any, willy actually operate
correctly without Giant, since there hasn't been testing because of
this bug disabling INTR_MPSAFE.

Found by:	"Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
2004-04-14 14:57:49 +00:00
bde
b07f071cf0 Include <sys/proc.h> instead of depending on namespace pollution in
<sys/user.h> for the definition of TDF_SINTR.  Fixed anachronous
spelling of TDF_SINTR in a comment

Demangled VCS ids.  There were 2 misplaced copies of $FreeBSD$ and of
the include before it.  The vendor id infrastructure was edited.

Fixed the only other remaining style bug since rev.1.1 (expansion of
struct member names made a line too long).
2004-04-14 09:34:17 +00:00
bde
253d68a52a Include <sys/proc.h> for the definition of PS_INMEM instead of
depending on namespace pollution in <sys/user.h>.

Reduced nearby include messes.
2004-04-14 09:01:56 +00:00
wpaul
9765d24df6 Continue my efforts to imitate Windows as closely as possible by
attempting to duplicate Windows spinlocks. Windows spinlocks differ
from FreeBSD spinlocks in the way they block preemption. FreeBSD
spinlocks use critical_enter(), which masks off _all_ interrupts.
This prevents any other threads from being scheduled, but it also
prevents ISRs from running. In Windows, preemption is achieved by
raising the processor IRQL to DISPATCH_LEVEL, which prevents other
threads from preempting you, but does _not_ prevent device ISRs
from running. (This is essentially what Solaris calls dispatcher
locks.) The Windows spinlock itself (kspin_lock) is just an integer
value which is atomically set when you acquire the lock and atomically
cleared when you release it.

FreeBSD doesn't have IRQ levels, so we have to cheat a little by
using thread priorities: normal thread priority is PASSIVE_LEVEL,
lowest interrupt thread priority is DISPATCH_LEVEL, highest thread
priority is DEVICE_LEVEL (PI_REALTIME) and critical_enter() is
HIGH_LEVEL. In practice, only PASSIVE_LEVEL and DISPATCH_LEVEL
matter to us. The immediate benefit of all this is that I no
longer have to rely on a mutex pool.

Now, I'm sure many people will be seized by the urge to criticize
me for doing an end run around our own spinlock implementation, but
it makes more sense to do it this way. Well, it does to me anyway.

Overview of the changes:

- Properly implement hal_lock(), hal_unlock(), hal_irql(),
  hal_raise_irql() and hal_lower_irql() so that they more closely
  resemble their Windows counterparts. The IRQL is determined by
  thread priority.

- Make ntoskrnl_lock_dpc() and ntoskrnl_unlock_dpc() do what they do
  in Windows, which is to atomically set/clear the lock value. These
  routines are designed to be called from DISPATCH_LEVEL, and are
  actually half of the work involved in acquiring/releasing spinlocks.

- Add FASTCALL1(), FASTCALL2() and FASTCALL3() macros/wrappers
  that allow us to call a _fastcall function in spite of the fact
  that our version of gcc doesn't support __attribute__((__fastcall__))
  yet. The macros take 1, 2 or 3 arguments, respectively. We need
  to call hal_lock(), hal_unlock() etc... ourselves, but can't really
  invoke the function directly. I could have just made the underlying
  functions native routines and put _fastcall wrappers around them for
  the benefit of Windows binaries, but that would create needless bloat.

- Remove ndis_mtxpool and all references to it. We don't need it
  anymore.

- Re-implement the NdisSpinLock routines so that they use hal_lock()
  and friends like they do in Windows.

- Use the new spinlock methods for handling lookaside lists and
  linked list updates in place of the mutex locks that were there
  before.

- Remove mutex locking from ndis_isr() and ndis_intrhand() since they're
  already called with ndis_intrmtx held in if_ndis.c.

- Put ndis_destroy_lock() code under explicit #ifdef notdef/#endif.
  It turns out there are some drivers which stupidly free the memory
  in which their spinlocks reside before calling ndis_destroy_lock()
  on them (touch-after-free bug). The ADMtek wireless driver
  is guilty of this faux pas. (Why this doesn't clobber Windows I
  have no idea.)

- Make NdisDprAcquireSpinLock() and NdisDprReleaseSpinLock() into
  real functions instead of aliasing them to NdisAcaquireSpinLock()
  and NdisReleaseSpinLock(). The Dpr routines use
  KeAcquireSpinLockAtDpcLevel() level and KeReleaseSpinLockFromDpcLevel(),
  which acquires the lock without twiddling the IRQL.

- In ndis_linksts_done(), do _not_ call ndis_80211_getstate(). Some
  drivers may call the status/status done callbacks as the result of
  setting an OID: ndis_80211_getstate() gets OIDs, which means we
  might cause the driver to recursively access some of its internal
  structures unexpectedly. The ndis_ticktask() routine will call
  ndis_80211_getstate() for us eventually anyway.

- Fix the channel setting code a little in ndis_80211_setstate(),
  and initialize the channel to IEEE80211_CHAN_ANYC. (The Microsoft
  spec says you're not supposed to twiddle the channel in BSS mode;
  I may need to enforce this later.) This fixes the problems I was
  having with the ADMtek adm8211 driver: we were setting the channel
  to a non-standard default, which would cause it to fail to associate
  in BSS mode.

- Use hal_raise_irql() to raise our IRQL to DISPATCH_LEVEL when
  calling certain miniport routines, per the Microsoft documentation.

I think that's everything. Hopefully, other than fixing the ADMtek
driver, there should be no apparent change in behavior.
2004-04-14 07:48:03 +00:00
njl
6ad9bc9a77 Style cleanups, M_ZERO instead of bzero. 2004-04-14 03:45:20 +00:00
njl
7e03a67713 Style cleanups, use M_ZERO instead of bzero, unify the !semaphore and
semaphore return paths.
2004-04-14 03:43:06 +00:00