Commit Graph

3346 Commits

Author SHA1 Message Date
Bruce Evans
17008f5343 Throw away the complications in npxsave() and their infrastructure.
npxsave() went to great lengths to excecute fnsave with interrupts
enabled in case executing it froze the CPU.  This case can't happen,
at least for Intel CPU/NPX's.  Spurious IRQ13's don't imply spurious
freezes.  Anyway, the complications were usually no-ops because IRQ13
is not used on i486's and newer CPUs, and because SMPng broke them in
rev.1.84.  Forcible enabling of interrupts was changed to
write_eflags(old_eflags), but since SMPng usually calls npxsave() from
cpu_switch() with interrupts disabled, write_eflags() usually just
kept interrupts disabled.
2001-05-20 20:04:40 +00:00
Bruce Evans
7010278935 Use a critical region to protect almost everything in npxinit().
npxinit() didn't have the usual race because it doesn't save to curpcb,
but it may have had a worse form of it since it uses the npx when it
doesn't "own" it.  I'm not sure if locking prevented this.  npxinit()
is normally caled with the proc lock but not sched_lock.

Use a critical region to protect pushing of curproc's npx state to
curpcb in npxexit().  Not doing so was harmless since it at worst
saved a wrong state to a dieing pcb.
2001-05-20 18:05:44 +00:00
John Baldwin
ddfbf9d259 - Axe the IMEN_BITS and APIC_IMEN_BITS constants.
- Add back in a definition of NHWI which is preferred over ICU_LEN.

Submitted by:	bde
2001-05-17 22:24:17 +00:00
John Baldwin
dec54ac5b5 "Sir, the deorbit burn completed succesfully."
RIP {sys/machine}/ipl.h.
2001-05-15 23:30:37 +00:00
John Baldwin
8bd57f8fc2 Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
John Baldwin
4966b0e91c Move the definition of HWI_MASK to the i386/isa/icu.h header right next to
the definition of ICU_LEN.
2001-05-15 23:11:48 +00:00
John Baldwin
d008c720b6 - Use ICU_LEN rather than NHWI for the size of the array of ithreads.
- Remove unneeded include of sys/ipl.h.
2001-05-15 22:31:08 +00:00
Bruce Evans
79d4e25bea Fixed panics in npx exception handling. When using IRQ13 exception
handling, SMPng always switches the npx context away from curproc
before calling the handler, so the handler always paniced.  When using
exception 16 exception handling, SMPng sometimes switches the npx
context away from curproc before calling the handler, so the handler
sometimes paniced.  Also, we didn't lock the context while using it,
so we sometimes didn't detect the switch and then paniced in a less
controlled way.

Just lock the context while using it, and return without doing anything
except clearing the busy latch if the context is not for curproc.  This
fixes the exception 16 case and makes the IRQ13 case harmless.  In both
cases, the instruction that caused the exception is restarted and the
exception repeats.  In the exception 16 case, we soon get an exception
that can be handled without doing anything special.  In the IRQ13 case,
we get an easy to kill hung process.
2001-05-02 13:06:58 +00:00
Mark Murray
fb919e4d5a Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)
2001-05-01 08:13:21 +00:00
John Baldwin
4d4bc9acc6 Add in a missing call to forward_hardclock() in the SMP case.
Submitted by:	bde
2001-04-28 01:37:44 +00:00
John Baldwin
6caa8a1501 Overhaul of the SMP code. Several portions of the SMP kernel support have
been made machine independent and various other adjustments have been made
to support Alpha SMP.

- It splits the per-process portions of hardclock() and statclock() off
  into hardclock_process() and statclock_process() respectively.  hardclock()
  and statclock() call the *_process() functions for the current process so
  that UP systems will run as before.  For SMP systems, it is simply necessary
  to ensure that all other processors execute the *_process() functions when the
  main clock functions are triggered on one CPU by an interrupt.  For the alpha
  4100, clock interrupts are delievered in a staggered broadcast fashion, so
  we simply call hardclock/statclock on the boot CPU and call the *_process()
  functions on the secondaries.  For x86, we call statclock and hardclock as
  usual and then call forward_hardclock/statclock in the MD code to send an IPI
  to cause the AP's to execute forwared_hardclock/statclock which then call the
  *_process() functions.
- forward_signal() and forward_roundrobin() have been reworked to be MI and to
  involve less hackery.  Now the cpu doing the forward sets any flags, etc. and
  sends a very simple IPI_AST to the other cpu(s).  AST IPIs now just basically
  return so that they can execute ast() and don't bother with setting the
  astpending or needresched flags themselves.  This also removes the loop in
  forward_signal() as sched_lock closes the race condition that the loop worked
  around.
- need_resched(), resched_wanted() and clear_resched() have been changed to take
  a process to act on rather than assuming curproc so that they can be used to
  implement forward_roundrobin() as described above.
- Various other SMP variables have been moved to a MI subr_smp.c and a new
  header sys/smp.h declares MI SMP variables and API's.   The IPI API's from
  machine/ipl.h have moved to machine/smp.h which is included by sys/smp.h.
- The globaldata_register() and globaldata_find() functions as well as the
  SLIST of globaldata structures has become MI and moved into subr_smp.c.
  Also, the globaldata list is only available if SMP support is compiled in.

Reviewed by:	jake, peter
Looked over by:	eivind
2001-04-27 19:28:25 +00:00
John Baldwin
33a9ed9d0e Change the pfind() and zpfind() functions to lock the process that they
find before releasing the allproc lock and returning.

Reviewed by:	-smp, dfr, jake
2001-04-24 00:51:53 +00:00
John Baldwin
adccbaa77d People are still having problems with i586_* on UP machines and SMP
machines, so just hack it to disable them for now until it can be fixed.

Inspired by hair pulling of:	asmodai
2001-04-13 17:14:53 +00:00
John Baldwin
ca7ef17c08 Remove the BETTER_CLOCK #ifdef's. The code is on by default and is here
to stay for the foreseeable future.

OK'd by:	peter (the idea)
2001-04-10 21:34:13 +00:00
Peter Wemm
37c9e8eebd Typo fix. s/criticale_t/critical_t/ 2001-03-28 14:54:28 +00:00
John Baldwin
f34fa851e0 Catch up to header include changes:
- <sys/mutex.h> now requires <sys/systm.h>
- <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
2001-03-28 09:17:56 +00:00
John Baldwin
0006681fe6 Switch from save/disable/restore_intr() to critical_enter/exit(). 2001-03-28 03:06:10 +00:00
Poul-Henning Kamp
f83880518b Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
Thomas Moestl
368d2edce4 Export intrnames and intrcnt as sysctls (hw.nintr, hw.intrnames and
hw.intrcnt).

Approved by:	rwatson
2001-03-23 03:45:17 +00:00
Dag-Erling Smørgrav
a6221d8c82 Show the bzero() bandwidth in kBps instead of Bps; use u_int32_t instead
of long and int64_t; and print the result as an unsigned long. This should
make the output from the bzero() test more readable, and avoid printing a
negative bandwidth. Note that this doesn't change the decision process,
since that is based on time elapsed, not on computed bandwidth.
2001-03-19 00:28:04 +00:00
John Baldwin
19eb87d22a Grab the process lock while calling psignal and before calling psignal. 2001-03-07 03:37:06 +00:00
John Baldwin
ae383d0cc7 Don't enable interrupts before calling sched_ithd for threaded interrupts.
Tested by:	obrien
2001-03-05 04:37:54 +00:00
Jonathan Lemon
2b99d4f013 In ascpoll, return revents, not 0. 2001-03-01 03:21:16 +00:00
Jake Burkholder
02318dac2c Remove the leading underscore from all symbols defined in x86 asm
and used in C or vice versa.  The elf compiler uses the same names
for both.  Remove asnames.h with great prejudice; it has served its
purpose.

Note that this does not affect the ability to generate an aout kernel
due to gcc's -mno-underscores option.

moral support from:	peter, jhb
2001-02-25 06:29:04 +00:00
John Baldwin
4c8ccdab0f Remove undefined and unreferenced doreti_syscall_ret globl. While I'm
here, adjust comment block above doreti.  We don't have the old MP lock
anymore.
2001-02-23 00:41:05 +00:00
John Baldwin
f308e0d714 - Change ast() to take a pointer to a trapframe like other architectures.
- Don't use an atomic operation to update cnt.v_soft in ast().  This is
  the only place the variable is written to, and sched_lock is always
  held when it is written, so it is already protected and the mutex release
  of sched_lock asserts a memory barrier that ensures the value will be
  updated in a timely fashion.
