Commit graph

22212 commits

Author SHA1 Message Date
Warner Losh 07dad7e607 Remove 7 unnecessary includes frmo phk's script 2000-09-20 19:31:37 +00:00
Warner Losh baebc9fa44 Remove 8 unnecessary includes from phk's script 2000-09-20 19:05:32 +00:00
Archie Cobbs 474afc4230 Add support for the "nullconsole" console type, for systems with
neither a video console nor a serial port. Use it if the RB_MUTE
flag is set.

Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
Reviewed by:	jhb
2000-09-20 18:13:36 +00:00
Bill Paul 94741b4657 Remove one debug line that snuck in by accident. 2000-09-20 17:32:17 +00:00
Bill Paul 73334a4329 Add a new driver for the AMD PCnet/FAST, FAST+ and Home PCI adapters.
Previously, these cards were supported by the lnc driver (and they
still are, but the pcn driver will claim them first), which is fine
except the lnc driver runs them in 16-bit LANCE compatibility mode.
The pcn driver runs these chips in 32-bit mode and uses the RX alignment
feature to achieve zero-copy receive. (Which puts it in the same
class as the xl, fxp and tl chipsets.) This driver is also MI, so it
will work on the x86 and alpha platforms. (The lnc driver is still
needed to support non-PCI cards. At some point, I'll need to newbusify
it so that it too will me MI.)

The Am79c978 HomePNA adapter is also supported.
2000-09-20 17:30:22 +00:00
Robert Watson e084835893 o Add additional comment describing vaccess() behavior.
Requested by:	eivind
Reviewed by:	eivind, adrian
2000-09-20 17:18:12 +00:00
Bill Paul b54acb744c Add a homePNA PHY driver. This is really only a stub: MII-based homePNA
PHYs tend to look like 10mbps PHYs with no autonegotiation. This allows
us to display the proper media type and link status however.
2000-09-20 17:04:30 +00:00
Bill Paul 337771f919 regenerate 2000-09-20 17:02:32 +00:00
Bill Paul 9d960ff86d Add the ID for the built-in homePNA PHY in the AMD 79C798 controller. 2000-09-20 17:02:16 +00:00
Søren Schmidt e7590dc69d Clean up the VIA id's a bit and add the K[TX]133 chipsets 2000-09-20 07:05:44 +00:00
Søren Schmidt c50cf4ac06 Remove unneeded includes
Pointed out by: phk
2000-09-20 07:00:24 +00:00
Justin T. Gibbs dfd86f14c0 Remove the last two uses of ahc->unit in the FreeBSD version of the driver.
ahc->unit is depricated and will be going away as soon as the Linux
driver catches up.  In the FreeBSD case, it is always initialized to 0
and this caused some strangeness in registering multiple ahc controllers
with CAM.

Noticed by:	Tor.Egge@fast.no
2000-09-20 04:46:15 +00:00
Mitsuru IWASAKI d9e2f78b50 Ignore power button and sleep button events for 5 sec.
Wakeup event is generated by power button and/or sleep button on some
laptops but this also generates SCI interrupt, and shutdown the system
as result.  So this kind of mechanism is introduced so that acpi
driver ignore given events for certain period.
2000-09-20 01:53:11 +00:00
Mitsuru IWASAKI c369b3b021 Improve region I/O sub-routines by re-writing most of low level part
of AML interpreter.
 - Delete and cleanup a lot of almost duplicated code in kernel/userland.
 - Add new common functions for kernel/userland code.
      aml_adjust_readvalue(), aml_adjust_updatevalue(),
      aml_region_handle_alloc(), aml_region_handle_free() and
      aml_region_io().
 - Add primitive functions for both versions of kernel/userland in order to
   have shared code as much as possible.
      aml_region_read_simple(), aml_region_write_simple(),
      aml_region_prompt_read(), aml_region_prompt_write() and
      aml_region_prompt_update_value().
 - Consider update rule and access type in field flags. Also add a lot of
   definitions for the flags.
 - Fix bugs on bit manipulation for read/write operations.
 - Fix bugs on IndexField I/O part.  Also add workaround for temporary
   object corruption during StoreOp interpretation.
2000-09-20 01:01:32 +00:00
Bill Paul 857fd445c3 If this is a Davicom DM9102A and we're enabling the homePNA link, force
dc_link to 1 and don't activate the tick routine. Without this, dc_start()
always thinks the link is down and never transmits in homePNA mode.
2000-09-20 00:59:17 +00:00
Mike Smith ead270f1e3 Mention the AAC_COMPAT_LINUX option 2000-09-19 23:56:27 +00:00
Peter Wemm 6413a4bc9d Fully initialize msqids[]. This could lead to ENOSPC and other strange
stuff.

PR: 21085
Submitted by:  Marcin Cieslak <saper@SYSTEM.PL>
2000-09-19 22:59:22 +00:00
Warner Losh 90c1e037f3 Add card_if.h 2000-09-19 14:24:55 +00:00
Søren Schmidt 8563f77dc9 Add support for tagged queuing on ATA drives. There is only support for
IBM's DPTA and DTLA series of drives (no other disk vendors are known
to support this) on non-Promise controllers (promise controllers lockup
when given the tagged queuing specific commands).
It gives especially master/slave comboes about 5% better performance.

Add support for the Promise ATA100 OEM chip (pdc20265)

Add support for the Cyrix 5530

Change the way status is read from the drives, use the alternate
status reg when possible.

Better support for DEVFS, the acdXtY devices are now created when needed.

Lots of little cleanups.
2000-09-19 11:08:39 +00:00
Eivind Eklund 300019c450 Better error message when booting an SMP kernel on an UP system. 2000-09-19 10:40:52 +00:00
Eivind Eklund c16dc61bd2 Document ENABLE_VFS_IOOPT 2000-09-19 10:36:19 +00:00
Poul-Henning Kamp b0d17ba69e Rename lminor() to dev2unit(). This function gives a linear unit number
which hides the 'hole' in the minor bits.

Introduce unit2minor() to do the reverse operation.

Fix some some make_dev() calls which didn't use UID_* or GID_* macros.

Kill the v_hashchain alias macro, it hides the real relationship.

Introduce experimental SI_CHEAPCLONE flag set it on cloned bpfs.
2000-09-19 10:28:44 +00:00
Poul-Henning Kamp 19cf3044c1 GC some LFS lint. 2000-09-19 10:25:01 +00:00
Julian Elischer a62b20c4a1 When sending a packet back to a network interface to simulate an arrived
packet, make sure that the packet has the interface marked in the first mbuf,
the same a truely arrived packets would have.
2000-09-19 08:35:44 +00:00
Warner Losh 2276cee521 Implement indirection in the pccard probe/attach. This should make it
possible to have different probe/attach semantics between the two
systems and yet still use the same driver for both.

