Commit graph

22212 commits

Author SHA1 Message Date
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
Jason Evans c3b8f29aea Only call kdb_trap() if the DDB config option is specified. 2000-09-08 09:51:16 +00:00
John Baldwin 9c25701692 Back out my previous commit as well as some SMPng changes to revert the
siosetwater() function to its previous behavior of always disabling
interrupts and obtaining the com_lock before returning.

Requested by:	bde (in principle)
2000-09-08 08:50:25 +00:00
Greg Lehey e45e88e8aa siointr1: Schedule soft interrupt when needed. This fixes the "no
interrupt" problem people had seen with SMPng.

Approved by:       jasone
Tested by:         bp
2000-09-08 06:58:58 +00:00
Warner Losh 799c0f62dd Look for libstand in the built tree rather than in /usr/lib. This
likely could be done better, but the tree is broken and I wanted to
get a fix into the tree.

Reviewed by: msmith
2000-09-08 04:26:55 +00:00
Jake Burkholder 4ef34f39ec Really fix USER_LDT. (Don't use currentldt as an L-value.) 2000-09-08 03:36:09 +00:00
John Baldwin 60ee19d500 Fix a problem where we would recursively try to get the com lock within
comparam when calling siosetwater().

Noticed by:	bp
2000-09-08 00:35:46 +00:00
Kirk McKusick 52a3bfa2e7 Cannot do MALLOC with M_WAITOK while holding ACQUIRE_LOCK
Obtained from:	Ethan Solomita <ethan@geocast.com>
2000-09-07 23:02:55 +00:00
Matt Jacob e11a1ee870 Per msmith's request, don't attach to Qlogic 12160 id'd cards that have
a certain SubVendorID.
2000-09-07 20:27:40 +00:00
Jake Burkholder 88f4c2a1d6 Don't use currentldt as an L-value.
This should fix options USER_LDT.

Reported-by:	John Hay <jhay@zibbi.mikom.csir.co.za>
		Nickolay Dudorov <nnd@mail.nsk.ru>
2000-09-07 20:12:12 +00:00
Bill Paul 78999dd117 Special-case the LED twiddling code so that it doesn't do anything
on the NEC VersaPro NoteBook PC. This 21143 implementation has no LEDs,
and flipping the LED control bits somehow stops it from establishing
a link. We check the subsystem ID and don't flip the LED control
bits for the NEC NIC.
2000-09-07 18:51:04 +00:00
Bill Paul 2705f23073 Close PR #20963. Do not pass encryption keys back to the caller via
wi_ioctl() unless they're the superuser.
2000-09-07 17:05:12 +00:00
Dag-Erling Smørgrav 81dc16f619 Pierre Beyssac originally derived linprocfs from procfs, and I've made (and
will keep making) significant modifications, so I'm adding both our copyrights
to the top of these files.
2000-09-07 16:44:26 +00:00
Dag-Erling Smørgrav ec82b1165a Redeclare cp_time. It's no longer static, and linprocfs needs it. 2000-09-07 16:38:04 +00:00
John Baldwin 746a935474 Test for both SMP and I386_CPU being set before generating an error. 2000-09-07 16:10:02 +00:00
Yoshihiro Takahashi f69dfaede1 Don't assume that address of I/O address table increase (PC-98 only).
Pointed out by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-09-07 14:43:00 +00:00
KATO Takenori 232d649b48 Merged from sys/i386/i386/machdep.c revision 1.406. 2000-09-07 13:35:44 +00:00
KATO Takenori 106038c33b Merged from sys/isa/sio.c revision 1.306, 1.307 and 1.308. 2000-09-07 13:34:45 +00:00
KATO Takenori 258cacb69b Merged from sys/i386/isa/npx.c revision 1.84. 2000-09-07 13:33:48 +00:00
KATO Takenori 841d7a731e Merged from sys/i386/isa/clock.c revision 1.156. 2000-09-07 13:32:59 +00:00
KATO Takenori 6db643cde1 Merged from sys/conf/files.i386 revision 1.327 (adding synch_machdep.c
and ithread.c.)
2000-09-07 13:31:38 +00:00
David E. O'Brien ab721da874 Minimal set of diffs from the i386 bits to the AlphaLinux.
Submitted by:	gallatin (content, minimization by me)
2000-09-07 06:12:41 +00:00
David E. O'Brien ecf92803ef Create an "expert" mode where the device hints are not checked during
installation.  This is need for the release build.
2000-09-07 05:50:07 +00:00
Jason Evans 0384fff8c5 Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*().  See mutex(9).  (Note: The
  alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
  preempted (i386 only).

Partially contributed by:	BSDi (BSD/OS)
Submissions by (at least):	cp, dfr, dillon, grog, jake, jhb, sheldonh
2000-09-07 01:33:02 +00:00
Jason Evans 62ae6c89ad Add KTR, a facility that logs kernel events in order to to facilitate
debugging.

Acquired from:	BSDi (BSD/OS)
Submitted by:	dfr, grog, jake, jhb
2000-09-07 01:29:44 +00:00
David E. O'Brien 39f7b60e36 Remove superfluous `/'s before KODIR.
Acceptability explained by:	rgrimes
2000-09-07 00:26:33 +00:00
David E. O'Brien db266683d3 With the committed changes to the loaders modules path code, the kernel
path does not need to be hard coded.
2000-09-06 20:50:24 +00:00
David E. O'Brien 3e0aa01059 Since AlphaLinux is the weirdest Linux of all, probably best to do the
logic this way.
2000-09-06 20:21:55 +00:00
David E. O'Brien 849baab858 Two sys/compat/linux sources aren't applicable on the Alpha at this time. 2000-09-06 20:21:15 +00:00
Cameron Grant 7d60928719 ess maestro driver - not enabled by default
Submitted by:   Taku YAMAMOTO <taku@cent.saitama-u.ac.jp>
2000-09-06 20:10:55 +00:00
Bill Paul 46f1212df0 Add support for D-Link DSB-650 USB ethernet adapter. 2000-09-06 19:35:01 +00:00
Bill Paul d5b5ec1bcf Regenerate. 2000-09-06 19:28:47 +00:00
Bill Paul 349b8c9813 Add new device ID for the D-Link DSB-650 USB ethernet adapter. This is
a pegasus device, which has product ID 0xABC1. I'm not sure why they
changed it; there's already an entry for a DSB-650TX.
2000-09-06 19:28:27 +00:00
David E. O'Brien 78a7c549ee Minimal set of diffs from the i386 bits to the AlphaLinux.
Submitted by:	gallatin (content, minimization by me)
2000-09-06 19:26:17 +00:00
Don Lewis c5930ee45a Change the calls to panic() in uifree(), chgproccnt(), and chgsbsize()
to printf().  Any errors detected are not likely to be fatal, so it
should be safe to let things keep running.
2000-09-06 19:00:19 +00:00
Alfred Perlstein 34b94e8b82 Accept filter maintainance
Update copyrights.

Introduce a new sysctl node:
  net.inet.accf

Although acceptfilters need refcounting to be properly (safely) unloaded
as a temporary hack allow them to be unloaded if the sysctl
net.inet.accf.unloadable is set, this is really for developers who want
to work on thier own filters.

A near complete re-write of the accf_http filter:
  1) Parse check if the request is HTTP/1.0 or HTTP/1.1 if not dump
     to the application.
     Because of the performance implications of this there is a sysctl
     'net.inet.accf.http.parsehttpversion' that when set to non-zero
     parses the HTTP version.
     The default is to parse the version.
  2) Check if a socket has filled and dump to the listener
  3) optimize the way that mbuf boundries are handled using some voodoo
  4) even though you'd expect accept filters to only be used on TCP
     connections that don't use m_nextpkt I've fixed the accept filter
     for socket connections that use this.