2001-02-22 18:05:15 +00:00
John Baldwin
3e5da75445 - Add a new ithread_schedule() function to do the bulk of the work of
scheduling an interrupt thread to run when needed.  This has the side
  effect of enabling support for entropy gathering from interrupts on
  all architectures.
- Change the software interrupt and x86 and alpha hardware interrupt code
  to use ithread_schedule() for most of their processing when scheduling
  an interrupt to run.
- Remove the pesky Warning message about interrupt threads having entropy
  enabled.  I'm not sure why I put that in there in the first place.
- Add more error checking for parameters and change some cases that
  returned EINVAL to panic on failure instead via KASSERT().
- Instead of doing a documented evil hack of setting the P_NOLOAD flag
  on every interrupt thread whose pri was SWI_CLOCK, set the flag
  explicity for clk_ithd's proc during start_softintr().
2001-02-20 10:25:29 +00:00
Bruce Evans
0ad74739ac Removed all traces of T_ASTFLT (except for gaps where it was). It became
unused except in dead code when ast() was split off from trap().
2001-02-19 15:47:38 +00:00
Bruce Evans
12a586bbda Fixed style bugs in clock.c rev.1.164 and cpu.h rev.1.52-1.53 -- declare
tsc_present in the right places (together with other variables of the
same linkage), and don't use messy ifdefs just to avoid exporting it in
some cases.
2001-02-19 03:00:34 +00:00
Mark Murray
2564fe499d Allow the superuser to prefent all interrupt harvesting on
her system.
2001-02-18 17:47:55 +00:00
Jonathan Lemon
608a3ce62a Extend kqueue down to the device layer.
Backwards compatible approach suggested by: peter
2001-02-15 16:34:11 +00:00
Mark Murray
d888fc4e73 RIP <machine/lock.h>.
Some things needed bits of <i386/include/lock.h> - cy.c now has its
own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK()
has been moved to <i386/include/apic.h> (AKA <machine/apic.h>).
Reviewed by:	jhb
2001-02-11 10:44:09 +00:00
John Baldwin
e990501c21 Re-enable preemption on interrupts. My last commit accidentally reverted
it as I was playing with some other ways of doing kernel preemption.
2001-02-10 02:41:50 +00:00
John Baldwin
142ba5f3d7 - Make astpending and need_resched process attributes rather than CPU
attributes.  This is needed for AST's to be properly posted in a preemptive
  kernel.  They are backed by two new flags in p_sflag: PS_ASTPENDING and
  PS_NEEDRESCHED.  They are still accesssed by their old macros:
  aston(), astoff(), etc.  For completeness, an astpending() macro has been
  added to check for a pending AST, and clear_resched() has been added to
  clear need_resched().
- Rename syscall2() on the x86 back to syscall() to be consistent with
  other architectures.
2001-02-10 02:20:34 +00:00
John Baldwin
16d92c70f1 Revert the spin mutex for the cy(4) driver.
Requested by:	bde
2001-02-09 22:37:24 +00:00
John Baldwin
5ee2dd82a9 Catch up to the new swi API. 2001-02-09 18:35:53 +00:00
John Baldwin
6221adac84 - Use a spin mutex instead of COM_LOCK, since COM_LOCK is going away.
The same name from the sio(4) driver was used and an appropriate
  dictionary item added at the top to reduce diffs.
- Catch up to the new swi API.
2001-02-09 17:55:32 +00:00
John Baldwin
5781f5419e Catch up to changes to inthand_add(). 2001-02-09 17:48:33 +00:00
John Baldwin
2e0c76cd20 Use the MI ithread helper functions in the x86 interrupt code. 2001-02-09 17:47:44 +00:00
John Baldwin
40bcb55186 Remove unused forward_irq counters. 2001-02-09 14:30:03 +00:00
Bosko Milekic
9ed346bab0 Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:

mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)

similarily, for releasing a lock, we now have:

mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.

The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.

Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:

MTX_QUIET and MTX_NOSWITCH

The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:

mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.

Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.

Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.

Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.

Finally, caught up to the interface changes in all sys code.

Contributors: jake, jhb, jasone (in no particular order)
2001-02-09 06:11:45 +00:00
Jeroen Ruigrok van der Werven
2fa72ea7d4 Fix typo: compatability -> compatibility.
Compatability is not an existing english word.
2001-02-06 12:05:58 +00:00
Poul-Henning Kamp
6817526d14 Convert if_multiaddrs from LIST to TAILQ so that it can be traversed
backwards in the three drivers which want to do that.

Reviewed by:    mikeh
2001-02-06 10:12:15 +00:00
Poul-Henning Kamp
37d4006626 Another round of the <sys/queue.h> FOREACH transmogriffer.
Created with:   sed(1)
Reviewed by:    md5(1)
2001-02-04 16:08:18 +00:00
Poul-Henning Kamp
fc2ffbe604 Mechanical change to use <sys/queue.h> macro API instead of
fondling implementation details.

Created with: sed(1)
Reviewed by: md5(1)
2001-02-04 13:13:25 +00:00
Poul-Henning Kamp
e1d756ce2a Remove the LABPC driver.
Doesn't work, no maintainer, more promising code exists elsewhere.
2001-02-04 11:18:15 +00:00
Poul-Henning Kamp
c8f71496f7 Use macro API to <sys/queue.h> 2001-02-04 10:34:45 +00:00
Jake Burkholder
05f6ee66ea Implement preemptive scheduling of hardware interrupt threads.
- If possible, context switch to the thread directly in sched_ithd(),
  rather than triggering a delayed ast reschedule.

- Disable interrupts while restoring fpu state in the trap handler,
  in order to ensure that we are not preempted in the middle, which
  could cause migration to another cpu.

Reviewed by:	peter
Tested by:	peter (alpha)
2001-02-01 03:34:20 +00:00
Bruce Evans
a89bda90b1 Added used include of <sys/mutex.h>. The SMP case was broken by
incompletely converting simplelocks to mutexes (COM_LOCK() is supposed
to hide the SMP locking internals, but it now depends on mutex interfaces
being visible).
2001-01-30 17:05:58 +00:00
John Hay
8a6d185698 The ar and sr devices have moved to sys/dev/. 2001-01-30 10:05:44 +00:00
John Hay
ec2dd907f0 This include file has found a new home in sys/dev/ic/. 2001-01-30 10:04:25 +00:00
Peter Wemm
55063c26c1 Style (whitespace) nit. 2001-01-30 09:44:37 +00:00
Peter Wemm
920c17857f Stop counting sppp interfaces, we were just testing its presence to give
a warning if it was missing.
2001-01-29 12:27:46 +00:00
Peter Wemm
f444a0efe9 Convert mca (microchannel bus support) from something that we count
(bogus) to something that we test for the presence of.
2001-01-29 11:57:27 +00:00
Peter Wemm
03927d3c33 Send "#if NISA > 0" to the bit-bucket and replace it with an option.
These were compile-time "is the isa code present?" tests and not
'how many isa busses' tests.
2001-01-29 09:38:39 +00:00
Jake Burkholder
07ce8269b1 Clear intr_nesting_level when an interrupt thread has no more
handlers and wants to exit, so it doesn't panic in exit1()
which malloc()s with M_WAITOK.

Reported by:	Bob Bishop <rb@gid.co.uk>
2001-01-28 17:20:11 +00:00
John Hay
b2952b0aa4 Newbusify ar(4). 2001-01-24 18:45:29 +00:00
John Baldwin
bb4b2d8b2a Remove the Xforward_irq IPI. 2001-01-24 10:01:13 +00:00
John Baldwin
cd60bc00a7 - Remove all the #if 0'd code that used to implement IRQ forwarding.
- Remove #if 0'd lazy interrupt mask.
2001-01-24 10:00:07 +00:00
John Baldwin
172c0b6aec Use selrecord() instead of doing the work ourselves. 2001-01-24 00:06:26 +00:00
John Baldwin
92ad4dfbd1 Make the device name in an isa_device a const char * instead of a char *
to silence cast-qual warnings.
2001-01-24 00:05:13 +00:00
Jake Burkholder
a448b62ac9 Make intr_nesting_level per-process, rather than per-cpu. Setup
interrupt threads to run with it always >= 1, so that malloc can
detect M_WAITOK from "interrupt" context.  This is also necessary
in order to context switch from sched_ithd() directly.