Compatibility methods for OLDCARD drivers.  We use these routines to make
it possible to call the OLDCARD driver's probe routine in the context that
it expects.  For OLDCARD these are implemented as pass throughs to the
device_{probe,attach} routines.  For NEWCARD they are implemented such
such that probe becomes strictly a matching routine and attach does both
the old probe and old attach.

compat devices should use the following:

	/* Device interface */
	DEVMETHOD(device_probe),	pccard_compat_probe),
	DEVMETHOD(device_attach),	pccard_compat_attach),
	/* Card interface */
	DEVMETHOD(card_compat_match,	foo_match),	/* newly written */
	DEVMETHOD(card_compat_probe,	foo_probe),	/* old probe */
	DEVMETHOD(card_compat_attach,	foo_attach),	/* old attach */

This will allow a single driver binary image to be used for both
OLDCARD and NEWCARD.

Drivers wishing to not retain OLDCARD compatibility needn't do this.

ep driver minorly updated.

sn driver updated more than minorly.  Add module dependencies to allow
module to load.  Also change name to if_sn.  Add some debugging code.
attempt to fix the cannot allocate memory problem I'd been seeing.
Minor formatting nits.
2000-09-19 04:39:20 +00:00
Jonathan Lemon 8343765bcb Allow the user to make direct BIOS intcalls (via vm86 system) if they
successfully authenticate as root via the suser() call.
2000-09-19 03:27:31 +00:00
Archie Cobbs 2b9cf2f709 Rename "struct session" to "struct sess_con" to avoid conflict with
upcoming "struct session" in proc.h.

Requested by:	jasone
2000-09-19 03:22:06 +00:00
Mike Smith 30d57611e8 Include <sys/proc.h> so that we can dereference something in the proc
structure.  Looks like someone removed a nested include somewhere else.

Submitted by:	gallatin, dg
2000-09-19 00:35:03 +00:00
Daniel C. Sobral 504119265e Check for the correct minimum version required by the current code.
I hope I got this right... :-)
2000-09-18 22:42:54 +00:00
David Greenman 9492779067 Removed NetBSD support, which bit-rotted long ago.
Changed new SMP locking macros given the new situation.
2000-09-18 21:12:19 +00:00
Robert Watson c4ff4a8467 Include <sys/proc.h> to silence suser() compiler warning.
Approved by:	markm
2000-09-18 20:42:04 +00:00
John Polstra 0824e46a71 Update the prototype for "r_brk" to correspond with the change in
"src/libexec/rtld-elf/rtld.c" revision 1.48.  This eliminates a
warning when building the dynamic linker, and it doesn't seem to
hurt anything else.
2000-09-18 20:40:32 +00:00
Robert Watson bec1333db4 o Disallow privileged processes in jail() from directly accessing
system namespace extended attributes.
o Document privilege/jail() interaction relating to extended
  attributes.

Obtained from:	TrustedBSD Project
2000-09-18 18:10:13 +00:00
Robert Watson cf48f6e42c o Allow privileged processes in jail() to override sticky bit behavior
on directories.
o Allow privileged processes in jail() to create inodes with the
  setgid bit set even if they are not a member of the group denoted
  by the file creation gid.  This occurs due to inherited gid's from
  parent directories on file creation, allowing a user to create a
  file with a gid that is not in the creating process's credentials.

Obtained from:	TrustedBSD Project
2000-09-18 18:03:49 +00:00
Robert Watson f5770bb46a o Add a comment clarifying interaction between jail(), privileged processes,
and UFS file flags.  Here's what the comment says, for reference:

	Privileged processes in jail() are permitted to modify
	arbitrary user flags on files, but are not permitted
	to modify system flags.

  In other words, privilege does allow a process in jail to modify user
  flags for objects that the process does not own, but privilege will
  not permit the setting of system flags on the file.

Obtained from:	TrustedBSD Project
2000-09-18 17:58:15 +00:00
Robert Watson ea57890740 o Add missing PRISON_ROOT allowing a privileged process in a jail() to not
remove the setuid/setgid bits by virtue of a change to a file with those
  bits set, even if the process doesn't own the file, or isn't a group
  member of the file's gid.

Obtained from:	TrustedBSD Project
2000-09-18 17:53:22 +00:00
Dag-Erling Smørgrav cd595ef506 Fix cut'n'paste bogon.
Submitted by:	Jim Pirzyk <Jim.Pirzyk@disney.com>
2000-09-18 17:46:01 +00:00
Paul Saab b429049a5d Add new line character to debugging printf's. 2000-09-18 17:03:03 +00:00
Robert Watson 4da6e3d109 o Substitute suser() calls for direct credential checks, which is now
safe as suser() no longer sets ASU.
o Note that in some cases, the PRISON_ROOT flag is used even though no
  process structure is passed, to indicate that if a process structure
  (and hence jail) was available, it would be ok.  In the long run,
  the jail identifier should probably be moved to ucred, as the uidinfo
  information was.
o Some uid 0 checks remain relating to the quota code, which I'll leave
  for another day.

Reviewed by:	phk, eivind
Obtained from:	TrustedBSD Project
2000-09-18 16:13:02 +00:00
Søren Schmidt 53d07b1ebb Only read to the end of the select track. 2000-09-18 12:13:32 +00:00
Seigo Tanimura c74c29ca6b Since the unit number of a midi/sequencer device is expressed in 4
bits, we can configure only up to 16 units.
2000-09-18 10:17:38 +00:00
Poul-Henning Kamp eb7ba7f95c Ignore attempts to set flags to zero. This quenches a syslog warning
from login(1).
2000-09-18 09:40:01 +00:00
Matt Jacob 81372ff0ed Steal 512KB more from system memory for heap instead of 256KB. We died
without the extra space. What a pity.
2000-09-18 08:19:04 +00:00
Matt Jacob 8c8c7c234b Run SECONDARY_LOAD_ADDRESS down to 0x2000a000- this still leaves
(barely) enough room for boot1 and gives us 8KB more to play with
in the loader.
2000-09-18 08:17:57 +00:00
Matt Jacob 4b3f16308b Make the stack 12K- we seem to need a bit more.
Rename 'stack' to 'stackbase' as this variable
more correctly denotes what it is.
2000-09-18 08:16:38 +00:00
Matthew N. Dodd 098b8a1eb0 Initialize 'hints_loaded' to 0.
This allows static hints to work properly.
2000-09-17 23:57:52 +00:00
Cameron Grant 341f16cc60 dynamify- probe codec for supported channels
add channel mappings for mixer
2000-09-17 23:51:00 +00:00
Cameron Grant 7dfc932548 fix warnings 2000-09-17 23:46:32 +00:00
David Greenman 7d854d93af Added a couple more missing FXP_SPLVAR()'s. 2000-09-17 23:23:22 +00:00
David Greenman b184b38e2b As a minor optimization, do suspended checking more like it was originally
in the PR - before the while loop.
2000-09-17 23:04:57 +00:00
David Greenman 04ea20fcf4 Added missing FXP_SPLVAR() to fxp_intr(). 2000-09-17 22:59:58 +00:00
David Greenman 2053b07d7e Attempt to replicate the new fxp SMP locking in the changes committed
in the previous (APM suspend/resume) commit.
2000-09-17 22:20:33 +00:00
David Greenman 7dced78a28 Added support for APM suspend/resume.
PR:		18756
Submitted by:	mike ryan <msr@elision.org>, with modifications by me.
2000-09-17 22:12:12 +00:00
Chuck Paterson 87807fded9 Add include of proc.h to make compile without SMP defined. This
change is likely interm, the include happens automagically
when SMP is defined.