This rewrite of accf_http should allow someone to use them and maintain
full HTTP compliance as long as net.inet.accf.http.parsehttpversion is
set.
2000-09-06 18:49:13 +00:00
David E. O'Brien a66b981248 Add the AlphaLinux locore support.
Submitted by:	gallatin
2000-09-06 18:26:29 +00:00
Peter Wemm 1becb98646 Revive these files in their new location. These were repo copied from
the old files before Marcel lost the history on them.

Requested by:	obrien
2000-09-06 17:59:21 +00:00
Peter Wemm fc611b0634 Do not panic on an uninitialized VOP_xxx() call. This was meant as a
sanity check, but it is too easy to run into, eg: making an ACL syscall
when no filesystems have the ACL implementation enabled.

The original reason for the panic was that the VOP_ vector had not been
assigned and therefor could not be passed down the stack.. and there
was no point passing it down since nothing implemented it anyway.
vop_defaultop entries could not pass it on because it had a zero (unknown)
vector that was indistinguishable from another unknown VOP vector.

Anyway, we can do something reasonable in this case, we shouldn't need
to panic here as there is a reasonable recovery option (return EOPNOTSUPP
and dont pass it down the stack).

Requested by: rwatson
2000-09-06 17:51:54 +00:00
Robert Watson 728783c27a o Synchronize vaccess() capability access control checks with TrustedBSD
tree.

