Commit Graph

22050 Commits

Author SHA1 Message Date
jhb
7013b83225 - 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
jhb
2bef2cffd4 - 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
jhb
2eb0243bb6 - 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
jhb
3b753e4112 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
jhb
aae23a8b8d Fix a comment, we have mutexes now instead of a single lock. 2000-09-13 18:22:07 +00:00
jhb
b563a12289 Add back in obtaining/releasing Giant around interrupt handlers. 2000-09-13 18:21:33 +00:00
bde
1f9f76e138 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
bde
4df37ee8ee 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
100914de6c Merged from sys/isa/sio.c revision 1.312. 2000-09-13 10:14:43 +00:00
kato
b13fc9954d Merged from sys/i386/conf/GENERIC revision 1.275. 2000-09-13 10:11:30 +00:00
kato
8969a9cf8b Merged from sys/i386/conf/GENERIC revision 1.274. 2000-09-13 10:10:34 +00:00
bp
d21670b5d5 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
imp
0cbfd9f924 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
msmith
b3a68de811 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
jhb
e396c60f68 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
dfr
5adf2c3980 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
dfr
1abaaa6dc2 * 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
dfr
7aec72700e Really disable interrupts for spin mutexes instead of just pretending. 2000-09-12 22:40:29 +00:00
jhb
f94cd225a3 Use size_t instead of u_int for 4th argument to copyinstr(). 2000-09-12 22:39:34 +00:00
dcs
6ceabd7082 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
jhb
b32557dbb8 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
bde
8a2681e22e 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
bde
f16595f63d 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
bp
8437d5b6f4 Add VOP_*VOBJECT vops, because MFS requires explicit vop specification.
Noted by:	knu
2000-09-12 16:21:16 +00:00
bde
b2fc79d876 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
markm
bf42c18253 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
markm
8310a08654 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
ps
5f7726f4e7 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
bp
a7bc78c86d 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
7893328799 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
rwatson
d12caa21f3 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
billf
541dc0d9da Fix screwup in previous commit. 2000-09-12 02:38:05 +00:00
jhb
24501ccc60 Fix some printf format string warnings due to sizeof(int) != sizeof(long) on
the alpha.
2000-09-11 23:55:10 +00:00
msmith
789d5e9f4c 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
billf
6e116d9b29 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
billf
4ebb85dd88 Move tx to the list of drivers that now require miibus. 2000-09-11 21:20:39 +00:00
mjacob
b86ac90f88 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
dwmalone
eeb5416b47 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
semenu
c35d103e0f Sign tx driver as using miibus code. 2000-09-11 20:10:16 +00:00
jhb
f2e0710ab9 Back out previous revision now that sys/random.h is properly fixed. 2000-09-11 19:34:04 +00:00
jhb
fbfbbf17cb Forward declare 'struct proc'.
Requested by:	bde
2000-09-11 19:33:38 +00:00
jhb
5a1ae8110e 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
51e519827f 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
phk
e16fe1f525 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
phk
ae910d4170 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
b4359f4581 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
95fdf432c0 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
2d1297fbf3 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
d5e49687c7 Add MODULE_VERSION and MODULE_DEPENDS to make the bktr module load the
bktr_mem module
2000-09-11 07:14:43 +00:00
jhb
9a8ad49a6d The alpha doesn't have a eflags register, so don't refer to it here. 2000-09-11 06:42:50 +00:00
jhb
5581cc0e46 Add #include's of sys/proc.h and sys/param.h to silence a warning. 2000-09-11 05:51:58 +00:00
jhb
f85add9ac0 Fix a 64-bitism, use size_t instead of u_int for 4th arg to copyinstr. 2000-09-11 05:45:06 +00:00
jhb
e467813373 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
jhb
22f51a424b 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
jhb
b2aee47a3f - Remove duplicate cp_time declaration.
- Use extended printf format string version of KTR trace points.
2000-09-11 05:23:21 +00:00
jhb
07bbce8416 Relocate sys/systm.h #include to quiet warning. 2000-09-11 05:19:37 +00:00
jhb
25c0ff28f3 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
jhb
577d7fbf37 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
jhb
0ccc0648b7 - 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
jhb
bd6b65a757 aio processes need to have the Giant mutex before doing work.
Submitted by:	tegge
2000-09-11 04:06:48 +00:00
jasone
1c1433e6c3 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
273d0f5a2d Rename tsleep to msleep and add a mutex argument, which is
released before sleeping and re-acquired before msleep
returns.  A compatibility cpp macro has been provided for
tsleep to avoid changing all occurences of it in the kernel.

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

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

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

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

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

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

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

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

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

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

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