Obtained from:	Jason Evans.
2000-09-17 22:01:21 +00:00
Dag-Erling Smørgrav 8461bdba85 Silence a warning. 2000-09-17 19:41:26 +00:00
Bruce Evans 21144e2fde Brought back schedsofttty() (SMPng casualty). Didn't bring back the
other schedsoft*() functions since they have never been used.

Removed confused comment about not needing these functions.  The
functions delay scheduling of SWIs until the next hardclock tick.
For devices that only deliver a few characters per interrupt, this
reduces the number of calls to the scheduler by a large factor (about
115 for each sio port at 115200 bps).
2000-09-17 16:37:30 +00:00
MIHIRA Sanpei Yoshiro 5935ef4c44 add PIOCSRESOURCE(IOC_GET_RESOURCE_RANGE)
Now /usr/sbin/pccardd read free resource(io,irq) range with
this ioctl.

Original Idea from:	PAO3
2000-09-17 15:37:53 +00:00
Bruce Evans df6bd679e7 Declare sigexit() as non-returning.
Fixed some style bugs.
2000-09-17 15:23:10 +00:00
Bruce Evans 33510ef17a Unpessimized CURSIG(). The fast path through CURSIG() was broken in
the 128-bit sigset_t changes by moving conditionally (rarely) executed
code to the beginning where it is always executed, and since this code
now involves 3 128-bit operations, the pessimization was relatively
large.  This change speeds up lmbench's pipe latency benchmark by
3.5%.

Fixed style bugs in CURSIG().
2000-09-17 15:12:04 +00:00
Bruce Evans fbbeeb6cd6 Uninlined CURSIG() and unpolluted <sys/signalvar.h>. CURSIG() had become
very bloated, first with 128-bit sigset_t's, then with locking in the
SMP case, then with locking in all cases.  The space bloat was probably
also time bloat, partly because the fast path through CURSIG() was
pessimized by the sigset_t changes.  This change speeds up lmbench's
pipe-based latency benchmark by 4% on a Celeron.  <sys/signalvar.h>
had become very polluted to support the bloat.
2000-09-17 14:28:33 +00:00
Kenjiro Cho e645a1ca27 change the evaluation order of the rsvp socket in rsvp_input()
in favor of the new-style per-vif socket.

this does not affect the behavior of the ISI rsvpd but allows
another rsvp implementation (e.g., KOM rsvp) to take advantage
of the new style for particular sockets while using the old style
for others.

in the future, rsvp supporn should be replaced by more generic
router-alert support.

PR:		kern/20984
Submitted by:	Martin Karsten <Martin.Karsten@KOM.tu-darmstadt.de>
Reviewed by:	kjc
2000-09-17 13:50:12 +00:00
Poul-Henning Kamp e4bdf25dc8 Properly jail UDP sockets. This is quite a bit more tricky than TCP.
This fixes a !root userland panic, and some cases where the wrong
interface was chosen for a jailed UDP socket.

PR:		20167, 19839, 20946
2000-09-17 13:35:42 +00:00
Poul-Henning Kamp 24b261c720 Reverse last commit, a better fix has been found. 2000-09-17 13:34:18 +00:00
Chuck Paterson 0f4dc94cfc Add locking to make able to run without the Giant lock being held. This
is enabling as all entries are still called with Giant being held.
Maintaining compatability with NetBSD makes what should be very simple
kinda ugly.

Reviewed by:	Jason Evans
2000-09-17 13:26:25 +00:00
Bruce Evans 621dbe43df Added used include of <sys/mutex.h> (don't depend on pollution in
<sys/signalvar.h>).
2000-09-17 12:20:49 +00:00
Poul-Henning Kamp e2cabba9d7 Make sure UDP sockets are explicitly bind(2)'ed [sic] before we connect(2)
them.

PR:     20946
Isolated by:    Aaron Gifford <agifford@infowest.com>
2000-09-17 11:34:33 +00:00
Boris Popov 3ff1a2f43e Add new flag PDIRUNLOCK to the component.cn_flags which should be set by
filesystem lookup() routine if it unlocks parent directory. This flag should
be carefully tracked by filesystems if they want to work properly with nullfs
and other stacked filesystems.

VFS takes advantage of this flag to perform symantically correct usage
of vrele() instead of vput() if parent directory already unlocked.

If filesystem fails to track this flag then previous codepath in VFS left
unchanged.

Convert UFS code to set PDIRUNLOCK flag if necessary. Other filesystmes will
be changed after some period of testing.

Reviewed in general by:	mckusick, dillon, adrian
Obtained from:	NetBSD
2000-09-17 07:26:42 +00:00
Don Lewis 69f15de9b1 Silence lame compiler warning.
Submitted by:	bde
2000-09-16 23:59:37 +00:00
Poul-Henning Kamp a2cdd9d93e Move SPECNAMELEN from <sys/conf.h> to <sys/param.h> 2000-09-16 21:57:16 +00:00
Justin T. Gibbs f175cbb663 Today is just not my day. Really get the right file. 2000-09-16 21:55:31 +00:00
Daniel C. Sobral 818c39998e Use _ instead or - where proper, according to the style I have been
using.

Overload "?" so it will also show loader.4th commands.
2000-09-16 21:04:49 +00:00
Justin T. Gibbs ae7c64e466 Pull the correct file over to freefall. 2000-09-16 20:59:12 +00:00
Poul-Henning Kamp 3a1c157588 I have no idea how a '#' became a '*'...
Spotted by:	Bernd Walter <ticso@cicely5.cicely.de>
2000-09-16 20:45:11 +00:00
Daniel C. Sobral df3c7d3993 Solve a name clash.
Add something to help debugging.
2000-09-16 20:20:44 +00:00
Justin T. Gibbs cb4d93cdbf Add PCIM_CMD_MWRICEN, the bit in the command register in PCI space
that enables memory write and invalidate cycles on a bus master.
2000-09-16 20:06:13 +00:00
Justin T. Gibbs 32da3127a3 Move aicasm to its own subdirectory. 2000-09-16 20:02:39 +00:00
Justin T. Gibbs 717d424718 Move aicasm to its own subdirectory.
Separate our platform independent hooks from core driver functionality
shared between platforms (FreeBSD and Linux at this time).