Obtained from:	TrustedBSD Project
2000-09-06 12:18:24 +00:00
Poul-Henning Kamp 93bcdfe270 Add refcounts to the "global" DEVFS inode slots, this allows us
to recycle inodes after a destroy_dev() but not until all mounts
have picked up the change.

Add support for an overflow table for DEVFS inodes.  The static
table defaults to 1024 inodes, if that fills, an overflow table
of 32k inodes is allocated.  Both numbers can be changed at
compile time, the size of the overflow table also with the
sysctl vfs.devfs.noverflow.

Use atomic instructions to barrier between make_dev()/destroy_dev()
and the mounts.

Add lockmgr() locking of directories for operations accessing or
modifying the directory TAILQs.

Various nitpicking here and there.
2000-09-06 11:26:43 +00:00
Poul-Henning Kamp 819e370c3b Introduce atomic_cmpset_int() and atomic_cmpset_long() from SMPng a
few hours earlier than the rest.

The next DEVFS commit needs these functions.

Alpha versions by: dfr
i386 versions by: jakeb

Approved by:    SMPng
2000-09-06 11:21:14 +00:00
David E. O'Brien 8a97d93145 DESTDIR'ify the device.hints checking code. 2000-09-06 09:27:25 +00:00
David E. O'Brien 3be254e2c1 I forgot the leading `DESTDIR' before the kernel directory. 2000-09-06 09:14:18 +00:00
David E. O'Brien 6b6821c771 The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.

Submitted by:	Hisashi Hiramoto <hiramoto@phys.chs.nihon-u.ac.jp>
2000-09-06 06:22:20 +00:00
Marcel Moolenaar dee4ec33cf When sigaltstack is called with a stack size that's not smaller
than LINUX_MINSIGSTKSZ but smaller than MINSIGSTKSZ, cheat and
pass MINSIGSTKSZ to the kernel. This is a workaround.

Submitted through: nate
2000-09-06 06:08:54 +00:00
Bill Fumerola 4897e8320e 1. IP_FW_F_{UID,GID} are _not_ commands, they are extras. The sanity checking
for them does not belong in the IP_FW_F_COMMAND switch, that mask doesn't even
apply to them(!).

2. You cannot add a uid/gid rule to something that isn't TCP, UDP, or IP.

XXX - this should be handled in ipfw(8) as well (for more diagnostic output),
but this at least protects bogus rules from being added.

Pointy hat:	green
2000-09-06 03:10:42 +00:00
Boris Popov 9548091b84 Ignore ELF files with 'interpreter' section because KLDs doesn't contain it.
Reviewed by:	peter
2000-09-06 02:21:43 +00:00
David E. O'Brien 6f54390e53 Fix the kernel default load from "/boot/modules" to "/boot/kernel".
Reported by:	dcs
2000-09-05 23:10:46 +00:00
David E. O'Brien 3bdfa9e589 The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.
2000-09-05 22:37:46 +00:00
Mike Smith 877aa18bbf Teach the NFS && NFS_ROOT case how to pick up information left by the
PXE loader, and use this to build the nfs_diskless structure.
2000-09-05 22:34:11 +00:00
Mike Smith 0153af6a16 Fix a bug which prevents parsing this Makefile without having a
previously-built loader binary elsewhere.
2000-09-05 22:33:07 +00:00
Mike Smith bb65fdf6e0 Export the salient configuration items in a non-pxe-specific namespace
to allow commonality between varying platforms.  This is a step
towards parsing the diskless configuration information with MI code
inside the kernel.