Reviewed By:	peter
2001-01-21 19:25:07 +00:00
Peter Wemm
654c30a008 Remove APIC_INTR_DIAGNOSTIC - this has been disabled for some time now.
Remove some leftovers of removed SMP options.
2001-01-21 07:54:10 +00:00
Jason Evans
d1c1b8413e Remove MUTEX_DECLARE() and MTX_COLD. Instead, postpone full mutex
initialization until after malloc() is safe to call, then iterate through
all mutexes and complete their initialization.

This change is necessary in order to avoid some circular bootstrapping
dependencies.
2001-01-21 07:52:20 +00:00
Jake Burkholder
c1ef8aac9e - Make npx_intr INTR_MPSAFE and move acquiring Giant into the
function itself.
- Remove a hack to allow acquiring Giant from the npx asm trap
  vector.
2001-01-20 02:30:58 +00:00
Garrett Wollman
074a4a2c84 Finish deprecating <sys/select.h> in favor of <sys/selinfo.h> in kernel code. 2001-01-20 02:24:07 +00:00
Peter Wemm
1467a651ab Convert apm from a bogus 'count' into a plain option. Clean out some
other cruft from the files.alpha and files.ia64 that were related to this.
2001-01-19 14:09:54 +00:00
John Baldwin
8339bca6db Add in a space that got lost in the previous commit in some debugging code
so that '&' becomes a binary operator and not a unary operator.
2001-01-19 11:43:13 +00:00
Peter Wemm
95bca00f46 EEK! I missed a couple of places with the 24->32 interrupt change. 2001-01-19 10:55:13 +00:00
Peter Wemm
031b6a102e Remove reference to splz_unpend - it is long gone. 2001-01-19 10:51:13 +00:00
Peter Wemm
a496358e30 Remove the now-empty ipl_funcs.c file on all platforms. 2001-01-19 09:59:56 +00:00
Peter Wemm
198c5b0891 Remove the static splXXX functions and replace them by static __inline
stubs.  Remove the xxx_imask variables which have been all but gone for
a while.
2001-01-19 09:57:29 +00:00
Peter Wemm
dfb1071f3c Fix a warning (the prototypes probably shouldn't be so over-zealously
#ifdef'ed though)
2001-01-19 09:07:16 +00:00
Bosko Milekic
08812b3925 Implement MTX_RECURSE flag for mtx_init().
All calls to mtx_init() for mutexes that recurse must now include
the MTX_RECURSE bit in the flag argument variable. This change is in
preparation for an upcoming (further) mutex API cleanup.
The witness code will call panic() if a lock is found to recurse but
the MTX_RECURSE bit was not set during the lock's initialization.

The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to
MTX_RECURSED, which is more appropriate given its meaning.

The following locks have been made "recursive," thus far:
eventhandler, Giant, callout, sched_lock, possibly some others declared
in the architecture-specific code, all of the network card driver locks
in pci/, as well as some other locks in dev/ stuff that I've found to
be recursive.

Reviewed by: jhb
2001-01-19 01:59:14 +00:00
Peter Wemm
7f12c0b5df The stallion.c pci driver is broken. Emit a warning if compiling LINT. 2001-01-17 01:21:08 +00:00
John Baldwin
10fd583277 Free the intrhand name when free'ing a intrhand.
Submitted by:	bde
2001-01-16 02:17:51 +00:00
Peter Wemm
194b08ffc3 Implement an optimization for INTREN/INTRDIS that bde pointed out last
time I tinkered around here.  Since INTREN is called from the interrupt
critical path now, it should not be too expensive.  In this case, we
look at the bits being changed to decide which 8 bit IO port to write to
rather than unconditionally writing to both.  I could probably have gone
further and only done the write if the bits actually changed, but that
seemed overkill for the usual case in interrupt threads.

[an outb is rather expensive when it has to cross the ISA bus]
2001-01-15 04:18:58 +00:00
Jake Burkholder
ef73ae4b0c Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
2001-01-10 04:43:51 +00:00
Peter Wemm
2ed19d58c3 Send the old if_wl in the old location to the Attic after a repo copy to
sys/dev/wi/*
2001-01-09 00:53:06 +00:00
Julian Elischer
30400f03aa Part 2 of the netgraph rewrite.
This is mostly cosmetic changes, (though I caught a bug or two while
makeing them)
Reviewed by:	archie@freebsd.org
2001-01-08 05:34:06 +00:00
Jake Burkholder
41ed17bfec Use %fs to access per-cpu variables in uni-processor kernels the same
as multi-processor kernels.  The old way made it difficult for kernel
modules to be portable between uni-processor and multi-processor
kernels.  It is no longer necessary to jump through hoops.

- always load %fs with the private segment on entry to the kernel
- change the type of the self referntial pointer from struct privatespace
  to struct globaldata
- make the globaldata symbol have value 0 in all cases, so the symbols
  in globals.s are always offsets, not aliases for fields in globaldata
- define the globaldata space used for uniprocessor kernels in C, rather
  than assembler
- change the assmebly language accessors to use %fs, add a macro
  PCPU_ADDR(member, reg), which loads the register reg with the address
  of the per-cpu variable member
2001-01-06 17:40:04 +00:00
Julian Elischer
069154d55f Rewrite of netgraph to start getting ready for SMP.
This version is functional and is aproaching solid..
notice I said APROACHING. There are many node types I cannot test
I have tested: echo hole ppp socket vjc iface tee bpf async tty
The rest compile and "Look" right.  More changes to follow.
DEBUGGING is enabled in this code to help if people have problems.
2001-01-06 00:46:47 +00:00
John Baldwin
430e72ee1c Attempt to read and verify the card's status in wi_stop() before sending it
the disable command.  On some systems, writing to the card after it has
been ejected causes the machine to hang.

Reviewed by:	wpaul
2000-12-18 23:49:56 +00:00
Julian Elischer
589f6ed8ce Divorce the kernel binary ABI version number from the message
format version number. (userland programs should not need to be
recompiled when the netgraph kernel internal ABI is changed.

Also fix modules that don;t handle the fact that a caller may not supply
a return message pointer. (benign at the moment because the calling code
checks, but that will change)
2000-12-18 20:03:32 +00:00
Bill Paul
163369c243 Apply some contributed patches to reduce number of tx buffer allocation
failures and add some support for WEP on Prism II chip.

Submitted by: YAMAMOTO Shigeru <shigeru@iij.ad.jp>
2000-12-15 23:34:13 +00:00
Bill Paul
1b49710482 Newbus the if_el (3Com 3c501) driver. Use bus_space_X() functions.
Add detach routine and turn driver into a module so it can be loaded
and unloaded. Also take a stab at implementing multicast packet
reception so that this NIC will work with IPv6. Promiscuous mode
doesn't seem to work, but I'm not sure why. It works well enough that
I can run dhclient on it and put it on the office network though.
Also ripped out spl stuff and replaced it with mutexes.
2000-12-15 20:09:10 +00:00
Jake Burkholder
7d8e3aa013 Use _lapic+offset to access the local apic from assembly language
files, rather than the symbols in globals.s.  The offsets are
generated by genassym.
2000-12-14 04:16:16 +00:00
Jake Burkholder
6d43764a10 Introduce a new potientially cleaner interface for accessing per-cpu
variables from i386 assembly language.  The syntax is PCPU(member)
where member is the capitalized name of the per-cpu variable, without
the gd_ prefix.  Example: movl %eax,PCPU(CURPROC).  The capitalization
is due to using the offsets generated by genassym rather than the symbols
provided by linking with globals.o.  asmacros.h is the wrong place for
this but it seemed as good a place as any for now.  The old implementation
in asnames.h has not been removed because it is still used to de-mangle
the symbols used by the C variables for the UP case.
2000-12-13 09:23:53 +00:00
Julian Elischer
1b3335af6a Another mismatch found by Gcc:
This is what happenss when you let the patches pile up too long without
committing them.. brain rot..
2000-12-12 23:56:16 +00:00
Julian Elischer
859a4d166c Reviewed by: Archie@freebsd.org
This clears out my outstanding netgraph changes.
There is a netgraph change of design in the offing and this is to some
extent a superset of soem of the new functionality and some of the old
functionality that may be removed.

This code works as before, but allows some new features that I want to
work with and evaluate. It is the basis for a version of netgraph
with integral locking for SMP use.

This is running on my test machine with no new problems :-)
2000-12-12 18:52:14 +00:00
Nick Sayer
4323578d73 Add the spic driver, which is a simple first attempt at providing access
to the jog dial device.
2000-12-11 19:41:48 +00:00
David Malone
7cc0979fd6 Convert more malloc+bzero to malloc+M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
2000-12-08 21:51:06 +00:00
Poul-Henning Kamp
959b7375ed Staticize some malloc M_ instances. 2000-12-08 20:09:00 +00:00
Peter Wemm
a263238c86 Move io_apic_{read,write} from apic_ipl.s (where they do not belong) into
mpapic.c.  This gives us the benefit of C type checking.  These functions
are not called in any critical paths and are not used by the interrupt
routines.
2000-12-06 01:04:02 +00:00
Peter Wemm
9a18987b73 GC unused assembler function apic_eoi() 2000-12-06 00:38:04 +00:00
Jake Burkholder
1eb44f0270 Remove the last of the MD netisr code. It is now all MI. Remove
spending, which was unused now that all software interrupts have
their own thread.  Make the legacy schednetisr use an atomic op
for setting bits in the netisr mask.

Reviewed by:	jhb
2000-12-05 00:36:00 +00:00
Peter Wemm
5ee171d264 Cleanup some leftover lint from the old interrupt system.
Also, while here, run up to 32 interrupt sources on APIC systems.
Normalize INTREN/INTRDIS so they are the same on both UP and SMP systems
rather than sometimes a macro, and sometimes a function.

Reviewed by:  jhb, jakeb
2000-12-04 21:15:14 +00:00
David Malone
0863e00340 Check return value of malloc correctly and use M_ZERO. 2000-12-03 13:18:49 +00:00
Mark Murray
4a3a2f0704 Namespace cleanup. Remove some #includes in favour of an explicit
declaration.

Asked for by:	bde
2000-12-02 17:59:41 +00:00
Jake Burkholder
21ad98bca8 Change doreti to take a trapframe instead of an intrframe.
Remove associated pushes of dummy units to convert frame.

Reviewed by:	jhb
2000-12-01 02:09:45 +00:00
Alfred Perlstein
82625cf321 remove unneded sys/ucred.h includes 2000-11-30 18:52:32 +00:00
Jonathan Lemon
df5e198723 Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue.  Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.

IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue.  An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.

Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
2000-11-25 07:35:38 +00:00
Julian Elischer
06525b98f2 Duh. These have been sitting in my tree since I committed this stuff.
Thes are identical to what I committed except that they had the correct
copyright headers. This is what I was SUPPOSED to have checked in..
2000-11-20 13:43:40 +00:00
John Baldwin
7c06c69188 Assert that Giant is not owned during the main loop of ithd_loop(). 2000-11-15 22:03:26 +00:00
Yoshihiro Takahashi
5c84db5258 Switched from i386/isa/scsi_dvcfg.h to cam/scsi/scsi_dvcfg.h 2000-11-05 14:34:35 +00:00
Poul-Henning Kamp
cf9fa8e725 Move suser() and suser_xxx() prototypes and a related #define from
<sys/proc.h> to <sys/systm.h>.

Correctly document the #includes needed in the manpage.

Add one now needed #include of <sys/systm.h>.
Remove the consequent 48 unused #includes of <sys/proc.h>.
2000-10-29 16:06:56 +00:00
John Baldwin
a76e4179b4 Don't ignore VESA modes that have the NON-VGA bit set. All of the SVGA
graphical modes on some systems have this bit set causing our VESA code
to ignore them.
2000-10-28 22:35:57 +00:00
Poul-Henning Kamp
54b1161b73 Revert two experimental changes which escaped from my devel machine. 2000-10-28 06:55:12 +00:00
John Baldwin
7c0cb49a64 Fix a couple of whitespace nits. 2000-10-27 21:45:50 +00:00
Poul-Henning Kamp
46aa3347cb Convert all users of fldoff() to offsetof(). fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.

Define __offsetof() in <machine/ansi.h>

Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>

Remove myriad of local offsetof() definitions.

Remove includes of <stddef.h> in kernel code.

NB: Kernelcode should *never* include from /usr/include !

Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.

Deprecate <struct.h> with a warning.  The warning turns into an error on
01-12-2000 and the file gets removed entirely on 01-01-2001.

Paritials reviews by:   various.
Significant brucifications by:  bde
2000-10-27 11:45:49 +00:00
John Baldwin
fbc9c4f042 Catch up to the new software interrupt code.
Noticed by:	phk
2000-10-25 21:24:08 +00:00
John Baldwin
49e0078b0f - Catch up to new software interrupt code.
- Add a missing curly brace.

Noticed by:	phk
2000-10-25 21:13:42 +00:00
John Baldwin
62a010fecf - Remove unneeded machine/ipl.h #include.
- Change the softintr() macro to do nothing on FreeBSD.  Previously,
  this macro would set a bit in spending and schedule the softinterrupt
  thread to run.  However, the bs driver never actually registers a
  a software interrupt handler, so all this work achieved nothing.  From
  the code it is not clear what exactly the softintr() macro is actually
  supposed to be doing.  It looks like it is supposed to be possibly
  running the hardware interrupt handler maybe?  This handler is only
  present in the #ifdef __NetBSD__ code however.  I have no idea how this
  driver handles interrupts at all, but at least it compiles now.
2000-10-25 20:38:08 +00:00
Paul Saab
fbdfe15620 Fast interrupts have no associated process, therefore do not try
and schedule it.  This fixes booting machines with broken MP tables.
2000-10-25 10:40:20 +00:00
John Baldwin
8088699f79 - Overhaul the software interrupt code to use interrupt threads for each
type of software interrupt.  Roughly, what used to be a bit in spending
  now maps to a swi thread.  Each thread can have multiple handlers, just
  like a hardware interrupt thread.
- Instead of using a bitmask of pending interrupts, we schedule the specific
  software interrupt thread to run, so spending, NSWI, and the shandlers
  array are no longer needed.  We can now have an arbitrary number of
  software interrupt threads.  When you register a software interrupt
  thread via sinthand_add(), you get back a struct intrhand that you pass
  to sched_swi() when you wish to schedule your swi thread to run.
- Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit
  more intuitive.  Also, prefix all the members of struct intrhand with
  'ih_'.
- Make swi_net() a MI function since there is now no point in it being
  MD.

Submitted by:	cp
2000-10-25 05:19:40 +00:00
John Baldwin
35e0e5b311 Catch up to moving headers:
- machine/ipl.h -> sys/ipl.h
- machine/mutex.h -> sys/mutex.h
2000-10-20 07:58:15 +00:00
John Baldwin
d1182da2cf Actually harvest interrupt threads when the last handler is removed from a
thread.
2000-10-20 07:46:12 +00:00
John Baldwin
02660e29a8 - machine/mutex.h -> sys/mutex.h
- machine/ipl.h -> sys/ipl.h
- Use MUTEX_DECLARE() for clock_lock
2000-10-20 07:31:00 +00:00
KATO Takenori
1ae7243298 Convert the type of bus_space_handle_t of pc98 from structure into
pointer to structure.

Reviewed by:	nyan
2000-10-20 02:42:06 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Yoshihiro Takahashi
6bf6c91f5d Fixed warnings. 2000-10-15 04:54:17 +00:00
Bill Paul
9fa3f7b0f2 Update the wi driver to use mutexes instead of spls. 2000-10-13 20:33:24 +00:00
Bruce Evans
00d8d16417 Don't depend on <machine/cpufunc.h> unnecessarily including <machine/lock.h>. 2000-10-12 16:15:24 +00:00
Poul-Henning Kamp
f6b5c74c35 Initiate deorbit burn sequence for <machine/mouse.h>.
Replace all in-tree uses with <sys/mouse.h> which repo-copied a few
moments ago from src/sys/i386/include/mouse.h by peter.
This is also the appropriate fix for exo-tree sources.

Put warnings in <machine/mouse.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/mouse.h> files will be removed.
2000-10-09 08:08:36 +00:00
Poul-Henning Kamp
00d25f512c Initiate deorbit burn sequence for <machine/console.h>.
Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>.
This is also the appropriate fix for exo-tree sources.

Put warnings in <machine/console.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/console.h> files will be removed.
2000-10-08 21:34:00 +00:00
Bruce Evans
e3c3da9ab6 Made this file compile again after move of stuff from <machine.ipl.h>
to <sys/ipl.h>.
2000-10-08 14:41:13 +00:00
Bruce Evans
db8ec2a244 Use schedsofttty() again (SMPng casualty with intentionally wrong fix
in rev.1.101).

Made this file compile again after move of stuff from <machine.ipl.h>
to <sys/ipl.h>.
2000-10-08 14:37:39 +00:00
KATO Takenori
f16d554272 Caught up with the changes in interruption stuff. 2000-10-07 06:01:38 +00:00
John Baldwin
6c56727456 - Change fast interrupts on x86 to push a full interrupt frame and to
return through doreti to handle ast's.  This is necessary for the
  clock interrupts to work properly.
- Change the clock interrupts on the x86 to be fast instead of threaded.
  This is needed because both hardclock() and statclock() need to run in
  the context of the current process, not in a separate thread context.
- Kill the prevproc hack as it is no longer needed.
- We really need Giant when we call psignal(), but we don't want to block
  during the clock interrupt.  Instead, use two p_flag's in the proc struct
  to mark the current process as having a pending SIGVTALRM or a SIGPROF
  and let them be delivered during ast() when hardclock() has finished
  running.
- Remove CLKF_BASEPRI, which was #ifdef'd out on the x86 anyways.  It was
  broken on the x86 if it was turned on since cpl is gone.  It's only use
  was to bogusly run softclock() directly during hardclock() rather than
  scheduling an SWI.
- Remove the COM_LOCK simplelock and replace it with a clock_lock spin
  mutex.  Since the spin mutex already handles disabling/restoring
  interrupts appropriately, this also lets us axe all the *_intr() fu.
- Back out the hacks in the APIC_IO x86 cpu_initclocks() code to use
  temporary fast interrupts for the APIC trial.
- Add two new process flags P_ALRMPEND and P_PROFPEND to mark the pending
  signals in hardclock() that are to be delivered in ast().

Submitted by:	jakeb (making statclock safe in a fast interrupt)
Submitted by:	cp (concept of delaying signals until ast())
2000-10-06 02:20:21 +00:00
John Baldwin
3ed78c6696 - Include opt_vesa.h in vesa.c so that the VESA_DEBUG option is actually
propagated from the kernel config file to the source.
- Add some more debug messages to list each mode that is rejected or found.
2000-10-06 01:43:59 +00:00
John Baldwin
1931cf940a - Heavyweight interrupt threads on the alpha for device I/O interrupts.
- Make softinterrupts (SWI's) almost completely MI, and divorce them
  completely from the x86 hardware interrupt code.
  - The ihandlers array is now gone.  Instead, there is a MI shandlers array
    that just contains SWI handlers.
  - Most of the former machine/ipl.h files have moved to a new sys/ipl.h.
- Stub out all the spl*() functions on all architectures.

Submitted by:	dfr
2000-10-05 23:09:57 +00:00
Mike Smith
12a02d6efd Move the i386 PCI attachment code out of i386/isa back into i386/pci.
Split out the configuration space access primitives, as these are needed
elsewhere as well.
2000-10-02 07:11:13 +00:00
Peter Wemm
2da5dbec3e Put on my nuclear-grade asbestos suit and cvs rm the old, broken, sound
drivers (again).  These drivers have not compiled for 5-6 months.
Now that the new sound code supports MIDI, the major reason we had for
reviving it is gone.  It is a far better investment polishing the new
midi code than trying to keep this on life support.  Come 5.0-REL, if
there are major shortcomings in the pcm sound driver then maybe we can
rethink this, but until then we should focus on pcm.

Remember, these have not been compilable since ~April-May this year.
2000-10-02 03:13:50 +00:00
Peter Wemm
b6c8407840 Get out the roto-rooter and clean up the abuse of nexus ivars by the
i386/isa/pcibus.c.  This gets -current running again on multiple host->pci
machines after the most recent nexus commits.  I had discussed this with
Mike Smith, but ended up doing it slightly differently to what we
discussed as it turned out cleaner this way.  Mike was suggesting creating
a new resource (SYS_RES_PCIBUS) or something and using *_[gs]et_resource(),
but IMHO that wasn't ideal as SYS_RES_* is meant to be a global platform
property, not a quirk of a given implementation.  This does use the ivar
methods but does so properly.  It also now prints the physical pci bus that
a host->pci bridge (pcib) corresponds to.
2000-09-28 00:37:32 +00:00
Paul Saab
7321545f26 Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC,
NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP.

Reviewed by:	peter
2000-09-22 23:40:10 +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
Poul-Henning Kamp
2404c3f99d Make LINT link.
cy driver is broken post SMPng.
2000-09-16 19:04:24 +00:00
Poul-Henning Kamp
3045b21279 Make LINT compile. 2000-09-16 18:48:11 +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
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
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
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
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
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
452d07c1ce Provide keyboard entropy harvesting for PCVT users. 2000-09-10 14:31:40 +00:00
KATO Takenori
0c8c2cd619 Fixed the softintr macro which directly accessed ipending.
Suggested by:	jasone
2000-09-08 11:58:25 +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
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
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
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
280b4748af Take a shot at fixing multiple pci busses on i386.
pcib_set_bus() cannot be used on the new child because it is
meant to be used on the *pci* device (it looks at the parent internally)
not the pcib being added.  Bite the bullet and use ivars for the bus
number to avoid any doubts about whether the softc is consistant between
probe and attach.  This should not break the Alpha code.
2000-08-31 23:11:35 +00:00
Mike Smith
3e755f76d1 Make it possible to pass boot()'s flags to shutdown_nice() so that the
kernel can instigate an orderly shutdown but still determine the form of
that shutdown.  Make it possible eg. to cleanly shutdown and power off the
system under ACPI when the power button is pressed.
2000-08-31 00:08:50 +00:00
Doug Rabson
21c3015a24 * Completely rewrite the alpha busspace to hide the implementation from
the drivers.
* Remove legacy inx/outx support from chipset and replace with macros
  which call busspace.
* Rework pci config accesses to route through the pcib device instead of
  calling a MD function directly.

With these changes it is possible to cleanly support machines which have
more than one independantly numbered PCI busses. As a bonus, the new
busspace implementation should be measurably faster than the old one.
2000-08-28 21:48:13 +00:00
KATO Takenori
42749d0d15 Fixed freeing wrong address.
Submitted by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
2000-08-24 08:01:49 +00:00
Sheldon Hearn
ec81f5f05a Fix the matcd driver for the new world order. This basically just
renames matcdc to matcd.

This change is reported to work by two independent PR originators.
In the absence of further feedback on the freebsd-bugs list, we
may as well get this working for its two users.

PR:		20296
Submitted by:	George Russell <george.russell@clara.net>,
		Remi Guyomarch <rguyom@mail.dotcom.fr>
2000-08-23 09:29:05 +00:00
Paul Saab
c206a8609e Change the behavior of isa_nmi to log an error message instead of
panicing and return a status so that we can decide whether to drop
into DDB or panic.  If the status from isa_nmi is true, panic the
kernel based on machdep.panic_on_nmi, otherwise if DDB is
enabled, drop to DDB based on machdep.ddb_on_nmi.

Reviewed by:	peter, phk
2000-08-06 14:17:21 +00:00
Poul-Henning Kamp
0825a8a33f Allow use of TSC even if APM is compiled in but disabled. 2000-07-30 21:05:22 +00:00
Hellmuth Michaelis
fc80937e0b have pcvt's non-console probe and attach routines called again in case
it is configured in the kernel.
2000-07-15 13:16:28 +00:00
Archie Cobbs
21b8ebd926 Make all Ethernet drivers attach using ether_ifattach() and detach using
ether_ifdetach().

The former consolidates the operations of if_attach(), ng_ether_attach(),
and bpfattach(). The latter consolidates the corresponding detach operations.

Reviewed by:	julian, freebsd-net
2000-07-13 22:54:34 +00:00
Poul-Henning Kamp
77978ab8bc Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.
Pointed out by:	bde
2000-07-04 11:25:35 +00:00
Poul-Henning Kamp
82d9ae4e32 Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:
Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:

        -sysctl_vm_zone SYSCTL_HANDLER_ARGS
        +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
2000-07-03 09:35:31 +00:00
Mark Murray
0de838f6c0 Remove old entropy-harvesting hooks; this is going to be re-engineered
later.
2000-06-25 09:55:12 +00:00
Steve Passe
80940373ed Fixed atpic_attach() for the SMP (specifically APIC_IO) case.
Approved by:	msmith@freebsd.org
2000-06-24 23:55:38 +00:00
Mike Smith
bb9c06c1ce Make the PnP 'slopsucker' quiet in the !bootverbose case - the real NPX
probe happens much earlier, and may come to very different conclusions
about the system's NPX setup.
2000-06-23 08:19:50 +00:00
Mike Smith
2a50a6d730 Add PnP probe methods to some common AT hardware drivers. In each case,
the PnP probe is merely a stub as we make assumptions about some of this
hardware before we have probed it.

Since these devices (with the exception of the speaker) are 'standard',
suppress output in the !bootverbose case to clean up the probe messages
somewhat.
2000-06-23 07:44:33 +00:00
Mike Smith
04de761e36 Collect the ISA DMA defines from the MI ISA code, not a private copy. 2000-06-23 07:40:57 +00:00
Ollivier Robert
a0b74543ff Bring the an(4) fixes to wi(4):
- suser check
- splx() fix.

Reminded by:	Aaron Campbell <aaron@openbsd.org>
2000-06-19 00:17:13 +00:00
Alexander Langer
0cca1cc078 Fix typo (accessable --> accessible).
PR:		18588
Submitted by:	Anatoly Vorobey <mellon@pobox.com>
Reviewed by:	asmodai
2000-06-14 17:53:40 +00:00
Peter Wemm
f71c01cc52 Borrow phk's axe and apply the next stage of config(8)'s evolution.
Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.

config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel.  You can reconfigure your
isa devices with the likes of this at loader(8) time:
  set hint.ed.0.port=0x320

userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.

It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8).  See the "hints" directive in GENERIC
as an example.

All device wiring has been moved out of config(8).  There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file.  If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you.  You can also compile in the
hints directly with:  hints "device.hints"  as well.

There are a few things that I'm not too happy with yet.  Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it.  However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built.  A stack of man4 pages will need updating. :-/

Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated.  eg:  'device fe 4' will compile the fe driver with NFE set
to 4.  You can then set hints for 4 units (0 - 3).  Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this.  This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.

Please exercise EXTREME CAUTION when transitioning!

Moral support by: phk, msmith, dfr, asmodai, imp, and others
2000-06-13 22:28:50 +00:00
Seigo Tanimura
1f82d2d70d 1. Update Comtrol RocketPort driver(rp) to version 3.02.
2. Newbusify the driver.
3. Build as a module.

4. Use correct minor numbers when creating device files.
5. Correctly lock control characters.
6. Return ENXIO when device not configured.
Submitted by:	Tor Egge	<Tor.Egge@fast.no>

7. Fix the baud_table.
Submitted by:	Elliot Dierksen	<ebd@oau.org>

Note:
- the old driver still lives in src/sys/i386/isa, so that you can
  revert to it if something goes wrong.
- The module does not detach very well. Attaching works fine.
2000-06-11 06:43:16 +00:00
Peter Wemm
2c2bb10f49 No-op change. Remove #if NVT > 0 in files that are 'optional vt' and
therefore can never be compiled if NVT == 0. config(8) guarantees this.
2000-06-10 11:03:31 +00:00
Matthew Dillon
50ed7dfec0 INTR_TYPE_FAST / FAST_INTR interrupts (currently just serial interrupts)
have their own lock and do not need the MP lock.  The SMP cleanup was
    a little too conservative in MP locking fast interrupts but at least
    it's trivial to fix.  MFC soon.

Submitted by: bde
2000-06-06 15:28:00 +00:00
Bruce Evans
6b4a3ce242 Pack the SWI bits to save some time and space. 2000-05-31 16:36:20 +00:00
Bruce Evans
5f582114dd Add SWI_TQ_MASK to all interrupt masks except SWI_CLOCK_MASK. Use a
new macro SWI_LOW_MASK to give the mask for low priority SWIs instead
of hard-coding this mask as SWI_CLOCK_MASK.

Reviewed by:	dfr
2000-05-31 13:32:28 +00:00
Doug Rabson
3e8965ac09 Add SWI_TQ_MASK to imask definition. 2000-05-29 19:40:42 +00:00
Doug Rabson
ca2e05343b Add taskqueue system for easy-to-use SWIs among other things.
Reviewed by: arch
2000-05-28 15:45:30 +00:00
Peter Wemm
6a4c2576dc Mass update of isa drivers using compatability shims to use
COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
2000-05-28 13:40:48 +00:00
Peter Wemm
e60463deed Redo the isa compat driver shim so that each driver is self contained
and does not require that evil list of drivers in isa_compat.h.
It uses the same strategy that pci drivers use, namely a
COMPAT_ISA_DRIVER() macro that creates the glue on the fly.
Theoretically old-style isa drivers should be preloadable now.
2000-05-28 13:30:44 +00:00
Peter Wemm
11ffbffb13 Remove haveseen_iobase() - it is no longer called from anywhere in the
kernel.
2000-05-28 10:11:49 +00:00
Jake Burkholder
e39756439c Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
Jun Kuriyama
569e965893 Add OPTi 82C700 chipset.
Submitted by:	sanpei@sanpei.org
PR:		kern/18155 (part of)
2000-05-24 09:03:30 +00:00
Jun Kuriyama
3cc13eb5b1 Add 440MX chipset.
Submitted by:	YOSHIMURA Hideaki <hideakiy@cs-tokyo01.chuosystem.co.jp>
References:	[bsd-nomads:13764]
2000-05-24 02:24:38 +00:00
Jake Burkholder
740a1973a6 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
Paul Richards
02a350614e Remove old lnc files. 2000-05-14 18:27:47 +00:00
Archie Cobbs
2e2de7f23f Move code to handle BPF and bridging for incoming Ethernet packets out
of the individual drivers and into the common routine ether_input().
Also, remove the (incomplete) hack for matching ethernet headers
in the ip_fw code.

The good news: net result of 1016 lines removed, and this should make
bridging now work with *all* Ethernet drivers.

The bad news: it's nearly impossible to test every driver, especially
for bridging, and I was unable to get much testing help on the mailing
lists.

Reviewed by:	freebsd-net
2000-05-14 02:18:43 +00:00
David E. O'Brien
fc81cf82e9 1. `movl' is for use with 32-bit operands. Do NOT use it with 16-bit
operands.  `movw' could be used, but instead let the assembler decide
   the right instruction to use.
2. AT&T asm syntax requires a leading '*' in front of the operand for
   indirect calls and jumps.
2000-05-10 01:24:23 +00:00
David E. O'Brien
589607c435 AT&T asm syntax requires a leading '*' in front of the operand for indirect
calls and jumps.
2000-05-10 01:21:15 +00:00
Poul-Henning Kamp
97de15e7ce Oops, <sys/buf.h> still needed here for pc98 (and consequently sys/bio.h). 2000-05-05 12:02:30 +00:00
Poul-Henning Kamp
9626b608de Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by:    peter
2000-05-05 09:59:14 +00:00
Poul-Henning Kamp
e4961fbf07 Don't use struct buf for random small temporary buffers. 2000-05-05 09:05:39 +00:00
Garrett Wollman
54f1d0cefe Add a little do-nothing ``slopsucker'' device which gives a home
to PNP0c04 (legacy ISA coprocessor support).  Tourist info.
2000-05-04 23:57:32 +00:00
Mike Smith
ac9b3dacb2 Don't assume that the PCI BIOS is going to clear the unused bits in %ecx
when it returns.
2000-05-04 17:44:55 +00:00
Peter Wemm
365c5db0a7 Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
Poul-Henning Kamp
eb95c536ad Remove unneeded #include <sys/kernel.h> 2000-04-29 15:36:14 +00:00
Peter Wemm
621372ff84 Mark two functions as private. 2000-04-29 07:48:37 +00:00
Julian Elischer
a4ec03cfa8 Two simple changes to the kernel internal API for netgraph modules,
to support future work in flow-control and 'packet reject/replace'
processing modes.

reviewed by: phk, archie
2000-04-28 17:09:00 +00:00
David E. O'Brien
b0e56cde37 * Use sys/sys/random.h rather than a i386 specific one.
* There was nothing that should be machine dependant about
  i386/isa/random_machdep.c, so it is now sys/kern/kern_random.c.
2000-04-24 17:30:08 +00:00
Yoshihiro Takahashi
5844ed9ed1 Changed interrupt level to splcam() because of the bs driver is CAM driver.
Pointed out:	MITSUNAGA Noriaki <mitchy@er.ams.eng.osaka-u.ac.jp>
2000-04-22 15:07:02 +00:00
Poul-Henning Kamp
3389ae9350 Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>
2000-04-19 14:58:28 +00:00
Poul-Henning Kamp
ed6aff7387 Remove unneeded <sys/buf.h> includes.
Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks
by 924 bytes.
2000-04-18 15:15:39 +00:00
Warner Losh
487e50ecdb hm committed newbused vt driver this weekend, so it is no longer needed
in isa_compat.

LINT now builds again.
2000-04-17 23:01:53 +00:00
Bill Paul
339dabccd7 When in infrastructure mode, use address 3 from the 802.11 header as the
source address when receiving frames (and keep using address 2 when in
pseudo-IBSS mode). This is apparently necessary in order to obtain the
true MAC address of the sending station which is needed for PPPoE.

Patch supplied by: Blaz Zupan <blaz@amis.net>
2000-04-17 18:47:28 +00:00
Mike Smith
300451c472 Some more i386-only BIOS-friendliness:
- Add support for using the PCI BIOS functions for configuration space
   accesses, and make this the default.

 - Make PNPBIOS the default (obsoletes the PNPBIOS config option).

 - Add two new boot-time tunables to disable each of the above.
2000-04-16 20:48:33 +00:00
Hellmuth Michaelis
bb51063397 Convert pcvt to use the newbus driver framework, options COMPAT_OLDISA
is no longer required to compile pcvt.
2000-04-16 09:33:17 +00:00
Poul-Henning Kamp
8177437d85 Complete the bio/buf divorce for all code below devfs::strategy
Exceptions:
        Vinum untouched.  This means that it cannot be compiled.
        Greg Lehey is on the case.

        CCD not converted yet, casts to struct buf (still safe)

        atapi-cd casts to struct buf to examine B_PHYS
2000-04-15 05:54:02 +00:00
Warner Losh
0491a49ae7 Don't complain about not getting resources for the compatibility shim
drivers unless booted -verbose.  This cleans up the boot messages
somewhat as the old messages were confusing and not helpful for most
people.
2000-04-08 17:21:15 +00:00
John Hay
49ce7a6052 Make the N2 isa cards probe again. Remove the unused frame relay hooks.
This should also fix PR 17814 where flags were ignored on the first
usage of ifconfig on the interface.

PR:		17814
2000-04-08 17:14:00 +00:00
Doug Rabson
f7b7769172 * Factor out the object system from new-bus so that it can be used by
non-device code.
* Re-implement the method dispatch to improve efficiency. The new system
  takes about 40ns for a method dispatch on a 300Mhz PII which is only
  10ns slower than a direct function call on the same hardware.

This changes the new-bus ABI slightly so make sure you re-compile any
driver modules which you use.
2000-04-08 14:17:18 +00:00
Yoshihiro Takahashi
4b00895121 Newbusify adv driver.
Reviewed by:	imp
2000-04-07 11:32:42 +00:00
Peter Wemm
6097b91867 Finally cvs rm these two files; they were not referenced in conf/files*,
and were accumulating history as a result of recursive script processing.
2000-04-06 08:18:30 +00:00
Poul-Henning Kamp
c244d2de43 Move B_ERROR flag to b_ioflags and call it BIO_ERROR.
(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while we transition, they
will be obsoleted once bio structs chain/stack.

Add bio_queue field for struct bio aware disksort.

Address a lot of stylistic issues brought up by bde.
2000-04-02 15:24:56 +00:00
Hellmuth Michaelis
e1916ce25d PR: kern/2327
Submitted by: Brian Campbell (brianc@netrover.com)

Add a "green" saver mode to pcvt.
2000-03-31 08:28:18 +00:00
Warner Losh
fd6715ee6a Oldconfig cs driver. Obsoleted by newbus driver in sys/dev/cs.
Implicitly submitted by: max@rsu.ru
2000-03-30 05:19:38 +00:00
Warner Losh
5664bf9cea NewBus the cs driver.
Submitted by: max@rsu.ru
2000-03-30 05:16:16 +00:00
KATO Takenori
f984cb1883 Ratoc REX-9880/83 support (PC-98 only). This commit added functions
fe_read_eeprom_rex() and fe_init_rex().  These functions should be
useful for REX-5580 series (for PC-AT).  But they are included in
`#ifdef PC98' to avoid warnings by unused static functions.  If you
try to support REX-5580, please be aware of these functions.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-29 12:44:19 +00:00
Matthew Dillon
7da240d003 This should fix the lockups people have been experiencing. I muffed up
giving astpending two flag bits.  A cmpl $0 had to turn into a bit test.

Many thanks to: Alain Thivillon <Alain.Thivillon@hsc.fr>
2000-03-29 09:07:47 +00:00
Matthew Dillon
bd5caafc4d The SMP cleanup commit broke need_resched, this fixes that and also
removed unncessary MPLOCKED and 'lock' prefixes from the interrupt
    nesting level, since (A) the MP lock is held at the time, and (B) since
    the neting level is restored prior to return any interrupted code
    will see a consistent value.
2000-03-29 06:15:43 +00:00
KATO Takenori
91cb959ddb Added indirect pio into the bus space stuff for the NEC PC-98. bus.h
includes one of bus_at386.h and bus_pc98.h. Becuase only bus_pc98.h
supports indirect pio and bus_at386.h is identical to old bus.h, there
is no functional change in PC-AT's kernels.  That is, it cannot cause
performance loss.

Submitted by:	nyan
Reviewed by:	imp
bde and luoqi provided useful comments for earlier version.
2000-03-29 03:15:22 +00:00
Hellmuth Michaelis
f4fbd51a87 pcvt cleanup.
after cleaning up pcvt_ioctl.h (and ispcvt) adjust kernel part
again to get everything in sync again (name, minor release no.
and major release no.)
2000-03-28 09:32:29 +00:00
Matthew Dillon
36e9f877df Commit major SMP cleanups and move the BGL (big giant lock) in the
syscall path inward.  A system call may select whether it needs the MP
    lock or not (the default being that it does need it).

    A great deal of conditional SMP code for various deadended experiments
    has been removed.  'cil' and 'cml' have been removed entirely, and the
    locking around the cpl has been removed.  The conditional
    separately-locked fast-interrupt code has been removed, meaning that
    interrupts must hold the CPL now (but they pretty much had to anyway).
    Another reason for doing this is that the original separate-lock for
    interrupts just doesn't apply to the interrupt thread mechanism being
    contemplated.

    Modifications to the cpl may now ONLY occur while holding the MP
    lock.  For example, if an otherwise MP safe syscall needs to mess with
    the cpl, it must hold the MP lock for the duration and must (as usual)
    save/restore the cpl in a nested fashion.

    This is precursor work for the real meat coming later: avoiding having
    to hold the MP lock for common syscalls and I/O's and interrupt threads.
    It is expected that the spl mechanisms and new interrupt threading
    mechanisms will be able to run in tandem, allowing a slow piecemeal
    transition to occur.

    This patch should result in a moderate performance improvement due to
    the considerable amount of code that has been removed from the critical
    path, especially the simplification of the spl*() calls.  The real
    performance gains will come later.

Approved by: jkh
Reviewed by: current, bde (exception.s)
Some work taken from: luoqi's patch
2000-03-28 07:16:37 +00:00
Hellmuth Michaelis
191293e031 Substantially cleanup of the pcvt kernel part. This cleanup does
not introduce (hopefully) any functional changes but gets rid of
the #ifdef spaghetti pcvt suffered from more and more over the
years.

Several no more used parts of the source were removed, others
which are used by default are now non-optional components:

PCVT_NETBSD		removed completety
PCVT_FREEBSD		removed option, code is now standard
PCVT_KBD_FIFO		removed option, code is now standard
PCVT_EMU_MOUSE		removed completety
PCVT_SW0CNOUTP		removed completety
PCVT_PORTIO_DELAY	obsolete, removed
PCVT_KEYBDID		removed option, code is now standard
PCVT_SIGWINCH		removed option, code is now standard
PCVT_PALFLICKER		removed completety
PCVT_WAITRETRACE	removed completety
PCVT_NOFASTSCROLL	removed option, code is now standard
PCVT_USL_VT_COMPAT	removed the "old" non-vt Xserver code completely,
			depending on XSERVER, this code is now standard.

Pcvt userland cleanup will follow as well as newbusifying the
kernel part.
2000-03-26 09:17:14 +00:00
Poul-Henning Kamp
91266b96c4 Isolate the Timecounter internals in their own two files.
Make the public interface more systematically named.

Remove the alternate method, it doesn't do any good, only ruins performance.

Add counters to profile the usage of the 8 access functions.

Apply the beer-ware to my code.

The weird +/- counts are caused by two repocopies behind the scenes:
	kern/kern_clock.c -> kern/kern_tc.c
	sys/time.h -> sys/timetc.h
(thanks peter!)
2000-03-20 14:09:06 +00:00
Poul-Henning Kamp
21144e3bf1 Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new
field in struct buf: b_iocmd.  The b_iocmd is enforced to have
exactly one bit set.

B_WRITE was bogusly defined as zero giving rise to obvious coding
mistakes.

Also eliminate the redundant struct buf flag B_CALL, it can just
as efficiently be done by comparing b_iodone to NULL.

Should you get a panic or drop into the debugger, complaining about
"b_iocmd", don't continue.  It is likely to write on your disk
where it should have been reading.

This change is a step in the direction towards a stackable BIO capability.

A lot of this patch were machine generated (Thanks to style(9) compliance!)

Vinum users:  Greg has not had time to test this yet, be careful.
2000-03-20 10:44:49 +00:00
Peter Wemm
c4a75202fb This file was repo copied and I forgot to cvs rm this here. 2000-03-20 07:21:40 +00:00
KATO Takenori
2f90f1f892 Increment number of retries before giving up. This may fix the
problem that some CD-ROM drives are not recognized if they are empty.

Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-03-20 03:55:29 +00:00
Paul Richards
c4bf272b86 Update the copyright. Remove the advertising clause. 2000-03-20 00:53:46 +00:00
Paul Saab
891c64630d Make SPLASSERT sysctl and boot time tunable with kern.splassertmode.
The following values are understood:  0 (ignore), 1 (log), and 2
(panic).

The default value is 1.

Reviewed by:	peter
2000-03-19 14:55:42 +00:00
Peter Wemm
80060e8897 Connect the ISA and PCI compatability shims to an option. In this case
it's options COMPAT_OLDISA and COMPAT_OLDPCI.  This is meant to be a
fairly strong incentive to update the older drivers to newbus, but doesn't
(quite) leave anybody hanging with no hardware support.  I was talking with
a few folks and I was encouraged to simply break or disable the shims but
that was a bit too drastic for my liking.
2000-03-19 13:07:12 +00:00
Robert Watson
081d19aecd Modify if_wi.c to call bpfdetach(ifp) before if_detach(ifp), so as to
prevent a page fault if the card is ejected while BPF is in use.  This
could happen if DHCP or tcpdump was in use on that interface during
ejection.  Other drivers may also require this modification.

Reviewed by:	wes
2000-03-19 05:46:50 +00:00
Kazutaka YOKOTA
db3e34cb71 - Properly keep track of I/O port resources.
- Use bus_space_read/write() to access the ports.
2000-03-19 03:25:13 +00:00
Larry Lile
49ec367311 o Replace the old "oltr" driver with the completely re-written
new-bus Olicom driver, previously known as "ol".  The new
  driver unfortunately does not support ISA cards yet.

o Update the microcode files, interface library and include files
  to the latest PowerMACH works version.  Force even byte alignment
  of adapter microcode.

o Roll in some of the patches from Nikolai Saoukh <nms@ethereal.ru>.
2000-03-18 23:51:54 +00:00
Kazutaka YOKOTA
02572fd86e - `Newbus'ified the mse driver. 2000-03-18 15:43:13 +00:00
Kazutaka YOKOTA
6f6fe825bd - `Newbus'ified the driver.
- Properly keep track of resources (I/O ports and irq).
- Use bus_space_read/write() to access the ports.
- Add PnP IDs.
- Add a watchdog timer in case interrupts are lost (experimental).
- Add `detach' function (experimental).
2000-03-18 15:13:30 +00:00
Peter Wemm
645e837fbe Remove left over files from wd; Since pc98 still uses some of them those
were copied.  Some cleanup is still needed there, ie: unifdef -DPC98 etc.
2000-03-15 21:55:43 +00:00
Jeroen Ruigrok van der Werven
5949020620 Remove further vestiges of wd.
Submitted by:	sos
2000-03-14 17:21:17 +00:00
Jeroen Ruigrok van der Werven
4a447c7023 Get rid of wdc.
Submitted by:	Damieon Stark <visigoth@telemere.net>
2000-03-14 17:01:03 +00:00
Bruce Evans
03e4dc0805 Fixed a spelling error that disabled the rc driver. 2000-03-13 15:29:47 +00:00
Poul-Henning Kamp
d8b47cbb70 Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.
Define ISADMA_{READ,WRITE,RAW} macros with the same numeric
values as the B_{READ,WRITE,RAW} and use them instead throughout.
2000-03-13 10:19:32 +00:00
Bruce Evans
ce7a637f11 Fixed configuration of fast interrupts for the isa cy driver. They were
an early newbus casualty.  The isa compatibility cruft turned out to be
well suited for this fix.

Approved by:	jkh
2000-02-28 07:52:22 +00:00
Doug Rabson
ac19291f35 Add a workaround to allow us to detect the second pci bus on an HP
Netserver LS/2.

Approved by: jkh
2000-02-23 20:25:06 +00:00
Bruce Evans
90bb57afd9 Don't include <machine/ipl.h> in <sys/systm.h> in the i386 case. This
fixes some namespace pollution in general and breakage of modules that
aren't in the sys tree in particular (<machine/ipl.h> includes further
headers that aren't installed under /usr/include).

Reimplemented SPLASSERT() so that it is more machine independent and
less bloated and doesn't require the <machine/ipl.h> include spam.
In particular, don't assume that `cpl' can be printed using %08x
format.  The alpha arch doesn't even have `cpl'.  SPLASSERT() was
harmless on alphas because it isn't actually used.
2000-02-17 18:37:45 +00:00
Peter Wemm
e463cfe7b6 Fix is_splxxx() warnings when not compiled with INVARIANT_SUPPORT.
Approved by:	jkh
2000-02-14 06:11:53 +00:00
Doug Rabson
9a1498a435 Fix an uninitialised variable which affected probing on some machines.
Approved by: jkh
Reviewed by: gallatin
2000-02-13 09:49:05 +00:00
Andrew Gallatin
da4009202a Allow allows peer pci buses which are directly connected to the RCC host pci
chipset to be probed & attached on newer Dell PowerEdge servers, such as
the 2400 and 4400.

Reviewed by: 	dfr, msmith, jlemon
Tested by:	hnokubi@yyy.or.jp (in a previous incantation)
Approved by:	jkh
2000-02-09 20:05:30 +00:00
Nick Hibma
4f2e8d6383 Add PCI Id's for i810 chipsets.
PR:		16517
Submitted by:	SAKIYAMA Nobuo <sakichan@lares.dti.ne.jp>
Approved by:	jhk
2000-02-07 12:50:33 +00:00
Bill Paul
6f76cb1e28 Add support for WEP (encryption) for silver and gold WaveLAN/IEEE turbo cards.
Also update wicontrol to enable/disable encryption, set WEP keys and set the
TX key index. Silver cards only have 40-bit keys. This is something of a quick
hack, but it works well enough for me to commit this from the LinuxWorld
exhibit floor.

The WEP support only shows up if you have a card that supports it.

Would have been approved by: jkh, if he hadn't wandered off somewhere
Approved in his place by: msmith, who's standing right here
2000-02-02 17:59:13 +00:00
Bruce Evans
d02b52e7b5 Fixed longstanding brokenness of wddump() in LBA mode. LBA mode may now
be safe enough to recommend for working around the problem with CHS mode
normally being limited to 65536*16*63 sectors.

Fixed bitrot in related debugging code.

Fixed related style bugs.

Removed another vestige of bad144 support.
2000-01-30 07:58:14 +00:00
Peter Wemm
af88e209a2 Zap isa_device -> id_conflicts. The sole user of it (userconfig) never
actually used it since the only device that specified it (vga0) was marked
as "FLG_INVISIBLE" in userconfig and therefore never shown.

Suggested by:	bde
2000-01-29 18:01:10 +00:00
Peter Wemm
690f85de65 Remove a bunch of unused (NO-OP) #if NFOO > 0 type includes and some
#include "foo.h" headers.
2000-01-29 16:17:36 +00:00
Peter Wemm
e27c1addaa Remove #if NFOO > 0 (it's not required in most cases) and also where it
isn't used as a result, remove #include "foo.h".  Many of these drivers
still use NFOO for softc struct sizing etc however.
2000-01-29 16:00:34 +00:00