Add sequencer workarounds for several chip->chipset interactions.

Correct external SCB corruption problem on aic7895 based cards (3940AUW).

Lots of cleanups resulting from the port to another OS.
2000-09-16 20:02:28 +00:00
Justin T. Gibbs 0562034333 Update for aic7xxx driver reorganization. 2000-09-16 20:00:13 +00:00
Daniel C. Sobral c888e59b84 The default search path for kernel and modules was bogus. It makes no
sense for /boot/kernel to come last.
2000-09-16 19:59:41 +00:00
Daniel C. Sobral 54329571cf The module_path set by default was bogus. It had /boot/kernel last,
which makes little sense.
2000-09-16 19:56:23 +00:00
Daniel C. Sobral 7b9e034490 Both boot and boot-conf were using a different algorithm from the one
used by start to find the kernel. Fix this.

Also, boot would proceed immediately in the absence of a path as
argument. Check first if a kernel has already been loaded, and, if
not, fall back to load kernel&modules behavior.

Some further factorizing. I deem this code to be mostly readable by
now! :-)

Many thanks to: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
2000-09-16 19:49:52 +00:00
Poul-Henning Kamp 2404c3f99d Make LINT link.
cy driver is broken post SMPng.
2000-09-16 19:04:24 +00:00
Poul-Henning Kamp fa0c13fabb Add proper prototype for dkcksum(); 2000-09-16 18:57:51 +00:00
Poul-Henning Kamp a164712178 Remove SMP hack. 2000-09-16 18:57:18 +00:00
Poul-Henning Kamp c866ec47e3 Make LINT compile. 2000-09-16 18:55:05 +00:00
Poul-Henning Kamp 3045b21279 Make LINT compile. 2000-09-16 18:48:11 +00:00
Poul-Henning Kamp 574abd2926 Make LINT compile again. 2000-09-16 18:46:05 +00:00
Poul-Henning Kamp 1534d6d899 Remove a few leftover CLBYTES related bits.
This was in the good old days to patch up a logical pagesize on hardware
with stupid VM pagesize.  Vaxen I belive.
2000-09-16 18:28:24 +00:00
Poul-Henning Kamp ae2276e657 Remove a pointless casting of a gid_t to a gid_t. 2000-09-16 18:20:27 +00:00
Brian Somers 30fa52a6fa Call bpfattach() correctly from if_ppp.c
Submitted by:	Andy Adams <ala@merit.edu>
PR:		18506
2000-09-16 14:17:15 +00:00
Poul-Henning Kamp fc87418be0 Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
2000-09-16 13:43:00 +00:00
Poul-Henning Kamp c80d29139c Add canonical checks to devfs_setattr(). 2000-09-16 12:06:58 +00:00
Warner Losh 45713b37cd Change the interface to pccard_function_init. The interface is such
that it looks for an acceptible one.  Once it finds it, it should set
the resources for the device.  I say "should" because I've not written
that.  Also set an ivar for the child of pccard.  Minor fix to the
attach message printed, we lose the slot number, which I'll have to
restore later.  Adjust the pccard ivar so that we can save the
function that corresponds to this driver so we can enable and disable
it more easily.  Save a pointer to the function so we know what we're
dealing with.

There should be some way for the driver to specify which cfg it wants
to activate.  For now the pccard_function_init function just picks
one, but we'll have to revisit this going forward.  I'm not doing it
now because I'd need some way to activate the card many times and I'm
not sure that is desirable or even safe with some cards.
2000-09-16 06:52:20 +00:00
Jonathan Lemon af1270f87f It is possible for a TCP callout to be removed from the timing wheel,
but have a network interrupt arrive and deactivate the timeout before
the callout routine runs.  Check for this case in the callout routine;
it should only run if the callout is active and not on the wheel.
2000-09-16 00:53:53 +00:00
John Baldwin 4cc6117e1d Remove some commented out cruft. 2000-09-15 23:00:46 +00:00
John Baldwin 7ab37af1ed - Add a new process flag P_NOLOAD that marks a process that should be
ignored during load average calcuations.
- Set this flag for the idle processes and the softinterrupt process.
2000-09-15 22:00:23 +00:00
John Baldwin f6a0af8015 Idle processes are always runnable, so let them state at SRUN. 2000-09-15 19:49:48 +00:00
John Baldwin db72809d24 Release Giant before starting up init.
Submitted by:	jake
2000-09-15 19:25:29 +00:00
John Baldwin 3c63a78388 Use driver_intr_t instead of the now defunct inthand2_t. 2000-09-15 19:09:15 +00:00
Hajimu UMEMOTO deebc91386 examined the gateway (from the routing table) only when the address
family of the gateway is AF_INET6.

Submitted by:	JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
2000-09-15 17:21:35 +00:00
Ruslan Ermilov 4996f02545 Add -Wmissing-prototypes. 2000-09-15 15:37:16 +00:00
Nick Hibma 5c83e80d3f Reserve major number 156 for uscanner 2000-09-15 10:27:01 +00:00
Daniel C. Sobral 1cb190742f Factorize, reorganize, and move code around.
The boot-conf and boot code had various bugs, and some of it was big,
ugly, unwieldy, and, sometimes, plain incorrect. I'm just about
completely replaced these ugly parts with something much more manageable.

Minor changes were made to the well-factorized parts of it, to accomodate
the new code.

Of note:

	* make sure boot-conf has the exact same behavior wrt boot order
as start.

	* Correct both boot and boot-conf so they'll work correctly when
compiled in, as they both had some bugs, minor and major.

	* Remove all the crud from loader.4th back into support.4th, for
the first time since boot-conf was first improved. Hurray!

I'm fairly satisfied with the code at this time. Time to see about those
man pages...
2000-09-15 08:05:52 +00:00
Daniel C. Sobral 9f0c5de5f7 Start countdown only _after_ the kernel was loaded. Not very fair otherwise. 2000-09-15 07:54:10 +00:00
KATO Takenori 11ee9bf233 Merged from sys/isa/fd.c revision 1.187.
Pointed out by:	nyan
2000-09-15 05:47:56 +00:00
KATO Takenori 0011dc221c Merged from sys/i386/isa/sio.c revision 1.314. 2000-09-15 05:45:23 +00:00
KATO Takenori fd6c4e11e0 Merged from sys/i386/isa/clock.c revision 1.157. 2000-09-15 05:42:42 +00:00
KATO Takenori 6402000285 Merged from sys/i386/i386/machdep.c revision 1.408. 2000-09-15 05:35:55 +00:00
Yoshihiro Takahashi 5d7e2cbea6 Moved the fe driver from the compat section to the correct section.
Submitted by:	sanpei
2000-09-15 02:25:41 +00:00
John Baldwin 518afc0f11 Check to see if we actually have an interrupt descriptor and an interrupt
thread for each interrupt that comes in.  If we don't, log the event and
return immediately for a hardware interrupt.  For a softinterrupt, panic
instead.