Export the interface hardware address to the kernel, so that it is possible
to determine the boot interface with certainty.

Export the NFS filehandle for the root mount to the kernel, so that the
kernel does not need to perform a mount RPC call.
2000-09-05 22:32:31 +00:00
Mike Smith a77773909d Don't scan for the "right" network interface by shooting in the dark.
Assume that the nfs_diskless structure is correctly set up; the provider
ought to be getting it right.
2000-09-05 22:29:36 +00:00
Don Lewis f535380cb6 Remove uidinfo hash table lookup and maintenance out of chgproccnt() and
chgsbsize(), which are called rather frequently and may be called from an
interrupt context in the case of chgsbsize().  Instead, do the hash table
lookup and maintenance when credentials are changed, which is a lot less
frequent.  Add pointers to the uidinfo structures to the ucred and pcred
structures for fast access.  Pass a pointer to the credential to chgproccnt()
and chgsbsize() instead of passing the uid.  Add a reference count to the
uidinfo structure and use it to decide when to free the structure rather
than freeing the structure when the resource consumption drops to zero.
Move the resource tracking code from kern_proc.c to kern_resource.c.  Move
some duplicate code sequences in kern_prot.c to separate helper functions.
Change KASSERTs in this code to unconditional tests and calls to panic().
2000-09-05 22:11:13 +00:00
Poul-Henning Kamp 64dc16df4a Move extern declaration of dead_vnodeop_p to a .h file.
Remove race condition in vn_isdisk().
2000-09-05 21:09:56 +00:00
Poul-Henning Kamp bfb752885a Register resources in a more opportune order for the hardware. 2000-09-05 21:08:48 +00:00
Cameron Grant cd2c103ae0 initial support for multiple ac97 codecs 2000-09-05 21:08:01 +00:00
Cameron Grant c02f3f7aee add detach support 2000-09-05 21:06:11 +00:00
Cameron Grant 85a6a5dce4 allow a null setdir implementation 2000-09-05 21:00:45 +00:00
Cameron Grant c9b53085be be more verbose about failed unload attempts 2000-09-05 20:58:51 +00:00
Cameron Grant 37ab02c0ed tidy up a little, add a mask for 32bit formats 2000-09-05 20:56:31 +00:00
Alan Cox 96b8882a96 Make the basic AIO functions, i.e., aio_read() and aio_write(),
work on the Alpha, at least, for the aio_qphysio() case.  Specifically,
fix an unaligned access fault.
2000-09-05 18:58:07 +00:00
Warner Losh f245fa0e59 MFNetBSD:
1.6 2000/04/12 21:07:55 scw
	Add support for the SOHOware PCMCIA Ethernet card, model ND5100-E.
	This seems to be a re-badged NDC (National Datacomms. Corp) card.
	It needs a quirk entry due to lack of manufacturer tuple in the CIS.
	For some reason, the 'Tx/Rx' LED on the connector module is inverted
	such that it is off during network activity...
2000-09-05 18:25:49 +00:00
Masahide MAEKAWA d762e7af21 Regen. 2000-09-05 16:01:34 +00:00
Masahide MAEKAWA a892b1899f Add product ID (Prolific ATAPI-4 Bridge Controller).
Reported by: "K.Sumitani" <sumitani@bd2.hnes.nec.co.jp>
2000-09-05 16:00:55 +00:00
Nick Hibma 361e87effa Regen. 2000-09-05 12:28:33 +00:00
Nick Hibma b8a22e4b74 Fix typo's 2000-09-05 12:26:37 +00:00
Nick Hibma 5e1f755037 Loads of scanner Ids. 2000-09-05 12:24:05 +00:00
Sheldon Hearn bade5944c9 Add ZTIA001 - Zoom Internal V90 Faxmodem.
PR:		21028
Submitted by:	Glenn Johnson <glennpj@charter.net>
2000-09-05 09:42:47 +00:00
Boris Popov 8da8066061 Various cleanups towards make nullfs functional (it is still broken
at this point):