Also, make it 1.0.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Next, the modules are loaded as usual.

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

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

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

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

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

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

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

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

boot-conf kernel.OLD -s

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

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

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

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

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

But it still lacks a number of desired features, and it's too crude
for my tastes. But since I don't have time to work on it, it might
be preferable to make it available to those who might. It's not
installed by default, much less loaded. In fact, it wouldn't even
had a copyright message (who? me? assume responsibility for _this_?),
if the cvs commit hadn't aborted for lack of $FreeBSD$, and I decided
to just cut&paste the stuff from elsewhere.
2000-09-08 17:13:24 +00:00
dcs
e8604ccc3e Add the infrastructure necessary to handle PnP from a Forth script.
Also, export the file_findfile() function. Again, this is taken from
work in progress but frozen for the time being. Since it works, I'd
rather commit and remove any uglyness later than hide it on my tree.
2000-09-08 17:03:53 +00:00
dcs
96bba78abe Fix an error message which was using the wrong variable to get the
kernel name from.
2000-09-08 16:58:31 +00:00
dcs
2a24bbc388 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
dcs
2f010215ab Make the pnp structure a global variable, so it can be used elsewhere. 2000-09-08 16:51:29 +00:00
dcs
475f83c70c 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
9310f79758 Fixed the softintr macro which directly accessed ipending.
Suggested by:	jasone
2000-09-08 11:58:25 +00:00
kato
108ecef4d4 Merged from sys/isa/sio.c revisions 1.309 - 1.311. 2000-09-08 11:54:13 +00:00
kato
41776e16eb Merged from sys/i386/i386/machdep.c revision 1.407. 2000-09-08 11:20:04 +00:00
kato
cefd56cea5 Merged from sys/boot/i386/loader/Makefile revision 1.47. 2000-09-08 11:18:40 +00:00
jasone
f0159730c6 Only call kdb_trap() if the DDB config option is specified. 2000-09-08 09:51:16 +00:00
jhb
26e551127d 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
grog
5d888c38ed 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
imp
9795d67faf 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
ead12b3bec Really fix USER_LDT. (Don't use currentldt as an L-value.) 2000-09-08 03:36:09 +00:00
jhb
7818bcb78c 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
mckusick
7438b4ca6f 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
mjacob
ca48f25217 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
8f61c4dbd7 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
wpaul
e7db16f407 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
wpaul
2e3a03013d 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
des
1883bff184 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
des
3eb19ae7c3 Redeclare cp_time. It's no longer static, and linprocfs needs it. 2000-09-07 16:38:04 +00:00
jhb
f9ac517229 Test for both SMP and I386_CPU being set before generating an error. 2000-09-07 16:10:02 +00:00
nyan
564829fb83 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
06674277f3 Merged from sys/i386/i386/machdep.c revision 1.406. 2000-09-07 13:35:44 +00:00
kato
5413a4bd48 Merged from sys/isa/sio.c revision 1.306, 1.307 and 1.308. 2000-09-07 13:34:45 +00:00
kato
4eea9218c9 Merged from sys/i386/isa/npx.c revision 1.84. 2000-09-07 13:33:48 +00:00
kato
9d03d4b106 Merged from sys/i386/isa/clock.c revision 1.156. 2000-09-07 13:32:59 +00:00
kato
635c415616 Merged from sys/conf/files.i386 revision 1.327 (adding synch_machdep.c
and ithread.c.)
2000-09-07 13:31:38 +00:00
obrien
c6d630aab0 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
obrien
47ffb8a090 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
jasone
769e0f974d 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
jasone
acf1927de0 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
obrien
2359f15a4f Remove superfluous `/'s before KODIR.
Acceptability explained by:	rgrimes
2000-09-07 00:26:33 +00:00
obrien
d2dcb8b1f5 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
obrien
8afd1b030d Since AlphaLinux is the weirdest Linux of all, probably best to do the
logic this way.
2000-09-06 20:21:55 +00:00
obrien
fa0d885311 Two sys/compat/linux sources aren't applicable on the Alpha at this time. 2000-09-06 20:21:15 +00:00
cg
434a102504 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
wpaul
73d445d426 Add support for D-Link DSB-650 USB ethernet adapter. 2000-09-06 19:35:01 +00:00
wpaul
275fd0d63f Regenerate. 2000-09-06 19:28:47 +00:00
wpaul
b7ef169503 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