Submitted by:	ben
2000-09-15 00:27:57 +00:00
Mitsuru IWASAKI 32d817d227 Add acpi_send_pm_event() to inform all devices that the system is
going to sleep and back from sleep.
Also re-enabling some acpi registers on wakeup.
2000-09-14 23:29:37 +00:00
Don Lewis 42fd51cedc Enforce process limit policy in one place to keep proccnt from diverging
from reality.
2000-09-14 23:07:39 +00:00
Mitsuru IWASAKI 215e338b51 Add pmtimer instance. 2000-09-14 22:39:14 +00:00
Mitsuru IWASAKI 2bfb7205bf Add Timer device driver for power management events.
The code for suspend/resume is derived from APM device driver.

Some people suggested the original code is somewhat buggy, but I'd
like to just move it from apm.c without any major changes for the
initial version.  This code should be refined later.

To use pmtimer to adjust time at resume time, add
	device	pmtimer
in your kernel config file, and add
	hint.pmtimer.0.at="isa"
in your device.hints

Reviewed by:	-current, bde
2000-09-14 22:34:57 +00:00
John Baldwin f46305730e Grab the scheduler lock before calling setrunqueue() and mi_switch(). 2000-09-14 22:17:34 +00:00
Matt Jacob bce679f2a9 With the help of 'Eric Christeson <echriste@ssesco.com>', determined
that QIC 525 really should be 512 byte fixed blocksize.
2000-09-14 21:38:44 +00:00
Jonathan Lemon a8db1d93f1 m_cat() can free its second argument, so collect the checksum information
from the fragment before calling m_cat().
2000-09-14 21:06:48 +00:00
John Baldwin 606f8eb27a Remove the mtx_t, witness_t, and witness_blessed_t types. Instead, just
use struct mtx, struct witness, and struct witness_blessed.

Requested by:	bde
2000-09-14 20:15:16 +00:00
Jonathan Lemon 6f451c99b3 Pipes are not writeable while a direct write is in progress. However,
the kqueue filter got the sense of the test reversed, so fix it.

Spotted by:	Michael Elkins <me@sigpipe.org>
2000-09-14 20:10:19 +00:00
Mark Murray 07ef427609 Take out the RANDOMDEV option. The entropy device is a (pseudo-)device
now.
2000-09-14 20:07:32 +00:00
Eivind Eklund 98d39ed48b Add function comments for functions missing them 2000-09-14 19:13:59 +00:00
Eivind Eklund 1d95078aaf Blow away COMPAT_43 support for mount 2000-09-14 18:11:44 +00:00
Eivind Eklund cb144e905c GC vax-only code 2000-09-14 16:51:47 +00:00
David E. O'Brien 6c5d644183 Install the kernel KLM as "kernel" by default. 2000-09-14 15:17:19 +00:00
Matt Jacob c99918f36e Follow the hints from PHK's new messages- only make_dev for a device
once. Alias names use the make_dev_alias function.
2000-09-14 14:53:57 +00:00
Ruslan Ermilov e30177e024 Follow BSD/OS and NetBSD, keep the ip_id field in network order all the time.
Requested by:	wollman
2000-09-14 14:42:04 +00:00
Doug Rabson 5dde620ab1 Change "KTR_COMPILE & m" to "KTR_COMPILE & (m)" to allow more flexible
expressions for m.
2000-09-14 13:07:05 +00:00
Doug Rabson c090a2b4e5 Don't release Giant for db_nofault exceptions since it isn't held when
kdb_trap is called.
2000-09-14 13:04:38 +00:00
Yoshihiro Takahashi b14d7dac8a - Newbus'ify and bus_space'ify.
- Separate bus dependent part and independent part.
- Moved source files to sys/dev/fe (repo copied).
- Fixed some comments by chi@bd.mbn.or.jp (Chiharu Shibata)

Tested by:	bsd-nomads@clave.gr.jp and
		FreeBSD98-testers@jp.freebsd.org
2000-09-14 12:02:07 +00:00
Yoshihiro Takahashi c400e7405e - Changed the structure name (struct disk -> struct softc).
- Converted to disk_create() interface.
- Removed unnecessary code.
2000-09-14 11:45:31 +00:00
Roger Hardiman 5c1a8c13c7 Add Quicknet LineJACK and PhoneJACK cards 2000-09-14 08:51:27 +00:00
Peter Wemm 09344c2742 Activate the rest of the aac driver, otherwise even GENERIC fails to build.
Forgotten by: msmith
2000-09-13 23:50:40 +00:00
John Baldwin 9a94c9c5c3 - Remove the inthand2_t type and use the equivalent driver_intr_t type from
newbus for referencing device interrupt handlers.
- Move the 'struct intrec' type which describes interrupt sources into
  sys/interrupt.h instead of making it just be a x86 structure.
- Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd'
  and 'struct intrec'
- Move the code to translate new-bus interrupt flags into an interrupt thread
  priority out of the x86 nexus code and into a MI ithread_priority()
  function in sys/kern/kern_intr.c.
- Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and
  sys/pci/pci_compat.c.
2000-09-13 18:33:25 +00:00
John Baldwin 220ca3ff5e - Fix spinlock exiting to handle recursion properly and only enable
interrupts at the proper time.
- Remove an uneeded test and just always set the MTX_RECURSE bit when
  recursing on a sleep lock.