Replace all '#ifdef DEBUG' with '#ifdef NULLFS_DEBUG' and add NULLFSDEBUG
macro.

Protect nullfs hash table with lockmgr.

Use proper order of operations when freeing mnt_data.

Return correct fsid in the null_getattr().

Add null_open() function to catch MNT_NODEV (obtained from NetBSD).

Add null_rename() to catch cross-fs rename operations (submitted by
Ustimenko Semen <semen@iclub.nsu.ru>)

Remove duplicate $FreeBSD$ tags.
2000-09-05 09:02:07 +00:00
Boris Popov 7da1e3f0b0 Get rid from the __P() macros.
Encouraged by:	peter
2000-09-05 07:54:39 +00:00
Robert Watson e81c5f4307 o vn_extattr_set() will now call appropriate vn_start_write() and
vn_finished_write() if IO_NODELOCKED is not set.

Obtained from:	TrustedBSD Project
2000-09-05 03:15:02 +00:00
Robert Watson b4d0de586d o Remove commented out code which modified return values from
extattr_{get,set} syscalls in the face of partial reads or writes.

Obtained from:	TrustedBSD Project
2000-09-05 02:13:14 +00:00
Peter Wemm f1998090a4 Regenerate 2000-09-05 01:10:33 +00:00
Peter Wemm 4d8ea19f7c Catch a few more bogosities in certain chipsets before they mess us up.
Some have dual host->PCI bridges for the same logical pci bus (!), eg:
some of the RCC chipsets.  This is a 32/64 bit 33/66MHz and dual pci
voltage motherboard so persumably there are electical or signalling
differences but they are otherwise the same logical bus.
The new PCI probe code however was getting somewhat upset about it and
ended up creating two pci bridges to the same logical bus, which caused
devices on that logical bus to appear and be probed twice.

The ACPI data on this box correctly identifies this stuff, so bring on
ACPI! :-)
2000-09-05 00:53:34 +00:00
Peter Wemm 741f2944a9 Add compaq hotplug PCI device id.
Tidy up some loose ends.  Be a little more consistent how the ign driver
probes with the rest of the drivers in this file.
2000-09-05 00:33:22 +00:00
Peter Wemm 28ea1bf869 When dumping the 'found devices' list in verbose mode, actually show the
bus/slot/function numbers.  The old PCI code used other markers or
something, but without it here under the new pci code it is very hard to
tell which device is which (this only affects bootverbose mode).
2000-09-05 00:32:19 +00:00
Peter Wemm 58da4602af When we are picking the next available unit number, specifically say
what we picked.  Otherwise it is anybody's guess as to where the
device ended up.
2000-09-05 00:30:46 +00:00
Robert Watson 71582bf515 o Add missing "\n" to warning output in netinet/if_loop.c, when an
unsupported address family is used on localhost interface.

    looutput: af=0 unexpected

  Speculation as to the reasons for my seeing this error are welcome, of
  course.  :-)
2000-09-04 21:46:27 +00:00
Wilko Bulte 1b2f17352d Add AS1200 (Tincup) to description 2000-09-04 20:47:35 +00:00
Wilko Bulte 8c14ef3a31 LINT -> NOTES 2000-09-04 20:45:15 +00:00
Poul-Henning Kamp 7665e72021 Off by one error.
Submitted by:	des
2000-09-04 18:24:30 +00:00
Dag-Erling Smørgrav 9acf7ab9bc Remove obsolete comment (see rev 1.84 of procfs_vnops.c) 2000-09-04 18:19:04 +00:00
Dag-Erling Smørgrav 18203af447 Remove a comment that has been not only obsolete but patently wrong for the
last 31 revisions (almost three years).
2000-09-04 18:18:17 +00:00
Nick Hibma 329474c7de Support for RBC devices, like Sony Memory Sticks.
Not extensively tested yet, so be warned.