2000-09-13 18:28:14 +00:00
John Baldwin 699fbdc2ab - Fix spinlock exits to properly handle the recursion count and only
re-enable interrupts when actually releasing the lock.
- Bring across some fixes to propagate_priority from the x86 code.
  (It still doesn't work properly, however.)
- Use the SMTX state when putting a process that blocks on a mutex to sleep.
- Use mi_switch instead of cpu_switch so that accounting works properly as
  well as other things.
- Bring across DDB protection of the spinlock timeout panic which is useful
  in a multiple CPU system when 1 CPU enters the debugger holding the
  sched_lock so that the other CPU doesn't panic as well resulting in all
  sorts of fun things.
- Bring across various other small changes in format strings and comments
  to sync up with the x86 code.
2000-09-13 18:26:33 +00:00
John Baldwin 5010ef836a Import the global sched_lock variable instead of using a private copy. This
fixes a problem where cpu_switch() wasn't properly saving and restoring
the recursion count for sched_lock.
2000-09-13 18:22:53 +00:00
John Baldwin 7ce7aa2a0b Fix a comment, we have mutexes now instead of a single lock. 2000-09-13 18:22:07 +00:00
John Baldwin 8dc1deec65 Add back in obtaining/releasing Giant around interrupt handlers. 2000-09-13 18:21:33 +00:00
Bruce Evans d3f209631e Be more careful about cleaning up the stack after function calls early
in the boot.  The cleanup must be done in one of the few ways that
db_numargs() understands, so that early backtraces in ddb don't underrun
the stack.  The underruns caused reboots a few years ago when there
was an unmapped page above the stack (trapping to abort the command
doesn't work early).

Cleaned up some nearby code.
2000-09-13 14:08:50 +00:00
Bruce Evans 9c15b3c143 Fixed hang on booting with -d. mtx_enter() was called on an uninitialized
lock.  The quick fix in trap.c was not quite the version tested and had no
effect; back it out.
2000-09-13 12:40:43 +00:00
KATO Takenori 715ca46f5c Merged from sys/isa/sio.c revision 1.312. 2000-09-13 10:14:43 +00:00
KATO Takenori a0859935f5 Merged from sys/i386/conf/GENERIC revision 1.275. 2000-09-13 10:11:30 +00:00
KATO Takenori 9f936f8596 Merged from sys/i386/conf/GENERIC revision 1.274. 2000-09-13 10:10:34 +00:00
Boris Popov 6413416817 Unlock current directory when calling VFS_ROOT() because underlying
filesystem may hold the lock. Otherwise unavoidable deadlock will occur.
This shouldn't have any side effects as long as we hold vfs lock.

Obtained from:	NetBSD
2000-09-13 08:57:56 +00:00
Warner Losh 4bae64510b Add ID for 3C1. It is a etherlink iii in a CompactFlash form factor.
It doesn't seem to work, but at least is identified correctly.  Minor
tree housekeeping on my part.
2000-09-13 03:57:37 +00:00
Mike Smith 358637397e A new driver for PCI:SCSI RAID controllers based on the Adaptec FSA
design.  This includes integrated Dell RAID controllers, the Dell
PERC 2/QC and the HP NetRAID-4M.
2000-09-13 03:20:35 +00:00
John Baldwin 553427fc01 Take out some unneeded debugging code and re-enable panic()'ing if we spin
on a spin lock for more then 5 seconds.
2000-09-13 00:41:34 +00:00
Doug Rabson 14580e383c Merge changes from the i386 port to allow userret() to be called both
with and without holding the Giant mutex.
2000-09-12 22:47:10 +00:00
Doug Rabson 7a0758ab68 * Redo the cmpset inlines to use one less register. This incidentally
fixes a serious problem with the previous version where an input could
  have been placed in the same register as an output which would stop
  the inline from working properly.

* Redo atomic_{set,clear,add,subtract}_{32,64} as inlines since the code
  sequence is shorter than the call sequence to the code in atomic.s.
  I will remove the functions from atomic.s after a grace period to allow
  people to rebuild kernel modules.
2000-09-12 22:45:44 +00:00
Doug Rabson 569185f256 Really disable interrupts for spin mutexes instead of just pretending. 2000-09-12 22:40:29 +00:00
John Baldwin b570da11fe Use size_t instead of u_int for 4th argument to copyinstr(). 2000-09-12 22:39:34 +00:00
Daniel C. Sobral a708ce6fa3 New world order wrt to kernel location and name. This doesn't actually
changes anything (in theory), just better document it. I'm waiting for
the final word before I tackle the man pages.
2000-09-12 20:21:11 +00:00
John Baldwin 77044cb6d9 Clean up process accounting some more. Unfortunately, it is still not
quite right on i386 as the CPU who runs statclock() doesn't have a valid
clockframe to calculate statistics with.
2000-09-12 18:57:59 +00:00
Bruce Evans bbbb2579b4 Quick fix for hang on booting with -d. mtx_enter() was called before
curproc was initialized.  curproc == NULL was interpreted as matching
the process holding Giant...  Just skip mtx_enter() and mtx_exit() in
trap() if (curproc == NULL && cold) (&& cold for safety).
2000-09-12 18:41:56 +00:00
Bruce Evans 96cae770d3 Fixed some serious bugs in ext2_readdir():
The cookie buffer was usually overrun by a large amount whenever
cookies were used.  Cookies are used by nfs and the Linuxulator, so
this bug usually caused panics whenever an ext2fs filesystem was nfs
mounted or a Linux utility that calls readdir() was run on an ext2fs
filesystem.

The directory buffer was sometimes overrun by a small amount.  This
sometimes caused panics and wrong results even for FreeBSD utilities,
but it was usually harmless because FreeBSD utilities use a large
enough buffer size (4K).  Linux utilities usually triggered the bug
since they use a too-small buffer size (512 bytes), at least with the
old RedHat utilities that I tested with.

PR:	19407 (this fix is incomplete or for a slightly different bug)
2000-09-12 17:10:39 +00:00
Boris Popov e37acb62a0 Add VOP_*VOBJECT vops, because MFS requires explicit vop specification.
Noted by:	knu
2000-09-12 16:21:16 +00:00
Bruce Evans d511196c02 Don't panic for delivery of a multiplexed SWI. Most SWI handlers
don't take an arg, but swi_generic() is special in order to avoid one
whole conditional branch in the old SWI dispatch code.  The new SWI
dispatch code passed it a garbage arg.  Bypass swi_generic() and call
swi_dispatcher() directly, like the corresponding alpha code has always
done.

The panic was rare because because it only occurred if more than one
of the {sio,cy,rc} drivers was configured and one was active, and the
cy driver doesn't even compile.
2000-09-12 16:02:43 +00:00
Mark Murray ac519db05b Turn the /dev/random device into a (pseudo-)device, not an option.
(I didn't realise that it was this easy!)
Submitted by:	jhb
2000-09-12 13:21:40 +00:00
Mark Murray d0d519348d The "struct proc" argument to read_random was ill-conceived, and a
hangover from previous experimentation. Remove it. This will clean
up gratuitous needs for forward references and other namespace
pollution.
Moaned about by:	bde
Brought to my attention by:	bp
2000-09-12 13:13:22 +00:00
Paul Saab 6004db96ae Move the detection of Linksys PCMCIA cards from attach to probe.
This should solve the problems people were seeing with this driver.

Reported by:	phk & others.
2000-09-12 11:03:12 +00:00
Boris Popov 9ff5ce6baf Add three new VOPs: VOP_CREATEVOBJECT, VOP_DESTROYVOBJECT and VOP_GETVOBJECT.
They will be used by nullfs and other stacked filesystems to support full
cache coherency.

Reviewed in general by:	mckusick, dillon
2000-09-12 09:49:08 +00:00
Roger Hardiman 6ce5d87513 Back out bktr_mem_load. It is not needed because I'm use MODULE_DEPEND
elsewhere.
Reminded by: Mike Smith
2000-09-12 08:41:55 +00:00
Robert Watson 5ab404120f o Variety of extended attribute fixes
- In ufs_extattr_enable(), return EEXIST instead of EOPNOTSUPP
	  if the caller tries to configure an attribute name that is
	  already configured
	- Throughout, add IO_NODELOCKED to VOP_{READ,WRITE} calls to
	  indicate lock status of passed vnode.  Apparently not a
	  problem, but worth fixing.
	- For all writes, make use of IO_SYNC consistent.  Really,
	  IO_UNIT and combining of VOP_WRITE's should happen, but I
	  don't have that tested.  At least with this, it's
	  consistent usage.  (pointed out by: bde)
	- In ufs_extattr_get(), fixed nested locking of backing
	  vnode (fine due to recursive lock support, but make it
	  more consistent with other code)
	- In ufs_extattr_get(), clean up return code to set uio_resid
	  more consistently with other pieces of code (worked fine,
	  this is just a cleanup)
	- Fix ufs_extattr_rm(), which was broken--effectively a nop.
	- Minor comment and whitespace fixes.

Obtained from:	TrustedBSD Project
2000-09-12 05:35:47 +00:00
Bill Fumerola 95d0db2b40 Fix screwup in previous commit. 2000-09-12 02:38:05 +00:00
John Baldwin 4a6404dfc1 Fix some printf format string warnings due to sizeof(int) != sizeof(long) on
the alpha.
2000-09-11 23:55:10 +00:00
Mike Smith 4bf9a87a4c Whoops. The AMR_QUARTZ_GOFASTER option is meant to disable, not enable
this check.  It looks like it doesn't work on at least the 466 controllers.
2000-09-11 23:19:13 +00:00
Bill Fumerola 8f8f11aa99 Add tx to the list of miibus using network drivers. We already build tx in
/sys/modules for alpha, and it compiles on beast.
2000-09-11 21:21:37 +00:00
Bill Fumerola eaeac22d2c Move tx to the list of drivers that now require miibus. 2000-09-11 21:20:39 +00:00
Matt Jacob 86b9bd5cdc Well, this works for me and I can now boot my PC164 again.
Nobody said it broke their system.
2000-09-11 21:10:25 +00:00
David Malone 1c06ce6197 Add the ability to define a "shutdown" and "shutdown and poweroff" key
to syscons. I have a man page to follow describing the format of the
kbdmap file.

PR:		19273
Reviewed by:	sheldonh
2000-09-11 20:37:42 +00:00
Semen Ustimenko eed59f52da Sign tx driver as using miibus code. 2000-09-11 20:10:16 +00:00
John Baldwin e2059d0bfb Back out previous revision now that sys/random.h is properly fixed. 2000-09-11 19:34:04 +00:00
John Baldwin 72ece4ad37 Forward declare 'struct proc'.
Requested by:	bde
2000-09-11 19:33:38 +00:00
John Baldwin ecbcd538a4 Move the prototypes for random_set_wakeup* from yarrow.c to yarrow.h so that
both yarrow.c and harvest.c can use them.

Approved by:	markm
2000-09-11 19:31:28 +00:00
Archie Cobbs 6612c70eb1 Don't do snd_nxt rollback optimization (rev. 1.46) for SYN packets.
It causes a panic when/if snd_una is incremented elsewhere (this
is a conservative change, because originally no rollback occurred
for any packets at all).

Submitted by:	Vivek Sadananda Pai <vivek@imimic.com>
2000-09-11 19:11:33 +00:00
Poul-Henning Kamp 5ef2707e6e revent multiple make_dev() calls on the same dev_t and similar bogosities.
A couple of new warnings may be emitted during boot if drivers DTWT.

Tested by:	George Cox <gjvc@gjvc.com>
2000-09-11 17:15:33 +00:00
Poul-Henning Kamp e2397c3ab0 Prevent multiple make_dev() calls on the same dev_t and similar bogosities.
A couple of new warnings may be emitted during boot if drivers DTWT.

Tested by:	George Cox <gjvc@gjvc.com>
2000-09-11 17:15:27 +00:00
Roger Hardiman 26d8b8af6f Make MOD_UNLOAD return EBUSY to prevent it being unloaded automatically when we
unload the bktr driver.
Change the sub-section from SI_SUB_PSEDUO to SI_SUB_DRIVERS to make
sure the module initialises before the bktr module
2000-09-11 12:23:50 +00:00
Roger Hardiman 0950aa881d Add bktr_mem_loader, default to NO.
In the near future the bktr module will need the bktr_mem module too.
2000-09-11 10:46:03 +00:00
Roger Hardiman 403cbdd892 Change to SI_ORDER_FIRST to make sure this module runs before
the bktr module if both are loaded at the same time (eg in the boot
loader)
2000-09-11 10:37:27 +00:00
Roger Hardiman 5c8dc2dd0d Add MODULE_VERSION and MODULE_DEPENDS to make the bktr module load the
bktr_mem module
2000-09-11 07:14:43 +00:00
John Baldwin d742034d88 The alpha doesn't have a eflags register, so don't refer to it here. 2000-09-11 06:42:50 +00:00
John Baldwin ebbb6afce3 Add #include's of sys/proc.h and sys/param.h to silence a warning. 2000-09-11 05:51:58 +00:00
John Baldwin 2c98102ef1 Fix a 64-bitism, use size_t instead of u_int for 4th arg to copyinstr. 2000-09-11 05:45:06 +00:00
John Baldwin 38a6ecf4de Fix a 64-bitism. Use size_t instead of int for 4th argument to copyinstr.
Approved by:	rwatson
2000-09-11 05:43:02 +00:00
John Baldwin 43e585ce84 Don't tell printf() to output a sign when printing out a value as hex.
kvprintf() doesn't print out a sign for hex anyways.
2000-09-11 05:28:52 +00:00
John Baldwin 3f7ca8f3d2 - Remove duplicate cp_time declaration.
- Use extended printf format string version of KTR trace points.
2000-09-11 05:23:21 +00:00
John Baldwin 131568fdb5 Relocate sys/systm.h #include to quiet warning. 2000-09-11 05:19:37 +00:00
John Baldwin a0e1678488 Add a nasty hack to get remote kernel gdb working from ddb. ddb would
complain before that a suitable gdb port had not been setup because gdbdev
was NULL.  This abuses the fact that the gdb port is hard-coded to the
address normally assigned to sio1 and thus hard-codes in sio1 as the gdb
port.  Yuck.
2000-09-11 04:33:36 +00:00
John Baldwin b162b45509 When doing statistics for statclock on other CPU's, use the other CPUs'
idleproc pointers instead of our own for comparisons.

Submitted by:	tegge
2000-09-11 04:10:29 +00:00
John Baldwin 2ed0f9191a - Use RFHIGHPID when creating the kthread to get a more sensible pid.
- Don't fake walking a tailq.  Instead, use a while loop that pulls items
  off the head of the queue while the queue is not empty.
2000-09-11 04:09:08 +00:00
John Baldwin a93a7807b2 aio processes need to have the Giant mutex before doing work.
Submitted by:	tegge
2000-09-11 04:06:48 +00:00
Jason Evans 69ef67f983 Add malloc_mtx to protect malloc and friends, so that they're thread-safe.
Reviewed by:	peter
2000-09-11 02:32:30 +00:00
Jake Burkholder 817bf5d4a6 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
Jason Evans 62820f25f5 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
Doug Rabson 55f0c30072 Fix this so that we actually define HAVE_PNP when its available. 2000-09-10 17:11:27 +00:00
Roger Hardiman b478e142f0 Update to build both bktr and bktr_mem modules 2000-09-10 15:40:20 +00:00
Doug Rabson 28c4f9b685 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
Doug Rabson 2b3d792f0f Use '&' instead of '%' to calculate the new value for ktr_idx. 2000-09-10 14:36:55 +00:00
Roger Hardiman dd11af6637 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
Mark Murray 452d07c1ce Provide keyboard entropy harvesting for PCVT users. 2000-09-10 14:31:40 +00:00
Mark Murray 22566d9dd5 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
Mark Murray 0f3ad95051 The entropy driver module has changed name. 2000-09-10 13:58:58 +00:00
Doug Rabson 36240ea5bf Move the include of <sys/systm.h> so that KTR gets a declaration for
snprintf().
2000-09-10 13:54:52 +00:00
Mark Murray 4d87a031c0 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
Daniel C. Sobral 9714dd1a3a 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
Daniel C. Sobral f3b36c2a14 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
Daniel C. Sobral 2ae7c98e29 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
Doug Rabson 4eb38057ea Fix printf warnings in CTRx calls. 2000-09-10 13:34:35 +00:00
Doug Rabson 21ac8e0b77 Move the include of <sys/systm.h> so that KTR gets a declaration for
snprintf().
2000-09-10 13:33:31 +00:00
Doug Rabson 2604bbc62c Fix printf warnings. 2000-09-10 13:32:39 +00:00
Doug Rabson 5a81a9aef0 Fix printf warnings in CTRx calls. 2000-09-10 13:04:20 +00:00
Doug Rabson 6d8131b4c0 Update to work with the current version of KTR. 2000-09-10 13:03:24 +00:00
Doug Rabson 4eedebf31f Only build PnP parts if the platform supports PnP. 2000-09-10 12:15:30 +00:00
Poul-Henning Kamp 8925e63cd3 Updates to the ntp pll from John Hay.
Submitted by:	jhay
2000-09-10 09:13:34 +00:00
Peter Wemm 688088f7f7 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
Boris Popov 67b23794b1 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
Jason Evans 28d4c2dde3 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
Jason Evans 5340642a2e Style cleanups. No functional changes. 2000-09-09 23:18:48 +00:00
Jason Evans 46bf3fe5a6 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
Jason Evans 9360d3ebdd 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
Cameron Grant 0a1fe8922f 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
Cameron Grant 58359dc594 add 16bit mono/stereo conversion feeder
prefer feeder chains of length 1 over length 2
2000-09-09 21:24:03 +00:00
Cameron Grant 306f91b60b 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 Perlstein b47ce7f5cb Forget to include sysctl.h
Submitted by: des
2000-09-09 18:47:46 +00:00
Daniel C. Sobral 23aecb0109 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
Robert Nordier 3348fae50d Correct BSD/OS slice type.
PR:           21099
Submitted by: Alan Clegg <abc@bsdi.com>
2000-09-09 18:05:22 +00:00
Alexander Langer 5d4850e720 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
Alexander Langer e4b20971a6 LINT -> NOTES 2000-09-09 16:07:15 +00:00
Jun-ichiro itojun Hagino 29a3d1b0d2 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
Dag-Erling Smørgrav fecfecfbd0 Remove unused variables. 2000-09-09 14:35:35 +00:00
Dag-Erling Smørgrav ddc0b9925d 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
Poul-Henning Kamp 8d25eb2c3a 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
Daniel C. Sobral 88a7f9eb70 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
John Baldwin cc198001ee Add missing \'s to multline macros used for assertions. 2000-09-09 00:14:27 +00:00
Jason Evans 12473b76dc 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
Jason Evans d0b01efdeb 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
Daniel C. Sobral 869e9b2096 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
Daniel C. Sobral 80a1a63ef5 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
John Baldwin 1baab78f9e Remove an unneeded extern declaration of cp_time. 2000-09-08 20:18:29 +00:00
Daniel C. Sobral ebc9286d61 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
Daniel C. Sobral f5da975f8f 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
Daniel C. Sobral d39b220c77 Fix an error message which was using the wrong variable to get the
kernel name from.
2000-09-08 16:58:31 +00:00
Daniel C. Sobral 297c9cab3e Add constructors to crude structure support. Rework some of the
code into a more modular interface, with hidden vocabularies and
such. Remove the need to a lot of ugly initialization.

Also, add a few structure definitions, from stuff used on the C
part of loader. Some of this will disappear, and the crude structure
support will most likely be replaced by full-blown OOP support
already present on FICL, but not installed by default. But it was
getting increasingly inconvenient to keep this separate on my tree,
and I already lost lots of work once because of the hurdles, so
commit this.

Anyway, it makes support.4th more structured, and I'm not proceeding
with the work on it any time soon, unfortunately.
2000-09-08 16:57:28 +00:00
Daniel C. Sobral 3053524c85 Make the pnp structure a global variable, so it can be used elsewhere. 2000-09-08 16:51:29 +00:00
Daniel C. Sobral 59549c5031 Fix autoboot. Now autoboot *always* show the correct kernel name. It
gets the name from the environment variable kernelname, which is set
when a kernel is loaded. For this reason, autoboot will _first_ try
to load a kernel, and only proceed with the wait prompt after that
succeeds. If it fails, it will abort immediately.

While I understand some may think this behavior undesirable, I think
it is, overall, the best thing to do, even if we do not consider the
aesthetic issue. Notice that anyone using the default loader.rc
already has the kernel loaded before autoboot.

On unload, unset kernelname.

Separate the code that tries to load a kernel from the list of options
to the function loadakernel(). It is used by both boot() and
autoboot().
2000-09-08 16:47:05 +00:00
KATO Takenori 0c8c2cd619 Fixed the softintr macro which directly accessed ipending.
Suggested by:	jasone
2000-09-08 11:58:25 +00:00
KATO Takenori 3584f98832 Merged from sys/isa/sio.c revisions 1.309 - 1.311. 2000-09-08 11:54:13 +00:00
KATO Takenori f907abc0b3 Merged from sys/i386/i386/machdep.c revision 1.407. 2000-09-08 11:20:04 +00:00
KATO Takenori 87beee9c90 Merged from sys/boot/i386/loader/Makefile revision 1.47. 2000-09-08 11:18:40 +00:00