Submitted by:	Gerd Knops <gerti@bitart.com>
2000-09-04 15:34:14 +00:00
Nick Hibma 21ca942f09 Add the id for the Sony memory sticks. 2000-09-04 15:29:42 +00:00
Sheldon Hearn 1eb283fdc2 Add Boca K56Flex PnP modem.
PR:		21000
Submitted by:	Andrew Sparrow <spadger@best.com>
2000-09-04 13:50:37 +00:00
Poul-Henning Kamp 97804a5c99 Update the NTP kernel PLL code to the 2000-08-29 version of Dave Mills
nanokernel.

The FreeBSD private mode hardpps Type 2 PLL has been removed.
2000-09-04 08:19:32 +00:00
Alan Cox b70158bae1 Make filt_aio() check the jobstate for JOBST_JOBBFINISHED (in addition
to JOBST_JOBFINISHED) in case the aio_read() or aio_write() was performed
via the high-performance physio method, i.e., aio_qphysio().
2000-09-04 07:56:32 +00:00
Gregory Neil Shapiro 0b488822b7 Fix typo 2000-09-04 03:59:41 +00:00
KATO Takenori ec43f77f09 Merged from sys/i386/i386/machdep.c revision 1.405. 2000-09-03 15:55:34 +00:00
KATO Takenori f9c3835031 Merged from sys/conf/files.i386 revisions 1.325 and 1.326. 2000-09-03 14:47:00 +00:00
KATO Takenori 5340942440 Merged from sys/i386/i386/machdep.c rev. 1.404 just for keeping
similarity.  No PC-98 may have ACPI feature, but I'm not 100%
sure.
2000-09-03 14:11:03 +00:00
Jun-ichiro itojun Hagino ddf47c26f3 repair type 0 routing header support. it was caused by RFC2292/2292bis
difference.  from: jinmei@kame.net
2000-09-03 13:43:13 +00:00
Gerard Roudier aeab966bdd PR: kern/20895
PR kern/20895:
- Add FE_DAC new feature flag to distinguish between
  64 bit PCI addressing (DAC cycles) and 64 bit PCI
  interface (64 bit Memory BARs).
- Properly deal with chips that have a 32 bit PCI
  interface but support and may generate DAC.
  (Only SYM53C895A for now).

PR misc/17584 (at least partially addressed):
- Try detecting hardware combinations that trigger
  spurious PCI master parity error detections by the
  PCI chip. This work-around is implemented in the
  `snooptest' routine and consists in retrying with
  PCI master parity checking disabled if such an
  error is reported by the PCI chip during this test.

Other:
- Fix a tiny bug in WIDE negotiation that was very
  unlikely to be triggerred. The BUS width was wrongly
  compared against chip's max. offset.
2000-09-03 12:36:21 +00:00
Gerard Roudier fb91fd6902 Add device list supported by `sym' 2000-09-03 12:29:51 +00:00
Peter Wemm a3197deec9 sys/systm.h is incompatable with sys/types.h in userland.
(#define major() in sys/types.h for example.)

Reported by:	Nickolay Dudorov <nnd@mail.nsk.ru>
2000-09-03 11:32:07 +00:00
Peter Wemm edc31306f7 Fix pci-pci bridges (I hope).
In the nexus case, there are no ivars for children of nexus devices,
and we were passing data in from before the device existed, hence ivars
are convenient as the softc doesn't really exist yet.
However, for pci->pci bridges, the pcib occupies a pci device itself,
which *does* already have ivars.  However, softc is available and stable
at this point since we've been identified and are locating the bus during
attach.  So, use softc for this version of pcib devices for storing the
physical bus number in.
2000-09-03 08:30:10 +00:00
KATO Takenori d557549f61 Merged from sys/dev/syscons/syscons.c revision 1.346. 2000-09-03 07:05:30 +00:00
Peter Wemm 82acbcf57b kern_shutdown.c was more ANSI-C than K&R - remove the remnants of K&R
support with extreme prejudice.
2000-09-03 06:44:53 +00:00